@workflow/web 4.0.1-beta.13 → 4.0.1-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -2
  3. package/.next/build-manifest.json +4 -4
  4. package/.next/fallback-build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/routes-manifest.json +0 -9
  7. package/.next/server/app/_global-error/page/build-manifest.json +2 -2
  8. package/.next/server/app/_global-error.html +2 -2
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page/build-manifest.json +2 -2
  16. package/.next/server/app/_not-found/page/server-reference-manifest.json +184 -4
  17. package/.next/server/app/_not-found/page.js +3 -2
  18. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/page/build-manifest.json +2 -2
  21. package/.next/server/app/page/server-reference-manifest.json +67 -52
  22. package/.next/server/app/page.js +3 -3
  23. package/.next/server/app/page.js.nft.json +1 -1
  24. package/.next/server/app/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/run/[runId]/page/build-manifest.json +2 -2
  26. package/.next/server/app/run/[runId]/page/server-reference-manifest.json +67 -52
  27. package/.next/server/app/run/[runId]/page.js +3 -3
  28. package/.next/server/app/run/[runId]/page.js.nft.json +1 -1
  29. package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -1
  30. package/.next/server/app-paths-manifest.json +1 -2
  31. package/.next/server/chunks/ssr/[root-of-the-server]__357a9046._.js +3 -0
  32. package/.next/server/chunks/ssr/[root-of-the-server]__357a9046._.js.map +1 -0
  33. package/.next/server/chunks/ssr/[root-of-the-server]__747eb15e._.js +72 -0
  34. package/.next/server/chunks/ssr/[root-of-the-server]__747eb15e._.js.map +1 -0
  35. package/.next/server/chunks/ssr/[root-of-the-server]__c8f35667._.js +3 -0
  36. package/.next/server/chunks/ssr/[root-of-the-server]__c8f35667._.js.map +1 -0
  37. package/.next/server/chunks/ssr/{[root-of-the-server]__5601d14d._.js → [root-of-the-server]__d67ccd55._.js} +2 -2
  38. package/.next/server/chunks/ssr/{[root-of-the-server]__5601d14d._.js.map → [root-of-the-server]__d67ccd55._.js.map} +1 -1
  39. package/.next/server/chunks/ssr/{[root-of-the-server]__ef8720b3._.js → [root-of-the-server]__e8641565._.js} +2 -2
  40. package/.next/server/chunks/ssr/[root-of-the-server]__e8641565._.js.map +1 -0
  41. package/.next/server/chunks/ssr/[root-of-the-server]__ef9c7ec7._.js +3 -0
  42. package/.next/server/chunks/ssr/[root-of-the-server]__ef9c7ec7._.js.map +1 -0
  43. package/.next/server/chunks/ssr/_2d77ccc1._.js +3 -0
  44. package/.next/server/chunks/ssr/_2d77ccc1._.js.map +1 -0
  45. package/.next/server/chunks/ssr/_30abd234._.js +8 -0
  46. package/.next/server/chunks/ssr/_30abd234._.js.map +1 -0
  47. package/.next/server/chunks/ssr/_6e6035a6._.js +3 -0
  48. package/.next/server/chunks/ssr/_6e6035a6._.js.map +1 -0
  49. package/.next/server/chunks/ssr/_b3bb46c8._.js +3 -0
  50. package/.next/server/chunks/ssr/_b3bb46c8._.js.map +1 -0
  51. package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js +1 -1
  52. package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js.map +1 -1
  53. package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js +6 -6
  54. package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js.map +1 -1
  55. package/.next/server/chunks/ssr/packages_web_src_components_ui_dropdown-menu_tsx_5a66d33b._.js +3 -0
  56. package/.next/server/chunks/ssr/packages_web_src_components_ui_dropdown-menu_tsx_5a66d33b._.js.map +1 -0
  57. package/.next/server/middleware-build-manifest.js +2 -2
  58. package/.next/server/next-font-manifest.js +1 -1
  59. package/.next/server/next-font-manifest.json +0 -4
  60. package/.next/server/pages/500.html +2 -2
  61. package/.next/server/server-reference-manifest.js +1 -1
  62. package/.next/server/server-reference-manifest.json +185 -170
  63. package/.next/static/chunks/4cd756ce08329aa0.js +1 -0
  64. package/.next/static/chunks/9413ec2d2c03a23f.js +1 -0
  65. package/.next/static/chunks/a085c02be6d1c0fa.js +1 -0
  66. package/.next/static/chunks/{22122fa69a524cdf.js → b7c7c49bc91f0883.js} +1 -1
  67. package/.next/static/chunks/cac98b3aeb18c389.css +3 -0
  68. package/.next/static/chunks/cb2a4b461d8e3581.js +1 -0
  69. package/.next/static/chunks/cf77de8f2f364dfe.js +3 -0
  70. package/.next/static/chunks/e5fe8b0871852c0c.js +1 -0
  71. package/.next/static/chunks/e815e2c1cb31fa75.css +1 -0
  72. package/.next/static/chunks/eca703efa10d6b73.js +1 -0
  73. package/.next/static/chunks/f6b74fa7a23429f6.js +14 -0
  74. package/.next/static/chunks/fa8d0e694695293d.js +1 -0
  75. package/.next/static/chunks/turbopack-3e37ac8ac11d9492.js +3 -0
  76. package/.next/static/chunks/{turbopack-453c53e2accaa935.js → turbopack-c46db9a9d9103ea9.js} +1 -1
  77. package/.next/trace +1 -1
  78. package/.next/trace-build +1 -1
  79. package/.next/types/routes.d.ts +1 -2
  80. package/.next/types/validator.ts +0 -9
  81. package/package.json +10 -5
  82. package/.next/server/app/run/[runId]/streams/[streamId]/page/app-paths-manifest.json +0 -3
  83. package/.next/server/app/run/[runId]/streams/[streamId]/page/build-manifest.json +0 -17
  84. package/.next/server/app/run/[runId]/streams/[streamId]/page/next-font-manifest.json +0 -11
  85. package/.next/server/app/run/[runId]/streams/[streamId]/page/react-loadable-manifest.json +0 -1
  86. package/.next/server/app/run/[runId]/streams/[streamId]/page/server-reference-manifest.json +0 -200
  87. package/.next/server/app/run/[runId]/streams/[streamId]/page.js +0 -22
  88. package/.next/server/app/run/[runId]/streams/[streamId]/page.js.map +0 -5
  89. package/.next/server/app/run/[runId]/streams/[streamId]/page.js.nft.json +0 -1
  90. package/.next/server/app/run/[runId]/streams/[streamId]/page_client-reference-manifest.js +0 -2
  91. package/.next/server/chunks/ssr/[root-of-the-server]__072d3021._.js +0 -70
  92. package/.next/server/chunks/ssr/[root-of-the-server]__072d3021._.js.map +0 -1
  93. package/.next/server/chunks/ssr/[root-of-the-server]__0e8b8fa9._.js +0 -3
  94. package/.next/server/chunks/ssr/[root-of-the-server]__0e8b8fa9._.js.map +0 -1
  95. package/.next/server/chunks/ssr/[root-of-the-server]__6e56cd25._.js +0 -4
  96. package/.next/server/chunks/ssr/[root-of-the-server]__6e56cd25._.js.map +0 -1
  97. package/.next/server/chunks/ssr/[root-of-the-server]__cd719c14._.js +0 -4
  98. package/.next/server/chunks/ssr/[root-of-the-server]__cd719c14._.js.map +0 -1
  99. package/.next/server/chunks/ssr/[root-of-the-server]__d4909843._.js +0 -4
  100. package/.next/server/chunks/ssr/[root-of-the-server]__d4909843._.js.map +0 -1
  101. package/.next/server/chunks/ssr/[root-of-the-server]__ef8720b3._.js.map +0 -1
  102. package/.next/server/chunks/ssr/[root-of-the-server]__fb5d0d13._.js +0 -4
  103. package/.next/server/chunks/ssr/[root-of-the-server]__fb5d0d13._.js.map +0 -1
  104. package/.next/server/chunks/ssr/_631c662c._.js +0 -4
  105. package/.next/server/chunks/ssr/_631c662c._.js.map +0 -1
  106. package/.next/server/chunks/ssr/_65c9c827._.js +0 -6
  107. package/.next/server/chunks/ssr/_65c9c827._.js.map +0 -1
  108. package/.next/server/chunks/ssr/_e9cd0664._.js +0 -3
  109. package/.next/server/chunks/ssr/_e9cd0664._.js.map +0 -1
  110. package/.next/server/chunks/ssr/packages_30c0733e._.js +0 -4
  111. package/.next/server/chunks/ssr/packages_30c0733e._.js.map +0 -1
  112. package/.next/server/chunks/ssr/packages_906ab70b._.js +0 -3
  113. package/.next/server/chunks/ssr/packages_906ab70b._.js.map +0 -1
  114. package/.next/server/chunks/ssr/packages_9f053af5._.js +0 -3
  115. package/.next/server/chunks/ssr/packages_9f053af5._.js.map +0 -1
  116. package/.next/server/chunks/ssr/packages_web-shared_dist_trace-viewer_worker_f98ba72c.js +0 -3
  117. package/.next/server/chunks/ssr/packages_web-shared_dist_trace-viewer_worker_f98ba72c.js.map +0 -1
  118. package/.next/server/chunks/ssr/packages_web_src_app_layout-client_tsx_7f30673c._.js +0 -3
  119. package/.next/server/chunks/ssr/packages_web_src_app_layout-client_tsx_7f30673c._.js.map +0 -1
  120. package/.next/server/chunks/ssr/packages_web_src_components_5b4f203e._.js +0 -3
  121. package/.next/server/chunks/ssr/packages_web_src_components_5b4f203e._.js.map +0 -1
  122. package/.next/server/chunks/ssr/packages_web_src_components_d1065930._.js +0 -3
  123. package/.next/server/chunks/ssr/packages_web_src_components_d1065930._.js.map +0 -1
  124. package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js +0 -3
  125. package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js.map +0 -1
  126. package/.next/static/chunks/125dc6396d8c7614.js +0 -1
  127. package/.next/static/chunks/12738c56605f94bd.js +0 -1
  128. package/.next/static/chunks/1b2c32764beea8c6.js +0 -1
  129. package/.next/static/chunks/2677e69032fce46e.js +0 -1
  130. package/.next/static/chunks/33539167f963017b.js +0 -14
  131. package/.next/static/chunks/46d8d17fb5e804aa.js +0 -1
  132. package/.next/static/chunks/5bfebbf730bb3cdc.js +0 -1
  133. package/.next/static/chunks/7d15ec806ba18b85.css +0 -3
  134. package/.next/static/chunks/8f0576d510d06c4c.js +0 -1
  135. package/.next/static/chunks/971151b2a72b5f24.css +0 -1
  136. package/.next/static/chunks/d5f104e0113bd49b.js +0 -2
  137. package/.next/static/chunks/e5b69a828ea58204.js +0 -1
  138. package/.next/static/chunks/turbopack-511fe75cd918d1a5.js +0 -3
  139. /package/.next/static/{dqfnmYEq_BK3Cb_-i5jnc → 8L07V3BgO4DySkjO3mfTV}/_buildManifest.js +0 -0
  140. /package/.next/static/{dqfnmYEq_BK3Cb_-i5jnc → 8L07V3BgO4DySkjO3mfTV}/_clientMiddlewareManifest.json +0 -0
  141. /package/.next/static/{dqfnmYEq_BK3Cb_-i5jnc → 8L07V3BgO4DySkjO3mfTV}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/constructNow.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/formatDistanceToNowStrict.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/formatRelative.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/differenceInCalendarDays.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/startOfDay.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/startOfYear.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/getDayOfYear.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/startOfWeek.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/startOfISOWeek.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/getISOWeekYear.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/startOfISOWeekYear.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/getISOWeek.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/getWeekYear.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/startOfWeekYear.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/getWeek.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/_lib/addLeadingZeros.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/_lib/format/lightFormatters.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/_lib/format/formatters.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/_lib/format/longFormatters.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/_lib/protectedTokens.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/isDate.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/isValid.js","../../../../../../node_modules/.pnpm/date-fns%404.1.0/node_modules/date-fns/format.js","../../../../../../packages/web/src/components/display-utils/relative-time.tsx","../../../../../../packages/web/src/components/ui/skeleton.tsx","../../../../../../packages/web/src/components/display-utils/status-badge.tsx"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name constructNow\n * @category Generic Helpers\n * @summary Constructs a new current date using the passed value constructor.\n * @pure false\n *\n * @description\n * The function constructs a new current date using the constructor from\n * the reference date. It helps to build generic functions that accept date\n * extensions and use the current date.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @param date - The reference date to take constructor from\n *\n * @returns Current date initialized using the given date constructor\n *\n * @example\n * import { constructNow, isSameDay } from 'date-fns'\n *\n * function isToday<DateType extends Date>(\n * date: DateArg<DateType>,\n * ): boolean {\n * // If we were to use `new Date()` directly, the function would behave\n * // differently in different timezones and return false for the same date.\n * return isSameDay(date, constructNow(date));\n * }\n */\nexport function constructNow(date) {\n return constructFrom(date, Date.now());\n}\n\n// Fallback for modularized imports:\nexport default constructNow;\n","import { constructNow } from \"./constructNow.js\";\n\nimport { formatDistanceStrict } from \"./formatDistanceStrict.js\";\n\n/**\n * The {@link formatDistanceToNowStrict} function options.\n */\n\n/**\n * @name formatDistanceToNowStrict\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNowStrict(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNowStrict(\n * new Date(2015, 0, 1, 0, 0, 15)\n * )\n * //=> '15 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNowStrict(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in 1 year'\n *\n * @example\n * // If today is 28 January 2015,\n * // what is the distance to 1 January 2015, in months, rounded up??\n * const result = formatDistanceToNowStrict(new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNowStrict(\n * new Date(2016, 0, 1),\n * {locale: eoLocale}\n * )\n * //=> '1 jaro'\n */\nexport function formatDistanceToNowStrict(date, options) {\n return formatDistanceStrict(date, constructNow(date), options);\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceToNowStrict;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { format } from \"./format.js\";\n\n/**\n * The {@link formatRelative} function options.\n */\n\n/**\n * @name formatRelative\n * @category Common Helpers\n * @summary Represent the date in words relative to the given base date.\n *\n * @description\n * Represent the date in words relative to the given base date.\n *\n * | Distance to the base date | Result |\n * |---------------------------|---------------------------|\n * | Previous 6 days | last Sunday at 04:30 AM |\n * | Last day | yesterday at 04:30 AM |\n * | Same day | today at 04:30 AM |\n * | Next day | tomorrow at 04:30 AM |\n * | Next 6 days | Sunday at 04:30 AM |\n * | Other | 12/31/2017 |\n *\n * @param date - The date to format\n * @param baseDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The date in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws `options.locale` must contain `formatRelative` property\n *\n * @example\n * // Represent the date of 6 days ago in words relative to the given base date. In this example, today is Wednesday\n * const result = formatRelative(subDays(new Date(), 6), new Date())\n * //=> \"last Thursday at 12:45 AM\"\n */\nexport function formatRelative(date, baseDate, options) {\n const [date_, baseDate_] = normalizeDates(options?.in, date, baseDate);\n\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const diff = differenceInCalendarDays(date_, baseDate_);\n\n if (isNaN(diff)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let token;\n if (diff < -6) {\n token = \"other\";\n } else if (diff < -1) {\n token = \"lastWeek\";\n } else if (diff < 0) {\n token = \"yesterday\";\n } else if (diff < 1) {\n token = \"today\";\n } else if (diff < 2) {\n token = \"tomorrow\";\n } else if (diff < 7) {\n token = \"nextWeek\";\n } else {\n token = \"other\";\n }\n\n const formatStr = locale.formatRelative(token, date_, baseDate_, {\n locale,\n weekStartsOn,\n });\n return format(date_, formatStr, { locale, weekStartsOn });\n}\n\n// Fallback for modularized imports:\nexport default formatRelative;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","'use client';\n\nimport { formatDistanceToNowStrict, formatRelative } from 'date-fns';\nimport { useEffect, useState } from 'react';\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@/components/ui/tooltip';\n\ninterface RelativeTimeProps {\n date: Date | string;\n className?: string;\n type?: 'relative' | 'distance';\n}\n\nexport function RelativeTime({\n date,\n className = '',\n type = 'relative',\n}: RelativeTimeProps) {\n const [, setNow] = useState(Date.now());\n if (typeof date === 'string') {\n date = new Date(date);\n }\n const relativeTime =\n type === 'relative'\n ? formatRelative(new Date(date), new Date())\n : formatDistanceToNowStrict(new Date(date), { addSuffix: true });\n const absoluteTime = new Date(date).toLocaleString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n timeZoneName: 'short',\n });\n\n useEffect(() => {\n const interval = setInterval(() => {\n setNow(Date.now());\n }, 1000);\n return () => clearInterval(interval);\n }, []);\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className={`${className} cursor-help border-b border-dotted`}>\n {relativeTime}\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <p>{absoluteTime}</p>\n </TooltipContent>\n </Tooltip>\n );\n}\n","import { cn } from '@/lib/utils';\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn('animate-pulse rounded-md bg-muted', className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","'use client';\n\nimport type { Step, WorkflowRun } from '@workflow/world';\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@/components/ui/tooltip';\n\ninterface StatusBadgeProps {\n status: WorkflowRun['status'] | Step['status'];\n context?: { error?: unknown };\n className?: string;\n}\n\nexport function StatusBadge({ status, context, className }: StatusBadgeProps) {\n const getStatusClasses = () => {\n switch (status) {\n case 'running':\n return 'text-blue-600 dark:text-blue-400';\n case 'completed':\n return 'text-green-600 dark:text-green-400';\n case 'failed':\n return 'text-red-600 dark:text-red-400';\n case 'cancelled':\n return 'text-yellow-600 dark:text-yellow-400';\n case 'pending':\n return 'text-gray-600 dark:text-gray-400';\n case 'paused':\n return 'text-orange-600 dark:text-orange-400';\n default:\n return 'text-gray-500 dark:text-gray-400';\n }\n };\n\n // Show error tooltip if status is failed and error exists\n if (status === 'failed' && context?.error) {\n const errorMessage =\n typeof context.error === 'string'\n ? context.error\n : context.error instanceof Error\n ? context.error.message\n : JSON.stringify(context.error);\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span\n className={`${className} border-b border-dotted cursor-help ${getStatusClasses()}`}\n >\n {status}\n </span>\n </TooltipTrigger>\n <TooltipContent className=\"max-w-md\">\n <p className=\"text-xs whitespace-pre-wrap break-words\">\n {errorMessage}\n </p>\n </TooltipContent>\n </Tooltip>\n );\n }\n\n return <span className={`${className} ${getStatusClasses()}`}>{status}</span>;\n}\n"],"names":[],"mappings":"wDAAA,EAAA,EAAA,CAAA,CAAA,OCEA,EAAA,EAAA,CAAA,CAAA,OCFA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCFA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OCFA,EAAA,EAAA,CAAA,CAAA,OA4BO,SAAS,EAAW,CAAI,CAAE,CAAO,EACtC,IAAM,EAAQ,CAAA,EAAA,EAAA,MAAA,AAAM,EAAC,EAAM,GAAS,IAEpC,OADA,EAAM,QAAQ,CAAC,EAAG,EAA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C,EAAE,IAAA,CAAoB,UAAG,GACjE","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
