karsten-design-system 1.1.60 → 1.1.61

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.
package/dist/index.js CHANGED
@@ -13,7 +13,6 @@ import { Divider as Divider$1 } from 'primereact/divider';
13
13
  import { InputSwitch as InputSwitch$1 } from 'primereact/inputswitch';
14
14
  import { InputTextarea } from 'primereact/inputtextarea';
15
15
  import { Sidebar as Sidebar$1 } from 'primereact/sidebar';
16
- import { format } from 'date-fns';
17
16
  import { Paginator as Paginator$1 } from 'primereact/paginator';
18
17
  import { classNames } from 'primereact/utils';
19
18
  import { Skeleton as Skeleton$1 } from 'primereact/skeleton';
@@ -45,7 +44,7 @@ function styleInject(css, ref) {
45
44
  }
46
45
  }
47
46
 
48
- var css_248z = "@layer tailwind-base, primereact, tailwind-utilities;@import \"primereact/resources/themes/lara-light-blue/theme.css\";@import \"primeicons/primeicons.css\";@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\");@layer tailwind-base{*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }\r\n /*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{font-family:Roboto,sans-serif}}@layer tailwind-utilities{.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.p-calendar.p-invalid input::-moz-placeholder{color:#ec4a54!important}.p-calendar.p-invalid input::placeholder{color:#ec4a54!important}.p-calendar.p-custom input::-moz-placeholder{color:#a0a4b3!important}.p-calendar.p-custom input::placeholder{color:#a0a4b3!important}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-1{bottom:-.25rem}.-top-3{top:-.75rem}.bottom-0{bottom:0}.left-4{left:1rem}.right-1{right:.25rem}.right-3{right:.75rem}.right-5{right:1.25rem}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-5{top:1.25rem}.top-\\[9px\\]{top:9px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\\[999\\]{z-index:999}.z-\\[9\\]{z-index:9}.m-0{margin:0}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{-webkit-box-orient:vertical;-webkit-line-clamp:3;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.\\!h-8{height:2rem!important}.h-2{height:.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[160px\\]{height:160px}.h-\\[400px\\]{height:400px}.h-\\[calc\\(100vh_-114\\.8px\\)\\]{height:calc(100vh - 114.8px)}.h-\\[calc\\(100vh_-_125px\\)\\]{height:calc(100vh - 125px)}.h-\\[calc\\(100vh_-_64px\\)\\]{height:calc(100vh - 64px)}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-\\[70vh\\]{max-height:70vh}.min-h-16{min-height:4rem}.min-h-\\[60px\\]{min-height:60px}.\\!w-8{width:2rem!important}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-10\\/12{width:83.333333%}.w-100{width:100%}.w-2{width:.5rem}.w-2\\/3{width:66.666667%}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-96{width:24rem}.w-\\[240px\\]{width:240px}.w-\\[276px\\]{width:276px}.w-\\[40rem\\]{width:40rem}.w-\\[40vw\\]{width:40vw}.w-\\[60vw\\]{width:60vw}.w-\\[90\\%\\]{width:90%}.w-\\[900px\\]{width:900px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-6{min-width:1.5rem}.min-w-7{min-width:1.75rem}.min-w-72{min-width:18rem}.min-w-\\[305px\\]{min-width:305px}.min-w-full{min-width:100%}.max-w-\\[calc\\(100\\%-20px\\)\\]{max-width:calc(100% - 20px)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-auto{cursor:auto}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-6{row-gap:1.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.rounded-r-lg{border-bottom-right-radius:.5rem;border-top-right-radius:.5rem}.rounded-se-lg{border-start-end-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l-0{border-left-width:0}.border-l-4{border-left-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#13294B\\]{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-\\[\\#1565C0\\]{--tw-border-opacity:1;border-color:rgb(21 101 192/var(--tw-border-opacity,1))}.border-\\[\\#2E7D32\\]{--tw-border-opacity:1;border-color:rgb(46 125 50/var(--tw-border-opacity,1))}.border-\\[\\#5EEAD4\\]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.border-\\[\\#67E8F9\\]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.border-\\[\\#6EE7B7\\]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-\\[\\#7DD3FC\\]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-\\[\\#A5B4FC\\]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.border-\\[\\#BEF264\\]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.border-\\[\\#BFDBFE\\]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-\\[\\#C4B5FD\\]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.border-\\[\\#C62828\\]{--tw-border-opacity:1;border-color:rgb(198 40 40/var(--tw-border-opacity,1))}.border-\\[\\#CBD5E1\\]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-\\[\\#D1D5DB\\]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D4\\]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D8\\]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-\\[\\#D6D3D1\\]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.border-\\[\\#F0ABFC\\]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.border-\\[\\#F1F1F4\\]{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-\\[\\#F9A8D4\\]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.border-\\[\\#FCA5A5\\]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-\\[\\#FCD34D\\]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-\\[\\#FDA4AF\\]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.border-\\[\\#FDBA74\\]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.border-\\[\\#e6e6e6\\]{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-\\[\\#f3f4f6\\]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-gray{--tw-border-opacity:1;border-color:rgb(160 164 179/var(--tw-border-opacity,1))}.border-gray50{--tw-border-opacity:1;border-color:rgb(224 224 224/var(--tw-border-opacity,1))}.border-grayDark{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-redError{--tw-border-opacity:1;border-color:rgb(236 74 84/var(--tw-border-opacity,1))}.border-secondary{--tw-border-opacity:1;border-color:rgb(232 236 249/var(--tw-border-opacity,1))}.border-secondaryActive{--tw-border-opacity:1;border-color:rgb(164 180 232/var(--tw-border-opacity,1))}.border-stone{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-stoneDark{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.border-stoneLight{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-b-stone{--tw-border-opacity:1;border-bottom-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-t-transparent{border-top-color:transparent}.bg-\\[\\#1d6ee731\\]{background-color:#1d6ee731}.bg-\\[\\#CCFBF1\\]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.bg-\\[\\#CFFAFE\\]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-\\[\\#D1FAE5\\]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-\\[\\#DBEAFE\\]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E0E7FF\\]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.bg-\\[\\#E0F2FE\\]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E3F2FD\\]{--tw-bg-opacity:1;background-color:rgb(227 242 253/var(--tw-bg-opacity,1))}.bg-\\[\\#E6F4EA\\]{--tw-bg-opacity:1;background-color:rgb(230 244 234/var(--tw-bg-opacity,1))}.bg-\\[\\#E7E5E4\\]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.bg-\\[\\#ECFCCB\\]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.bg-\\[\\#EDE9FE\\]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-\\[\\#F1F5F9\\]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-\\[\\#F3F4F6\\]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-\\[\\#F4F4F5\\]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-\\[\\#F5F5F5\\]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-\\[\\#FAE8FF\\]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.bg-\\[\\#FCE7F3\\]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-\\[\\#FEE2E2\\]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF3C7\\]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF9C3\\]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-\\[\\#FFE4E6\\]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEBEE\\]{--tw-bg-opacity:1;background-color:rgb(255 235 238/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEDD5\\]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-\\[\\#e6e6e6\\]{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-backgroundDark\\/20{background-color:rgba(66,66,66,.2)}.bg-black{background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black,.bg-blue{--tw-bg-opacity:1}.bg-blue{background-color:rgb(0 69 186/var(--tw-bg-opacity,1))}.bg-gray{background-color:rgb(160 164 179/var(--tw-bg-opacity,1))}.bg-gray,.bg-green{--tw-bg-opacity:1}.bg-green{background-color:rgb(10 168 54/var(--tw-bg-opacity,1))}.bg-greenBackground{background-color:#0aa83612}.bg-primary{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.bg-primary\\/5{background-color:rgba(19,41,75,.05)}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-redErrorOpacity{background-color:#a80a0a14}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.bg-stone{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-stoneBackground{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.bg-stoneLight{--tw-bg-opacity:1;background-color:rgb(241 241 244/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#13294B\\]{--tw-gradient-from:#13294b var(--tw-gradient-from-position);--tw-gradient-to:rgba(19,41,75,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FAFAFB\\]{--tw-gradient-from:#fafafb var(--tw-gradient-from-position);--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FFFFFF\\]{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#f3f4f6\\]{--tw-gradient-from:#f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(243,244,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-\\[\\#FAFAFB\\]{--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fafafb var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-\\[\\#0C1C34\\]{--tw-gradient-to:#0c1c34 var(--tw-gradient-to-position)}.to-\\[\\#FAFAFB\\]{--tw-gradient-to:#fafafb var(--tw-gradient-to-position)}.to-\\[\\#FFFFFF\\],.to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.\\!p-2{padding:.5rem!important}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[2px\\]{padding:2px}.\\!py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-top:1rem}.pb-4,.py-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-4{padding-right:1rem}.pt-1\\.5{padding-top:.375rem}.pt-10{padding-top:2.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.font-roboto{font-family:Roboto,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[18px\\]{font-size:18px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-bold{font-weight:700!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.\\!text-background{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.\\!text-backgroundDark{--tw-text-opacity:1!important;color:rgb(66 66 66/var(--tw-text-opacity,1))!important}.\\!text-gray100{color:rgb(102 102 102/var(--tw-text-opacity,1))!important}.\\!text-gray100,.\\!text-grayDark{--tw-text-opacity:1!important}.\\!text-grayDark{color:rgb(100 105 129/var(--tw-text-opacity,1))!important}.\\!text-green{color:rgb(10 168 54/var(--tw-text-opacity,1))!important}.\\!text-green,.\\!text-primary{--tw-text-opacity:1!important}.\\!text-primary{color:rgb(19 41 75/var(--tw-text-opacity,1))!important}.\\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\\[\\#0369A1\\]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-\\[\\#065F46\\]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-\\[\\#0D47A1\\]{--tw-text-opacity:1;color:rgb(13 71 161/var(--tw-text-opacity,1))}.text-\\[\\#13294B\\]{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-\\[\\#134E4A\\]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.text-\\[\\#155E75\\]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-\\[\\#1B5E20\\]{--tw-text-opacity:1;color:rgb(27 94 32/var(--tw-text-opacity,1))}.text-\\[\\#1E40AF\\]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-\\[\\#334155\\]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-\\[\\#365314\\]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.text-\\[\\#3730A3\\]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.text-\\[\\#374151\\]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-\\[\\#3F3F46\\]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-\\[\\#404040\\]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-\\[\\#44403C\\]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.text-\\[\\#646981\\]{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-\\[\\#6B21A8\\]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-\\[\\#6D28D9\\]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-\\[\\#878787\\]{--tw-text-opacity:1;color:rgb(135 135 135/var(--tw-text-opacity,1))}.text-\\[\\#92400E\\]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-\\[\\#991B1B\\]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-\\[\\#9A3412\\]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-\\[\\#9D174D\\]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-\\[\\#A21CAF\\]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.text-\\[\\#B71C1C\\]{--tw-text-opacity:1;color:rgb(183 28 28/var(--tw-text-opacity,1))}.text-\\[\\#BE123C\\]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-\\[\\#a0a4b3\\]{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-background{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-backgroundDark{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.text-gray{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-grayDark{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-green{--tw-text-opacity:1;color:rgb(10 168 54/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-redError{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.text-stone{--tw-text-opacity:1;color:rgb(230 230 230/var(--tw-text-opacity,1))}.text-stoneDark{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.\\!shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{--tw-shadow:0 4px 12px rgba(0,0,0,.5);--tw-shadow-colored:0 4px 12px var(--tw-shadow-color)}.shadow-container{--tw-shadow:0px 0px 5px 3px rgba(0,0,0,.1);--tw-shadow-colored:0px 0px 5px 3px var(--tw-shadow-color)}.shadow-container,.shadow-header{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-header{--tw-shadow:0px 0px 20px 0px hsla(0,0%,54%,.3);--tw-shadow-colored:0px 0px 20px 0px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-gray{--tw-ring-opacity:1;--tw-ring-color:rgb(160 164 179/var(--tw-ring-opacity,1))}.ring-redError{--tw-ring-opacity:1;--tw-ring-color:rgb(236 74 84/var(--tw-ring-opacity,1))}.ring-stone{--tw-ring-opacity:1;--tw-ring-color:rgb(230 230 230/var(--tw-ring-opacity,1))}.ring-offset-2{--tw-ring-offset-width:2px}.ring-offset-background{--tw-ring-offset-color:#fff}.ring-offset-secondary{--tw-ring-offset-color:#e8ecf9}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}}.placeholder\\:\\!text-redError::-moz-placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:\\!text-redError::placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:text-gray::-moz-placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-gray::placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-redError::-moz-placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.placeholder\\:text-redError::placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.first\\:rounded-ss-lg:first-child{border-start-start-radius:.5rem}.checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.hover\\:border-grayDark:hover{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.hover\\:border-primary\\/50:hover{border-color:rgba(19,41,75,.5)}.hover\\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.hover\\:border-stone:hover{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.hover\\:bg-grayDark:hover{--tw-bg-opacity:1;background-color:rgb(100 105 129/var(--tw-bg-opacity,1))}.hover\\:bg-greenBackgroundActive:hover{background-color:#0aa83633}.hover\\:bg-primaryActive:hover{--tw-bg-opacity:1;background-color:rgb(12 28 52/var(--tw-bg-opacity,1))}.hover\\:bg-secondary:hover{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.hover\\:bg-secondaryActive:hover{--tw-bg-opacity:1;background-color:rgb(164 180 232/var(--tw-bg-opacity,1))}.hover\\:bg-stone:hover{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.hover\\:bg-stoneBackground:hover{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.hover\\:font-bold:hover{font-weight:700}.hover\\:text-backgroundDark:hover{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.hover\\:text-primary:hover{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.hover\\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.focus\\:shadow-md:focus{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.focus\\:shadow-md:focus,.focus\\:shadow-none:focus{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:shadow-none:focus{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.disabled\\:border-stone:disabled{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.disabled\\:border-stoneDark:disabled{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.disabled\\:bg-stone:disabled{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.disabled\\:bg-stoneDark:disabled{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.disabled\\:text-background:disabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.disabled\\:text-stoneDark:disabled{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.group:hover .group-hover\\:scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\\:w-auto{width:auto}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}}@media (min-width:768px){.md\\:w-1\\/2{width:50%}.md\\:min-w-\\[110px\\]{min-width:110px}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){.lg\\:w-1\\/3{width:33.333333%}.lg\\:min-w-\\[110px\\]{min-width:110px}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-md::-webkit-scrollbar-thumb{border-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-stoneDark::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:rounded-r-md::-webkit-scrollbar-track{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-stone::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1::-webkit-scrollbar{width:.25rem}";
47
+ var css_248z = "@layer tailwind-base, primereact, tailwind-utilities;@import \"primereact/resources/themes/lara-light-blue/theme.css\";@import \"primeicons/primeicons.css\";@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\");@layer tailwind-base{*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }\n /*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{font-family:Roboto,sans-serif}}@layer tailwind-utilities{.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.p-calendar.p-invalid input::-moz-placeholder{color:#ec4a54!important}.p-calendar.p-invalid input::placeholder{color:#ec4a54!important}.p-calendar.p-custom input::-moz-placeholder{color:#a0a4b3!important}.p-calendar.p-custom input::placeholder{color:#a0a4b3!important}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-1{bottom:-.25rem}.-top-3{top:-.75rem}.bottom-0{bottom:0}.left-4{left:1rem}.right-1{right:.25rem}.right-3{right:.75rem}.right-5{right:1.25rem}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-5{top:1.25rem}.top-\\[9px\\]{top:9px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\\[999\\]{z-index:999}.z-\\[9\\]{z-index:9}.m-0{margin:0}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{-webkit-box-orient:vertical;-webkit-line-clamp:3;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.\\!h-8{height:2rem!important}.h-2{height:.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[160px\\]{height:160px}.h-\\[400px\\]{height:400px}.h-\\[calc\\(100vh_-114\\.8px\\)\\]{height:calc(100vh - 114.8px)}.h-\\[calc\\(100vh_-_125px\\)\\]{height:calc(100vh - 125px)}.h-\\[calc\\(100vh_-_64px\\)\\]{height:calc(100vh - 64px)}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-\\[70vh\\]{max-height:70vh}.min-h-16{min-height:4rem}.min-h-\\[60px\\]{min-height:60px}.\\!w-8{width:2rem!important}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-10\\/12{width:83.333333%}.w-100{width:100%}.w-2{width:.5rem}.w-2\\/3{width:66.666667%}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-96{width:24rem}.w-\\[240px\\]{width:240px}.w-\\[276px\\]{width:276px}.w-\\[40rem\\]{width:40rem}.w-\\[40vw\\]{width:40vw}.w-\\[60vw\\]{width:60vw}.w-\\[90\\%\\]{width:90%}.w-\\[900px\\]{width:900px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-6{min-width:1.5rem}.min-w-7{min-width:1.75rem}.min-w-72{min-width:18rem}.min-w-\\[305px\\]{min-width:305px}.min-w-full{min-width:100%}.max-w-\\[calc\\(100\\%-20px\\)\\]{max-width:calc(100% - 20px)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-auto{cursor:auto}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-6{row-gap:1.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.rounded-r-lg{border-bottom-right-radius:.5rem;border-top-right-radius:.5rem}.rounded-se-lg{border-start-end-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l-0{border-left-width:0}.border-l-4{border-left-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#13294B\\]{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-\\[\\#1565C0\\]{--tw-border-opacity:1;border-color:rgb(21 101 192/var(--tw-border-opacity,1))}.border-\\[\\#2E7D32\\]{--tw-border-opacity:1;border-color:rgb(46 125 50/var(--tw-border-opacity,1))}.border-\\[\\#5EEAD4\\]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.border-\\[\\#67E8F9\\]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.border-\\[\\#6EE7B7\\]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-\\[\\#7DD3FC\\]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-\\[\\#A5B4FC\\]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.border-\\[\\#BEF264\\]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.border-\\[\\#BFDBFE\\]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-\\[\\#C4B5FD\\]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.border-\\[\\#C62828\\]{--tw-border-opacity:1;border-color:rgb(198 40 40/var(--tw-border-opacity,1))}.border-\\[\\#CBD5E1\\]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-\\[\\#D1D5DB\\]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D4\\]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D8\\]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-\\[\\#D6D3D1\\]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.border-\\[\\#F0ABFC\\]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.border-\\[\\#F1F1F4\\]{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-\\[\\#F9A8D4\\]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.border-\\[\\#FCA5A5\\]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-\\[\\#FCD34D\\]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-\\[\\#FDA4AF\\]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.border-\\[\\#FDBA74\\]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.border-\\[\\#e6e6e6\\]{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-\\[\\#f3f4f6\\]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-gray{--tw-border-opacity:1;border-color:rgb(160 164 179/var(--tw-border-opacity,1))}.border-gray50{--tw-border-opacity:1;border-color:rgb(224 224 224/var(--tw-border-opacity,1))}.border-grayDark{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-redError{--tw-border-opacity:1;border-color:rgb(236 74 84/var(--tw-border-opacity,1))}.border-secondary{--tw-border-opacity:1;border-color:rgb(232 236 249/var(--tw-border-opacity,1))}.border-secondaryActive{--tw-border-opacity:1;border-color:rgb(164 180 232/var(--tw-border-opacity,1))}.border-stone{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-stoneDark{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.border-stoneLight{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-b-stone{--tw-border-opacity:1;border-bottom-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-t-transparent{border-top-color:transparent}.bg-\\[\\#1d6ee731\\]{background-color:#1d6ee731}.bg-\\[\\#CCFBF1\\]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.bg-\\[\\#CFFAFE\\]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-\\[\\#D1FAE5\\]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-\\[\\#DBEAFE\\]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E0E7FF\\]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.bg-\\[\\#E0F2FE\\]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E3F2FD\\]{--tw-bg-opacity:1;background-color:rgb(227 242 253/var(--tw-bg-opacity,1))}.bg-\\[\\#E6F4EA\\]{--tw-bg-opacity:1;background-color:rgb(230 244 234/var(--tw-bg-opacity,1))}.bg-\\[\\#E7E5E4\\]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.bg-\\[\\#ECFCCB\\]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.bg-\\[\\#EDE9FE\\]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-\\[\\#F1F5F9\\]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-\\[\\#F3F4F6\\]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-\\[\\#F4F4F5\\]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-\\[\\#F5F5F5\\]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-\\[\\#FAE8FF\\]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.bg-\\[\\#FCE7F3\\]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-\\[\\#FEE2E2\\]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF3C7\\]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF9C3\\]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-\\[\\#FFE4E6\\]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEBEE\\]{--tw-bg-opacity:1;background-color:rgb(255 235 238/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEDD5\\]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-\\[\\#e6e6e6\\]{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-backgroundDark\\/20{background-color:rgba(66,66,66,.2)}.bg-black{background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black,.bg-blue{--tw-bg-opacity:1}.bg-blue{background-color:rgb(0 69 186/var(--tw-bg-opacity,1))}.bg-gray{background-color:rgb(160 164 179/var(--tw-bg-opacity,1))}.bg-gray,.bg-green{--tw-bg-opacity:1}.bg-green{background-color:rgb(10 168 54/var(--tw-bg-opacity,1))}.bg-greenBackground{background-color:#0aa83612}.bg-primary{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.bg-primary\\/5{background-color:rgba(19,41,75,.05)}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-redErrorOpacity{background-color:#a80a0a14}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.bg-stone{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-stoneBackground{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.bg-stoneLight{--tw-bg-opacity:1;background-color:rgb(241 241 244/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#13294B\\]{--tw-gradient-from:#13294b var(--tw-gradient-from-position);--tw-gradient-to:rgba(19,41,75,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FAFAFB\\]{--tw-gradient-from:#fafafb var(--tw-gradient-from-position);--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FFFFFF\\]{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#f3f4f6\\]{--tw-gradient-from:#f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(243,244,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-\\[\\#FAFAFB\\]{--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fafafb var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-\\[\\#0C1C34\\]{--tw-gradient-to:#0c1c34 var(--tw-gradient-to-position)}.to-\\[\\#FAFAFB\\]{--tw-gradient-to:#fafafb var(--tw-gradient-to-position)}.to-\\[\\#FFFFFF\\],.to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.\\!p-2{padding:.5rem!important}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[2px\\]{padding:2px}.\\!py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-top:1rem}.pb-4,.py-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-4{padding-right:1rem}.pt-1\\.5{padding-top:.375rem}.pt-10{padding-top:2.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.font-roboto{font-family:Roboto,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[18px\\]{font-size:18px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-bold{font-weight:700!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.\\!text-background{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.\\!text-backgroundDark{--tw-text-opacity:1!important;color:rgb(66 66 66/var(--tw-text-opacity,1))!important}.\\!text-gray100{color:rgb(102 102 102/var(--tw-text-opacity,1))!important}.\\!text-gray100,.\\!text-grayDark{--tw-text-opacity:1!important}.\\!text-grayDark{color:rgb(100 105 129/var(--tw-text-opacity,1))!important}.\\!text-green{color:rgb(10 168 54/var(--tw-text-opacity,1))!important}.\\!text-green,.\\!text-primary{--tw-text-opacity:1!important}.\\!text-primary{color:rgb(19 41 75/var(--tw-text-opacity,1))!important}.\\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\\[\\#0369A1\\]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-\\[\\#065F46\\]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-\\[\\#0D47A1\\]{--tw-text-opacity:1;color:rgb(13 71 161/var(--tw-text-opacity,1))}.text-\\[\\#13294B\\]{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-\\[\\#134E4A\\]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.text-\\[\\#155E75\\]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-\\[\\#1B5E20\\]{--tw-text-opacity:1;color:rgb(27 94 32/var(--tw-text-opacity,1))}.text-\\[\\#1E40AF\\]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-\\[\\#334155\\]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-\\[\\#365314\\]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.text-\\[\\#3730A3\\]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.text-\\[\\#374151\\]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-\\[\\#3F3F46\\]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-\\[\\#404040\\]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-\\[\\#44403C\\]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.text-\\[\\#646981\\]{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-\\[\\#6B21A8\\]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-\\[\\#6D28D9\\]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-\\[\\#878787\\]{--tw-text-opacity:1;color:rgb(135 135 135/var(--tw-text-opacity,1))}.text-\\[\\#92400E\\]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-\\[\\#991B1B\\]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-\\[\\#9A3412\\]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-\\[\\#9D174D\\]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-\\[\\#A21CAF\\]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.text-\\[\\#B71C1C\\]{--tw-text-opacity:1;color:rgb(183 28 28/var(--tw-text-opacity,1))}.text-\\[\\#BE123C\\]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-\\[\\#a0a4b3\\]{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-background{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-backgroundDark{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.text-gray{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-grayDark{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-green{--tw-text-opacity:1;color:rgb(10 168 54/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-redError{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.text-stone{--tw-text-opacity:1;color:rgb(230 230 230/var(--tw-text-opacity,1))}.text-stoneDark{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.\\!shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{--tw-shadow:0 4px 12px rgba(0,0,0,.5);--tw-shadow-colored:0 4px 12px var(--tw-shadow-color)}.shadow-container{--tw-shadow:0px 0px 5px 3px rgba(0,0,0,.1);--tw-shadow-colored:0px 0px 5px 3px var(--tw-shadow-color)}.shadow-container,.shadow-header{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-header{--tw-shadow:0px 0px 20px 0px hsla(0,0%,54%,.3);--tw-shadow-colored:0px 0px 20px 0px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-gray{--tw-ring-opacity:1;--tw-ring-color:rgb(160 164 179/var(--tw-ring-opacity,1))}.ring-redError{--tw-ring-opacity:1;--tw-ring-color:rgb(236 74 84/var(--tw-ring-opacity,1))}.ring-stone{--tw-ring-opacity:1;--tw-ring-color:rgb(230 230 230/var(--tw-ring-opacity,1))}.ring-offset-2{--tw-ring-offset-width:2px}.ring-offset-background{--tw-ring-offset-color:#fff}.ring-offset-secondary{--tw-ring-offset-color:#e8ecf9}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}}.placeholder\\:\\!text-redError::-moz-placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:\\!text-redError::placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:text-gray::-moz-placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-gray::placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-redError::-moz-placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.placeholder\\:text-redError::placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.first\\:rounded-ss-lg:first-child{border-start-start-radius:.5rem}.checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.hover\\:border-grayDark:hover{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.hover\\:border-primary\\/50:hover{border-color:rgba(19,41,75,.5)}.hover\\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.hover\\:border-stone:hover{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.hover\\:bg-grayDark:hover{--tw-bg-opacity:1;background-color:rgb(100 105 129/var(--tw-bg-opacity,1))}.hover\\:bg-greenBackgroundActive:hover{background-color:#0aa83633}.hover\\:bg-primaryActive:hover{--tw-bg-opacity:1;background-color:rgb(12 28 52/var(--tw-bg-opacity,1))}.hover\\:bg-secondary:hover{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.hover\\:bg-secondaryActive:hover{--tw-bg-opacity:1;background-color:rgb(164 180 232/var(--tw-bg-opacity,1))}.hover\\:bg-stone:hover{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.hover\\:bg-stoneBackground:hover{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.hover\\:font-bold:hover{font-weight:700}.hover\\:text-backgroundDark:hover{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.hover\\:text-primary:hover{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.hover\\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.focus\\:shadow-md:focus{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.focus\\:shadow-md:focus,.focus\\:shadow-none:focus{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:shadow-none:focus{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.disabled\\:border-stone:disabled{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.disabled\\:border-stoneDark:disabled{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.disabled\\:bg-stone:disabled{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.disabled\\:bg-stoneDark:disabled{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.disabled\\:text-background:disabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.disabled\\:text-stoneDark:disabled{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.group:hover .group-hover\\:scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\\:w-auto{width:auto}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}}@media (min-width:768px){.md\\:w-1\\/2{width:50%}.md\\:min-w-\\[110px\\]{min-width:110px}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){.lg\\:w-1\\/3{width:33.333333%}.lg\\:min-w-\\[110px\\]{min-width:110px}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-md::-webkit-scrollbar-thumb{border-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-stoneDark::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:rounded-r-md::-webkit-scrollbar-track{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-stone::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1::-webkit-scrollbar{width:.25rem}";
49
48
  styleInject(css_248z,{"insertAt":"top"});
50
49
 
51
50
  function Accordion({ tabsChildren, headers, multiple = false, activeIndex, className, onClickFavorite, showFavorite = false, }) {
@@ -262,7 +261,7 @@ const variants$3 = {
262
261
  tab: 'bg-background !text-primary border-background hover:bg-secondaryActive hover:border-grayDark disabled:bg-stoneDark disabled:text-background disabled:border-stoneDark',
263
262
  };
264
263
  function Button({ variant = 'primary', selected = false, rightIcon, className, width = 'w-100', ...props }) {
265
- return (jsx(Button$1, { ...props, className: clsx('!py-2 !shadow-none font-roboto', variants$3[variant], selected && variant === 'tab' && 'bg-secondary border-grayDark ', width, className), "aria-label": "componente de bot\u00E3o", children: rightIcon && jsx("span", { className: `pi pl-2 ${rightIcon}`, children: " " }) }));
264
+ return (jsx(Button$1, { ...props, className: clsx('!py-2 !shadow-none font-roboto', variants$3[variant], selected && variant === 'tab' && 'bg-secondary border-grayDark ', width, className), "aria-label": "Componente Bot\u00E3o Padr\u00E3o", children: rightIcon && jsx("span", { className: `pi pl-2 ${rightIcon}`, children: " " }) }));
266
265
  }
267
266
 
268
267
  addLocale('pt-BR', {
@@ -770,155 +769,2785 @@ function FilterIcon({ color }) {
770
769
  return (jsx("svg", { width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", children: jsx("path", { d: "M14.3164 0.75C14.918 0.75 15.2188 1.46094 14.7812 1.87109L9.75 6.92969V14.0938C9.75 14.6406 9.14844 14.9414 8.71094 14.6406L6.52344 13.1094C6.33203 13 6.25 12.7812 6.25 12.5625V6.92969L1.19141 1.87109C0.753906 1.46094 1.05469 0.75 1.65625 0.75H14.3164Z", fill: color }) }));
771
770
  }
772
771
 
773
- function buildFormatLongFn(args) {
774
- return (options = {}) => {
775
- // TODO: Remove String()
776
- const width = options.width ? String(options.width) : args.defaultWidth;
777
- const format = args.formats[width] || args.formats[args.defaultWidth];
778
- return format;
779
- };
780
- }
781
-
782
772
  /**
783
- * The localize function argument callback which allows to convert raw value to
784
- * the actual type.
773
+ * @module constants
774
+ * @summary Useful constants
775
+ * @description
776
+ * Collection of useful date constants.
785
777
  *
786
- * @param value - The value to convert
778
+ * The constants could be imported from `date-fns/constants`:
787
779
  *
788
- * @returns The converted value
780
+ * ```ts
781
+ * import { maxTime, minTime } from "./constants/date-fns/constants";
782
+ *
783
+ * function isAllowedTime(time) {
784
+ * return time <= maxTime && time >= minTime;
785
+ * }
786
+ * ```
789
787
  */
790
788
 
789
+
791
790
  /**
792
- * The map of localized values for each width.
791
+ * @constant
792
+ * @name millisecondsInWeek
793
+ * @summary Milliseconds in 1 week.
793
794
  */
795
+ const millisecondsInWeek = 604800000;
794
796
 
795
797
  /**
796
- * The index type of the locale unit value. It types conversion of units of
797
- * values that don't start at 0 (i.e. quarters).
798
+ * @constant
799
+ * @name millisecondsInDay
800
+ * @summary Milliseconds in 1 day.
798
801
  */
802
+ const millisecondsInDay = 86400000;
799
803
 
800
804
  /**
801
- * Converts the unit value to the tuple of values.
805
+ * @constant
806
+ * @name constructFromSymbol
807
+ * @summary Symbol enabling Date extensions to inherit properties from the reference date.
808
+ *
809
+ * The symbol is used to enable the `constructFrom` function to construct a date
810
+ * using a reference date and a value. It allows to transfer extra properties
811
+ * from the reference date to the new date. It's useful for extensions like
812
+ * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
813
+ * a constructor argument.
802
814
  */
815
+ const constructFromSymbol = Symbol.for("constructDateFrom");
803
816
 
804
817
  /**
805
- * The tuple of localized era values. The first element represents BC,
806
- * the second element represents AD.
818
+ * @name constructFrom
819
+ * @category Generic Helpers
820
+ * @summary Constructs a date using the reference date and the value
821
+ *
822
+ * @description
823
+ * The function constructs a new date using the constructor from the reference
824
+ * date and the given value. It helps to build generic functions that accept
825
+ * date extensions.
826
+ *
827
+ * It defaults to `Date` if the passed reference date is a number or a string.
828
+ *
829
+ * Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
830
+ * enabling to transfer extra properties from the reference date to the new date.
831
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
832
+ * that accept a time zone as a constructor argument.
833
+ *
834
+ * @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).
835
+ *
836
+ * @param date - The reference date to take constructor from
837
+ * @param value - The value to create the date
838
+ *
839
+ * @returns Date initialized using the given date and value
840
+ *
841
+ * @example
842
+ * import { constructFrom } from "./constructFrom/date-fns";
843
+ *
844
+ * // A function that clones a date preserving the original type
845
+ * function cloneDate<DateType extends Date>(date: DateType): DateType {
846
+ * return constructFrom(
847
+ * date, // Use constructor from the given date
848
+ * date.getTime() // Use the date value to create a new date
849
+ * );
850
+ * }
807
851
  */
852
+ function constructFrom(date, value) {
853
+ if (typeof date === "function") return date(value);
854
+
855
+ if (date && typeof date === "object" && constructFromSymbol in date)
856
+ return date[constructFromSymbol](value);
857
+
858
+ if (date instanceof Date) return new date.constructor(value);
859
+
860
+ return new Date(value);
861
+ }
808
862
 
809
863
  /**
810
- * The tuple of localized quarter values. The first element represents Q1.
864
+ * @name toDate
865
+ * @category Common Helpers
866
+ * @summary Convert the given argument to an instance of Date.
867
+ *
868
+ * @description
869
+ * Convert the given argument to an instance of Date.
870
+ *
871
+ * If the argument is an instance of Date, the function returns its clone.
872
+ *
873
+ * If the argument is a number, it is treated as a timestamp.
874
+ *
875
+ * If the argument is none of the above, the function returns Invalid Date.
876
+ *
877
+ * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
878
+ * enabling to transfer extra properties from the reference date to the new date.
879
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
880
+ * that accept a time zone as a constructor argument.
881
+ *
882
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
883
+ *
884
+ * @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).
885
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
886
+ *
887
+ * @param argument - The value to convert
888
+ *
889
+ * @returns The parsed date in the local time zone
890
+ *
891
+ * @example
892
+ * // Clone the date:
893
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
894
+ * //=> Tue Feb 11 2014 11:30:30
895
+ *
896
+ * @example
897
+ * // Convert the timestamp to date:
898
+ * const result = toDate(1392098430000)
899
+ * //=> Tue Feb 11 2014 11:30:30
811
900
  */
901
+ function toDate(argument, context) {
902
+ // [TODO] Get rid of `toDate` or `constructFrom`?
903
+ return constructFrom(context || argument, argument);
904
+ }
905
+
906
+ let defaultOptions = {};
907
+
908
+ function getDefaultOptions() {
909
+ return defaultOptions;
910
+ }
812
911
 
813
912
  /**
814
- * The tuple of localized day values. The first element represents Sunday.
913
+ * The {@link startOfWeek} function options.
815
914
  */
816
915
 
817
916
  /**
818
- * The tuple of localized month values. The first element represents January.
917
+ * @name startOfWeek
918
+ * @category Week Helpers
919
+ * @summary Return the start of a week for the given date.
920
+ *
921
+ * @description
922
+ * Return the start of a week for the given date.
923
+ * The result will be in the local timezone.
924
+ *
925
+ * @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).
926
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
927
+ *
928
+ * @param date - The original date
929
+ * @param options - An object with options
930
+ *
931
+ * @returns The start of a week
932
+ *
933
+ * @example
934
+ * // The start of a week for 2 September 2014 11:55:00:
935
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
936
+ * //=> Sun Aug 31 2014 00:00:00
937
+ *
938
+ * @example
939
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
940
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
941
+ * //=> Mon Sep 01 2014 00:00:00
819
942
  */
943
+ function startOfWeek(date, options) {
944
+ const defaultOptions = getDefaultOptions();
945
+ const weekStartsOn =
946
+ options?.weekStartsOn ??
947
+ options?.locale?.options?.weekStartsOn ??
948
+ defaultOptions.weekStartsOn ??
949
+ defaultOptions.locale?.options?.weekStartsOn ??
950
+ 0;
951
+
952
+ const _date = toDate(date, options?.in);
953
+ const day = _date.getDay();
954
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
955
+
956
+ _date.setDate(_date.getDate() - diff);
957
+ _date.setHours(0, 0, 0, 0);
958
+ return _date;
959
+ }
820
960
 
821
- function buildLocalizeFn(args) {
822
- return (value, options) => {
823
- const context = options?.context ? String(options.context) : "standalone";
824
-
825
- let valuesArray;
826
- if (context === "formatting" && args.formattingValues) {
827
- const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
828
- const width = options?.width ? String(options.width) : defaultWidth;
961
+ /**
962
+ * The {@link startOfISOWeek} function options.
963
+ */
829
964
 
830
- valuesArray =
831
- args.formattingValues[width] || args.formattingValues[defaultWidth];
832
- } else {
833
- const defaultWidth = args.defaultWidth;
834
- const width = options?.width ? String(options.width) : args.defaultWidth;
965
+ /**
966
+ * @name startOfISOWeek
967
+ * @category ISO Week Helpers
968
+ * @summary Return the start of an ISO week for the given date.
969
+ *
970
+ * @description
971
+ * Return the start of an ISO week for the given date.
972
+ * The result will be in the local timezone.
973
+ *
974
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
975
+ *
976
+ * @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).
977
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
978
+ *
979
+ * @param date - The original date
980
+ * @param options - An object with options
981
+ *
982
+ * @returns The start of an ISO week
983
+ *
984
+ * @example
985
+ * // The start of an ISO week for 2 September 2014 11:55:00:
986
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
987
+ * //=> Mon Sep 01 2014 00:00:00
988
+ */
989
+ function startOfISOWeek(date, options) {
990
+ return startOfWeek(date, { ...options, weekStartsOn: 1 });
991
+ }
835
992
 
836
- valuesArray = args.values[width] || args.values[defaultWidth];
837
- }
838
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
993
+ /**
994
+ * The {@link getISOWeekYear} function options.
995
+ */
839
996
 
840
- // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
841
- return valuesArray[index];
842
- };
997
+ /**
998
+ * @name getISOWeekYear
999
+ * @category ISO Week-Numbering Year Helpers
1000
+ * @summary Get the ISO week-numbering year of the given date.
1001
+ *
1002
+ * @description
1003
+ * Get the ISO week-numbering year of the given date,
1004
+ * which always starts 3 days before the year's first Thursday.
1005
+ *
1006
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1007
+ *
1008
+ * @param date - The given date
1009
+ *
1010
+ * @returns The ISO week-numbering year
1011
+ *
1012
+ * @example
1013
+ * // Which ISO-week numbering year is 2 January 2005?
1014
+ * const result = getISOWeekYear(new Date(2005, 0, 2))
1015
+ * //=> 2004
1016
+ */
1017
+ function getISOWeekYear(date, options) {
1018
+ const _date = toDate(date, options?.in);
1019
+ const year = _date.getFullYear();
1020
+
1021
+ const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
1022
+ fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
1023
+ fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
1024
+ const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
1025
+
1026
+ const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
1027
+ fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
1028
+ fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
1029
+ const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
1030
+
1031
+ if (_date.getTime() >= startOfNextYear.getTime()) {
1032
+ return year + 1;
1033
+ } else if (_date.getTime() >= startOfThisYear.getTime()) {
1034
+ return year;
1035
+ } else {
1036
+ return year - 1;
1037
+ }
843
1038
  }
844
1039
 
845
- function buildMatchFn(args) {
846
- return (string, options = {}) => {
847
- const width = options.width;
1040
+ /**
1041
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
1042
+ * They usually appear for dates that denote time before the timezones were introduced
1043
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
1044
+ * and GMT+01:00:00 after that date)
1045
+ *
1046
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
1047
+ * which would lead to incorrect calculations.
1048
+ *
1049
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
1050
+ */
1051
+ function getTimezoneOffsetInMilliseconds(date) {
1052
+ const _date = toDate(date);
1053
+ const utcDate = new Date(
1054
+ Date.UTC(
1055
+ _date.getFullYear(),
1056
+ _date.getMonth(),
1057
+ _date.getDate(),
1058
+ _date.getHours(),
1059
+ _date.getMinutes(),
1060
+ _date.getSeconds(),
1061
+ _date.getMilliseconds(),
1062
+ ),
1063
+ );
1064
+ utcDate.setUTCFullYear(_date.getFullYear());
1065
+ return +date - +utcDate;
1066
+ }
848
1067
 
849
- const matchPattern =
850
- (width && args.matchPatterns[width]) ||
851
- args.matchPatterns[args.defaultMatchWidth];
852
- const matchResult = string.match(matchPattern);
1068
+ function normalizeDates(context, ...dates) {
1069
+ const normalize = constructFrom.bind(
1070
+ null,
1071
+ dates.find((date) => typeof date === "object"),
1072
+ );
1073
+ return dates.map(normalize);
1074
+ }
853
1075
 
854
- if (!matchResult) {
855
- return null;
856
- }
857
- const matchedString = matchResult[0];
1076
+ /**
1077
+ * The {@link startOfDay} function options.
1078
+ */
858
1079
 
859
- const parsePatterns =
860
- (width && args.parsePatterns[width]) ||
861
- args.parsePatterns[args.defaultParseWidth];
1080
+ /**
1081
+ * @name startOfDay
1082
+ * @category Day Helpers
1083
+ * @summary Return the start of a day for the given date.
1084
+ *
1085
+ * @description
1086
+ * Return the start of a day for the given date.
1087
+ * The result will be in the local timezone.
1088
+ *
1089
+ * @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).
1090
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1091
+ *
1092
+ * @param date - The original date
1093
+ * @param options - The options
1094
+ *
1095
+ * @returns The start of a day
1096
+ *
1097
+ * @example
1098
+ * // The start of a day for 2 September 2014 11:55:00:
1099
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
1100
+ * //=> Tue Sep 02 2014 00:00:00
1101
+ */
1102
+ function startOfDay(date, options) {
1103
+ const _date = toDate(date, options?.in);
1104
+ _date.setHours(0, 0, 0, 0);
1105
+ return _date;
1106
+ }
862
1107
 
863
- const key = Array.isArray(parsePatterns)
864
- ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
865
- : // [TODO] -- I challenge you to fix the type
866
- findKey(parsePatterns, (pattern) => pattern.test(matchedString));
1108
+ /**
1109
+ * The {@link differenceInCalendarDays} function options.
1110
+ */
867
1111
 
868
- let value;
1112
+ /**
1113
+ * @name differenceInCalendarDays
1114
+ * @category Day Helpers
1115
+ * @summary Get the number of calendar days between the given dates.
1116
+ *
1117
+ * @description
1118
+ * Get the number of calendar days between the given dates. This means that the times are removed
1119
+ * from the dates and then the difference in days is calculated.
1120
+ *
1121
+ * @param laterDate - The later date
1122
+ * @param earlierDate - The earlier date
1123
+ * @param options - The options object
1124
+ *
1125
+ * @returns The number of calendar days
1126
+ *
1127
+ * @example
1128
+ * // How many calendar days are between
1129
+ * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
1130
+ * const result = differenceInCalendarDays(
1131
+ * new Date(2012, 6, 2, 0, 0),
1132
+ * new Date(2011, 6, 2, 23, 0)
1133
+ * )
1134
+ * //=> 366
1135
+ * // How many calendar days are between
1136
+ * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
1137
+ * const result = differenceInCalendarDays(
1138
+ * new Date(2011, 6, 3, 0, 1),
1139
+ * new Date(2011, 6, 2, 23, 59)
1140
+ * )
1141
+ * //=> 1
1142
+ */
1143
+ function differenceInCalendarDays(laterDate, earlierDate, options) {
1144
+ const [laterDate_, earlierDate_] = normalizeDates(
1145
+ options?.in,
1146
+ laterDate,
1147
+ earlierDate,
1148
+ );
1149
+
1150
+ const laterStartOfDay = startOfDay(laterDate_);
1151
+ const earlierStartOfDay = startOfDay(earlierDate_);
1152
+
1153
+ const laterTimestamp =
1154
+ +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
1155
+ const earlierTimestamp =
1156
+ +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
1157
+
1158
+ // Round the number of days to the nearest integer because the number of
1159
+ // milliseconds in a day is not constant (e.g. it's different in the week of
1160
+ // the daylight saving time clock shift).
1161
+ return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
1162
+ }
869
1163
 
870
- value = args.valueCallback ? args.valueCallback(key) : key;
871
- value = options.valueCallback
872
- ? // [TODO] -- I challenge you to fix the type
873
- options.valueCallback(value)
874
- : value;
1164
+ /**
1165
+ * The {@link startOfISOWeekYear} function options.
1166
+ */
875
1167
 
876
- const rest = string.slice(matchedString.length);
1168
+ /**
1169
+ * @name startOfISOWeekYear
1170
+ * @category ISO Week-Numbering Year Helpers
1171
+ * @summary Return the start of an ISO week-numbering year for the given date.
1172
+ *
1173
+ * @description
1174
+ * Return the start of an ISO week-numbering year,
1175
+ * which always starts 3 days before the year's first Thursday.
1176
+ * The result will be in the local timezone.
1177
+ *
1178
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1179
+ *
1180
+ * @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).
1181
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1182
+ *
1183
+ * @param date - The original date
1184
+ * @param options - An object with options
1185
+ *
1186
+ * @returns The start of an ISO week-numbering year
1187
+ *
1188
+ * @example
1189
+ * // The start of an ISO week-numbering year for 2 July 2005:
1190
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
1191
+ * //=> Mon Jan 03 2005 00:00:00
1192
+ */
1193
+ function startOfISOWeekYear(date, options) {
1194
+ const year = getISOWeekYear(date, options);
1195
+ const fourthOfJanuary = constructFrom(date, 0);
1196
+ fourthOfJanuary.setFullYear(year, 0, 4);
1197
+ fourthOfJanuary.setHours(0, 0, 0, 0);
1198
+ return startOfISOWeek(fourthOfJanuary);
1199
+ }
877
1200
 
878
- return { value, rest };
879
- };
1201
+ /**
1202
+ * @name isDate
1203
+ * @category Common Helpers
1204
+ * @summary Is the given value a date?
1205
+ *
1206
+ * @description
1207
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
1208
+ *
1209
+ * @param value - The value to check
1210
+ *
1211
+ * @returns True if the given value is a date
1212
+ *
1213
+ * @example
1214
+ * // For a valid date:
1215
+ * const result = isDate(new Date())
1216
+ * //=> true
1217
+ *
1218
+ * @example
1219
+ * // For an invalid date:
1220
+ * const result = isDate(new Date(NaN))
1221
+ * //=> true
1222
+ *
1223
+ * @example
1224
+ * // For some value:
1225
+ * const result = isDate('2014-02-31')
1226
+ * //=> false
1227
+ *
1228
+ * @example
1229
+ * // For an object:
1230
+ * const result = isDate({})
1231
+ * //=> false
1232
+ */
1233
+ function isDate(value) {
1234
+ return (
1235
+ value instanceof Date ||
1236
+ (typeof value === "object" &&
1237
+ Object.prototype.toString.call(value) === "[object Date]")
1238
+ );
880
1239
  }
881
1240
 
882
- function findKey(object, predicate) {
883
- for (const key in object) {
884
- if (
885
- Object.prototype.hasOwnProperty.call(object, key) &&
886
- predicate(object[key])
887
- ) {
888
- return key;
889
- }
890
- }
891
- return undefined;
1241
+ /**
1242
+ * @name isValid
1243
+ * @category Common Helpers
1244
+ * @summary Is the given date valid?
1245
+ *
1246
+ * @description
1247
+ * Returns false if argument is Invalid Date and true otherwise.
1248
+ * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
1249
+ * Invalid Date is a Date, whose time value is NaN.
1250
+ *
1251
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
1252
+ *
1253
+ * @param date - The date to check
1254
+ *
1255
+ * @returns The date is valid
1256
+ *
1257
+ * @example
1258
+ * // For the valid date:
1259
+ * const result = isValid(new Date(2014, 1, 31))
1260
+ * //=> true
1261
+ *
1262
+ * @example
1263
+ * // For the value, convertible into a date:
1264
+ * const result = isValid(1393804800000)
1265
+ * //=> true
1266
+ *
1267
+ * @example
1268
+ * // For the invalid date:
1269
+ * const result = isValid(new Date(''))
1270
+ * //=> false
1271
+ */
1272
+ function isValid(date) {
1273
+ return !((!isDate(date) && typeof date !== "number") || isNaN(+toDate(date)));
892
1274
  }
893
1275
 
894
- function findIndex(array, predicate) {
895
- for (let key = 0; key < array.length; key++) {
896
- if (predicate(array[key])) {
897
- return key;
898
- }
899
- }
900
- return undefined;
1276
+ /**
1277
+ * The {@link startOfYear} function options.
1278
+ */
1279
+
1280
+ /**
1281
+ * @name startOfYear
1282
+ * @category Year Helpers
1283
+ * @summary Return the start of a year for the given date.
1284
+ *
1285
+ * @description
1286
+ * Return the start of a year for the given date.
1287
+ * The result will be in the local timezone.
1288
+ *
1289
+ * @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).
1290
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1291
+ *
1292
+ * @param date - The original date
1293
+ * @param options - The options
1294
+ *
1295
+ * @returns The start of a year
1296
+ *
1297
+ * @example
1298
+ * // The start of a year for 2 September 2014 11:55:00:
1299
+ * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
1300
+ * //=> Wed Jan 01 2014 00:00:00
1301
+ */
1302
+ function startOfYear(date, options) {
1303
+ const date_ = toDate(date, options?.in);
1304
+ date_.setFullYear(date_.getFullYear(), 0, 1);
1305
+ date_.setHours(0, 0, 0, 0);
1306
+ return date_;
901
1307
  }
902
1308
 
903
- function buildMatchPatternFn(args) {
904
- return (string, options = {}) => {
905
- const matchResult = string.match(args.matchPattern);
906
- if (!matchResult) return null;
907
- const matchedString = matchResult[0];
1309
+ const formatDistanceLocale$1 = {
1310
+ lessThanXSeconds: {
1311
+ one: "less than a second",
1312
+ other: "less than {{count}} seconds",
1313
+ },
908
1314
 
909
- const parseResult = string.match(args.parsePattern);
910
- if (!parseResult) return null;
911
- let value = args.valueCallback
912
- ? args.valueCallback(parseResult[0])
913
- : parseResult[0];
1315
+ xSeconds: {
1316
+ one: "1 second",
1317
+ other: "{{count}} seconds",
1318
+ },
914
1319
 
915
- // [TODO] I challenge you to fix the type
916
- value = options.valueCallback ? options.valueCallback(value) : value;
1320
+ halfAMinute: "half a minute",
917
1321
 
918
- const rest = string.slice(matchedString.length);
1322
+ lessThanXMinutes: {
1323
+ one: "less than a minute",
1324
+ other: "less than {{count}} minutes",
1325
+ },
919
1326
 
920
- return { value, rest };
921
- };
1327
+ xMinutes: {
1328
+ one: "1 minute",
1329
+ other: "{{count}} minutes",
1330
+ },
1331
+
1332
+ aboutXHours: {
1333
+ one: "about 1 hour",
1334
+ other: "about {{count}} hours",
1335
+ },
1336
+
1337
+ xHours: {
1338
+ one: "1 hour",
1339
+ other: "{{count}} hours",
1340
+ },
1341
+
1342
+ xDays: {
1343
+ one: "1 day",
1344
+ other: "{{count}} days",
1345
+ },
1346
+
1347
+ aboutXWeeks: {
1348
+ one: "about 1 week",
1349
+ other: "about {{count}} weeks",
1350
+ },
1351
+
1352
+ xWeeks: {
1353
+ one: "1 week",
1354
+ other: "{{count}} weeks",
1355
+ },
1356
+
1357
+ aboutXMonths: {
1358
+ one: "about 1 month",
1359
+ other: "about {{count}} months",
1360
+ },
1361
+
1362
+ xMonths: {
1363
+ one: "1 month",
1364
+ other: "{{count}} months",
1365
+ },
1366
+
1367
+ aboutXYears: {
1368
+ one: "about 1 year",
1369
+ other: "about {{count}} years",
1370
+ },
1371
+
1372
+ xYears: {
1373
+ one: "1 year",
1374
+ other: "{{count}} years",
1375
+ },
1376
+
1377
+ overXYears: {
1378
+ one: "over 1 year",
1379
+ other: "over {{count}} years",
1380
+ },
1381
+
1382
+ almostXYears: {
1383
+ one: "almost 1 year",
1384
+ other: "almost {{count}} years",
1385
+ },
1386
+ };
1387
+
1388
+ const formatDistance$1 = (token, count, options) => {
1389
+ let result;
1390
+
1391
+ const tokenValue = formatDistanceLocale$1[token];
1392
+ if (typeof tokenValue === "string") {
1393
+ result = tokenValue;
1394
+ } else if (count === 1) {
1395
+ result = tokenValue.one;
1396
+ } else {
1397
+ result = tokenValue.other.replace("{{count}}", count.toString());
1398
+ }
1399
+
1400
+ if (options?.addSuffix) {
1401
+ if (options.comparison && options.comparison > 0) {
1402
+ return "in " + result;
1403
+ } else {
1404
+ return result + " ago";
1405
+ }
1406
+ }
1407
+
1408
+ return result;
1409
+ };
1410
+
1411
+ function buildFormatLongFn(args) {
1412
+ return (options = {}) => {
1413
+ // TODO: Remove String()
1414
+ const width = options.width ? String(options.width) : args.defaultWidth;
1415
+ const format = args.formats[width] || args.formats[args.defaultWidth];
1416
+ return format;
1417
+ };
1418
+ }
1419
+
1420
+ const dateFormats$1 = {
1421
+ full: "EEEE, MMMM do, y",
1422
+ long: "MMMM do, y",
1423
+ medium: "MMM d, y",
1424
+ short: "MM/dd/yyyy",
1425
+ };
1426
+
1427
+ const timeFormats$1 = {
1428
+ full: "h:mm:ss a zzzz",
1429
+ long: "h:mm:ss a z",
1430
+ medium: "h:mm:ss a",
1431
+ short: "h:mm a",
1432
+ };
1433
+
1434
+ const dateTimeFormats$1 = {
1435
+ full: "{{date}} 'at' {{time}}",
1436
+ long: "{{date}} 'at' {{time}}",
1437
+ medium: "{{date}}, {{time}}",
1438
+ short: "{{date}}, {{time}}",
1439
+ };
1440
+
1441
+ const formatLong$1 = {
1442
+ date: buildFormatLongFn({
1443
+ formats: dateFormats$1,
1444
+ defaultWidth: "full",
1445
+ }),
1446
+
1447
+ time: buildFormatLongFn({
1448
+ formats: timeFormats$1,
1449
+ defaultWidth: "full",
1450
+ }),
1451
+
1452
+ dateTime: buildFormatLongFn({
1453
+ formats: dateTimeFormats$1,
1454
+ defaultWidth: "full",
1455
+ }),
1456
+ };
1457
+
1458
+ const formatRelativeLocale$1 = {
1459
+ lastWeek: "'last' eeee 'at' p",
1460
+ yesterday: "'yesterday at' p",
1461
+ today: "'today at' p",
1462
+ tomorrow: "'tomorrow at' p",
1463
+ nextWeek: "eeee 'at' p",
1464
+ other: "P",
1465
+ };
1466
+
1467
+ const formatRelative$1 = (token, _date, _baseDate, _options) =>
1468
+ formatRelativeLocale$1[token];
1469
+
1470
+ /**
1471
+ * The localize function argument callback which allows to convert raw value to
1472
+ * the actual type.
1473
+ *
1474
+ * @param value - The value to convert
1475
+ *
1476
+ * @returns The converted value
1477
+ */
1478
+
1479
+ /**
1480
+ * The map of localized values for each width.
1481
+ */
1482
+
1483
+ /**
1484
+ * The index type of the locale unit value. It types conversion of units of
1485
+ * values that don't start at 0 (i.e. quarters).
1486
+ */
1487
+
1488
+ /**
1489
+ * Converts the unit value to the tuple of values.
1490
+ */
1491
+
1492
+ /**
1493
+ * The tuple of localized era values. The first element represents BC,
1494
+ * the second element represents AD.
1495
+ */
1496
+
1497
+ /**
1498
+ * The tuple of localized quarter values. The first element represents Q1.
1499
+ */
1500
+
1501
+ /**
1502
+ * The tuple of localized day values. The first element represents Sunday.
1503
+ */
1504
+
1505
+ /**
1506
+ * The tuple of localized month values. The first element represents January.
1507
+ */
1508
+
1509
+ function buildLocalizeFn(args) {
1510
+ return (value, options) => {
1511
+ const context = options?.context ? String(options.context) : "standalone";
1512
+
1513
+ let valuesArray;
1514
+ if (context === "formatting" && args.formattingValues) {
1515
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1516
+ const width = options?.width ? String(options.width) : defaultWidth;
1517
+
1518
+ valuesArray =
1519
+ args.formattingValues[width] || args.formattingValues[defaultWidth];
1520
+ } else {
1521
+ const defaultWidth = args.defaultWidth;
1522
+ const width = options?.width ? String(options.width) : args.defaultWidth;
1523
+
1524
+ valuesArray = args.values[width] || args.values[defaultWidth];
1525
+ }
1526
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
1527
+
1528
+ // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
1529
+ return valuesArray[index];
1530
+ };
1531
+ }
1532
+
1533
+ const eraValues$1 = {
1534
+ narrow: ["B", "A"],
1535
+ abbreviated: ["BC", "AD"],
1536
+ wide: ["Before Christ", "Anno Domini"],
1537
+ };
1538
+
1539
+ const quarterValues$1 = {
1540
+ narrow: ["1", "2", "3", "4"],
1541
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1542
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
1543
+ };
1544
+
1545
+ // Note: in English, the names of days of the week and months are capitalized.
1546
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
1547
+ // Generally, formatted dates should look like they are in the middle of a sentence,
1548
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
1549
+ const monthValues$1 = {
1550
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1551
+ abbreviated: [
1552
+ "Jan",
1553
+ "Feb",
1554
+ "Mar",
1555
+ "Apr",
1556
+ "May",
1557
+ "Jun",
1558
+ "Jul",
1559
+ "Aug",
1560
+ "Sep",
1561
+ "Oct",
1562
+ "Nov",
1563
+ "Dec",
1564
+ ],
1565
+
1566
+ wide: [
1567
+ "January",
1568
+ "February",
1569
+ "March",
1570
+ "April",
1571
+ "May",
1572
+ "June",
1573
+ "July",
1574
+ "August",
1575
+ "September",
1576
+ "October",
1577
+ "November",
1578
+ "December",
1579
+ ],
1580
+ };
1581
+
1582
+ const dayValues$1 = {
1583
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
1584
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1585
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1586
+ wide: [
1587
+ "Sunday",
1588
+ "Monday",
1589
+ "Tuesday",
1590
+ "Wednesday",
1591
+ "Thursday",
1592
+ "Friday",
1593
+ "Saturday",
1594
+ ],
1595
+ };
1596
+
1597
+ const dayPeriodValues$1 = {
1598
+ narrow: {
1599
+ am: "a",
1600
+ pm: "p",
1601
+ midnight: "mi",
1602
+ noon: "n",
1603
+ morning: "morning",
1604
+ afternoon: "afternoon",
1605
+ evening: "evening",
1606
+ night: "night",
1607
+ },
1608
+ abbreviated: {
1609
+ am: "AM",
1610
+ pm: "PM",
1611
+ midnight: "midnight",
1612
+ noon: "noon",
1613
+ morning: "morning",
1614
+ afternoon: "afternoon",
1615
+ evening: "evening",
1616
+ night: "night",
1617
+ },
1618
+ wide: {
1619
+ am: "a.m.",
1620
+ pm: "p.m.",
1621
+ midnight: "midnight",
1622
+ noon: "noon",
1623
+ morning: "morning",
1624
+ afternoon: "afternoon",
1625
+ evening: "evening",
1626
+ night: "night",
1627
+ },
1628
+ };
1629
+
1630
+ const formattingDayPeriodValues$1 = {
1631
+ narrow: {
1632
+ am: "a",
1633
+ pm: "p",
1634
+ midnight: "mi",
1635
+ noon: "n",
1636
+ morning: "in the morning",
1637
+ afternoon: "in the afternoon",
1638
+ evening: "in the evening",
1639
+ night: "at night",
1640
+ },
1641
+ abbreviated: {
1642
+ am: "AM",
1643
+ pm: "PM",
1644
+ midnight: "midnight",
1645
+ noon: "noon",
1646
+ morning: "in the morning",
1647
+ afternoon: "in the afternoon",
1648
+ evening: "in the evening",
1649
+ night: "at night",
1650
+ },
1651
+ wide: {
1652
+ am: "a.m.",
1653
+ pm: "p.m.",
1654
+ midnight: "midnight",
1655
+ noon: "noon",
1656
+ morning: "in the morning",
1657
+ afternoon: "in the afternoon",
1658
+ evening: "in the evening",
1659
+ night: "at night",
1660
+ },
1661
+ };
1662
+
1663
+ const ordinalNumber$1 = (dirtyNumber, _options) => {
1664
+ const number = Number(dirtyNumber);
1665
+
1666
+ // If ordinal numbers depend on context, for example,
1667
+ // if they are different for different grammatical genders,
1668
+ // use `options.unit`.
1669
+ //
1670
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
1671
+ // 'day', 'hour', 'minute', 'second'.
1672
+
1673
+ const rem100 = number % 100;
1674
+ if (rem100 > 20 || rem100 < 10) {
1675
+ switch (rem100 % 10) {
1676
+ case 1:
1677
+ return number + "st";
1678
+ case 2:
1679
+ return number + "nd";
1680
+ case 3:
1681
+ return number + "rd";
1682
+ }
1683
+ }
1684
+ return number + "th";
1685
+ };
1686
+
1687
+ const localize$1 = {
1688
+ ordinalNumber: ordinalNumber$1,
1689
+
1690
+ era: buildLocalizeFn({
1691
+ values: eraValues$1,
1692
+ defaultWidth: "wide",
1693
+ }),
1694
+
1695
+ quarter: buildLocalizeFn({
1696
+ values: quarterValues$1,
1697
+ defaultWidth: "wide",
1698
+ argumentCallback: (quarter) => quarter - 1,
1699
+ }),
1700
+
1701
+ month: buildLocalizeFn({
1702
+ values: monthValues$1,
1703
+ defaultWidth: "wide",
1704
+ }),
1705
+
1706
+ day: buildLocalizeFn({
1707
+ values: dayValues$1,
1708
+ defaultWidth: "wide",
1709
+ }),
1710
+
1711
+ dayPeriod: buildLocalizeFn({
1712
+ values: dayPeriodValues$1,
1713
+ defaultWidth: "wide",
1714
+ formattingValues: formattingDayPeriodValues$1,
1715
+ defaultFormattingWidth: "wide",
1716
+ }),
1717
+ };
1718
+
1719
+ function buildMatchFn(args) {
1720
+ return (string, options = {}) => {
1721
+ const width = options.width;
1722
+
1723
+ const matchPattern =
1724
+ (width && args.matchPatterns[width]) ||
1725
+ args.matchPatterns[args.defaultMatchWidth];
1726
+ const matchResult = string.match(matchPattern);
1727
+
1728
+ if (!matchResult) {
1729
+ return null;
1730
+ }
1731
+ const matchedString = matchResult[0];
1732
+
1733
+ const parsePatterns =
1734
+ (width && args.parsePatterns[width]) ||
1735
+ args.parsePatterns[args.defaultParseWidth];
1736
+
1737
+ const key = Array.isArray(parsePatterns)
1738
+ ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
1739
+ : // [TODO] -- I challenge you to fix the type
1740
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString));
1741
+
1742
+ let value;
1743
+
1744
+ value = args.valueCallback ? args.valueCallback(key) : key;
1745
+ value = options.valueCallback
1746
+ ? // [TODO] -- I challenge you to fix the type
1747
+ options.valueCallback(value)
1748
+ : value;
1749
+
1750
+ const rest = string.slice(matchedString.length);
1751
+
1752
+ return { value, rest };
1753
+ };
1754
+ }
1755
+
1756
+ function findKey(object, predicate) {
1757
+ for (const key in object) {
1758
+ if (
1759
+ Object.prototype.hasOwnProperty.call(object, key) &&
1760
+ predicate(object[key])
1761
+ ) {
1762
+ return key;
1763
+ }
1764
+ }
1765
+ return undefined;
1766
+ }
1767
+
1768
+ function findIndex(array, predicate) {
1769
+ for (let key = 0; key < array.length; key++) {
1770
+ if (predicate(array[key])) {
1771
+ return key;
1772
+ }
1773
+ }
1774
+ return undefined;
1775
+ }
1776
+
1777
+ function buildMatchPatternFn(args) {
1778
+ return (string, options = {}) => {
1779
+ const matchResult = string.match(args.matchPattern);
1780
+ if (!matchResult) return null;
1781
+ const matchedString = matchResult[0];
1782
+
1783
+ const parseResult = string.match(args.parsePattern);
1784
+ if (!parseResult) return null;
1785
+ let value = args.valueCallback
1786
+ ? args.valueCallback(parseResult[0])
1787
+ : parseResult[0];
1788
+
1789
+ // [TODO] I challenge you to fix the type
1790
+ value = options.valueCallback ? options.valueCallback(value) : value;
1791
+
1792
+ const rest = string.slice(matchedString.length);
1793
+
1794
+ return { value, rest };
1795
+ };
1796
+ }
1797
+
1798
+ const matchOrdinalNumberPattern$1 = /^(\d+)(th|st|nd|rd)?/i;
1799
+ const parseOrdinalNumberPattern$1 = /\d+/i;
1800
+
1801
+ const matchEraPatterns$1 = {
1802
+ narrow: /^(b|a)/i,
1803
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1804
+ wide: /^(before christ|before common era|anno domini|common era)/i,
1805
+ };
1806
+ const parseEraPatterns$1 = {
1807
+ any: [/^b/i, /^(a|c)/i],
1808
+ };
1809
+
1810
+ const matchQuarterPatterns$1 = {
1811
+ narrow: /^[1234]/i,
1812
+ abbreviated: /^q[1234]/i,
1813
+ wide: /^[1234](th|st|nd|rd)? quarter/i,
1814
+ };
1815
+ const parseQuarterPatterns$1 = {
1816
+ any: [/1/i, /2/i, /3/i, /4/i],
1817
+ };
1818
+
1819
+ const matchMonthPatterns$1 = {
1820
+ narrow: /^[jfmasond]/i,
1821
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1822
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
1823
+ };
1824
+ const parseMonthPatterns$1 = {
1825
+ narrow: [
1826
+ /^j/i,
1827
+ /^f/i,
1828
+ /^m/i,
1829
+ /^a/i,
1830
+ /^m/i,
1831
+ /^j/i,
1832
+ /^j/i,
1833
+ /^a/i,
1834
+ /^s/i,
1835
+ /^o/i,
1836
+ /^n/i,
1837
+ /^d/i,
1838
+ ],
1839
+
1840
+ any: [
1841
+ /^ja/i,
1842
+ /^f/i,
1843
+ /^mar/i,
1844
+ /^ap/i,
1845
+ /^may/i,
1846
+ /^jun/i,
1847
+ /^jul/i,
1848
+ /^au/i,
1849
+ /^s/i,
1850
+ /^o/i,
1851
+ /^n/i,
1852
+ /^d/i,
1853
+ ],
1854
+ };
1855
+
1856
+ const matchDayPatterns$1 = {
1857
+ narrow: /^[smtwf]/i,
1858
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1859
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1860
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
1861
+ };
1862
+ const parseDayPatterns$1 = {
1863
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1864
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
1865
+ };
1866
+
1867
+ const matchDayPeriodPatterns$1 = {
1868
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1869
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
1870
+ };
1871
+ const parseDayPeriodPatterns$1 = {
1872
+ any: {
1873
+ am: /^a/i,
1874
+ pm: /^p/i,
1875
+ midnight: /^mi/i,
1876
+ noon: /^no/i,
1877
+ morning: /morning/i,
1878
+ afternoon: /afternoon/i,
1879
+ evening: /evening/i,
1880
+ night: /night/i,
1881
+ },
1882
+ };
1883
+
1884
+ const match$1 = {
1885
+ ordinalNumber: buildMatchPatternFn({
1886
+ matchPattern: matchOrdinalNumberPattern$1,
1887
+ parsePattern: parseOrdinalNumberPattern$1,
1888
+ valueCallback: (value) => parseInt(value, 10),
1889
+ }),
1890
+
1891
+ era: buildMatchFn({
1892
+ matchPatterns: matchEraPatterns$1,
1893
+ defaultMatchWidth: "wide",
1894
+ parsePatterns: parseEraPatterns$1,
1895
+ defaultParseWidth: "any",
1896
+ }),
1897
+
1898
+ quarter: buildMatchFn({
1899
+ matchPatterns: matchQuarterPatterns$1,
1900
+ defaultMatchWidth: "wide",
1901
+ parsePatterns: parseQuarterPatterns$1,
1902
+ defaultParseWidth: "any",
1903
+ valueCallback: (index) => index + 1,
1904
+ }),
1905
+
1906
+ month: buildMatchFn({
1907
+ matchPatterns: matchMonthPatterns$1,
1908
+ defaultMatchWidth: "wide",
1909
+ parsePatterns: parseMonthPatterns$1,
1910
+ defaultParseWidth: "any",
1911
+ }),
1912
+
1913
+ day: buildMatchFn({
1914
+ matchPatterns: matchDayPatterns$1,
1915
+ defaultMatchWidth: "wide",
1916
+ parsePatterns: parseDayPatterns$1,
1917
+ defaultParseWidth: "any",
1918
+ }),
1919
+
1920
+ dayPeriod: buildMatchFn({
1921
+ matchPatterns: matchDayPeriodPatterns$1,
1922
+ defaultMatchWidth: "any",
1923
+ parsePatterns: parseDayPeriodPatterns$1,
1924
+ defaultParseWidth: "any",
1925
+ }),
1926
+ };
1927
+
1928
+ /**
1929
+ * @category Locales
1930
+ * @summary English locale (United States).
1931
+ * @language English
1932
+ * @iso-639-2 eng
1933
+ * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
1934
+ * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
1935
+ */
1936
+ const enUS = {
1937
+ code: "en-US",
1938
+ formatDistance: formatDistance$1,
1939
+ formatLong: formatLong$1,
1940
+ formatRelative: formatRelative$1,
1941
+ localize: localize$1,
1942
+ match: match$1,
1943
+ options: {
1944
+ weekStartsOn: 0 /* Sunday */,
1945
+ firstWeekContainsDate: 1,
1946
+ },
1947
+ };
1948
+
1949
+ /**
1950
+ * The {@link getDayOfYear} function options.
1951
+ */
1952
+
1953
+ /**
1954
+ * @name getDayOfYear
1955
+ * @category Day Helpers
1956
+ * @summary Get the day of the year of the given date.
1957
+ *
1958
+ * @description
1959
+ * Get the day of the year of the given date.
1960
+ *
1961
+ * @param date - The given date
1962
+ * @param options - The options
1963
+ *
1964
+ * @returns The day of year
1965
+ *
1966
+ * @example
1967
+ * // Which day of the year is 2 July 2014?
1968
+ * const result = getDayOfYear(new Date(2014, 6, 2))
1969
+ * //=> 183
1970
+ */
1971
+ function getDayOfYear(date, options) {
1972
+ const _date = toDate(date, options?.in);
1973
+ const diff = differenceInCalendarDays(_date, startOfYear(_date));
1974
+ const dayOfYear = diff + 1;
1975
+ return dayOfYear;
1976
+ }
1977
+
1978
+ /**
1979
+ * The {@link getISOWeek} function options.
1980
+ */
1981
+
1982
+ /**
1983
+ * @name getISOWeek
1984
+ * @category ISO Week Helpers
1985
+ * @summary Get the ISO week of the given date.
1986
+ *
1987
+ * @description
1988
+ * Get the ISO week of the given date.
1989
+ *
1990
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1991
+ *
1992
+ * @param date - The given date
1993
+ * @param options - The options
1994
+ *
1995
+ * @returns The ISO week
1996
+ *
1997
+ * @example
1998
+ * // Which week of the ISO-week numbering year is 2 January 2005?
1999
+ * const result = getISOWeek(new Date(2005, 0, 2))
2000
+ * //=> 53
2001
+ */
2002
+ function getISOWeek(date, options) {
2003
+ const _date = toDate(date, options?.in);
2004
+ const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
2005
+
2006
+ // Round the number of weeks to the nearest integer because the number of
2007
+ // milliseconds in a week is not constant (e.g. it's different in the week of
2008
+ // the daylight saving time clock shift).
2009
+ return Math.round(diff / millisecondsInWeek) + 1;
2010
+ }
2011
+
2012
+ /**
2013
+ * The {@link getWeekYear} function options.
2014
+ */
2015
+
2016
+ /**
2017
+ * @name getWeekYear
2018
+ * @category Week-Numbering Year Helpers
2019
+ * @summary Get the local week-numbering year of the given date.
2020
+ *
2021
+ * @description
2022
+ * Get the local week-numbering year of the given date.
2023
+ * The exact calculation depends on the values of
2024
+ * `options.weekStartsOn` (which is the index of the first day of the week)
2025
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
2026
+ * the first week of the week-numbering year)
2027
+ *
2028
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
2029
+ *
2030
+ * @param date - The given date
2031
+ * @param options - An object with options.
2032
+ *
2033
+ * @returns The local week-numbering year
2034
+ *
2035
+ * @example
2036
+ * // Which week numbering year is 26 December 2004 with the default settings?
2037
+ * const result = getWeekYear(new Date(2004, 11, 26))
2038
+ * //=> 2005
2039
+ *
2040
+ * @example
2041
+ * // Which week numbering year is 26 December 2004 if week starts on Saturday?
2042
+ * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
2043
+ * //=> 2004
2044
+ *
2045
+ * @example
2046
+ * // Which week numbering year is 26 December 2004 if the first week contains 4 January?
2047
+ * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
2048
+ * //=> 2004
2049
+ */
2050
+ function getWeekYear(date, options) {
2051
+ const _date = toDate(date, options?.in);
2052
+ const year = _date.getFullYear();
2053
+
2054
+ const defaultOptions = getDefaultOptions();
2055
+ const firstWeekContainsDate =
2056
+ options?.firstWeekContainsDate ??
2057
+ options?.locale?.options?.firstWeekContainsDate ??
2058
+ defaultOptions.firstWeekContainsDate ??
2059
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
2060
+ 1;
2061
+
2062
+ const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
2063
+ firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
2064
+ firstWeekOfNextYear.setHours(0, 0, 0, 0);
2065
+ const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
2066
+
2067
+ const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
2068
+ firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
2069
+ firstWeekOfThisYear.setHours(0, 0, 0, 0);
2070
+ const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
2071
+
2072
+ if (+_date >= +startOfNextYear) {
2073
+ return year + 1;
2074
+ } else if (+_date >= +startOfThisYear) {
2075
+ return year;
2076
+ } else {
2077
+ return year - 1;
2078
+ }
2079
+ }
2080
+
2081
+ /**
2082
+ * The {@link startOfWeekYear} function options.
2083
+ */
2084
+
2085
+ /**
2086
+ * @name startOfWeekYear
2087
+ * @category Week-Numbering Year Helpers
2088
+ * @summary Return the start of a local week-numbering year for the given date.
2089
+ *
2090
+ * @description
2091
+ * Return the start of a local week-numbering year.
2092
+ * The exact calculation depends on the values of
2093
+ * `options.weekStartsOn` (which is the index of the first day of the week)
2094
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
2095
+ * the first week of the week-numbering year)
2096
+ *
2097
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
2098
+ *
2099
+ * @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).
2100
+ * @typeParam ResultDate - The result `Date` type.
2101
+ *
2102
+ * @param date - The original date
2103
+ * @param options - An object with options
2104
+ *
2105
+ * @returns The start of a week-numbering year
2106
+ *
2107
+ * @example
2108
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
2109
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
2110
+ * //=> Sun Dec 26 2004 00:00:00
2111
+ *
2112
+ * @example
2113
+ * // The start of a week-numbering year for 2 July 2005
2114
+ * // if Monday is the first day of week
2115
+ * // and 4 January is always in the first week of the year:
2116
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
2117
+ * weekStartsOn: 1,
2118
+ * firstWeekContainsDate: 4
2119
+ * })
2120
+ * //=> Mon Jan 03 2005 00:00:00
2121
+ */
2122
+ function startOfWeekYear(date, options) {
2123
+ const defaultOptions = getDefaultOptions();
2124
+ const firstWeekContainsDate =
2125
+ options?.firstWeekContainsDate ??
2126
+ options?.locale?.options?.firstWeekContainsDate ??
2127
+ defaultOptions.firstWeekContainsDate ??
2128
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
2129
+ 1;
2130
+
2131
+ const year = getWeekYear(date, options);
2132
+ const firstWeek = constructFrom(options?.in || date, 0);
2133
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
2134
+ firstWeek.setHours(0, 0, 0, 0);
2135
+ const _date = startOfWeek(firstWeek, options);
2136
+ return _date;
2137
+ }
2138
+
2139
+ /**
2140
+ * The {@link getWeek} function options.
2141
+ */
2142
+
2143
+ /**
2144
+ * @name getWeek
2145
+ * @category Week Helpers
2146
+ * @summary Get the local week index of the given date.
2147
+ *
2148
+ * @description
2149
+ * Get the local week index of the given date.
2150
+ * The exact calculation depends on the values of
2151
+ * `options.weekStartsOn` (which is the index of the first day of the week)
2152
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
2153
+ * the first week of the week-numbering year)
2154
+ *
2155
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
2156
+ *
2157
+ * @param date - The given date
2158
+ * @param options - An object with options
2159
+ *
2160
+ * @returns The week
2161
+ *
2162
+ * @example
2163
+ * // Which week of the local week numbering year is 2 January 2005 with default options?
2164
+ * const result = getWeek(new Date(2005, 0, 2))
2165
+ * //=> 2
2166
+ *
2167
+ * @example
2168
+ * // Which week of the local week numbering year is 2 January 2005,
2169
+ * // if Monday is the first day of the week,
2170
+ * // and the first week of the year always contains 4 January?
2171
+ * const result = getWeek(new Date(2005, 0, 2), {
2172
+ * weekStartsOn: 1,
2173
+ * firstWeekContainsDate: 4
2174
+ * })
2175
+ * //=> 53
2176
+ */
2177
+ function getWeek(date, options) {
2178
+ const _date = toDate(date, options?.in);
2179
+ const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
2180
+
2181
+ // Round the number of weeks to the nearest integer because the number of
2182
+ // milliseconds in a week is not constant (e.g. it's different in the week of
2183
+ // the daylight saving time clock shift).
2184
+ return Math.round(diff / millisecondsInWeek) + 1;
2185
+ }
2186
+
2187
+ function addLeadingZeros(number, targetLength) {
2188
+ const sign = number < 0 ? "-" : "";
2189
+ const output = Math.abs(number).toString().padStart(targetLength, "0");
2190
+ return sign + output;
2191
+ }
2192
+
2193
+ /*
2194
+ * | | Unit | | Unit |
2195
+ * |-----|--------------------------------|-----|--------------------------------|
2196
+ * | a | AM, PM | A* | |
2197
+ * | d | Day of month | D | |
2198
+ * | h | Hour [1-12] | H | Hour [0-23] |
2199
+ * | m | Minute | M | Month |
2200
+ * | s | Second | S | Fraction of second |
2201
+ * | y | Year (abs) | Y | |
2202
+ *
2203
+ * Letters marked by * are not implemented but reserved by Unicode standard.
2204
+ */
2205
+
2206
+ const lightFormatters = {
2207
+ // Year
2208
+ y(date, token) {
2209
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
2210
+ // | Year | y | yy | yyy | yyyy | yyyyy |
2211
+ // |----------|-------|----|-------|-------|-------|
2212
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
2213
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
2214
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
2215
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
2216
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
2217
+
2218
+ const signedYear = date.getFullYear();
2219
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2220
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2221
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
2222
+ },
2223
+
2224
+ // Month
2225
+ M(date, token) {
2226
+ const month = date.getMonth();
2227
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
2228
+ },
2229
+
2230
+ // Day of the month
2231
+ d(date, token) {
2232
+ return addLeadingZeros(date.getDate(), token.length);
2233
+ },
2234
+
2235
+ // AM or PM
2236
+ a(date, token) {
2237
+ const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
2238
+
2239
+ switch (token) {
2240
+ case "a":
2241
+ case "aa":
2242
+ return dayPeriodEnumValue.toUpperCase();
2243
+ case "aaa":
2244
+ return dayPeriodEnumValue;
2245
+ case "aaaaa":
2246
+ return dayPeriodEnumValue[0];
2247
+ case "aaaa":
2248
+ default:
2249
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
2250
+ }
2251
+ },
2252
+
2253
+ // Hour [1-12]
2254
+ h(date, token) {
2255
+ return addLeadingZeros(date.getHours() % 12 || 12, token.length);
2256
+ },
2257
+
2258
+ // Hour [0-23]
2259
+ H(date, token) {
2260
+ return addLeadingZeros(date.getHours(), token.length);
2261
+ },
2262
+
2263
+ // Minute
2264
+ m(date, token) {
2265
+ return addLeadingZeros(date.getMinutes(), token.length);
2266
+ },
2267
+
2268
+ // Second
2269
+ s(date, token) {
2270
+ return addLeadingZeros(date.getSeconds(), token.length);
2271
+ },
2272
+
2273
+ // Fraction of second
2274
+ S(date, token) {
2275
+ const numberOfDigits = token.length;
2276
+ const milliseconds = date.getMilliseconds();
2277
+ const fractionalSeconds = Math.trunc(
2278
+ milliseconds * Math.pow(10, numberOfDigits - 3),
2279
+ );
2280
+ return addLeadingZeros(fractionalSeconds, token.length);
2281
+ },
2282
+ };
2283
+
2284
+ const dayPeriodEnum = {
2285
+ midnight: "midnight",
2286
+ noon: "noon",
2287
+ morning: "morning",
2288
+ afternoon: "afternoon",
2289
+ evening: "evening",
2290
+ night: "night",
2291
+ };
2292
+
2293
+ /*
2294
+ * | | Unit | | Unit |
2295
+ * |-----|--------------------------------|-----|--------------------------------|
2296
+ * | a | AM, PM | A* | Milliseconds in day |
2297
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
2298
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
2299
+ * | d | Day of month | D | Day of year |
2300
+ * | e | Local day of week | E | Day of week |
2301
+ * | f | | F* | Day of week in month |
2302
+ * | g* | Modified Julian day | G | Era |
2303
+ * | h | Hour [1-12] | H | Hour [0-23] |
2304
+ * | i! | ISO day of week | I! | ISO week of year |
2305
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
2306
+ * | k | Hour [1-24] | K | Hour [0-11] |
2307
+ * | l* | (deprecated) | L | Stand-alone month |
2308
+ * | m | Minute | M | Month |
2309
+ * | n | | N | |
2310
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
2311
+ * | p! | Long localized time | P! | Long localized date |
2312
+ * | q | Stand-alone quarter | Q | Quarter |
2313
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
2314
+ * | s | Second | S | Fraction of second |
2315
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
2316
+ * | u | Extended year | U* | Cyclic year |
2317
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
2318
+ * | w | Local week of year | W* | Week of month |
2319
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
2320
+ * | y | Year (abs) | Y | Local week-numbering year |
2321
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
2322
+ *
2323
+ * Letters marked by * are not implemented but reserved by Unicode standard.
2324
+ *
2325
+ * Letters marked by ! are non-standard, but implemented by date-fns:
2326
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
2327
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
2328
+ * i.e. 7 for Sunday, 1 for Monday, etc.
2329
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
2330
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
2331
+ * `R` is supposed to be used in conjunction with `I` and `i`
2332
+ * for universal ISO week-numbering date, whereas
2333
+ * `Y` is supposed to be used in conjunction with `w` and `e`
2334
+ * for week-numbering date specific to the locale.
2335
+ * - `P` is long localized date format
2336
+ * - `p` is long localized time format
2337
+ */
2338
+
2339
+ const formatters = {
2340
+ // Era
2341
+ G: function (date, token, localize) {
2342
+ const era = date.getFullYear() > 0 ? 1 : 0;
2343
+ switch (token) {
2344
+ // AD, BC
2345
+ case "G":
2346
+ case "GG":
2347
+ case "GGG":
2348
+ return localize.era(era, { width: "abbreviated" });
2349
+ // A, B
2350
+ case "GGGGG":
2351
+ return localize.era(era, { width: "narrow" });
2352
+ // Anno Domini, Before Christ
2353
+ case "GGGG":
2354
+ default:
2355
+ return localize.era(era, { width: "wide" });
2356
+ }
2357
+ },
2358
+
2359
+ // Year
2360
+ y: function (date, token, localize) {
2361
+ // Ordinal number
2362
+ if (token === "yo") {
2363
+ const signedYear = date.getFullYear();
2364
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2365
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2366
+ return localize.ordinalNumber(year, { unit: "year" });
2367
+ }
2368
+
2369
+ return lightFormatters.y(date, token);
2370
+ },
2371
+
2372
+ // Local week-numbering year
2373
+ Y: function (date, token, localize, options) {
2374
+ const signedWeekYear = getWeekYear(date, options);
2375
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2376
+ const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
2377
+
2378
+ // Two digit year
2379
+ if (token === "YY") {
2380
+ const twoDigitYear = weekYear % 100;
2381
+ return addLeadingZeros(twoDigitYear, 2);
2382
+ }
2383
+
2384
+ // Ordinal number
2385
+ if (token === "Yo") {
2386
+ return localize.ordinalNumber(weekYear, { unit: "year" });
2387
+ }
2388
+
2389
+ // Padding
2390
+ return addLeadingZeros(weekYear, token.length);
2391
+ },
2392
+
2393
+ // ISO week-numbering year
2394
+ R: function (date, token) {
2395
+ const isoWeekYear = getISOWeekYear(date);
2396
+
2397
+ // Padding
2398
+ return addLeadingZeros(isoWeekYear, token.length);
2399
+ },
2400
+
2401
+ // Extended year. This is a single number designating the year of this calendar system.
2402
+ // The main difference between `y` and `u` localizers are B.C. years:
2403
+ // | Year | `y` | `u` |
2404
+ // |------|-----|-----|
2405
+ // | AC 1 | 1 | 1 |
2406
+ // | BC 1 | 1 | 0 |
2407
+ // | BC 2 | 2 | -1 |
2408
+ // Also `yy` always returns the last two digits of a year,
2409
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
2410
+ u: function (date, token) {
2411
+ const year = date.getFullYear();
2412
+ return addLeadingZeros(year, token.length);
2413
+ },
2414
+
2415
+ // Quarter
2416
+ Q: function (date, token, localize) {
2417
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2418
+ switch (token) {
2419
+ // 1, 2, 3, 4
2420
+ case "Q":
2421
+ return String(quarter);
2422
+ // 01, 02, 03, 04
2423
+ case "QQ":
2424
+ return addLeadingZeros(quarter, 2);
2425
+ // 1st, 2nd, 3rd, 4th
2426
+ case "Qo":
2427
+ return localize.ordinalNumber(quarter, { unit: "quarter" });
2428
+ // Q1, Q2, Q3, Q4
2429
+ case "QQQ":
2430
+ return localize.quarter(quarter, {
2431
+ width: "abbreviated",
2432
+ context: "formatting",
2433
+ });
2434
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2435
+ case "QQQQQ":
2436
+ return localize.quarter(quarter, {
2437
+ width: "narrow",
2438
+ context: "formatting",
2439
+ });
2440
+ // 1st quarter, 2nd quarter, ...
2441
+ case "QQQQ":
2442
+ default:
2443
+ return localize.quarter(quarter, {
2444
+ width: "wide",
2445
+ context: "formatting",
2446
+ });
2447
+ }
2448
+ },
2449
+
2450
+ // Stand-alone quarter
2451
+ q: function (date, token, localize) {
2452
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2453
+ switch (token) {
2454
+ // 1, 2, 3, 4
2455
+ case "q":
2456
+ return String(quarter);
2457
+ // 01, 02, 03, 04
2458
+ case "qq":
2459
+ return addLeadingZeros(quarter, 2);
2460
+ // 1st, 2nd, 3rd, 4th
2461
+ case "qo":
2462
+ return localize.ordinalNumber(quarter, { unit: "quarter" });
2463
+ // Q1, Q2, Q3, Q4
2464
+ case "qqq":
2465
+ return localize.quarter(quarter, {
2466
+ width: "abbreviated",
2467
+ context: "standalone",
2468
+ });
2469
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2470
+ case "qqqqq":
2471
+ return localize.quarter(quarter, {
2472
+ width: "narrow",
2473
+ context: "standalone",
2474
+ });
2475
+ // 1st quarter, 2nd quarter, ...
2476
+ case "qqqq":
2477
+ default:
2478
+ return localize.quarter(quarter, {
2479
+ width: "wide",
2480
+ context: "standalone",
2481
+ });
2482
+ }
2483
+ },
2484
+
2485
+ // Month
2486
+ M: function (date, token, localize) {
2487
+ const month = date.getMonth();
2488
+ switch (token) {
2489
+ case "M":
2490
+ case "MM":
2491
+ return lightFormatters.M(date, token);
2492
+ // 1st, 2nd, ..., 12th
2493
+ case "Mo":
2494
+ return localize.ordinalNumber(month + 1, { unit: "month" });
2495
+ // Jan, Feb, ..., Dec
2496
+ case "MMM":
2497
+ return localize.month(month, {
2498
+ width: "abbreviated",
2499
+ context: "formatting",
2500
+ });
2501
+ // J, F, ..., D
2502
+ case "MMMMM":
2503
+ return localize.month(month, {
2504
+ width: "narrow",
2505
+ context: "formatting",
2506
+ });
2507
+ // January, February, ..., December
2508
+ case "MMMM":
2509
+ default:
2510
+ return localize.month(month, { width: "wide", context: "formatting" });
2511
+ }
2512
+ },
2513
+
2514
+ // Stand-alone month
2515
+ L: function (date, token, localize) {
2516
+ const month = date.getMonth();
2517
+ switch (token) {
2518
+ // 1, 2, ..., 12
2519
+ case "L":
2520
+ return String(month + 1);
2521
+ // 01, 02, ..., 12
2522
+ case "LL":
2523
+ return addLeadingZeros(month + 1, 2);
2524
+ // 1st, 2nd, ..., 12th
2525
+ case "Lo":
2526
+ return localize.ordinalNumber(month + 1, { unit: "month" });
2527
+ // Jan, Feb, ..., Dec
2528
+ case "LLL":
2529
+ return localize.month(month, {
2530
+ width: "abbreviated",
2531
+ context: "standalone",
2532
+ });
2533
+ // J, F, ..., D
2534
+ case "LLLLL":
2535
+ return localize.month(month, {
2536
+ width: "narrow",
2537
+ context: "standalone",
2538
+ });
2539
+ // January, February, ..., December
2540
+ case "LLLL":
2541
+ default:
2542
+ return localize.month(month, { width: "wide", context: "standalone" });
2543
+ }
2544
+ },
2545
+
2546
+ // Local week of year
2547
+ w: function (date, token, localize, options) {
2548
+ const week = getWeek(date, options);
2549
+
2550
+ if (token === "wo") {
2551
+ return localize.ordinalNumber(week, { unit: "week" });
2552
+ }
2553
+
2554
+ return addLeadingZeros(week, token.length);
2555
+ },
2556
+
2557
+ // ISO week of year
2558
+ I: function (date, token, localize) {
2559
+ const isoWeek = getISOWeek(date);
2560
+
2561
+ if (token === "Io") {
2562
+ return localize.ordinalNumber(isoWeek, { unit: "week" });
2563
+ }
2564
+
2565
+ return addLeadingZeros(isoWeek, token.length);
2566
+ },
2567
+
2568
+ // Day of the month
2569
+ d: function (date, token, localize) {
2570
+ if (token === "do") {
2571
+ return localize.ordinalNumber(date.getDate(), { unit: "date" });
2572
+ }
2573
+
2574
+ return lightFormatters.d(date, token);
2575
+ },
2576
+
2577
+ // Day of year
2578
+ D: function (date, token, localize) {
2579
+ const dayOfYear = getDayOfYear(date);
2580
+
2581
+ if (token === "Do") {
2582
+ return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
2583
+ }
2584
+
2585
+ return addLeadingZeros(dayOfYear, token.length);
2586
+ },
2587
+
2588
+ // Day of week
2589
+ E: function (date, token, localize) {
2590
+ const dayOfWeek = date.getDay();
2591
+ switch (token) {
2592
+ // Tue
2593
+ case "E":
2594
+ case "EE":
2595
+ case "EEE":
2596
+ return localize.day(dayOfWeek, {
2597
+ width: "abbreviated",
2598
+ context: "formatting",
2599
+ });
2600
+ // T
2601
+ case "EEEEE":
2602
+ return localize.day(dayOfWeek, {
2603
+ width: "narrow",
2604
+ context: "formatting",
2605
+ });
2606
+ // Tu
2607
+ case "EEEEEE":
2608
+ return localize.day(dayOfWeek, {
2609
+ width: "short",
2610
+ context: "formatting",
2611
+ });
2612
+ // Tuesday
2613
+ case "EEEE":
2614
+ default:
2615
+ return localize.day(dayOfWeek, {
2616
+ width: "wide",
2617
+ context: "formatting",
2618
+ });
2619
+ }
2620
+ },
2621
+
2622
+ // Local day of week
2623
+ e: function (date, token, localize, options) {
2624
+ const dayOfWeek = date.getDay();
2625
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2626
+ switch (token) {
2627
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
2628
+ case "e":
2629
+ return String(localDayOfWeek);
2630
+ // Padded numerical value
2631
+ case "ee":
2632
+ return addLeadingZeros(localDayOfWeek, 2);
2633
+ // 1st, 2nd, ..., 7th
2634
+ case "eo":
2635
+ return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
2636
+ case "eee":
2637
+ return localize.day(dayOfWeek, {
2638
+ width: "abbreviated",
2639
+ context: "formatting",
2640
+ });
2641
+ // T
2642
+ case "eeeee":
2643
+ return localize.day(dayOfWeek, {
2644
+ width: "narrow",
2645
+ context: "formatting",
2646
+ });
2647
+ // Tu
2648
+ case "eeeeee":
2649
+ return localize.day(dayOfWeek, {
2650
+ width: "short",
2651
+ context: "formatting",
2652
+ });
2653
+ // Tuesday
2654
+ case "eeee":
2655
+ default:
2656
+ return localize.day(dayOfWeek, {
2657
+ width: "wide",
2658
+ context: "formatting",
2659
+ });
2660
+ }
2661
+ },
2662
+
2663
+ // Stand-alone local day of week
2664
+ c: function (date, token, localize, options) {
2665
+ const dayOfWeek = date.getDay();
2666
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2667
+ switch (token) {
2668
+ // Numerical value (same as in `e`)
2669
+ case "c":
2670
+ return String(localDayOfWeek);
2671
+ // Padded numerical value
2672
+ case "cc":
2673
+ return addLeadingZeros(localDayOfWeek, token.length);
2674
+ // 1st, 2nd, ..., 7th
2675
+ case "co":
2676
+ return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
2677
+ case "ccc":
2678
+ return localize.day(dayOfWeek, {
2679
+ width: "abbreviated",
2680
+ context: "standalone",
2681
+ });
2682
+ // T
2683
+ case "ccccc":
2684
+ return localize.day(dayOfWeek, {
2685
+ width: "narrow",
2686
+ context: "standalone",
2687
+ });
2688
+ // Tu
2689
+ case "cccccc":
2690
+ return localize.day(dayOfWeek, {
2691
+ width: "short",
2692
+ context: "standalone",
2693
+ });
2694
+ // Tuesday
2695
+ case "cccc":
2696
+ default:
2697
+ return localize.day(dayOfWeek, {
2698
+ width: "wide",
2699
+ context: "standalone",
2700
+ });
2701
+ }
2702
+ },
2703
+
2704
+ // ISO day of week
2705
+ i: function (date, token, localize) {
2706
+ const dayOfWeek = date.getDay();
2707
+ const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
2708
+ switch (token) {
2709
+ // 2
2710
+ case "i":
2711
+ return String(isoDayOfWeek);
2712
+ // 02
2713
+ case "ii":
2714
+ return addLeadingZeros(isoDayOfWeek, token.length);
2715
+ // 2nd
2716
+ case "io":
2717
+ return localize.ordinalNumber(isoDayOfWeek, { unit: "day" });
2718
+ // Tue
2719
+ case "iii":
2720
+ return localize.day(dayOfWeek, {
2721
+ width: "abbreviated",
2722
+ context: "formatting",
2723
+ });
2724
+ // T
2725
+ case "iiiii":
2726
+ return localize.day(dayOfWeek, {
2727
+ width: "narrow",
2728
+ context: "formatting",
2729
+ });
2730
+ // Tu
2731
+ case "iiiiii":
2732
+ return localize.day(dayOfWeek, {
2733
+ width: "short",
2734
+ context: "formatting",
2735
+ });
2736
+ // Tuesday
2737
+ case "iiii":
2738
+ default:
2739
+ return localize.day(dayOfWeek, {
2740
+ width: "wide",
2741
+ context: "formatting",
2742
+ });
2743
+ }
2744
+ },
2745
+
2746
+ // AM or PM
2747
+ a: function (date, token, localize) {
2748
+ const hours = date.getHours();
2749
+ const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2750
+
2751
+ switch (token) {
2752
+ case "a":
2753
+ case "aa":
2754
+ return localize.dayPeriod(dayPeriodEnumValue, {
2755
+ width: "abbreviated",
2756
+ context: "formatting",
2757
+ });
2758
+ case "aaa":
2759
+ return localize
2760
+ .dayPeriod(dayPeriodEnumValue, {
2761
+ width: "abbreviated",
2762
+ context: "formatting",
2763
+ })
2764
+ .toLowerCase();
2765
+ case "aaaaa":
2766
+ return localize.dayPeriod(dayPeriodEnumValue, {
2767
+ width: "narrow",
2768
+ context: "formatting",
2769
+ });
2770
+ case "aaaa":
2771
+ default:
2772
+ return localize.dayPeriod(dayPeriodEnumValue, {
2773
+ width: "wide",
2774
+ context: "formatting",
2775
+ });
2776
+ }
2777
+ },
2778
+
2779
+ // AM, PM, midnight, noon
2780
+ b: function (date, token, localize) {
2781
+ const hours = date.getHours();
2782
+ let dayPeriodEnumValue;
2783
+ if (hours === 12) {
2784
+ dayPeriodEnumValue = dayPeriodEnum.noon;
2785
+ } else if (hours === 0) {
2786
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
2787
+ } else {
2788
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2789
+ }
2790
+
2791
+ switch (token) {
2792
+ case "b":
2793
+ case "bb":
2794
+ return localize.dayPeriod(dayPeriodEnumValue, {
2795
+ width: "abbreviated",
2796
+ context: "formatting",
2797
+ });
2798
+ case "bbb":
2799
+ return localize
2800
+ .dayPeriod(dayPeriodEnumValue, {
2801
+ width: "abbreviated",
2802
+ context: "formatting",
2803
+ })
2804
+ .toLowerCase();
2805
+ case "bbbbb":
2806
+ return localize.dayPeriod(dayPeriodEnumValue, {
2807
+ width: "narrow",
2808
+ context: "formatting",
2809
+ });
2810
+ case "bbbb":
2811
+ default:
2812
+ return localize.dayPeriod(dayPeriodEnumValue, {
2813
+ width: "wide",
2814
+ context: "formatting",
2815
+ });
2816
+ }
2817
+ },
2818
+
2819
+ // in the morning, in the afternoon, in the evening, at night
2820
+ B: function (date, token, localize) {
2821
+ const hours = date.getHours();
2822
+ let dayPeriodEnumValue;
2823
+ if (hours >= 17) {
2824
+ dayPeriodEnumValue = dayPeriodEnum.evening;
2825
+ } else if (hours >= 12) {
2826
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
2827
+ } else if (hours >= 4) {
2828
+ dayPeriodEnumValue = dayPeriodEnum.morning;
2829
+ } else {
2830
+ dayPeriodEnumValue = dayPeriodEnum.night;
2831
+ }
2832
+
2833
+ switch (token) {
2834
+ case "B":
2835
+ case "BB":
2836
+ case "BBB":
2837
+ return localize.dayPeriod(dayPeriodEnumValue, {
2838
+ width: "abbreviated",
2839
+ context: "formatting",
2840
+ });
2841
+ case "BBBBB":
2842
+ return localize.dayPeriod(dayPeriodEnumValue, {
2843
+ width: "narrow",
2844
+ context: "formatting",
2845
+ });
2846
+ case "BBBB":
2847
+ default:
2848
+ return localize.dayPeriod(dayPeriodEnumValue, {
2849
+ width: "wide",
2850
+ context: "formatting",
2851
+ });
2852
+ }
2853
+ },
2854
+
2855
+ // Hour [1-12]
2856
+ h: function (date, token, localize) {
2857
+ if (token === "ho") {
2858
+ let hours = date.getHours() % 12;
2859
+ if (hours === 0) hours = 12;
2860
+ return localize.ordinalNumber(hours, { unit: "hour" });
2861
+ }
2862
+
2863
+ return lightFormatters.h(date, token);
2864
+ },
2865
+
2866
+ // Hour [0-23]
2867
+ H: function (date, token, localize) {
2868
+ if (token === "Ho") {
2869
+ return localize.ordinalNumber(date.getHours(), { unit: "hour" });
2870
+ }
2871
+
2872
+ return lightFormatters.H(date, token);
2873
+ },
2874
+
2875
+ // Hour [0-11]
2876
+ K: function (date, token, localize) {
2877
+ const hours = date.getHours() % 12;
2878
+
2879
+ if (token === "Ko") {
2880
+ return localize.ordinalNumber(hours, { unit: "hour" });
2881
+ }
2882
+
2883
+ return addLeadingZeros(hours, token.length);
2884
+ },
2885
+
2886
+ // Hour [1-24]
2887
+ k: function (date, token, localize) {
2888
+ let hours = date.getHours();
2889
+ if (hours === 0) hours = 24;
2890
+
2891
+ if (token === "ko") {
2892
+ return localize.ordinalNumber(hours, { unit: "hour" });
2893
+ }
2894
+
2895
+ return addLeadingZeros(hours, token.length);
2896
+ },
2897
+
2898
+ // Minute
2899
+ m: function (date, token, localize) {
2900
+ if (token === "mo") {
2901
+ return localize.ordinalNumber(date.getMinutes(), { unit: "minute" });
2902
+ }
2903
+
2904
+ return lightFormatters.m(date, token);
2905
+ },
2906
+
2907
+ // Second
2908
+ s: function (date, token, localize) {
2909
+ if (token === "so") {
2910
+ return localize.ordinalNumber(date.getSeconds(), { unit: "second" });
2911
+ }
2912
+
2913
+ return lightFormatters.s(date, token);
2914
+ },
2915
+
2916
+ // Fraction of second
2917
+ S: function (date, token) {
2918
+ return lightFormatters.S(date, token);
2919
+ },
2920
+
2921
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
2922
+ X: function (date, token, _localize) {
2923
+ const timezoneOffset = date.getTimezoneOffset();
2924
+
2925
+ if (timezoneOffset === 0) {
2926
+ return "Z";
2927
+ }
2928
+
2929
+ switch (token) {
2930
+ // Hours and optional minutes
2931
+ case "X":
2932
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2933
+
2934
+ // Hours, minutes and optional seconds without `:` delimiter
2935
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2936
+ // so this token always has the same output as `XX`
2937
+ case "XXXX":
2938
+ case "XX": // Hours and minutes without `:` delimiter
2939
+ return formatTimezone(timezoneOffset);
2940
+
2941
+ // Hours, minutes and optional seconds with `:` delimiter
2942
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2943
+ // so this token always has the same output as `XXX`
2944
+ case "XXXXX":
2945
+ case "XXX": // Hours and minutes with `:` delimiter
2946
+ default:
2947
+ return formatTimezone(timezoneOffset, ":");
2948
+ }
2949
+ },
2950
+
2951
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
2952
+ x: function (date, token, _localize) {
2953
+ const timezoneOffset = date.getTimezoneOffset();
2954
+
2955
+ switch (token) {
2956
+ // Hours and optional minutes
2957
+ case "x":
2958
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2959
+
2960
+ // Hours, minutes and optional seconds without `:` delimiter
2961
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2962
+ // so this token always has the same output as `xx`
2963
+ case "xxxx":
2964
+ case "xx": // Hours and minutes without `:` delimiter
2965
+ return formatTimezone(timezoneOffset);
2966
+
2967
+ // Hours, minutes and optional seconds with `:` delimiter
2968
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2969
+ // so this token always has the same output as `xxx`
2970
+ case "xxxxx":
2971
+ case "xxx": // Hours and minutes with `:` delimiter
2972
+ default:
2973
+ return formatTimezone(timezoneOffset, ":");
2974
+ }
2975
+ },
2976
+
2977
+ // Timezone (GMT)
2978
+ O: function (date, token, _localize) {
2979
+ const timezoneOffset = date.getTimezoneOffset();
2980
+
2981
+ switch (token) {
2982
+ // Short
2983
+ case "O":
2984
+ case "OO":
2985
+ case "OOO":
2986
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
2987
+ // Long
2988
+ case "OOOO":
2989
+ default:
2990
+ return "GMT" + formatTimezone(timezoneOffset, ":");
2991
+ }
2992
+ },
2993
+
2994
+ // Timezone (specific non-location)
2995
+ z: function (date, token, _localize) {
2996
+ const timezoneOffset = date.getTimezoneOffset();
2997
+
2998
+ switch (token) {
2999
+ // Short
3000
+ case "z":
3001
+ case "zz":
3002
+ case "zzz":
3003
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
3004
+ // Long
3005
+ case "zzzz":
3006
+ default:
3007
+ return "GMT" + formatTimezone(timezoneOffset, ":");
3008
+ }
3009
+ },
3010
+
3011
+ // Seconds timestamp
3012
+ t: function (date, token, _localize) {
3013
+ const timestamp = Math.trunc(+date / 1000);
3014
+ return addLeadingZeros(timestamp, token.length);
3015
+ },
3016
+
3017
+ // Milliseconds timestamp
3018
+ T: function (date, token, _localize) {
3019
+ return addLeadingZeros(+date, token.length);
3020
+ },
3021
+ };
3022
+
3023
+ function formatTimezoneShort(offset, delimiter = "") {
3024
+ const sign = offset > 0 ? "-" : "+";
3025
+ const absOffset = Math.abs(offset);
3026
+ const hours = Math.trunc(absOffset / 60);
3027
+ const minutes = absOffset % 60;
3028
+ if (minutes === 0) {
3029
+ return sign + String(hours);
3030
+ }
3031
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
3032
+ }
3033
+
3034
+ function formatTimezoneWithOptionalMinutes(offset, delimiter) {
3035
+ if (offset % 60 === 0) {
3036
+ const sign = offset > 0 ? "-" : "+";
3037
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
3038
+ }
3039
+ return formatTimezone(offset, delimiter);
3040
+ }
3041
+
3042
+ function formatTimezone(offset, delimiter = "") {
3043
+ const sign = offset > 0 ? "-" : "+";
3044
+ const absOffset = Math.abs(offset);
3045
+ const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
3046
+ const minutes = addLeadingZeros(absOffset % 60, 2);
3047
+ return sign + hours + delimiter + minutes;
3048
+ }
3049
+
3050
+ const dateLongFormatter = (pattern, formatLong) => {
3051
+ switch (pattern) {
3052
+ case "P":
3053
+ return formatLong.date({ width: "short" });
3054
+ case "PP":
3055
+ return formatLong.date({ width: "medium" });
3056
+ case "PPP":
3057
+ return formatLong.date({ width: "long" });
3058
+ case "PPPP":
3059
+ default:
3060
+ return formatLong.date({ width: "full" });
3061
+ }
3062
+ };
3063
+
3064
+ const timeLongFormatter = (pattern, formatLong) => {
3065
+ switch (pattern) {
3066
+ case "p":
3067
+ return formatLong.time({ width: "short" });
3068
+ case "pp":
3069
+ return formatLong.time({ width: "medium" });
3070
+ case "ppp":
3071
+ return formatLong.time({ width: "long" });
3072
+ case "pppp":
3073
+ default:
3074
+ return formatLong.time({ width: "full" });
3075
+ }
3076
+ };
3077
+
3078
+ const dateTimeLongFormatter = (pattern, formatLong) => {
3079
+ const matchResult = pattern.match(/(P+)(p+)?/) || [];
3080
+ const datePattern = matchResult[1];
3081
+ const timePattern = matchResult[2];
3082
+
3083
+ if (!timePattern) {
3084
+ return dateLongFormatter(pattern, formatLong);
3085
+ }
3086
+
3087
+ let dateTimeFormat;
3088
+
3089
+ switch (datePattern) {
3090
+ case "P":
3091
+ dateTimeFormat = formatLong.dateTime({ width: "short" });
3092
+ break;
3093
+ case "PP":
3094
+ dateTimeFormat = formatLong.dateTime({ width: "medium" });
3095
+ break;
3096
+ case "PPP":
3097
+ dateTimeFormat = formatLong.dateTime({ width: "long" });
3098
+ break;
3099
+ case "PPPP":
3100
+ default:
3101
+ dateTimeFormat = formatLong.dateTime({ width: "full" });
3102
+ break;
3103
+ }
3104
+
3105
+ return dateTimeFormat
3106
+ .replace("{{date}}", dateLongFormatter(datePattern, formatLong))
3107
+ .replace("{{time}}", timeLongFormatter(timePattern, formatLong));
3108
+ };
3109
+
3110
+ const longFormatters = {
3111
+ p: timeLongFormatter,
3112
+ P: dateTimeLongFormatter,
3113
+ };
3114
+
3115
+ const dayOfYearTokenRE = /^D+$/;
3116
+ const weekYearTokenRE = /^Y+$/;
3117
+
3118
+ const throwTokens = ["D", "DD", "YY", "YYYY"];
3119
+
3120
+ function isProtectedDayOfYearToken(token) {
3121
+ return dayOfYearTokenRE.test(token);
3122
+ }
3123
+
3124
+ function isProtectedWeekYearToken(token) {
3125
+ return weekYearTokenRE.test(token);
3126
+ }
3127
+
3128
+ function warnOrThrowProtectedError(token, format, input) {
3129
+ const _message = message(token, format, input);
3130
+ console.warn(_message);
3131
+ if (throwTokens.includes(token)) throw new RangeError(_message);
3132
+ }
3133
+
3134
+ function message(token, format, input) {
3135
+ const subject = token[0] === "Y" ? "years" : "days of the month";
3136
+ 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`;
3137
+ }
3138
+
3139
+ // This RegExp consists of three parts separated by `|`:
3140
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
3141
+ // (one of the certain letters followed by `o`)
3142
+ // - (\w)\1* matches any sequences of the same letter
3143
+ // - '' matches two quote characters in a row
3144
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
3145
+ // except a single quote symbol, which ends the sequence.
3146
+ // Two quote characters do not end the sequence.
3147
+ // If there is no matching single quote
3148
+ // then the sequence will continue until the end of the string.
3149
+ // - . matches any single character unmatched by previous parts of the RegExps
3150
+ const formattingTokensRegExp =
3151
+ /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
3152
+
3153
+ // This RegExp catches symbols escaped by quotes, and also
3154
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
3155
+ const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
3156
+
3157
+ const escapedStringRegExp = /^'([^]*?)'?$/;
3158
+ const doubleQuoteRegExp = /''/g;
3159
+ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
3160
+
3161
+ /**
3162
+ * The {@link format} function options.
3163
+ */
3164
+
3165
+ /**
3166
+ * @name format
3167
+ * @alias formatDate
3168
+ * @category Common Helpers
3169
+ * @summary Format the date.
3170
+ *
3171
+ * @description
3172
+ * Return the formatted date string in the given format. The result may vary by locale.
3173
+ *
3174
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
3175
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3176
+ *
3177
+ * The characters wrapped between two single quotes characters (') are escaped.
3178
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
3179
+ * (see the last example)
3180
+ *
3181
+ * Format of the string is based on Unicode Technical Standard #35:
3182
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
3183
+ * with a few additions (see note 7 below the table).
3184
+ *
3185
+ * Accepted patterns:
3186
+ * | Unit | Pattern | Result examples | Notes |
3187
+ * |---------------------------------|---------|-----------------------------------|-------|
3188
+ * | Era | G..GGG | AD, BC | |
3189
+ * | | GGGG | Anno Domini, Before Christ | 2 |
3190
+ * | | GGGGG | A, B | |
3191
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
3192
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
3193
+ * | | yy | 44, 01, 00, 17 | 5 |
3194
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
3195
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
3196
+ * | | yyyyy | ... | 3,5 |
3197
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
3198
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
3199
+ * | | YY | 44, 01, 00, 17 | 5,8 |
3200
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
3201
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
3202
+ * | | YYYYY | ... | 3,5 |
3203
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
3204
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
3205
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
3206
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
3207
+ * | | RRRRR | ... | 3,5,7 |
3208
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
3209
+ * | | uu | -43, 01, 1900, 2017 | 5 |
3210
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
3211
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
3212
+ * | | uuuuu | ... | 3,5 |
3213
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
3214
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
3215
+ * | | QQ | 01, 02, 03, 04 | |
3216
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
3217
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
3218
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
3219
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
3220
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
3221
+ * | | qq | 01, 02, 03, 04 | |
3222
+ * | | qqq | Q1, Q2, Q3, Q4 | |
3223
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
3224
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
3225
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
3226
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
3227
+ * | | MM | 01, 02, ..., 12 | |
3228
+ * | | MMM | Jan, Feb, ..., Dec | |
3229
+ * | | MMMM | January, February, ..., December | 2 |
3230
+ * | | MMMMM | J, F, ..., D | |
3231
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
3232
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
3233
+ * | | LL | 01, 02, ..., 12 | |
3234
+ * | | LLL | Jan, Feb, ..., Dec | |
3235
+ * | | LLLL | January, February, ..., December | 2 |
3236
+ * | | LLLLL | J, F, ..., D | |
3237
+ * | Local week of year | w | 1, 2, ..., 53 | |
3238
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
3239
+ * | | ww | 01, 02, ..., 53 | |
3240
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
3241
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
3242
+ * | | II | 01, 02, ..., 53 | 7 |
3243
+ * | Day of month | d | 1, 2, ..., 31 | |
3244
+ * | | do | 1st, 2nd, ..., 31st | 7 |
3245
+ * | | dd | 01, 02, ..., 31 | |
3246
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
3247
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
3248
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
3249
+ * | | DDD | 001, 002, ..., 365, 366 | |
3250
+ * | | DDDD | ... | 3 |
3251
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
3252
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
3253
+ * | | EEEEE | M, T, W, T, F, S, S | |
3254
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
3255
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
3256
+ * | | io | 1st, 2nd, ..., 7th | 7 |
3257
+ * | | ii | 01, 02, ..., 07 | 7 |
3258
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
3259
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
3260
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
3261
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
3262
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
3263
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
3264
+ * | | ee | 02, 03, ..., 01 | |
3265
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
3266
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
3267
+ * | | eeeee | M, T, W, T, F, S, S | |
3268
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
3269
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
3270
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
3271
+ * | | cc | 02, 03, ..., 01 | |
3272
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
3273
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
3274
+ * | | ccccc | M, T, W, T, F, S, S | |
3275
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
3276
+ * | AM, PM | a..aa | AM, PM | |
3277
+ * | | aaa | am, pm | |
3278
+ * | | aaaa | a.m., p.m. | 2 |
3279
+ * | | aaaaa | a, p | |
3280
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
3281
+ * | | bbb | am, pm, noon, midnight | |
3282
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
3283
+ * | | bbbbb | a, p, n, mi | |
3284
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
3285
+ * | | BBBB | at night, in the morning, ... | 2 |
3286
+ * | | BBBBB | at night, in the morning, ... | |
3287
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
3288
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
3289
+ * | | hh | 01, 02, ..., 11, 12 | |
3290
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
3291
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
3292
+ * | | HH | 00, 01, 02, ..., 23 | |
3293
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
3294
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
3295
+ * | | KK | 01, 02, ..., 11, 00 | |
3296
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
3297
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
3298
+ * | | kk | 24, 01, 02, ..., 23 | |
3299
+ * | Minute | m | 0, 1, ..., 59 | |
3300
+ * | | mo | 0th, 1st, ..., 59th | 7 |
3301
+ * | | mm | 00, 01, ..., 59 | |
3302
+ * | Second | s | 0, 1, ..., 59 | |
3303
+ * | | so | 0th, 1st, ..., 59th | 7 |
3304
+ * | | ss | 00, 01, ..., 59 | |
3305
+ * | Fraction of second | S | 0, 1, ..., 9 | |
3306
+ * | | SS | 00, 01, ..., 99 | |
3307
+ * | | SSS | 000, 001, ..., 999 | |
3308
+ * | | SSSS | ... | 3 |
3309
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
3310
+ * | | XX | -0800, +0530, Z | |
3311
+ * | | XXX | -08:00, +05:30, Z | |
3312
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
3313
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
3314
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
3315
+ * | | xx | -0800, +0530, +0000 | |
3316
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
3317
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
3318
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
3319
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
3320
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
3321
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
3322
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
3323
+ * | Seconds timestamp | t | 512969520 | 7 |
3324
+ * | | tt | ... | 3,7 |
3325
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
3326
+ * | | TT | ... | 3,7 |
3327
+ * | Long localized date | P | 04/29/1453 | 7 |
3328
+ * | | PP | Apr 29, 1453 | 7 |
3329
+ * | | PPP | April 29th, 1453 | 7 |
3330
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
3331
+ * | Long localized time | p | 12:00 AM | 7 |
3332
+ * | | pp | 12:00:00 AM | 7 |
3333
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
3334
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
3335
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
3336
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
3337
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
3338
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
3339
+ * Notes:
3340
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
3341
+ * are the same as "stand-alone" units, but are different in some languages.
3342
+ * "Formatting" units are declined according to the rules of the language
3343
+ * in the context of a date. "Stand-alone" units are always nominative singular:
3344
+ *
3345
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
3346
+ *
3347
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
3348
+ *
3349
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
3350
+ * the single quote characters (see below).
3351
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
3352
+ * the output will be the same as default pattern for this unit, usually
3353
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
3354
+ * are marked with "2" in the last column of the table.
3355
+ *
3356
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
3357
+ *
3358
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
3359
+ *
3360
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
3361
+ *
3362
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
3363
+ *
3364
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
3365
+ *
3366
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
3367
+ * The output will be padded with zeros to match the length of the pattern.
3368
+ *
3369
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
3370
+ *
3371
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
3372
+ * These tokens represent the shortest form of the quarter.
3373
+ *
3374
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
3375
+ *
3376
+ * | Year | `y` | `u` |
3377
+ * |------|-----|-----|
3378
+ * | AC 1 | 1 | 1 |
3379
+ * | BC 1 | 1 | 0 |
3380
+ * | BC 2 | 2 | -1 |
3381
+ *
3382
+ * Also `yy` always returns the last two digits of a year,
3383
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
3384
+ *
3385
+ * | Year | `yy` | `uu` |
3386
+ * |------|------|------|
3387
+ * | 1 | 01 | 01 |
3388
+ * | 14 | 14 | 14 |
3389
+ * | 376 | 76 | 376 |
3390
+ * | 1453 | 53 | 1453 |
3391
+ *
3392
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
3393
+ * except local week-numbering years are dependent on `options.weekStartsOn`
3394
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
3395
+ * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
3396
+ *
3397
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
3398
+ * so right now these tokens fall back to GMT timezones.
3399
+ *
3400
+ * 7. These patterns are not in the Unicode Technical Standard #35:
3401
+ * - `i`: ISO day of week
3402
+ * - `I`: ISO week of year
3403
+ * - `R`: ISO week-numbering year
3404
+ * - `t`: seconds timestamp
3405
+ * - `T`: milliseconds timestamp
3406
+ * - `o`: ordinal number modifier
3407
+ * - `P`: long localized date
3408
+ * - `p`: long localized time
3409
+ *
3410
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
3411
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3412
+ *
3413
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
3414
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3415
+ *
3416
+ * @param date - The original date
3417
+ * @param format - The string of tokens
3418
+ * @param options - An object with options
3419
+ *
3420
+ * @returns The formatted date string
3421
+ *
3422
+ * @throws `date` must not be Invalid Date
3423
+ * @throws `options.locale` must contain `localize` property
3424
+ * @throws `options.locale` must contain `formatLong` property
3425
+ * @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
3426
+ * @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
3427
+ * @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
3428
+ * @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
3429
+ * @throws format string contains an unescaped latin alphabet character
3430
+ *
3431
+ * @example
3432
+ * // Represent 11 February 2014 in middle-endian format:
3433
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
3434
+ * //=> '02/11/2014'
3435
+ *
3436
+ * @example
3437
+ * // Represent 2 July 2014 in Esperanto:
3438
+ * import { eoLocale } from 'date-fns/locale/eo'
3439
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
3440
+ * locale: eoLocale
3441
+ * })
3442
+ * //=> '2-a de julio 2014'
3443
+ *
3444
+ * @example
3445
+ * // Escape string by single quote characters:
3446
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
3447
+ * //=> "3 o'clock"
3448
+ */
3449
+ function format(date, formatStr, options) {
3450
+ const defaultOptions = getDefaultOptions();
3451
+ const locale = options?.locale ?? defaultOptions.locale ?? enUS;
3452
+
3453
+ const firstWeekContainsDate =
3454
+ options?.firstWeekContainsDate ??
3455
+ options?.locale?.options?.firstWeekContainsDate ??
3456
+ defaultOptions.firstWeekContainsDate ??
3457
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
3458
+ 1;
3459
+
3460
+ const weekStartsOn =
3461
+ options?.weekStartsOn ??
3462
+ options?.locale?.options?.weekStartsOn ??
3463
+ defaultOptions.weekStartsOn ??
3464
+ defaultOptions.locale?.options?.weekStartsOn ??
3465
+ 0;
3466
+
3467
+ const originalDate = toDate(date, options?.in);
3468
+
3469
+ if (!isValid(originalDate)) {
3470
+ throw new RangeError("Invalid time value");
3471
+ }
3472
+
3473
+ let parts = formatStr
3474
+ .match(longFormattingTokensRegExp)
3475
+ .map((substring) => {
3476
+ const firstCharacter = substring[0];
3477
+ if (firstCharacter === "p" || firstCharacter === "P") {
3478
+ const longFormatter = longFormatters[firstCharacter];
3479
+ return longFormatter(substring, locale.formatLong);
3480
+ }
3481
+ return substring;
3482
+ })
3483
+ .join("")
3484
+ .match(formattingTokensRegExp)
3485
+ .map((substring) => {
3486
+ // Replace two single quote characters with one single quote character
3487
+ if (substring === "''") {
3488
+ return { isToken: false, value: "'" };
3489
+ }
3490
+
3491
+ const firstCharacter = substring[0];
3492
+ if (firstCharacter === "'") {
3493
+ return { isToken: false, value: cleanEscapedString(substring) };
3494
+ }
3495
+
3496
+ if (formatters[firstCharacter]) {
3497
+ return { isToken: true, value: substring };
3498
+ }
3499
+
3500
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
3501
+ throw new RangeError(
3502
+ "Format string contains an unescaped latin alphabet character `" +
3503
+ firstCharacter +
3504
+ "`",
3505
+ );
3506
+ }
3507
+
3508
+ return { isToken: false, value: substring };
3509
+ });
3510
+
3511
+ // invoke localize preprocessor (only for french locales at the moment)
3512
+ if (locale.localize.preprocessor) {
3513
+ parts = locale.localize.preprocessor(originalDate, parts);
3514
+ }
3515
+
3516
+ const formatterOptions = {
3517
+ firstWeekContainsDate,
3518
+ weekStartsOn,
3519
+ locale,
3520
+ };
3521
+
3522
+ return parts
3523
+ .map((part) => {
3524
+ if (!part.isToken) return part.value;
3525
+
3526
+ const token = part.value;
3527
+
3528
+ if (
3529
+ (!options?.useAdditionalWeekYearTokens &&
3530
+ isProtectedWeekYearToken(token)) ||
3531
+ (!options?.useAdditionalDayOfYearTokens &&
3532
+ isProtectedDayOfYearToken(token))
3533
+ ) {
3534
+ warnOrThrowProtectedError(token, formatStr, String(date));
3535
+ }
3536
+
3537
+ const formatter = formatters[token[0]];
3538
+ return formatter(originalDate, token, locale.localize, formatterOptions);
3539
+ })
3540
+ .join("");
3541
+ }
3542
+
3543
+ function cleanEscapedString(input) {
3544
+ const matched = input.match(escapedStringRegExp);
3545
+
3546
+ if (!matched) {
3547
+ return input;
3548
+ }
3549
+
3550
+ return matched[1].replace(doubleQuoteRegExp, "'");
922
3551
  }
923
3552
 
924
3553
  const formatDistanceLocale = {