cdn.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. (() => {
  2. var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
  3. var __export = function __export(target, all) {
  4. for (var name in all)
  5. __defProp(target, name, {
  6. get: all[name],
  7. enumerable: true,
  8. configurable: true,
  9. set: function set(newValue) {return all[name] = function () {return newValue;};}
  10. });
  11. };
  12. // lib/locale/vi/_lib/formatDistance.js
  13. var formatDistanceLocale = {
  14. lessThanXSeconds: {
  15. one: "d\u01B0\u1EDBi 1 gi\xE2y",
  16. other: "d\u01B0\u1EDBi {{count}} gi\xE2y"
  17. },
  18. xSeconds: {
  19. one: "1 gi\xE2y",
  20. other: "{{count}} gi\xE2y"
  21. },
  22. halfAMinute: "n\u1EEDa ph\xFAt",
  23. lessThanXMinutes: {
  24. one: "d\u01B0\u1EDBi 1 ph\xFAt",
  25. other: "d\u01B0\u1EDBi {{count}} ph\xFAt"
  26. },
  27. xMinutes: {
  28. one: "1 ph\xFAt",
  29. other: "{{count}} ph\xFAt"
  30. },
  31. aboutXHours: {
  32. one: "kho\u1EA3ng 1 gi\u1EDD",
  33. other: "kho\u1EA3ng {{count}} gi\u1EDD"
  34. },
  35. xHours: {
  36. one: "1 gi\u1EDD",
  37. other: "{{count}} gi\u1EDD"
  38. },
  39. xDays: {
  40. one: "1 ng\xE0y",
  41. other: "{{count}} ng\xE0y"
  42. },
  43. aboutXWeeks: {
  44. one: "kho\u1EA3ng 1 tu\u1EA7n",
  45. other: "kho\u1EA3ng {{count}} tu\u1EA7n"
  46. },
  47. xWeeks: {
  48. one: "1 tu\u1EA7n",
  49. other: "{{count}} tu\u1EA7n"
  50. },
  51. aboutXMonths: {
  52. one: "kho\u1EA3ng 1 th\xE1ng",
  53. other: "kho\u1EA3ng {{count}} th\xE1ng"
  54. },
  55. xMonths: {
  56. one: "1 th\xE1ng",
  57. other: "{{count}} th\xE1ng"
  58. },
  59. aboutXYears: {
  60. one: "kho\u1EA3ng 1 n\u0103m",
  61. other: "kho\u1EA3ng {{count}} n\u0103m"
  62. },
  63. xYears: {
  64. one: "1 n\u0103m",
  65. other: "{{count}} n\u0103m"
  66. },
  67. overXYears: {
  68. one: "h\u01A1n 1 n\u0103m",
  69. other: "h\u01A1n {{count}} n\u0103m"
  70. },
  71. almostXYears: {
  72. one: "g\u1EA7n 1 n\u0103m",
  73. other: "g\u1EA7n {{count}} n\u0103m"
  74. }
  75. };
  76. var formatDistance = function formatDistance(token, count, options) {
  77. var result;
  78. var tokenValue = formatDistanceLocale[token];
  79. if (typeof tokenValue === "string") {
  80. result = tokenValue;
  81. } else if (count === 1) {
  82. result = tokenValue.one;
  83. } else {
  84. result = tokenValue.other.replace("{{count}}", String(count));
  85. }
  86. if (options !== null && options !== void 0 && options.addSuffix) {
  87. if (options.comparison && options.comparison > 0) {
  88. return result + " n\u1EEFa";
  89. } else {
  90. return result + " tr\u01B0\u1EDBc";
  91. }
  92. }
  93. return result;
  94. };
  95. // lib/locale/_lib/buildFormatLongFn.js
  96. function buildFormatLongFn(args) {
  97. return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  98. var width = options.width ? String(options.width) : args.defaultWidth;
  99. var format = args.formats[width] || args.formats[args.defaultWidth];
  100. return format;
  101. };
  102. }
  103. // lib/locale/vi/_lib/formatLong.js
  104. var dateFormats = {
  105. full: "EEEE, 'ng\xE0y' d MMMM 'n\u0103m' y",
  106. long: "'ng\xE0y' d MMMM 'n\u0103m' y",
  107. medium: "d MMM 'n\u0103m' y",
  108. short: "dd/MM/y"
  109. };
  110. var timeFormats = {
  111. full: "HH:mm:ss zzzz",
  112. long: "HH:mm:ss z",
  113. medium: "HH:mm:ss",
  114. short: "HH:mm"
  115. };
  116. var dateTimeFormats = {
  117. full: "{{date}} {{time}}",
  118. long: "{{date}} {{time}}",
  119. medium: "{{date}} {{time}}",
  120. short: "{{date}} {{time}}"
  121. };
  122. var formatLong = {
  123. date: buildFormatLongFn({
  124. formats: dateFormats,
  125. defaultWidth: "full"
  126. }),
  127. time: buildFormatLongFn({
  128. formats: timeFormats,
  129. defaultWidth: "full"
  130. }),
  131. dateTime: buildFormatLongFn({
  132. formats: dateTimeFormats,
  133. defaultWidth: "full"
  134. })
  135. };
  136. // lib/locale/vi/_lib/formatRelative.js
  137. var formatRelativeLocale = {
  138. lastWeek: "eeee 'tu\u1EA7n tr\u01B0\u1EDBc v\xE0o l\xFAc' p",
  139. yesterday: "'h\xF4m qua v\xE0o l\xFAc' p",
  140. today: "'h\xF4m nay v\xE0o l\xFAc' p",
  141. tomorrow: "'ng\xE0y mai v\xE0o l\xFAc' p",
  142. nextWeek: "eeee 't\u1EDBi v\xE0o l\xFAc' p",
  143. other: "P"
  144. };
  145. var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
  146. // lib/locale/_lib/buildLocalizeFn.js
  147. function buildLocalizeFn(args) {
  148. return function (value, options) {
  149. var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
  150. var valuesArray;
  151. if (context === "formatting" && args.formattingValues) {
  152. var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
  153. var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
  154. valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
  155. } else {
  156. var _defaultWidth = args.defaultWidth;
  157. var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
  158. valuesArray = args.values[_width] || args.values[_defaultWidth];
  159. }
  160. var index = args.argumentCallback ? args.argumentCallback(value) : value;
  161. return valuesArray[index];
  162. };
  163. }
  164. // lib/locale/vi/_lib/localize.js
  165. var eraValues = {
  166. narrow: ["TCN", "SCN"],
  167. abbreviated: ["tr\u01B0\u1EDBc CN", "sau CN"],
  168. wide: ["tr\u01B0\u1EDBc C\xF4ng Nguy\xEAn", "sau C\xF4ng Nguy\xEAn"]
  169. };
  170. var quarterValues = {
  171. narrow: ["1", "2", "3", "4"],
  172. abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  173. wide: ["Qu\xFD 1", "Qu\xFD 2", "Qu\xFD 3", "Qu\xFD 4"]
  174. };
  175. var formattingQuarterValues = {
  176. narrow: ["1", "2", "3", "4"],
  177. abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  178. wide: ["qu\xFD I", "qu\xFD II", "qu\xFD III", "qu\xFD IV"]
  179. };
  180. var monthValues = {
  181. narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
  182. abbreviated: [
  183. "Thg 1",
  184. "Thg 2",
  185. "Thg 3",
  186. "Thg 4",
  187. "Thg 5",
  188. "Thg 6",
  189. "Thg 7",
  190. "Thg 8",
  191. "Thg 9",
  192. "Thg 10",
  193. "Thg 11",
  194. "Thg 12"],
  195. wide: [
  196. "Th\xE1ng M\u1ED9t",
  197. "Th\xE1ng Hai",
  198. "Th\xE1ng Ba",
  199. "Th\xE1ng T\u01B0",
  200. "Th\xE1ng N\u0103m",
  201. "Th\xE1ng S\xE1u",
  202. "Th\xE1ng B\u1EA3y",
  203. "Th\xE1ng T\xE1m",
  204. "Th\xE1ng Ch\xEDn",
  205. "Th\xE1ng M\u01B0\u1EDDi",
  206. "Th\xE1ng M\u01B0\u1EDDi M\u1ED9t",
  207. "Th\xE1ng M\u01B0\u1EDDi Hai"]
  208. };
  209. var formattingMonthValues = {
  210. narrow: [
  211. "01",
  212. "02",
  213. "03",
  214. "04",
  215. "05",
  216. "06",
  217. "07",
  218. "08",
  219. "09",
  220. "10",
  221. "11",
  222. "12"],
  223. abbreviated: [
  224. "thg 1",
  225. "thg 2",
  226. "thg 3",
  227. "thg 4",
  228. "thg 5",
  229. "thg 6",
  230. "thg 7",
  231. "thg 8",
  232. "thg 9",
  233. "thg 10",
  234. "thg 11",
  235. "thg 12"],
  236. wide: [
  237. "th\xE1ng 01",
  238. "th\xE1ng 02",
  239. "th\xE1ng 03",
  240. "th\xE1ng 04",
  241. "th\xE1ng 05",
  242. "th\xE1ng 06",
  243. "th\xE1ng 07",
  244. "th\xE1ng 08",
  245. "th\xE1ng 09",
  246. "th\xE1ng 10",
  247. "th\xE1ng 11",
  248. "th\xE1ng 12"]
  249. };
  250. var dayValues = {
  251. narrow: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"],
  252. short: ["CN", "Th 2", "Th 3", "Th 4", "Th 5", "Th 6", "Th 7"],
  253. abbreviated: ["CN", "Th\u1EE9 2", "Th\u1EE9 3", "Th\u1EE9 4", "Th\u1EE9 5", "Th\u1EE9 6", "Th\u1EE9 7"],
  254. wide: [
  255. "Ch\u1EE7 Nh\u1EADt",
  256. "Th\u1EE9 Hai",
  257. "Th\u1EE9 Ba",
  258. "Th\u1EE9 T\u01B0",
  259. "Th\u1EE9 N\u0103m",
  260. "Th\u1EE9 S\xE1u",
  261. "Th\u1EE9 B\u1EA3y"]
  262. };
  263. var dayPeriodValues = {
  264. narrow: {
  265. am: "am",
  266. pm: "pm",
  267. midnight: "n\u1EEDa \u0111\xEAm",
  268. noon: "tr",
  269. morning: "sg",
  270. afternoon: "ch",
  271. evening: "t\u1ED1i",
  272. night: "\u0111\xEAm"
  273. },
  274. abbreviated: {
  275. am: "AM",
  276. pm: "PM",
  277. midnight: "n\u1EEDa \u0111\xEAm",
  278. noon: "tr\u01B0a",
  279. morning: "s\xE1ng",
  280. afternoon: "chi\u1EC1u",
  281. evening: "t\u1ED1i",
  282. night: "\u0111\xEAm"
  283. },
  284. wide: {
  285. am: "SA",
  286. pm: "CH",
  287. midnight: "n\u1EEDa \u0111\xEAm",
  288. noon: "tr\u01B0a",
  289. morning: "s\xE1ng",
  290. afternoon: "chi\u1EC1u",
  291. evening: "t\u1ED1i",
  292. night: "\u0111\xEAm"
  293. }
  294. };
  295. var formattingDayPeriodValues = {
  296. narrow: {
  297. am: "am",
  298. pm: "pm",
  299. midnight: "n\u1EEDa \u0111\xEAm",
  300. noon: "tr",
  301. morning: "sg",
  302. afternoon: "ch",
  303. evening: "t\u1ED1i",
  304. night: "\u0111\xEAm"
  305. },
  306. abbreviated: {
  307. am: "AM",
  308. pm: "PM",
  309. midnight: "n\u1EEDa \u0111\xEAm",
  310. noon: "tr\u01B0a",
  311. morning: "s\xE1ng",
  312. afternoon: "chi\u1EC1u",
  313. evening: "t\u1ED1i",
  314. night: "\u0111\xEAm"
  315. },
  316. wide: {
  317. am: "SA",
  318. pm: "CH",
  319. midnight: "n\u1EEDa \u0111\xEAm",
  320. noon: "gi\u1EEFa tr\u01B0a",
  321. morning: "v\xE0o bu\u1ED5i s\xE1ng",
  322. afternoon: "v\xE0o bu\u1ED5i chi\u1EC1u",
  323. evening: "v\xE0o bu\u1ED5i t\u1ED1i",
  324. night: "v\xE0o ban \u0111\xEAm"
  325. }
  326. };
  327. var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
  328. var number = Number(dirtyNumber);
  329. var unit = options === null || options === void 0 ? void 0 : options.unit;
  330. if (unit === "quarter") {
  331. switch (number) {
  332. case 1:
  333. return "I";
  334. case 2:
  335. return "II";
  336. case 3:
  337. return "III";
  338. case 4:
  339. return "IV";
  340. }
  341. } else if (unit === "day") {
  342. switch (number) {
  343. case 1:
  344. return "th\u1EE9 2";
  345. case 2:
  346. return "th\u1EE9 3";
  347. case 3:
  348. return "th\u1EE9 4";
  349. case 4:
  350. return "th\u1EE9 5";
  351. case 5:
  352. return "th\u1EE9 6";
  353. case 6:
  354. return "th\u1EE9 7";
  355. case 7:
  356. return "ch\u1EE7 nh\u1EADt";
  357. }
  358. } else if (unit === "week") {
  359. if (number === 1) {
  360. return "th\u1EE9 nh\u1EA5t";
  361. } else {
  362. return "th\u1EE9 " + number;
  363. }
  364. } else if (unit === "dayOfYear") {
  365. if (number === 1) {
  366. return "\u0111\u1EA7u ti\xEAn";
  367. } else {
  368. return "th\u1EE9 " + number;
  369. }
  370. }
  371. return String(number);
  372. };
  373. var localize = {
  374. ordinalNumber: ordinalNumber,
  375. era: buildLocalizeFn({
  376. values: eraValues,
  377. defaultWidth: "wide"
  378. }),
  379. quarter: buildLocalizeFn({
  380. values: quarterValues,
  381. defaultWidth: "wide",
  382. formattingValues: formattingQuarterValues,
  383. defaultFormattingWidth: "wide",
  384. argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
  385. }),
  386. month: buildLocalizeFn({
  387. values: monthValues,
  388. defaultWidth: "wide",
  389. formattingValues: formattingMonthValues,
  390. defaultFormattingWidth: "wide"
  391. }),
  392. day: buildLocalizeFn({
  393. values: dayValues,
  394. defaultWidth: "wide"
  395. }),
  396. dayPeriod: buildLocalizeFn({
  397. values: dayPeriodValues,
  398. defaultWidth: "wide",
  399. formattingValues: formattingDayPeriodValues,
  400. defaultFormattingWidth: "wide"
  401. })
  402. };
  403. // lib/locale/_lib/buildMatchFn.js
  404. function buildMatchFn(args) {
  405. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  406. var width = options.width;
  407. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  408. var matchResult = string.match(matchPattern);
  409. if (!matchResult) {
  410. return null;
  411. }
  412. var matchedString = matchResult[0];
  413. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  414. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  415. var value;
  416. value = args.valueCallback ? args.valueCallback(key) : key;
  417. value = options.valueCallback ? options.valueCallback(value) : value;
  418. var rest = string.slice(matchedString.length);
  419. return { value: value, rest: rest };
  420. };
  421. }
  422. function findKey(object, predicate) {
  423. for (var key in object) {
  424. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  425. return key;
  426. }
  427. }
  428. return;
  429. }
  430. function findIndex(array, predicate) {
  431. for (var key = 0; key < array.length; key++) {
  432. if (predicate(array[key])) {
  433. return key;
  434. }
  435. }
  436. return;
  437. }
  438. // lib/locale/_lib/buildMatchPatternFn.js
  439. function buildMatchPatternFn(args) {
  440. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  441. var matchResult = string.match(args.matchPattern);
  442. if (!matchResult)
  443. return null;
  444. var matchedString = matchResult[0];
  445. var parseResult = string.match(args.parsePattern);
  446. if (!parseResult)
  447. return null;
  448. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  449. value = options.valueCallback ? options.valueCallback(value) : value;
  450. var rest = string.slice(matchedString.length);
  451. return { value: value, rest: rest };
  452. };
  453. }
  454. // lib/locale/vi/_lib/match.js
  455. var matchOrdinalNumberPattern = /^(\d+)/i;
  456. var parseOrdinalNumberPattern = /\d+/i;
  457. var matchEraPatterns = {
  458. narrow: /^(tcn|scn)/i,
  459. abbreviated: /^(trước CN|sau CN)/i,
  460. wide: /^(trước Công Nguyên|sau Công Nguyên)/i
  461. };
  462. var parseEraPatterns = {
  463. any: [/^t/i, /^s/i]
  464. };
  465. var matchQuarterPatterns = {
  466. narrow: /^([1234]|i{1,3}v?)/i,
  467. abbreviated: /^q([1234]|i{1,3}v?)/i,
  468. wide: /^quý ([1234]|i{1,3}v?)/i
  469. };
  470. var parseQuarterPatterns = {
  471. any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i]
  472. };
  473. var matchMonthPatterns = {
  474. narrow: /^(0?[2-9]|10|11|12|0?1)/i,
  475. abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
  476. wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i
  477. };
  478. var parseMonthPatterns = {
  479. narrow: [
  480. /0?1$/i,
  481. /0?2/i,
  482. /3/,
  483. /4/,
  484. /5/,
  485. /6/,
  486. /7/,
  487. /8/,
  488. /9/,
  489. /10/,
  490. /11/,
  491. /12/],
  492. abbreviated: [
  493. /^thg[ _]?0?1(?!\d)/i,
  494. /^thg[ _]?0?2/i,
  495. /^thg[ _]?0?3/i,
  496. /^thg[ _]?0?4/i,
  497. /^thg[ _]?0?5/i,
  498. /^thg[ _]?0?6/i,
  499. /^thg[ _]?0?7/i,
  500. /^thg[ _]?0?8/i,
  501. /^thg[ _]?0?9/i,
  502. /^thg[ _]?10/i,
  503. /^thg[ _]?11/i,
  504. /^thg[ _]?12/i],
  505. wide: [
  506. /^tháng ?(Một|0?1(?!\d))/i,
  507. /^tháng ?(Hai|0?2)/i,
  508. /^tháng ?(Ba|0?3)/i,
  509. /^tháng ?(Tư|0?4)/i,
  510. /^tháng ?(Năm|0?5)/i,
  511. /^tháng ?(Sáu|0?6)/i,
  512. /^tháng ?(Bảy|0?7)/i,
  513. /^tháng ?(Tám|0?8)/i,
  514. /^tháng ?(Chín|0?9)/i,
  515. /^tháng ?(Mười|10)/i,
  516. /^tháng ?(Mười ?Một|11)/i,
  517. /^tháng ?(Mười ?Hai|12)/i]
  518. };
  519. var matchDayPatterns = {
  520. narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
  521. short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
  522. abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
  523. wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i
  524. };
  525. var parseDayPatterns = {
  526. narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
  527. short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
  528. abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
  529. wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i]
  530. };
  531. var matchDayPeriodPatterns = {
  532. narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
  533. abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
  534. wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i
  535. };
  536. var parseDayPeriodPatterns = {
  537. any: {
  538. am: /^(a|sa)/i,
  539. pm: /^(p|ch[^i]*)/i,
  540. midnight: /nửa đêm/i,
  541. noon: /trưa/i,
  542. morning: /sáng/i,
  543. afternoon: /chiều/i,
  544. evening: /tối/i,
  545. night: /^đêm/i
  546. }
  547. };
  548. var match = {
  549. ordinalNumber: buildMatchPatternFn({
  550. matchPattern: matchOrdinalNumberPattern,
  551. parsePattern: parseOrdinalNumberPattern,
  552. valueCallback: function valueCallback(value) {return parseInt(value, 10);}
  553. }),
  554. era: buildMatchFn({
  555. matchPatterns: matchEraPatterns,
  556. defaultMatchWidth: "wide",
  557. parsePatterns: parseEraPatterns,
  558. defaultParseWidth: "any"
  559. }),
  560. quarter: buildMatchFn({
  561. matchPatterns: matchQuarterPatterns,
  562. defaultMatchWidth: "wide",
  563. parsePatterns: parseQuarterPatterns,
  564. defaultParseWidth: "any",
  565. valueCallback: function valueCallback(index) {return index + 1;}
  566. }),
  567. month: buildMatchFn({
  568. matchPatterns: matchMonthPatterns,
  569. defaultMatchWidth: "wide",
  570. parsePatterns: parseMonthPatterns,
  571. defaultParseWidth: "wide"
  572. }),
  573. day: buildMatchFn({
  574. matchPatterns: matchDayPatterns,
  575. defaultMatchWidth: "wide",
  576. parsePatterns: parseDayPatterns,
  577. defaultParseWidth: "wide"
  578. }),
  579. dayPeriod: buildMatchFn({
  580. matchPatterns: matchDayPeriodPatterns,
  581. defaultMatchWidth: "wide",
  582. parsePatterns: parseDayPeriodPatterns,
  583. defaultParseWidth: "any"
  584. })
  585. };
  586. // lib/locale/vi.js
  587. var vi = {
  588. code: "vi",
  589. formatDistance: formatDistance,
  590. formatLong: formatLong,
  591. formatRelative: formatRelative,
  592. localize: localize,
  593. match: match,
  594. options: {
  595. weekStartsOn: 1,
  596. firstWeekContainsDate: 1
  597. }
  598. };
  599. // lib/locale/vi/cdn.js
  600. window.dateFns = _objectSpread(_objectSpread({},
  601. window.dateFns), {}, {
  602. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  603. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  604. vi: vi }) });
  605. //# debugId=99CB759AEAC8A3D464756E2164756E21
  606. //# sourceMappingURL=cdn.js.map
  607. })();