48b3a88face6018eae4887fc74fadd9640ef49044a75a08fa82aea0d3177c8dd.json 43 KB

1
  1. {"ast":null,"code":"import { startOfWeek, startOfMonth, setYear, addYears, setMonth, addMonths, setDay, getQuarter, setQuarter, isSameDay, isSameSecond, isSameMinute, isSameHour, isSameMonth, isSameQuarter, isSameYear, differenceInCalendarDays, differenceInSeconds, differenceInMinutes, differenceInHours, differenceInCalendarMonths, differenceInCalendarQuarters, differenceInCalendarYears, isToday, isValid, isFirstDayOfMonth, isLastDayOfMonth } from 'date-fns';\nimport { warn } from 'ng-zorro-antd/core/logger';\nimport { getLocaleDayPeriods, FormStyle, TranslationWidth } from '@angular/common';\nimport { isNotNil } from 'ng-zorro-antd/core/util';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nfunction wrongSortOrder(rangeValue) {\n const [start, end] = rangeValue;\n return !!start && !!end && end.isBeforeDay(start);\n}\nfunction normalizeRangeValue(value, hasTimePicker, type = 'month', activePart = 'left') {\n const [start, end] = value;\n let newStart = start || new CandyDate();\n let newEnd = end || (hasTimePicker ? newStart : newStart.add(1, type));\n if (start && !end) {\n newStart = start;\n newEnd = hasTimePicker ? start : start.add(1, type);\n } else if (!start && end) {\n newStart = hasTimePicker ? end : end.add(-1, type);\n newEnd = end;\n } else if (start && end && !hasTimePicker) {\n if (start.isSame(end, type)) {\n newEnd = newStart.add(1, type);\n } else {\n if (activePart === 'left') {\n newEnd = newStart.add(1, type);\n } else {\n newStart = newEnd.add(-1, type);\n }\n }\n }\n return [newStart, newEnd];\n}\nfunction cloneDate(value) {\n if (Array.isArray(value)) {\n return value.map(v => v instanceof CandyDate ? v.clone() : null);\n } else {\n return value instanceof CandyDate ? value.clone() : null;\n }\n}\n/**\n * Wrapping kind APIs for date operating and unify\n * NOTE: every new API return new CandyDate object without side effects to the former Date object\n * NOTE: most APIs are based on local time other than customized locale id (this needs tobe support in future)\n * TODO: support format() against to angular's core API\n */\nclass CandyDate {\n // locale: string; // Custom specified locale ID\n constructor(date) {\n if (date) {\n if (date instanceof Date) {\n this.nativeDate = date;\n } else if (typeof date === 'string' || typeof date === 'number') {\n warn('The string type is not recommended for date-picker, use \"Date\" type');\n this.nativeDate = new Date(date);\n } else {\n throw new Error('The input date type is not supported (\"Date\" is now recommended)');\n }\n } else {\n this.nativeDate = new Date();\n }\n }\n calendarStart(options) {\n return new CandyDate(startOfWeek(startOfMonth(this.nativeDate), options));\n }\n // ---------------------------------------------------------------------\n // | Native shortcuts\n // -----------------------------------------------------------------------------\\\n getYear() {\n return this.nativeDate.getFullYear();\n }\n getMonth() {\n return this.nativeDate.getMonth();\n }\n getDay() {\n return this.nativeDate.getDay();\n }\n getTime() {\n return this.nativeDate.getTime();\n }\n getDate() {\n return this.nativeDate.getDate();\n }\n getHours() {\n return this.nativeDate.getHours();\n }\n getMinutes() {\n return this.nativeDate.getMinutes();\n }\n getSeconds() {\n return this.nativeDate.getSeconds();\n }\n getMilliseconds() {\n return this.nativeDate.getMilliseconds();\n }\n // ---------------------------------------------------------------------\n // | New implementing APIs\n // ---------------------------------------------------------------------\n clone() {\n return new CandyDate(new Date(this.nativeDate));\n }\n setHms(hour, minute, second) {\n const newDate = new Date(this.nativeDate.setHours(hour, minute, second));\n return new CandyDate(newDate);\n }\n setYear(year) {\n return new CandyDate(setYear(this.nativeDate, year));\n }\n addYears(amount) {\n return new CandyDate(addYears(this.nativeDate, amount));\n }\n // NOTE: month starts from 0\n // NOTE: Don't use the native API for month manipulation as it not restrict the date when it overflows, eg. (new Date('2018-7-31')).setMonth(1) will be date of 2018-3-03 instead of 2018-2-28\n setMonth(month) {\n return new CandyDate(setMonth(this.nativeDate, month));\n }\n addMonths(amount) {\n return new CandyDate(addMonths(this.nativeDate, amount));\n }\n setDay(day, options) {\n return new CandyDate(setDay(this.nativeDate, day, options));\n }\n setDate(amount) {\n const date = new Date(this.nativeDate);\n date.setDate(amount);\n return new CandyDate(date);\n }\n getQuarter() {\n return getQuarter(this.nativeDate);\n }\n setQuarter(quarter) {\n return new CandyDate(setQuarter(this.nativeDate, quarter));\n }\n addDays(amount) {\n return this.setDate(this.getDate() + amount);\n }\n add(amount, mode) {\n switch (mode) {\n case 'decade':\n return this.addYears(amount * 10);\n case 'year':\n return this.addYears(amount);\n case 'month':\n return this.addMonths(amount);\n default:\n return this.addMonths(amount);\n }\n }\n isSame(date, grain = 'day') {\n let fn;\n switch (grain) {\n case 'decade':\n fn = (pre, next) => Math.abs(pre.getFullYear() - next.getFullYear()) < 11;\n break;\n case 'year':\n fn = isSameYear;\n break;\n case 'quarter':\n fn = isSameQuarter;\n break;\n case 'month':\n fn = isSameMonth;\n break;\n case 'day':\n fn = isSameDay;\n break;\n case 'hour':\n fn = isSameHour;\n break;\n case 'minute':\n fn = isSameMinute;\n break;\n case 'second':\n fn = isSameSecond;\n break;\n default:\n fn = isSameDay;\n break;\n }\n return fn(this.nativeDate, this.toNativeDate(date));\n }\n isSameYear(date) {\n return this.isSame(date, 'year');\n }\n isSameQuarter(date) {\n return this.isSame(date, 'quarter');\n }\n isSameMonth(date) {\n return this.isSame(date, 'month');\n }\n isSameDay(date) {\n return this.isSame(date, 'day');\n }\n isSameHour(date) {\n return this.isSame(date, 'hour');\n }\n isSameMinute(date) {\n return this.isSame(date, 'minute');\n }\n isSameSecond(date) {\n return this.isSame(date, 'second');\n }\n isBefore(date, grain = 'day') {\n if (date === null) {\n return false;\n }\n let fn;\n switch (grain) {\n case 'year':\n fn = differenceInCalendarYears;\n break;\n case 'quarter':\n fn = differenceInCalendarQuarters;\n break;\n case 'month':\n fn = differenceInCalendarMonths;\n break;\n case 'day':\n fn = differenceInCalendarDays;\n break;\n case 'hour':\n fn = differenceInHours;\n break;\n case 'minute':\n fn = differenceInMinutes;\n break;\n case 'second':\n fn = differenceInSeconds;\n break;\n default:\n fn = differenceInCalendarDays;\n break;\n }\n return fn(this.nativeDate, this.toNativeDate(date)) < 0;\n }\n isBeforeYear(date) {\n return this.isBefore(date, 'year');\n }\n isBeforeQuarter(date) {\n return this.isBefore(date, 'quarter');\n }\n isBeforeMonth(date) {\n return this.isBefore(date, 'month');\n }\n isBeforeDay(date) {\n return this.isBefore(date, 'day');\n }\n // Equal to today accurate to \"day\"\n isToday() {\n return isToday(this.nativeDate);\n }\n isValid() {\n return isValid(this.nativeDate);\n }\n isFirstDayOfMonth() {\n return isFirstDayOfMonth(this.nativeDate);\n }\n isLastDayOfMonth() {\n return isLastDayOfMonth(this.nativeDate);\n }\n toNativeDate(date) {\n return date instanceof CandyDate ? date.nativeDate : date;\n }\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365],\n// years\n['M', 1000 * 60 * 60 * 24 * 30],\n// months\n['D', 1000 * 60 * 60 * 24],\n// days\n['H', 1000 * 60 * 60],\n// hours\n['m', 1000 * 60],\n// minutes\n['s', 1000],\n// seconds\n['S', 1] // million seconds\n];\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n// from https://github.com/hsuanxyz/ng-time-parser\nclass NgTimeParser {\n constructor(format, localeId) {\n this.format = format;\n this.localeId = localeId;\n this.regex = null;\n this.matchMap = {\n hour: null,\n minute: null,\n second: null,\n periodNarrow: null,\n periodWide: null,\n periodAbbreviated: null\n };\n this.genRegexp();\n }\n toDate(str) {\n const result = this.getTimeResult(str);\n const time = new Date();\n if (isNotNil(result === null || result === void 0 ? void 0 : result.hour)) {\n time.setHours(result.hour);\n }\n if (isNotNil(result === null || result === void 0 ? void 0 : result.minute)) {\n time.setMinutes(result.minute);\n }\n if (isNotNil(result === null || result === void 0 ? void 0 : result.second)) {\n time.setSeconds(result.second);\n }\n if ((result === null || result === void 0 ? void 0 : result.period) === 1 && time.getHours() < 12) {\n time.setHours(time.getHours() + 12);\n }\n return time;\n }\n getTimeResult(str) {\n const match = this.regex.exec(str);\n let period = null;\n if (match) {\n if (isNotNil(this.matchMap.periodNarrow)) {\n period = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Narrow).indexOf(match[this.matchMap.periodNarrow + 1]);\n }\n if (isNotNil(this.matchMap.periodWide)) {\n period = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Wide).indexOf(match[this.matchMap.periodWide + 1]);\n }\n if (isNotNil(this.matchMap.periodAbbreviated)) {\n period = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Abbreviated).indexOf(match[this.matchMap.periodAbbreviated + 1]);\n }\n return {\n hour: isNotNil(this.matchMap.hour) ? Number.parseInt(match[this.matchMap.hour + 1], 10) : null,\n minute: isNotNil(this.matchMap.minute) ? Number.parseInt(match[this.matchMap.minute + 1], 10) : null,\n second: isNotNil(this.matchMap.second) ? Number.parseInt(match[this.matchMap.second + 1], 10) : null,\n period\n };\n } else {\n return null;\n }\n }\n genRegexp() {\n let regexStr = this.format.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$&');\n const hourRegex = /h{1,2}/i;\n const minuteRegex = /m{1,2}/;\n const secondRegex = /s{1,2}/;\n const periodNarrow = /aaaaa/;\n const periodWide = /aaaa/;\n const periodAbbreviated = /a{1,3}/;\n const hourMatch = hourRegex.exec(this.format);\n const minuteMatch = minuteRegex.exec(this.format);\n const secondMatch = secondRegex.exec(this.format);\n const periodNarrowMatch = periodNarrow.exec(this.format);\n let periodWideMatch = null;\n let periodAbbreviatedMatch = null;\n if (!periodNarrowMatch) {\n periodWideMatch = periodWide.exec(this.format);\n }\n if (!periodWideMatch && !periodNarrowMatch) {\n periodAbbreviatedMatch = periodAbbreviated.exec(this.format);\n }\n const matchs = [hourMatch, minuteMatch, secondMatch, periodNarrowMatch, periodWideMatch, periodAbbreviatedMatch].filter(m => !!m).sort((a, b) => a.index - b.index);\n matchs.forEach((match, index) => {\n switch (match) {\n case hourMatch:\n this.matchMap.hour = index;\n regexStr = regexStr.replace(hourRegex, '(\\\\d{1,2})');\n break;\n case minuteMatch:\n this.matchMap.minute = index;\n regexStr = regexStr.replace(minuteRegex, '(\\\\d{1,2})');\n break;\n case secondMatch:\n this.matchMap.second = index;\n regexStr = regexStr.replace(secondRegex, '(\\\\d{1,2})');\n break;\n case periodNarrowMatch:\n this.matchMap.periodNarrow = index;\n const periodsNarrow = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Narrow).join('|');\n regexStr = regexStr.replace(periodNarrow, `(${periodsNarrow})`);\n break;\n case periodWideMatch:\n this.matchMap.periodWide = index;\n const periodsWide = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Wide).join('|');\n regexStr = regexStr.replace(periodWide, `(${periodsWide})`);\n break;\n case periodAbbreviatedMatch:\n this.matchMap.periodAbbreviated = index;\n const periodsAbbreviated = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Abbreviated).join('|');\n regexStr = regexStr.replace(periodAbbreviated, `(${periodsAbbreviated})`);\n break;\n }\n });\n this.regex = new RegExp(regexStr);\n }\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CandyDate, cloneDate, normalizeRangeValue, timeUnits, wrongSortOrder, NgTimeParser as ɵNgTimeParser };","map":{"version":3,"names":["startOfWeek","startOfMonth","setYear","addYears","setMonth","addMonths","setDay","getQuarter","setQuarter","isSameDay","isSameSecond","isSameMinute","isSameHour","isSameMonth","isSameQuarter","isSameYear","differenceInCalendarDays","differenceInSeconds","differenceInMinutes","differenceInHours","differenceInCalendarMonths","differenceInCalendarQuarters","differenceInCalendarYears","isToday","isValid","isFirstDayOfMonth","isLastDayOfMonth","warn","getLocaleDayPeriods","FormStyle","TranslationWidth","isNotNil","wrongSortOrder","rangeValue","start","end","isBeforeDay","normalizeRangeValue","value","hasTimePicker","type","activePart","newStart","CandyDate","newEnd","add","isSame","cloneDate","Array","isArray","map","v","clone","constructor","date","Date","nativeDate","Error","calendarStart","options","getYear","getFullYear","getMonth","getDay","getTime","getDate","getHours","getMinutes","getSeconds","getMilliseconds","setHms","hour","minute","second","newDate","setHours","year","amount","month","day","setDate","quarter","addDays","mode","grain","fn","pre","next","Math","abs","toNativeDate","isBefore","isBeforeYear","isBeforeQuarter","isBeforeMonth","timeUnits","NgTimeParser","format","localeId","regex","matchMap","periodNarrow","periodWide","periodAbbreviated","genRegexp","toDate","str","result","getTimeResult","time","setMinutes","setSeconds","period","match","exec","Format","Narrow","indexOf","Wide","Abbreviated","Number","parseInt","regexStr","replace","hourRegex","minuteRegex","secondRegex","hourMatch","minuteMatch","secondMatch","periodNarrowMatch","periodWideMatch","periodAbbreviatedMatch","matchs","filter","m","sort","a","b","index","forEach","periodsNarrow","join","periodsWide","periodsAbbreviated","RegExp","ɵNgTimeParser"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-time.mjs"],"sourcesContent":["import { startOfWeek, startOfMonth, setYear, addYears, setMonth, addMonths, setDay, getQuarter, setQuarter, isSameDay, isSameSecond, isSameMinute, isSameHour, isSameMonth, isSameQuarter, isSameYear, differenceInCalendarDays, differenceInSeconds, differenceInMinutes, differenceInHours, differenceInCalendarMonths, differenceInCalendarQuarters, differenceInCalendarYears, isToday, isValid, isFirstDayOfMonth, isLastDayOfMonth } from 'date-fns';\nimport { warn } from 'ng-zorro-antd/core/logger';\nimport { getLocaleDayPeriods, FormStyle, TranslationWidth } from '@angular/common';\nimport { isNotNil } from 'ng-zorro-antd/core/util';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nfunction wrongSortOrder(rangeValue) {\n const [start, end] = rangeValue;\n return !!start && !!end && end.isBeforeDay(start);\n}\nfunction normalizeRangeValue(value, hasTimePicker, type = 'month', activePart = 'left') {\n const [start, end] = value;\n let newStart = start || new CandyDate();\n let newEnd = end || (hasTimePicker ? newStart : newStart.add(1, type));\n if (start && !end) {\n newStart = start;\n newEnd = hasTimePicker ? start : start.add(1, type);\n }\n else if (!start && end) {\n newStart = hasTimePicker ? end : end.add(-1, type);\n newEnd = end;\n }\n else if (start && end && !hasTimePicker) {\n if (start.isSame(end, type)) {\n newEnd = newStart.add(1, type);\n }\n else {\n if (activePart === 'left') {\n newEnd = newStart.add(1, type);\n }\n else {\n newStart = newEnd.add(-1, type);\n }\n }\n }\n return [newStart, newEnd];\n}\nfunction cloneDate(value) {\n if (Array.isArray(value)) {\n return value.map(v => (v instanceof CandyDate ? v.clone() : null));\n }\n else {\n return value instanceof CandyDate ? value.clone() : null;\n }\n}\n/**\n * Wrapping kind APIs for date operating and unify\n * NOTE: every new API return new CandyDate object without side effects to the former Date object\n * NOTE: most APIs are based on local time other than customized locale id (this needs tobe support in future)\n * TODO: support format() against to angular's core API\n */\nclass CandyDate {\n // locale: string; // Custom specified locale ID\n constructor(date) {\n if (date) {\n if (date instanceof Date) {\n this.nativeDate = date;\n }\n else if (typeof date === 'string' || typeof date === 'number') {\n warn('The string type is not recommended for date-picker, use \"Date\" type');\n this.nativeDate = new Date(date);\n }\n else {\n throw new Error('The input date type is not supported (\"Date\" is now recommended)');\n }\n }\n else {\n this.nativeDate = new Date();\n }\n }\n calendarStart(options) {\n return new CandyDate(startOfWeek(startOfMonth(this.nativeDate), options));\n }\n // ---------------------------------------------------------------------\n // | Native shortcuts\n // -----------------------------------------------------------------------------\\\n getYear() {\n return this.nativeDate.getFullYear();\n }\n getMonth() {\n return this.nativeDate.getMonth();\n }\n getDay() {\n return this.nativeDate.getDay();\n }\n getTime() {\n return this.nativeDate.getTime();\n }\n getDate() {\n return this.nativeDate.getDate();\n }\n getHours() {\n return this.nativeDate.getHours();\n }\n getMinutes() {\n return this.nativeDate.getMinutes();\n }\n getSeconds() {\n return this.nativeDate.getSeconds();\n }\n getMilliseconds() {\n return this.nativeDate.getMilliseconds();\n }\n // ---------------------------------------------------------------------\n // | New implementing APIs\n // ---------------------------------------------------------------------\n clone() {\n return new CandyDate(new Date(this.nativeDate));\n }\n setHms(hour, minute, second) {\n const newDate = new Date(this.nativeDate.setHours(hour, minute, second));\n return new CandyDate(newDate);\n }\n setYear(year) {\n return new CandyDate(setYear(this.nativeDate, year));\n }\n addYears(amount) {\n return new CandyDate(addYears(this.nativeDate, amount));\n }\n // NOTE: month starts from 0\n // NOTE: Don't use the native API for month manipulation as it not restrict the date when it overflows, eg. (new Date('2018-7-31')).setMonth(1) will be date of 2018-3-03 instead of 2018-2-28\n setMonth(month) {\n return new CandyDate(setMonth(this.nativeDate, month));\n }\n addMonths(amount) {\n return new CandyDate(addMonths(this.nativeDate, amount));\n }\n setDay(day, options) {\n return new CandyDate(setDay(this.nativeDate, day, options));\n }\n setDate(amount) {\n const date = new Date(this.nativeDate);\n date.setDate(amount);\n return new CandyDate(date);\n }\n getQuarter() {\n return getQuarter(this.nativeDate);\n }\n setQuarter(quarter) {\n return new CandyDate(setQuarter(this.nativeDate, quarter));\n }\n addDays(amount) {\n return this.setDate(this.getDate() + amount);\n }\n add(amount, mode) {\n switch (mode) {\n case 'decade':\n return this.addYears(amount * 10);\n case 'year':\n return this.addYears(amount);\n case 'month':\n return this.addMonths(amount);\n default:\n return this.addMonths(amount);\n }\n }\n isSame(date, grain = 'day') {\n let fn;\n switch (grain) {\n case 'decade':\n fn = (pre, next) => Math.abs(pre.getFullYear() - next.getFullYear()) < 11;\n break;\n case 'year':\n fn = isSameYear;\n break;\n case 'quarter':\n fn = isSameQuarter;\n break;\n case 'month':\n fn = isSameMonth;\n break;\n case 'day':\n fn = isSameDay;\n break;\n case 'hour':\n fn = isSameHour;\n break;\n case 'minute':\n fn = isSameMinute;\n break;\n case 'second':\n fn = isSameSecond;\n break;\n default:\n fn = isSameDay;\n break;\n }\n return fn(this.nativeDate, this.toNativeDate(date));\n }\n isSameYear(date) {\n return this.isSame(date, 'year');\n }\n isSameQuarter(date) {\n return this.isSame(date, 'quarter');\n }\n isSameMonth(date) {\n return this.isSame(date, 'month');\n }\n isSameDay(date) {\n return this.isSame(date, 'day');\n }\n isSameHour(date) {\n return this.isSame(date, 'hour');\n }\n isSameMinute(date) {\n return this.isSame(date, 'minute');\n }\n isSameSecond(date) {\n return this.isSame(date, 'second');\n }\n isBefore(date, grain = 'day') {\n if (date === null) {\n return false;\n }\n let fn;\n switch (grain) {\n case 'year':\n fn = differenceInCalendarYears;\n break;\n case 'quarter':\n fn = differenceInCalendarQuarters;\n break;\n case 'month':\n fn = differenceInCalendarMonths;\n break;\n case 'day':\n fn = differenceInCalendarDays;\n break;\n case 'hour':\n fn = differenceInHours;\n break;\n case 'minute':\n fn = differenceInMinutes;\n break;\n case 'second':\n fn = differenceInSeconds;\n break;\n default:\n fn = differenceInCalendarDays;\n break;\n }\n return fn(this.nativeDate, this.toNativeDate(date)) < 0;\n }\n isBeforeYear(date) {\n return this.isBefore(date, 'year');\n }\n isBeforeQuarter(date) {\n return this.isBefore(date, 'quarter');\n }\n isBeforeMonth(date) {\n return this.isBefore(date, 'month');\n }\n isBeforeDay(date) {\n return this.isBefore(date, 'day');\n }\n // Equal to today accurate to \"day\"\n isToday() {\n return isToday(this.nativeDate);\n }\n isValid() {\n return isValid(this.nativeDate);\n }\n isFirstDayOfMonth() {\n return isFirstDayOfMonth(this.nativeDate);\n }\n isLastDayOfMonth() {\n return isLastDayOfMonth(this.nativeDate);\n }\n toNativeDate(date) {\n return date instanceof CandyDate ? date.nativeDate : date;\n }\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst timeUnits = [\n ['Y', 1000 * 60 * 60 * 24 * 365], // years\n ['M', 1000 * 60 * 60 * 24 * 30], // months\n ['D', 1000 * 60 * 60 * 24], // days\n ['H', 1000 * 60 * 60], // hours\n ['m', 1000 * 60], // minutes\n ['s', 1000], // seconds\n ['S', 1] // million seconds\n];\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n// from https://github.com/hsuanxyz/ng-time-parser\nclass NgTimeParser {\n constructor(format, localeId) {\n this.format = format;\n this.localeId = localeId;\n this.regex = null;\n this.matchMap = {\n hour: null,\n minute: null,\n second: null,\n periodNarrow: null,\n periodWide: null,\n periodAbbreviated: null\n };\n this.genRegexp();\n }\n toDate(str) {\n const result = this.getTimeResult(str);\n const time = new Date();\n if (isNotNil(result?.hour)) {\n time.setHours(result.hour);\n }\n if (isNotNil(result?.minute)) {\n time.setMinutes(result.minute);\n }\n if (isNotNil(result?.second)) {\n time.setSeconds(result.second);\n }\n if (result?.period === 1 && time.getHours() < 12) {\n time.setHours(time.getHours() + 12);\n }\n return time;\n }\n getTimeResult(str) {\n const match = this.regex.exec(str);\n let period = null;\n if (match) {\n if (isNotNil(this.matchMap.periodNarrow)) {\n period = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Narrow).indexOf(match[this.matchMap.periodNarrow + 1]);\n }\n if (isNotNil(this.matchMap.periodWide)) {\n period = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Wide).indexOf(match[this.matchMap.periodWide + 1]);\n }\n if (isNotNil(this.matchMap.periodAbbreviated)) {\n period = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Abbreviated).indexOf(match[this.matchMap.periodAbbreviated + 1]);\n }\n return {\n hour: isNotNil(this.matchMap.hour) ? Number.parseInt(match[this.matchMap.hour + 1], 10) : null,\n minute: isNotNil(this.matchMap.minute) ? Number.parseInt(match[this.matchMap.minute + 1], 10) : null,\n second: isNotNil(this.matchMap.second) ? Number.parseInt(match[this.matchMap.second + 1], 10) : null,\n period\n };\n }\n else {\n return null;\n }\n }\n genRegexp() {\n let regexStr = this.format.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$&');\n const hourRegex = /h{1,2}/i;\n const minuteRegex = /m{1,2}/;\n const secondRegex = /s{1,2}/;\n const periodNarrow = /aaaaa/;\n const periodWide = /aaaa/;\n const periodAbbreviated = /a{1,3}/;\n const hourMatch = hourRegex.exec(this.format);\n const minuteMatch = minuteRegex.exec(this.format);\n const secondMatch = secondRegex.exec(this.format);\n const periodNarrowMatch = periodNarrow.exec(this.format);\n let periodWideMatch = null;\n let periodAbbreviatedMatch = null;\n if (!periodNarrowMatch) {\n periodWideMatch = periodWide.exec(this.format);\n }\n if (!periodWideMatch && !periodNarrowMatch) {\n periodAbbreviatedMatch = periodAbbreviated.exec(this.format);\n }\n const matchs = [hourMatch, minuteMatch, secondMatch, periodNarrowMatch, periodWideMatch, periodAbbreviatedMatch]\n .filter(m => !!m)\n .sort((a, b) => a.index - b.index);\n matchs.forEach((match, index) => {\n switch (match) {\n case hourMatch:\n this.matchMap.hour = index;\n regexStr = regexStr.replace(hourRegex, '(\\\\d{1,2})');\n break;\n case minuteMatch:\n this.matchMap.minute = index;\n regexStr = regexStr.replace(minuteRegex, '(\\\\d{1,2})');\n break;\n case secondMatch:\n this.matchMap.second = index;\n regexStr = regexStr.replace(secondRegex, '(\\\\d{1,2})');\n break;\n case periodNarrowMatch:\n this.matchMap.periodNarrow = index;\n const periodsNarrow = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Narrow).join('|');\n regexStr = regexStr.replace(periodNarrow, `(${periodsNarrow})`);\n break;\n case periodWideMatch:\n this.matchMap.periodWide = index;\n const periodsWide = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Wide).join('|');\n regexStr = regexStr.replace(periodWide, `(${periodsWide})`);\n break;\n case periodAbbreviatedMatch:\n this.matchMap.periodAbbreviated = index;\n const periodsAbbreviated = getLocaleDayPeriods(this.localeId, FormStyle.Format, TranslationWidth.Abbreviated).join('|');\n regexStr = regexStr.replace(periodAbbreviated, `(${periodsAbbreviated})`);\n break;\n }\n });\n this.regex = new RegExp(regexStr);\n }\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CandyDate, cloneDate, normalizeRangeValue, timeUnits, wrongSortOrder, NgTimeParser as ɵNgTimeParser };\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAEC,UAAU,EAAEC,UAAU,EAAEC,SAAS,EAAEC,YAAY,EAAEC,YAAY,EAAEC,UAAU,EAAEC,WAAW,EAAEC,aAAa,EAAEC,UAAU,EAAEC,wBAAwB,EAAEC,mBAAmB,EAAEC,mBAAmB,EAAEC,iBAAiB,EAAEC,0BAA0B,EAAEC,4BAA4B,EAAEC,yBAAyB,EAAEC,OAAO,EAAEC,OAAO,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,UAAU;AAC1b,SAASC,IAAI,QAAQ,2BAA2B;AAChD,SAASC,mBAAmB,EAAEC,SAAS,EAAEC,gBAAgB,QAAQ,iBAAiB;AAClF,SAASC,QAAQ,QAAQ,yBAAyB;;AAElD;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAACC,UAAU,EAAE;EAChC,MAAM,CAACC,KAAK,EAAEC,GAAG,CAAC,GAAGF,UAAU;EAC/B,OAAO,CAAC,CAACC,KAAK,IAAI,CAAC,CAACC,GAAG,IAAIA,GAAG,CAACC,WAAW,CAACF,KAAK,CAAC;AACrD;AACA,SAASG,mBAAmBA,CAACC,KAAK,EAAEC,aAAa,EAAEC,IAAI,GAAG,OAAO,EAAEC,UAAU,GAAG,MAAM,EAAE;EACpF,MAAM,CAACP,KAAK,EAAE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