@@ -1,3 +0,0 @@
1
- module.exports=[75196,a=>{"use strict";let b;var c=a.i(81156),d=a.i(87286),e=a.i(36393);function f(a,[b,c]){return Math.min(c,Math.max(b,a))}var g=a.i(59653),h=a.i(33702),i=a.i(40861),j=a.i(23776),k=new WeakMap;function l(a,b){var c,d;let e,f,g;if("at"in Array.prototype)return Array.prototype.at.call(a,b);let h=(c=a,d=b,e=c.length,(g=(f=m(d))>=0?f:e+f)<0||g>=e?-1:g);return -1===h?void 0:a[h]}function m(a){return a!=a||0===a?0:Math.trunc(a)}(class a extends Map{#a;constructor(a){super(a),this.#a=[...super.keys()],k.set(this,!0)}set(a,b){return k.get(this)&&(this.has(a)?this.#a[this.#a.indexOf(a)]=a:this.#a.push(a)),super.set(a,b),this}insert(a,b,c){let d,e=this.has(b),f=this.#a.length,g=m(a),h=g>=0?g:f+g,i=h<0||h>=f?-1:h;if(i===this.size||e&&i===this.size-1||-1===i)return this.set(b,c),this;let j=this.size+ +!e;g<0&&h++;let k=[...this.#a],l=!1;for(let a=h;a<j;a++)if(h===a){let f=k[a];k[a]===b&&(f=k[a+1]),e&&this.delete(b),d=this.get(f),this.set(b,c)}else{l||k[a-1]!==b||(l=!0);let c=k[l?a:a-1],e=d;d=this.get(c),this.delete(c),this.set(c,e)}return this}with(b,c,d){let e=new a(this);return e.insert(b,c,d),e}before(a){let b=this.#a.indexOf(a)-1;if(!(b<0))return this.entryAt(b)}setBefore(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d,b,c)}after(a){let b=this.#a.indexOf(a);if(-1!==(b=-1===b||b===this.size-1?-1:b+1))return this.entryAt(b)}setAfter(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d+1,b,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#a=[],super.clear()}delete(a){let b=super.delete(a);return b&&this.#a.splice(this.#a.indexOf(a),1),b}deleteAt(a){let b=this.keyAt(a);return void 0!==b&&this.delete(b)}at(a){let b=l(this.#a,a);if(void 0!==b)return this.get(b)}entryAt(a){let b=l(this.#a,a);if(void 0!==b)return[b,this.get(b)]}indexOf(a){return this.#a.indexOf(a)}keyAt(a){return l(this.#a,a)}from(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.at(d)}keyFrom(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.keyAt(d)}find(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return d;c++}}findIndex(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return c;c++}return -1}filter(b,c){let d=[],e=0;for(let a of this)Reflect.apply(b,c,[a,e,this])&&d.push(a),e++;return new a(d)}map(b,c){let d=[],e=0;for(let a of this)d.push([a[0],Reflect.apply(b,c,[a,e,this])]),e++;return new a(d)}reduce(...a){let[b,c]=a,d=0,e=c??this.at(0);for(let c of this)e=0===d&&1===a.length?c:Reflect.apply(b,this,[e,c,d,this]),d++;return e}reduceRight(...a){let[b,c]=a,d=c??this.at(-1);for(let c=this.size-1;c>=0;c--){let e=this.at(c);d=c===this.size-1&&1===a.length?e:Reflect.apply(b,this,[d,e,c,this])}return d}toSorted(b){return new a([...this.entries()].sort(b))}toReversed(){let b=new a;for(let a=this.size-1;a>=0;a--){let c=this.keyAt(a),d=this.get(c);b.set(c,d)}return b}toSpliced(...b){let c=[...this.entries()];return c.splice(...b),new a(c)}slice(b,c){let d=new a,e=this.size-1;if(void 0===b)return d;b<0&&(b+=this.size),void 0!==c&&c>0&&(e=c-1);for(let a=b;a<=e;a++){let b=this.keyAt(a),c=this.get(b);d.set(b,c)}return d}every(a,b){let c=0;for(let d of this){if(!Reflect.apply(a,b,[d,c,this]))return!1;c++}return!0}some(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return!0;c++}return!1}});var n=d.createContext(void 0),o=a.i(43343),p=0;function q(){let a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}var r=a.i(18243),s=a.i(93352),t="focusScope.autoFocusOnMount",u="focusScope.autoFocusOnUnmount",v={bubbles:!1,cancelable:!0},w=d.forwardRef((a,b)=>{let{loop:e=!1,trapped:f=!1,onMountAutoFocus:g,onUnmountAutoFocus:h,...j}=a,[k,l]=d.useState(null),m=(0,s.useCallbackRef)(g),n=(0,s.useCallbackRef)(h),o=d.useRef(null),p=(0,i.useComposedRefs)(b,a=>l(a)),q=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(f){let a=function(a){if(q.paused||!k)return;let b=a.target;k.contains(b)?o.current=b:z(o.current,{select:!0})},b=function(a){if(q.paused||!k)return;let b=a.relatedTarget;null!==b&&(k.contains(b)||z(o.current,{select:!0}))};document.addEventListener("focusin",a),document.addEventListener("focusout",b);let c=new MutationObserver(function(a){if(document.activeElement===document.body)for(let b of a)b.removedNodes.length>0&&z(k)});return k&&c.observe(k,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",b),c.disconnect()}}},[f,k,q.paused]),d.useEffect(()=>{if(k){A.add(q);let a=document.activeElement;if(!k.contains(a)){let b=new CustomEvent(t,v);k.addEventListener(t,m),k.dispatchEvent(b),b.defaultPrevented||(function(a,{select:b=!1}={}){let c=document.activeElement;for(let d of a)if(z(d,{select:b}),document.activeElement!==c)return}(x(k).filter(a=>"A"!==a.tagName),{select:!0}),document.activeElement===a&&z(k))}return()=>{k.removeEventListener(t,m),setTimeout(()=>{let b=new CustomEvent(u,v);k.addEventListener(u,n),k.dispatchEvent(b),b.defaultPrevented||z(a??document.body,{select:!0}),k.removeEventListener(u,n),A.remove(q)},0)}}},[k,m,n,q]);let w=d.useCallback(a=>{if(!e&&!f||q.paused)return;let b="Tab"===a.key&&!a.altKey&&!a.ctrlKey&&!a.metaKey,c=document.activeElement;if(b&&c){var d;let b,f=a.currentTarget,[g,h]=[y(b=x(d=f),d),y(b.reverse(),d)];g&&h?a.shiftKey||c!==h?a.shiftKey&&c===g&&(a.preventDefault(),e&&z(h,{select:!0})):(a.preventDefault(),e&&z(g,{select:!0})):c===f&&a.preventDefault()}},[e,f,q.paused]);return(0,c.jsx)(r.Primitive.div,{tabIndex:-1,...j,ref:p,onKeyDown:w})});function x(a){let b=[],c=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{let b="INPUT"===a.tagName&&"hidden"===a.type;return a.disabled||a.hidden||b?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;c.nextNode();)b.push(c.currentNode);return b}function y(a,b){for(let c of a)if(!function(a,{upTo:b}){if("hidden"===getComputedStyle(a).visibility)return!0;for(;a&&(void 0===b||a!==b);){if("none"===getComputedStyle(a).display)return!0;a=a.parentElement}return!1}(c,{upTo:b}))return c}function z(a,{select:b=!1}={}){if(a&&a.focus){var c;let d=document.activeElement;a.focus({preventScroll:!0}),a!==d&&(c=a)instanceof HTMLInputElement&&"select"in c&&b&&a.select()}}w.displayName="FocusScope";var A=(b=[],{add(a){let c=b[0];a!==c&&c?.pause(),(b=B(b,a)).unshift(a)},remove(a){b=B(b,a),b[0]?.resume()}});function B(a,b){let c=[...a],d=c.indexOf(b);return -1!==d&&c.splice(d,1),c}var C=a.i(92534),D=a.i(48968),E=a.i(49033),F=a.i(84295),G=a.i(77482),H=a.i(21777),I=a.i(16164),J=a.i(13358),K=[" ","Enter","ArrowUp","ArrowDown"],L=[" ","Enter"],M="Select",[N,O,P]=function(a){let b=a+"CollectionProvider",[e,f]=(0,h.createContextScope)(b),[g,k]=e(b,{collectionRef:{current:null},itemMap:new Map}),l=a=>{let{scope:b,children:e}=a,f=d.default.useRef(null),h=d.default.useRef(new Map).current;return(0,c.jsx)(g,{scope:b,itemMap:h,collectionRef:f,children:e})};l.displayName=b;let m=a+"CollectionSlot",n=(0,j.createSlot)(m),o=d.default.forwardRef((a,b)=>{let{scope:d,children:e}=a,f=k(m,d),g=(0,i.useComposedRefs)(b,f.collectionRef);return(0,c.jsx)(n,{ref:g,children:e})});o.displayName=m;let p=a+"CollectionItemSlot",q="data-radix-collection-item",r=(0,j.createSlot)(p),s=d.default.forwardRef((a,b)=>{let{scope:e,children:f,...g}=a,h=d.default.useRef(null),j=(0,i.useComposedRefs)(b,h),l=k(p,e);return d.default.useEffect(()=>(l.itemMap.set(h,{ref:h,...g}),()=>void l.itemMap.delete(h))),(0,c.jsx)(r,{...{[q]:""},ref:j,children:f})});return s.displayName=p,[{Provider:l,Slot:o,ItemSlot:s},function(b){let c=k(a+"CollectionConsumer",b);return d.default.useCallback(()=>{let a=c.collectionRef.current;if(!a)return[];let b=Array.from(a.querySelectorAll(`[${q}]`));return Array.from(c.itemMap.values()).sort((a,c)=>b.indexOf(a.ref.current)-b.indexOf(c.ref.current))},[c.collectionRef,c.itemMap])},f]}(M),[Q,R]=(0,h.createContextScope)(M,[P,D.createPopperScope]),S=(0,D.createPopperScope)(),[T,U]=Q(M),[V,W]=Q(M),X=a=>{let b,{__scopeSelect:e,children:f,open:g,defaultOpen:h,onOpenChange:i,value:j,defaultValue:k,onValueChange:l,dir:m,name:o,autoComplete:p,disabled:q,required:r,form:s}=a,t=S(e),[u,v]=d.useState(null),[w,x]=d.useState(null),[y,z]=d.useState(!1),A=(b=d.useContext(n),m||b||"ltr"),[B,E]=(0,F.useControllableState)({prop:g,defaultProp:h??!1,onChange:i,caller:M}),[G,H]=(0,F.useControllableState)({prop:j,defaultProp:k,onChange:l,caller:M}),I=d.useRef(null),J=!u||s||!!u.closest("form"),[K,L]=d.useState(new Set),O=Array.from(K).map(a=>a.props.value).join(";");return(0,c.jsx)(D.Root,{...t,children:(0,c.jsxs)(T,{required:r,scope:e,trigger:u,onTriggerChange:v,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:y,onValueNodeHasChildrenChange:z,contentId:(0,C.useId)(),value:G,onValueChange:H,open:B,onOpenChange:E,dir:A,triggerPointerDownPosRef:I,disabled:q,children:[(0,c.jsx)(N.Provider,{scope:e,children:(0,c.jsx)(V,{scope:a.__scopeSelect,onNativeOptionAdd:d.useCallback(a=>{L(b=>new Set(b).add(a))},[]),onNativeOptionRemove:d.useCallback(a=>{L(b=>{let c=new Set(b);return c.delete(a),c})},[]),children:f})}),J?(0,c.jsxs)(aI,{"aria-hidden":!0,required:r,tabIndex:-1,name:o,autoComplete:p,value:G,onChange:a=>H(a.target.value),disabled:q,form:s,children:[void 0===G?(0,c.jsx)("option",{value:""}):null,Array.from(K)]},O):null]})})};X.displayName=M;var Y="SelectTrigger",Z=d.forwardRef((a,b)=>{let{__scopeSelect:e,disabled:f=!1,...h}=a,j=S(e),k=U(Y,e),l=k.disabled||f,m=(0,i.useComposedRefs)(b,k.onTriggerChange),n=O(e),o=d.useRef("touch"),[p,q,s]=aK(a=>{let b=n().filter(a=>!a.disabled),c=b.find(a=>a.value===k.value),d=aL(b,a,c);void 0!==d&&k.onValueChange(d.value)}),t=a=>{l||(k.onOpenChange(!0),s()),a&&(k.triggerPointerDownPosRef.current={x:Math.round(a.pageX),y:Math.round(a.pageY)})};return(0,c.jsx)(D.Anchor,{asChild:!0,...j,children:(0,c.jsx)(r.Primitive.button,{type:"button",role:"combobox","aria-controls":k.contentId,"aria-expanded":k.open,"aria-required":k.required,"aria-autocomplete":"none",dir:k.dir,"data-state":k.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":aJ(k.value)?"":void 0,...h,ref:m,onClick:(0,g.composeEventHandlers)(h.onClick,a=>{a.currentTarget.focus(),"mouse"!==o.current&&t(a)}),onPointerDown:(0,g.composeEventHandlers)(h.onPointerDown,a=>{o.current=a.pointerType;let b=a.target;b.hasPointerCapture(a.pointerId)&&b.releasePointerCapture(a.pointerId),0===a.button&&!1===a.ctrlKey&&"mouse"===a.pointerType&&(t(a),a.preventDefault())}),onKeyDown:(0,g.composeEventHandlers)(h.onKeyDown,a=>{let b=""!==p.current;a.ctrlKey||a.altKey||a.metaKey||1!==a.key.length||q(a.key),(!b||" "!==a.key)&&K.includes(a.key)&&(t(),a.preventDefault())})})})});Z.displayName=Y;var $="SelectValue",_=d.forwardRef((a,b)=>{let{__scopeSelect:d,className:e,style:f,children:g,placeholder:h="",...j}=a,k=U($,d),{onValueNodeHasChildrenChange:l}=k,m=void 0!==g,n=(0,i.useComposedRefs)(b,k.onValueNodeChange);return(0,G.useLayoutEffect)(()=>{l(m)},[l,m]),(0,c.jsx)(r.Primitive.span,{...j,ref:n,style:{pointerEvents:"none"},children:aJ(k.value)?(0,c.jsx)(c.Fragment,{children:h}):g})});_.displayName=$;var aa=d.forwardRef((a,b)=>{let{__scopeSelect:d,children:e,...f}=a;return(0,c.jsx)(r.Primitive.span,{"aria-hidden":!0,...f,ref:b,children:e||"▼"})});aa.displayName="SelectIcon";var ab=a=>(0,c.jsx)(E.Portal,{asChild:!0,...a});ab.displayName="SelectPortal";var ac="SelectContent",ad=d.forwardRef((a,b)=>{let f=U(ac,a.__scopeSelect),[g,h]=d.useState();return((0,G.useLayoutEffect)(()=>{h(new DocumentFragment)},[]),f.open)?(0,c.jsx)(ah,{...a,ref:b}):g?e.createPortal((0,c.jsx)(ae,{scope:a.__scopeSelect,children:(0,c.jsx)(N.Slot,{scope:a.__scopeSelect,children:(0,c.jsx)("div",{children:a.children})})}),g):null});ad.displayName=ac;var[ae,af]=Q(ac),ag=(0,j.createSlot)("SelectContent.RemoveScroll"),ah=d.forwardRef((a,b)=>{let{__scopeSelect:e,position:f="item-aligned",onCloseAutoFocus:h,onEscapeKeyDown:j,onPointerDownOutside:k,side:l,sideOffset:m,align:n,alignOffset:r,arrowPadding:s,collisionBoundary:t,collisionPadding:u,sticky:v,hideWhenDetached:x,avoidCollisions:y,...z}=a,A=U(ac,e),[B,C]=d.useState(null),[D,E]=d.useState(null),F=(0,i.useComposedRefs)(b,a=>C(a)),[G,H]=d.useState(null),[K,L]=d.useState(null),M=O(e),[N,P]=d.useState(!1),Q=d.useRef(!1);d.useEffect(()=>{if(B)return(0,I.hideOthers)(B)},[B]),d.useEffect(()=>{let a=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",a[0]??q()),document.body.insertAdjacentElement("beforeend",a[1]??q()),p++,()=>{1===p&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),p--}},[]);let R=d.useCallback(a=>{let[b,...c]=M().map(a=>a.ref.current),[d]=c.slice(-1),e=document.activeElement;for(let c of a)if(c===e||(c?.scrollIntoView({block:"nearest"}),c===b&&D&&(D.scrollTop=0),c===d&&D&&(D.scrollTop=D.scrollHeight),c?.focus(),document.activeElement!==e))return},[M,D]),S=d.useCallback(()=>R([G,B]),[R,G,B]);d.useEffect(()=>{N&&S()},[N,S]);let{onOpenChange:T,triggerPointerDownPosRef:V}=A;d.useEffect(()=>{if(B){let a={x:0,y:0},b=b=>{a={x:Math.abs(Math.round(b.pageX)-(V.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(V.current?.y??0))}},c=c=>{a.x<=10&&a.y<=10?c.preventDefault():B.contains(c.target)||T(!1),document.removeEventListener("pointermove",b),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",b),document.addEventListener("pointerup",c,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",c,{capture:!0})}}},[B,T,V]),d.useEffect(()=>{let a=()=>T(!1);return window.addEventListener("blur",a),window.addEventListener("resize",a),()=>{window.removeEventListener("blur",a),window.removeEventListener("resize",a)}},[T]);let[W,X]=aK(a=>{let b=M().filter(a=>!a.disabled),c=b.find(a=>a.ref.current===document.activeElement),d=aL(b,a,c);d&&setTimeout(()=>d.ref.current.focus())}),Y=d.useCallback((a,b,c)=>{let d=!Q.current&&!c;(void 0!==A.value&&A.value===b||d)&&(H(a),d&&(Q.current=!0))},[A.value]),Z=d.useCallback(()=>B?.focus(),[B]),$=d.useCallback((a,b,c)=>{let d=!Q.current&&!c;(void 0!==A.value&&A.value===b||d)&&L(a)},[A.value]),_="popper"===f?aj:ai,aa=_===aj?{side:l,sideOffset:m,align:n,alignOffset:r,arrowPadding:s,collisionBoundary:t,collisionPadding:u,sticky:v,hideWhenDetached:x,avoidCollisions:y}:{};return(0,c.jsx)(ae,{scope:e,content:B,viewport:D,onViewportChange:E,itemRefCallback:Y,selectedItem:G,onItemLeave:Z,itemTextRefCallback:$,focusSelectedItem:S,selectedItemText:K,position:f,isPositioned:N,searchRef:W,children:(0,c.jsx)(J.RemoveScroll,{as:ag,allowPinchZoom:!0,children:(0,c.jsx)(w,{asChild:!0,trapped:A.open,onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:(0,g.composeEventHandlers)(h,a=>{A.trigger?.focus({preventScroll:!0}),a.preventDefault()}),children:(0,c.jsx)(o.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:j,onPointerDownOutside:k,onFocusOutside:a=>a.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:(0,c.jsx)(_,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:a=>a.preventDefault(),...z,...aa,onPlaced:()=>P(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...z.style},onKeyDown:(0,g.composeEventHandlers)(z.onKeyDown,a=>{let b=a.ctrlKey||a.altKey||a.metaKey;if("Tab"===a.key&&a.preventDefault(),b||1!==a.key.length||X(a.key),["ArrowUp","ArrowDown","Home","End"].includes(a.key)){let b=M().filter(a=>!a.disabled).map(a=>a.ref.current);if(["ArrowUp","End"].includes(a.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(a.key)){let c=a.target,d=b.indexOf(c);b=b.slice(d+1)}setTimeout(()=>R(b)),a.preventDefault()}})})})})})})});ah.displayName="SelectContentImpl";var ai=d.forwardRef((a,b)=>{let{__scopeSelect:e,onPlaced:g,...h}=a,j=U(ac,e),k=af(ac,e),[l,m]=d.useState(null),[n,o]=d.useState(null),p=(0,i.useComposedRefs)(b,a=>o(a)),q=O(e),s=d.useRef(!1),t=d.useRef(!0),{viewport:u,selectedItem:v,selectedItemText:w,focusSelectedItem:x}=k,y=d.useCallback(()=>{if(j.trigger&&j.valueNode&&l&&n&&u&&v&&w){let a=j.trigger.getBoundingClientRect(),b=n.getBoundingClientRect(),c=j.valueNode.getBoundingClientRect(),d=w.getBoundingClientRect();if("rtl"!==j.dir){let e=d.left-b.left,g=c.left-e,h=a.left-g,i=a.width+h,j=Math.max(i,b.width),k=f(g,[10,Math.max(10,window.innerWidth-10-j)]);l.style.minWidth=i+"px",l.style.left=k+"px"}else{let e=b.right-d.right,g=window.innerWidth-c.right-e,h=window.innerWidth-a.right-g,i=a.width+h,j=Math.max(i,b.width),k=f(g,[10,Math.max(10,window.innerWidth-10-j)]);l.style.minWidth=i+"px",l.style.right=k+"px"}let e=q(),h=window.innerHeight-20,i=u.scrollHeight,k=window.getComputedStyle(n),m=parseInt(k.borderTopWidth,10),o=parseInt(k.paddingTop,10),p=parseInt(k.borderBottomWidth,10),r=m+o+i+parseInt(k.paddingBottom,10)+p,t=Math.min(5*v.offsetHeight,r),x=window.getComputedStyle(u),y=parseInt(x.paddingTop,10),z=parseInt(x.paddingBottom,10),A=a.top+a.height/2-10,B=v.offsetHeight/2,C=m+o+(v.offsetTop+B);if(C<=A){let a=e.length>0&&v===e[e.length-1].ref.current;l.style.bottom="0px";let b=Math.max(h-A,B+(a?z:0)+(n.clientHeight-u.offsetTop-u.offsetHeight)+p);l.style.height=C+b+"px"}else{let a=e.length>0&&v===e[0].ref.current;l.style.top="0px";let b=Math.max(A,m+u.offsetTop+(a?y:0)+B);l.style.height=b+(r-C)+"px",u.scrollTop=C-A+u.offsetTop}l.style.margin="10px 0",l.style.minHeight=t+"px",l.style.maxHeight=h+"px",g?.(),requestAnimationFrame(()=>s.current=!0)}},[q,j.trigger,j.valueNode,l,n,u,v,w,j.dir,g]);(0,G.useLayoutEffect)(()=>y(),[y]);let[z,A]=d.useState();(0,G.useLayoutEffect)(()=>{n&&A(window.getComputedStyle(n).zIndex)},[n]);let B=d.useCallback(a=>{a&&!0===t.current&&(y(),x?.(),t.current=!1)},[y,x]);return(0,c.jsx)(ak,{scope:e,contentWrapper:l,shouldExpandOnScrollRef:s,onScrollButtonChange:B,children:(0,c.jsx)("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:(0,c.jsx)(r.Primitive.div,{...h,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...h.style}})})})});ai.displayName="SelectItemAlignedPosition";var aj=d.forwardRef((a,b)=>{let{__scopeSelect:d,align:e="start",collisionPadding:f=10,...g}=a,h=S(d);return(0,c.jsx)(D.Content,{...h,...g,ref:b,align:e,collisionPadding:f,style:{boxSizing:"border-box",...g.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});aj.displayName="SelectPopperPosition";var[ak,al]=Q(ac,{}),am="SelectViewport",an=d.forwardRef((a,b)=>{let{__scopeSelect:e,nonce:f,...h}=a,j=af(am,e),k=al(am,e),l=(0,i.useComposedRefs)(b,j.onViewportChange),m=d.useRef(0);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:f}),(0,c.jsx)(N.Slot,{scope:e,children:(0,c.jsx)(r.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...h,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...h.style},onScroll:(0,g.composeEventHandlers)(h.onScroll,a=>{let b=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=k;if(d?.current&&c){let a=Math.abs(m.current-b.scrollTop);if(a>0){let d=window.innerHeight-20,e=Math.max(parseFloat(c.style.minHeight),parseFloat(c.style.height));if(e<d){let f=e+a,g=Math.min(d,f),h=f-g;c.style.height=g+"px","0px"===c.style.bottom&&(b.scrollTop=h>0?h:0,c.style.justifyContent="flex-end")}}}m.current=b.scrollTop})})})]})});an.displayName=am;var ao="SelectGroup",[ap,aq]=Q(ao);d.forwardRef((a,b)=>{let{__scopeSelect:d,...e}=a,f=(0,C.useId)();return(0,c.jsx)(ap,{scope:d,id:f,children:(0,c.jsx)(r.Primitive.div,{role:"group","aria-labelledby":f,...e,ref:b})})}).displayName=ao;var ar="SelectLabel",as=d.forwardRef((a,b)=>{let{__scopeSelect:d,...e}=a,f=aq(ar,d);return(0,c.jsx)(r.Primitive.div,{id:f.id,...e,ref:b})});as.displayName=ar;var at="SelectItem",[au,av]=Q(at),aw=d.forwardRef((a,b)=>{let{__scopeSelect:e,value:f,disabled:h=!1,textValue:j,...k}=a,l=U(at,e),m=af(at,e),n=l.value===f,[o,p]=d.useState(j??""),[q,s]=d.useState(!1),t=(0,i.useComposedRefs)(b,a=>m.itemRefCallback?.(a,f,h)),u=(0,C.useId)(),v=d.useRef("touch"),w=()=>{h||(l.onValueChange(f),l.onOpenChange(!1))};if(""===f)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,c.jsx)(au,{scope:e,value:f,disabled:h,textId:u,isSelected:n,onItemTextChange:d.useCallback(a=>{p(b=>b||(a?.textContent??"").trim())},[]),children:(0,c.jsx)(N.ItemSlot,{scope:e,value:f,disabled:h,textValue:o,children:(0,c.jsx)(r.Primitive.div,{role:"option","aria-labelledby":u,"data-highlighted":q?"":void 0,"aria-selected":n&&q,"data-state":n?"checked":"unchecked","aria-disabled":h||void 0,"data-disabled":h?"":void 0,tabIndex:h?void 0:-1,...k,ref:t,onFocus:(0,g.composeEventHandlers)(k.onFocus,()=>s(!0)),onBlur:(0,g.composeEventHandlers)(k.onBlur,()=>s(!1)),onClick:(0,g.composeEventHandlers)(k.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,g.composeEventHandlers)(k.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,g.composeEventHandlers)(k.onPointerDown,a=>{v.current=a.pointerType}),onPointerMove:(0,g.composeEventHandlers)(k.onPointerMove,a=>{v.current=a.pointerType,h?m.onItemLeave?.():"mouse"===v.current&&a.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,g.composeEventHandlers)(k.onPointerLeave,a=>{a.currentTarget===document.activeElement&&m.onItemLeave?.()}),onKeyDown:(0,g.composeEventHandlers)(k.onKeyDown,a=>{(m.searchRef?.current===""||" "!==a.key)&&(L.includes(a.key)&&w()," "===a.key&&a.preventDefault())})})})})});aw.displayName=at;var ax="SelectItemText",ay=d.forwardRef((a,b)=>{let{__scopeSelect:f,className:g,style:h,...j}=a,k=U(ax,f),l=af(ax,f),m=av(ax,f),n=W(ax,f),[o,p]=d.useState(null),q=(0,i.useComposedRefs)(b,a=>p(a),m.onItemTextChange,a=>l.itemTextRefCallback?.(a,m.value,m.disabled)),s=o?.textContent,t=d.useMemo(()=>(0,c.jsx)("option",{value:m.value,disabled:m.disabled,children:s},m.value),[m.disabled,m.value,s]),{onNativeOptionAdd:u,onNativeOptionRemove:v}=n;return(0,G.useLayoutEffect)(()=>(u(t),()=>v(t)),[u,v,t]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(r.Primitive.span,{id:m.textId,...j,ref:q}),m.isSelected&&k.valueNode&&!k.valueNodeHasChildren?e.createPortal(j.children,k.valueNode):null]})});ay.displayName=ax;var az="SelectItemIndicator",aA=d.forwardRef((a,b)=>{let{__scopeSelect:d,...e}=a;return av(az,d).isSelected?(0,c.jsx)(r.Primitive.span,{"aria-hidden":!0,...e,ref:b}):null});aA.displayName=az;var aB="SelectScrollUpButton",aC=d.forwardRef((a,b)=>{let e=af(aB,a.__scopeSelect),f=al(aB,a.__scopeSelect),[g,h]=d.useState(!1),j=(0,i.useComposedRefs)(b,f.onScrollButtonChange);return(0,G.useLayoutEffect)(()=>{if(e.viewport&&e.isPositioned){let a=function(){h(b.scrollTop>0)},b=e.viewport;return a(),b.addEventListener("scroll",a),()=>b.removeEventListener("scroll",a)}},[e.viewport,e.isPositioned]),g?(0,c.jsx)(aF,{...a,ref:j,onAutoScroll:()=>{let{viewport:a,selectedItem:b}=e;a&&b&&(a.scrollTop=a.scrollTop-b.offsetHeight)}}):null});aC.displayName=aB;var aD="SelectScrollDownButton",aE=d.forwardRef((a,b)=>{let e=af(aD,a.__scopeSelect),f=al(aD,a.__scopeSelect),[g,h]=d.useState(!1),j=(0,i.useComposedRefs)(b,f.onScrollButtonChange);return(0,G.useLayoutEffect)(()=>{if(e.viewport&&e.isPositioned){let a=function(){let a=b.scrollHeight-b.clientHeight;h(Math.ceil(b.scrollTop)<a)},b=e.viewport;return a(),b.addEventListener("scroll",a),()=>b.removeEventListener("scroll",a)}},[e.viewport,e.isPositioned]),g?(0,c.jsx)(aF,{...a,ref:j,onAutoScroll:()=>{let{viewport:a,selectedItem:b}=e;a&&b&&(a.scrollTop=a.scrollTop+b.offsetHeight)}}):null});aE.displayName=aD;var aF=d.forwardRef((a,b)=>{let{__scopeSelect:e,onAutoScroll:f,...h}=a,i=af("SelectScrollButton",e),j=d.useRef(null),k=O(e),l=d.useCallback(()=>{null!==j.current&&(window.clearInterval(j.current),j.current=null)},[]);return d.useEffect(()=>()=>l(),[l]),(0,G.useLayoutEffect)(()=>{let a=k().find(a=>a.ref.current===document.activeElement);a?.ref.current?.scrollIntoView({block:"nearest"})},[k]),(0,c.jsx)(r.Primitive.div,{"aria-hidden":!0,...h,ref:b,style:{flexShrink:0,...h.style},onPointerDown:(0,g.composeEventHandlers)(h.onPointerDown,()=>{null===j.current&&(j.current=window.setInterval(f,50))}),onPointerMove:(0,g.composeEventHandlers)(h.onPointerMove,()=>{i.onItemLeave?.(),null===j.current&&(j.current=window.setInterval(f,50))}),onPointerLeave:(0,g.composeEventHandlers)(h.onPointerLeave,()=>{l()})})}),aG=d.forwardRef((a,b)=>{let{__scopeSelect:d,...e}=a;return(0,c.jsx)(r.Primitive.div,{"aria-hidden":!0,...e,ref:b})});aG.displayName="SelectSeparator";var aH="SelectArrow";d.forwardRef((a,b)=>{let{__scopeSelect:d,...e}=a,f=S(d),g=U(aH,d),h=af(aH,d);return g.open&&"popper"===h.position?(0,c.jsx)(D.Arrow,{...f,...e,ref:b}):null}).displayName=aH;var aI=d.forwardRef(({__scopeSelect:a,value:b,...e},f)=>{let g,h=d.useRef(null),j=(0,i.useComposedRefs)(f,h),k=(g=d.useRef({value:b,previous:b}),d.useMemo(()=>(g.current.value!==b&&(g.current.previous=g.current.value,g.current.value=b),g.current.previous),[b]));return d.useEffect(()=>{let a=h.current;if(!a)return;let c=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(k!==b&&c){let d=new Event("change",{bubbles:!0});c.call(a,b),a.dispatchEvent(d)}},[k,b]),(0,c.jsx)(r.Primitive.select,{...e,style:{...H.VISUALLY_HIDDEN_STYLES,...e.style},ref:j,defaultValue:b})});function aJ(a){return""===a||void 0===a}function aK(a){let b=(0,s.useCallbackRef)(a),c=d.useRef(""),e=d.useRef(0),f=d.useCallback(a=>{let d=c.current+a;b(d),function a(b){c.current=b,window.clearTimeout(e.current),""!==b&&(e.current=window.setTimeout(()=>a(""),1e3))}(d)},[b]),g=d.useCallback(()=>{c.current="",window.clearTimeout(e.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(e.current),[]),[c,f,g]}function aL(a,b,c){var d,e;let f=b.length>1&&Array.from(b).every(a=>a===b[0])?b[0]:b,g=c?a.indexOf(c):-1,h=(d=a,e=Math.max(g,0),d.map((a,b)=>d[(e+b)%d.length]));1===f.length&&(h=h.filter(a=>a!==c));let i=h.find(a=>a.textValue.toLowerCase().startsWith(f.toLowerCase()));return i!==c?i:void 0}aI.displayName="SelectBubbleInput";var aM=a.i(2774),aN=a.i(22427);let aO=(0,aN.default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),aP=(0,aN.default)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var aQ=a.i(39465);let aR=d.forwardRef(({className:a,children:b,...d},e)=>(0,c.jsxs)(Z,{ref:e,className:(0,aQ.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...d,children:[b,(0,c.jsx)(aa,{asChild:!0,children:(0,c.jsx)(aO,{className:"h-4 w-4 opacity-50"})})]}));aR.displayName=Z.displayName;let aS=d.forwardRef(({className:a,...b},d)=>(0,c.jsx)(aC,{ref:d,className:(0,aQ.cn)("flex cursor-default items-center justify-center py-1",a),...b,children:(0,c.jsx)(aP,{className:"h-4 w-4"})}));aS.displayName=aC.displayName;let aT=d.forwardRef(({className:a,...b},d)=>(0,c.jsx)(aE,{ref:d,className:(0,aQ.cn)("flex cursor-default items-center justify-center py-1",a),...b,children:(0,c.jsx)(aO,{className:"h-4 w-4"})}));aT.displayName=aE.displayName;let aU=d.forwardRef(({className:a,children:b,position:d="popper",...e},f)=>(0,c.jsx)(ab,{children:(0,c.jsxs)(ad,{ref:f,className:(0,aQ.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===d&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:d,...e,children:[(0,c.jsx)(aS,{}),(0,c.jsx)(an,{className:(0,aQ.cn)("p-1","popper"===d&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:b}),(0,c.jsx)(aT,{})]})}));aU.displayName=ad.displayName,d.forwardRef(({className:a,...b},d)=>(0,c.jsx)(as,{ref:d,className:(0,aQ.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...b})).displayName=as.displayName;let aV=d.forwardRef(({className:a,children:b,...d},e)=>(0,c.jsxs)(aw,{ref:e,className:(0,aQ.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...d,children:[(0,c.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,c.jsx)(aA,{children:(0,c.jsx)(aM.Check,{className:"h-4 w-4"})})}),(0,c.jsx)(ay,{children:b})]}));aV.displayName=aw.displayName,d.forwardRef(({className:a,...b},d)=>(0,c.jsx)(aG,{ref:d,className:(0,aQ.cn)("-mx-1 my-1 h-px bg-muted",a),...b})).displayName=aG.displayName,a.s(["Select",()=>X,"SelectContent",()=>aU,"SelectItem",()=>aV,"SelectTrigger",()=>aR,"SelectValue",()=>_],75196)}];
2
-
3
- //# sourceMappingURL=packages_web_src_components_ui_select_tsx_7c5238ef._.js.map