Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/main/date/ |
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/main/date/main.date.js.map |
{"version":3,"file":"main.date.js","sources":["src/internal/convert-bitrix-format.js","src/internal/get-format.js","src/date-time-format.js","src/timezone/offset.js","src/timezone/browser-time.js","src/timezone/user-time.js","src/timezone/server-time.js","src/index.js"],"sourcesContent":["import { Type } from 'main.core';\n\nexport function convertBitrixFormat(format: any): string\n{\n\tif (!Type.isStringFilled(format))\n\t{\n\t\treturn '';\n\t}\n\n\treturn format.replace('YYYY', 'Y') // 1999\n\t\t.replace('MMMM', 'F') // January - December\n\t\t.replace('MM', 'm') // 01 - 12\n\t\t.replace('M', 'M') // Jan - Dec\n\t\t.replace('DD', 'd') // 01 - 31\n\t\t.replace('G', 'g') // 1 - 12\n\t\t.replace(/GG/i, 'G') // 0 - 23\n\t\t.replace('H', 'h') // 01 - 12\n\t\t.replace(/HH/i, 'H') // 00 - 24\n\t\t.replace('MI', 'i') // 00 - 59\n\t\t.replace('SS', 's') // 00 - 59\n\t\t.replace('TT', 'A') // AM - PM\n\t\t.replace('T', 'a');\t// am - pm\n}\n","import { Cache, Extension, Type } from 'main.core';\nimport { convertBitrixFormat } from './convert-bitrix-format';\n\nconst formatsCache = new Cache.MemoryCache();\n\n/**\n * Returns culture-specific datetime format by code.\n * The full list with examples can be found in config.php of this extension in ['settings']['formats'].\n * All formats are compatible with this.format() without any additional transformations.\n *\n * @param code\n * @returns {string|null}\n */\nexport function getFormat(code: string): ?string\n\t{\n\t\treturn formatsCache.remember(`main.date.format.${code}`, () => {\n\t\t\tlet format = Extension.getSettings('main.date').get(`formats.${code}`);\n\n\t\t\tif (\n\t\t\t\tType.isStringFilled(format)\n\t\t\t\t&& (code === 'FORMAT_DATE' || code === 'FORMAT_DATETIME')\n\t\t\t)\n\t\t\t{\n\t\t\t\tformat = convertBitrixFormat(format);\n\t\t\t}\n\n\t\t\treturn format;\n\t\t});\n\t}\n","import { Type, Loc } from 'main.core';\nimport { convertBitrixFormat } from './internal/convert-bitrix-format';\nimport { getFormat } from './internal/get-format';\n\n/**\n * @memberOf BX.Main\n * @alias Date\n */\nexport class DateTimeFormat\n{\n\tstatic AM_PM_MODE = {\n\t\tUPPER: 1,\n\t\tLOWER: 2,\n\t\tNONE: false\n\t};\n\n\tstatic convertBitrixFormat = convertBitrixFormat;\n\n\tstatic getFormat = getFormat;\n\n\tstatic isAmPmMode(returnConst: any)\n\t{\n\t\tif (returnConst === true)\n\t\t{\n\t\t\treturn this._getMessage('AMPM_MODE');\n\t\t}\n\n\t\treturn this._getMessage('AMPM_MODE') !== false;\n\t}\n\n\tstatic convertToUTC(date: any): ?Date\n\t{\n\t\tif (!Type.isDate(date))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new Date(\n\t\t\tDate.UTC(\n\t\t\t\tdate.getFullYear(),\n\t\t\t\tdate.getMonth(),\n\t\t\t\tdate.getDate(),\n\t\t\t\tdate.getHours(),\n\t\t\t\tdate.getMinutes(),\n\t\t\t\tdate.getSeconds(),\n\t\t\t\tdate.getMilliseconds(),\n\t\t\t)\n\t\t);\n\t}\n\n\t/**\n\t * Function creates and returns Javascript Date() object from server timestamp regardless of local browser (system) timezone.\n\t * For example can be used to convert timestamp from some exact date on server to the JS Date object with the same value.\n\t *\n\t * @param timestamp - timestamp in seconds\n\t * @returns {Date}\n\t */\n\tstatic getNewDate(timestamp: any): Date\n\t{\n\t\treturn new Date(this.getBrowserTimestamp(timestamp));\n\t}\n\n\t/**\n\t * Function transforms server timestamp (in sec) to javascript timestamp (calculated depend on local browser timezone offset). Returns timestamp in milliseconds.\n\t * Also see BX.Main.Date.getNewDate description.\n\t *\n\t * @param timestamp - timestamp in seconds\n\t * @returns {number}\n\t */\n\tstatic getBrowserTimestamp(timestamp: any): number\n\t{\n\t\ttimestamp = parseInt(timestamp, 10);\n\t\tconst browserOffset = new Date(timestamp * 1000).getTimezoneOffset() * 60;\n\t\treturn (parseInt(timestamp, 10) + parseInt(this._getMessage('SERVER_TZ_OFFSET')) + browserOffset) * 1000;\n\t}\n\n\t/**\n\t * Function transforms local browser timestamp (in ms) to server timestamp (calculated depend on local browser timezone offset). Returns timestamp in seconds.\n\t *\n\t * @param timestamp - timestamp in milliseconds\n\t * @returns {number}\n\t */\n\tstatic getServerTimestamp(timestamp: any): number\n\t{\n\t\ttimestamp = parseInt(timestamp, 10);\n\t\tconst browserOffset = new Date(timestamp).getTimezoneOffset() * 60;\n\t\treturn Math.round(timestamp / 1000 - (parseInt(this._getMessage('SERVER_TZ_OFFSET'), 10) + parseInt(browserOffset, 10)));\n\t}\n\n\tstatic formatLastActivityDate(timestamp, now, utc)\n\t{\n\t\tconst ampm = this.isAmPmMode(true);\n\t\tconst timeFormat = (ampm === this.AM_PM_MODE.LOWER ? 'g:i a' : (ampm === this.AM_PM_MODE.UPPER ? 'g:i A' : 'H:i'));\n\n\t\tconst format = [\n\t\t\t['tomorrow', '#01#' + timeFormat],\n\t\t\t['now', '#02#'],\n\t\t\t['todayFuture', '#03#' + timeFormat],\n\t\t\t['yesterday', '#04#' + timeFormat],\n\t\t\t['-', this.convertBitrixFormat(this._getMessage('FORMAT_DATETIME')).replace(/:s/g, '')],\n\t\t\t['s60', 'sago'],\n\t\t\t['i60', 'iago'],\n\t\t\t['H5', 'Hago'],\n\t\t\t['H24', '#03#' + timeFormat],\n\t\t\t['d31', 'dago'],\n\t\t\t['m12>1', 'mago'],\n\t\t\t['m12>0', 'dago'],\n\t\t\t['', '#05#']\n\t\t];\n\t\tlet formattedDate = this.format(format, timestamp, now, utc);\n\t\tlet match = null;\n\t\tif ((match = /^#(\\d+)#(.*)/.exec(formattedDate)) != null)\n\t\t{\n\t\t\tswitch (match[1])\n\t\t\t{\n\t\t\t\tcase '01':\n\t\t\t\t\tformattedDate = this._getMessage('FD_LAST_SEEN_TOMORROW').replace('#TIME#', match[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '02':\n\t\t\t\t\tformattedDate = this._getMessage('FD_LAST_SEEN_NOW');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '03':\n\t\t\t\t\tformattedDate = this._getMessage('FD_LAST_SEEN_TODAY').replace('#TIME#', match[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '04':\n\t\t\t\t\tformattedDate = this._getMessage('FD_LAST_SEEN_YESTERDAY').replace('#TIME#', match[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '05':\n\t\t\t\t\tformattedDate = this._getMessage('FD_LAST_SEEN_MORE_YEAR');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tformattedDate = match[2];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn formattedDate;\n\t}\n\n\t/**\n\t * The method is designed to replace the localization storage on sites without Bitrix Framework.\n\t * It gets overloaded with custom implementation:\n\t *\n\t * const CustomDate = Object.create(BX.Main.Date);\n\t * CustomDate._getMessage = () => ...new implementation...;\n\t *\n\t * This class should get messages only via this method.\n\t * Otherwise, the class won't work on sites without Bitrix Framework.\n\t *\n\t * @param message\n\t * @returns {*}\n\t * @private\n\t */\n\tstatic _getMessage(message)\n\t{\n\t\treturn Loc.getMessage(message);\n\t}\n\n\t/**\n\t * The method used to parse date from string by given format.\n\t *\n\t * @param {string} str - date in given format\n\t * @param {boolean} isUTC - is date in UTC\n\t * @param {string} formatDate - format of the date without time\n\t * @param {string} formatDatetime - format of the date with time\n\t * @returns {Date|null} - returns Date object if string was parsed or null\n\t */\n\tstatic parse(str, isUTC, formatDate, formatDatetime): ?Date\n\t{\n\t\tif (Type.isStringFilled(str))\n\t\t{\n\t\t\tif (!formatDate)\n\t\t\t{\n\t\t\t\tformatDate = this._getMessage('FORMAT_DATE');\n\t\t\t}\n\t\t\tif (!formatDatetime)\n\t\t\t{\n\t\t\t\tformatDatetime = this._getMessage('FORMAT_DATETIME');\n\t\t\t}\n\n\t\t\tlet regMonths = '';\n\t\t\tfor (let i = 1; i <= 12; i++)\n\t\t\t{\n\t\t\t\tregMonths = regMonths + '|' + this._getMessage('MON_' + i);\n\t\t\t}\n\n\t\t\tconst expr = new RegExp('([0-9]+|[a-z]+' + regMonths + ')', 'ig');\n\t\t\tconst aDate = str.match(expr);\n\t\t\tlet aFormat = formatDate.match(/(DD|MI|MMMM|MM|M|YYYY)/ig);\n\t\t\tconst aDateArgs = [];\n\t\t\tconst aFormatArgs = [];\n\t\t\tconst aResult = {};\n\n\t\t\tif (!aDate)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (aDate.length > aFormat.length)\n\t\t\t{\n\t\t\t\taFormat = formatDatetime.match(/(DD|MI|MMMM|MM|M|YYYY|HH|H|SS|TT|T|GG|G)/ig);\n\t\t\t}\n\n\t\t\tfor (let i = 0, cnt = aDate.length; i < cnt; i++)\n\t\t\t{\n\t\t\t\tif (aDate[i].trim() !== '')\n\t\t\t\t{\n\t\t\t\t\taDateArgs[aDateArgs.length] = aDate[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (let i = 0, cnt = aFormat.length; i < cnt; i++)\n\t\t\t{\n\t\t\t\tif (aFormat[i].trim() !== '')\n\t\t\t\t{\n\t\t\t\t\taFormatArgs[aFormatArgs.length] = aFormat[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet m = aFormatArgs.findIndex(item => item === 'MMMM');\n\t\t\tif (m > 0)\n\t\t\t{\n\t\t\t\taDateArgs[m] = this.getMonthIndex(aDateArgs[m]);\n\t\t\t\taFormatArgs[m] = 'MM';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm = aFormatArgs.findIndex(item => item === 'M');\n\t\t\t\tif (m > 0)\n\t\t\t\t{\n\t\t\t\t\taDateArgs[m] = this.getMonthIndex(aDateArgs[m]);\n\t\t\t\t\taFormatArgs[m] = 'MM';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (let i = 0, cnt = aFormatArgs.length; i < cnt; i++)\n\t\t\t{\n\t\t\t\tconst k = aFormatArgs[i].toUpperCase();\n\t\t\t\taResult[k] = k === 'T' || k === 'TT' ? aDateArgs[i] : parseInt(aDateArgs[i], 10);\n\t\t\t}\n\n\t\t\tif (aResult['DD'] > 0 && aResult['MM'] > 0 && aResult['YYYY'] > 0)\n\t\t\t{\n\t\t\t\tconst d = new Date();\n\n\t\t\t\tif (isUTC)\n\t\t\t\t{\n\t\t\t\t\td.setUTCDate(1);\n\t\t\t\t\td.setUTCFullYear(aResult['YYYY']);\n\t\t\t\t\td.setUTCMonth(aResult['MM'] - 1);\n\t\t\t\t\td.setUTCDate(aResult['DD']);\n\t\t\t\t\td.setUTCHours(0, 0, 0, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\td.setDate(1);\n\t\t\t\t\td.setFullYear(aResult['YYYY']);\n\t\t\t\t\td.setMonth(aResult['MM'] - 1);\n\t\t\t\t\td.setDate(aResult['DD']);\n\t\t\t\t\td.setHours(0, 0, 0, 0);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!isNaN(aResult['HH']) || !isNaN(aResult['GG']) || !isNaN(aResult['H']) || !isNaN(aResult['G']))\n\t\t\t\t\t&& !isNaN(aResult['MI'])\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tif (!isNaN(aResult['H']) || !isNaN(aResult['G']))\n\t\t\t\t\t{\n\t\t\t\t\t\tconst bPM = (aResult['T'] || aResult['TT'] || 'am').toUpperCase() === 'PM',\n\t\t\t\t\t\t\th = parseInt(aResult['H'] || aResult['G'] || 0, 10);\n\n\t\t\t\t\t\tif (bPM)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taResult['HH'] = h + (h === 12 ? 0 : 12);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taResult['HH'] = h < 12 ? h : 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\taResult['HH'] = parseInt(aResult['HH'] || aResult['GG'] || 0, 10);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isNaN(aResult['SS']))\n\t\t\t\t\t{\n\t\t\t\t\t\taResult['SS'] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isUTC)\n\t\t\t\t\t{\n\t\t\t\t\t\td.setUTCHours(aResult['HH'], aResult['MI'], aResult['SS']);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\td.setHours(aResult['HH'], aResult['MI'], aResult['SS']);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn d;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tstatic getMonthIndex(month: string): string | number\n\t{\n\t\tconst q = month.toUpperCase();\n\t\tconst wordMonthCut = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];\n\t\tconst wordMonth = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'];\n\n\t\tfor (let i = 1; i <= 12; i++)\n\t\t{\n\t\t\tif (q === this._getMessage('MON_' + i).toUpperCase()\n\t\t\t\t|| q === this._getMessage('MONTH_' + i).toUpperCase()\n\t\t\t\t|| q === wordMonthCut[i - 1].toUpperCase()\n\t\t\t\t|| q === wordMonth[i - 1].toUpperCase())\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn month;\n\t}\n\n\tstatic format(format, timestamp, now, utc): string\n\t{\n\t\t/*\n\t\tPHP to Javascript:\n\t\t\ttime() = new Date()\n\t\t\tmktime(...) = new Date(...)\n\t\t\tgmmktime(...) = new Date(Date.UTC(...))\n\t\t\tmktime(0,0,0, 1, 1, 1970) != 0 new Date(1970,0,1).getTime() != 0\n\t\t\tgmmktime(0,0,0, 1, 1, 1970) == 0 new Date(Date.UTC(1970,0,1)).getTime() == 0\n\t\t\tdate('d.m.Y H:i:s') = BX.Main.Date.format('d.m.Y H:i:s')\n\t\t\tgmdate('d.m.Y H:i:s') = BX.Main.Date.format('d.m.Y H:i:s', null, null, true);\n\t\t*/\n\t\tconst date = Type.isDate(timestamp) ? new Date(timestamp.getTime()) : Type.isNumber(timestamp) ? new Date(timestamp * 1000) : new Date();\n\t\tconst nowDate = Type.isDate(now) ? new Date(now.getTime()) : Type.isNumber(now) ? new Date(now * 1000) : new Date();\n\t\tconst isUTC = !!utc;\n\t\t// used in hoisting inner functions, like _formatDateInterval\n\t\tconst thisDateTimeFormat = this;\n\n\t\tif (Type.isArray(format))\n\t\t{\n\t\t\treturn _formatDateInterval(format, date, nowDate, isUTC);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!Type.isStringFilled(format))\n\t\t\t{\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\n\t\tconst replaceMap = (format.match(/{{([^{}]*)}}/g) || []).map((x) => {\n\t\t\treturn (x.match(/[^{}]+/) || [''])[0];\n\t\t});\n\t\tif (replaceMap.length > 0)\n\t\t{\n\t\t\treplaceMap.forEach((element, index) => {\n\t\t\t\tformat = format.replace('{{' + element + '}}', '{{' + index + '}}');\n\t\t\t});\n\t\t}\n\n\t\tconst formatRegex = /\\\\?(sago|iago|isago|Hago|dago|mago|Yago|sdiff|idiff|Hdiff|ddiff|mdiff|Ydiff|sshort|ishort|Hshort|dshort|mhort|Yshort|yesterday|today|tommorow|tomorrow|[a-z])/gi;\n\n\t\tconst dateFormats = {\n\t\t\td: () => {\n\t\t\t\t// Day of the month 01 to 31\n\t\t\t\treturn getDate(date).toString().padStart(2, '0');\n\t\t\t},\n\n\t\t\tD: () => {\n\t\t\t\t//Mon through Sun\n\t\t\t\treturn this._getMessage('DOW_' + getDay(date));\n\t\t\t},\n\n\t\t\tj: () => {\n\t\t\t\t//Day of the month 1 to 31\n\t\t\t\treturn getDate(date);\n\t\t\t},\n\n\t\t\tl: () => {\n\t\t\t\t//Sunday through Saturday\n\t\t\t\treturn this._getMessage('DAY_OF_WEEK_' + getDay(date));\n\t\t\t},\n\n\t\t\tN: () => {\n\t\t\t\t//1 (for Monday) through 7 (for Sunday)\n\t\t\t\treturn getDay(date) || 7;\n\t\t\t},\n\n\t\t\tS: () => {\n\t\t\t\t//st, nd, rd or th. Works well with j\n\t\t\t\tif (getDate(date) % 10 == 1 && getDate(date) != 11)\n\t\t\t\t{\n\t\t\t\t\treturn 'st';\n\t\t\t\t}\n\t\t\t\telse if (getDate(date) % 10 == 2 && getDate(date) != 12)\n\t\t\t\t{\n\t\t\t\t\treturn 'nd';\n\t\t\t\t}\n\t\t\t\telse if (getDate(date) % 10 == 3 && getDate(date) != 13)\n\t\t\t\t{\n\t\t\t\t\treturn 'rd';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 'th';\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tw: () => {\n\t\t\t\t//0 (for Sunday) through 6 (for Saturday)\n\t\t\t\treturn getDay(date);\n\t\t\t},\n\n\t\t\tz: () => {\n\t\t\t\t//0 through 365\n\t\t\t\tconst firstDay = new Date(getFullYear(date), 0, 1);\n\t\t\t\tconst currentDay = new Date(getFullYear(date), getMonth(date), getDate(date));\n\t\t\t\treturn Math.ceil((currentDay - firstDay) / (24 * 3600 * 1000));\n\t\t\t},\n\n\t\t\tW: () => {\n\t\t\t\t//ISO-8601 week number of year\n\t\t\t\tconst newDate = new Date(date.getTime());\n\t\t\t\tconst dayNumber = (getDay(date) + 6) % 7;\n\t\t\t\tsetDate(newDate, getDate(newDate) - dayNumber + 3);\n\t\t\t\tconst firstThursday = newDate.getTime();\n\t\t\t\tsetMonth(newDate, 0, 1);\n\t\t\t\tif (getDay(newDate) != 4)\n\t\t\t\t{\n\t\t\t\t\tsetMonth(newDate, 0, 1 + ((4 - getDay(newDate)) + 7) % 7);\n\t\t\t\t}\n\t\t\t\tconst weekNumber = 1 + Math.ceil((firstThursday - newDate) / (7 * 24 * 3600 * 1000));\n\n\t\t\t\treturn weekNumber.toString().padStart(2, '0');\n\t\t\t},\n\n\t\t\tF: () => {\n\t\t\t\t//January through December\n\t\t\t\treturn this._getMessage('MONTH_' + (getMonth(date) + 1) + '_S');\n\t\t\t},\n\n\t\t\tf: () => {\n\t\t\t\t//January through December\n\t\t\t\treturn this._getMessage('MONTH_' + (getMonth(date) + 1));\n\t\t\t},\n\n\t\t\tm: () => {\n\t\t\t\t//Numeric representation of a month 01 through 12\n\t\t\t\treturn (getMonth(date) + 1).toString().padStart(2, '0');\n\t\t\t},\n\n\t\t\tM: () => {\n\t\t\t\t//A short textual representation of a month, three letters Jan through Dec\n\t\t\t\treturn this._getMessage('MON_' + (getMonth(date) + 1));\n\t\t\t},\n\n\t\t\tn: () => {\n\t\t\t\t//Numeric representation of a month 1 through 12\n\t\t\t\treturn getMonth(date) + 1;\n\t\t\t},\n\n\t\t\tt: () => {\n\t\t\t\t//Number of days in the given month 28 through 31\n\t\t\t\tconst lastMonthDay = isUTC ? new Date(Date.UTC(getFullYear(date), getMonth(date) + 1, 0)) : new Date(getFullYear(date), getMonth(date) + 1, 0);\n\t\t\t\treturn getDate(lastMonthDay);\n\t\t\t},\n\n\t\t\tL: () => {\n\t\t\t\t//1 if it is a leap year, 0 otherwise.\n\t\t\t\tconst year = getFullYear(date);\n\t\t\t\treturn (year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ? 1 : 0);\n\t\t\t},\n\n\t\t\to: () => {\n\t\t\t\t//ISO-8601 year number\n\t\t\t\tconst correctDate = new Date(date.getTime());\n\t\t\t\tsetDate(correctDate, getDate(correctDate) - ((getDay(date) + 6) % 7) + 3);\n\t\t\t\treturn getFullYear(correctDate);\n\t\t\t},\n\n\t\t\tY: () => {\n\t\t\t\t//A full numeric representation of a year, 4 digits\n\t\t\t\treturn getFullYear(date);\n\t\t\t},\n\n\t\t\ty: () => {\n\t\t\t\t//A two digit representation of a year\n\t\t\t\treturn getFullYear(date).toString().slice(2);\n\t\t\t},\n\n\t\t\ta: () => {\n\t\t\t\t//am or pm\n\t\t\t\treturn getHours(date) > 11 ? 'pm' : 'am';\n\t\t\t},\n\n\t\t\tA: () => {\n\t\t\t\t//AM or PM\n\t\t\t\treturn getHours(date) > 11 ? 'PM' : 'AM';\n\t\t\t},\n\n\t\t\tB: () => {\n\t\t\t\t//000 through 999\n\t\t\t\tconst swatch = ((date.getUTCHours() + 1) % 24) + date.getUTCMinutes() / 60 + date.getUTCSeconds() / 3600;\n\t\t\t\treturn Math.floor(swatch * 1000 / 24).toString().padStart(3, '0');\n\t\t\t},\n\n\t\t\tg: () => {\n\t\t\t\t//12-hour format of an hour without leading zeros 1 through 12\n\t\t\t\treturn getHours(date) % 12 || 12;\n\t\t\t},\n\n\t\t\tG: () => {\n\t\t\t\t//24-hour format of an hour without leading zeros 0 through 23\n\t\t\t\treturn getHours(date);\n\t\t\t},\n\n\t\t\th: () => {\n\t\t\t\t//12-hour format of an hour with leading zeros 01 through 12\n\t\t\t\treturn (getHours(date) % 12 || 12).toString().padStart(2, '0');\n\t\t\t},\n\n\t\t\tH: () => {\n\t\t\t\t//24-hour format of an hour with leading zeros 00 through 23\n\t\t\t\treturn getHours(date).toString().padStart(2, '0');\n\t\t\t},\n\n\t\t\ti: () => {\n\t\t\t\t//Minutes with leading zeros 00 to 59\n\t\t\t\treturn getMinutes(date).toString().padStart(2, '0');\n\t\t\t},\n\n\t\t\ts: () => {\n\t\t\t\t//Seconds, with leading zeros 00 through 59\n\t\t\t\treturn getSeconds(date).toString().padStart(2, '0');\n\t\t\t},\n\n\t\t\tu: () => {\n\t\t\t\t//Microseconds\n\t\t\t\treturn (getMilliseconds(date) * 1000).toString().padStart(6, '0');\n\t\t\t},\n\n\t\t\te: () => {\n\t\t\t\tif (isUTC)\n\t\t\t\t{\n\t\t\t\t\treturn 'UTC';\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t},\n\n\t\t\tI: () => {\n\t\t\t\tif (isUTC)\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\t//Whether or not the date is in daylight saving time 1 if Daylight Saving Time, 0 otherwise\n\t\t\t\tconst firstJanuary = new Date(getFullYear(date), 0, 1);\n\t\t\t\tconst firstJanuaryUTC = Date.UTC(getFullYear(date), 0, 1);\n\t\t\t\tconst firstJuly = new Date(getFullYear(date), 6, 0);\n\t\t\t\tconst firstJulyUTC = Date.UTC(getFullYear(date), 6, 0);\n\t\t\t\treturn 0 + ((firstJanuary - firstJanuaryUTC) !== (firstJuly - firstJulyUTC));\n\t\t\t},\n\n\t\t\tO: () => {\n\t\t\t\tif (isUTC)\n\t\t\t\t{\n\t\t\t\t\treturn '+0000';\n\t\t\t\t}\n\n\t\t\t\t//Difference to Greenwich time (GMT) in hours +0200\n\t\t\t\tconst timezoneOffset = date.getTimezoneOffset();\n\t\t\t\tconst timezoneOffsetAbs = Math.abs(timezoneOffset);\n\t\t\t\treturn (timezoneOffset > 0 ? '-' : '+') + (Math.floor(timezoneOffsetAbs / 60) * 100 + timezoneOffsetAbs % 60).toString().padStart(4, '0');\n\t\t\t},\n\n\t\t\t//this method references 'O' method of the same object, arrow function is not suitable here\n\t\t\tP: function() {\n\t\t\t\tif (isUTC)\n\t\t\t\t{\n\t\t\t\t\treturn '+00:00';\n\t\t\t\t}\n\n\t\t\t\t//Difference to Greenwich time (GMT) with colon between hours and minutes +02:00\n\t\t\t\tconst difference = this.O();\n\t\t\t\treturn difference.substr(0, 3) + ':' + difference.substr(3);\n\t\t\t},\n\n\t\t\tZ: () => {\n\t\t\t\tif (isUTC)\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t//Timezone offset in seconds. The offset for timezones west of UTC is always negative,\n\t\t\t\t//and for those east of UTC is always positive.\n\t\t\t\treturn -date.getTimezoneOffset() * 60;\n\t\t\t},\n\n\t\t\tc: () => {\n\t\t\t\t//ISO 8601 date\n\t\t\t\treturn 'Y-m-d\\\\TH:i:sP'.replace(formatRegex, _replaceDateFormat);\n\t\t\t},\n\n\t\t\tr: () => {\n\t\t\t\t//RFC 2822 formatted date\n\t\t\t\treturn 'D, d M Y H:i:s O'.replace(formatRegex, _replaceDateFormat);\n\t\t\t},\n\n\t\t\tU: () => {\n\t\t\t\t//Seconds since the Unix Epoch\n\t\t\t\treturn Math.floor(date.getTime() / 1000);\n\t\t\t},\n\n\t\t\tsago: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 1000), {\n\t\t\t\t\t'0': 'FD_SECOND_AGO_0',\n\t\t\t\t\t'1': 'FD_SECOND_AGO_1',\n\t\t\t\t\t'10_20': 'FD_SECOND_AGO_10_20',\n\t\t\t\t\t'MOD_1': 'FD_SECOND_AGO_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_SECOND_AGO_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_SECOND_AGO_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tsdiff: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 1000), {\n\t\t\t\t\t'0': 'FD_SECOND_DIFF_0',\n\t\t\t\t\t'1': 'FD_SECOND_DIFF_1',\n\t\t\t\t\t'10_20': 'FD_SECOND_DIFF_10_20',\n\t\t\t\t\t'MOD_1': 'FD_SECOND_DIFF_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_SECOND_DIFF_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_SECOND_DIFF_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tsshort: () => {\n\t\t\t\treturn this._getMessage('FD_SECOND_SHORT').replace(/#VALUE#/g, intval((nowDate - date) / 1000));\n\t\t\t},\n\n\t\t\tiago: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 1000), {\n\t\t\t\t\t'0': 'FD_MINUTE_AGO_0',\n\t\t\t\t\t'1': 'FD_MINUTE_AGO_1',\n\t\t\t\t\t'10_20': 'FD_MINUTE_AGO_10_20',\n\t\t\t\t\t'MOD_1': 'FD_MINUTE_AGO_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_MINUTE_AGO_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_MINUTE_AGO_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tidiff: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 1000), {\n\t\t\t\t\t'0': 'FD_MINUTE_DIFF_0',\n\t\t\t\t\t'1': 'FD_MINUTE_DIFF_1',\n\t\t\t\t\t'10_20': 'FD_MINUTE_DIFF_10_20',\n\t\t\t\t\t'MOD_1': 'FD_MINUTE_DIFF_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_MINUTE_DIFF_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_MINUTE_DIFF_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tisago: () => {\n\t\t\t\tconst minutesAgo = intval((nowDate - date) / 60 / 1000);\n\t\t\t\tlet result = _formatDateMessage(minutesAgo, {\n\t\t\t\t\t'0': 'FD_MINUTE_0',\n\t\t\t\t\t'1': 'FD_MINUTE_1',\n\t\t\t\t\t'10_20': 'FD_MINUTE_10_20',\n\t\t\t\t\t'MOD_1': 'FD_MINUTE_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_MINUTE_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_MINUTE_MOD_OTHER'\n\t\t\t\t});\n\n\t\t\t\tresult += ' ';\n\n\t\t\t\tconst secondsAgo = intval((nowDate - date) / 1000) - (minutesAgo * 60);\n\t\t\t\tresult += _formatDateMessage(secondsAgo, {\n\t\t\t\t\t'0': 'FD_SECOND_AGO_0',\n\t\t\t\t\t'1': 'FD_SECOND_AGO_1',\n\t\t\t\t\t'10_20': 'FD_SECOND_AGO_10_20',\n\t\t\t\t\t'MOD_1': 'FD_SECOND_AGO_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_SECOND_AGO_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_SECOND_AGO_MOD_OTHER'\n\t\t\t\t});\n\t\t\t\treturn result;\n\t\t\t},\n\n\t\t\tishort: () => {\n\t\t\t\treturn this._getMessage('FD_MINUTE_SHORT').replace(/#VALUE#/g, intval((nowDate - date) / 60 / 1000));\n\t\t\t},\n\n\t\t\tHago: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 1000), {\n\t\t\t\t\t'0': 'FD_HOUR_AGO_0',\n\t\t\t\t\t'1': 'FD_HOUR_AGO_1',\n\t\t\t\t\t'10_20': 'FD_HOUR_AGO_10_20',\n\t\t\t\t\t'MOD_1': 'FD_HOUR_AGO_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_HOUR_AGO_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_HOUR_AGO_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tHdiff: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 1000), {\n\t\t\t\t\t'0': 'FD_HOUR_DIFF_0',\n\t\t\t\t\t'1': 'FD_HOUR_DIFF_1',\n\t\t\t\t\t'10_20': 'FD_HOUR_DIFF_10_20',\n\t\t\t\t\t'MOD_1': 'FD_HOUR_DIFF_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_HOUR_DIFF_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_HOUR_DIFF_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tHshort: () => {\n\t\t\t\treturn this._getMessage('FD_HOUR_SHORT').replace(/#VALUE#/g, intval((nowDate - date) / 60 / 60 / 1000));\n\t\t\t},\n\n\t\t\tyesterday: () => {\n\t\t\t\treturn this._getMessage('FD_YESTERDAY');\n\t\t\t},\n\n\t\t\ttoday: () => {\n\t\t\t\treturn this._getMessage('FD_TODAY');\n\t\t\t},\n\n\t\t\ttommorow: () => {\n\t\t\t\treturn this._getMessage('FD_TOMORROW');\n\t\t\t},\n\n\t\t\ttomorrow: () => {\n\t\t\t\treturn this._getMessage('FD_TOMORROW');\n\t\t\t},\n\n\t\t\tdago: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 24 / 1000), {\n\t\t\t\t\t'0': 'FD_DAY_AGO_0',\n\t\t\t\t\t'1': 'FD_DAY_AGO_1',\n\t\t\t\t\t'10_20': 'FD_DAY_AGO_10_20',\n\t\t\t\t\t'MOD_1': 'FD_DAY_AGO_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_DAY_AGO_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_DAY_AGO_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tddiff: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 24 / 1000), {\n\t\t\t\t\t'0': 'FD_DAY_DIFF_0',\n\t\t\t\t\t'1': 'FD_DAY_DIFF_1',\n\t\t\t\t\t'10_20': 'FD_DAY_DIFF_10_20',\n\t\t\t\t\t'MOD_1': 'FD_DAY_DIFF_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_DAY_DIFF_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_DAY_DIFF_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tdshort: () => {\n\t\t\t\treturn this._getMessage('FD_DAY_SHORT').replace(/#VALUE#/g, intval((nowDate - date) / 60 / 60 / 24 / 1000));\n\t\t\t},\n\n\t\t\tmago: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 24 / 31 / 1000), {\n\t\t\t\t\t'0': 'FD_MONTH_AGO_0',\n\t\t\t\t\t'1': 'FD_MONTH_AGO_1',\n\t\t\t\t\t'10_20': 'FD_MONTH_AGO_10_20',\n\t\t\t\t\t'MOD_1': 'FD_MONTH_AGO_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_MONTH_AGO_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_MONTH_AGO_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tmdiff: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 24 / 31 / 1000), {\n\t\t\t\t\t'0': 'FD_MONTH_DIFF_0',\n\t\t\t\t\t'1': 'FD_MONTH_DIFF_1',\n\t\t\t\t\t'10_20': 'FD_MONTH_DIFF_10_20',\n\t\t\t\t\t'MOD_1': 'FD_MONTH_DIFF_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_MONTH_DIFF_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_MONTH_DIFF_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tmshort: () => {\n\t\t\t\treturn this._getMessage('FD_MONTH_SHORT').replace(/#VALUE#/g, intval((nowDate - date) / 60 / 60 / 24 / 31 / 1000));\n\t\t\t},\n\n\t\t\tYago: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 24 / 365 / 1000), {\n\t\t\t\t\t'0': 'FD_YEARS_AGO_0',\n\t\t\t\t\t'1': 'FD_YEARS_AGO_1',\n\t\t\t\t\t'10_20': 'FD_YEARS_AGO_10_20',\n\t\t\t\t\t'MOD_1': 'FD_YEARS_AGO_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_YEARS_AGO_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_YEARS_AGO_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tYdiff: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 24 / 365 / 1000), {\n\t\t\t\t\t'0': 'FD_YEARS_DIFF_0',\n\t\t\t\t\t'1': 'FD_YEARS_DIFF_1',\n\t\t\t\t\t'10_20': 'FD_YEARS_DIFF_10_20',\n\t\t\t\t\t'MOD_1': 'FD_YEARS_DIFF_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_YEARS_DIFF_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_YEARS_DIFF_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tYshort: () => {\n\t\t\t\treturn _formatDateMessage(intval((nowDate - date) / 60 / 60 / 24 / 365 / 1000), {\n\t\t\t\t\t'0': 'FD_YEARS_SHORT_0',\n\t\t\t\t\t'1': 'FD_YEARS_SHORT_1',\n\t\t\t\t\t'10_20': 'FD_YEARS_SHORT_10_20',\n\t\t\t\t\t'MOD_1': 'FD_YEARS_SHORT_MOD_1',\n\t\t\t\t\t'MOD_2_4': 'FD_YEARS_SHORT_MOD_2_4',\n\t\t\t\t\t'MOD_OTHER': 'FD_YEARS_SHORT_MOD_OTHER'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tx: () => {\n\t\t\t\tconst ampm = this.isAmPmMode(true);\n\t\t\t\tconst timeFormat = (ampm === this.AM_PM_MODE.LOWER ? 'g:i a' : (ampm === this.AM_PM_MODE.UPPER ? 'g:i A' : 'H:i'));\n\n\t\t\t\treturn this.format([\n\t\t\t\t\t['tomorrow', 'tomorrow, ' + timeFormat],\n\t\t\t\t\t['-', this.convertBitrixFormat(this._getMessage('FORMAT_DATETIME')).replace(/:s/g, '')],\n\t\t\t\t\t['s', 'sago'],\n\t\t\t\t\t['i', 'iago'],\n\t\t\t\t\t['today', 'today, ' + timeFormat],\n\t\t\t\t\t['yesterday', 'yesterday, ' + timeFormat],\n\t\t\t\t\t['', this.convertBitrixFormat(this._getMessage('FORMAT_DATETIME')).replace(/:s/g, '')]\n\t\t\t\t], date, nowDate, isUTC);\n\t\t\t},\n\n\t\t\tX: () => {\n\n\t\t\t\tconst ampm = this.isAmPmMode(true);\n\t\t\t\tconst timeFormat = (ampm === this.AM_PM_MODE.LOWER ? 'g:i a' : (ampm === this.AM_PM_MODE.UPPER ? 'g:i A' : 'H:i'));\n\n\t\t\t\tconst day = this.format([\n\t\t\t\t\t['tomorrow', 'tomorrow'],\n\t\t\t\t\t['-', this.convertBitrixFormat(this._getMessage('FORMAT_DATE'))],\n\t\t\t\t\t['today', 'today'],\n\t\t\t\t\t['yesterday', 'yesterday'],\n\t\t\t\t\t['', this.convertBitrixFormat(this._getMessage('FORMAT_DATE'))]\n\t\t\t\t], date, nowDate, isUTC);\n\n\t\t\t\tconst time = this.format([\n\t\t\t\t\t['tomorrow', timeFormat],\n\t\t\t\t\t['today', timeFormat],\n\t\t\t\t\t['yesterday', timeFormat],\n\t\t\t\t\t['', '']\n\t\t\t\t], date, nowDate, isUTC);\n\n\t\t\t\tif (time.length > 0)\n\t\t\t\t{\n\t\t\t\t\treturn this._getMessage('FD_DAY_AT_TIME').replace(/#DAY#/g, day).replace(/#TIME#/g, time);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn day;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tQ: () => {\n\t\t\t\tconst daysAgo = intval((nowDate - date) / 60 / 60 / 24 / 1000);\n\t\t\t\tif (daysAgo == 0)\n\t\t\t\t{\n\t\t\t\t\treturn this._getMessage('FD_DAY_DIFF_1').replace(/#VALUE#/g, 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn this.format([['d', 'ddiff'], ['m', 'mdiff'], ['', 'Ydiff']], date, nowDate);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tlet cutZeroTime = false;\n\t\tif (format[0] && format[0] == '^')\n\t\t{\n\t\t\tcutZeroTime = true;\n\t\t\tformat = format.substr(1);\n\t\t}\n\n\t\tlet result = format.replace(formatRegex, _replaceDateFormat);\n\n\t\tif (cutZeroTime)\n\t\t{\n\t\t\t/* \t15.04.12 13:00:00 => 15.04.12 13:00\n\t\t\t\t00:01:00 => 00:01\n\t\t\t\t4 may 00:00:00 => 4 may\n\t\t\t\t01-01-12 00:00 => 01-01-12\n\t\t\t*/\n\n\t\t\tresult = result.replace(/\\s*00:00:00\\s*/g, '').replace(/(\\d\\d:\\d\\d)(:00)/g, '$1').replace(/(\\s*00:00\\s*)(?!:)/g, '');\n\t\t}\n\n\t\tif (replaceMap.length > 0)\n\t\t{\n\t\t\treplaceMap.forEach(function(element, index)\n\t\t\t{\n\t\t\t\tresult = result.replace('{{' + index + '}}', element);\n\t\t\t});\n\t\t}\n\n\t\treturn result;\n\n\t\tfunction _formatDateInterval(formats, date, nowDate, isUTC)\n\t\t{\n\t\t\tconst secondsAgo = intval((nowDate - date) / 1000);\n\t\t\tfor (let i = 0; i < formats.length; i++)\n\t\t\t{\n\t\t\t\tconst formatInterval = formats[i][0];\n\t\t\t\tconst formatValue = formats[i][1];\n\t\t\t\tlet match = null;\n\t\t\t\tif (formatInterval == 's')\n\t\t\t\t{\n\t\t\t\t\tif (secondsAgo < 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((match = /^s(\\d+)\\>?(\\d+)?/.exec(formatInterval)) != null)\n\t\t\t\t{\n\t\t\t\t\tif (match[1] && match[2])\n\t\t\t\t\t{\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tsecondsAgo < match[1]\n\t\t\t\t\t\t\t&& secondsAgo > match[2]\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (secondsAgo < match[1])\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'i')\n\t\t\t\t{\n\t\t\t\t\tif (secondsAgo < 60 * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((match = /^i(\\d+)\\>?(\\d+)?/.exec(formatInterval)) != null)\n\t\t\t\t{\n\t\t\t\t\tif (match[1] && match[2])\n\t\t\t\t\t{\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tsecondsAgo < match[1] * 60\n\t\t\t\t\t\t\t&& secondsAgo > match[2] * 60\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (secondsAgo < match[1] * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'H')\n\t\t\t\t{\n\t\t\t\t\tif (secondsAgo < 24 * 60 * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((match = /^H(\\d+)\\>?(\\d+)?/.exec(formatInterval)) != null)\n\t\t\t\t{\n\t\t\t\t\tif (match[1] && match[2])\n\t\t\t\t\t{\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tsecondsAgo < match[1] * 60 * 60\n\t\t\t\t\t\t\t&& secondsAgo > match[2] * 60 * 60\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (secondsAgo < match[1] * 60 * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'd')\n\t\t\t\t{\n\t\t\t\t\tif (secondsAgo < 31 * 24 * 60 * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((match = /^d(\\d+)\\>?(\\d+)?/.exec(formatInterval)) != null)\n\t\t\t\t{\n\t\t\t\t\tif (match[1] && match[2])\n\t\t\t\t\t{\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tsecondsAgo < match[1] * 24 * 60 * 60\n\t\t\t\t\t\t\t&& secondsAgo > match[2] * 24 * 60 * 60\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (secondsAgo < match[1] * 24 * 60 * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'm')\n\t\t\t\t{\n\t\t\t\t\tif (secondsAgo < 365 * 24 * 60 * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((match = /^m(\\d+)\\>?(\\d+)?/.exec(formatInterval)) != null)\n\t\t\t\t{\n\t\t\t\t\tif (match[1] && match[2])\n\t\t\t\t\t{\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tsecondsAgo < match[1] * 31 * 24 * 60 * 60\n\t\t\t\t\t\t\t&& secondsAgo > match[2] * 31 * 24 * 60 * 60\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (secondsAgo < match[1] * 31 * 24 * 60 * 60)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'now')\n\t\t\t\t{\n\t\t\t\t\tif (date.getTime() == nowDate.getTime())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'today')\n\t\t\t\t{\n\t\t\t\t\tconst year = getFullYear(nowDate);\n\t\t\t\t\tconst month = getMonth(nowDate);\n\t\t\t\t\tconst day = getDate(nowDate);\n\t\t\t\t\tconst todayStart = isUTC ? new Date(Date.UTC(year, month, day, 0, 0, 0, 0)) : new Date(year, month, day, 0, 0, 0, 0);\n\t\t\t\t\tconst todayEnd = isUTC ? new Date(Date.UTC(year, month, day + 1, 0, 0, 0, 0)) : new Date(year, month, day + 1, 0, 0, 0, 0);\n\t\t\t\t\tif (date >= todayStart && date < todayEnd)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'todayFuture')\n\t\t\t\t{\n\t\t\t\t\tconst year = getFullYear(nowDate);\n\t\t\t\t\tconst month = getMonth(nowDate);\n\t\t\t\t\tconst day = getDate(nowDate);\n\t\t\t\t\tconst todayStart = nowDate.getTime();\n\t\t\t\t\tconst todayEnd = isUTC ? new Date(Date.UTC(year, month, day + 1, 0, 0, 0, 0)) : new Date(year, month, day + 1, 0, 0, 0, 0);\n\t\t\t\t\tif (date >= todayStart && date < todayEnd)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'yesterday')\n\t\t\t\t{\n\t\t\t\t\tconst year = getFullYear(nowDate);\n\t\t\t\t\tconst month = getMonth(nowDate);\n\t\t\t\t\tconst day = getDate(nowDate);\n\t\t\t\t\tconst yesterdayStart = isUTC ? new Date(Date.UTC(year, month, day - 1, 0, 0, 0, 0)) : new Date(year, month, day - 1, 0, 0, 0, 0);\n\t\t\t\t\tconst yesterdayEnd = isUTC ? new Date(Date.UTC(year, month, day, 0, 0, 0, 0)) : new Date(year, month, day, 0, 0, 0, 0);\n\t\t\t\t\tif (date >= yesterdayStart && date < yesterdayEnd)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == 'tommorow' || formatInterval == 'tomorrow')\n\t\t\t\t{\n\t\t\t\t\tconst year = getFullYear(nowDate);\n\t\t\t\t\tconst month = getMonth(nowDate);\n\t\t\t\t\tconst day = getDate(nowDate);\n\t\t\t\t\tconst tomorrowStart = isUTC ? new Date(Date.UTC(year, month, day + 1, 0, 0, 0, 0)) : new Date(year, month, day + 1, 0, 0, 0, 0);\n\t\t\t\t\tconst tomorrowEnd = isUTC ? new Date(Date.UTC(year, month, day + 2, 0, 0, 0, 0)) : new Date(year, month, day + 2, 0, 0, 0, 0);\n\t\t\t\t\tif (date >= tomorrowStart && date < tomorrowEnd)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (formatInterval == '-')\n\t\t\t\t{\n\t\t\t\t\tif (secondsAgo < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn thisDateTimeFormat.format(formatValue, date, nowDate, isUTC);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//return formats.length > 0 ? thisDateTimeFormat.format(formats.pop()[1], date, nowDate, isUTC) : '';\n\t\t\treturn formats.length > 0 ? thisDateTimeFormat.format(formats[formats.length - 1][1], date, nowDate, isUTC) : '';\n\t\t}\n\n\t\tfunction getFullYear(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCFullYear() : date.getFullYear();\n\t\t}\n\n\t\tfunction getDate(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCDate() : date.getDate();\n\t\t}\n\n\t\tfunction getMonth(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCMonth() : date.getMonth();\n\t\t}\n\n\t\tfunction getHours(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCHours() : date.getHours();\n\t\t}\n\n\t\tfunction getMinutes(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCMinutes() : date.getMinutes();\n\t\t}\n\n\t\tfunction getSeconds(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCSeconds() : date.getSeconds();\n\t\t}\n\n\t\tfunction getMilliseconds(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCMilliseconds() : date.getMilliseconds();\n\t\t}\n\n\t\tfunction getDay(date)\n\t\t{\n\t\t\treturn isUTC ? date.getUTCDay() : date.getDay();\n\t\t}\n\n\t\tfunction setDate(date, dayValue)\n\t\t{\n\t\t\treturn isUTC ? date.setUTCDate(dayValue) : date.setDate(dayValue);\n\t\t}\n\n\t\tfunction setMonth(date, monthValue, dayValue)\n\t\t{\n\t\t\treturn isUTC ? date.setUTCMonth(monthValue, dayValue) : date.setMonth(monthValue, dayValue);\n\t\t}\n\n\t\tfunction _formatDateMessage(value, messages)\n\t\t{\n\t\t\tconst val = value < 100 ? Math.abs(value) : Math.abs(value % 100);\n\t\t\tconst dec = val % 10;\n\t\t\tlet message = '';\n\n\t\t\tif (val == 0)\n\t\t\t{\n\t\t\t\tmessage = thisDateTimeFormat._getMessage(messages['0']);\n\t\t\t}\n\t\t\telse if (val == 1)\n\t\t\t{\n\t\t\t\tmessage = thisDateTimeFormat._getMessage(messages['1']);\n\t\t\t}\n\t\t\telse if (val >= 10 && val <= 20)\n\t\t\t{\n\t\t\t\tmessage = thisDateTimeFormat._getMessage(messages['10_20']);\n\t\t\t}\n\t\t\telse if (dec == 1)\n\t\t\t{\n\t\t\t\tmessage = thisDateTimeFormat._getMessage(messages['MOD_1']);\n\t\t\t}\n\t\t\telse if (2 <= dec && dec <= 4)\n\t\t\t{\n\t\t\t\tmessage = thisDateTimeFormat._getMessage(messages['MOD_2_4']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmessage = thisDateTimeFormat._getMessage(messages['MOD_OTHER']);\n\t\t\t}\n\n\t\t\treturn message.replace(/#VALUE#/g, value);\n\t\t}\n\n\t\tfunction _replaceDateFormat(match, matchFull)\n\t\t{\n\t\t\tif (dateFormats[match])\n\t\t\t{\n\t\t\t\treturn dateFormats[match]();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn matchFull;\n\t\t\t}\n\t\t}\n\n\t\tfunction intval(number)\n\t\t{\n\t\t\treturn number >= 0 ? Math.floor(number) : Math.ceil(number);\n\t\t}\n\t}\n}\n","import { Cache, Loc, Text } from 'main.core';\n\nconst cache = new Cache.MemoryCache();\n\n/**\n * @memberOf BX.Main.Timezone\n *\n * WARNING! Don't use this class or any classes from Timezone namespace on sites without Bitrix Framework.\n * It is not designed to handle this case and will definitely break.\n */\nconst Offset = {\n\tget SERVER_TO_UTC(): number\n\t{\n\t\treturn cache.remember('SERVER_TO_UTC', () => {\n\t\t\treturn Text.toInteger(Loc.getMessage('SERVER_TZ_OFFSET'));\n\t\t});\n\t},\n\n\tget USER_TO_SERVER(): number\n\t{\n\t\treturn cache.remember('USER_TO_SERVER', () => {\n\t\t\treturn Text.toInteger(Loc.getMessage('USER_TZ_OFFSET'));\n\t\t});\n\t},\n\n\t// Date returns timezone offset in minutes by default, change it to seconds\n\t// Also offset is negative in UTC+ timezones and positive in UTC- timezones.\n\t// By convention Bitrix uses the opposite approach, so change offset sign.\n\tget BROWSER_TO_UTC(): number\n\t{\n\t\treturn cache.remember('BROWSER_TO_UTC', () => {\n\t\t\treturn Text.toInteger((new Date()).getTimezoneOffset() * 60);\n\t\t});\n\t},\n};\n\nObject.freeze(Offset);\n\nexport {\n\tOffset,\n};\n","import { Text } from 'main.core';\nimport { Offset } from './offset';\n\n/**\n * @memberOf BX.Main.Timezone\n *\n * WARNING! Don't use this class or any classes from Timezone namespace on sites without Bitrix Framework.\n * It is not designed to handle this case and will definitely break.\n */\nexport class BrowserTime\n{\n\t/**\n\t * Returns timestamp with current time in browser timezone.\n\t *\n\t * @returns {number} timestamp in seconds\n\t */\n\tstatic getTimestamp(): number\n\t{\n\t\treturn Math.round(Date.now() / 1000);\n\t}\n\n\t/**\n\t * Returns Date object with current time in browser timezone.\n\t *\n\t * @returns {Date}\n\t */\n\tstatic getDate(): Date\n\t{\n\t\treturn new Date(this.getTimestamp() * 1000);\n\t}\n\n\t/**\n\t * Converts timestamp in browser timezone to timestamp in user timezone.\n\t *\n\t * @param browserTimestamp timestamp in browser timezone in seconds\n\t * @returns {number} timestamp in user timezone in seconds\n\t */\n\tstatic toUser(browserTimestamp: number): number\n\t{\n\t\treturn Text.toInteger(browserTimestamp) + Offset.USER_TO_SERVER;\n\t}\n\n\t/**\n\t * Converts timestamp in browser timezone to timestamp in server timezone.\n\t *\n\t * @param browserTimestamp timestamp in browser timezone in seconds\n\t * @returns {number} timestamp in server timezone in seconds\n\t */\n\tstatic toServer(browserTimestamp: number): number\n\t{\n\t\treturn this.#toUTC(browserTimestamp) + Offset.SERVER_TO_UTC;\n\t}\n\n\tstatic #toUTC(browserTimestamp: number): number\n\t{\n\t\treturn Text.toInteger(browserTimestamp) - Offset.BROWSER_TO_UTC;\n\t}\n}\n","import { Text } from 'main.core';\nimport { Offset } from './offset';\nimport { BrowserTime } from './browser-time';\n\n/**\n * @memberOf BX.Main.Timezone\n *\n * WARNING! Don't use this class or any classes from Timezone namespace on sites without Bitrix Framework.\n * It is not designed to handle this case and will definitely break.\n *\n * ATTENTION! In Bitrix user timezone !== browser timezone. Users can change their timezone from their profile settings\n * and the timezone will be different from browser timezone.\n */\nexport class UserTime\n{\n\t/**\n\t * Returns timestamp with current time in user timezone.\n\t *\n\t * @returns {number} timestamp in seconds\n\t */\n\tstatic getTimestamp(): number\n\t{\n\t\treturn BrowserTime.toUser(BrowserTime.getTimestamp());\n\t}\n\n\t/**\n\t * Returns Date object with current time in user timezone. If you need to get 'now' in a user's perspective,\n\t * use this method instead of 'new Date()'.\n\t *\n\t * Note that 'getTimezoneOffset' will not return correct user timezone, its always returns browser offset\n\t *\n\t * @returns {Date}\n\t */\n\tstatic getDate(): Date\n\t{\n\t\treturn new Date(this.getTimestamp() * 1000);\n\t}\n\n\t/**\n\t * Converts timestamp in user timezone to timestamp in browser timezone.\n\t *\n\t * @param userTimestamp timestamp in user timezone in seconds\n\t * @returns {number} timestamp in browser timezone in seconds\n\t */\n\tstatic toBrowser(userTimestamp: number): number\n\t{\n\t\treturn (\n\t\t\tText.toInteger(userTimestamp)\n\t\t\t+ Offset.BROWSER_TO_UTC\n\t\t\t- Offset.SERVER_TO_UTC\n\t\t\t- Offset.USER_TO_SERVER\n\t\t);\n\t}\n\n\t/**\n\t * Converts timestamp in user timezone to timestamp in server timezone.\n\t *\n\t * @param userTimestamp timestamp in user timezone in seconds\n\t * @returns {number} timestamp in server timezone in seconds\n\t */\n\tstatic toServer(userTimestamp: number): number\n\t{\n\t\treturn Text.toInteger(userTimestamp) - Offset.USER_TO_SERVER;\n\t}\n}\n","import { Text } from 'main.core';\nimport { BrowserTime } from './browser-time';\nimport { Offset } from './offset';\n\n/**\n * @memberOf BX.Main.Timezone\n *\n * WARNING! Don't use this class or any classes from Timezone namespace on sites without Bitrix Framework.\n * It is not designed to handle this case and will definitely break.\n */\nexport class ServerTime\n{\n\t/**\n\t * Returns timestamp with current time in server timezone.\n\t *\n\t * @returns {number} timestamp in seconds\n\t */\n\tstatic getTimestamp(): number\n\t{\n\t\treturn BrowserTime.toServer(BrowserTime.getTimestamp());\n\t}\n\n\t/**\n\t * Returns Date object with current time in server timezone.\n\t *\n\t * Note that 'getTimezoneOffset' will not return correct server timezone, its always returns browser offset\n\t *\n\t * @returns {Date}\n\t */\n\tstatic getDate(): Date\n\t{\n\t\treturn new Date(this.getTimestamp() * 1000);\n\t}\n\n\t/**\n\t * Converts timestamp in server timezone to timestamp in user timezone.\n\t *\n\t * @param serverTimestamp timestamp in server timezone in seconds\n\t * @returns {number} timestamp in user timezone in seconds\n\t */\n\tstatic toUser(serverTimestamp: number): number\n\t{\n\t\treturn Text.toInteger(serverTimestamp) + Offset.USER_TO_SERVER;\n\t}\n\n\t/**\n\t * Converts timestamp in server timezone to timestamp in browser timezone.\n\t *\n\t * @param serverTimestamp timestamp in server timezone in seconds\n\t * @returns {number} timestamp in browser timezone in seconds\n\t */\n\tstatic toBrowser(serverTimestamp: number): number\n\t{\n\t\treturn Text.toInteger(serverTimestamp) + Offset.BROWSER_TO_UTC - Offset.SERVER_TO_UTC;\n\t}\n}\n","import { DateTimeFormat } from './date-time-format';\n\nimport { Offset } from './timezone/offset';\nimport { BrowserTime } from './timezone/browser-time';\nimport { UserTime } from './timezone/user-time';\nimport { ServerTime } from './timezone/server-time';\n\n//compatibility alias\nconst Date = DateTimeFormat;\n\nconst Timezone = Object.freeze({\n\tOffset,\n\tBrowserTime,\n\tUserTime,\n\tServerTime,\n});\n\nexport {\n\tDateTimeFormat,\n\tDate,\n\tTimezone,\n};\n"],"names":["convertBitrixFormat","format","Type","isStringFilled","replace","formatsCache","Cache","MemoryCache","getFormat","code","remember","Extension","getSettings","get","DateTimeFormat","returnConst","_getMessage","date","isDate","Date","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","timestamp","getBrowserTimestamp","parseInt","browserOffset","getTimezoneOffset","Math","round","now","utc","ampm","isAmPmMode","timeFormat","AM_PM_MODE","LOWER","UPPER","formattedDate","match","exec","message","Loc","getMessage","str","isUTC","formatDate","formatDatetime","regMonths","i","expr","RegExp","aDate","aFormat","aDateArgs","aFormatArgs","aResult","length","cnt","trim","m","findIndex","item","getMonthIndex","k","toUpperCase","d","setUTCDate","setUTCFullYear","setUTCMonth","setUTCHours","setDate","setFullYear","setMonth","setHours","isNaN","bPM","h","month","q","wordMonthCut","wordMonth","getTime","isNumber","nowDate","thisDateTimeFormat","isArray","_formatDateInterval","replaceMap","map","x","forEach","element","index","formatRegex","dateFormats","toString","padStart","D","getDay","j","l","N","S","w","z","firstDay","currentDay","ceil","W","newDate","dayNumber","firstThursday","weekNumber","F","f","M","n","t","lastMonthDay","L","year","o","correctDate","Y","y","slice","a","A","B","swatch","getUTCHours","getUTCMinutes","getUTCSeconds","floor","g","G","H","s","u","e","I","firstJanuary","firstJanuaryUTC","firstJuly","firstJulyUTC","O","timezoneOffset","timezoneOffsetAbs","abs","P","difference","substr","Z","c","_replaceDateFormat","r","U","sago","_formatDateMessage","intval","sdiff","sshort","iago","idiff","isago","minutesAgo","result","secondsAgo","ishort","Hago","Hdiff","Hshort","yesterday","today","tommorow","tomorrow","dago","ddiff","dshort","mago","mdiff","mshort","Yago","Ydiff","Yshort","X","day","time","Q","daysAgo","cutZeroTime","formats","formatInterval","formatValue","todayStart","todayEnd","yesterdayStart","yesterdayEnd","tomorrowStart","tomorrowEnd","getUTCFullYear","getUTCDate","getUTCMonth","getUTCMilliseconds","getUTCDay","dayValue","monthValue","value","messages","val","dec","matchFull","number","NONE","cache","Offset","SERVER_TO_UTC","Text","toInteger","USER_TO_SERVER","BROWSER_TO_UTC","Object","freeze","BrowserTime","getTimestamp","browserTimestamp","UserTime","toUser","userTimestamp","ServerTime","toServer","serverTimestamp","Timezone"],"mappings":";;;;CAEO,SAASA,mBAAmB,CAACC,MAAW,EAC/C;GACC,IAAI,CAACC,cAAI,CAACC,cAAc,CAACF,MAAM,CAAC,EAChC;KACC,OAAO,EAAE;;GAGV,OAAOA,MAAM,CAACG,OAAO,CAAC,MAAM,EAAE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