{"ast":null,"code":"import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\nconst matchOrdinalNumberPattern = /^(\\d+)/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\nconst matchEraPatterns = {\n  narrow: /^(tcn|scn)/i,\n  abbreviated: /^(trước CN|sau CN)/i,\n  wide: /^(trước Công Nguyên|sau Công Nguyên)/i\n};\nconst parseEraPatterns = {\n  any: [/^t/i, /^s/i]\n};\nconst matchQuarterPatterns = {\n  narrow: /^([1234]|i{1,3}v?)/i,\n  abbreviated: /^q([1234]|i{1,3}v?)/i,\n  wide: /^quý ([1234]|i{1,3}v?)/i\n};\nconst parseQuarterPatterns = {\n  any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i]\n};\nconst matchMonthPatterns = {\n  // month number may contain leading 0, 'thg' prefix may have space, underscore or empty before number\n  // note the order of '1' since it is a sub-string of '10', so must be lower priority\n  narrow: /^(0?[2-9]|10|11|12|0?1)/i,\n  // note the order of 'thg 1' since it is sub-string of 'thg 10', so must be lower priority\n  abbreviated: /^thg[ _]?(0?[1-9](?!\\d)|10|11|12)/i,\n  // note the order of 'Mười' since it is sub-string of Mười Một, so must be lower priority\n  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\n};\nconst parseMonthPatterns = {\n  narrow: [/0?1$/i, /0?2/i, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/, /11/, /12/],\n  abbreviated: [/^thg[ _]?0?1(?!\\d)/i, /^thg[ _]?0?2/i, /^thg[ _]?0?3/i, /^thg[ _]?0?4/i, /^thg[ _]?0?5/i, /^thg[ _]?0?6/i, /^thg[ _]?0?7/i, /^thg[ _]?0?8/i, /^thg[ _]?0?9/i, /^thg[ _]?10/i, /^thg[ _]?11/i, /^thg[ _]?12/i],\n  wide: [/^tháng ?(Một|0?1(?!\\d))/i, /^tháng ?(Hai|0?2)/i, /^tháng ?(Ba|0?3)/i, /^tháng ?(Tư|0?4)/i, /^tháng ?(Năm|0?5)/i, /^tháng ?(Sáu|0?6)/i, /^tháng ?(Bảy|0?7)/i, /^tháng ?(Tám|0?8)/i, /^tháng ?(Chín|0?9)/i, /^tháng ?(Mười|10)/i, /^tháng ?(Mười ?Một|11)/i, /^tháng ?(Mười ?Hai|12)/i]\n};\nconst matchDayPatterns = {\n  narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,\n  short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,\n  abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,\n  wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i\n};\nconst parseDayPatterns = {\n  narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],\n  short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],\n  abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],\n  wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i]\n};\nconst matchDayPeriodPatterns = {\n  narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,\n  abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,\n  wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i\n};\nconst parseDayPeriodPatterns = {\n  any: {\n    am: /^(a|sa)/i,\n    pm: /^(p|ch[^i]*)/i,\n    midnight: /nửa đêm/i,\n    noon: /trưa/i,\n    morning: /sáng/i,\n    afternoon: /chiều/i,\n    evening: /tối/i,\n    night: /^đêm/i\n  }\n};\nexport const match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: value => parseInt(value, 10)\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: \"any\"\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: \"any\",\n    valueCallback: index => index + 1\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: \"wide\"\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: \"wide\"\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: \"any\"\n  })\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}