Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mantine/dates

Package Overview
Dependencies
Maintainers
1
Versions
328
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/dates - npm Package Compare versions

Comparing version 2.5.0-alpha.5 to 2.5.0

cjs/components/TimeRangeInput/TimeRangeInput.js

4

cjs/components/DatePickerBase/DatePickerBase.js

@@ -6,2 +6,3 @@ 'use strict';

var React = require('react');
var cx = require('clsx');
var core = require('@mantine/core');

@@ -14,2 +15,3 @@ var hooks = require('@mantine/hooks');

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);

@@ -176,3 +178,3 @@ var __defProp = Object.defineProperty;

type: "button",
classNames,
classNames: __spreadProps(__spreadValues({}, classNames), { input: cx__default(classes.input, classNames == null ? void 0 : classNames.input) }),
styles: __spreadProps(__spreadValues({}, styles), { input: __spreadProps(__spreadValues({}, styles == null ? void 0 : styles.input), { cursor: "pointer" }) }),

@@ -179,0 +181,0 @@ onClick: () => setDropdownOpened(!dropdownOpened),

@@ -40,3 +40,4 @@ 'use strict';

input: {
cursor: "pointer"
cursor: "pointer",
whiteSpace: "nowrap"
},

@@ -43,0 +44,0 @@ dropdown: ({ theme }) => ({

@@ -71,3 +71,2 @@ 'use strict';

typeof onBlur === "function" && onBlur(event);
setValue(padTime.padTime(hooks.clamp({ value: parseInt(event.currentTarget.value, 10), min: 0, max })));
};

@@ -74,0 +73,0 @@ const handleClick = (event) => {

@@ -43,2 +43,3 @@ 'use strict';

exports.default = useStyles;
exports.inputSizes = inputSizes;
//# sourceMappingURL=TimeInput.styles.js.map

@@ -19,2 +19,3 @@ 'use strict';

var TimeInput = require('./components/TimeInput/TimeInput.js');
var TimeRangeInput = require('./components/TimeRangeInput/TimeRangeInput.js');

@@ -37,2 +38,3 @@

exports.TimeInput = TimeInput.TimeInput;
exports.TimeRangeInput = TimeRangeInput.TimeRangeInput;
//# sourceMappingURL=index.js.map
import React, { useState, useRef, useEffect } from 'react';
import cx from 'clsx';
import { useMantineTheme, mergeStyles, useClickOutsideRegister, InputWrapper, Input, getSizeValue, Text, Popper, Paper, Modal, CloseButton } from '@mantine/core';

@@ -166,3 +167,3 @@ import { useId, useFocusTrap, useClickOutside, useWindowEvent, useMergedRef, useReducedMotion } from '@mantine/hooks';

type: "button",
classNames,
classNames: __spreadProps(__spreadValues({}, classNames), { input: cx(classes.input, classNames == null ? void 0 : classNames.input) }),
styles: __spreadProps(__spreadValues({}, styles), { input: __spreadProps(__spreadValues({}, styles == null ? void 0 : styles.input), { cursor: "pointer" }) }),

@@ -169,0 +170,0 @@ onClick: () => setDropdownOpened(!dropdownOpened),

@@ -36,3 +36,4 @@ import { createMemoStyles, getFontStyles, getSizeValue, INPUT_SIZES } from '@mantine/core';

input: {
cursor: "pointer"
cursor: "pointer",
whiteSpace: "nowrap"
},

@@ -39,0 +40,0 @@ dropdown: ({ theme }) => ({

@@ -63,3 +63,2 @@ import React, { useRef } from 'react';

typeof onBlur === "function" && onBlur(event);
setValue(padTime(clamp({ value: parseInt(event.currentTarget.value, 10), min: 0, max })));
};

@@ -66,0 +65,0 @@ const handleClick = (event) => {

@@ -39,2 +39,3 @@ import { createMemoStyles, getSizeValue, INPUT_SIZES } from '@mantine/core';

export default useStyles;
export { inputSizes };
//# sourceMappingURL=TimeInput.styles.js.map

@@ -15,2 +15,3 @@ export { getEndOfWeek } from './utils/get-end-of-week/get-end-of-week.js';

export { TimeInput } from './components/TimeInput/TimeInput.js';
export { TimeRangeInput } from './components/TimeRangeInput/TimeRangeInput.js';
//# sourceMappingURL=index.js.map

@@ -17,3 +17,3 @@ import React from 'react';

/** Initial selected month */
initialMonth?: Date;
initialMonth?: Date | null;
/** dayjs label format */

@@ -20,0 +20,0 @@ labelFormat?: string;

@@ -8,5 +8,5 @@ /// <reference types="react" />

/** Called when date changes */
onChange?(value: Date): void;
onChange?(value: Date | null): void;
/** Default value for uncontrolled input */
defaultValue?: Date;
defaultValue?: Date | null;
/** Set to false to force dropdown to stay open after date was selected */

@@ -13,0 +13,0 @@ closeCalendarOnChange?: boolean;

import React from 'react';
import { DefaultProps, InputBaseProps, InputWrapperBaseProps, MantineTransition, InputStylesNames, InputWrapperStylesNames, MantineSize } from '@mantine/core';
import { DefaultProps, InputBaseProps, InputWrapperBaseProps, MantineTransition, InputStylesNames, InputWrapperStylesNames, MantineSize, MantineShadow } from '@mantine/core';
import { CalendarStylesNames } from '../Calendar/Calendar';

@@ -8,3 +8,3 @@ import useStyles from './DatePickerBase.styles';

/** Props spread to root element (InputWrapper) */
wrapperProps?: Record<string, any>;
wrapperProps?: React.ComponentPropsWithoutRef<'div'>;
/** Placeholder, displayed when date is not selected */

@@ -19,3 +19,3 @@ placeholder?: React.ReactNode;

/** Dropdown shadow from theme or css value for custom box-shadow */
shadow?: string;
shadow?: MantineShadow;
/** Get input button ref */

@@ -22,0 +22,0 @@ elementRef?: React.ForwardedRef<HTMLButtonElement>;

@@ -8,3 +8,3 @@ /// <reference types="react" />

/** Called when date range changes */
onChange?(value: [Date, Date]): void;
onChange?(value: [Date | null, Date | null]): void;
/** Default value for uncontrolled input */

@@ -11,0 +11,0 @@ defaultValue?: [Date, Date];

@@ -8,3 +8,3 @@ import React from 'react';

/** Selected dates */
value: [Date, Date];
value: [Date | null, Date | null];
/** Called when selected date changes */

@@ -11,0 +11,0 @@ onChange(value: [Date, Date]): void;

@@ -6,4 +6,11 @@ import { MantineTheme, MantineSize } from '@mantine/core';

}
export declare const inputSizes: {
xs: number;
sm: number;
md: number;
lg: number;
xl: number;
};
declare const _default: (args?: TimeInputStyles, classNames?: Partial<Record<"disabled" | "controls" | "timeInput", string>>, name?: string) => Record<"disabled" | "controls" | "timeInput", string>;
export default _default;
//# sourceMappingURL=TimeInput.styles.d.ts.map

@@ -8,2 +8,3 @@ export * from './utils';

export { TimeInput } from './components/TimeInput/TimeInput';
export { TimeRangeInput } from './components/TimeRangeInput/TimeRangeInput';
export type { CalendarStylesNames, CalendarProps } from './components/Calendar/Calendar';

@@ -16,2 +17,3 @@ export type { DatePickerProps } from './components/DatePicker/DatePicker';

export type { TimeInputProps, TimeInputStylesNames } from './components/TimeInput/TimeInput';
export type { TimeRangeInputStylesNames } from './components/TimeRangeInput/TimeRangeInput';
//# sourceMappingURL=index.d.ts.map

@@ -1,2 +0,2 @@

(function(j,ae){typeof exports=="object"&&typeof module!="undefined"?ae(exports,require("dayjs"),require("react"),require("@mantine/hooks"),require("@mantine/core")):typeof define=="function"&&define.amd?define(["exports","dayjs","react","@mantine/hooks","@mantine/core"],ae):(j=typeof globalThis!="undefined"?globalThis:j||self,ae(j["@mantine/dates"]={},j.dayjs,j.React,j["@mantine/hooks"],j["@mantine/core"]))})(this,function(j,ae,Y,M,l){"use strict";function xe(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var b=xe(ae),r=xe(Y);function je(e){const t=new Date(e),a=t.getDay();return a!==0&&t.setDate(t.getDate()+(7-a)),t}function be(e){const t=new Date(e),a=t.getDay()||7;return a!==1&&t.setHours(-24*(a-1)),t}function Te(e){const t=e.getMonth(),a=new Date(e.getFullYear(),t,1),n=new Date(e.getFullYear(),e.getMonth()+1,0),d=je(n),o=be(a),c=[];for(;o<=d;){const _=[];for(let u=0;u<7;u+=1)_.push(new Date(o)),o.setDate(o.getDate()+1);c.push(_)}return c}function Ve(e){const t=[],a=new Date(2021,0,1);for(let n=0;n<12;n+=1)t.push(b(a).locale(e).format("MMMM")),a.setMonth(a.getMonth()+1);return t}function ze(e){const t=[],a=be(new Date);for(let n=0;n<7;n+=1)t.push(b(a).locale(e).format("dd")),a.setDate(a.getDate()+1);return t}function Le(e){const t=[];for(let a=e.from;a<=e.to;a+=1)t.push(a);return t}function Oe(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function ne(e,t){return Oe(e,t)&&e.getDate()===t.getDate()}function Fe(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=Fe(e[t]))&&(n&&(n+=" "),n+=a);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function we(){for(var e=0,t,a,n="";e<arguments.length;)(t=arguments[e++])&&(a=Fe(t))&&(n&&(n+=" "),n+=a);return n}var Vt=Object.defineProperty,zt=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,We=(e,t,a)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ye=(e,t)=>{for(var a in t||(t={}))Ft.call(t,a)&&We(e,a,t[a]);if(ke)for(var a of ke(t))kt.call(t,a)&&We(e,a,t[a]);return e},Wt=(e,t)=>zt(e,Lt(t));const re={xs:34,sm:38,md:46,lg:58,xl:66};var Yt=l.createMemoStyles({weekend:{},outside:{},selected:{},inRange:{},firstInRange:{},lastInRange:{},day:({theme:e,size:t,fullWidth:a})=>Wt(Ye(Ye({},l.getFontStyles(e)),l.getFocusStyles(e)),{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",width:a?"100%":l.getSizeValue({size:t,sizes:re}),height:l.getSizeValue({size:t,sizes:re}),lineHeight:`${l.getSizeValue({size:t,sizes:re})}px`,fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),padding:0,borderRadius:e.radius.sm,border:"1px dotted transparent",cursor:"pointer",userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],"&:disabled":{pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&$weekend:not(:disabled)":{color:e.colorScheme==="dark"?e.colors.red[5]:e.colors.red[7]},"&$outside":{color:`${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]} !important`},"&$inRange:not(:disabled)":{backgroundColor:e.colorScheme==="dark"?l.hexToRgba(e.colors[e.primaryColor][9],.3):e.colors[e.primaryColor][0],borderRadius:0},"&$selected:not(:disabled)":{backgroundColor:e.colors[e.primaryColor][6],color:e.white},"&$firstInRange:not(:disabled)":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&$lastInRange:not(:disabled)":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm}})}),Bt=Object.defineProperty,At=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,He=(e,t,a)=>t in e?Bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,J=(e,t)=>{for(var a in t||(t={}))Be.call(t,a)&&He(e,a,t[a]);if(le)for(var a of le(t))Ae.call(t,a)&&He(e,a,t[a]);return e},Ut=(e,t)=>At(e,Ht(t)),qt=(e,t)=>{var a={};for(var n in e)Be.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&le)for(var n of le(e))t.indexOf(n)<0&&Ae.call(e,n)&&(a[n]=e[n]);return a};function Ue(e){var t=e,{className:a,style:n,value:d,selected:o,weekend:c,outside:_,onClick:u,elementRef:p,onKeyDown:h,onMouseEnter:y,themeOverride:E,classNames:x,disabled:I,styles:C,hasValue:R,firstInRange:i,lastInRange:m,__staticSelector:T="month",inRange:O,size:V,fullWidth:k,firstInMonth:D}=t,z=qt(t,["className","style","value","selected","weekend","outside","onClick","elementRef","onKeyDown","onMouseEnter","themeOverride","classNames","disabled","styles","hasValue","firstInRange","lastInRange","__staticSelector","inRange","size","fullWidth","firstInMonth"]);const B=l.useMantineTheme(E),g=Yt({theme:B,size:V,fullWidth:k},x,T),w=l.mergeStyles(g,C);return r.createElement("button",Ut(J({},z),{type:"button",onClick:u,ref:p,onKeyDown:P=>h(d,P),onMouseEnter:P=>y(d,P),tabIndex:R?o?0:-1:D?0:-1,"data-autofocus":R?o?!0:void 0:D?!0:void 0,"data-mantine-stop-propagation":!0,style:J(J(J(J(J(J(J(J({},w.day),_?w.outside:null),c?w.weekend:null),o?w.selected:null),O?w.inRange:null),i?w.firstInRange:null),m?w.lastInRange:null),n),disabled:I,className:we(g.day,{[g.outside]:_,[g.weekend]:c,[g.selected]:o,[g.inRange]:O,[g.firstInRange]:i,[g.lastInRange]:m},a)}),d.getDate())}Ue.displayName="@mantine/core/Day";function Kt({date:e,month:t,hasValue:a,minDate:n,maxDate:d,value:o,excludeDate:c,disableOutsideEvents:_,range:u}){const p=e.getDay(),h=p===6||p===0,y=e.getMonth()!==t.getMonth(),E=a&&ne(e,o),x=d instanceof Date&&b(d).isBefore(e,"day"),I=n instanceof Date&&b(n).isAfter(e,"day"),C=typeof c=="function"&&c(e),i=x||I||C||_&&y,m=Array.isArray(u)&&u.every(z=>z instanceof Date),T=m&&[b(u[0]).subtract(1,"day"),b(u[1]).add(1,"day")],O=m&&ne(e,u[0]),V=m&&ne(e,u[1]),k=m&&b(e).isAfter(T[0],"day")&&b(e).isBefore(T[1],"day");return{selectedInRange:O||V,selected:E,disabled:i,inRange:k,firstInRange:O,lastInRange:V,weekend:h,outside:y}}var Gt=Object.defineProperty,Zt=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Ke=(e,t,a)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ea=(e,t)=>{for(var a in t||(t={}))Qt.call(t,a)&&Ke(e,a,t[a]);if(qe)for(var a of qe(t))Xt.call(t,a)&&Ke(e,a,t[a]);return e},ta=(e,t)=>Zt(e,Jt(t)),aa=l.createMemoStyles({weekday:({theme:e})=>({color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5]}),root:({theme:e,fullWidth:t})=>ta(ea({},l.getFontStyles(e)),{borderCollapse:"collapse",width:t?"100%":"auto",tableLayout:"fixed"}),cell:{boxSizing:"border-box",padding:0,borderTop:"1px solid transparent"},weekdayCell:({theme:e})=>({boxSizing:"border-box",padding:0,fontWeight:"normal",paddingBottom:e.spacing.xs/2,textAlign:"center",cursor:"default",userSelect:"none"})}),na=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Je=(e,t,a)=>t in e?na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Se=(e,t)=>{for(var a in t||(t={}))Ge.call(t,a)&&Je(e,a,t[a]);if(oe)for(var a of oe(t))Ze.call(t,a)&&Je(e,a,t[a]);return e},ra=(e,t)=>{var a={};for(var n in e)Ge.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&oe)for(var n of oe(e))t.indexOf(n)<0&&Ze.call(e,n)&&(a[n]=e[n]);return a};const la=()=>{};function se(e){var t=e,{className:a,style:n,month:d,value:o,onChange:c,autoFocus:_=!1,disableOutsideEvents:u=!1,locale:p="en",dayClassName:h,dayStyle:y,themeOverride:E,classNames:x,styles:I,minDate:C,maxDate:R,excludeDate:i,onDayMouseEnter:m,range:T,hideWeekdays:O=!1,__staticSelector:V="month",size:k="sm",fullWidth:D=!1}=t,z=ra(t,["className","style","month","value","onChange","autoFocus","disableOutsideEvents","locale","dayClassName","dayStyle","themeOverride","classNames","styles","minDate","maxDate","excludeDate","onDayMouseEnter","range","hideWeekdays","__staticSelector","size","fullWidth"]);const B=l.useMantineTheme(E),g=aa({theme:B,fullWidth:D},x,V),w=l.mergeStyles(g,I),P=Y.useRef({}),N=Te(d),$=(v,F)=>{const f=new Date(v);f.setDate(v.getDate()+F),f.toISOString()in P.current&&(!Oe(d,f)&&u||P.current[f.toISOString()].focus())},H=(v,F)=>{const{code:f}=F.nativeEvent;f==="ArrowUp"&&(F.preventDefault(),$(v,-7)),f==="ArrowDown"&&(F.preventDefault(),$(v,7)),f==="ArrowRight"&&(F.preventDefault(),v.getDay()!==0&&$(v,1)),f==="ArrowLeft"&&(F.preventDefault(),v.getDay()!==1&&$(v,-1))};Y.useEffect(()=>{if(_){const v=new Date(d.getFullYear(),d.getMonth(),o?o.getDate():1).toISOString();v in P.current&&P.current[v].focus()}},[]);const q=ze(p).map(v=>r.createElement("th",{className:g.weekdayCell,style:w.weekdayCell,key:v},r.createElement(l.Text,{size:k,className:g.weekday,style:w.weekday},M.upperFirst(v)))),K=o instanceof Date,A=K&&b(o).isAfter(b(d).startOf("month"))&&b(o).isBefore(b(d).endOf("month")),L=N.map((v,F)=>{const f=v.map((s,S)=>{const W=Kt({date:s,month:d,hasValue:K,minDate:C,maxDate:R,value:o,excludeDate:i,disableOutsideEvents:u,range:T});return r.createElement("td",{className:g.cell,style:w.cell,key:S},r.createElement(Ue,{elementRef:G=>{P.current[s.toISOString()]=G},onClick:()=>typeof c=="function"&&c(s),value:s,outside:W.outside,weekend:W.weekend,inRange:W.inRange,firstInRange:W.firstInRange,lastInRange:W.lastInRange,firstInMonth:S===0&&F===0,selected:W.selected||W.selectedInRange,hasValue:A,onKeyDown:H,themeOverride:E,className:typeof h=="function"?h(s,W):null,style:typeof y=="function"?y(s,W):null,styles:I,classNames:x,disabled:W.disabled,__staticSelector:V,onMouseEnter:typeof m=="function"?m:la,size:k,fullWidth:D}))});return r.createElement("tr",{key:F},f)});return r.createElement("table",Se({className:we(g.root,a),style:Se(Se({},n),w.root)},z),!O&&r.createElement("thead",null,r.createElement("tr",null,q)),r.createElement("tbody",null,L))}se.displayName="@mantine/core/Month";var oa=Object.defineProperty,sa=Object.defineProperties,ia=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable,et=(e,t,a)=>t in e?oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,tt=(e,t)=>{for(var a in t||(t={}))Qe.call(t,a)&&et(e,a,t[a]);if(ie)for(var a of ie(t))Xe.call(t,a)&&et(e,a,t[a]);return e},da=(e,t)=>sa(e,ia(t)),ca=(e,t)=>{var a={};for(var n in e)Qe.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ie)for(var n of ie(e))t.indexOf(n)<0&&Xe.call(e,n)&&(a[n]=e[n]);return a};function De(e){var t=e,{direction:a,style:n}=t,d=ca(t,["direction","style"]);return r.createElement("svg",tt({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:da(tt({},n),{transform:a==="right"?"rotate(180deg)":"none"})},d),r.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}De.displayName="@mantine/dates/ArrowIcon";var ua=l.createMemoStyles({selectGroup:{},select:{},label:{}});function at({locale:e,classNames:t,styles:a,withSelect:n,yearsRange:d,value:o,themeOverride:c,labelFormat:_,onChange:u,size:p,__staticSelector:h,monthLabel:y,yearLabel:E}){const x=l.useMantineTheme(c),I=p==="lg"||p==="xl"?"md":"xs",C=ua({theme:x},t,h),R=l.mergeStyles(C,a);return n?r.createElement(l.Group,{spacing:5,noWrap:!0,themeOverride:c,className:C.selectGroup,style:R.selectGroup},r.createElement(l.NativeSelect,{"aria-label":y,className:C.select,style:R.select,size:I,themeOverride:c,value:o.getMonth(),onChange:i=>u(b(o).set("month",parseInt(i.currentTarget.value,10)).toDate()),data:Ve(e).map((i,m)=>({label:M.upperFirst(i),value:m.toString()}))}),r.createElement(l.NativeSelect,{"aria-label":E,className:C.select,style:R.select,size:I,themeOverride:c,value:o.getFullYear(),onChange:i=>u(b(o).set("year",parseInt(i.currentTarget.value,10)).toDate()),data:Le(d).map(i=>({label:i.toString(),value:i.toString()}))})):r.createElement(l.Text,{className:C.label,style:R.label,size:p},M.upperFirst(b(o).locale(e).format(_)))}at.displayName="@mantine/dates/CalendarLabel";const pa={xs:10,sm:12,md:14,lg:18,xl:20};function Pe({size:e,themeOverride:t,nextMonthLabel:a,previousMonthLabel:n,previousMonthDisabled:d,nextMonthDisabled:o,onPreviousMonth:c,onNextMonth:_,classNames:u,styles:p,locale:h,withSelect:y,yearsRange:E,month:x,setMonth:I,labelFormat:C,__staticSelector:R,monthLabel:i,yearLabel:m}){const T=l.useMantineTheme(t),O=l.getSizeValue({size:e,sizes:pa}),V=l.getSizeValue({size:e,sizes:re});return r.createElement(l.Group,{position:"apart",noWrap:!0,themeOverride:t,style:{marginBottom:T.spacing.xs/2}},r.createElement(l.ActionIcon,{"aria-label":n,onClick:c,disabled:d,themeOverride:t,size:V,"data-mantine-stop-propagation":!0},r.createElement(De,{direction:"left",width:O,height:O})),r.createElement(at,{locale:h,classNames:u,styles:p,withSelect:y,yearsRange:E,value:x,onChange:I,labelFormat:C,themeOverride:t,size:e,__staticSelector:R,monthLabel:i,yearLabel:m}),r.createElement(l.ActionIcon,{"aria-label":a,onClick:_,disabled:o,themeOverride:t,size:V,"data-mantine-stop-propagation":!0},r.createElement(De,{direction:"right",width:O,height:O})))}Pe.displayName="@mantine/dates/CalendarHeader";var fa=Object.defineProperty,de=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,lt=(e,t,a)=>t in e?fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ot=(e,t)=>{for(var a in t||(t={}))nt.call(t,a)&&lt(e,a,t[a]);if(de)for(var a of de(t))rt.call(t,a)&&lt(e,a,t[a]);return e},ma=(e,t)=>{var a={};for(var n in e)nt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&de)for(var n of de(e))t.indexOf(n)<0&&rt.call(e,n)&&(a[n]=e[n]);return a};function $e(e){var t=e,{size:a,fullWidth:n,style:d}=t,o=ma(t,["size","fullWidth","style"]);return r.createElement("div",ot({style:ot({maxWidth:n?"100%":l.getSizeValue({size:a,sizes:re})*7},d)},o))}$e.displayName="@mantine/dates/CalendarWrapper";function st({maxDate:e,minDate:t,month:a}){const n=e instanceof Date&&b(a).endOf("month").isAfter(b(e).endOf("day").subtract(1,"minute")),d=t instanceof Date&&b(a).startOf("month").isBefore(b(t).startOf("day").add(1,"minute"));return{nextDisabled:n,previousDisabled:d}}var ya=Object.defineProperty,ce=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,ct=(e,t,a)=>t in e?ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ga=(e,t)=>{for(var a in t||(t={}))it.call(t,a)&&ct(e,a,t[a]);if(ce)for(var a of ce(t))dt.call(t,a)&&ct(e,a,t[a]);return e},va=(e,t)=>{var a={};for(var n in e)it.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ce)for(var n of ce(e))t.indexOf(n)<0&&dt.call(e,n)&&(a[n]=e[n]);return a};function Me(e){var t=e,{classNames:a,styles:n,locale:d="en",themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,initialMonth:u,month:p,onMonthChange:h,value:y,onChange:E,labelFormat:x="MMMM YYYY",withSelect:I=!1,yearsRange:C={from:2020,to:2030},dayClassName:R,dayStyle:i,disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,fullWidth:k=!1,size:D="sm",__staticSelector:z="calendar",monthLabel:B,yearLabel:g}=t,w=va(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","__staticSelector","monthLabel","yearLabel"]);const[P,N]=M.useUncontrolled({value:p,defaultValue:u,finalValue:new Date,onChange:h,rule:H=>H instanceof Date}),$=st({month:P,minDate:T,maxDate:O});return r.createElement($e,ga({size:D,fullWidth:k},w),r.createElement(Pe,{size:D,themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,previousMonthDisabled:$.previousDisabled,nextMonthDisabled:$.nextDisabled,onPreviousMonth:()=>N(b(P).subtract(1,"month").toDate()),onNextMonth:()=>N(b(P).add(1,"month").toDate()),classNames:a,styles:n,locale:d,withSelect:I,yearsRange:C,month:P,setMonth:N,labelFormat:x,__staticSelector:z,monthLabel:B,yearLabel:g}),r.createElement(se,{themeOverride:o,month:P,value:y,onChange:E,dayClassName:R,dayStyle:i,disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,classNames:a,styles:n,fullWidth:k,size:D,locale:d,__staticSelector:z}))}Me.displayName="@mantine/dates/Calendar";var _a=Object.defineProperty,ha=Object.defineProperties,ba=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,Oa=Object.prototype.hasOwnProperty,wa=Object.prototype.propertyIsEnumerable,pt=(e,t,a)=>t in e?_a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Sa=(e,t)=>{for(var a in t||(t={}))Oa.call(t,a)&&pt(e,a,t[a]);if(ut)for(var a of ut(t))wa.call(t,a)&&pt(e,a,t[a]);return e},Da=(e,t)=>ha(e,ba(t)),Pa=l.createMemoStyles({wrapper:({theme:e})=>Da(Sa({},l.getFontStyles(e)),{position:"relative",cursor:"pointer"}),placeholder:({theme:e,size:t,invalid:a})=>({lineHeight:`${l.getSizeValue({size:t,sizes:l.INPUT_SIZES})-2}px`,color:a?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}),dropdownWrapper:{position:"relative",pointerEvents:"all"},input:{cursor:"pointer"},dropdown:({theme:e})=>({position:"absolute",left:0,top:e.spacing.xs,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,zIndex:4,padding:[e.spacing.md,e.spacing.xs],"&::before":{content:'""',position:"absolute",top:-5,height:8,width:8,transform:"rotate(45deg)",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`}})}),$a=Object.defineProperty,Ma=Object.defineProperties,Ea=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,yt=(e,t,a)=>t in e?$a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,pe=(e,t)=>{for(var a in t||(t={}))ft.call(t,a)&&yt(e,a,t[a]);if(ue)for(var a of ue(t))mt.call(t,a)&&yt(e,a,t[a]);return e},gt=(e,t)=>Ma(e,Ea(t)),Ca=(e,t)=>{var a={};for(var n in e)ft.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ue)for(var n of ue(e))t.indexOf(n)<0&&mt.call(e,n)&&(a[n]=e[n]);return a};const Ra={xs:24,sm:30,md:34,lg:40,xl:44};function Ee(e){var t=e,{themeOverride:a,classNames:n,className:d,style:o,styles:c,wrapperProps:_,required:u,label:p,error:h,id:y,description:E,placeholder:x,shadow:I="sm",transition:C="pop-top-left",transitionDuration:R=200,transitionTimingFunction:i,elementRef:m,closeDropdownOnScroll:T=!0,size:O="sm",children:V,inputLabel:k,__staticSelector:D="date-picker",dropdownOpened:z,setDropdownOpened:B,dropdownType:g="popover",clearable:w=!0,clearButtonLabel:P,onClear:N,positionDependencies:$=[],zIndex:H=3}=t,q=Ca(t,["themeOverride","classNames","className","style","styles","wrapperProps","required","label","error","id","description","placeholder","shadow","transition","transitionDuration","transitionTimingFunction","elementRef","closeDropdownOnScroll","size","children","inputLabel","__staticSelector","dropdownOpened","setDropdownOpened","dropdownType","clearable","clearButtonLabel","onClear","positionDependencies","zIndex"]);const K=l.useMantineTheme(a),A=Pa({theme:K,size:O,invalid:!!h},n,D),L=l.mergeStyles(A,c),[v,F]=Y.useState(null),[f,s]=Y.useState(null),[S,W]=Y.useState(null),G=M.useId(y),Q=l.useClickOutsideRegister(),U=M.useFocusTrap(),Z=Y.useRef(),Ne=()=>{z&&(B(!1),setTimeout(()=>{var he;return(he=Z.current)==null?void 0:he.focus()},R+20))},Qa=he=>he.nativeEvent.code==="Escape"&&Ne();M.useClickOutside(()=>g==="popover"&&Ne(),null,[v,f]),M.useWindowEvent("scroll",()=>T&&B(!1)),Y.useEffect(()=>{Q(`${G}-dropdown`,v)},[v]);const Xa=w?r.createElement(l.CloseButton,{themeOverride:a,variant:"transparent","aria-label":P,onClick:N,size:O}):null;return r.createElement(l.InputWrapper,pe({required:u,id:G,label:p,error:h,description:E,className:d,style:o,themeOverride:a,classNames:n,styles:c,size:O,__staticSelector:D},_),r.createElement("div",{ref:s},r.createElement("div",{className:A.wrapper,style:L.wrapper,ref:W},r.createElement(l.Input,pe({themeOverride:a,component:"button",type:"button",classNames:n,styles:gt(pe({},c),{input:gt(pe({},c==null?void 0:c.input),{cursor:"pointer"})}),onClick:()=>B(!z),id:G,elementRef:M.useMergedRef(m,Z),__staticSelector:D,size:O,required:u,invalid:!!h,rightSection:Xa,rightSectionWidth:l.getSizeValue({size:O,sizes:Ra})},q),k||r.createElement(l.Text,{style:L.placeholder,className:A.placeholder,size:O},x))),g==="popover"?r.createElement(l.Popper,{referenceElement:S,transitionDuration:M.useReducedMotion()?0:R,transitionTimingFunction:i,forceUpdateDependencies:$,transition:C,mounted:z,position:"bottom",placement:"start",gutter:0,withArrow:!0,arrowSize:3,zIndex:H},r.createElement("div",{className:A.dropdownWrapper,style:L.dropdownWrapper,ref:M.useMergedRef(U,F),"data-mantine-stop-propagation":g==="popover"&&z,onKeyDownCapture:Qa},r.createElement(l.Paper,{className:A.dropdown,style:L.dropdown,shadow:I},V))):r.createElement(l.Modal,{opened:z,onClose:Ne,hideCloseButton:!0},V)))}Ee.displayName="@mantine/dates/DatePickerBase";var Ia=Object.defineProperty,fe=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,ht=(e,t,a)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Na=(e,t)=>{for(var a in t||(t={}))vt.call(t,a)&&ht(e,a,t[a]);if(fe)for(var a of fe(t))_t.call(t,a)&&ht(e,a,t[a]);return e},xa=(e,t)=>{var a={};for(var n in e)vt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&fe)for(var n of fe(e))t.indexOf(n)<0&&_t.call(e,n)&&(a[n]=e[n]);return a};function bt(e){var t=e,{value:a,onChange:n,defaultValue:d,themeOverride:o,classNames:c,styles:_,shadow:u="sm",locale:p="en",inputFormat:h="MMMM D, YYYY",transitionDuration:y=200,transitionTimingFunction:E,nextMonthLabel:x,previousMonthLabel:I,closeCalendarOnChange:C=!0,labelFormat:R="MMMM YYYY",withSelect:i=!1,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,elementRef:B,initialMonth:g,initiallyOpened:w=!1,name:P="date",size:N="sm",dropdownType:$="popover",clearable:H=!0,disabled:q=!1,clearButtonLabel:K}=t,A=xa(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","clearable","disabled","clearButtonLabel"]);const[L,v]=Y.useState(w),F=N==="lg"||N==="xl"?"md":"sm",f=Y.useRef(),[s,S]=M.useUncontrolled({value:a,defaultValue:d,finalValue:null,onChange:n,rule:U=>U===null||U instanceof Date}),W=()=>{v(!1),setTimeout(()=>{var U;return(U=f.current)==null?void 0:U.focus()},y+20)},G=U=>{S(U),C&&W()},Q=()=>{var U;S(null),(U=f.current)==null||U.focus()};return r.createElement(r.Fragment,null,r.createElement(Ee,Na({dropdownOpened:L,setDropdownOpened:v,shadow:u,transitionDuration:y,elementRef:M.useMergedRef(B,f),size:N,styles:_,classNames:c,inputLabel:s instanceof Date?M.upperFirst(b(s).locale(p).format(h)):null,__staticSelector:"date-picker",dropdownType:$,clearable:H&&!!s&&!q,clearButtonLabel:K,onClear:Q,disabled:q},A),r.createElement(Me,{classNames:c,styles:_,locale:p,themeOverride:o,nextMonthLabel:x,previousMonthLabel:I,initialMonth:s instanceof Date?s:g,value:s,onChange:G,labelFormat:R,withSelect:i,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,__staticSelector:"date-picker",fullWidth:$==="modal",size:$==="modal"?"lg":F})),r.createElement("input",{type:"hidden",name:P,value:s instanceof Date?s.toISOString():""}))}bt.displayName="@mantine/dates/DatePicker";var ja=Object.defineProperty,Ta=Object.defineProperties,Va=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,St=(e,t,a)=>t in e?ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Dt=(e,t)=>{for(var a in t||(t={}))Ot.call(t,a)&&St(e,a,t[a]);if(me)for(var a of me(t))wt.call(t,a)&&St(e,a,t[a]);return e},za=(e,t)=>Ta(e,Va(t)),La=(e,t)=>{var a={};for(var n in e)Ot.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&me)for(var n of me(e))t.indexOf(n)<0&&wt.call(e,n)&&(a[n]=e[n]);return a};function Ce(e){var t=e,{classNames:a,styles:n,locale:d="en",themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,initialMonth:u,month:p,onMonthChange:h,value:y,onChange:E,labelFormat:x="MMMM YYYY",withSelect:I=!1,yearsRange:C={from:2020,to:2030},dayClassName:R,dayStyle:i,disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,fullWidth:k=!1,size:D="sm",onMouseLeave:z,__staticSelector:B="range-calendar"}=t,g=La(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","onMouseLeave","__staticSelector"]);const w=l.useMantineTheme(o),[P,N]=Y.useState(null),[$,H]=Y.useState(null),q=f=>{if($ instanceof Date){if(ne(f,$))return H(null),N(null),null;const s=[f,$];return s.sort((S,W)=>S.getTime()-W.getTime()),E(s),H(null),null}return E([null,null]),H(f),null},K=f=>{typeof z=="function"&&z(f),N(null)},A=(f,s)=>{if($ instanceof Date&&P instanceof Date){const S=[P,$];return S.sort((W,G)=>W.getTime()-G.getTime()),!s.selected&&b(f).subtract(1,"day").isBefore(S[1])&&b(f).add(1,"day").isAfter(S[0])}return!1},[L,v]=M.useUncontrolled({value:p,defaultValue:u,finalValue:new Date,onChange:h,rule:f=>f instanceof Date}),F=st({month:L,minDate:T,maxDate:O});return r.createElement($e,Dt({size:D,fullWidth:k,onMouseLeave:K},g),r.createElement(Pe,{size:D,themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,previousMonthDisabled:F.previousDisabled,nextMonthDisabled:F.nextDisabled,onPreviousMonth:()=>v(b(L).subtract(1,"month").toDate()),onNextMonth:()=>v(b(L).add(1,"month").toDate()),classNames:a,styles:n,locale:d,withSelect:I,yearsRange:C,month:L,setMonth:v,labelFormat:x,__staticSelector:B}),r.createElement(se,{themeOverride:o,month:L,range:y,value:$,onChange:q,dayClassName:R,dayStyle:(f,s)=>{const S=typeof i=="function"?i(f,s):{};return A(f,s)?za(Dt({},S),{backgroundColor:w.colorScheme==="dark"?l.hexToRgba(w.colors[w.primaryColor][9],.3):w.colors[w.primaryColor][0],borderRadius:0}):S},disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,classNames:a,styles:n,fullWidth:k,size:D,onDayMouseEnter:f=>N(f),__staticSelector:B}))}Ce.displayName="@mantine/dates/RangeCalendar";var Fa=Object.defineProperty,ye=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,Mt=(e,t,a)=>t in e?Fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ka=(e,t)=>{for(var a in t||(t={}))Pt.call(t,a)&&Mt(e,a,t[a]);if(ye)for(var a of ye(t))$t.call(t,a)&&Mt(e,a,t[a]);return e},Wa=(e,t)=>{var a={};for(var n in e)Pt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ye)for(var n of ye(e))t.indexOf(n)<0&&$t.call(e,n)&&(a[n]=e[n]);return a};const Re=e=>Array.isArray(e)&&e.length===2&&e.every(t=>t instanceof Date);function Et(e){var t=e,{value:a,onChange:n,defaultValue:d,themeOverride:o,classNames:c,styles:_,shadow:u="sm",locale:p="en",inputFormat:h="MMMM D, YYYY",transitionDuration:y=200,transitionTimingFunction:E,nextMonthLabel:x,previousMonthLabel:I,closeCalendarOnChange:C=!0,labelFormat:R="MMMM YYYY",withSelect:i=!1,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,elementRef:B,initialMonth:g,initiallyOpened:w=!1,name:P="date",size:N="sm",dropdownType:$="popover",labelSeparator:H="\u2013",clearable:q=!0,clearButtonLabel:K}=t,A=Wa(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","labelSeparator","clearable","clearButtonLabel"]);const[L,v]=Y.useState(w),F=N==="lg"||N==="xl"?"md":"sm",f=Y.useRef(),[s,S]=M.useUncontrolled({value:a,defaultValue:d,finalValue:[null,null],onChange:n,rule:Re}),W=()=>{v(!1),setTimeout(()=>{var Z;return(Z=f.current)==null?void 0:Z.focus()},y+20)},G=Z=>{S(Z),C&&Re(Z)&&W()},Q=Re(s),U=()=>{var Z;S([null,null]),(Z=f.current)==null||Z.focus()};return r.createElement(r.Fragment,null,r.createElement(Ee,ka({dropdownOpened:L,setDropdownOpened:v,shadow:u,transitionDuration:y,elementRef:M.useMergedRef(B,f),size:N,styles:_,classNames:c,inputLabel:Q?`${M.upperFirst(b(s[0]).locale(p).format(h))} ${H} ${M.upperFirst(b(s[1]).locale(p).format(h))}`:null,__staticSelector:"date-range-picker",dropdownType:$,clearable:q&&Q,clearButtonLabel:K,onClear:U},A),r.createElement(Ce,{classNames:c,styles:_,locale:p,themeOverride:o,nextMonthLabel:x,previousMonthLabel:I,initialMonth:Q?s[0]:g,value:s,onChange:G,labelFormat:R,withSelect:i,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,__staticSelector:"date-range-picker",fullWidth:$==="modal",size:$==="modal"?"lg":F})),r.createElement("input",{type:"hidden",name:`${P}-from`,value:Q?s[0].toISOString():""}),r.createElement("input",{type:"hidden",name:`${P}-to`,value:Q?s[1].toISOString():""}))}Et.displayName="@mantine/dates/DateRangePicker";function ee(e){return e>=10?e.toString():`0${e}`}var Ya=Object.defineProperty,ge=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,It=(e,t,a)=>t in e?Ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ba=(e,t)=>{for(var a in t||(t={}))Ct.call(t,a)&&It(e,a,t[a]);if(ge)for(var a of ge(t))Rt.call(t,a)&&It(e,a,t[a]);return e},Aa=(e,t)=>{var a={};for(var n in e)Ct.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))t.indexOf(n)<0&&Rt.call(e,n)&&(a[n]=e[n]);return a};function ve(e){var t=e,{elementRef:a,onFocus:n,onBlur:d,onChange:o,setValue:c,withSeparator:_=!1,size:u="sm",max:p,value:h}=t,y=Aa(t,["elementRef","onFocus","onBlur","onChange","setValue","withSeparator","size","max","value"]);const E=Y.useRef(),x=i=>{typeof n=="function"&&n(i),E.current.select()},I=i=>{typeof d=="function"&&d(i),c(ee(M.clamp({value:parseInt(i.currentTarget.value,10),min:0,max:p})))},C=i=>{i.stopPropagation(),E.current.select()},R=i=>{if(i.nativeEvent.code==="ArrowUp"){i.preventDefault();const m=ee(M.clamp({value:parseInt(i.currentTarget.value,10)+1,max:p,min:0}));h!==m&&(c(m),o(m,!1))}if(i.nativeEvent.code==="ArrowDown"){i.preventDefault();const m=ee(M.clamp({value:parseInt(i.currentTarget.value,10)-1,max:p,min:0}));h!==m&&(c(m),o(m,!1))}};return r.createElement(r.Fragment,null,r.createElement("input",Ba({type:"text",ref:M.useMergedRef(E,a),onChange:i=>o(i.currentTarget.value,!0),onClick:C,onFocus:x,onBlur:I,onKeyDown:R,value:h},y)),_&&r.createElement(l.Text,{size:u,style:{lineHeight:1,color:"inherit"}},":"))}ve.displayName="@mantine/dates/TimeField";function Ie({onChange:e,nextRef:t,min:a,max:n,maxValue:d}){return(o,c)=>{var _,u,p,h;if(o==="00"){e("00"),c&&((_=t==null?void 0:t.current)==null||_.focus()),c&&((u=t==null?void 0:t.current)==null||u.select());return}const y=parseInt(o,10);if(!Number.isNaN(y)){if(y>d){e(ee(M.clamp({value:y,min:a,max:n}))),c&&((p=t==null?void 0:t.current)==null||p.focus()),c&&((h=t==null?void 0:t.current)==null||h.select());return}e(y.toString())}}}function Ha(e){return e instanceof Date?{hours:ee(e.getHours()),minutes:ee(e.getMinutes()),seconds:ee(e.getSeconds())}:{hours:"",minutes:"",seconds:""}}const Ua={xs:20,sm:23,md:25,lg:27,xl:29};var qa=l.createMemoStyles({disabled:{opacity:.6,cursor:"not-allowed"},controls:({size:e})=>({display:"flex",alignItems:"center",height:l.getSizeValue({size:e,sizes:l.INPUT_SIZES})-2}),timeInput:({theme:e,size:t})=>({width:l.getSizeValue({size:t,sizes:Ua}),appearance:"none",backgroundColor:"transparent",color:"inherit",padding:0,textAlign:"center",border:"1px solid transparent",fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),lineHeight:1,outline:0,"&[disabled]":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],cursor:"not-allowed"}})}),Ka=Object.defineProperty,Ga=Object.defineProperties,Za=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,jt=(e,t,a)=>t in e?Ka(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,X=(e,t)=>{for(var a in t||(t={}))Nt.call(t,a)&&jt(e,a,t[a]);if(_e)for(var a of _e(t))xt.call(t,a)&&jt(e,a,t[a]);return e},te=(e,t)=>Ga(e,Za(t)),Ja=(e,t)=>{var a={};for(var n in e)Nt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&_e)for(var n of _e(e))t.indexOf(n)<0&&xt.call(e,n)&&(a[n]=e[n]);return a};function Tt(e){var t=e,{required:a,label:n,error:d,description:o,className:c,style:_,themeOverride:u,size:p="sm",wrapperProps:h,classNames:y,styles:E,id:x,elementRef:I,value:C,defaultValue:R,onChange:i,withSeconds:m=!1,name:T,hoursLabel:O,minutesLabel:V,secondsLabel:k,disabled:D=!1}=t,z=Ja(t,["required","label","error","description","className","style","themeOverride","size","wrapperProps","classNames","styles","id","elementRef","value","defaultValue","onChange","withSeconds","name","hoursLabel","minutesLabel","secondsLabel","disabled"]);const B=l.useMantineTheme(u),g=qa({theme:B,size:p},y,"time-input"),w=l.mergeStyles(g,E),P=M.useId(x),[N,$]=M.useUncontrolled({value:C,defaultValue:R,finalValue:new Date,rule:s=>s instanceof Date,onChange:i}),H=Y.useRef(),q=Y.useRef(),K=Y.useRef(),[A,L]=Y.useState(Ha(N)),v=Ie({onChange:s=>{L(S=>te(X({},S),{hours:s})),$(b(N).set("hours",parseInt(s,10)).toDate())},min:0,max:23,maxValue:2,nextRef:q}),F=Ie({onChange:s=>{L(S=>te(X({},S),{minutes:s})),$(b(N).set("minutes",parseInt(s,10)).toDate())},min:0,max:59,maxValue:5,nextRef:K}),f=Ie({onChange:s=>{L(S=>te(X({},S),{seconds:s})),$(b(N).set("seconds",parseInt(s,10)).toDate())},min:0,max:59,maxValue:5});return r.createElement(l.InputWrapper,X({required:a,label:n,error:d,description:o,className:c,style:_,themeOverride:u,classNames:y,styles:E,size:p,__staticSelector:"time-input",id:P},h),r.createElement(l.Input,X({component:"div",__staticSelector:"time-input",themeOverride:u,required:a,invalid:!!d,onClick:()=>H.current.focus(),size:p,className:we({[g.disabled]:D}),classNames:y,styles:E,disabled:D},z),r.createElement("div",{className:g.controls,style:w.controls},r.createElement(ve,{elementRef:M.useMergedRef(H,I),value:A.hours,onChange:v,setValue:s=>L(S=>te(X({},S),{hours:s})),id:P,className:g.timeInput,style:w.timeInput,withSeparator:!0,size:p,max:23,"aria-label":O,disabled:D}),r.createElement(ve,{elementRef:q,value:A.minutes,onChange:F,setValue:s=>L(S=>te(X({},S),{minutes:s})),className:g.timeInput,style:w.timeInput,withSeparator:m,size:p,max:59,"aria-label":V,disabled:D}),m&&r.createElement(ve,{elementRef:K,value:A.seconds,onChange:f,setValue:s=>L(S=>te(X({},S),{seconds:s})),className:g.timeInput,style:w.timeInput,size:p,max:59,"aria-label":k,disabled:D}),T&&r.createElement("input",{type:"hidden",name:T,value:N.toISOString()}))))}Tt.displayName="@mantine/dates/TimeInput",j.Calendar=Me,j.DatePicker=bt,j.DateRangePicker=Et,j.Month=se,j.RangeCalendar=Ce,j.TimeInput=Tt,j.getEndOfWeek=je,j.getMonthDays=Te,j.getMonthsNames=Ve,j.getStartOfWeek=be,j.getWeekdaysNames=ze,j.getYearsRange=Le,j.isSameDate=ne,j.isSameMonth=Oe,Object.defineProperty(j,"__esModule",{value:!0})});
(function(Y,de){typeof exports=="object"&&typeof module!="undefined"?de(exports,require("dayjs"),require("react"),require("@mantine/hooks"),require("@mantine/core")):typeof define=="function"&&define.amd?define(["exports","dayjs","react","@mantine/hooks","@mantine/core"],de):(Y=typeof globalThis!="undefined"?globalThis:Y||self,de(Y["@mantine/dates"]={},Y.dayjs,Y.React,Y["@mantine/hooks"],Y["@mantine/core"]))})(this,function(Y,de,k,R,l){"use strict";function We(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var P=We(de),r=We(k);function Ye(e){const t=new Date(e),a=t.getDay();return a!==0&&t.setDate(t.getDate()+(7-a)),t}function Me(e){const t=new Date(e),a=t.getDay()||7;return a!==1&&t.setHours(-24*(a-1)),t}function Be(e){const t=e.getMonth(),a=new Date(e.getFullYear(),t,1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Ye(n),s=Me(a),u=[];for(;s<=i;){const w=[];for(let p=0;p<7;p+=1)w.push(new Date(s)),s.setDate(s.getDate()+1);u.push(w)}return u}function Ae(e){const t=[],a=new Date(2021,0,1);for(let n=0;n<12;n+=1)t.push(P(a).locale(e).format("MMMM")),a.setMonth(a.getMonth()+1);return t}function He(e){const t=[],a=Me(new Date);for(let n=0;n<7;n+=1)t.push(P(a).locale(e).format("dd")),a.setDate(a.getDate()+1);return t}function Ue(e){const t=[];for(let a=e.from;a<=e.to;a+=1)t.push(a);return t}function Ce(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function ce(e,t){return Ce(e,t)&&e.getDate()===t.getDate()}function qe(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=qe(e[t]))&&(n&&(n+=" "),n+=a);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ue(){for(var e=0,t,a,n="";e<arguments.length;)(t=arguments[e++])&&(a=qe(t))&&(n&&(n+=" "),n+=a);return n}var Gt=Object.defineProperty,Zt=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Ge=(e,t,a)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ze=(e,t)=>{for(var a in t||(t={}))Qt.call(t,a)&&Ge(e,a,t[a]);if(Ke)for(var a of Ke(t))Xt.call(t,a)&&Ge(e,a,t[a]);return e},ea=(e,t)=>Zt(e,Jt(t));const pe={xs:34,sm:38,md:46,lg:58,xl:66};var ta=l.createMemoStyles({weekend:{},outside:{},selected:{},inRange:{},firstInRange:{},lastInRange:{},day:({theme:e,size:t,fullWidth:a})=>ea(Ze(Ze({},l.getFontStyles(e)),l.getFocusStyles(e)),{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",width:a?"100%":l.getSizeValue({size:t,sizes:pe}),height:l.getSizeValue({size:t,sizes:pe}),lineHeight:`${l.getSizeValue({size:t,sizes:pe})}px`,fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),padding:0,borderRadius:e.radius.sm,border:"1px dotted transparent",cursor:"pointer",userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],"&:disabled":{pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&$weekend:not(:disabled)":{color:e.colorScheme==="dark"?e.colors.red[5]:e.colors.red[7]},"&$outside":{color:`${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]} !important`},"&$inRange:not(:disabled)":{backgroundColor:e.colorScheme==="dark"?l.hexToRgba(e.colors[e.primaryColor][9],.3):e.colors[e.primaryColor][0],borderRadius:0},"&$selected:not(:disabled)":{backgroundColor:e.colors[e.primaryColor][6],color:e.white},"&$firstInRange:not(:disabled)":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&$lastInRange:not(:disabled)":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm}})}),aa=Object.defineProperty,na=Object.defineProperties,ra=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Xe=(e,t,a)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,te=(e,t)=>{for(var a in t||(t={}))Je.call(t,a)&&Xe(e,a,t[a]);if(me)for(var a of me(t))Qe.call(t,a)&&Xe(e,a,t[a]);return e},la=(e,t)=>na(e,ra(t)),oa=(e,t)=>{var a={};for(var n in e)Je.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&me)for(var n of me(e))t.indexOf(n)<0&&Qe.call(e,n)&&(a[n]=e[n]);return a};function et(e){var t=e,{className:a,style:n,value:i,selected:s,weekend:u,outside:w,onClick:p,elementRef:d,onKeyDown:S,onMouseEnter:v,themeOverride:E,classNames:F,disabled:j,styles:I,hasValue:N,firstInRange:c,lastInRange:y,__staticSelector:x="month",inRange:D,size:L,fullWidth:A,firstInMonth:M}=t,$=oa(t,["className","style","value","selected","weekend","outside","onClick","elementRef","onKeyDown","onMouseEnter","themeOverride","classNames","disabled","styles","hasValue","firstInRange","lastInRange","__staticSelector","inRange","size","fullWidth","firstInMonth"]);const U=l.useMantineTheme(E),b=ta({theme:U,size:L,fullWidth:A},F,x),f=l.mergeStyles(b,I);return r.createElement("button",la(te({},$),{type:"button",onClick:p,ref:d,onKeyDown:_=>S(i,_),onMouseEnter:_=>v(i,_),tabIndex:N?s?0:-1:M?0:-1,"data-autofocus":N?s?!0:void 0:M?!0:void 0,"data-mantine-stop-propagation":!0,style:te(te(te(te(te(te(te(te({},f.day),w?f.outside:null),u?f.weekend:null),s?f.selected:null),D?f.inRange:null),c?f.firstInRange:null),y?f.lastInRange:null),n),disabled:j,className:ue(b.day,{[b.outside]:w,[b.weekend]:u,[b.selected]:s,[b.inRange]:D,[b.firstInRange]:c,[b.lastInRange]:y},a)}),i.getDate())}et.displayName="@mantine/core/Day";function sa({date:e,month:t,hasValue:a,minDate:n,maxDate:i,value:s,excludeDate:u,disableOutsideEvents:w,range:p}){const d=e.getDay(),S=d===6||d===0,v=e.getMonth()!==t.getMonth(),E=a&&ce(e,s),F=i instanceof Date&&P(i).isBefore(e,"day"),j=n instanceof Date&&P(n).isAfter(e,"day"),I=typeof u=="function"&&u(e),c=F||j||I||w&&v,y=Array.isArray(p)&&p.every($=>$ instanceof Date),x=y&&[P(p[0]).subtract(1,"day"),P(p[1]).add(1,"day")],D=y&&ce(e,p[0]),L=y&&ce(e,p[1]),A=y&&P(e).isAfter(x[0],"day")&&P(e).isBefore(x[1],"day");return{selectedInRange:D||L,selected:E,disabled:c,inRange:A,firstInRange:D,lastInRange:L,weekend:S,outside:v}}var ia=Object.defineProperty,da=Object.defineProperties,ca=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,ua=Object.prototype.hasOwnProperty,pa=Object.prototype.propertyIsEnumerable,at=(e,t,a)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,fa=(e,t)=>{for(var a in t||(t={}))ua.call(t,a)&&at(e,a,t[a]);if(tt)for(var a of tt(t))pa.call(t,a)&&at(e,a,t[a]);return e},ma=(e,t)=>da(e,ca(t)),ga=l.createMemoStyles({weekday:({theme:e})=>({color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5]}),root:({theme:e,fullWidth:t})=>ma(fa({},l.getFontStyles(e)),{borderCollapse:"collapse",width:t?"100%":"auto",tableLayout:"fixed"}),cell:{boxSizing:"border-box",padding:0,borderTop:"1px solid transparent"},weekdayCell:({theme:e})=>({boxSizing:"border-box",padding:0,fontWeight:"normal",paddingBottom:e.spacing.xs/2,textAlign:"center",cursor:"default",userSelect:"none"})}),ya=Object.defineProperty,ge=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,lt=(e,t,a)=>t in e?ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Re=(e,t)=>{for(var a in t||(t={}))nt.call(t,a)&&lt(e,a,t[a]);if(ge)for(var a of ge(t))rt.call(t,a)&&lt(e,a,t[a]);return e},va=(e,t)=>{var a={};for(var n in e)nt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))t.indexOf(n)<0&&rt.call(e,n)&&(a[n]=e[n]);return a};const _a=()=>{};function ye(e){var t=e,{className:a,style:n,month:i,value:s,onChange:u,autoFocus:w=!1,disableOutsideEvents:p=!1,locale:d="en",dayClassName:S,dayStyle:v,themeOverride:E,classNames:F,styles:j,minDate:I,maxDate:N,excludeDate:c,onDayMouseEnter:y,range:x,hideWeekdays:D=!1,__staticSelector:L="month",size:A="sm",fullWidth:M=!1}=t,$=va(t,["className","style","month","value","onChange","autoFocus","disableOutsideEvents","locale","dayClassName","dayStyle","themeOverride","classNames","styles","minDate","maxDate","excludeDate","onDayMouseEnter","range","hideWeekdays","__staticSelector","size","fullWidth"]);const U=l.useMantineTheme(E),b=ga({theme:U,fullWidth:M},F,L),f=l.mergeStyles(b,j),_=k.useRef({}),V=Be(i),C=(h,W)=>{const m=new Date(h);m.setDate(h.getDate()+W),m.toISOString()in _.current&&(!Ce(i,m)&&p||_.current[m.toISOString()].focus())},G=(h,W)=>{const{code:m}=W.nativeEvent;m==="ArrowUp"&&(W.preventDefault(),C(h,-7)),m==="ArrowDown"&&(W.preventDefault(),C(h,7)),m==="ArrowRight"&&(W.preventDefault(),h.getDay()!==0&&C(h,1)),m==="ArrowLeft"&&(W.preventDefault(),h.getDay()!==1&&C(h,-1))};k.useEffect(()=>{if(w){const h=new Date(i.getFullYear(),i.getMonth(),s?s.getDate():1).toISOString();h in _.current&&_.current[h].focus()}},[]);const q=He(d).map(h=>r.createElement("th",{className:b.weekdayCell,style:f.weekdayCell,key:h},r.createElement(l.Text,{size:A,className:b.weekday,style:f.weekday},R.upperFirst(h)))),J=s instanceof Date,B=J&&P(s).isAfter(P(i).startOf("month"))&&P(s).isBefore(P(i).endOf("month")),z=V.map((h,W)=>{const m=h.map((o,O)=>{const T=sa({date:o,month:i,hasValue:J,minDate:I,maxDate:N,value:s,excludeDate:c,disableOutsideEvents:p,range:x});return r.createElement("td",{className:b.cell,style:f.cell,key:O},r.createElement(et,{elementRef:K=>{_.current[o.toISOString()]=K},onClick:()=>typeof u=="function"&&u(o),value:o,outside:T.outside,weekend:T.weekend,inRange:T.inRange,firstInRange:T.firstInRange,lastInRange:T.lastInRange,firstInMonth:O===0&&W===0,selected:T.selected||T.selectedInRange,hasValue:B,onKeyDown:G,themeOverride:E,className:typeof S=="function"?S(o,T):null,style:typeof v=="function"?v(o,T):null,styles:j,classNames:F,disabled:T.disabled,__staticSelector:L,onMouseEnter:typeof y=="function"?y:_a,size:A,fullWidth:M}))});return r.createElement("tr",{key:W},m)});return r.createElement("table",Re({className:ue(b.root,a),style:Re(Re({},n),f.root)},$),!D&&r.createElement("thead",null,r.createElement("tr",null,q)),r.createElement("tbody",null,z))}ye.displayName="@mantine/core/Month";var ha=Object.defineProperty,ba=Object.defineProperties,Oa=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,it=(e,t,a)=>t in e?ha(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,dt=(e,t)=>{for(var a in t||(t={}))ot.call(t,a)&&it(e,a,t[a]);if(ve)for(var a of ve(t))st.call(t,a)&&it(e,a,t[a]);return e},wa=(e,t)=>ba(e,Oa(t)),Sa=(e,t)=>{var a={};for(var n in e)ot.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ve)for(var n of ve(e))t.indexOf(n)<0&&st.call(e,n)&&(a[n]=e[n]);return a};function Ie(e){var t=e,{direction:a,style:n}=t,i=Sa(t,["direction","style"]);return r.createElement("svg",dt({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:wa(dt({},n),{transform:a==="right"?"rotate(180deg)":"none"})},i),r.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}Ie.displayName="@mantine/dates/ArrowIcon";var Da=l.createMemoStyles({selectGroup:{},select:{},label:{}});function ct({locale:e,classNames:t,styles:a,withSelect:n,yearsRange:i,value:s,themeOverride:u,labelFormat:w,onChange:p,size:d,__staticSelector:S,monthLabel:v,yearLabel:E}){const F=l.useMantineTheme(u),j=d==="lg"||d==="xl"?"md":"xs",I=Da({theme:F},t,S),N=l.mergeStyles(I,a);return n?r.createElement(l.Group,{spacing:5,noWrap:!0,themeOverride:u,className:I.selectGroup,style:N.selectGroup},r.createElement(l.NativeSelect,{"aria-label":v,className:I.select,style:N.select,size:j,themeOverride:u,value:s.getMonth(),onChange:c=>p(P(s).set("month",parseInt(c.currentTarget.value,10)).toDate()),data:Ae(e).map((c,y)=>({label:R.upperFirst(c),value:y.toString()}))}),r.createElement(l.NativeSelect,{"aria-label":E,className:I.select,style:N.select,size:j,themeOverride:u,value:s.getFullYear(),onChange:c=>p(P(s).set("year",parseInt(c.currentTarget.value,10)).toDate()),data:Ue(i).map(c=>({label:c.toString(),value:c.toString()}))})):r.createElement(l.Text,{className:I.label,style:N.label,size:d},R.upperFirst(P(s).locale(e).format(w)))}ct.displayName="@mantine/dates/CalendarLabel";const Pa={xs:10,sm:12,md:14,lg:18,xl:20};function Ne({size:e,themeOverride:t,nextMonthLabel:a,previousMonthLabel:n,previousMonthDisabled:i,nextMonthDisabled:s,onPreviousMonth:u,onNextMonth:w,classNames:p,styles:d,locale:S,withSelect:v,yearsRange:E,month:F,setMonth:j,labelFormat:I,__staticSelector:N,monthLabel:c,yearLabel:y}){const x=l.useMantineTheme(t),D=l.getSizeValue({size:e,sizes:Pa}),L=l.getSizeValue({size:e,sizes:pe});return r.createElement(l.Group,{position:"apart",noWrap:!0,themeOverride:t,style:{marginBottom:x.spacing.xs/2}},r.createElement(l.ActionIcon,{"aria-label":n,onClick:u,disabled:i,themeOverride:t,size:L,"data-mantine-stop-propagation":!0},r.createElement(Ie,{direction:"left",width:D,height:D})),r.createElement(ct,{locale:S,classNames:p,styles:d,withSelect:v,yearsRange:E,value:F,onChange:j,labelFormat:I,themeOverride:t,size:e,__staticSelector:N,monthLabel:c,yearLabel:y}),r.createElement(l.ActionIcon,{"aria-label":a,onClick:w,disabled:s,themeOverride:t,size:L,"data-mantine-stop-propagation":!0},r.createElement(Ie,{direction:"right",width:D,height:D})))}Ne.displayName="@mantine/dates/CalendarHeader";var $a=Object.defineProperty,_e=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,ft=(e,t,a)=>t in e?$a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,mt=(e,t)=>{for(var a in t||(t={}))ut.call(t,a)&&ft(e,a,t[a]);if(_e)for(var a of _e(t))pt.call(t,a)&&ft(e,a,t[a]);return e},Ea=(e,t)=>{var a={};for(var n in e)ut.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&_e)for(var n of _e(e))t.indexOf(n)<0&&pt.call(e,n)&&(a[n]=e[n]);return a};function xe(e){var t=e,{size:a,fullWidth:n,style:i}=t,s=Ea(t,["size","fullWidth","style"]);return r.createElement("div",mt({style:mt({maxWidth:n?"100%":l.getSizeValue({size:a,sizes:pe})*7},i)},s))}xe.displayName="@mantine/dates/CalendarWrapper";function gt({maxDate:e,minDate:t,month:a}){const n=e instanceof Date&&P(a).endOf("month").isAfter(P(e).endOf("day").subtract(1,"minute")),i=t instanceof Date&&P(a).startOf("month").isBefore(P(t).startOf("day").add(1,"minute"));return{nextDisabled:n,previousDisabled:i}}var Ma=Object.defineProperty,he=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,_t=(e,t,a)=>t in e?Ma(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ca=(e,t)=>{for(var a in t||(t={}))yt.call(t,a)&&_t(e,a,t[a]);if(he)for(var a of he(t))vt.call(t,a)&&_t(e,a,t[a]);return e},Ra=(e,t)=>{var a={};for(var n in e)yt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&he)for(var n of he(e))t.indexOf(n)<0&&vt.call(e,n)&&(a[n]=e[n]);return a};function Ve(e){var t=e,{classNames:a,styles:n,locale:i="en",themeOverride:s,nextMonthLabel:u,previousMonthLabel:w,initialMonth:p,month:d,onMonthChange:S,value:v,onChange:E,labelFormat:F="MMMM YYYY",withSelect:j=!1,yearsRange:I={from:2020,to:2030},dayClassName:N,dayStyle:c,disableOutsideEvents:y,minDate:x,maxDate:D,excludeDate:L,fullWidth:A=!1,size:M="sm",__staticSelector:$="calendar",monthLabel:U,yearLabel:b}=t,f=Ra(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","__staticSelector","monthLabel","yearLabel"]);const[_,V]=R.useUncontrolled({value:d,defaultValue:p,finalValue:new Date,onChange:S,rule:G=>G instanceof Date}),C=gt({month:_,minDate:x,maxDate:D});return r.createElement(xe,Ca({size:M,fullWidth:A},f),r.createElement(Ne,{size:M,themeOverride:s,nextMonthLabel:u,previousMonthLabel:w,previousMonthDisabled:C.previousDisabled,nextMonthDisabled:C.nextDisabled,onPreviousMonth:()=>V(P(_).subtract(1,"month").toDate()),onNextMonth:()=>V(P(_).add(1,"month").toDate()),classNames:a,styles:n,locale:i,withSelect:j,yearsRange:I,month:_,setMonth:V,labelFormat:F,__staticSelector:$,monthLabel:U,yearLabel:b}),r.createElement(ye,{themeOverride:s,month:_,value:v,onChange:E,dayClassName:N,dayStyle:c,disableOutsideEvents:y,minDate:x,maxDate:D,excludeDate:L,classNames:a,styles:n,fullWidth:A,size:M,locale:i,__staticSelector:$}))}Ve.displayName="@mantine/dates/Calendar";var Ia=Object.defineProperty,Na=Object.defineProperties,xa=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Va=Object.prototype.hasOwnProperty,Ta=Object.prototype.propertyIsEnumerable,bt=(e,t,a)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ja=(e,t)=>{for(var a in t||(t={}))Va.call(t,a)&&bt(e,a,t[a]);if(ht)for(var a of ht(t))Ta.call(t,a)&&bt(e,a,t[a]);return e},za=(e,t)=>Na(e,xa(t)),Fa=l.createMemoStyles({wrapper:({theme:e})=>za(ja({},l.getFontStyles(e)),{position:"relative",cursor:"pointer"}),placeholder:({theme:e,size:t,invalid:a})=>({lineHeight:`${l.getSizeValue({size:t,sizes:l.INPUT_SIZES})-2}px`,color:a?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}),dropdownWrapper:{position:"relative",pointerEvents:"all"},input:{cursor:"pointer",whiteSpace:"nowrap"},dropdown:({theme:e})=>({position:"absolute",left:0,top:e.spacing.xs,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,zIndex:4,padding:[e.spacing.md,e.spacing.xs],"&::before":{content:'""',position:"absolute",top:-5,height:8,width:8,transform:"rotate(45deg)",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`}})}),La=Object.defineProperty,ka=Object.defineProperties,Wa=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,St=(e,t,a)=>t in e?La(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,fe=(e,t)=>{for(var a in t||(t={}))Ot.call(t,a)&&St(e,a,t[a]);if(be)for(var a of be(t))wt.call(t,a)&&St(e,a,t[a]);return e},Te=(e,t)=>ka(e,Wa(t)),Ya=(e,t)=>{var a={};for(var n in e)Ot.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&be)for(var n of be(e))t.indexOf(n)<0&&wt.call(e,n)&&(a[n]=e[n]);return a};const Ba={xs:24,sm:30,md:34,lg:40,xl:44};function je(e){var t=e,{themeOverride:a,classNames:n,className:i,style:s,styles:u,wrapperProps:w,required:p,label:d,error:S,id:v,description:E,placeholder:F,shadow:j="sm",transition:I="pop-top-left",transitionDuration:N=200,transitionTimingFunction:c,elementRef:y,closeDropdownOnScroll:x=!0,size:D="sm",children:L,inputLabel:A,__staticSelector:M="date-picker",dropdownOpened:$,setDropdownOpened:U,dropdownType:b="popover",clearable:f=!0,clearButtonLabel:_,onClear:V,positionDependencies:C=[],zIndex:G=3}=t,q=Ya(t,["themeOverride","classNames","className","style","styles","wrapperProps","required","label","error","id","description","placeholder","shadow","transition","transitionDuration","transitionTimingFunction","elementRef","closeDropdownOnScroll","size","children","inputLabel","__staticSelector","dropdownOpened","setDropdownOpened","dropdownType","clearable","clearButtonLabel","onClear","positionDependencies","zIndex"]);const J=l.useMantineTheme(a),B=Fa({theme:J,size:D,invalid:!!S},n,M),z=l.mergeStyles(B,u),[h,W]=k.useState(null),[m,o]=k.useState(null),[O,T]=k.useState(null),K=R.useId(v),X=l.useClickOutsideRegister(),Z=R.useFocusTrap(),Q=k.useRef(),ie=()=>{$&&(U(!1),setTimeout(()=>{var H;return(H=Q.current)==null?void 0:H.focus()},N+20))},Ee=H=>H.nativeEvent.code==="Escape"&&ie();R.useClickOutside(()=>b==="popover"&&ie(),null,[h,m]),R.useWindowEvent("scroll",()=>x&&U(!1)),k.useEffect(()=>{X(`${K}-dropdown`,h)},[h]);const g=f?r.createElement(l.CloseButton,{themeOverride:a,variant:"transparent","aria-label":_,onClick:V,size:D}):null;return r.createElement(l.InputWrapper,fe({required:p,id:K,label:d,error:S,description:E,className:i,style:s,themeOverride:a,classNames:n,styles:u,size:D,__staticSelector:M},w),r.createElement("div",{ref:o},r.createElement("div",{className:B.wrapper,style:z.wrapper,ref:T},r.createElement(l.Input,fe({themeOverride:a,component:"button",type:"button",classNames:Te(fe({},n),{input:ue(B.input,n==null?void 0:n.input)}),styles:Te(fe({},u),{input:Te(fe({},u==null?void 0:u.input),{cursor:"pointer"})}),onClick:()=>U(!$),id:K,elementRef:R.useMergedRef(y,Q),__staticSelector:M,size:D,required:p,invalid:!!S,rightSection:g,rightSectionWidth:l.getSizeValue({size:D,sizes:Ba})},q),A||r.createElement(l.Text,{style:z.placeholder,className:B.placeholder,size:D},F))),b==="popover"?r.createElement(l.Popper,{referenceElement:O,transitionDuration:R.useReducedMotion()?0:N,transitionTimingFunction:c,forceUpdateDependencies:C,transition:I,mounted:$,position:"bottom",placement:"start",gutter:0,withArrow:!0,arrowSize:3,zIndex:G},r.createElement("div",{className:B.dropdownWrapper,style:z.dropdownWrapper,ref:R.useMergedRef(Z,W),"data-mantine-stop-propagation":b==="popover"&&$,onKeyDownCapture:Ee},r.createElement(l.Paper,{className:B.dropdown,style:z.dropdown,shadow:j},L))):r.createElement(l.Modal,{opened:$,onClose:ie,hideCloseButton:!0},L)))}je.displayName="@mantine/dates/DatePickerBase";var Aa=Object.defineProperty,Oe=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,$t=(e,t,a)=>t in e?Aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ha=(e,t)=>{for(var a in t||(t={}))Dt.call(t,a)&&$t(e,a,t[a]);if(Oe)for(var a of Oe(t))Pt.call(t,a)&&$t(e,a,t[a]);return e},Ua=(e,t)=>{var a={};for(var n in e)Dt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&Oe)for(var n of Oe(e))t.indexOf(n)<0&&Pt.call(e,n)&&(a[n]=e[n]);return a};function Et(e){var t=e,{value:a,onChange:n,defaultValue:i,themeOverride:s,classNames:u,styles:w,shadow:p="sm",locale:d="en",inputFormat:S="MMMM D, YYYY",transitionDuration:v=200,transitionTimingFunction:E,nextMonthLabel:F,previousMonthLabel:j,closeCalendarOnChange:I=!0,labelFormat:N="MMMM YYYY",withSelect:c=!1,yearsRange:y,dayClassName:x,dayStyle:D,disableOutsideEvents:L,minDate:A,maxDate:M,excludeDate:$,elementRef:U,initialMonth:b,initiallyOpened:f=!1,name:_="date",size:V="sm",dropdownType:C="popover",clearable:G=!0,disabled:q=!1,clearButtonLabel:J}=t,B=Ua(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","clearable","disabled","clearButtonLabel"]);const[z,h]=k.useState(f),W=V==="lg"||V==="xl"?"md":"sm",m=k.useRef(),[o,O]=R.useUncontrolled({value:a,defaultValue:i,finalValue:null,onChange:n,rule:Z=>Z===null||Z instanceof Date}),T=()=>{h(!1),setTimeout(()=>{var Z;return(Z=m.current)==null?void 0:Z.focus()},v+20)},K=Z=>{O(Z),I&&T()},X=()=>{var Z;O(null),(Z=m.current)==null||Z.focus()};return r.createElement(r.Fragment,null,r.createElement(je,Ha({dropdownOpened:z,setDropdownOpened:h,shadow:p,transitionDuration:v,elementRef:R.useMergedRef(U,m),size:V,styles:w,classNames:u,inputLabel:o instanceof Date?R.upperFirst(P(o).locale(d).format(S)):null,__staticSelector:"date-picker",dropdownType:C,clearable:G&&!!o&&!q,clearButtonLabel:J,onClear:X,disabled:q},B),r.createElement(Ve,{classNames:u,styles:w,locale:d,themeOverride:s,nextMonthLabel:F,previousMonthLabel:j,initialMonth:o instanceof Date?o:b,value:o,onChange:K,labelFormat:N,withSelect:c,yearsRange:y,dayClassName:x,dayStyle:D,disableOutsideEvents:L,minDate:A,maxDate:M,excludeDate:$,__staticSelector:"date-picker",fullWidth:C==="modal",size:C==="modal"?"lg":W})),r.createElement("input",{type:"hidden",name:_,value:o instanceof Date?o.toISOString():""}))}Et.displayName="@mantine/dates/DatePicker";var qa=Object.defineProperty,Ka=Object.defineProperties,Ga=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Rt=(e,t,a)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,It=(e,t)=>{for(var a in t||(t={}))Mt.call(t,a)&&Rt(e,a,t[a]);if(we)for(var a of we(t))Ct.call(t,a)&&Rt(e,a,t[a]);return e},Za=(e,t)=>Ka(e,Ga(t)),Ja=(e,t)=>{var a={};for(var n in e)Mt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&we)for(var n of we(e))t.indexOf(n)<0&&Ct.call(e,n)&&(a[n]=e[n]);return a};function ze(e){var t=e,{classNames:a,styles:n,locale:i="en",themeOverride:s,nextMonthLabel:u,previousMonthLabel:w,initialMonth:p,month:d,onMonthChange:S,value:v,onChange:E,labelFormat:F="MMMM YYYY",withSelect:j=!1,yearsRange:I={from:2020,to:2030},dayClassName:N,dayStyle:c,disableOutsideEvents:y,minDate:x,maxDate:D,excludeDate:L,fullWidth:A=!1,size:M="sm",onMouseLeave:$,__staticSelector:U="range-calendar"}=t,b=Ja(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","onMouseLeave","__staticSelector"]);const f=l.useMantineTheme(s),[_,V]=k.useState(null),[C,G]=k.useState(null),q=m=>{if(C instanceof Date){if(ce(m,C))return G(null),V(null),null;const o=[m,C];return o.sort((O,T)=>O.getTime()-T.getTime()),E(o),G(null),null}return E([null,null]),G(m),null},J=m=>{typeof $=="function"&&$(m),V(null)},B=(m,o)=>{if(C instanceof Date&&_ instanceof Date){const O=[_,C];return O.sort((T,K)=>T.getTime()-K.getTime()),!o.selected&&P(m).subtract(1,"day").isBefore(O[1])&&P(m).add(1,"day").isAfter(O[0])}return!1},[z,h]=R.useUncontrolled({value:d,defaultValue:p,finalValue:new Date,onChange:S,rule:m=>m instanceof Date}),W=gt({month:z,minDate:x,maxDate:D});return r.createElement(xe,It({size:M,fullWidth:A,onMouseLeave:J},b),r.createElement(Ne,{size:M,themeOverride:s,nextMonthLabel:u,previousMonthLabel:w,previousMonthDisabled:W.previousDisabled,nextMonthDisabled:W.nextDisabled,onPreviousMonth:()=>h(P(z).subtract(1,"month").toDate()),onNextMonth:()=>h(P(z).add(1,"month").toDate()),classNames:a,styles:n,locale:i,withSelect:j,yearsRange:I,month:z,setMonth:h,labelFormat:F,__staticSelector:U}),r.createElement(ye,{themeOverride:s,month:z,range:v,value:C,onChange:q,dayClassName:N,dayStyle:(m,o)=>{const O=typeof c=="function"?c(m,o):{};return B(m,o)?Za(It({},O),{backgroundColor:f.colorScheme==="dark"?l.hexToRgba(f.colors[f.primaryColor][9],.3):f.colors[f.primaryColor][0],borderRadius:0}):O},disableOutsideEvents:y,minDate:x,maxDate:D,excludeDate:L,classNames:a,styles:n,fullWidth:A,size:M,onDayMouseEnter:m=>V(m),__staticSelector:U}))}ze.displayName="@mantine/dates/RangeCalendar";var Qa=Object.defineProperty,Se=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,Vt=(e,t,a)=>t in e?Qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Xa=(e,t)=>{for(var a in t||(t={}))Nt.call(t,a)&&Vt(e,a,t[a]);if(Se)for(var a of Se(t))xt.call(t,a)&&Vt(e,a,t[a]);return e},en=(e,t)=>{var a={};for(var n in e)Nt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&Se)for(var n of Se(e))t.indexOf(n)<0&&xt.call(e,n)&&(a[n]=e[n]);return a};const Fe=e=>Array.isArray(e)&&e.length===2&&e.every(t=>t instanceof Date);function Tt(e){var t=e,{value:a,onChange:n,defaultValue:i,themeOverride:s,classNames:u,styles:w,shadow:p="sm",locale:d="en",inputFormat:S="MMMM D, YYYY",transitionDuration:v=200,transitionTimingFunction:E,nextMonthLabel:F,previousMonthLabel:j,closeCalendarOnChange:I=!0,labelFormat:N="MMMM YYYY",withSelect:c=!1,yearsRange:y,dayClassName:x,dayStyle:D,disableOutsideEvents:L,minDate:A,maxDate:M,excludeDate:$,elementRef:U,initialMonth:b,initiallyOpened:f=!1,name:_="date",size:V="sm",dropdownType:C="popover",labelSeparator:G="\u2013",clearable:q=!0,clearButtonLabel:J}=t,B=en(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","labelSeparator","clearable","clearButtonLabel"]);const[z,h]=k.useState(f),W=V==="lg"||V==="xl"?"md":"sm",m=k.useRef(),[o,O]=R.useUncontrolled({value:a,defaultValue:i,finalValue:[null,null],onChange:n,rule:Fe}),T=()=>{h(!1),setTimeout(()=>{var Q;return(Q=m.current)==null?void 0:Q.focus()},v+20)},K=Q=>{O(Q),I&&Fe(Q)&&T()},X=Fe(o),Z=()=>{var Q;O([null,null]),(Q=m.current)==null||Q.focus()};return r.createElement(r.Fragment,null,r.createElement(je,Xa({dropdownOpened:z,setDropdownOpened:h,shadow:p,transitionDuration:v,elementRef:R.useMergedRef(U,m),size:V,styles:w,classNames:u,inputLabel:X?`${R.upperFirst(P(o[0]).locale(d).format(S))} ${G} ${R.upperFirst(P(o[1]).locale(d).format(S))}`:null,__staticSelector:"date-range-picker",dropdownType:C,clearable:q&&X,clearButtonLabel:J,onClear:Z},B),r.createElement(ze,{classNames:u,styles:w,locale:d,themeOverride:s,nextMonthLabel:F,previousMonthLabel:j,initialMonth:X?o[0]:b,value:o,onChange:K,labelFormat:N,withSelect:c,yearsRange:y,dayClassName:x,dayStyle:D,disableOutsideEvents:L,minDate:A,maxDate:M,excludeDate:$,__staticSelector:"date-range-picker",fullWidth:C==="modal",size:C==="modal"?"lg":W})),r.createElement("input",{type:"hidden",name:`${_}-from`,value:X?o[0].toISOString():""}),r.createElement("input",{type:"hidden",name:`${_}-to`,value:X?o[1].toISOString():""}))}Tt.displayName="@mantine/dates/DateRangePicker";function le(e){return e>=10?e.toString():`0${e}`}var tn=Object.defineProperty,De=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,Ft=(e,t,a)=>t in e?tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,an=(e,t)=>{for(var a in t||(t={}))jt.call(t,a)&&Ft(e,a,t[a]);if(De)for(var a of De(t))zt.call(t,a)&&Ft(e,a,t[a]);return e},nn=(e,t)=>{var a={};for(var n in e)jt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&De)for(var n of De(e))t.indexOf(n)<0&&zt.call(e,n)&&(a[n]=e[n]);return a};function ee(e){var t=e,{elementRef:a,onFocus:n,onBlur:i,onChange:s,setValue:u,withSeparator:w=!1,size:p="sm",max:d,value:S}=t,v=nn(t,["elementRef","onFocus","onBlur","onChange","setValue","withSeparator","size","max","value"]);const E=k.useRef(),F=c=>{typeof n=="function"&&n(c),E.current.select()},j=c=>{typeof i=="function"&&i(c)},I=c=>{c.stopPropagation(),E.current.select()},N=c=>{if(c.nativeEvent.code==="ArrowUp"){c.preventDefault();const y=le(R.clamp({value:parseInt(c.currentTarget.value,10)+1,max:d,min:0}));S!==y&&(u(y),s(y,!1))}if(c.nativeEvent.code==="ArrowDown"){c.preventDefault();const y=le(R.clamp({value:parseInt(c.currentTarget.value,10)-1,max:d,min:0}));S!==y&&(u(y),s(y,!1))}};return r.createElement(r.Fragment,null,r.createElement("input",an({type:"text",ref:R.useMergedRef(E,a),onChange:c=>s(c.currentTarget.value,!0),onClick:I,onFocus:F,onBlur:j,onKeyDown:N,value:S},v)),w&&r.createElement(l.Text,{size:p,style:{lineHeight:1,color:"inherit"}},":"))}ee.displayName="@mantine/dates/TimeField";function oe({onChange:e,nextRef:t,min:a,max:n,maxValue:i}){return(s,u)=>{var w,p,d,S;if(s==="00"){e("00"),u&&((w=t==null?void 0:t.current)==null||w.focus()),u&&((p=t==null?void 0:t.current)==null||p.select());return}const v=parseInt(s,10);if(!Number.isNaN(v)){if(v>i){e(le(R.clamp({value:v,min:a,max:n}))),u&&((d=t==null?void 0:t.current)==null||d.focus()),u&&((S=t==null?void 0:t.current)==null||S.select());return}e(v.toString())}}}function Le(e){return e instanceof Date?{hours:le(e.getHours()),minutes:le(e.getMinutes()),seconds:le(e.getSeconds())}:{hours:"",minutes:"",seconds:""}}const Lt={xs:20,sm:23,md:25,lg:27,xl:29};var rn=l.createMemoStyles({disabled:{opacity:.6,cursor:"not-allowed"},controls:({size:e})=>({display:"flex",alignItems:"center",height:l.getSizeValue({size:e,sizes:l.INPUT_SIZES})-2}),timeInput:({theme:e,size:t})=>({width:l.getSizeValue({size:t,sizes:Lt}),appearance:"none",backgroundColor:"transparent",color:"inherit",padding:0,textAlign:"center",border:"1px solid transparent",fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),lineHeight:1,outline:0,"&[disabled]":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],cursor:"not-allowed"}})}),ln=Object.defineProperty,on=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Yt=(e,t,a)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ne=(e,t)=>{for(var a in t||(t={}))kt.call(t,a)&&Yt(e,a,t[a]);if(Pe)for(var a of Pe(t))Wt.call(t,a)&&Yt(e,a,t[a]);return e},se=(e,t)=>on(e,sn(t)),dn=(e,t)=>{var a={};for(var n in e)kt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&Pe)for(var n of Pe(e))t.indexOf(n)<0&&Wt.call(e,n)&&(a[n]=e[n]);return a};function Bt(e){var t=e,{required:a,label:n,error:i,description:s,className:u,style:w,themeOverride:p,size:d="sm",wrapperProps:S,classNames:v,styles:E,id:F,elementRef:j,value:I,defaultValue:N,onChange:c,withSeconds:y=!1,name:x,hoursLabel:D,minutesLabel:L,secondsLabel:A,disabled:M=!1}=t,$=dn(t,["required","label","error","description","className","style","themeOverride","size","wrapperProps","classNames","styles","id","elementRef","value","defaultValue","onChange","withSeconds","name","hoursLabel","minutesLabel","secondsLabel","disabled"]);const U=l.useMantineTheme(p),b=rn({theme:U,size:d},v,"time-input"),f=l.mergeStyles(b,E),_=R.useId(F),[V,C]=R.useUncontrolled({value:I,defaultValue:N,finalValue:new Date,rule:o=>o instanceof Date,onChange:c}),G=k.useRef(),q=k.useRef(),J=k.useRef(),[B,z]=k.useState(Le(V)),h=oe({onChange:o=>{z(O=>se(ne({},O),{hours:o})),C(P(V).set("hours",parseInt(o,10)).toDate())},min:0,max:23,maxValue:2,nextRef:q}),W=oe({onChange:o=>{z(O=>se(ne({},O),{minutes:o})),C(P(V).set("minutes",parseInt(o,10)).toDate())},min:0,max:59,maxValue:5,nextRef:J}),m=oe({onChange:o=>{z(O=>se(ne({},O),{seconds:o})),C(P(V).set("seconds",parseInt(o,10)).toDate())},min:0,max:59,maxValue:5});return r.createElement(l.InputWrapper,ne({required:a,label:n,error:i,description:s,className:u,style:w,themeOverride:p,classNames:v,styles:E,size:d,__staticSelector:"time-input",id:_},S),r.createElement(l.Input,ne({component:"div",__staticSelector:"time-input",themeOverride:p,required:a,invalid:!!i,onClick:()=>G.current.focus(),size:d,className:ue({[b.disabled]:M}),classNames:v,styles:E,disabled:M},$),r.createElement("div",{className:b.controls,style:f.controls},r.createElement(ee,{elementRef:R.useMergedRef(G,j),value:B.hours,onChange:h,setValue:o=>z(O=>se(ne({},O),{hours:o})),id:_,className:b.timeInput,style:f.timeInput,withSeparator:!0,size:d,max:23,"aria-label":D,disabled:M}),r.createElement(ee,{elementRef:q,value:B.minutes,onChange:W,setValue:o=>z(O=>se(ne({},O),{minutes:o})),className:b.timeInput,style:f.timeInput,withSeparator:y,size:d,max:59,"aria-label":L,disabled:M}),y&&r.createElement(ee,{elementRef:J,value:B.seconds,onChange:m,setValue:o=>z(O=>se(ne({},O),{seconds:o})),className:b.timeInput,style:f.timeInput,size:d,max:59,"aria-label":A,disabled:M}),x&&r.createElement("input",{type:"hidden",name:x,value:V.toISOString()}))))}Bt.displayName="@mantine/dates/TimeInput";var cn=l.createMemoStyles({disabled:{opacity:.6,cursor:"not-allowed"},inputWrapper:({size:e})=>({display:"inline-flex",alignItems:"center",height:l.getSizeValue({size:e,sizes:l.INPUT_SIZES})-2}),timeField:({theme:e,size:t})=>({width:l.getSizeValue({size:t,sizes:Lt}),appearance:"none",backgroundColor:"transparent",color:"inherit",padding:0,textAlign:"center",border:"1px solid transparent",fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),lineHeight:1,outline:0,"&[disabled]":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],cursor:"not-allowed"}}),separator:({theme:e,size:t})=>({paddingLeft:l.getSizeValue({size:t,sizes:e.spacing})/2,paddingRight:l.getSizeValue({size:t,sizes:e.spacing})/2,lineHeight:1,marginBottom:3})}),un=Object.defineProperty,pn=Object.defineProperties,fn=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,Ut=(e,t,a)=>t in e?un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ae=(e,t)=>{for(var a in t||(t={}))At.call(t,a)&&Ut(e,a,t[a]);if($e)for(var a of $e(t))Ht.call(t,a)&&Ut(e,a,t[a]);return e},re=(e,t)=>pn(e,fn(t)),mn=(e,t)=>{var a={};for(var n in e)At.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&$e)for(var n of $e(e))t.indexOf(n)<0&&Ht.call(e,n)&&(a[n]=e[n]);return a};function qt(e){var t=e,{required:a,label:n,error:i,description:s,className:u,style:w,themeOverride:p,size:d="sm",wrapperProps:S,classNames:v,styles:E,id:F,elementRef:j,value:I,defaultValue:N,onChange:c,withSeconds:y=!1,name:x,hoursLabel:D,minutesLabel:L,secondsLabel:A,labelSeparator:M="\u2013",disabled:$=!1}=t,U=mn(t,["required","label","error","description","className","style","themeOverride","size","wrapperProps","classNames","styles","id","elementRef","value","defaultValue","onChange","withSeconds","name","hoursLabel","minutesLabel","secondsLabel","labelSeparator","disabled"]);const b=l.useMantineTheme(p),f=cn({theme:b,size:d},v,"time-range-input"),_=l.mergeStyles(f,E),V=R.useId(F),C=new Date,G=new Date(new Date().valueOf()+1e3),[q,J]=R.useUncontrolled({value:I,defaultValue:N,finalValue:[C,G],rule:g=>g&&g.length===2&&g.every(H=>H instanceof Date),onChange:c}),B=k.useRef([]),z=k.useRef([]),h=k.useRef([]),[W,m]=k.useState(Le(q[0])),[o,O]=k.useState(Le(q[1])),[T,K]=k.useState(0),X=g=>{T===0?m(g):O(g)},Z=(g,H)=>{const Kt=T,ke=[...q];return ke[Kt]=P(ke[Kt]).set(g,parseInt(H,10)).toDate(),ke},Q=oe({onChange:g=>{X(H=>re(ae({},H),{hours:g})),J(Z("hours",g))},min:0,max:23,maxValue:2,nextRef:{current:z.current[T]}}),ie=oe({onChange:g=>{X(H=>re(ae({},H),{minutes:g})),J(Z("minutes",g))},min:0,max:59,maxValue:5,nextRef:{current:!y&&T===0?B.current[1]:h.current[T]}}),Ee=oe({onChange:g=>{X(H=>re(ae({},H),{seconds:g})),J(Z("seconds",g))},min:0,max:59,maxValue:5,nextRef:{current:T===0?B.current[1]:void 0}});return r.createElement(l.InputWrapper,ae({required:a,label:n,error:i,description:s,className:u,style:w,themeOverride:p,classNames:v,styles:E,size:d,__staticSelector:"time-range-input",id:V},S),r.createElement(l.Input,ae({component:"div",__staticSelector:"time-range-input",themeOverride:p,required:a,invalid:!!i,onClick:()=>{K(0),B.current[T].focus()},size:d,className:ue({[f.disabled]:$}),classNames:v,styles:E,disabled:$},U),r.createElement("div",{className:f.inputWrapper,style:_.inputWrapper},r.createElement(ee,{elementRef:R.useMergedRef(g=>{B.current[0]=g},j),value:W.hours,onChange:Q,setValue:g=>Q(g,!1),id:V,className:f.timeField,style:_.timeField,withSeparator:!0,size:d,max:23,"aria-label":`from ${D}`,disabled:$,onFocus:()=>K(0)}),r.createElement(ee,{elementRef:g=>{z.current[0]=g},value:W.minutes,onChange:ie,setValue:g=>m(H=>re(ae({},H),{minutes:g})),className:f.timeField,style:_.timeField,withSeparator:y,size:d,max:59,"aria-label":`from ${L}`,disabled:$,onFocus:()=>K(0)}),y&&r.createElement(ee,{elementRef:g=>{h.current[0]=g},value:W.seconds,onChange:Ee,setValue:g=>m(H=>re(ae({},H),{seconds:g})),className:f.timeField,style:_.timeField,size:d,max:59,"aria-label":`from ${A}`,disabled:$,onFocus:()=>K(0)}),r.createElement("span",{className:f.separator,style:_.separator},M),r.createElement("div",{className:f.inputWrapper,style:_.inputWrapper},r.createElement(ee,{elementRef:g=>{B.current[1]=g},value:o.hours,onChange:Q,setValue:g=>Q(g,!1),className:f.timeField,style:_.timeField,withSeparator:!0,size:d,max:23,"aria-label":`to ${D}`,disabled:$,onFocus:()=>K(1)}),r.createElement(ee,{elementRef:g=>{z.current[1]=g},value:o.minutes,onChange:ie,setValue:g=>O(H=>re(ae({},H),{minutes:g})),className:f.timeField,style:_.timeField,withSeparator:y,size:d,max:59,"aria-label":`to ${L}`,disabled:$,onFocus:()=>K(1)}),y&&r.createElement(ee,{elementRef:g=>{h.current[1]=g},value:o.seconds,onChange:Ee,setValue:g=>O(H=>re(ae({},H),{seconds:g})),className:f.timeField,style:_.timeField,size:d,max:59,"aria-label":`to ${A}`,disabled:$,onFocus:()=>K(1)})),x&&r.createElement("input",{type:"hidden",name:`${x}-from`,value:q[0].toISOString()}),x&&r.createElement("input",{type:"hidden",name:`${x}-to`,value:q[1].toISOString()}))))}qt.displayName="@mantine/dates/TimeRangeInput",Y.Calendar=Ve,Y.DatePicker=Et,Y.DateRangePicker=Tt,Y.Month=ye,Y.RangeCalendar=ze,Y.TimeInput=Bt,Y.TimeRangeInput=qt,Y.getEndOfWeek=Ye,Y.getMonthDays=Be,Y.getMonthsNames=Ae,Y.getStartOfWeek=Me,Y.getWeekdaysNames=He,Y.getYearsRange=Ue,Y.isSameDate=ce,Y.isSameMonth=Ce,Object.defineProperty(Y,"__esModule",{value:!0})});
//# sourceMappingURL=index.umd.js.map
{
"name": "@mantine/dates",
"description": "Calendars, date and time pickers based on Mantine components",
"version": "2.5.0-alpha.5",
"version": "2.5.0",
"main": "cjs/index.js",

@@ -12,4 +12,4 @@ "module": "esm/index.js",

"peerDependencies": {
"@mantine/core": "2.5.0-alpha.5",
"@mantine/hooks": "2.5.0-alpha.5",
"@mantine/core": "2.5.0",
"@mantine/hooks": "2.5.0",
"dayjs": "^1.10.5",

@@ -16,0 +16,0 @@ "react": ">=16.8.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc