ag-grid-react-components
Version:
Give your users the date filtering they deserve. Relative date queries, quick filters, and shareable views for AG Grid.
26 lines • 196 kB
JavaScript
(function(H,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("ag-grid-react"),require("date-fns"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","ag-grid-react","date-fns","react-dom"],h):(H=typeof globalThis<"u"?globalThis:H||self,h(H.AGGridReactComponents={},H.React,H.AgGridReact,H.dateFns,H.ReactDOM))})(this,function(H,h,Ee,f,_t){"use strict";var li=Object.defineProperty;var ci=(H,h,Ee)=>h in H?li(H,h,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):H[h]=Ee;var nn=(H,h,Ee)=>ci(H,typeof h!="symbol"?h+"":h,Ee);function Xt(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(a,t,e.get?e:{enumerable:!0,get:()=>r[t]})}}return a.default=r,Object.freeze(a)}const B=Xt(h),on=Xt(_t);function an(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Je={exports:{}},Ae={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Zt;function sn(){if(Zt)return Ae;Zt=1;var r=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function t(e,n,o){var i=null;if(o!==void 0&&(i=""+o),n.key!==void 0&&(i=""+n.key),"key"in n){o={};for(var s in n)s!=="key"&&(o[s]=n[s])}else o=n;return n=o.ref,{$$typeof:r,type:e,key:i,ref:n!==void 0?n:null,props:o}}return Ae.Fragment=a,Ae.jsx=t,Ae.jsxs=t,Ae}var je={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var er;function ln(){return er||(er=1,process.env.NODE_ENV!=="production"&&function(){function r(M){if(M==null)return null;if(typeof M=="function")return M.$$typeof===j?null:M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case v:return"Fragment";case b:return"Profiler";case g:return"StrictMode";case T:return"Suspense";case w:return"SuspenseList";case R:return"Activity"}if(typeof M=="object")switch(typeof M.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case y:return"Portal";case x:return(M.displayName||"Context")+".Provider";case N:return(M._context.displayName||"Context")+".Consumer";case E:var W=M.render;return M=M.displayName,M||(M=W.displayName||W.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case S:return W=M.displayName||null,W!==null?W:r(M.type)||"Memo";case k:W=M._payload,M=M._init;try{return r(M(W))}catch{}}return null}function a(M){return""+M}function t(M){try{a(M);var W=!1}catch{W=!0}if(W){W=console;var J=W.error,te=typeof Symbol=="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return J.call(W,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",te),a(M)}}function e(M){if(M===v)return"<>";if(typeof M=="object"&&M!==null&&M.$$typeof===k)return"<...>";try{var W=r(M);return W?"<"+W+">":"<...>"}catch{return"<...>"}}function n(){var M=D.A;return M===null?null:M.getOwner()}function o(){return Error("react-stack-top-frame")}function i(M){if(L.call(M,"key")){var W=Object.getOwnPropertyDescriptor(M,"key").get;if(W&&W.isReactWarning)return!1}return M.key!==void 0}function s(M,W){function J(){C||(C=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",W))}J.isReactWarning=!0,Object.defineProperty(M,"key",{get:J,configurable:!0})}function l(){var M=r(this.type);return P[M]||(P[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function c(M,W,J,te,be,fe,qt,Gt){return J=fe.ref,M={$$typeof:m,type:M,key:W,props:fe,_owner:be},(J!==void 0?J:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:l}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Gt}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function u(M,W,J,te,be,fe,qt,Gt){var re=W.children;if(re!==void 0)if(te)if(O(re)){for(te=0;te<re.length;te++)p(re[te]);Object.freeze&&Object.freeze(re)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(re);if(L.call(W,"key")){re=r(M);var Re=Object.keys(W).filter(function(si){return si!=="key"});te=0<Re.length?"{key: someKey, "+Re.join(": ..., ")+": ...}":"{key: someKey}",q[re+te]||(Re=0<Re.length?"{"+Re.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,te,re,Re,re),q[re+te]=!0)}if(re=null,J!==void 0&&(t(J),re=""+J),i(W)&&(t(W.key),re=""+W.key),"key"in W){J={};for(var Jt in W)Jt!=="key"&&(J[Jt]=W[Jt])}else J=W;return re&&s(J,typeof M=="function"?M.displayName||M.name||"Unknown":M),c(M,re,fe,be,n(),J,qt,Gt)}function p(M){typeof M=="object"&&M!==null&&M.$$typeof===m&&M._store&&(M._store.validated=1)}var d=h,m=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),x=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),D=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,O=Array.isArray,I=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(M){return M()}};var C,P={},A=d["react-stack-bottom-frame"].bind(d,o)(),F=I(e(o)),q={};je.Fragment=v,je.jsx=function(M,W,J,te,be){var fe=1e4>D.recentlyCreatedOwnerStacks++;return u(M,W,J,!1,te,be,fe?Error("react-stack-top-frame"):A,fe?I(e(M)):F)},je.jsxs=function(M,W,J,te,be){var fe=1e4>D.recentlyCreatedOwnerStacks++;return u(M,W,J,!0,te,be,fe?Error("react-stack-top-frame"):A,fe?I(e(M)):F)}}()),je}var tr;function cn(){return tr||(tr=1,process.env.NODE_ENV==="production"?Je.exports=sn():Je.exports=ln()),Je.exports}var _=cn();const kt=process.env.NODE_ENV==="development",un=r=>({log:(...a)=>z.log(`[${r}]`,...a),warn:(...a)=>z.warn(`[${r}]`,...a),error:(...a)=>z.error(`[${r}]`,...a),debug:(...a)=>z.debug(`[${r}]`,...a),info:(...a)=>z.log(`[${r}]`,...a)}),z={log:(...r)=>{kt&&console.log(...r)},warn:(...r)=>{kt&&console.warn(...r)},error:(...r)=>{console.error(...r)},debug:(...r)=>{kt&&console.debug(...r)}},we={filterModeSection:"_filterModeSection_v2epc_1",filterLabel:"_filterLabel_v2epc_5",dateModeSelector:"_dateModeSelector_v2epc_13",dateModeOption:"_dateModeOption_v2epc_21",selected:"_selected_v2epc_43"},dn=({mode:r,onModeChange:a,className:t=""})=>_.jsxs("div",{className:`${we.filterModeSection} ${t}`,children:[_.jsx("label",{id:"date-mode-label",className:we.filterLabel,children:"Date Mode"}),_.jsxs("div",{className:we.dateModeSelector,"data-testid":"mode-toggle",role:"radiogroup","aria-labelledby":"date-mode-label","aria-describedby":"date-mode-description",children:[_.jsx("button",{className:`${we.dateModeOption} ${r==="absolute"?we.selected:""}`,role:"radio","aria-checked":r==="absolute",tabIndex:r==="absolute"?0:-1,onClick:()=>r!=="absolute"&&a(),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),r!=="absolute"&&a())},children:"Specific"}),_.jsx("button",{className:`${we.dateModeOption} ${r==="relative"?we.selected:""}`,role:"radio","aria-checked":r==="relative",tabIndex:r==="relative"?0:-1,onClick:()=>r!=="relative"&&a(),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),r!=="relative"&&a())},children:"Relative"})]}),_.jsx("div",{id:"date-mode-description",className:"sr-only","aria-live":"polite",children:'Choose between specific dates or relative date expressions like "Today+7d"'})]}),pn=h.memo(dn,(r,a)=>r.mode===a.mode&&r.className===a.className),Xe={filterTypeSection:"_filterTypeSection_1vejc_1",filterLabel:"_filterLabel_1vejc_5",filterTypeSelect:"_filterTypeSelect_1vejc_13",screenReaderOnly:"_screenReaderOnly_1vejc_39"},fn=({filterType:r,onTypeChange:a,className:t=""})=>{const e=h.useCallback(n=>{a(n.target.value)},[a]);return _.jsxs("div",{className:`${Xe.filterTypeSection} ${t}`,children:[_.jsx("label",{htmlFor:"filter-type-select",className:Xe.filterLabel,children:"Filter Type"}),_.jsxs("select",{id:"filter-type-select",className:Xe.filterTypeSelect,value:r,onChange:e,"aria-label":"Select filter type","aria-describedby":"filter-type-description",children:[_.jsx("option",{value:"equals",children:"Equals"}),_.jsx("option",{value:"notEqual",children:"Not Equal"}),_.jsx("option",{value:"after",children:"After"}),_.jsx("option",{value:"before",children:"Before"}),_.jsx("option",{value:"inRange",children:"In Range"})]}),_.jsx("div",{id:"filter-type-description",className:Xe.screenReaderOnly,"aria-live":"polite",children:"Choose how to filter dates: equals a specific date, not equal to a date, after a date, before a date, or within a date range"})]})},hn=h.memo(fn,(r,a)=>r.filterType===a.filterType&&r.className===a.className);function rr(r){var a,t,e="";if(typeof r=="string"||typeof r=="number")e+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(a=0;a<n;a++)r[a]&&(t=rr(r[a]))&&(e&&(e+=" "),e+=t)}else for(t in r)r[t]&&(e&&(e+=" "),e+=t);return e}function Z(){for(var r,a,t=0,e="",n=arguments.length;t<n;t++)(r=arguments[t])&&(a=rr(r))&&(e&&(e+=" "),e+=a);return e}function Ze(){return typeof window<"u"}function Me(r){return nr(r)?(r.nodeName||"").toLowerCase():"#document"}function oe(r){var a;return(r==null||(a=r.ownerDocument)==null?void 0:a.defaultView)||window}function le(r){var a;return(a=(nr(r)?r.ownerDocument:r.document)||window.document)==null?void 0:a.documentElement}function nr(r){return Ze()?r instanceof Node||r instanceof oe(r).Node:!1}function ee(r){return Ze()?r instanceof Element||r instanceof oe(r).Element:!1}function ce(r){return Ze()?r instanceof HTMLElement||r instanceof oe(r).HTMLElement:!1}function or(r){return!Ze()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof oe(r).ShadowRoot}function Fe(r){const{overflow:a,overflowX:t,overflowY:e,display:n}=ae(r);return/auto|scroll|overlay|hidden|clip/.test(a+e+t)&&!["inline","contents"].includes(n)}function mn(r){return["table","td","th"].includes(Me(r))}function et(r){return[":popover-open",":modal"].some(a=>{try{return r.matches(a)}catch{return!1}})}function St(r){const a=xt(),t=ee(r)?ae(r):r;return["transform","translate","scale","rotate","perspective"].some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!a&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!a&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(e=>(t.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(t.contain||"").includes(e))}function vn(r){let a=me(r);for(;ce(a)&&!Te(a);){if(St(a))return a;if(et(a))return null;a=me(a)}return null}function xt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Te(r){return["html","body","#document"].includes(Me(r))}function ae(r){return oe(r).getComputedStyle(r)}function tt(r){return ee(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function me(r){if(Me(r)==="html")return r;const a=r.assignedSlot||r.parentNode||or(r)&&r.host||le(r);return or(a)?a.host:a}function ar(r){const a=me(r);return Te(a)?r.ownerDocument?r.ownerDocument.body:r.body:ce(a)&&Fe(a)?a:ar(a)}function We(r,a,t){var e;a===void 0&&(a=[]),t===void 0&&(t=!0);const n=ar(r),o=n===((e=r.ownerDocument)==null?void 0:e.body),i=oe(n);if(o){const s=Ct(i);return a.concat(i,i.visualViewport||[],Fe(n)?n:[],s&&t?We(s):[])}return a.concat(n,We(n,[],t))}function Ct(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}const Oe=Math.min,_e=Math.max,rt=Math.round,nt=Math.floor,ue=r=>({x:r,y:r}),gn={left:"right",right:"left",bottom:"top",top:"bottom"},yn={start:"end",end:"start"};function Dn(r,a,t){return _e(r,Oe(a,t))}function ot(r,a){return typeof r=="function"?r(a):r}function Ne(r){return r.split("-")[0]}function Be(r){return r.split("-")[1]}function bn(r){return r==="x"?"y":"x"}function Et(r){return r==="y"?"height":"width"}function ke(r){return["top","bottom"].includes(Ne(r))?"y":"x"}function Mt(r){return bn(ke(r))}function wn(r,a,t){t===void 0&&(t=!1);const e=Be(r),n=Mt(r),o=Et(n);let i=n==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=at(i)),[i,at(i)]}function _n(r){const a=at(r);return[Tt(r),a,Tt(a)]}function Tt(r){return r.replace(/start|end/g,a=>yn[a])}function kn(r,a,t){const e=["left","right"],n=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(r){case"top":case"bottom":return t?a?n:e:a?e:n;case"left":case"right":return a?o:i;default:return[]}}function Sn(r,a,t,e){const n=Be(r);let o=kn(Ne(r),t==="start",e);return n&&(o=o.map(i=>i+"-"+n),a&&(o=o.concat(o.map(Tt)))),o}function at(r){return r.replace(/left|right|bottom|top/g,a=>gn[a])}function xn(r){return{top:0,right:0,bottom:0,left:0,...r}}function ir(r){return typeof r!="number"?xn(r):{top:r,right:r,bottom:r,left:r}}function it(r){const{x:a,y:t,width:e,height:n}=r;return{width:e,height:n,top:t,left:a,right:a+e,bottom:t+n,x:a,y:t}}var Cn=typeof document<"u",En=function(){},st=Cn?h.useLayoutEffect:En;const Mn={...B}.useInsertionEffect||(r=>r());function Tn(r){const a=B.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Mn(()=>{a.current=r}),B.useCallback(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return a.current==null?void 0:a.current(...e)},[])}function sr(r,a,t){let{reference:e,floating:n}=r;const o=ke(a),i=Mt(a),s=Et(i),l=Ne(a),c=o==="y",u=e.x+e.width/2-n.width/2,p=e.y+e.height/2-n.height/2,d=e[s]/2-n[s]/2;let m;switch(l){case"top":m={x:u,y:e.y-n.height};break;case"bottom":m={x:u,y:e.y+e.height};break;case"right":m={x:e.x+e.width,y:p};break;case"left":m={x:e.x-n.width,y:p};break;default:m={x:e.x,y:e.y}}switch(Be(a)){case"start":m[i]-=d*(t&&c?-1:1);break;case"end":m[i]+=d*(t&&c?-1:1);break}return m}const On=async(r,a,t)=>{const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i}=t,s=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(a));let c=await i.getElementRects({reference:r,floating:a,strategy:n}),{x:u,y:p}=sr(c,e,l),d=e,m={},y=0;for(let v=0;v<s.length;v++){const{name:g,fn:b}=s[v],{x:N,y:x,data:E,reset:T}=await b({x:u,y:p,initialPlacement:e,placement:d,strategy:n,middlewareData:m,rects:c,platform:i,elements:{reference:r,floating:a}});u=N??u,p=x??p,m={...m,[g]:{...m[g],...E}},T&&y<=50&&(y++,typeof T=="object"&&(T.placement&&(d=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:r,floating:a,strategy:n}):T.rects),{x:u,y:p}=sr(c,d,l)),v=-1)}return{x:u,y:p,placement:d,strategy:n,middlewareData:m}};async function Nn(r,a){var t;a===void 0&&(a={});const{x:e,y:n,platform:o,rects:i,elements:s,strategy:l}=r,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:m=0}=ot(a,r),y=ir(m),g=s[d?p==="floating"?"reference":"floating":p],b=it(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(g)))==null||t?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),N=p==="floating"?{x:e,y:n,width:i.floating.width,height:i.floating.height}:i.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),E=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},T=it(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:N,offsetParent:x,strategy:l}):N);return{top:(b.top-T.top+y.top)/E.y,bottom:(T.bottom-b.bottom+y.bottom)/E.y,left:(b.left-T.left+y.left)/E.x,right:(T.right-b.right+y.right)/E.x}}const In=r=>({name:"arrow",options:r,async fn(a){const{x:t,y:e,placement:n,rects:o,platform:i,elements:s,middlewareData:l}=a,{element:c,padding:u=0}=ot(r,a)||{};if(c==null)return{};const p=ir(u),d={x:t,y:e},m=Mt(n),y=Et(m),v=await i.getDimensions(c),g=m==="y",b=g?"top":"left",N=g?"bottom":"right",x=g?"clientHeight":"clientWidth",E=o.reference[y]+o.reference[m]-d[m]-o.floating[y],T=d[m]-o.reference[m],w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let S=w?w[x]:0;(!S||!await(i.isElement==null?void 0:i.isElement(w)))&&(S=s.floating[x]||o.floating[y]);const k=E/2-T/2,R=S/2-v[y]/2-1,j=Oe(p[b],R),D=Oe(p[N],R),L=j,O=S-v[y]-D,I=S/2-v[y]/2+k,C=Dn(L,I,O),P=!l.arrow&&Be(n)!=null&&I!==C&&o.reference[y]/2-(I<L?j:D)-v[y]/2<0,A=P?I<L?I-L:I-O:0;return{[m]:d[m]+A,data:{[m]:C,centerOffset:I-C-A,...P&&{alignmentOffset:A}},reset:P}}}),Pn=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(a){var t,e;const{placement:n,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=a,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...g}=ot(r,a);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const b=Ne(n),N=ke(s),x=Ne(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=d||(x||!v?[at(s)]:_n(s)),w=y!=="none";!d&&w&&T.push(...Sn(s,v,y,E));const S=[s,...T],k=await Nn(a,g),R=[];let j=((e=o.flip)==null?void 0:e.overflows)||[];if(u&&R.push(k[b]),p){const I=wn(n,i,E);R.push(k[I[0]],k[I[1]])}if(j=[...j,{placement:n,overflows:R}],!R.every(I=>I<=0)){var D,L;const I=(((D=o.flip)==null?void 0:D.index)||0)+1,C=S[I];if(C&&(!(p==="alignment"?N!==ke(C):!1)||j.every(F=>F.overflows[0]>0&&ke(F.placement)===N)))return{data:{index:I,overflows:j},reset:{placement:C}};let P=(L=j.filter(A=>A.overflows[0]<=0).sort((A,F)=>A.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!P)switch(m){case"bestFit":{var O;const A=(O=j.filter(F=>{if(w){const q=ke(F.placement);return q===N||q==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(q=>q>0).reduce((q,M)=>q+M,0)]).sort((F,q)=>F[1]-q[1])[0])==null?void 0:O[0];A&&(P=A);break}case"initialPlacement":P=s;break}if(n!==P)return{reset:{placement:P}}}return{}}}};async function Ln(r,a){const{placement:t,platform:e,elements:n}=r,o=await(e.isRTL==null?void 0:e.isRTL(n.floating)),i=Ne(t),s=Be(t),l=ke(t)==="y",c=["left","top"].includes(i)?-1:1,u=o&&l?-1:1,p=ot(a,r);let{mainAxis:d,crossAxis:m,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof y=="number"&&(m=s==="end"?y*-1:y),l?{x:m*u,y:d*c}:{x:d*c,y:m*u}}const Yn=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(a){var t,e;const{x:n,y:o,placement:i,middlewareData:s}=a,l=await Ln(a,r);return i===((t=s.offset)==null?void 0:t.placement)&&(e=s.arrow)!=null&&e.alignmentOffset?{}:{x:n+l.x,y:o+l.y,data:{...l,placement:i}}}}};function lr(r){const a=ae(r);let t=parseFloat(a.width)||0,e=parseFloat(a.height)||0;const n=ce(r),o=n?r.offsetWidth:t,i=n?r.offsetHeight:e,s=rt(t)!==o||rt(e)!==i;return s&&(t=o,e=i),{width:t,height:e,$:s}}function Ot(r){return ee(r)?r:r.contextElement}function Ie(r){const a=Ot(r);if(!ce(a))return ue(1);const t=a.getBoundingClientRect(),{width:e,height:n,$:o}=lr(a);let i=(o?rt(t.width):t.width)/e,s=(o?rt(t.height):t.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Rn=ue(0);function cr(r){const a=oe(r);return!xt()||!a.visualViewport?Rn:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function An(r,a,t){return a===void 0&&(a=!1),!t||a&&t!==oe(r)?!1:a}function Se(r,a,t,e){a===void 0&&(a=!1),t===void 0&&(t=!1);const n=r.getBoundingClientRect(),o=Ot(r);let i=ue(1);a&&(e?ee(e)&&(i=Ie(e)):i=Ie(r));const s=An(o,t,e)?cr(o):ue(0);let l=(n.left+s.x)/i.x,c=(n.top+s.y)/i.y,u=n.width/i.x,p=n.height/i.y;if(o){const d=oe(o),m=e&&ee(e)?oe(e):e;let y=d,v=Ct(y);for(;v&&e&&m!==y;){const g=Ie(v),b=v.getBoundingClientRect(),N=ae(v),x=b.left+(v.clientLeft+parseFloat(N.paddingLeft))*g.x,E=b.top+(v.clientTop+parseFloat(N.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,p*=g.y,l+=x,c+=E,y=oe(v),v=Ct(y)}}return it({width:u,height:p,x:l,y:c})}function Nt(r,a){const t=tt(r).scrollLeft;return a?a.left+t:Se(le(r)).left+t}function ur(r,a,t){t===void 0&&(t=!1);const e=r.getBoundingClientRect(),n=e.left+a.scrollLeft-(t?0:Nt(r,e)),o=e.top+a.scrollTop;return{x:n,y:o}}function jn(r){let{elements:a,rect:t,offsetParent:e,strategy:n}=r;const o=n==="fixed",i=le(e),s=a?et(a.floating):!1;if(e===i||s&&o)return t;let l={scrollLeft:0,scrollTop:0},c=ue(1);const u=ue(0),p=ce(e);if((p||!p&&!o)&&((Me(e)!=="body"||Fe(i))&&(l=tt(e)),ce(e))){const m=Se(e);c=Ie(e),u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}const d=i&&!p&&!o?ur(i,l,!0):ue(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:t.y*c.y-l.scrollTop*c.y+u.y+d.y}}function Fn(r){return Array.from(r.getClientRects())}function Wn(r){const a=le(r),t=tt(r),e=r.ownerDocument.body,n=_e(a.scrollWidth,a.clientWidth,e.scrollWidth,e.clientWidth),o=_e(a.scrollHeight,a.clientHeight,e.scrollHeight,e.clientHeight);let i=-t.scrollLeft+Nt(r);const s=-t.scrollTop;return ae(e).direction==="rtl"&&(i+=_e(a.clientWidth,e.clientWidth)-n),{width:n,height:o,x:i,y:s}}function Bn(r,a){const t=oe(r),e=le(r),n=t.visualViewport;let o=e.clientWidth,i=e.clientHeight,s=0,l=0;if(n){o=n.width,i=n.height;const c=xt();(!c||c&&a==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:o,height:i,x:s,y:l}}function $n(r,a){const t=Se(r,!0,a==="fixed"),e=t.top+r.clientTop,n=t.left+r.clientLeft,o=ce(r)?Ie(r):ue(1),i=r.clientWidth*o.x,s=r.clientHeight*o.y,l=n*o.x,c=e*o.y;return{width:i,height:s,x:l,y:c}}function dr(r,a,t){let e;if(a==="viewport")e=Bn(r,t);else if(a==="document")e=Wn(le(r));else if(ee(a))e=$n(a,t);else{const n=cr(r);e={x:a.x-n.x,y:a.y-n.y,width:a.width,height:a.height}}return it(e)}function pr(r,a){const t=me(r);return t===a||!ee(t)||Te(t)?!1:ae(t).position==="fixed"||pr(t,a)}function Hn(r,a){const t=a.get(r);if(t)return t;let e=We(r,[],!1).filter(s=>ee(s)&&Me(s)!=="body"),n=null;const o=ae(r).position==="fixed";let i=o?me(r):r;for(;ee(i)&&!Te(i);){const s=ae(i),l=St(i);!l&&s.position==="fixed"&&(n=null),(o?!l&&!n:!l&&s.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Fe(i)&&!l&&pr(r,i))?e=e.filter(u=>u!==i):n=s,i=me(i)}return a.set(r,e),e}function Vn(r){let{element:a,boundary:t,rootBoundary:e,strategy:n}=r;const i=[...t==="clippingAncestors"?et(a)?[]:Hn(a,this._c):[].concat(t),e],s=i[0],l=i.reduce((c,u)=>{const p=dr(a,u,n);return c.top=_e(p.top,c.top),c.right=Oe(p.right,c.right),c.bottom=Oe(p.bottom,c.bottom),c.left=_e(p.left,c.left),c},dr(a,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Qn(r){const{width:a,height:t}=lr(r);return{width:a,height:t}}function Un(r,a,t){const e=ce(a),n=le(a),o=t==="fixed",i=Se(r,!0,o,a);let s={scrollLeft:0,scrollTop:0};const l=ue(0);function c(){l.x=Nt(n)}if(e||!e&&!o)if((Me(a)!=="body"||Fe(n))&&(s=tt(a)),e){const m=Se(a,!0,o,a);l.x=m.x+a.clientLeft,l.y=m.y+a.clientTop}else n&&c();o&&!e&&n&&c();const u=n&&!e&&!o?ur(n,s):ue(0),p=i.left+s.scrollLeft-l.x-u.x,d=i.top+s.scrollTop-l.y-u.y;return{x:p,y:d,width:i.width,height:i.height}}function It(r){return ae(r).position==="static"}function fr(r,a){if(!ce(r)||ae(r).position==="fixed")return null;if(a)return a(r);let t=r.offsetParent;return le(r)===t&&(t=t.ownerDocument.body),t}function hr(r,a){const t=oe(r);if(et(r))return t;if(!ce(r)){let n=me(r);for(;n&&!Te(n);){if(ee(n)&&!It(n))return n;n=me(n)}return t}let e=fr(r,a);for(;e&&mn(e)&&It(e);)e=fr(e,a);return e&&Te(e)&&It(e)&&!St(e)?t:e||vn(r)||t}const zn=async function(r){const a=this.getOffsetParent||hr,t=this.getDimensions,e=await t(r.floating);return{reference:Un(r.reference,await a(r.floating),r.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Kn(r){return ae(r).direction==="rtl"}const qn={convertOffsetParentRelativeRectToViewportRelativeRect:jn,getDocumentElement:le,getClippingRect:Vn,getOffsetParent:hr,getElementRects:zn,getClientRects:Fn,getDimensions:Qn,getScale:Ie,isElement:ee,isRTL:Kn};function mr(r,a){return r.x===a.x&&r.y===a.y&&r.width===a.width&&r.height===a.height}function Gn(r,a){let t=null,e;const n=le(r);function o(){var s;clearTimeout(e),(s=t)==null||s.disconnect(),t=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const c=r.getBoundingClientRect(),{left:u,top:p,width:d,height:m}=c;if(s||a(),!d||!m)return;const y=nt(p),v=nt(n.clientWidth-(u+d)),g=nt(n.clientHeight-(p+m)),b=nt(u),x={rootMargin:-y+"px "+-v+"px "+-g+"px "+-b+"px",threshold:_e(0,Oe(1,l))||1};let E=!0;function T(w){const S=w[0].intersectionRatio;if(S!==l){if(!E)return i();S?i(!1,S):e=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!mr(c,r.getBoundingClientRect())&&i(),E=!1}try{t=new IntersectionObserver(T,{...x,root:n.ownerDocument})}catch{t=new IntersectionObserver(T,x)}t.observe(r)}return i(!0),o}function Jn(r,a,t,e){e===void 0&&(e={});const{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=e,c=Ot(r),u=n||o?[...c?We(c):[],...We(a)]:[];u.forEach(b=>{n&&b.addEventListener("scroll",t,{passive:!0}),o&&b.addEventListener("resize",t)});const p=c&&s?Gn(c,t):null;let d=-1,m=null;i&&(m=new ResizeObserver(b=>{let[N]=b;N&&N.target===c&&m&&(m.unobserve(a),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(a)})),t()}),c&&!l&&m.observe(c),m.observe(a));let y,v=l?Se(r):null;l&&g();function g(){const b=Se(r);v&&!mr(v,b)&&t(),v=b,y=requestAnimationFrame(g)}return t(),()=>{var b;u.forEach(N=>{n&&N.removeEventListener("scroll",t),o&&N.removeEventListener("resize",t)}),p==null||p(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const Xn=Yn,Zn=Pn,vr=In,eo=(r,a,t)=>{const e=new Map,n={platform:qn,...t},o={...n.platform,_c:e};return On(r,a,{...n,platform:o})};var to=typeof document<"u",ro=function(){},lt=to?h.useLayoutEffect:ro;function ct(r,a){if(r===a)return!0;if(typeof r!=typeof a)return!1;if(typeof r=="function"&&r.toString()===a.toString())return!0;let t,e,n;if(r&&a&&typeof r=="object"){if(Array.isArray(r)){if(t=r.length,t!==a.length)return!1;for(e=t;e--!==0;)if(!ct(r[e],a[e]))return!1;return!0}if(n=Object.keys(r),t=n.length,t!==Object.keys(a).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(a,n[e]))return!1;for(e=t;e--!==0;){const o=n[e];if(!(o==="_owner"&&r.$$typeof)&&!ct(r[o],a[o]))return!1}return!0}return r!==r&&a!==a}function gr(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function yr(r,a){const t=gr(r);return Math.round(a*t)/t}function Pt(r){const a=B.useRef(r);return lt(()=>{a.current=r}),a}function no(r){r===void 0&&(r={});const{placement:a="bottom",strategy:t="absolute",middleware:e=[],platform:n,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=r,[u,p]=B.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[d,m]=B.useState(e);ct(d,e)||m(e);const[y,v]=B.useState(null),[g,b]=B.useState(null),N=B.useCallback(F=>{F!==w.current&&(w.current=F,v(F))},[]),x=B.useCallback(F=>{F!==S.current&&(S.current=F,b(F))},[]),E=o||y,T=i||g,w=B.useRef(null),S=B.useRef(null),k=B.useRef(u),R=l!=null,j=Pt(l),D=Pt(n),L=Pt(c),O=B.useCallback(()=>{if(!w.current||!S.current)return;const F={placement:a,strategy:t,middleware:d};D.current&&(F.platform=D.current),eo(w.current,S.current,F).then(q=>{const M={...q,isPositioned:L.current!==!1};I.current&&!ct(k.current,M)&&(k.current=M,on.flushSync(()=>{p(M)}))})},[d,a,t,D,L]);lt(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[c]);const I=B.useRef(!1);lt(()=>(I.current=!0,()=>{I.current=!1}),[]),lt(()=>{if(E&&(w.current=E),T&&(S.current=T),E&&T){if(j.current)return j.current(E,T,O);O()}},[E,T,O,j,R]);const C=B.useMemo(()=>({reference:w,floating:S,setReference:N,setFloating:x}),[N,x]),P=B.useMemo(()=>({reference:E,floating:T}),[E,T]),A=B.useMemo(()=>{const F={position:t,left:0,top:0};if(!P.floating)return F;const q=yr(P.floating,u.x),M=yr(P.floating,u.y);return s?{...F,transform:"translate("+q+"px, "+M+"px)",...gr(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:q,top:M}},[t,s,P.floating,u.x,u.y]);return B.useMemo(()=>({...u,update:O,refs:C,elements:P,floatingStyles:A}),[u,O,C,P,A])}const oo=r=>{function a(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:r,fn(t){const{element:e,padding:n}=typeof r=="function"?r(t):r;return e&&a(e)?e.current!=null?vr({element:e.current,padding:n}).fn(t):{}:e?vr({element:e,padding:n}).fn(t):{}}}},ao=(r,a)=>({...Xn(r),options:[r,a]}),io=(r,a)=>({...Zn(r),options:[r,a]}),so=(r,a)=>({...oo(r),options:[r,a]}),lo={...B};let Dr=!1,co=0;const br=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+co++;function uo(){const[r,a]=B.useState(()=>Dr?br():void 0);return st(()=>{r==null&&a(br())},[]),B.useEffect(()=>{Dr=!0},[]),r}const wr=lo.useId||uo;let $e;process.env.NODE_ENV!=="production"&&($e=new Set);function po(){for(var r,a=arguments.length,t=new Array(a),e=0;e<a;e++)t[e]=arguments[e];const n="Floating UI: "+t.join(" ");if(!((r=$e)!=null&&r.has(n))){var o;(o=$e)==null||o.add(n),console.warn(n)}}function fo(){for(var r,a=arguments.length,t=new Array(a),e=0;e<a;e++)t[e]=arguments[e];const n="Floating UI: "+t.join(" ");if(!((r=$e)!=null&&r.has(n))){var o;(o=$e)==null||o.add(n),console.error(n)}}const ho=B.forwardRef(function(a,t){const{context:{placement:e,elements:{floating:n},middlewareData:{arrow:o,shift:i}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:p,stroke:d,d:m,style:{transform:y,...v}={},...g}=a;process.env.NODE_ENV!=="production"&&(t||po("The `ref` prop is required for `FloatingArrow`."));const b=wr(),[N,x]=B.useState(!1);if(st(()=>{if(!n)return;ae(n).direction==="rtl"&&x(!0)},[n]),!n)return null;const[E,T]=e.split("-"),w=E==="top"||E==="bottom";let S=p;(w&&i!=null&&i.x||!w&&i!=null&&i.y)&&(S=null);const k=u*2,R=k/2,j=s/2*(c/-8+1),D=l/2*c/4,L=!!m,O=S&&T==="end"?"bottom":"top";let I=S&&T==="end"?"right":"left";S&&N&&(I=T==="end"?"left":"right");const C=(o==null?void 0:o.x)!=null?S||o.x:"",P=(o==null?void 0:o.y)!=null?S||o.y:"",A=m||"M0,0"+(" H"+s)+(" L"+(s-j)+","+(l-D))+(" Q"+s/2+","+l+" "+j+","+(l-D))+" Z",F={top:L?"rotate(180deg)":"",left:L?"rotate(90deg)":"rotate(-90deg)",bottom:L?"":"rotate(180deg)",right:L?"rotate(-90deg)":"rotate(90deg)"}[E];return _.jsxs("svg",{...g,"aria-hidden":!0,ref:t,width:L?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[I]:C,[O]:P,[E]:w||L?"100%":"calc(100% - "+k/2+"px)",transform:[F,y].filter(q=>!!q).join(" "),...v},children:[k>0&&_.jsx("path",{clipPath:"url(#"+b+")",fill:"none",stroke:d,strokeWidth:k+(m?0:1),d:A}),_.jsx("path",{stroke:k&&!m?g.fill:"none",d:A}),_.jsx("clipPath",{id:b,children:_.jsx("rect",{x:-R,y:R*(L?-1:1),width:s+k,height:s})})]})});function mo(){const r=new Map;return{emit(a,t){var e;(e=r.get(a))==null||e.forEach(n=>n(t))},on(a,t){r.has(a)||r.set(a,new Set),r.get(a).add(t)},off(a,t){var e;(e=r.get(a))==null||e.delete(t)}}}const vo=B.createContext(null),go=B.createContext(null),yo=()=>{var r;return((r=B.useContext(vo))==null?void 0:r.id)||null},Do=()=>B.useContext(go);function bo(r){const{open:a=!1,onOpenChange:t,elements:e}=r,n=wr(),o=B.useRef({}),[i]=B.useState(()=>mo()),s=yo()!=null;if(process.env.NODE_ENV!=="production"){const m=e.reference;m&&!ee(m)&&fo("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=B.useState(e.reference),u=Tn((m,y,v)=>{o.current.openEvent=m?y:void 0,i.emit("openchange",{open:m,event:y,reason:v,nested:s}),t==null||t(m,y,v)}),p=B.useMemo(()=>({setPositionReference:c}),[]),d=B.useMemo(()=>({reference:l||e.reference||null,floating:e.floating||null,domReference:e.reference}),[l,e.reference,e.floating]);return B.useMemo(()=>({dataRef:o,open:a,onOpenChange:u,elements:d,events:i,floatingId:n,refs:p}),[a,u,d,i,n,p])}function wo(r){r===void 0&&(r={});const{nodeId:a}=r,t=bo({...r,elements:{reference:null,floating:null,...r.elements}}),e=r.rootContext||t,n=e.elements,[o,i]=B.useState(null),[s,l]=B.useState(null),u=(n==null?void 0:n.domReference)||o,p=B.useRef(null),d=Do();st(()=>{u&&(p.current=u)},[u]);const m=no({...r,elements:{...n,...s&&{reference:s}}}),y=B.useCallback(x=>{const E=ee(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(E),m.refs.setReference(E)},[m.refs]),v=B.useCallback(x=>{(ee(x)||x===null)&&(p.current=x,i(x)),(ee(m.refs.reference.current)||m.refs.reference.current===null||x!==null&&!ee(x))&&m.refs.setReference(x)},[m.refs]),g=B.useMemo(()=>({...m.refs,setReference:v,setPositionReference:y,domReference:p}),[m.refs,v,y]),b=B.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),N=B.useMemo(()=>({...m,...e,refs:g,elements:b,nodeId:a}),[m,g,b,a,e]);return st(()=>{e.dataRef.current.floatingContext=N;const x=d==null?void 0:d.nodesRef.current.find(E=>E.id===a);x&&(x.context=N)}),B.useMemo(()=>({...m,context:N,refs:g,elements:b}),[m,g,b,N])}/*!
react-datepicker v8.4.0
https://github.com/Hacker0x01/react-datepicker
Released under the MIT License.
*/var Lt=function(a,t){return Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])},Lt(a,t)};function X(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Lt(r,a);function t(){this.constructor=r}r.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}var Q=function(){return Q=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Q.apply(this,arguments)};function de(r,a,t){if(t||arguments.length===2)for(var e=0,n=a.length,o;e<n;e++)(o||!(e in a))&&(o||(o=Array.prototype.slice.call(a,0,e)),o[e]=a[e]);return r.concat(o||Array.prototype.slice.call(a))}typeof SuppressedError=="function"&&SuppressedError;var _o=function(r){var a=r.showTimeSelectOnly,t=a===void 0?!1:a,e=r.showTime,n=e===void 0?!1:e,o=r.className,i=r.children,s=t?"Choose Time":"Choose Date".concat(n?" and Time":"");return h.createElement("div",{className:o,role:"dialog","aria-label":s,"aria-modal":"true"},i)},ko=function(r,a){var t=h.useRef(null),e=h.useRef(r);e.current=r;var n=h.useCallback(function(o){var i,s=o.composed&&o.composedPath&&o.composedPath().find(function(l){return l instanceof Node})||o.target;t.current&&!t.current.contains(s)&&(a&&s instanceof HTMLElement&&s.classList.contains(a)||(i=e.current)===null||i===void 0||i.call(e,o))},[a]);return h.useEffect(function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[n]),t},ut=function(r){var a=r.children,t=r.onClickOutside,e=r.className,n=r.containerRef,o=r.style,i=r.ignoreClass,s=ko(t,i);return h.createElement("div",{className:e,style:o,ref:function(l){s.current=l,n&&(n.current=l)}},a)},Y;(function(r){r.ArrowUp="ArrowUp",r.ArrowDown="ArrowDown",r.ArrowLeft="ArrowLeft",r.ArrowRight="ArrowRight",r.PageUp="PageUp",r.PageDown="PageDown",r.Home="Home",r.End="End",r.Enter="Enter",r.Space=" ",r.Tab="Tab",r.Escape="Escape",r.Backspace="Backspace",r.X="x"})(Y||(Y={}));function _r(){var r=typeof window<"u"?window:globalThis;return r}var He=12;function K(r){if(r==null)return new Date;var a=typeof r=="string"?f.parseISO(r):f.toDate(r);return dt(a)?a:new Date}function Yt(r,a,t,e,n){n===void 0&&(n=K());for(var o=Pe(t)||Pe(At()),i=Array.isArray(a)?a:[a],s=0,l=i;s<l.length;s++){var c=l[s],u=f.parse(r,c,n,{locale:o,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(dt(u)&&(!e||r===G(u,c,t)))return u}return null}function dt(r,a){return f.isValid(r)&&!f.isBefore(r,new Date("1/1/1800"))}function G(r,a,t){if(t==="en")return f.format(r,a,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var e=t?Pe(t):void 0;return t&&!e&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),e=e||Pe(At()),f.format(r,a,{locale:e,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function ie(r,a){var t=a.dateFormat,e=a.locale,n=Array.isArray(t)&&t.length>0?t[0]:t;return r&&G(r,n,e)||""}var kr=" - ";function So(r,a,t){if(!r)return"";var e=ie(r,t),n=a?ie(a,t):"";return"".concat(e).concat(kr).concat(n)}function xo(r,a){if(!(r!=null&&r.length))return"";var t=r[0]?ie(r[0],a):"";if(r.length===1)return t;if(r.length===2&&r[1]){var e=ie(r[1],a);return"".concat(t,", ").concat(e)}var n=r.length-1;return"".concat(t," (+").concat(n,")")}function Rt(r,a){var t=a.hour,e=t===void 0?0:t,n=a.minute,o=n===void 0?0:n,i=a.second,s=i===void 0?0:i;return f.setHours(f.setMinutes(f.setSeconds(r,s),o),e)}function Co(r){return f.getISOWeek(r)}function Eo(r,a){return G(r,"ddd",a)}function pt(r){return f.startOfDay(r)}function ve(r,a,t){var e=Pe(a||At());return f.startOfWeek(r,{locale:e,weekStartsOn:t})}function he(r){return f.startOfMonth(r)}function Ve(r){return f.startOfYear(r)}function Sr(r){return f.startOfQuarter(r)}function xr(){return f.startOfDay(K())}function Cr(r){return f.endOfDay(r)}function Mo(r){return f.endOfWeek(r)}function To(r){return f.endOfMonth(r)}function pe(r,a){return r&&a?f.isSameYear(r,a):!r&&!a}function ne(r,a){return r&&a?f.isSameMonth(r,a):!r&&!a}function ft(r,a){return r&&a?f.isSameQuarter(r,a):!r&&!a}function U(r,a){return r&&a?f.isSameDay(r,a):!r&&!a}function xe(r,a){return r&&a?f.isEqual(r,a):!r&&!a}function Qe(r,a,t){var e,n=f.startOfDay(a),o=f.endOfDay(t);try{e=f.isWithinInterval(r,{start:n,end:o})}catch{e=!1}return e}function At(){var r=_r();return r.__localeId__}function Pe(r){if(typeof r=="string"){var a=_r();return a.__localeData__?a.__localeData__[r]:void 0}else return r}function Oo(r,a,t){return a(G(r,"EEEE",t))}function No(r,a){return G(r,"EEEEEE",a)}function Io(r,a){return G(r,"EEE",a)}function jt(r,a){return G(f.setMonth(K(),r),"LLLL",a)}function Er(r,a){return G(f.setMonth(K(),r),"LLL",a)}function Po(r,a){return G(f.setQuarter(K(),r),"QQQ",a)}function se(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.maxDate,o=t.excludeDates,i=t.excludeDateIntervals,s=t.includeDates,l=t.includeDateIntervals,c=t.filterDate;return Ue(r,{minDate:e,maxDate:n})||o&&o.some(function(u){return u instanceof Date?U(r,u):U(r,u.date)})||i&&i.some(function(u){var p=u.start,d=u.end;return f.isWithinInterval(r,{start:p,end:d})})||s&&!s.some(function(u){return U(r,u)})||l&&!l.some(function(u){var p=u.start,d=u.end;return f.isWithinInterval(r,{start:p,end:d})})||c&&!c(K(r))||!1}function Ft(r,a){var t=a===void 0?{}:a,e=t.excludeDates,n=t.excludeDateIntervals;return n&&n.length>0?n.some(function(o){var i=o.start,s=o.end;return f.isWithinInterval(r,{start:i,end:s})}):e&&e.some(function(o){var i;return o instanceof Date?U(r,o):U(r,(i=o.date)!==null&&i!==void 0?i:new Date)})||!1}function Mr(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.maxDate,o=t.excludeDates,i=t.includeDates,s=t.filterDate;return Ue(r,{minDate:e?f.startOfMonth(e):void 0,maxDate:n?f.endOfMonth(n):void 0})||(o==null?void 0:o.some(function(l){return ne(r,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return ne(r,l)})||s&&!s(K(r))||!1}function ht(r,a,t,e){var n=f.getYear(r),o=f.getMonth(r),i=f.getYear(a),s=f.getMonth(a),l=f.getYear(e);return n===i&&n===l?o<=t&&t<=s:n<i?l===n&&o<=t||l===i&&s>=t||l<i&&l>n:!1}function Lo(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.maxDate,o=t.excludeDates,i=t.includeDates;return Ue(r,{minDate:e,maxDate:n})||o&&o.some(function(s){return ne(s instanceof Date?s:s.date,r)})||i&&!i.some(function(s){return ne(s,r)})||!1}function mt(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.maxDate,o=t.excludeDates,i=t.includeDates,s=t.filterDate;return Ue(r,{minDate:e,maxDate:n})||(o==null?void 0:o.some(function(l){return ft(r,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return ft(r,l)})||s&&!s(K(r))||!1}function vt(r,a,t){if(!a||!t||!f.isValid(a)||!f.isValid(t))return!1;var e=f.getYear(a),n=f.getYear(t);return e<=r&&n>=r}function gt(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.maxDate,o=t.excludeDates,i=t.includeDates,s=t.filterDate,l=new Date(r,0,1);return Ue(l,{minDate:e?f.startOfYear(e):void 0,maxDate:n?f.endOfYear(n):void 0})||(o==null?void 0:o.some(function(c){return pe(l,c instanceof Date?c:c.date)}))||i&&!i.some(function(c){return pe(l,c)})||s&&!s(K(l))||!1}function yt(r,a,t,e){var n=f.getYear(r),o=f.getQuarter(r),i=f.getYear(a),s=f.getQuarter(a),l=f.getYear(e);return n===i&&n===l?o<=t&&t<=s:n<i?l===n&&o<=t||l===i&&s>=t||l<i&&l>n:!1}function Ue(r,a){var t,e=a===void 0?{}:a,n=e.minDate,o=e.maxDate;return(t=n&&f.differenceInCalendarDays(r,n)<0||o&&f.differenceInCalendarDays(r,o)>0)!==null&&t!==void 0?t:!1}function Tr(r,a){return a.some(function(t){return f.getHours(t)===f.getHours(r)&&f.getMinutes(t)===f.getMinutes(r)&&f.getSeconds(t)===f.getSeconds(r)})}function Or(r,a){var t=a===void 0?{}:a,e=t.excludeTimes,n=t.includeTimes,o=t.filterTime;return e&&Tr(r,e)||n&&!Tr(r,n)||o&&!o(r)||!1}function Nr(r,a){var t=a.minTime,e=a.maxTime;if(!t||!e)throw new Error("Both minTime and maxTime props required");var n=K();n=f.setHours(n,f.getHours(r)),n=f.setMinutes(n,f.getMinutes(r)),n=f.setSeconds(n,f.getSeconds(r));var o=K();o=f.setHours(o,f.getHours(t)),o=f.setMinutes(o,f.getMinutes(t)),o=f.setSeconds(o,f.getSeconds(t));var i=K();i=f.setHours(i,f.getHours(e)),i=f.setMinutes(i,f.getMinutes(e)),i=f.setSeconds(i,f.getSeconds(e));var s;try{s=!f.isWithinInterval(n,{start:o,end:i})}catch{s=!1}return s}function Ir(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.includeDates,o=f.subMonths(r,1);return e&&f.differenceInCalendarMonths(e,o)>0||n&&n.every(function(i){return f.differenceInCalendarMonths(i,o)>0})||!1}function Pr(r,a){var t=a===void 0?{}:a,e=t.maxDate,n=t.includeDates,o=f.addMonths(r,1);return e&&f.differenceInCalendarMonths(o,e)>0||n&&n.every(function(i){return f.differenceInCalendarMonths(o,i)>0})||!1}function Yo(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.includeDates,o=f.startOfYear(r),i=f.subQuarters(o,1);return e&&f.differenceInCalendarQuarters(e,i)>0||n&&n.every(function(s){return f.differenceInCalendarQuarters(s,i)>0})||!1}function Ro(r,a){var t=a===void 0?{}:a,e=t.maxDate,n=t.includeDates,o=f.endOfYear(r),i=f.addQuarters(o,1);return e&&f.differenceInCalendarQuarters(i,e)>0||n&&n.every(function(s){return f.differenceInCalendarQuarters(i,s)>0})||!1}function Lr(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.includeDates,o=f.subYears(r,1);return e&&f.differenceInCalendarYears(e,o)>0||n&&n.every(function(i){return f.differenceInCalendarYears(i,o)>0})||!1}function Ao(r,a){var t=a===void 0?{}:a,e=t.minDate,n=t.yearItemNumber,o=n===void 0?He:n,i=Ve(f.subYears(r,o)),s=ge(i,o).endPeriod,l=e&&f.getYear(e);return l&&l>s||!1}function Yr(r,a){var t=a===void 0?{}:a,e=t.maxDate,n=t.includeDates,o=f.addYears(r,1);return e&&f.differenceInCalendarYears(o,e)>0||n&&n.every(function(i){return f.differenceInCalendarYears(o,i)>0})||!1}function jo(r,a){var t=a===void 0?{}:a,e=t.maxDate,n=t.yearItemNumber,o=n===void 0?He:n,i=f.addYears(r,o),s=ge(i,o).startPeriod,l=e&&f.getYear(e);return l&&l<s||!1}function Rr(r){var a=r.minDate,t=r.includeDates;if(t&&a){var e=t.filter(function(n){return f.differenceInCalendarDays(n,a)>=0});return f.min(e)}else return t?f.min(t):a}function Ar(r){var a=r.maxDate,t=r.includeDates;if(t&&a){var e=t.filter(function(n){return f.differenceInCalendarDays(n,a)<=0});return f.max(e)}else return t?f.max(t):a}function jr(r,a){var t;r===void 0&&(r=[]),a===void 0&&(a="react-datepicker__day--highlighted");for(var e=new Map,n=0,o=r.length;n<o;n++){var i=r[n];if(f.isDate(i)){var s=G(i,"MM.dd.yyyy"),l=e.get(s)||[];l.includes(a)||(l.push(a),e.set(s,l))}else if(typeof i=="object"){var c=Object.keys(i),u=(t=c[0])!==null&&t!==void 0?t:"",p=i[u];if(typeof u=="string"&&Array.isArray(p))for(var d=0,m=p.length;d<m;d++){var y=p[d];if(y){var s=G(y,"MM.dd.yyyy"),l=e.get(s)||[];l.includes(u)||(l.push(u),e.set(s,l))}}}}return e}function Fo(r,a){return r.length!==a.length?!1:r.every(function(t,e){return t===a[e]})}function Wo(r,a){r===void 0&&(r=[]),a===void 0&&(a="react-datepicker__day--holidays");var t=new Map;return r.forEach(function(e){var n=e.date,o=e.holidayName;if(f.isDate(n)){var i=G(n,"MM.dd.yyyy"),s=t.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===a&&Fo(s.holidayNames,[o]))){s.className=a;var l=s.holidayNames;s.holidayNames=l?de(de([],l,!0),[o],!1):[o],t.set(i,s)}}}),t}function Bo(r,a,t,e,n){for(var o=n.length,i=[],s=0;s<o;s++){var l=r,c=n[s];c&&(l=f.addHours(l,f.getHours(c)),l=f.addMinutes(l,f.getMinutes(c)),l=f.addSeconds(l,f.getSeconds(c)));var u=f.addMinutes(r,(t+1)*e);f.isAfter(l,a)&&f.isBefore(l,u)&&c!=null&&i.push(c)}return i}function Fr(r){return r<10?"0".concat(r):"".concat(r)}function ge(r,a){a===void 0&&(a=He);var t=Math.ceil(f.getYear(r)/a)*a,e=t-(a-1);return{startPeriod:e,endPeriod:t}}function $o(r){var a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),t=new Date(r.getFullYear(),r.getMonth(),r.getDate(),24);return Math.round((+t-+a)/36e5)}function Wr(r){var a=r.getSeconds(),t=r.getMilliseconds();return f.toDate(r.getTime()-a*1e3-t)}function Ho(r,a){return Wr(r).getTime()===Wr(a).getTime()}function Br(r){if(!f.isDate(r))throw new Error("Invalid date");var a=new Date(r);return a.setHours(0,0,0,0),a}function $r(r,a){if(!f.isDate(r)||!f.isDate(a))throw new Error("Invalid date received");var t=Br(r),e=Br(a);return f.isBefore(t,e)}function Hr(r){return r.key===Y.Space}var Vo=function(r){X(a,r);function a(t){var e=r.call(this,t)||this;return e.inputRef=h.createRef(),e.onTimeChange=function(n){var o,i;e.setState({time:n});var s=e.props.date,l=s instanceof Date&&!isNaN(+s),c=l?s:new Date;if(n!=null&&n.includes(":")){var u=n.split(":"),p=u[0],d=u[1];c.setHours(Number(p)),c.setMinutes(Number(d))}(i=(o=e.props).onChange)===null||i===void 0||i.call(o,c)},e.renderTimeInput=function(){var n=e.state.time,o=e.props,i=o.date,s=o.timeString,l=o.customTimeInput;return l?h.cloneElement(l,{date:i,value:n,onChange:e.onTimeChange}):h.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:e.inputRef,onClick:function(){var c;(c=e.inputRef.current)===null||c===void 0||c.focus()},required:!0,value:n,onChange:function(c){e.onTimeChange(c.target.value||s)}})},e.state={time:e.props.timeString},e}return a.getDerivedStateFromProps=function(t,e){return t.timeString!==e.time?{time:t.timeString}:null},a.prototype.render=function(){return h.createElement("div",{className:"react-datepicker__input-time-container"},h.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),h.createElement("div",{className:"react-datepicker-time__input-container"},h.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},a}(h.Component),Qo=function(r){X(a,r);function a(){var t=r!==null&&r.apply(this,arguments)||this;return t.dayEl=h.createRef(),t.handleClick=function(e){!t.isDisabled()&&t.props.onClick&&t.props.onClick(e)},t.handleMouseEnter=function(e){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(e)},t.handleOnKeyDown=function(e){var n,o,i=e.key;i===Y.Space&&(e.preventDefault(),e.key=Y.Enter),(o=(n=t.props).handleOnKeyDown)===null||o===void 0||o.call(n,e)},t.isSameDay=function(e){return U(t.props.day,e)},t.isKeyboardSelected=function(){var e;if(t.props.disabledKeyboardNavigation)return!1;var n=t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(i){return t.isSameDayOrWeek(i)}):t.isSameDayOrWeek(t.props.selected),o=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!n&&t.isSameDayOrWeek(t.props.preSelection)&&!o},t.isDisabled=function(e){return e===void 0&&(e=t.props.day),se(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(){return Ft(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return U(t.props.day,ve(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(