cdn.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  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/ro/_lib/formatDistance.js
  13. var formatDistanceLocale = {
  14. lessThanXSeconds: {
  15. one: "mai pu\u021Bin de o secund\u0103",
  16. other: "mai pu\u021Bin de {{count}} secunde"
  17. },
  18. xSeconds: {
  19. one: "1 secund\u0103",
  20. other: "{{count}} secunde"
  21. },
  22. halfAMinute: "jum\u0103tate de minut",
  23. lessThanXMinutes: {
  24. one: "mai pu\u021Bin de un minut",
  25. other: "mai pu\u021Bin de {{count}} minute"
  26. },
  27. xMinutes: {
  28. one: "1 minut",
  29. other: "{{count}} minute"
  30. },
  31. aboutXHours: {
  32. one: "circa 1 or\u0103",
  33. other: "circa {{count}} ore"
  34. },
  35. xHours: {
  36. one: "1 or\u0103",
  37. other: "{{count}} ore"
  38. },
  39. xDays: {
  40. one: "1 zi",
  41. other: "{{count}} zile"
  42. },
  43. aboutXWeeks: {
  44. one: "circa o s\u0103pt\u0103m\xE2n\u0103",
  45. other: "circa {{count}} s\u0103pt\u0103m\xE2ni"
  46. },
  47. xWeeks: {
  48. one: "1 s\u0103pt\u0103m\xE2n\u0103",
  49. other: "{{count}} s\u0103pt\u0103m\xE2ni"
  50. },
  51. aboutXMonths: {
  52. one: "circa 1 lun\u0103",
  53. other: "circa {{count}} luni"
  54. },
  55. xMonths: {
  56. one: "1 lun\u0103",
  57. other: "{{count}} luni"
  58. },
  59. aboutXYears: {
  60. one: "circa 1 an",
  61. other: "circa {{count}} ani"
  62. },
  63. xYears: {
  64. one: "1 an",
  65. other: "{{count}} ani"
  66. },
  67. overXYears: {
  68. one: "peste 1 an",
  69. other: "peste {{count}} ani"
  70. },
  71. almostXYears: {
  72. one: "aproape 1 an",
  73. other: "aproape {{count}} ani"
  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 "\xEEn " + result;
  89. } else {
  90. return result + " \xEEn urm\u0103";
  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/ro/_lib/formatLong.js
  104. var dateFormats = {
  105. full: "EEEE, d MMMM yyyy",
  106. long: "d MMMM yyyy",
  107. medium: "d MMM yyyy",
  108. short: "dd.MM.yyyy"
  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}} 'la' {{time}}",
  118. long: "{{date}} 'la' {{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/ro/_lib/formatRelative.js
  137. var formatRelativeLocale = {
  138. lastWeek: "eeee 'trecut\u0103 la' p",
  139. yesterday: "'ieri la' p",
  140. today: "'ast\u0103zi la' p",
  141. tomorrow: "'m\xE2ine la' p",
  142. nextWeek: "eeee 'viitoare la' 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/ro/_lib/localize.js
  165. var eraValues = {
  166. narrow: ["\xCE", "D"],
  167. abbreviated: ["\xCE.d.C.", "D.C."],
  168. wide: ["\xCEnainte de Cristos", "Dup\u0103 Cristos"]
  169. };
  170. var quarterValues = {
  171. narrow: ["1", "2", "3", "4"],
  172. abbreviated: ["T1", "T2", "T3", "T4"],
  173. wide: [
  174. "primul trimestru",
  175. "al doilea trimestru",
  176. "al treilea trimestru",
  177. "al patrulea trimestru"]
  178. };
  179. var monthValues = {
  180. narrow: ["I", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"],
  181. abbreviated: [
  182. "ian",
  183. "feb",
  184. "mar",
  185. "apr",
  186. "mai",
  187. "iun",
  188. "iul",
  189. "aug",
  190. "sep",
  191. "oct",
  192. "noi",
  193. "dec"],
  194. wide: [
  195. "ianuarie",
  196. "februarie",
  197. "martie",
  198. "aprilie",
  199. "mai",
  200. "iunie",
  201. "iulie",
  202. "august",
  203. "septembrie",
  204. "octombrie",
  205. "noiembrie",
  206. "decembrie"]
  207. };
  208. var dayValues = {
  209. narrow: ["d", "l", "m", "m", "j", "v", "s"],
  210. short: ["du", "lu", "ma", "mi", "jo", "vi", "s\xE2"],
  211. abbreviated: ["dum", "lun", "mar", "mie", "joi", "vin", "s\xE2m"],
  212. wide: ["duminic\u0103", "luni", "mar\u021Bi", "miercuri", "joi", "vineri", "s\xE2mb\u0103t\u0103"]
  213. };
  214. var dayPeriodValues = {
  215. narrow: {
  216. am: "a",
  217. pm: "p",
  218. midnight: "mn",
  219. noon: "ami",
  220. morning: "dim",
  221. afternoon: "da",
  222. evening: "s",
  223. night: "n"
  224. },
  225. abbreviated: {
  226. am: "AM",
  227. pm: "PM",
  228. midnight: "miezul nop\u021Bii",
  229. noon: "amiaz\u0103",
  230. morning: "diminea\u021B\u0103",
  231. afternoon: "dup\u0103-amiaz\u0103",
  232. evening: "sear\u0103",
  233. night: "noapte"
  234. },
  235. wide: {
  236. am: "a.m.",
  237. pm: "p.m.",
  238. midnight: "miezul nop\u021Bii",
  239. noon: "amiaz\u0103",
  240. morning: "diminea\u021B\u0103",
  241. afternoon: "dup\u0103-amiaz\u0103",
  242. evening: "sear\u0103",
  243. night: "noapte"
  244. }
  245. };
  246. var formattingDayPeriodValues = {
  247. narrow: {
  248. am: "a",
  249. pm: "p",
  250. midnight: "mn",
  251. noon: "amiaz\u0103",
  252. morning: "diminea\u021B\u0103",
  253. afternoon: "dup\u0103-amiaz\u0103",
  254. evening: "sear\u0103",
  255. night: "noapte"
  256. },
  257. abbreviated: {
  258. am: "AM",
  259. pm: "PM",
  260. midnight: "miezul nop\u021Bii",
  261. noon: "amiaz\u0103",
  262. morning: "diminea\u021B\u0103",
  263. afternoon: "dup\u0103-amiaz\u0103",
  264. evening: "sear\u0103",
  265. night: "noapte"
  266. },
  267. wide: {
  268. am: "a.m.",
  269. pm: "p.m.",
  270. midnight: "miezul nop\u021Bii",
  271. noon: "amiaz\u0103",
  272. morning: "diminea\u021B\u0103",
  273. afternoon: "dup\u0103-amiaz\u0103",
  274. evening: "sear\u0103",
  275. night: "noapte"
  276. }
  277. };
  278. var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
  279. return String(dirtyNumber);
  280. };
  281. var localize = {
  282. ordinalNumber: ordinalNumber,
  283. era: buildLocalizeFn({
  284. values: eraValues,
  285. defaultWidth: "wide"
  286. }),
  287. quarter: buildLocalizeFn({
  288. values: quarterValues,
  289. defaultWidth: "wide",
  290. argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
  291. }),
  292. month: buildLocalizeFn({
  293. values: monthValues,
  294. defaultWidth: "wide"
  295. }),
  296. day: buildLocalizeFn({
  297. values: dayValues,
  298. defaultWidth: "wide"
  299. }),
  300. dayPeriod: buildLocalizeFn({
  301. values: dayPeriodValues,
  302. defaultWidth: "wide",
  303. formattingValues: formattingDayPeriodValues,
  304. defaultFormattingWidth: "wide"
  305. })
  306. };
  307. // lib/locale/_lib/buildMatchFn.js
  308. function buildMatchFn(args) {
  309. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  310. var width = options.width;
  311. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  312. var matchResult = string.match(matchPattern);
  313. if (!matchResult) {
  314. return null;
  315. }
  316. var matchedString = matchResult[0];
  317. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  318. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  319. var value;
  320. value = args.valueCallback ? args.valueCallback(key) : key;
  321. value = options.valueCallback ? options.valueCallback(value) : value;
  322. var rest = string.slice(matchedString.length);
  323. return { value: value, rest: rest };
  324. };
  325. }
  326. function findKey(object, predicate) {
  327. for (var key in object) {
  328. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  329. return key;
  330. }
  331. }
  332. return;
  333. }
  334. function findIndex(array, predicate) {
  335. for (var key = 0; key < array.length; key++) {
  336. if (predicate(array[key])) {
  337. return key;
  338. }
  339. }
  340. return;
  341. }
  342. // lib/locale/_lib/buildMatchPatternFn.js
  343. function buildMatchPatternFn(args) {
  344. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  345. var matchResult = string.match(args.matchPattern);
  346. if (!matchResult)
  347. return null;
  348. var matchedString = matchResult[0];
  349. var parseResult = string.match(args.parsePattern);
  350. if (!parseResult)
  351. return null;
  352. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  353. value = options.valueCallback ? options.valueCallback(value) : value;
  354. var rest = string.slice(matchedString.length);
  355. return { value: value, rest: rest };
  356. };
  357. }
  358. // lib/locale/ro/_lib/match.js
  359. var matchOrdinalNumberPattern = /^(\d+)?/i;
  360. var parseOrdinalNumberPattern = /\d+/i;
  361. var matchEraPatterns = {
  362. narrow: /^(Î|D)/i,
  363. abbreviated: /^(Î\.?\s?d\.?\s?C\.?|Î\.?\s?e\.?\s?n\.?|D\.?\s?C\.?|e\.?\s?n\.?)/i,
  364. wide: /^(Înainte de Cristos|Înaintea erei noastre|După Cristos|Era noastră)/i
  365. };
  366. var parseEraPatterns = {
  367. any: [/^ÎC/i, /^DC/i],
  368. wide: [
  369. /^(Înainte de Cristos|Înaintea erei noastre)/i,
  370. /^(După Cristos|Era noastră)/i]
  371. };
  372. var matchQuarterPatterns = {
  373. narrow: /^[1234]/i,
  374. abbreviated: /^T[1234]/i,
  375. wide: /^trimestrul [1234]/i
  376. };
  377. var parseQuarterPatterns = {
  378. any: [/1/i, /2/i, /3/i, /4/i]
  379. };
  380. var matchMonthPatterns = {
  381. narrow: /^[ifmaasond]/i,
  382. abbreviated: /^(ian|feb|mar|apr|mai|iun|iul|aug|sep|oct|noi|dec)/i,
  383. wide: /^(ianuarie|februarie|martie|aprilie|mai|iunie|iulie|august|septembrie|octombrie|noiembrie|decembrie)/i
  384. };
  385. var parseMonthPatterns = {
  386. narrow: [
  387. /^i/i,
  388. /^f/i,
  389. /^m/i,
  390. /^a/i,
  391. /^m/i,
  392. /^i/i,
  393. /^i/i,
  394. /^a/i,
  395. /^s/i,
  396. /^o/i,
  397. /^n/i,
  398. /^d/i],
  399. any: [
  400. /^ia/i,
  401. /^f/i,
  402. /^mar/i,
  403. /^ap/i,
  404. /^mai/i,
  405. /^iun/i,
  406. /^iul/i,
  407. /^au/i,
  408. /^s/i,
  409. /^o/i,
  410. /^n/i,
  411. /^d/i]
  412. };
  413. var matchDayPatterns = {
  414. narrow: /^[dlmjvs]/i,
  415. short: /^(d|l|ma|mi|j|v|s)/i,
  416. abbreviated: /^(dum|lun|mar|mie|jo|vi|sâ)/i,
  417. wide: /^(duminica|luni|marţi|miercuri|joi|vineri|sâmbătă)/i
  418. };
  419. var parseDayPatterns = {
  420. narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
  421. any: [/^d/i, /^l/i, /^ma/i, /^mi/i, /^j/i, /^v/i, /^s/i]
  422. };
  423. var matchDayPeriodPatterns = {
  424. narrow: /^(a|p|mn|a|(dimineaţa|după-amiaza|seara|noaptea))/i,
  425. any: /^([ap]\.?\s?m\.?|miezul nopții|amiaza|(dimineaţa|după-amiaza|seara|noaptea))/i
  426. };
  427. var parseDayPeriodPatterns = {
  428. any: {
  429. am: /^a/i,
  430. pm: /^p/i,
  431. midnight: /^mn/i,
  432. noon: /amiaza/i,
  433. morning: /dimineaţa/i,
  434. afternoon: /după-amiaza/i,
  435. evening: /seara/i,
  436. night: /noaptea/i
  437. }
  438. };
  439. var match = {
  440. ordinalNumber: buildMatchPatternFn({
  441. matchPattern: matchOrdinalNumberPattern,
  442. parsePattern: parseOrdinalNumberPattern,
  443. valueCallback: function valueCallback(value) {return parseInt(value, 10);}
  444. }),
  445. era: buildMatchFn({
  446. matchPatterns: matchEraPatterns,
  447. defaultMatchWidth: "wide",
  448. parsePatterns: parseEraPatterns,
  449. defaultParseWidth: "any"
  450. }),
  451. quarter: buildMatchFn({
  452. matchPatterns: matchQuarterPatterns,
  453. defaultMatchWidth: "wide",
  454. parsePatterns: parseQuarterPatterns,
  455. defaultParseWidth: "any",
  456. valueCallback: function valueCallback(index) {return index + 1;}
  457. }),
  458. month: buildMatchFn({
  459. matchPatterns: matchMonthPatterns,
  460. defaultMatchWidth: "wide",
  461. parsePatterns: parseMonthPatterns,
  462. defaultParseWidth: "any"
  463. }),
  464. day: buildMatchFn({
  465. matchPatterns: matchDayPatterns,
  466. defaultMatchWidth: "wide",
  467. parsePatterns: parseDayPatterns,
  468. defaultParseWidth: "any"
  469. }),
  470. dayPeriod: buildMatchFn({
  471. matchPatterns: matchDayPeriodPatterns,
  472. defaultMatchWidth: "any",
  473. parsePatterns: parseDayPeriodPatterns,
  474. defaultParseWidth: "any"
  475. })
  476. };
  477. // lib/locale/ro.js
  478. var ro = {
  479. code: "ro",
  480. formatDistance: formatDistance,
  481. formatLong: formatLong,
  482. formatRelative: formatRelative,
  483. localize: localize,
  484. match: match,
  485. options: {
  486. weekStartsOn: 1,
  487. firstWeekContainsDate: 1
  488. }
  489. };
  490. // lib/locale/ro/cdn.js
  491. window.dateFns = _objectSpread(_objectSpread({},
  492. window.dateFns), {}, {
  493. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  494. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  495. ro: ro }) });
  496. //# debugId=FD06BEBFBD89620C64756E2164756E21
  497. //# sourceMappingURL=cdn.js.map
  498. })();