{"version":3,"file":"myrmidon-ng-tools.mjs","sources":["../../../../projects/myrmidon/ng-tools/src/lib/directives/auto-focus.directive.ts","../../../../projects/myrmidon/ng-tools/src/lib/pipes/color-to-contrast.pipe.ts","../../../../projects/myrmidon/ng-tools/src/lib/pipes/ellipsis.pipe.ts","../../../../projects/myrmidon/ng-tools/src/lib/pipes/flat-lookup.pipe.ts","../../../../projects/myrmidon/ng-tools/src/lib/pipes/join.pipe.ts","../../../../projects/myrmidon/ng-tools/src/lib/pipes/safe-html.pipe.ts","../../../../projects/myrmidon/ng-tools/src/lib/pipes/string-to-color.pipe.ts","../../../../projects/myrmidon/ng-tools/src/lib/services/env.service.ts","../../../../projects/myrmidon/ng-tools/src/lib/services/env.service.provider.ts","../../../../projects/myrmidon/ng-tools/src/lib/services/error.service.ts","../../../../projects/myrmidon/ng-tools/src/lib/services/local-storage.service.ts","../../../../projects/myrmidon/ng-tools/src/lib/services/ram-storage.service.ts","../../../../projects/myrmidon/ng-tools/src/lib/services/window-ref.service.ts","../../../../projects/myrmidon/ng-tools/src/lib/validators/ng-tools.validators.ts","../../../../projects/myrmidon/ng-tools/src/lib/functions.ts","../../../../projects/myrmidon/ng-tools/src/lib/roman-number.ts","../../../../projects/myrmidon/ng-tools/src/lib/ng-tools.module.ts","../../../../projects/myrmidon/ng-tools/src/public-api.ts","../../../../projects/myrmidon/ng-tools/src/myrmidon-ng-tools.ts"],"sourcesContent":["import { Directive, ElementRef, OnInit } from '@angular/core';\n\n// https://stackoverflow.com/questions/56730540/angular-focus-on-input-element-that-has-ngif\n\n/**\n * Auto-focus directive for elements under the control of a structural\n * directive like *ngIf. Just add autoFocus to the desired element:\n * <input type=\"text\" autoFocus *ngIf=\"isInputVisible\">.\n */\n@Directive({\n    selector: '[autoFocus]',\n    standalone: false\n})\nexport class AutoFocusDirective implements OnInit {\n  private inputElement: HTMLElement;\n\n  constructor(private elementRef: ElementRef) {\n    this.inputElement = this.elementRef.nativeElement;\n  }\n\n  ngOnInit(): void {\n    this.inputElement.focus();\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Pipe that converts a color to a contrasting color (black or white).\n * Usage example:\n * <div [ngStyle]=\"{'background-color': (someString | stringToColor : customColors),\n * 'color': (someString | stringToColor : customColors) | colorToContrast}\">\n * {{ someString }}\n * </div>\n */\n@Pipe({\n  name: 'colorToContrast',\n  standalone: false,\n})\nexport class ColorToContrastPipe implements PipeTransform {\n  transform(value: string | null | undefined): string {\n    // return black for null or undefined\n    if (!value) {\n      return '#000000';\n    }\n\n    // convert hex color to RGB\n    const rgb = parseInt(value.slice(1), 16);\n    const r = (rgb >> 16) & 0xff;\n    const g = (rgb >> 8) & 0xff;\n    const b = (rgb >> 0) & 0xff;\n\n    // calculate the brightness of the color\n    const brightness = (r * 299 + g * 587 + b * 114) / 1000;\n\n    // return white for dark colors and black for light colors\n    return brightness > 128 ? '#000000' : '#ffffff';\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Ellipsis pipe. This cuts a string longer than limit,\n * either at limit or at some position before/after it\n * within an extent of 10% of the specified limit,\n * according to the delimiter characters found in that\n * span. Example:\n *   myText | ellipsis:50:true:'!?.;:,':' ...'\n * or just:\n *   myText | ellipsis.\n */\n@Pipe({\n  name: 'ellipsis',\n  standalone: false,\n})\nexport class EllipsisPipe implements PipeTransform {\n  private findDelimIndexWithin(\n    text: string,\n    index: number,\n    limit: number,\n    delims: string\n  ): number {\n    if (delims.includes(text.charAt(index))) {\n      return index + 1;\n    }\n    for (let i = -limit; i <= limit; i++) {\n      if (delims.includes(text.charAt(index + i))) {\n        return index + i + 1;\n      }\n    }\n    return index;\n  }\n\n  private appendSuffix(\n    text: string,\n    suffix: string | undefined | null\n  ): string {\n    if (!suffix?.length) {\n      return text;\n    }\n    const m = /^(\\s+)/.exec(suffix);\n    if (m) {\n      return text.substring(0, text.length - m[1].length) + suffix;\n    }\n    return text + suffix;\n  }\n\n  /**\n   * Transform the specified string cutting it when its length\n   * exceeds a specified limit.\n   *\n   * @param value The string to cut.\n   * @param limit The maximum count of characters.\n   * @param smart True to try cut at a delimiter around limit.\n   * @param delims A string with all the delimiter characters.\n   * @param suffix The suffix to append to the end of the result.\n   * If the suffix starts with a whitespace, the resulting text\n   * is trimmed at end before appending this suffix.\n   * @returns The string, cut if exceeding limit.\n   */\n  transform(\n    value: string | null | undefined,\n    limit = 50,\n    smart = true,\n    delims = '!?.;:,',\n    suffix = ' ...'\n  ): string | null {\n    if (!value) {\n      return null;\n    }\n    if (value.length <= limit) {\n      return value;\n    }\n    if (smart) {\n      let i = this.findDelimIndexWithin(value, limit, limit / 10, delims);\n      return this.appendSuffix(value.substring(0, i), suffix);\n    } else {\n      return this.appendSuffix(value.substring(0, limit), suffix);\n    }\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Flat lookup pipe. This is used to return a human-friendly\n * string from some lookup value, which can be a string or\n * a number, by looking up an array of objects having the\n * value key in one property and its corresponding label in\n * another property, or an object having a property for each\n * value key with a corresponding label value. Example:\n *   myKey | flatLookup:myMap\n * where myMap is either a map object e.g. { r: 'red' } or\n * an array of objects e.g. [{ id: 'r', label: 'red' }].\n */\n@Pipe({\n  name: 'flatLookup',\n  standalone: false,\n})\nexport class FlatLookupPipe implements PipeTransform {\n  /**\n   * Transform the key value into a string.\n   *\n   * @param value The key value to lookup.\n   * @param map The map to lookup in. This can be an array\n   * or an object.\n   * @param keyName The name of the property corresponding\n   * to the key in the map. Used only when map is an array\n   * of objects.\n   * @param valueName The name of the property corresponding\n   * to the value in the map. Used only when map is an array\n   * of objects.\n   * @param fallback The fallback value to return when value\n   * is not null/undefined and is not found. If not specified,\n   * the value itself will be returned.\n   * @returns The string corresponding to value, or value if\n   * not found, or null if value is null/undefined.\n   */\n  transform(\n    value: string | number | undefined | null,\n    map: Array<any> | Object | undefined | null,\n    keyName = 'id',\n    valueName = 'label',\n    fallback?: string\n  ): string | null {\n    if (value === null || value === undefined) {\n      return null;\n    }\n    if (!map) {\n      return fallback || value.toString();\n    }\n\n    if (Array.isArray(map)) {\n      // array of objects with keyName=valueName\n      if (!valueName) {\n        return fallback || value.toString();\n      }\n      const m = map as Array<any>;\n      const item = m.find((i) => i[keyName] === value);\n      return item ? item[valueName] : fallback || value.toString();\n    } else {\n      // single object\n      const m = map as any;\n      return m[value] ? m[value] : fallback || value.toString();\n    }\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Array joiner pipe.\n * Usage: \"array | join\". Arguments: separator (default=,) and limit (default=0\n * i.e. no limit; otherwise, limit the join to the first limit elements).\n */\n@Pipe({\n  name: 'join',\n  standalone: false,\n})\nexport class JoinPipe implements PipeTransform {\n  transform(value?: Array<any>, separator = ',', limit = 0): string | null {\n    if (!value) {\n      return null;\n    }\n    return (limit ? value.slice(0, limit) : value).join(separator);\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport {\r\n  DomSanitizer,\r\n  SafeHtml,\r\n  SafeStyle,\r\n  SafeScript,\r\n  SafeUrl,\r\n  SafeResourceUrl,\r\n} from '@angular/platform-browser';\r\n\r\n// https://github.com/SwarnaKishore/angular-safe-pipe/blob/master/src/app/safe.pipe.ts\r\n\r\n/**\r\n * HTML sanitizer pipe. Usage: \"value | safeHtml\".\r\n * You can specify a type of safe value as a parameter: html, style, script, url,\r\n * resourceUrl.\r\n */\r\n@Pipe({\r\n  name: 'safeHtml',\r\n  standalone: false,\r\n})\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n  constructor(protected sanitizer: DomSanitizer) {}\r\n\r\n  public transform(\r\n    value: any,\r\n    type = 'html'\r\n  ): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {\r\n    switch (type) {\r\n      case 'html':\r\n        return this.sanitizer.bypassSecurityTrustHtml(value);\r\n\r\n      case 'style':\r\n        return this.sanitizer.bypassSecurityTrustStyle(value);\r\n\r\n      case 'script':\r\n        return this.sanitizer.bypassSecurityTrustScript(value);\r\n\r\n      case 'url':\r\n        return this.sanitizer.bypassSecurityTrustUrl(value);\r\n\r\n      case 'resourceUrl':\r\n        return this.sanitizer.bypassSecurityTrustResourceUrl(value);\r\n\r\n      default:\r\n        throw new Error(`Invalid safe type specified: ${type}`);\r\n    }\r\n  }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Pipe that converts a string to a color. The same string will always\n * return the same color. Colors are chosen from a palette; if you don't\n * specify one the default palette will be used. Usage example:\n *\n * <div [style.background-color]=\"someString | stringToColor : customColors\">\n * {{ someString }}\n * </div>\n *\n * The palette must be an array of strings that are valid CSS colors like\n * '#ff0000' or 'red'. If you use this pipe to calculate e.g. a background\n * color and you want to set a readable constrasting color, you can use\n * the ColorToContrastPipe, e.g.:\n *\n * <div [ngStyle]=\"{'background-color': (someString | stringToColor : customColors),\n * 'color': (someString | stringToColor : customColors) | colorToContrast}\">\n * {{ someString }}\n * </div>\n */\n@Pipe({\n  name: 'stringToColor',\n  standalone: false,\n})\nexport class StringToColorPipe implements PipeTransform {\n  // default color palette\n  private defaultColors = [\n    '#FFB3BA',\n    '#FFDFBA',\n    '#FFFFBA',\n    '#BAFFC9',\n    '#BAE1FF',\n    '#e0bbE4',\n    '#957DAD',\n    '#D291BC',\n    '#FEC8D8',\n    '#FFDFD3',\n    '#B5EAD7',\n    '#C7CEEA',\n    '#FFDAC1',\n    '#E2F0CB',\n    '#B1C3D6',\n    '#CBE2CF',\n    '#C3C6B1',\n    '#D6BEA9',\n    '#FAF0E6',\n    '#D3D3D3',\n    '#E3DAC9',\n    '#C2B280',\n    '#967117',\n    '#301934',\n  ];\n\n  transform(\n    value: string | null | undefined,\n    colors: string[] = this.defaultColors\n  ): string {\n    // return first color for null or undefined\n    if (!value) {\n      return colors[0];\n    }\n\n    // calculate hash from string\n    let hash = 0;\n    for (let i = 0; i < value.length; i++) {\n      hash = value.charCodeAt(i) + ((hash << 5) - hash);\n    }\n\n    // use the hash to index into the color array\n    const colorIndex = Math.abs(hash) % colors.length;\n    return colors[colorIndex];\n  }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Environment variables service. This requires EnvServiceProvider.\n * See https://www.jvandemo.com/how-to-use-environment-variables-to-configure-your-angular-application-without-a-rebuild/.\n *\n * To use this service:\n * 1. ensure to add env.js from your app's src folder to the app's assets\n * (\"src/env.js\" under architect/build/options/assets);\n * 2. add the EnvServiceProvider to your app's providers array;\n * 3. ensure to include env.js in the head of your index.html:\n * <script src=\"env.js\"></script>.\n *\n * The env.js file should include all your environment-dependent settings,\n * e.g.:\n *\n * (function (window) {\n *   window.__env = window.__env || {};\n *   window.__env.apiUrl = 'http://localhost:60200/api/';\n * }(this));\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class EnvService {\n  private _map: Map<string, string>;\n\n  constructor() {\n    this._map = new Map<string, string>();\n  }\n\n  /**\n   * Get the value for the specified key. If the key is not found,\n   * defValue will be returned.\n   *\n   * @param key The key.\n   * @param defValue The default value to return if key is not found.\n   */\n  public get(key: string, defValue?: string) {\n    if (this._map.has(key)) {\n      return this._map.get(key);\n    }\n    return defValue;\n  }\n\n  /**\n   * Enumerate all the keys in this store.\n   */\n  public getKeys(): IterableIterator<string> {\n    return this._map.keys();\n  }\n\n  /**\n   * Set a value with the specified key.\n   *\n   * @param key The key.\n   * @param value The value.\n   */\n  public set(key: string, value: string) {\n    this._map.set(key, value);\n  }\n\n  /**\n   * Delete the value with the specified key, if any.\n   *\n   * @param key The key.\n   */\n  public delete(key: string): void {\n    this._map.delete(key);\n  }\n\n  /**\n   * Clear this store.\n   */\n  public clear(): void {\n    this._map.clear();\n  }\n}\n","import { EnvService } from './env.service';\r\n\r\n// https://www.jvandemo.com/how-to-use-environment-variables-to-configure-your-angular-application-without-a-rebuild/\r\n\r\n/**\r\n * This function creates an instance of EnvService, and copies\r\n * all the properties from window.__env object into it.\r\n */\r\nexport const EnvServiceFactory = () => {\r\n  const env = new EnvService();\r\n\r\n  // read environment variables from browser window\r\n  const browserWindow: any = window || {};\r\n  const browserWindowEnv = browserWindow['__env'] || {};\r\n\r\n  // assign environment variables from browser window to env;\r\n  // in the current implementation, properties from env.js\r\n  // overwrite defaults (if any) from the EnvService.\r\n  for (const key in browserWindowEnv) {\r\n    if (browserWindowEnv.hasOwnProperty(key)) {\r\n      env.set(key, browserWindowEnv[key]);\r\n    }\r\n  }\r\n\r\n  return env;\r\n};\r\n\r\n/**\r\n * A provider recipe for the EnvService.\r\n * This must be registered in the applications providers array.\r\n */\r\nexport const EnvServiceProvider = {\r\n  provide: EnvService,\r\n  useFactory: EnvServiceFactory,\r\n  deps: [],\r\n};\r\n","import { Injectable } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { throwError } from 'rxjs';\n\n// https://angular.io/guide/http\n\n/**\n * Error handler for services. To use this in your service, pipe a catchError\n * operator with its argument equal to the handleError method of this service.\n * Note: pipe this method after retry, if using it.\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class ErrorService {\n  /**\n   * Handle the specified error response.\n   * @param error The error response.\n   */\n  public handleError(error: HttpErrorResponse) {\n    let errorMessage = 'Something bad happened; please try again later.';\n\n    if (error.error instanceof ErrorEvent) {\n      // client-side or network error\n      console.error('A client-side error occurred: ' + error.error.message);\n    } else {\n      // backend returned an unsuccessful response code\n      console.error(\n        `Backend returned code ${error.status}, body was: ${error.error}`\n      );\n      errorMessage = `Server error: ${error.error}`;\n    }\n\n    // log the error to the console\n    console.error(error);\n\n    // return an observable with a user-facing error message\n    return throwError(() => errorMessage);\n  }\n}\n","import { Injectable } from '@angular/core';\r\nimport { StorageService } from '../models';\r\n\r\n/**\r\n * Simple local storage service wrapper.\r\n */\r\n@Injectable({\r\n  providedIn: 'root',\r\n})\r\nexport class LocalStorageService implements StorageService {\r\n  /**\r\n   * Retrieve the object with the specified key from the specified storage.\r\n   * @param key key.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public retrieve<T>(key: string, session: boolean = false): T | null {\r\n    const json = session\r\n      ? sessionStorage.getItem(key)\r\n      : localStorage.getItem(key);\r\n\r\n    if (!json) {\r\n      return null;\r\n    }\r\n    return JSON.parse(json);\r\n  }\r\n\r\n  /**\r\n   * Store the specified object with the specified key in the specified storage.\r\n   * @param key key.\r\n   * @param value object.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public store(key: string, value: any, session: boolean = false) {\r\n    if (session) {\r\n      sessionStorage.setItem(key, JSON.stringify(value));\r\n    } else {\r\n      localStorage.setItem(key, JSON.stringify(value));\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Remove the object with the specified key from the specified storage.\r\n   * @param key key.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public remove(key: string, session: boolean = false) {\r\n    if (session) {\r\n      sessionStorage.removeItem(key);\r\n    } else {\r\n      localStorage.removeItem(key);\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Get all the stored entities keys starting with the specified prefix.\r\n   * @param prefix key prefix.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public getKeys(prefix: string, session = false): string[] {\r\n    const keys: string[] = [];\r\n    if (session) {\r\n      for (let i = 0, len = sessionStorage.length; i < len; i++) {\r\n        const key = sessionStorage.key(i);\r\n        if (key?.startsWith(prefix)) {\r\n          keys.push(key);\r\n        }\r\n      }\r\n    } else {\r\n      for (let i = 0, len = localStorage.length; i < len; i++) {\r\n        const key = localStorage.key(i);\r\n        if (key?.startsWith(prefix)) {\r\n          keys.push(key);\r\n        }\r\n      }\r\n    }\r\n    return keys;\r\n  }\r\n\r\n  /**\r\n   * Remove all the entries whose key starts with the specified prefix.\r\n   * @param prefix key prefix.\r\n   */\r\n  public clear(prefix: string, session = false) {\r\n    if (session) {\r\n      for (let i = 0, len = sessionStorage.length; i < len; i++) {\r\n        const key = sessionStorage.key(i);\r\n        if (key?.startsWith(prefix)) {\r\n          sessionStorage.removeItem(key);\r\n        }\r\n      }\r\n    } else {\r\n      for (let i = 0, len = localStorage.length; i < len; i++) {\r\n        const key = localStorage.key(i);\r\n        if (key?.startsWith(prefix)) {\r\n          localStorage.removeItem(key);\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { StorageService } from '../models';\r\n\r\n/**\r\n * RAM-based storage service. The session parameter is ignored.\r\n */\r\n@Injectable({\r\n  providedIn: 'root',\r\n})\r\nexport class RamStorageService implements StorageService {\r\n  private readonly _storage: { [key: string]: any } = {};\r\n\r\n  /**\r\n   * Retrieve the object with the specified key from the specified storage.\r\n   * @param key key.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public retrieve<T>(key: string, session: boolean = false): T | null {\r\n    return this._storage[key] ?? null;\r\n  }\r\n\r\n  /**\r\n   * Store the specified object with the specified key in the specified storage.\r\n   * @param key key.\r\n   * @param value object.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public store(key: string, value: any, session: boolean = false) {\r\n    this._storage[key] = value;\r\n  }\r\n\r\n  /**\r\n   * Remove the object with the specified key from the specified storage.\r\n   * @param key key.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public remove(key: string, session: boolean = false) {\r\n    delete this._storage[key];\r\n  }\r\n\r\n  /**\r\n   * Get all the stored entities keys starting with the specified prefix.\r\n   * @param prefix key prefix.\r\n   * @param session true to use session instead of local storage.\r\n   */\r\n  public getKeys(prefix: string, session = false): string[] {\r\n    const keys: string[] = [];\r\n    for (const key in this._storage) {\r\n      if (key.startsWith(prefix)) {\r\n        keys.push(key);\r\n      }\r\n    }\r\n    return keys;\r\n  }\r\n\r\n  /**\r\n   * Remove all the entries whose key starts with the specified prefix.\r\n   * @param prefix key prefix.\r\n   */\r\n  public clear(prefix: string, session = false) {\r\n    for (const key in this._storage) {\r\n      if (key.startsWith(prefix)) {\r\n        delete this._storage[key];\r\n      }\r\n    }\r\n  }\r\n}\r\n","import { Injectable } from '@angular/core';\n\n// https://stackoverflow.com/questions/53622230/angular-v4-datepipe-with-utc-datetime-as-local-time\n\n/*\n  This code can be used to dynamically provide the browser's language\n  to Angular's LOCALE_ID, so that things like the date pipe behave\n  according to the browser's locale. To this end, in app.module add\n  the provider (under providers):\n  {\n    provide: LOCALE_ID,\n    deps: [WindowRefService],\n    useFactory: languageFactory\n  }\n  Alternatively, just add the locale string as the 3rd parameter of\n  the date pipe (passing undefined to the others, if you don't want\n  to specify them), e.g. myDate | date : 'medium' : undefined : 'de-DE'.\n  If the date is UTC, you can convert it to locale by just appending\n  'Z' to it before the pipe, e.g. myDate + 'Z' | date.\n*/\n\n/**\n * Window service provider.\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class WindowRefService {\n  public getWindow(): Window {\n    return window;\n  }\n}\n\n/**\n * Get the current language as set in the browser.\n *\n * @param windowRef A reference to window.\n * @returns Window's navigator language.\n */\nexport function languageFactory(windowRef: WindowRefService): string {\n  return windowRef.getWindow().navigator.language;\n}\n","import {\r\n  AbstractControl,\r\n  FormArray,\r\n  ValidationErrors,\r\n  ValidatorFn,\r\n} from '@angular/forms';\r\n\r\n// https://github.com/angular/angular/blob/3b7d4ebbd6445364889d61b7b1b1c65206534d34/packages/forms/src/validators.ts\r\n// https://indepth.dev/posts/1319/the-best-way-to-implement-custom-validators\r\n\r\n/**\r\n * General-purpose custom validators.\r\n */\r\n// @dynamic\r\nexport class NgToolsValidators {\r\n  private static hasValidLength(value: any): boolean {\r\n    // non-strict comparison is intentional,\r\n    // to check for both `null` and `undefined` values\r\n    return value != null && typeof value.length === 'number';\r\n  }\r\n\r\n  /**\r\n   * Validate an array or string or FormArray for a minimum required\r\n   * length.\r\n   * Differently from the standard minLength validator, this does\r\n   * not exclude 0 from the values to be checked. The standard\r\n   * validator instead does not validate the value if this is 0.\r\n   *\r\n   * @param minLength Minimum length required.\r\n   * @returns Null if valid, else an object with minlength with\r\n   * requiredLength and actualLength.\r\n   */\r\n  public static strictMinLengthValidator(minLength: number): ValidatorFn {\r\n    return (control: AbstractControl): ValidationErrors | null => {\r\n      // don't validate values without length property,\r\n      // except for FormArray instances, where we validate its length\r\n      // (=number of children controls, assuming that the client\r\n      // has added a control in the array -usually a FormGroup- for each\r\n      // item to edit)\r\n      let length: number;\r\n      if (control instanceof FormArray) {\r\n        length = (control as FormArray).length;\r\n      } else {\r\n        if (!this.hasValidLength(control.value)) {\r\n          return null;\r\n        }\r\n        length = control.value.length;\r\n      }\r\n\r\n      return length < minLength\r\n        ? {\r\n            minlength: {\r\n              requiredLength: minLength,\r\n              actualLength: control.value.length,\r\n            },\r\n          }\r\n        : null;\r\n    };\r\n  }\r\n\r\n  /**\r\n   * Conditionally validate using the specified validator\r\n   * when predicate is true.\r\n   * See https://medium.com/ngx/3-ways-to-implement-conditional-validation-of-reactive-forms-c59ed6fc3325.\r\n   *\r\n   * @param predicate The predicate function to use when determining\r\n   * if the validator should be used.\r\n   * @param validator The conditional validator to use.\r\n   * @returns Validation results.\r\n   */\r\n  public static conditionalValidator(\r\n    predicate: () => boolean,\r\n    validator: ValidatorFn\r\n  ): ValidatorFn {\r\n    return (control: AbstractControl): ValidationErrors | null => {\r\n      if (!control.parent) {\r\n        return null;\r\n      }\r\n      if (predicate()) {\r\n        return validator(control);\r\n      }\r\n      return null;\r\n    };\r\n  }\r\n}\r\n","/**\r\n * Deep-copy an object.\r\n */\r\n export function deepCopy(obj: any): any {\r\n  let copy: any;\r\n\r\n  // handle the 3 simple types, and null or undefined\r\n  if (null == obj || 'object' !== typeof obj) {\r\n    return obj;\r\n  }\r\n\r\n  // handle date\r\n  if (obj instanceof Date) {\r\n    copy = new Date();\r\n    copy.setTime(obj.getTime());\r\n    return copy;\r\n  }\r\n\r\n  // handle array\r\n  if (obj instanceof Array) {\r\n    copy = [];\r\n    for (let i = 0, len = obj.length; i < len; i++) {\r\n      copy[i] = deepCopy(obj[i]);\r\n    }\r\n    return copy;\r\n  }\r\n\r\n  // handle object\r\n  if (obj instanceof Object) {\r\n    copy = {};\r\n    for (const attr in obj) {\r\n      if (obj.hasOwnProperty(attr)) {\r\n        copy[attr] = deepCopy(obj[attr]);\r\n      }\r\n    }\r\n    return copy;\r\n  }\r\n\r\n  throw new Error('Unable to copy object!');\r\n}\r\n","/**\r\n * Roman number converter.\r\n */\r\nexport class RomanNumber {\r\n  private static _postVal = [\r\n    1000000, 500000, 100000, 50000, 10000, 5000, 1000, 500, 100, 50, 10, 5, 1,\r\n  ];\r\n  private static _postAlpha = [\r\n    'm',\r\n    'd',\r\n    'c',\r\n    'l',\r\n    'x',\r\n    'v',\r\n    'M',\r\n    'D',\r\n    'C',\r\n    'L',\r\n    'X',\r\n    'V',\r\n    'I',\r\n  ];\r\n  private static _preVal = [\r\n    900000, 400000, 90000, 40000, 9000, 4000, 900, 400, 90, 40, 9, 4, 1,\r\n  ];\r\n  private static _preAlpha = [\r\n    'cm',\r\n    'cd',\r\n    'xc',\r\n    'xl',\r\n    'ix',\r\n    'iv',\r\n    'CM',\r\n    'CD',\r\n    'XC',\r\n    'XL',\r\n    'IX',\r\n    'IV',\r\n    'I',\r\n  ];\r\n  private static _romanDigits = 'IVXLCDM';\r\n  private static _romanSubdigits = ' IIXXCC';\r\n  private static _romanValues = [1, 5, 10, 50, 100, 500, 1000];\r\n\r\n  /**\r\n   * Convert the specified numeric value to a Roman number.\r\n   *\r\n   * @param value The value.\r\n   * @param allowBar True to allow bar on letters. A bar on a letter\r\n   * multiplies its value by 1000.\r\n   * @param allowPrefix True to allow prefix notation.\r\n   * @param ancient True to use the ancient preferred notation, i.e.\r\n   * the preferred epigraphical notation (IIII instead of IV, VIIII instead of IX).\r\n   */\r\n  public static toRoman(\r\n    value: number,\r\n    allowBar = true,\r\n    allowPrefix = true,\r\n    ancient = false\r\n  ): string {\r\n    if (value <= 0) {\r\n      return '';\r\n    }\r\n    let place = allowBar ? 0 : 6;\r\n    const sb: string[] = [];\r\n\r\n    while (value > 0) {\r\n      while (value >= this._postVal[place]) {\r\n        sb.push(this._postAlpha[place]);\r\n        value -= this._postVal[place];\r\n      }\r\n\r\n      if (allowPrefix) {\r\n        if (value >= this._preVal[place]) {\r\n          sb.push(this._preAlpha[place]);\r\n          value -= this._preVal[place];\r\n        }\r\n      }\r\n      place++;\r\n    }\r\n\r\n    if (ancient) {\r\n      let s = sb.join('');\r\n      s = s.replace('IV', 'IIII');\r\n      return s.replace('IX', 'VIII');\r\n    }\r\n\r\n    return sb.join('');\r\n  }\r\n\r\n  private static isLower(c: string): boolean {\r\n    return c.toLowerCase() === c;\r\n  }\r\n\r\n  private static isUpper(c: string): boolean {\r\n    return c.toUpperCase() === c;\r\n  }\r\n\r\n  private static isCaseEqual(c1: string, c2: string): boolean {\r\n    return (\r\n      (this.isLower(c1) && this.isLower(c2)) ||\r\n      (this.isUpper(c1) && this.isUpper(c2))\r\n    );\r\n  }\r\n\r\n  private static getRomanDigitValue(digit: string): number {\r\n    const i = this._romanDigits.indexOf(digit.toUpperCase());\r\n    if (i === -1) {\r\n      return 0;\r\n    }\r\n    return this.isLower(digit)\r\n      ? this._romanValues[i] * 1000\r\n      : this._romanValues[i];\r\n  }\r\n\r\n  /**\r\n   * Convert the specified Roman number to a numeric value.\r\n   *\r\n   * @param roman: The Roman number.\r\n   * @param allowBar: True to allow bar-on-letter notation.\r\n   */\r\n  public static fromRoman(\r\n    roman: string | null | undefined,\r\n    allowBar = true\r\n  ): number {\r\n    if (!roman) {\r\n      return 0;\r\n    }\r\n    let result = 0;\r\n    if (!allowBar) {\r\n      roman = roman.toUpperCase();\r\n    }\r\n    for (let index = 0; index < roman.length; index++) {\r\n      // if the previous value was a sub-digit, it had to be subtracted instead\r\n      // of added; thus, subtract it twice (once to compensate for the wrong addition,\r\n      // and once to subtract from this value) from the current digit value\r\n      result += this.getRomanDigitValue(roman[index]);\r\n\r\n      if (index > 0) {\r\n        const i = this._romanDigits.indexOf(roman[index]);\r\n        if (\r\n          roman[index - 1].toUpperCase() ===\r\n            this._romanSubdigits[i].toUpperCase() &&\r\n          this.isCaseEqual(roman[index - 1], roman[index])\r\n        ) {\r\n          // tslint:disable-next-line:no-bitwise\r\n          result -= this.getRomanDigitValue(this._romanSubdigits[i]) << 1;\r\n        }\r\n      }\r\n    }\r\n    return result;\r\n  }\r\n}\r\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AutoFocusDirective } from './directives/auto-focus.directive';\n\nimport { ColorToContrastPipe } from './pipes/color-to-contrast.pipe';\nimport { EllipsisPipe } from './pipes/ellipsis.pipe';\nimport { FlatLookupPipe } from './pipes/flat-lookup.pipe';\nimport { JoinPipe } from './pipes/join.pipe';\nimport { SafeHtmlPipe } from './pipes/safe-html.pipe';\nimport { StringToColorPipe } from './pipes/string-to-color.pipe';\n\n@NgModule({\n  declarations: [\n    AutoFocusDirective,\n    ColorToContrastPipe,\n    EllipsisPipe,\n    FlatLookupPipe,\n    JoinPipe,\n    SafeHtmlPipe,\n    StringToColorPipe\n  ],\n  imports: [CommonModule],\n  exports: [\n    AutoFocusDirective,\n    ColorToContrastPipe,\n    EllipsisPipe,\n    FlatLookupPipe,\n    JoinPipe,\n    SafeHtmlPipe,\n    StringToColorPipe\n  ],\n})\nexport class NgToolsModule {}\n","/*\r\n * Public API Surface of ng-tools\r\n */\r\n\r\n/*\r\n * Public API Surface of ng-tools\r\n */\r\n\r\nexport * from './lib/directives/auto-focus.directive';\r\n\r\nexport * from './lib/pipes/color-to-contrast.pipe';\r\nexport * from './lib/pipes/ellipsis.pipe';\r\nexport * from './lib/pipes/flat-lookup.pipe';\r\nexport * from './lib/pipes/join.pipe';\r\nexport * from './lib/pipes/safe-html.pipe';\r\nexport * from './lib/pipes/string-to-color.pipe';\r\n\r\nexport * from './lib/services/env.service';\r\nexport * from './lib/services/env.service.provider';\r\nexport * from './lib/services/error.service';\r\nexport * from './lib/services/local-storage.service';\r\nexport * from './lib/services/ram-storage.service';\r\nexport * from './lib/services/window-ref.service';\r\n\r\nexport * from './lib/validators/ng-tools.validators';\r\n\r\nexport * from './lib/functions';\r\nexport * from './lib/models';\r\nexport * from './lib/roman-number';\r\n\r\nexport * from './lib/ng-tools.module';\r\n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