{"version":3,"file":"mmstack-form-validation.mjs","sources":["../../../../../packages/form/validation/src/lib/merge-validators.ts","../../../../../packages/form/validation/src/lib/array/max-length.ts","../../../../../packages/form/validation/src/lib/array/min-length.ts","../../../../../packages/form/validation/src/lib/array/index.ts","../../../../../packages/form/validation/src/lib/boolean/must-be-true.ts","../../../../../packages/form/validation/src/lib/boolean/index.ts","../../../../../packages/form/validation/src/lib/general/must-be.ts","../../../../../packages/form/validation/src/lib/general/not.ts","../../../../../packages/form/validation/src/lib/general/not-one-of.ts","../../../../../packages/form/validation/src/lib/general/one-of.ts","../../../../../packages/form/validation/src/lib/general/required.ts","../../../../../packages/form/validation/src/lib/general/index.ts","../../../../../packages/form/validation/src/lib/date/is-date.ts","../../../../../packages/form/validation/src/lib/date/max-date.ts","../../../../../packages/form/validation/src/lib/date/min-date.ts","../../../../../packages/form/validation/src/lib/date/util.ts","../../../../../packages/form/validation/src/lib/date/index.ts","../../../../../packages/form/validation/src/lib/number/integer.ts","../../../../../packages/form/validation/src/lib/number/is-number.ts","../../../../../packages/form/validation/src/lib/number/max.ts","../../../../../packages/form/validation/src/lib/number/min.ts","../../../../../packages/form/validation/src/lib/number/multiple-of.ts","../../../../../packages/form/validation/src/lib/number/index.ts","../../../../../packages/form/validation/src/lib/string/email.ts","../../../../../packages/form/validation/src/lib/string/is-string.ts","../../../../../packages/form/validation/src/lib/string/max-chars.ts","../../../../../packages/form/validation/src/lib/string/min-chars.ts","../../../../../packages/form/validation/src/lib/string/pattern.ts","../../../../../packages/form/validation/src/lib/string/trimmed.ts","../../../../../packages/form/validation/src/lib/string/uri.ts","../../../../../packages/form/validation/src/lib/string/index.ts","../../../../../packages/form/validation/src/lib/validators.ts","../../../../../packages/form/validation/src/mmstack-form-validation.ts"],"sourcesContent":["import { Validator } from './validator.type';\n\nconst INTERNAL_ERROR_MERGE_DELIM = '::INTERNAL_MMSTACK_MERGE_DELIM::';\n\nexport function defaultMergeMessage(errors: string[]): {\n  error: string;\n  tooltip: string;\n} {\n  const first = errors.at(0);\n\n  if (!first)\n    return {\n      error: '',\n      tooltip: '',\n    };\n\n  if (errors.length === 1) {\n    return {\n      error: first,\n      tooltip: '',\n    };\n  }\n\n  return {\n    error: `${first}, +${errors.length} issues`,\n    tooltip: errors.join('\\n'),\n  };\n}\n\nfunction toTooltipFn(\n  merge: (errors: string[]) => string | { tooltip: string; error: string },\n) {\n  return (errors: string[]) => {\n    const result = merge(errors);\n    if (typeof result === 'string') {\n      return {\n        error: result,\n        tooltip: '',\n        merged: errors.join(INTERNAL_ERROR_MERGE_DELIM),\n      };\n    }\n\n    return result;\n  };\n}\n\nexport function mergeValidators<T>(\n  ...validators: Validator<T>[]\n): (value: T) => string[] {\n  if (!validators.length) return () => [];\n\n  return (value) => validators.map((val) => val(value)).filter(Boolean);\n}\n\ntype MergeFn<T> = ((value: T) => string) & {\n  resolve: (mergedError: string) => {\n    error: string;\n    tooltip: string;\n  };\n};\n\nexport function createMergeValidators(\n  merge?: (errors: string[]) =>\n    | string\n    | {\n        tooltip: string;\n        error: string;\n      },\n) {\n  const mergeFn = merge ? toTooltipFn(merge) : defaultMergeMessage;\n\n  return <T>(validators: Validator<T>[]) => {\n    const validate = mergeValidators(...validators);\n\n    const fn = ((value: T) =>\n      validate(value).join(INTERNAL_ERROR_MERGE_DELIM)) as MergeFn<T>;\n\n    fn.resolve = (mergedError: string) => {\n      return mergeFn(mergedError.split(INTERNAL_ERROR_MERGE_DELIM));\n    };\n\n    return fn;\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMaxLengthMessageFactory(\n  max: number,\n  elementsLabel?: string,\n) {\n  return `Max ${max} ${elementsLabel}`;\n}\n\nexport function createMaxLengthValidator(\n  createMsg: (max: number, elementsLabel?: string) => string,\n): <T extends string | any[] | null>(\n  max: number,\n  elementsLabel?: string,\n) => Validator<T> {\n  return (max, elementsLabel = 'items') => {\n    const msg = createMsg(max, elementsLabel);\n    return (value) => {\n      const length = value?.length ?? 0;\n\n      if (length > max) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMinLengthMessageFactory(\n  min: number,\n  elementsLabel?: string,\n) {\n  return `Min ${min} ${elementsLabel}`;\n}\n\nexport function createMinLengthValidator(\n  createMsg: (min: number, elementsLabel?: string) => string,\n): <T extends string | any[] | null>(\n  min: number,\n  elementsLabel?: string,\n) => Validator<T> {\n  return (min, elementsLabel = 'items') => {\n    const msg = createMsg(min, elementsLabel);\n    return (value) => {\n      const length = value?.length ?? 0;\n\n      if (length < min) return msg;\n      return '';\n    };\n  };\n}\n","import { createMergeValidators } from '../merge-validators';\nimport { Validator } from '../validator.type';\nimport {\n  createMaxLengthValidator,\n  defaultMaxLengthMessageFactory,\n} from './max-length';\nimport {\n  createMinLengthValidator,\n  defaultMinLengthMessageFactory,\n} from './min-length';\n\nexport type ArrayMessageFactories = {\n  minLength: Parameters<typeof createMinLengthValidator>[0];\n  maxLength: Parameters<typeof createMaxLengthValidator>[0];\n};\n\nconst DEFAULT_MESSAGES: ArrayMessageFactories = {\n  minLength: defaultMinLengthMessageFactory,\n  maxLength: defaultMaxLengthMessageFactory,\n};\n\nexport type ArrayValidatorOptions = {\n  minLength?: number;\n  maxLength?: number;\n  elementsLabel?: string;\n};\n\nexport function createArrayValidators(\n  factories?: Partial<ArrayMessageFactories>,\n  merger = createMergeValidators(),\n) {\n  const t = { ...DEFAULT_MESSAGES, ...factories };\n  const base = {\n    minLength: createMinLengthValidator(t.minLength),\n    maxLength: createMaxLengthValidator(t.maxLength),\n  };\n\n  return {\n    ...base,\n    all: <T extends any[]>(opt: ArrayValidatorOptions) => {\n      const validators: Validator<T>[] = [];\n\n      if (opt.minLength !== undefined)\n        validators.push(base.minLength(opt.minLength, opt.elementsLabel));\n      if (opt.maxLength !== undefined)\n        validators.push(base.maxLength(opt.maxLength, opt.elementsLabel));\n\n      return merger(validators);\n    },\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMustBeTreFactory() {\n  return `Must be true`;\n}\n\nexport function createMustBeTrueValidator(\n  createMsg: () => string,\n): () => Validator<boolean> {\n  return () => {\n    const msg = createMsg();\n    return (value) => {\n      if (value !== true) return msg;\n      return '';\n    };\n  };\n}\n","import {\n  createMustBeTrueValidator,\n  defaultMustBeTreFactory,\n} from './must-be-true';\n\nexport type BooleanMessageFactories = {\n  mustBeTrue: Parameters<typeof createMustBeTrueValidator>[0];\n};\n\nconst DEFAULT_MESSAGES: BooleanMessageFactories = {\n  mustBeTrue: defaultMustBeTreFactory,\n};\n\nexport function createBooleanValidators(\n  factories?: Partial<BooleanMessageFactories>,\n) {\n  const t = { ...DEFAULT_MESSAGES, ...factories };\n\n  return {\n    mustBeTrue: createMustBeTrueValidator(t.mustBeTrue),\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMustBeMessageFactory(valueLabel: string) {\n  return `Must be ${valueLabel}`;\n}\n\nexport function createMustBeValidator(\n  createMessage: (valueLabel: string) => string,\n) {\n  return <T>(\n    value: T,\n    valueLabel = `${value}`,\n    matcher: (a: T, b: T) => boolean = Object.is,\n  ): Validator<T> => {\n    const msg = createMessage(valueLabel);\n\n    return (currentValue) => {\n      if (!matcher(value, currentValue)) return msg;\n      return '';\n    };\n  };\n}\n\nexport function defaultMustBeEmptyMessageFactory() {\n  return defaultMustBeMessageFactory('empty');\n}\n\nexport function createMustBeEmptyValidator(createMessage: () => string) {\n  return <T>() => createMustBeValidator(createMessage)<T>(null as T);\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultNotMessageFactory(valueLabel: string) {\n  return `Cannot be ${valueLabel}`;\n}\n\nexport function createNotValidator(\n  createMessage: (valueLabel: string) => string,\n) {\n  return <T>(\n    value: T,\n    valueLabel = `${value}`,\n    matcher: (a: T, b: T) => boolean = Object.is,\n  ): Validator<T> => {\n    const msg = createMessage(valueLabel);\n\n    return (currentValue) => {\n      if (matcher(value, currentValue)) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultNotOneOfMessageFactory(values: string) {\n  return `Cannot be one of: ${values}`;\n}\n\nfunction defaultToLabel<T>(value: T): string {\n  return `${value}`;\n}\n\nexport function createNotOneOfValidator(\n  createMessage: (values: string) => string,\n) {\n  return <T>(\n    values: T[],\n    toLabel: (value: T) => string = defaultToLabel,\n    identity: (a: T) => string = defaultToLabel,\n    delimiter = ', ',\n  ): Validator<T> => {\n    const valuesLabel = values.map(toLabel).join(delimiter);\n    const msg = createMessage(valuesLabel);\n\n    const map = new Map(values.map((v) => [identity(v), v]));\n\n    return (currentValue) => {\n      if (map.has(identity(currentValue))) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultOneOfMessageFactory(values: string) {\n  return `Must be one of: ${values}`;\n}\n\nfunction defaultToLabel<T>(value: T): string {\n  return `${value}`;\n}\n\nexport function createOneOfValidator(\n  createMessage: (values: string) => string,\n) {\n  return <T>(\n    values: T[],\n    toLabel: (value: T) => string = defaultToLabel,\n    identity: (a: T) => string = defaultToLabel,\n    delimiter = ', ',\n  ): Validator<T> => {\n    const valuesLabel = values.map(toLabel).join(delimiter);\n    const msg = createMessage(valuesLabel);\n\n    const map = new Map(values.map((v) => [identity(v), v]));\n\n    return (currentValue) => {\n      if (!map.has(identity(currentValue))) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultRequiredMessageFactory(label = 'Field') {\n  return `${label} is required`;\n}\n\nfunction requiredNumber(value: number) {\n  return value !== null && value !== undefined;\n}\n\nexport function createRequiredValidator(\n  createMsg: (label?: string) => string,\n): <T>(label?: string) => Validator<T> {\n  return (label = 'Field') => {\n    const msg = createMsg(label);\n\n    return (value) => {\n      if (typeof value === 'number' && !requiredNumber(value)) return msg;\n      if (!value) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\nimport {\n  createMustBeEmptyValidator,\n  createMustBeValidator,\n  defaultMustBeEmptyMessageFactory,\n  defaultMustBeMessageFactory,\n} from './must-be';\nimport { createNotValidator, defaultNotMessageFactory } from './not';\nimport {\n  createNotOneOfValidator,\n  defaultNotOneOfMessageFactory,\n} from './not-one-of';\nimport { createOneOfValidator, defaultOneOfMessageFactory } from './one-of';\nimport {\n  createRequiredValidator,\n  defaultRequiredMessageFactory,\n} from './required';\n\nexport type GeneralMessageFactories = {\n  required: Parameters<typeof createRequiredValidator>[0];\n  mustBe: Parameters<typeof createMustBeValidator>[0];\n  mustBeNull: Parameters<typeof createMustBeEmptyValidator>[0];\n  not: Parameters<typeof createNotValidator>[0];\n  oneOf: Parameters<typeof createOneOfValidator>[0];\n  notOneOf: Parameters<typeof createNotOneOfValidator>[0];\n};\n\nconst DEFAULT_MESSAGES: GeneralMessageFactories = {\n  required: defaultRequiredMessageFactory,\n  mustBe: defaultMustBeMessageFactory,\n  mustBeNull: defaultMustBeEmptyMessageFactory,\n  not: defaultNotMessageFactory,\n  oneOf: defaultOneOfMessageFactory,\n  notOneOf: defaultNotOneOfMessageFactory,\n};\n\nexport function createGeneralValidators(\n  factories?: Partial<GeneralMessageFactories>,\n) {\n  const t = { ...DEFAULT_MESSAGES, ...factories };\n\n  const mustBeNull = createMustBeEmptyValidator(t.mustBeNull);\n\n  return {\n    required: createRequiredValidator(t.required),\n    mustBe: createMustBeValidator(t.mustBe),\n    mustBeNull: createMustBeEmptyValidator(t.mustBeNull),\n    not: createNotValidator(t.not),\n    oneOf: <T>(\n      values: T[],\n      toLabel?: (value: T) => string,\n      identity?: (a: T) => string,\n      delimiter?: string,\n    ): Validator<T> => {\n      if (!values.length) return mustBeNull<T>();\n\n      return createOneOfValidator(t.oneOf)(\n        values,\n        toLabel,\n        identity,\n        delimiter,\n      );\n    },\n    notOneOf: createNotOneOfValidator(t.notOneOf),\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultIsDateMessageFactory() {\n  return `Must be a valid date`;\n}\n\nexport function createIsDateValidator<TDate = Date>(\n  createMsg: () => string,\n  toDate: (date: TDate | string) => Date,\n): () => Validator<TDate | string | null> {\n  return () => {\n    const msg = createMsg();\n    return (value) => {\n      if (value === null) return '';\n\n      const date = toDate(value);\n      if (isNaN(date.getTime())) return msg;\n\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMaxDateMessageFactory(dateLabel: string) {\n  return `Must be before ${dateLabel}`;\n}\n\nexport function createMaxDateValidator<TDate = Date>(\n  createMsg: (dateLabel: string) => string,\n  toDate: (date: TDate | string) => Date,\n  formatDate: (date: Date, locale: string) => string,\n  locale: string,\n): (date: TDate | string) => Validator<TDate | string | null> {\n  return (date) => {\n    const d = toDate(date);\n    const matchTime = d.getTime();\n\n    const msg = createMsg(formatDate(d, locale));\n    return (value) => {\n      if (value === null) return '';\n      if (toDate(value).getTime() > matchTime) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMinDateMessageFactory(dateLabel: string) {\n  return `Must be after ${dateLabel}`;\n}\n\nexport function createMinDateValidator<TDate = Date>(\n  createMsg: (dateLabel: string) => string,\n  toDate: (date: TDate | string) => Date,\n  formatDate: (date: Date, locale: string) => string,\n  locale: string,\n): (date: TDate | string) => Validator<TDate | string | null> {\n  return (date) => {\n    const d = toDate(date);\n    const matchTime = d.getTime();\n\n    const msg = createMsg(formatDate(d, locale));\n    return (value) => {\n      if (value === null) return '';\n      if (toDate(value).getTime() < matchTime) return msg;\n      return '';\n    };\n  };\n}\n","import { formatDate } from '@angular/common';\n\ntype LuxonDateTimeLike = {\n  toJSDate(): Date;\n  toUnixInteger(): number;\n};\n\ntype MomentDateTimeLike = {\n  toDate(): Date;\n  unix(): number;\n};\n\nfunction isLuxonLike(date: object): date is LuxonDateTimeLike {\n  if (!date) return false;\n\n  return (\n    'toJSDate' in date &&\n    'toUnixInteger' in date &&\n    typeof date.toJSDate === 'function' &&\n    typeof date.toUnixInteger === 'function'\n  );\n}\n\nfunction isMomentLike(date: object): date is MomentDateTimeLike {\n  if (!date) return false;\n  return (\n    'toDate' in date &&\n    'unix' in date &&\n    typeof date.toDate === 'function' &&\n    typeof date.unix === 'function'\n  );\n}\n\nexport function defaultToDate<TDate>(date: TDate | string): Date {\n  if (date instanceof Date) return date;\n\n  if (typeof date === 'string' || typeof date === 'number')\n    return new Date(date);\n\n  if (!date) return new Date();\n\n  if (typeof date !== 'object')\n    throw new Error('Date is not number, string, null, undefined or object');\n\n  if (isMomentLike(date)) return date.toDate();\n\n  if (isLuxonLike(date)) return date.toJSDate();\n\n  return new Date();\n}\n\nexport function defaultFormatDate(\n  date: Date,\n  locale: string,\n  format = 'mediumDate',\n) {\n  return formatDate(date, format, locale);\n}\n","import { createGeneralValidators } from '../general';\nimport { createMergeValidators } from '../merge-validators';\nimport { Validator } from '../validator.type';\nimport { createIsDateValidator, defaultIsDateMessageFactory } from './is-date';\nimport {\n  createMaxDateValidator,\n  defaultMaxDateMessageFactory,\n} from './max-date';\nimport {\n  createMinDateValidator,\n  defaultMinDateMessageFactory,\n} from './min-date';\nimport { defaultFormatDate, defaultToDate } from './util';\n\nexport type DateMessageFactories = {\n  min: Parameters<typeof createMinDateValidator>[0];\n  max: Parameters<typeof createMaxDateValidator>[0];\n  isDate: Parameters<typeof createIsDateValidator>[0];\n};\n\nconst DEFAULT_MESSAGES: DateMessageFactories = {\n  min: defaultMinDateMessageFactory,\n  max: defaultMaxDateMessageFactory,\n  isDate: defaultIsDateMessageFactory,\n};\n\nexport type DateValidatorOptions = {\n  required?: boolean;\n  min?: Date | string;\n  max?: Date | string;\n  mustBe?: Date | string | null;\n  not?: Date | string | null;\n  oneOf?: (Date | string | null)[];\n  notOneOf?: (Date | string | null)[];\n};\n\nexport function createDateValidators<TDate = Date>(\n  factories?: Partial<DateMessageFactories>,\n  toDate = defaultToDate<TDate>,\n  formatDate = defaultFormatDate,\n  locale = 'en-US',\n  generalValidators = createGeneralValidators(),\n  merger = createMergeValidators(),\n) {\n  const t = { ...DEFAULT_MESSAGES, ...factories };\n  const base = {\n    min: createMinDateValidator(t.min, toDate, formatDate, locale),\n    max: createMaxDateValidator(t.max, toDate, formatDate, locale),\n    isDate: createIsDateValidator(t.isDate, toDate),\n  };\n\n  const toLabel = (d: TDate | null) =>\n    d ? formatDate(toDate(d), locale) : 'null';\n\n  return {\n    ...base,\n    all: (opt: DateValidatorOptions) => {\n      const validators: Validator<TDate | null>[] = [];\n\n      if (opt.required) validators.push(generalValidators.required());\n\n      validators.push(base.isDate());\n\n      if (opt.mustBe !== undefined) {\n        if (opt.mustBe === null)\n          validators.push(generalValidators.mustBeNull<TDate | null>());\n        else {\n          const d = toDate(opt.mustBe as TDate | string);\n          const formatted = formatDate(d, locale);\n          validators.push(\n            generalValidators.mustBe<TDate | null>(\n              d as TDate,\n              formatted,\n              (a, b) => {\n                if (!a && !b) return true;\n                if (!a || !b) return false;\n\n                return toDate(a).getTime() === toDate(b).getTime();\n              },\n            ),\n          );\n        }\n      }\n\n      if (opt.not !== undefined) {\n        if (opt.not === null)\n          validators.push(generalValidators.not<TDate | null>(null));\n        else {\n          const d = toDate(opt.not as TDate);\n          const formatted = formatDate(d, locale);\n          validators.push(\n            generalValidators.not<TDate | null>(\n              d as TDate,\n              formatted,\n              (a, b) => {\n                if (!a && !b) return true;\n                if (!a || !b) return false;\n\n                return toDate(a).getTime() === toDate(b).getTime();\n              },\n            ),\n          );\n        }\n      }\n\n      if (opt.min !== undefined) validators.push(base.min(opt.min as TDate));\n      if (opt.max !== undefined) validators.push(base.max(opt.max as TDate));\n\n      if (opt.oneOf) {\n        const dates = opt.oneOf.map((d) => (d ? toDate(d as TDate) : null));\n\n        validators.push(\n          generalValidators.oneOf<TDate | null>(\n            dates as TDate[],\n            toLabel,\n            (a) =>\n              a === null || a === undefined\n                ? 'null'\n                : toDate(a).getTime().toString(),\n          ),\n        );\n      }\n\n      if (opt.notOneOf) {\n        const dates = opt.notOneOf.map((d) => (d ? toDate(d as TDate) : null));\n        validators.push(\n          generalValidators.notOneOf<TDate | null>(\n            dates as TDate[],\n            toLabel,\n            (a) =>\n              a === null || a === undefined\n                ? 'null'\n                : toDate(a).getTime().toString(),\n          ),\n        );\n      }\n\n      return merger(validators as Validator<TDate | null>[]);\n    },\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultIntegerMessageFactory() {\n  return `Must be an integer`;\n}\n\nexport function createIntegerValidator(\n  createMsg: () => string,\n): () => Validator<number | null> {\n  return () => {\n    const msg = createMsg();\n    return (value) => {\n      if (value === null) return '';\n      if (!Number.isInteger(value)) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultIsNumberMessageFactory() {\n  return `Must be a number`;\n}\n\nexport function createIsNumberValidator(\n  createMsg: () => string,\n): () => Validator<number | null> {\n  return () => {\n    const msg = createMsg();\n    return (value) => {\n      if (value === null) return '';\n      if (typeof value !== 'number' || isNaN(value)) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMaxMessageFactory(max: number) {\n  return `Must be at most ${max}`;\n}\n\nexport function createMaxValidator(\n  createMsg: (max: number) => string,\n): (max: number) => Validator<number | null> {\n  return (max) => {\n    const msg = createMsg(max);\n    return (value) => {\n      if (value === null) return '';\n      if (value > max) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMinMessageFactory(min: number) {\n  return `Must be at least ${min}`;\n}\n\nexport function createMinValidator(\n  createMsg: (min: number) => string,\n): (min: number) => Validator<number | null> {\n  return (min) => {\n    const msg = createMsg(min);\n    return (value) => {\n      if (value === null) return '';\n      if (value < min) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultMultipleOfMessageFactory(multipleOf: number) {\n  return `Must be a multiple of ${multipleOf}`;\n}\n\nexport function createMultipleOfValidator(\n  createMsg: (multipleOf: number) => string,\n): (multipleOf: number) => Validator<number | null> {\n  return (multipleOf) => {\n    const msg = createMsg(multipleOf);\n\n    return (value) => {\n      if (value === null) return '';\n      if (value % multipleOf !== 0) return msg;\n      return '';\n    };\n  };\n}\n","import { createGeneralValidators } from '../general';\nimport { createMergeValidators } from '../merge-validators';\nimport { Validator } from '../validator.type';\nimport {\n  createIntegerValidator,\n  defaultIntegerMessageFactory,\n} from './integer';\nimport {\n  createIsNumberValidator,\n  defaultIsNumberMessageFactory,\n} from './is-number';\nimport { createMaxValidator, defaultMaxMessageFactory } from './max';\nimport { createMinValidator, defaultMinMessageFactory } from './min';\nimport {\n  createMultipleOfValidator,\n  defaultMultipleOfMessageFactory,\n} from './multiple-of';\n\nexport type NumberMessageFactories = {\n  min: Parameters<typeof createMinValidator>[0];\n  max: Parameters<typeof createMaxValidator>[0];\n  isNumber: Parameters<typeof createIsNumberValidator>[0];\n  multipleOf: Parameters<typeof createMultipleOfValidator>[0];\n  integer: Parameters<typeof createIntegerValidator>[0];\n};\n\nconst DEFAULT_MESSAGES: NumberMessageFactories = {\n  min: defaultMinMessageFactory,\n  max: defaultMaxMessageFactory,\n  isNumber: defaultIsNumberMessageFactory,\n  multipleOf: defaultMultipleOfMessageFactory,\n  integer: defaultIntegerMessageFactory,\n};\n\nexport type NumberValidatorOptions = {\n  min?: number;\n  max?: number;\n  integer?: boolean;\n  multipleOf?: number;\n  required?: boolean;\n  mustBe?: number | null;\n  not?: number | null;\n  oneOf?: (number | null)[];\n  notOneOf?: (number | null)[];\n};\n\nexport function createNumberValidators(\n  factories?: Partial<NumberMessageFactories>,\n  generalValidators = createGeneralValidators(),\n  merger = createMergeValidators(),\n) {\n  const t = { ...DEFAULT_MESSAGES, ...factories };\n\n  const base = {\n    min: createMinValidator(t.min),\n    max: createMaxValidator(t.max),\n    isNumber: createIsNumberValidator(t.isNumber),\n    multipleOf: createMultipleOfValidator(t.multipleOf),\n    integer: createIntegerValidator(t.integer),\n  };\n\n  return {\n    ...base,\n    all: (opt: NumberValidatorOptions) => {\n      const validators: Validator<number | null>[] = [];\n\n      if (opt.required) validators.push(generalValidators.required());\n\n      validators.push(base.isNumber());\n\n      if (opt.mustBe !== undefined)\n        validators.push(generalValidators.mustBe(opt.mustBe));\n\n      if (opt.not !== undefined)\n        validators.push(generalValidators.not(opt.not));\n\n      if (opt.integer) validators.push(base.integer());\n\n      if (opt.min !== undefined) validators.push(base.min(opt.min));\n\n      if (opt.max !== undefined) validators.push(base.max(opt.max));\n\n      if (opt.multipleOf !== undefined)\n        validators.push(base.multipleOf(opt.multipleOf));\n\n      if (opt.oneOf) validators.push(generalValidators.oneOf(opt.oneOf));\n\n      if (opt.notOneOf)\n        validators.push(generalValidators.notOneOf(opt.notOneOf));\n\n      return merger(validators);\n    },\n  };\n}\n","import { Validator } from '../validator.type';\n\nconst EMAIL_REGEXP =\n  /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\nexport function defaultEmailMessageFactory() {\n  return `Must be a valid email`;\n}\n\nexport function createEmailValidator(\n  createMsg: () => string,\n): () => Validator<string | null> {\n  return () => {\n    const msg = createMsg();\n\n    return (value) => {\n      if (value === null) return '';\n      if (!EMAIL_REGEXP.test(value)) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultIsStringMessageFactory() {\n  return `Must be a string`;\n}\n\nexport function createIsStringValidator(\n  createMsg: () => string,\n): () => Validator<string | null> {\n  return () => {\n    const msg = createMsg();\n    return (value) => {\n      if (value === null) return '';\n      if (typeof value !== 'string') return msg;\n      return '';\n    };\n  };\n}\n","import {\n  createMaxLengthValidator as arrayCreateMaxValidator,\n  defaultMaxLengthMessageFactory as arrayDefaultMessageFactory,\n} from '../array/max-length';\nimport { Validator } from '../validator.type';\n\nexport function defaultMaxLengthMessageFactory(max: number) {\n  return arrayDefaultMessageFactory(max, 'characters');\n}\n\nexport function createMaxLengthValidator(\n  createMsg: (max: number) => string,\n): (max: number) => Validator<string | null> {\n  return arrayCreateMaxValidator((max) => createMsg(max));\n}\n","import {\n  createMinLengthValidator as arrayCreateMinValidator,\n  defaultMinLengthMessageFactory as arrayDefaultMessageFactory,\n} from '../array/min-length';\nimport { Validator } from '../validator.type';\n\nexport function defaultMinLengthMessageFactory(min: number) {\n  return arrayDefaultMessageFactory(min, 'characters');\n}\n\nexport function createMinLengthValidator(\n  createMsg: (min: number) => string,\n): (min: number) => Validator<string | null> {\n  return arrayCreateMinValidator((min) => createMsg(min));\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultPatternMessageFactory(patternLabel: string) {\n  return `Must match pattern ${patternLabel}`;\n}\n\nexport function createPatternValidator(\n  createMsg: (patternLabel: string) => string,\n): (pattern: string | RegExp) => Validator<string | null> {\n  return (pattern: string | RegExp) => {\n    const regex = new RegExp(pattern);\n    const msg = createMsg(regex.source);\n\n    return (value) => {\n      if (value === null) return '';\n      if (!regex.test(value)) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nexport function defaultTrimmedMessageFactory() {\n  return `Cannot contain leading or trailing whitespace`;\n}\n\nexport function createTrimmedValidator(\n  createMsg: () => string,\n): () => Validator<string | null> {\n  return () => {\n    const msg = createMsg();\n\n    return (value) => {\n      if (value === null) return '';\n      if (value.trim().length !== value.length) return msg;\n      return '';\n    };\n  };\n}\n","import { Validator } from '../validator.type';\n\nconst URI_REGEXP = /^(https?|ftp):\\/\\/[^\\s/$.?#].[^\\s]*$/;\n\nexport function defaultURIMessageFactory() {\n  return `Must be a valid URI`;\n}\n\nexport function createURIValidator(\n  createMsg: () => string,\n): () => Validator<string | null> {\n  return () => {\n    const msg = createMsg();\n\n    return (value) => {\n      if (value === null) return '';\n      if (!URI_REGEXP.test(value)) return msg;\n      return '';\n    };\n  };\n}\n","import { createGeneralValidators } from '../general';\nimport { createMergeValidators } from '../merge-validators';\nimport { Validator } from '../validator.type';\nimport { createEmailValidator, defaultEmailMessageFactory } from './email';\nimport {\n  createIsStringValidator,\n  defaultIsStringMessageFactory,\n} from './is-string';\nimport {\n  createMaxLengthValidator,\n  defaultMaxLengthMessageFactory,\n} from './max-chars';\nimport {\n  createMinLengthValidator,\n  defaultMinLengthMessageFactory,\n} from './min-chars';\nimport {\n  createPatternValidator,\n  defaultPatternMessageFactory,\n} from './pattern';\nimport {\n  createTrimmedValidator,\n  defaultTrimmedMessageFactory,\n} from './trimmed';\nimport { createURIValidator, defaultURIMessageFactory } from './uri';\n\nexport type StringMessageFactories = {\n  email: Parameters<typeof createEmailValidator>[0];\n  uri: Parameters<typeof createURIValidator>[0];\n  pattern: Parameters<typeof createPatternValidator>[0];\n  trimmed: Parameters<typeof createTrimmedValidator>[0];\n  isString: Parameters<typeof createIsStringValidator>[0];\n  minLength: Parameters<typeof createMinLengthValidator>[0];\n  maxLength: Parameters<typeof createMaxLengthValidator>[0];\n};\n\nconst DEFAULT_MESSAGES: StringMessageFactories = {\n  email: defaultEmailMessageFactory,\n  uri: defaultURIMessageFactory,\n  pattern: defaultPatternMessageFactory,\n  trimmed: defaultTrimmedMessageFactory,\n  isString: defaultIsStringMessageFactory,\n  minLength: defaultMinLengthMessageFactory,\n  maxLength: defaultMaxLengthMessageFactory,\n};\n\nexport type StringValidatorOptions = {\n  pattern?: RegExp | 'email' | 'uri' | Omit<string, 'email' | 'uri'>;\n  trimmed?: boolean;\n  minLength?: number;\n  maxLength?: number;\n  required?: boolean;\n  mustBe?: string | null;\n  not?: string | null;\n  oneOf?: (string | null)[];\n  notOneOf?: (string | null)[];\n};\n\nexport function createStringValidators(\n  factories?: Partial<StringMessageFactories>,\n  generalValidators = createGeneralValidators(),\n  merger = createMergeValidators(),\n) {\n  const t = { ...DEFAULT_MESSAGES, ...factories };\n\n  const base = {\n    email: createEmailValidator(t.email),\n    uri: createURIValidator(t.uri),\n    pattern: createPatternValidator(t.pattern),\n    trimmed: createTrimmedValidator(t.trimmed),\n    isString: createIsStringValidator(t.isString),\n    minLength: createMinLengthValidator(t.minLength),\n    maxLength: createMaxLengthValidator(t.maxLength),\n  };\n\n  return {\n    ...base,\n    all: (opt: StringValidatorOptions) => {\n      const validators: Validator<string | null>[] = [];\n\n      if (opt.required) validators.push(generalValidators.required());\n\n      validators.push(base.isString());\n\n      if (opt.mustBe !== undefined)\n        validators.push(generalValidators.mustBe(opt.mustBe));\n\n      if (opt.not !== undefined)\n        validators.push(generalValidators.not(opt.not));\n\n      if (opt.trimmed) validators.push(base.trimmed());\n\n      if (opt.oneOf) validators.push(generalValidators.oneOf(opt.oneOf));\n\n      if (opt.notOneOf)\n        validators.push(generalValidators.notOneOf(opt.notOneOf));\n\n      if (opt.minLength !== undefined)\n        validators.push(base.minLength(opt.minLength));\n\n      if (opt.maxLength) validators.push(base.maxLength(opt.maxLength));\n\n      if (opt.pattern) {\n        switch (opt.pattern) {\n          case 'email':\n            validators.push(base.email());\n            break;\n          case 'uri':\n            validators.push(base.uri());\n            break;\n          default:\n            validators.push(base.pattern(opt.pattern as RegExp | string));\n            break;\n        }\n      }\n\n      return merger(validators);\n    },\n  };\n}\n","import {\n  inject,\n  InjectionToken,\n  Injector,\n  LOCALE_ID,\n  Provider,\n} from '@angular/core';\nimport { createArrayValidators } from './array';\nimport { createBooleanValidators } from './boolean';\nimport { createDateValidators } from './date';\nimport { defaultFormatDate, defaultToDate } from './date/util';\nimport { createGeneralValidators } from './general';\nimport { createMergeValidators } from './merge-validators';\nimport { createNumberValidators } from './number';\nimport { createStringValidators } from './string';\n\ntype MessageFactories = {\n  general: Parameters<typeof createGeneralValidators>[0];\n  string: Parameters<typeof createStringValidators>[0];\n  number: Parameters<typeof createNumberValidators>[0];\n  date: Parameters<typeof createDateValidators>[0];\n  array: Parameters<typeof createArrayValidators>[0];\n  boolean: Parameters<typeof createBooleanValidators>[0];\n  merge: Parameters<typeof createMergeValidators>[0];\n};\n\nexport type Validators<TDate = Date> = {\n  general: ReturnType<typeof createGeneralValidators>;\n  string: ReturnType<typeof createStringValidators>;\n  number: ReturnType<typeof createNumberValidators>;\n  date: ReturnType<typeof createDateValidators<TDate>>;\n  array: ReturnType<typeof createArrayValidators>;\n  boolean: ReturnType<typeof createBooleanValidators>;\n};\n\nconst token = new InjectionToken<Validators>('INTERNAL_MMSTACK_VALIDATORS');\n\nlet defaultValidators: Validators | null = null;\n\nfunction createDefaultValidators() {\n  if (!defaultValidators) {\n    defaultValidators = createValidators(\n      {},\n      defaultToDate,\n      defaultFormatDate,\n      'en-US',\n    );\n  }\n\n  return defaultValidators;\n}\n\nfunction createValidators<TDate = Date>(\n  msg: Partial<MessageFactories> | void,\n  toDate: (date: TDate | string) => Date,\n  formatDate: (date: Date, locale: string) => string,\n  locale: string,\n): Validators<TDate> {\n  const general = createGeneralValidators(msg?.general);\n\n  const merger = createMergeValidators(msg?.merge);\n\n  return {\n    general,\n    string: createStringValidators(msg?.string, general, merger),\n    number: createNumberValidators(msg?.number, general, merger),\n    date: createDateValidators<TDate>(\n      msg?.date,\n      toDate,\n      formatDate,\n      locale,\n      general,\n      merger,\n    ),\n    array: createArrayValidators(msg?.array, merger),\n    boolean: createBooleanValidators(msg?.boolean),\n  };\n}\n\nexport function provideValidatorConfig<TDate = Date>(\n  factory: (locale: string) => Partial<MessageFactories> | void | undefined,\n  toDate: (date: TDate | string) => Date = defaultToDate<TDate>,\n  formatDate: (date: Date, locale: string) => string = defaultFormatDate,\n): Provider {\n  return {\n    provide: token,\n    useFactory: (locale: string) =>\n      createValidators(factory(locale), toDate, formatDate, locale),\n    deps: [LOCALE_ID],\n  };\n}\n\nexport function injectValidators(injector?: Injector) {\n  const validators = injector\n    ? injector.get(token, null, {\n        optional: true,\n      })\n    : inject(token, { optional: true });\n\n  return validators ?? createDefaultValidators();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["defaultMaxLengthMessageFactory","createMaxLengthValidator","defaultMinLengthMessageFactory","createMinLengthValid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