lll-date-picker 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -1
- package/dist/components/LLLDatePicker/DateInputs.d.ts +4 -0
- package/dist/components/LLLDatePicker/DateInputs.d.ts.map +1 -1
- package/dist/components/LLLDatePicker/PresetButtons.d.ts +13 -0
- package/dist/components/LLLDatePicker/PresetButtons.d.ts.map +1 -1
- package/dist/components/LLLDatePicker/index.d.ts.map +1 -1
- package/dist/components/LLLDatePicker/types.d.ts +19 -0
- package/dist/components/LLLDatePicker/types.d.ts.map +1 -1
- package/dist/index.cjs +17 -17
- package/dist/index.js +1309 -1300
- package/package.json +2 -3
- package/publish/preview-ui.mov +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Bs=Object.defineProperty;var Vs=(e,r,t)=>r in e?Bs(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var T=(e,r,t)=>Vs(e,typeof r!="symbol"?r+"":r,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const de=require("react"),$n=require("react-dom");function Hn(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const h=Hn(de),Bn=Hn($n);var wr={exports:{}},mt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var sn;function
|
|
9
|
+
*/var sn;function zs(){if(sn)return mt;sn=1;var e=de,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,l,c){var u,f={},p=null,g=null;c!==void 0&&(p=""+c),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(g=l.ref);for(u in l)n.call(l,u)&&!s.hasOwnProperty(u)&&(f[u]=l[u]);if(i&&i.defaultProps)for(u in l=i.defaultProps,l)f[u]===void 0&&(f[u]=l[u]);return{$$typeof:r,type:i,key:p,ref:g,props:f,_owner:o.current}}return mt.Fragment=t,mt.jsx=a,mt.jsxs=a,mt}var pt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,51 +14,51 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var an;function
|
|
17
|
+
*/var an;function qs(){return an||(an=1,process.env.NODE_ENV!=="production"&&function(){var e=de,r=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),v=Symbol.iterator,m="@@iterator";function y(d){if(d===null||typeof d!="object")return null;var E=v&&d[v]||d[m];return typeof E=="function"?E:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(d){{for(var E=arguments.length,R=new Array(E>1?E-1:0),D=1;D<E;D++)R[D-1]=arguments[D];b("error",d,R)}}function b(d,E,R){{var D=w.ReactDebugCurrentFrame,H=D.getStackAddendum();H!==""&&(E+="%s",R=R.concat([H]));var z=R.map(function(F){return String(F)});z.unshift("Warning: "+E),Function.prototype.apply.call(console[d],console,z)}}var x=!1,C=!1,S=!1,k=!1,W=!1,j;j=Symbol.for("react.module.reference");function $(d){return!!(typeof d=="string"||typeof d=="function"||d===n||d===s||W||d===o||d===c||d===u||k||d===g||x||C||S||typeof d=="object"&&d!==null&&(d.$$typeof===p||d.$$typeof===f||d.$$typeof===a||d.$$typeof===i||d.$$typeof===l||d.$$typeof===j||d.getModuleId!==void 0))}function q(d,E,R){var D=d.displayName;if(D)return D;var H=E.displayName||E.name||"";return H!==""?R+"("+H+")":R}function M(d){return d.displayName||"Context"}function I(d){if(d==null)return null;if(typeof d.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case n:return"Fragment";case t:return"Portal";case s:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case i:var E=d;return M(E)+".Consumer";case a:var R=d;return M(R._context)+".Provider";case l:return q(d,d.render,"ForwardRef");case f:var D=d.displayName||null;return D!==null?D:I(d.type)||"Memo";case p:{var H=d,z=H._payload,F=H._init;try{return I(F(z))}catch{return null}}}return null}var L=Object.assign,Z=0,V,G,A,X,ie,se,Ot;function Rt(){}Rt.__reactDisabledLog=!0;function tr(){{if(Z===0){V=console.log,G=console.info,A=console.warn,X=console.error,ie=console.group,se=console.groupCollapsed,Ot=console.groupEnd;var d={configurable:!0,enumerable:!0,value:Rt,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}Z++}}function rr(){{if(Z--,Z===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},d,{value:V}),info:L({},d,{value:G}),warn:L({},d,{value:A}),error:L({},d,{value:X}),group:L({},d,{value:ie}),groupCollapsed:L({},d,{value:se}),groupEnd:L({},d,{value:Ot})})}Z<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ft=w.ReactCurrentDispatcher,qe;function Ie(d,E,R){{if(qe===void 0)try{throw Error()}catch(H){var D=H.stack.trim().match(/\n( *(at )?)/);qe=D&&D[1]||""}return`
|
|
18
18
|
`+qe+d}}var Ge=!1,Ye;{var Tt=typeof WeakMap=="function"?WeakMap:Map;Ye=new Tt}function ht(d,E){if(!d||Ge)return"";{var R=Ye.get(d);if(R!==void 0)return R}var D;Ge=!0;var H=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var z;z=ft.current,ft.current=null,tr();try{if(E){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(le){D=le}Reflect.construct(d,[],F)}else{try{F.call()}catch(le){D=le}d.call(F.prototype)}}else{try{throw Error()}catch(le){D=le}d()}}catch(le){if(le&&D&&typeof le.stack=="string"){for(var N=le.stack.split(`
|
|
19
19
|
`),ce=D.stack.split(`
|
|
20
20
|
`),te=N.length-1,oe=ce.length-1;te>=1&&oe>=0&&N[te]!==ce[oe];)oe--;for(;te>=1&&oe>=0;te--,oe--)if(N[te]!==ce[oe]){if(te!==1||oe!==1)do if(te--,oe--,oe<0||N[te]!==ce[oe]){var he=`
|
|
21
|
-
`+N[te].replace(" at new "," at ");return d.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",d.displayName)),typeof d=="function"&&Ye.set(d,he),he}while(te>=1&&oe>=0);break}}}finally{Ge=!1,ft.current=z,rr(),Error.prepareStackTrace=H}var Qe=d?d.displayName||d.name:"",Be=Qe?Ie(Qe):"";return typeof d=="function"&&Ye.set(d,Be),Be}function $e(d,E,R){return ht(d,!1)}function kt(d){var E=d.prototype;return!!(E&&E.isReactComponent)}function Xe(d,E,R){if(d==null)return"";if(typeof d=="function")return ht(d,kt(d));if(typeof d=="string")return Ie(d);switch(d){case c:return Ie("Suspense");case u:return Ie("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case l:return $e(d.render);case
|
|
21
|
+
`+N[te].replace(" at new "," at ");return d.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",d.displayName)),typeof d=="function"&&Ye.set(d,he),he}while(te>=1&&oe>=0);break}}}finally{Ge=!1,ft.current=z,rr(),Error.prepareStackTrace=H}var Qe=d?d.displayName||d.name:"",Be=Qe?Ie(Qe):"";return typeof d=="function"&&Ye.set(d,Be),Be}function $e(d,E,R){return ht(d,!1)}function kt(d){var E=d.prototype;return!!(E&&E.isReactComponent)}function Xe(d,E,R){if(d==null)return"";if(typeof d=="function")return ht(d,kt(d));if(typeof d=="string")return Ie(d);switch(d){case c:return Ie("Suspense");case u:return Ie("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case l:return $e(d.render);case f:return Xe(d.type,E,R);case p:{var D=d,H=D._payload,z=D._init;try{return Xe(z(H),E,R)}catch{}}}return""}var He=Object.prototype.hasOwnProperty,St={},Mt=w.ReactDebugCurrentFrame;function Ee(d){if(d){var E=d._owner,R=Xe(d.type,d._source,E?E.type:null);Mt.setExtraStackFrame(R)}else Mt.setExtraStackFrame(null)}function xs(d,E,R,D,H){{var z=Function.call.bind(He);for(var F in d)if(z(d,F)){var N=void 0;try{if(typeof d[F]!="function"){var ce=Error((D||"React class")+": "+R+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ce.name="Invariant Violation",ce}N=d[F](E,F,D,R,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(te){N=te}N&&!(N instanceof Error)&&(Ee(H),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",D||"React class",R,F,typeof N),Ee(null)),N instanceof Error&&!(N.message in St)&&(St[N.message]=!0,Ee(H),P("Failed %s type: %s",R,N.message),Ee(null))}}}var Ps=Array.isArray;function nr(d){return Ps(d)}function Es(d){{var E=typeof Symbol=="function"&&Symbol.toStringTag,R=E&&d[Symbol.toStringTag]||d.constructor.name||"Object";return R}}function Cs(d){try{return Gr(d),!1}catch{return!0}}function Gr(d){return""+d}function Xr(d){if(Cs(d))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Es(d)),Gr(d)}var Ur=w.ReactCurrentOwner,Os={key:!0,ref:!0,__self:!0,__source:!0},Qr,Kr;function Rs(d){if(He.call(d,"ref")){var E=Object.getOwnPropertyDescriptor(d,"ref").get;if(E&&E.isReactWarning)return!1}return d.ref!==void 0}function Ts(d){if(He.call(d,"key")){var E=Object.getOwnPropertyDescriptor(d,"key").get;if(E&&E.isReactWarning)return!1}return d.key!==void 0}function ks(d,E){typeof d.ref=="string"&&Ur.current}function Ss(d,E){{var R=function(){Qr||(Qr=!0,P("%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://reactjs.org/link/special-props)",E))};R.isReactWarning=!0,Object.defineProperty(d,"key",{get:R,configurable:!0})}}function Ms(d,E){{var R=function(){Kr||(Kr=!0,P("%s: `ref` 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://reactjs.org/link/special-props)",E))};R.isReactWarning=!0,Object.defineProperty(d,"ref",{get:R,configurable:!0})}}var Ds=function(d,E,R,D,H,z,F){var N={$$typeof:r,type:d,key:E,ref:R,props:F,_owner:z};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:H}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function As(d,E,R,D,H){{var z,F={},N=null,ce=null;R!==void 0&&(Xr(R),N=""+R),Ts(E)&&(Xr(E.key),N=""+E.key),Rs(E)&&(ce=E.ref,ks(E,H));for(z in E)He.call(E,z)&&!Os.hasOwnProperty(z)&&(F[z]=E[z]);if(d&&d.defaultProps){var te=d.defaultProps;for(z in te)F[z]===void 0&&(F[z]=te[z])}if(N||ce){var oe=typeof d=="function"?d.displayName||d.name||"Unknown":d;N&&Ss(F,oe),ce&&Ms(F,oe)}return Ds(d,N,ce,H,D,Ur.current,F)}}var or=w.ReactCurrentOwner,Zr=w.ReactDebugCurrentFrame;function Ue(d){if(d){var E=d._owner,R=Xe(d.type,d._source,E?E.type:null);Zr.setExtraStackFrame(R)}else Zr.setExtraStackFrame(null)}var sr;sr=!1;function ar(d){return typeof d=="object"&&d!==null&&d.$$typeof===r}function Jr(){{if(or.current){var d=I(or.current.type);if(d)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+d+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+d+"`."}return""}}function _s(d){return""}var en={};function Ns(d){{var E=Jr();if(!E){var R=typeof d=="string"?d:d.displayName||d.name;R&&(E=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+R+">.")}return E}}function tn(d,E){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var R=
|
|
25
|
+
Check the top-level render call using <`+R+">.")}return E}}function tn(d,E){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var R=Ns(E);if(en[R])return;en[R]=!0;var D="";d&&d._owner&&d._owner!==or.current&&(D=" It was passed a child from "+I(d._owner.type)+"."),Ue(d),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R,D),Ue(null)}}function rn(d,E){{if(typeof d!="object")return;if(nr(d))for(var R=0;R<d.length;R++){var D=d[R];ar(D)&&tn(D,E)}else if(ar(d))d._store&&(d._store.validated=!0);else if(d){var H=y(d);if(typeof H=="function"&&H!==d.entries)for(var z=H.call(d),F;!(F=z.next()).done;)ar(F.value)&&tn(F.value,E)}}}function Ls(d){{var E=d.type;if(E==null||typeof E=="string")return;var R;if(typeof E=="function")R=E.propTypes;else if(typeof E=="object"&&(E.$$typeof===l||E.$$typeof===f))R=E.propTypes;else return;if(R){var D=I(E);xs(R,d.props,"prop",D,d)}else if(E.PropTypes!==void 0&&!sr){sr=!0;var H=I(E);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",H||"Unknown")}typeof E.getDefaultProps=="function"&&!E.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Fs(d){{for(var E=Object.keys(d.props),R=0;R<E.length;R++){var D=E[R];if(D!=="children"&&D!=="key"){Ue(d),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",D),Ue(null);break}}d.ref!==null&&(Ue(d),P("Invalid attribute `ref` supplied to `React.Fragment`."),Ue(null))}}var nn={};function on(d,E,R,D,H,z){{var F=$(d);if(!F){var N="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ce=_s();ce?N+=ce:N+=Jr();var te;d===null?te="null":nr(d)?te="array":d!==void 0&&d.$$typeof===r?(te="<"+(I(d.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):te=typeof d,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",te,N)}var oe=As(d,E,R,H,z);if(oe==null)return oe;if(F){var he=E.children;if(he!==void 0)if(D)if(nr(he)){for(var Qe=0;Qe<he.length;Qe++)rn(he[Qe],d);Object.freeze&&Object.freeze(he)}else P("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 rn(he,d)}if(He.call(E,"key")){var Be=I(d),le=Object.keys(E).filter(function(Hs){return Hs!=="key"}),ir=le.length>0?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}";if(!nn[Be+ir]){var $s=le.length>0?"{"+le.join(": ..., ")+": ...}":"{}";P(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ir,Be,
|
|
30
|
+
<%s key={someKey} {...props} />`,ir,Be,$s,Be),nn[Be+ir]=!0}}return d===n?Fs(oe):Ls(oe),oe}}function Ws(d,E,R){return on(d,E,R,!0)}function js(d,E,R){return on(d,E,R,!1)}var Is=js,Ys=Ws;pt.Fragment=n,pt.jsx=Is,pt.jsxs=Ys}()),pt}process.env.NODE_ENV==="production"?wr.exports=zs():wr.exports=qs();var O=wr.exports;/**
|
|
31
31
|
* @license lucide-react v0.344.0 - ISC
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
34
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/var
|
|
35
|
+
*/var Gs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
36
36
|
* @license lucide-react v0.344.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/const
|
|
40
|
+
*/const Xs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Gt=(e,r)=>{const t=de.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:i="",children:l,...c},u)=>de.createElement("svg",{ref:u,...Gs,width:o,height:o,stroke:n,strokeWidth:a?Number(s)*24/Number(o):s,className:["lucide",`lucide-${Xs(e)}`,i].join(" "),...c},[...r.map(([f,p])=>de.createElement(f,p)),...Array.isArray(l)?l:[l]]));return t.displayName=`${e}`,t};/**
|
|
41
41
|
* @license lucide-react v0.344.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const
|
|
45
|
+
*/const Us=Gt("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
46
46
|
* @license lucide-react v0.344.0 - ISC
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
50
|
+
*/const Qs=Gt("Clock4",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
51
51
|
* @license lucide-react v0.344.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const
|
|
55
|
+
*/const Ks=Gt("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
|
|
56
56
|
* @license lucide-react v0.344.0 - ISC
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const Js=Gt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function _e(e,r,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e==null||e(o),t===!1||!o.defaultPrevented)return r==null?void 0:r(o)}}function cn(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Xt(...e){return r=>{let t=!1;const n=e.map(o=>{const s=cn(o,r);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():cn(e[o],null)}}}}function We(...e){return f.useCallback(Xt(...e),e)}function zn(e,r=[]){let t=[];function n(s,a){const i=f.createContext(a),l=t.length;t=[...t,a];const c=h=>{var b;const{scope:p,children:g,...v}=h,m=((b=p==null?void 0:p[e])==null?void 0:b[l])||i,y=f.useMemo(()=>v,Object.values(v));return C.jsx(m.Provider,{value:y,children:g})};c.displayName=s+"Provider";function u(h,p){var m;const g=((m=p==null?void 0:p[e])==null?void 0:m[l])||i,v=f.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=t.map(a=>f.createContext(a));return function(i){const l=(i==null?void 0:i[e])||s;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,ea(o,...r)]}function ea(...e){const r=e[0];if(e.length===1)return r;const t=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:l,scopeName:c})=>{const h=l(s)[`__scope${c}`];return{...i,...h}},{});return f.useMemo(()=>({[`__scope${r.scopeName}`]:a}),[a])}};return t.scopeName=r.scopeName,t}function ta(e){const r=ra(e),t=f.forwardRef((n,o)=>{const{children:s,...a}=n,i=f.Children.toArray(s),l=i.find(oa);if(l){const c=l.props.children,u=i.map(h=>h===l?f.Children.count(c)>1?f.Children.only(null):f.isValidElement(c)?c.props.children:null:h);return C.jsx(r,{...a,ref:o,children:f.isValidElement(c)?f.cloneElement(c,void 0,u):null})}return C.jsx(r,{...a,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function ra(e){const r=f.forwardRef((t,n)=>{const{children:o,...s}=t;if(f.isValidElement(o)){const a=aa(o),i=sa(s,o.props);return o.type!==f.Fragment&&(i.ref=n?Xt(n,a):a),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var na=Symbol("radix.slottable");function oa(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===na}function sa(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function aa(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var ia=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=ia.reduce((e,r)=>{const t=ta(`Primitive.${r}`),n=f.forwardRef((o,s)=>{const{asChild:a,...i}=o,l=a?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...i,ref:s})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});function ca(e,r){e&&Vn.flushSync(()=>e.dispatchEvent(r))}function ot(e){const r=f.useRef(e);return f.useEffect(()=>{r.current=e}),f.useMemo(()=>(...t)=>{var n;return(n=r.current)==null?void 0:n.call(r,...t)},[])}function la(e,r=globalThis==null?void 0:globalThis.document){const t=ot(e);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&t(o)};return r.addEventListener("keydown",n,{capture:!0}),()=>r.removeEventListener("keydown",n,{capture:!0})},[t,r])}var ua="DismissableLayer",wr="dismissableLayer.update",da="dismissableLayer.pointerDownOutside",fa="dismissableLayer.focusOutside",ln,qn=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gn=f.forwardRef((e,r)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...l}=e,c=f.useContext(qn),[u,h]=f.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),v=We(r,k=>h(k)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(y),w=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,P=w>=b,O=ma(k=>{const W=k.target,j=[...c.branches].some($=>$.contains(W));!P||j||(o==null||o(k),a==null||a(k),k.defaultPrevented||i==null||i())},p),S=ga(k=>{const W=k.target;[...c.branches].some($=>$.contains(W))||(s==null||s(k),a==null||a(k),k.defaultPrevented||i==null||i())},p);return la(k=>{w===c.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},p),f.useEffect(()=>{if(u)return t&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ln=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),un(),()=>{t&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ln)}},[u,p,t,c]),f.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),un())},[u,c]),f.useEffect(()=>{const k=()=>g({});return document.addEventListener(wr,k),()=>document.removeEventListener(wr,k)},[]),C.jsx(ke.div,{...l,ref:v,style:{pointerEvents:x?P?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,S.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,O.onPointerDownCapture)})});Gn.displayName=ua;var ha="DismissableLayerBranch",pa=f.forwardRef((e,r)=>{const t=f.useContext(qn),n=f.useRef(null),o=We(r,n);return f.useEffect(()=>{const s=n.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),C.jsx(ke.div,{...e,ref:o})});pa.displayName=ha;function ma(e,r=globalThis==null?void 0:globalThis.document){const t=ot(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let l=function(){Xn(da,t,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(r.removeEventListener("click",o.current),o.current=l,r.addEventListener("click",o.current,{once:!0})):l()}else r.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{r.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),r.removeEventListener("pointerdown",s),r.removeEventListener("click",o.current)}},[r,t]),{onPointerDownCapture:()=>n.current=!0}}function ga(e,r=globalThis==null?void 0:globalThis.document){const t=ot(e),n=f.useRef(!1);return f.useEffect(()=>{const o=s=>{s.target&&!n.current&&Xn(fa,t,{originalEvent:s},{discrete:!1})};return r.addEventListener("focusin",o),()=>r.removeEventListener("focusin",o)},[r,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function un(){const e=new CustomEvent(wr);document.dispatchEvent(e)}function Xn(e,r,t,{discrete:n}){const o=t.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});r&&o.addEventListener(e,r,{once:!0}),n?ca(o,s):o.dispatchEvent(s)}var cr=0;function va(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dn()),document.body.insertAdjacentElement("beforeend",e[1]??dn()),cr++,()=>{cr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),cr--}},[])}function dn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var lr="focusScope.autoFocusOnMount",ur="focusScope.autoFocusOnUnmount",fn={bubbles:!1,cancelable:!0},ya="FocusScope",Un=f.forwardRef((e,r)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,l]=f.useState(null),c=ot(o),u=ot(s),h=f.useRef(null),p=We(r,m=>l(m)),g=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let m=function(x){if(g.paused||!i)return;const P=x.target;i.contains(P)?h.current=P:Ae(h.current,{select:!0})},y=function(x){if(g.paused||!i)return;const P=x.relatedTarget;P!==null&&(i.contains(P)||Ae(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const O of x)O.removedNodes.length>0&&Ae(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const w=new MutationObserver(b);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),w.disconnect()}}},[n,i,g.paused]),f.useEffect(()=>{if(i){pn.add(g);const m=document.activeElement;if(!i.contains(m)){const b=new CustomEvent(lr,fn);i.addEventListener(lr,c),i.dispatchEvent(b),b.defaultPrevented||(ba(Ca(Qn(i)),{select:!0}),document.activeElement===m&&Ae(i))}return()=>{i.removeEventListener(lr,c),setTimeout(()=>{const b=new CustomEvent(ur,fn);i.addEventListener(ur,u),i.dispatchEvent(b),b.defaultPrevented||Ae(m??document.body,{select:!0}),i.removeEventListener(ur,u),pn.remove(g)},0)}}},[i,c,u,g]);const v=f.useCallback(m=>{if(!t&&!n||g.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(y&&b){const w=m.currentTarget,[x,P]=wa(w);x&&P?!m.shiftKey&&b===P?(m.preventDefault(),t&&Ae(x,{select:!0})):m.shiftKey&&b===x&&(m.preventDefault(),t&&Ae(P,{select:!0})):b===w&&m.preventDefault()}},[t,n,g.paused]);return C.jsx(ke.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Un.displayName=ya;function ba(e,{select:r=!1}={}){const t=document.activeElement;for(const n of e)if(Ae(n,{select:r}),document.activeElement!==t)return}function wa(e){const r=Qn(e),t=hn(r,e),n=hn(r.reverse(),e);return[t,n]}function Qn(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)r.push(t.currentNode);return r}function hn(e,r){for(const t of e)if(!xa(t,{upTo:r}))return t}function xa(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Pa(e){return e instanceof HTMLInputElement&&"select"in e}function Ae(e,{select:r=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Pa(e)&&r&&e.select()}}var pn=Ea();function Ea(){let e=[];return{add(r){const t=e[0];r!==t&&(t==null||t.pause()),e=mn(e,r),e.unshift(r)},remove(r){var t;e=mn(e,r),(t=e[0])==null||t.resume()}}}function mn(e,r){const t=[...e],n=t.indexOf(r);return n!==-1&&t.splice(n,1),t}function Ca(e){return e.filter(r=>r.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Oa=f[" useId ".trim().toString()]||(()=>{}),Ra=0;function Ta(e){const[r,t]=f.useState(Oa());return Ne(()=>{t(n=>n??String(Ra++))},[e]),e||(r?`radix-${r}`:"")}const ka=["top","right","bottom","left"],Le=Math.min,ue=Math.max,Yt=Math.round,Dt=Math.floor,we=e=>({x:e,y:e}),Sa={left:"right",right:"left",bottom:"top",top:"bottom"},Ma={start:"end",end:"start"};function xr(e,r,t){return ue(e,Le(r,t))}function Oe(e,r){return typeof e=="function"?e(r):e}function Re(e){return e.split("-")[0]}function ct(e){return e.split("-")[1]}function Mr(e){return e==="x"?"y":"x"}function Dr(e){return e==="y"?"height":"width"}const Da=new Set(["top","bottom"]);function be(e){return Da.has(Re(e))?"y":"x"}function Ar(e){return Mr(be(e))}function Aa(e,r,t){t===void 0&&(t=!1);const n=ct(e),o=Ar(e),s=Dr(o);let a=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return r.reference[s]>r.floating[s]&&(a=$t(a)),[a,$t(a)]}function _a(e){const r=$t(e);return[Pr(e),r,Pr(r)]}function Pr(e){return e.replace(/start|end/g,r=>Ma[r])}const gn=["left","right"],vn=["right","left"],Na=["top","bottom"],La=["bottom","top"];function Fa(e,r,t){switch(e){case"top":case"bottom":return t?r?vn:gn:r?gn:vn;case"left":case"right":return r?Na:La;default:return[]}}function Wa(e,r,t,n){const o=ct(e);let s=Fa(Re(e),t==="start",n);return o&&(s=s.map(a=>a+"-"+o),r&&(s=s.concat(s.map(Pr)))),s}function $t(e){return e.replace(/left|right|bottom|top/g,r=>Sa[r])}function ja(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kn(e){return typeof e!="number"?ja(e):{top:e,right:e,bottom:e,left:e}}function Ht(e){const{x:r,y:t,width:n,height:o}=e;return{width:n,height:o,top:t,left:r,right:r+n,bottom:t+o,x:r,y:t}}function yn(e,r,t){let{reference:n,floating:o}=e;const s=be(r),a=Ar(r),i=Dr(a),l=Re(r),c=s==="y",u=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,p=n[i]/2-o[i]/2;let g;switch(l){case"top":g={x:u,y:n.y-o.height};break;case"bottom":g={x:u,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-o.width,y:h};break;default:g={x:n.x,y:n.y}}switch(ct(r)){case"start":g[a]-=p*(t&&c?-1:1);break;case"end":g[a]+=p*(t&&c?-1:1);break}return g}async function Ia(e,r){var t;r===void 0&&(r={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=Oe(r,e),v=Kn(g),y=i[p?h==="floating"?"reference":"floating":h],b=Ht(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:c,rootBoundary:u,strategy:l})),w=h==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),P=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},O=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:x,strategy:l}):w);return{top:(b.top-O.top+v.top)/P.y,bottom:(O.bottom-b.bottom+v.bottom)/P.y,left:(b.left-O.left+v.left)/P.x,right:(O.right-b.right+v.right)/P.x}}const Ya=async(e,r,t)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=t,i=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(r));let c=await a.getElementRects({reference:e,floating:r,strategy:o}),{x:u,y:h}=yn(c,n,l),p=n,g={},v=0;for(let y=0;y<i.length;y++){var m;const{name:b,fn:w}=i[y],{x,y:P,data:O,reset:S}=await w({x:u,y:h,initialPlacement:n,placement:p,strategy:o,middlewareData:g,rects:c,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:Ia},elements:{reference:e,floating:r}});u=x??u,h=P??h,g={...g,[b]:{...g[b],...O}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:e,floating:r,strategy:o}):S.rects),{x:u,y:h}=yn(c,p,l)),y=-1)}return{x:u,y:h,placement:p,strategy:o,middlewareData:g}},$a=e=>({name:"arrow",options:e,async fn(r){const{x:t,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:l}=r,{element:c,padding:u=0}=Oe(e,r)||{};if(c==null)return{};const h=Kn(u),p={x:t,y:n},g=Ar(o),v=Dr(g),m=await a.getDimensions(c),y=g==="y",b=y?"top":"left",w=y?"bottom":"right",x=y?"clientHeight":"clientWidth",P=s.reference[v]+s.reference[g]-p[g]-s.floating[v],O=p[g]-s.reference[g],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=S?S[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(S)))&&(k=i.floating[x]||s.floating[v]);const W=P/2-O/2,j=k/2-m[v]/2-1,$=Le(h[b],j),q=Le(h[w],j),M=$,I=k-m[v]-q,L=k/2-m[v]/2+W,Z=xr(M,L,I),V=!l.arrow&&ct(o)!=null&&L!==Z&&s.reference[v]/2-(L<M?$:q)-m[v]/2<0,G=V?L<M?L-M:L-I:0;return{[g]:p[g]+G,data:{[g]:Z,centerOffset:L-Z-G,...V&&{alignmentOffset:G}},reset:V}}}),Ha=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var t,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:l,elements:c}=r,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...y}=Oe(e,r);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const b=Re(o),w=be(i),x=Re(i)===i,P=await(l.isRTL==null?void 0:l.isRTL(c.floating)),O=p||(x||!m?[$t(i)]:_a(i)),S=v!=="none";!p&&S&&O.push(...Wa(i,m,v,P));const k=[i,...O],W=await l.detectOverflow(r,y),j=[];let $=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&j.push(W[b]),h){const L=Aa(o,a,P);j.push(W[L[0]],W[L[1]])}if($=[...$,{placement:o,overflows:j}],!j.every(L=>L<=0)){var q,M;const L=(((q=s.flip)==null?void 0:q.index)||0)+1,Z=k[L];if(Z&&(!(h==="alignment"?w!==be(Z):!1)||$.every(A=>be(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:L,overflows:$},reset:{placement:Z}};let V=(M=$.filter(G=>G.overflows[0]<=0).sort((G,A)=>G.overflows[1]-A.overflows[1])[0])==null?void 0:M.placement;if(!V)switch(g){case"bestFit":{var I;const G=(I=$.filter(A=>{if(S){const X=be(A.placement);return X===w||X==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(X=>X>0).reduce((X,ie)=>X+ie,0)]).sort((A,X)=>A[1]-X[1])[0])==null?void 0:I[0];G&&(V=G);break}case"initialPlacement":V=i;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function bn(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function wn(e){return ka.some(r=>e[r]>=0)}const Ba=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:t,platform:n}=r,{strategy:o="referenceHidden",...s}=Oe(e,r);switch(o){case"referenceHidden":{const a=await n.detectOverflow(r,{...s,elementContext:"reference"}),i=bn(a,t.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:wn(i)}}}case"escaped":{const a=await n.detectOverflow(r,{...s,altBoundary:!0}),i=bn(a,t.floating);return{data:{escapedOffsets:i,escaped:wn(i)}}}default:return{}}}}},Zn=new Set(["left","top"]);async function Va(e,r){const{placement:t,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Re(t),i=ct(t),l=be(t)==="y",c=Zn.has(a)?-1:1,u=s&&l?-1:1,h=Oe(r,e);let{mainAxis:p,crossAxis:g,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),l?{x:g*u,y:p*c}:{x:p*c,y:g*u}}const za=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var t,n;const{x:o,y:s,placement:a,middlewareData:i}=r,l=await Va(r,e);return a===((t=i.offset)==null?void 0:t.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:a}}}}},qa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:t,y:n,placement:o,platform:s}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...c}=Oe(e,r),u={x:t,y:n},h=await s.detectOverflow(r,c),p=be(Re(o)),g=Mr(p);let v=u[g],m=u[p];if(a){const b=g==="y"?"top":"left",w=g==="y"?"bottom":"right",x=v+h[b],P=v-h[w];v=xr(x,v,P)}if(i){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=m+h[b],P=m-h[w];m=xr(x,m,P)}const y=l.fn({...r,[g]:v,[p]:m});return{...y,data:{x:y.x-t,y:y.y-n,enabled:{[g]:a,[p]:i}}}}}},Ga=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:t,y:n,placement:o,rects:s,middlewareData:a}=r,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=Oe(e,r),u={x:t,y:n},h=be(o),p=Mr(h);let g=u[p],v=u[h];const m=Oe(i,r),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",P=s.reference[p]-s.floating[x]+y.mainAxis,O=s.reference[p]+s.reference[x]-y.mainAxis;g<P?g=P:g>O&&(g=O)}if(c){var b,w;const x=p==="y"?"width":"height",P=Zn.has(Re(o)),O=s.reference[h]-s.floating[x]+(P&&((b=a.offset)==null?void 0:b[h])||0)+(P?0:y.crossAxis),S=s.reference[h]+s.reference[x]+(P?0:((w=a.offset)==null?void 0:w[h])||0)-(P?y.crossAxis:0);v<O?v=O:v>S&&(v=S)}return{[p]:g,[h]:v}}}},Xa=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var t,n;const{placement:o,rects:s,platform:a,elements:i}=r,{apply:l=()=>{},...c}=Oe(e,r),u=await a.detectOverflow(r,c),h=Re(o),p=ct(o),g=be(o)==="y",{width:v,height:m}=s.floating;let y,b;h==="top"||h==="bottom"?(y=h,b=p===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(b=h,y=p==="end"?"top":"bottom");const w=m-u.top-u.bottom,x=v-u.left-u.right,P=Le(m-u[y],w),O=Le(v-u[b],x),S=!r.middlewareData.shift;let k=P,W=O;if((t=r.middlewareData.shift)!=null&&t.enabled.x&&(W=x),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(k=w),S&&!p){const $=ue(u.left,0),q=ue(u.right,0),M=ue(u.top,0),I=ue(u.bottom,0);g?W=v-2*($!==0||q!==0?$+q:ue(u.left,u.right)):k=m-2*(M!==0||I!==0?M+I:ue(u.top,u.bottom))}await l({...r,availableWidth:W,availableHeight:k});const j=await a.getDimensions(i.floating);return v!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Ut(){return typeof window<"u"}function lt(e){return Jn(e)?(e.nodeName||"").toLowerCase():"#document"}function fe(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Pe(e){var r;return(r=(Jn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Jn(e){return Ut()?e instanceof Node||e instanceof fe(e).Node:!1}function pe(e){return Ut()?e instanceof Element||e instanceof fe(e).Element:!1}function xe(e){return Ut()?e instanceof HTMLElement||e instanceof fe(e).HTMLElement:!1}function xn(e){return!Ut()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fe(e).ShadowRoot}const Ua=new Set(["inline","contents"]);function Pt(e){const{overflow:r,overflowX:t,overflowY:n,display:o}=me(e);return/auto|scroll|overlay|hidden|clip/.test(r+n+t)&&!Ua.has(o)}const Qa=new Set(["table","td","th"]);function Ka(e){return Qa.has(lt(e))}const Za=[":popover-open",":modal"];function Qt(e){return Za.some(r=>{try{return e.matches(r)}catch{return!1}})}const Ja=["transform","translate","scale","rotate","perspective"],ei=["transform","translate","scale","rotate","perspective","filter"],ti=["paint","layout","strict","content"];function _r(e){const r=Nr(),t=pe(e)?me(e):e;return Ja.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!r&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!r&&(t.filter?t.filter!=="none":!1)||ei.some(n=>(t.willChange||"").includes(n))||ti.some(n=>(t.contain||"").includes(n))}function ri(e){let r=Fe(e);for(;xe(r)&&!st(r);){if(_r(r))return r;if(Qt(r))return null;r=Fe(r)}return null}function Nr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ni=new Set(["html","body","#document"]);function st(e){return ni.has(lt(e))}function me(e){return fe(e).getComputedStyle(e)}function Kt(e){return pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fe(e){if(lt(e)==="html")return e;const r=e.assignedSlot||e.parentNode||xn(e)&&e.host||Pe(e);return xn(r)?r.host:r}function eo(e){const r=Fe(e);return st(r)?e.ownerDocument?e.ownerDocument.body:e.body:xe(r)&&Pt(r)?r:eo(r)}function xt(e,r,t){var n;r===void 0&&(r=[]),t===void 0&&(t=!0);const o=eo(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=fe(o);if(s){const i=Er(a);return r.concat(a,a.visualViewport||[],Pt(o)?o:[],i&&t?xt(i):[])}return r.concat(o,xt(o,[],t))}function Er(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function to(e){const r=me(e);let t=parseFloat(r.width)||0,n=parseFloat(r.height)||0;const o=xe(e),s=o?e.offsetWidth:t,a=o?e.offsetHeight:n,i=Yt(t)!==s||Yt(n)!==a;return i&&(t=s,n=a),{width:t,height:n,$:i}}function Lr(e){return pe(e)?e:e.contextElement}function tt(e){const r=Lr(e);if(!xe(r))return we(1);const t=r.getBoundingClientRect(),{width:n,height:o,$:s}=to(r);let a=(s?Yt(t.width):t.width)/n,i=(s?Yt(t.height):t.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const oi=we(0);function ro(e){const r=fe(e);return!Nr()||!r.visualViewport?oi:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function si(e,r,t){return r===void 0&&(r=!1),!t||r&&t!==fe(e)?!1:r}function ze(e,r,t,n){r===void 0&&(r=!1),t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Lr(e);let a=we(1);r&&(n?pe(n)&&(a=tt(n)):a=tt(e));const i=si(s,t,n)?ro(s):we(0);let l=(o.left+i.x)/a.x,c=(o.top+i.y)/a.y,u=o.width/a.x,h=o.height/a.y;if(s){const p=fe(s),g=n&&pe(n)?fe(n):n;let v=p,m=Er(v);for(;m&&n&&g!==v;){const y=tt(m),b=m.getBoundingClientRect(),w=me(m),x=b.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,P=b.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,h*=y.y,l+=x,c+=P,v=fe(m),m=Er(v)}}return Ht({width:u,height:h,x:l,y:c})}function Zt(e,r){const t=Kt(e).scrollLeft;return r?r.left+t:ze(Pe(e)).left+t}function no(e,r){const t=e.getBoundingClientRect(),n=t.left+r.scrollLeft-Zt(e,t),o=t.top+r.scrollTop;return{x:n,y:o}}function ai(e){let{elements:r,rect:t,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=Pe(n),i=r?Qt(r.floating):!1;if(n===a||i&&s)return t;let l={scrollLeft:0,scrollTop:0},c=we(1);const u=we(0),h=xe(n);if((h||!h&&!s)&&((lt(n)!=="body"||Pt(a))&&(l=Kt(n)),xe(n))){const g=ze(n);c=tt(n),u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}const p=a&&!h&&!s?no(a,l):we(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:t.y*c.y-l.scrollTop*c.y+u.y+p.y}}function ii(e){return Array.from(e.getClientRects())}function ci(e){const r=Pe(e),t=Kt(e),n=e.ownerDocument.body,o=ue(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),s=ue(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Zt(e);const i=-t.scrollTop;return me(n).direction==="rtl"&&(a+=ue(r.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}const Pn=25;function li(e,r){const t=fe(e),n=Pe(e),o=t.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,l=0;if(o){s=o.width,a=o.height;const u=Nr();(!u||u&&r==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const c=Zt(n);if(c<=0){const u=n.ownerDocument,h=u.body,p=getComputedStyle(h),g=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(n.clientWidth-h.clientWidth-g);v<=Pn&&(s-=v)}else c<=Pn&&(s+=c);return{width:s,height:a,x:i,y:l}}const ui=new Set(["absolute","fixed"]);function di(e,r){const t=ze(e,!0,r==="fixed"),n=t.top+e.clientTop,o=t.left+e.clientLeft,s=xe(e)?tt(e):we(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:a,height:i,x:l,y:c}}function En(e,r,t){let n;if(r==="viewport")n=li(e,t);else if(r==="document")n=ci(Pe(e));else if(pe(r))n=di(r,t);else{const o=ro(e);n={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Ht(n)}function oo(e,r){const t=Fe(e);return t===r||!pe(t)||st(t)?!1:me(t).position==="fixed"||oo(t,r)}function fi(e,r){const t=r.get(e);if(t)return t;let n=xt(e,[],!1).filter(i=>pe(i)&<(i)!=="body"),o=null;const s=me(e).position==="fixed";let a=s?Fe(e):e;for(;pe(a)&&!st(a);){const i=me(a),l=_r(a);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&!!o&&ui.has(o.position)||Pt(a)&&!l&&oo(e,a))?n=n.filter(u=>u!==a):o=i,a=Fe(a)}return r.set(e,n),n}function hi(e){let{element:r,boundary:t,rootBoundary:n,strategy:o}=e;const a=[...t==="clippingAncestors"?Qt(r)?[]:fi(r,this._c):[].concat(t),n],i=a[0],l=a.reduce((c,u)=>{const h=En(r,u,o);return c.top=ue(h.top,c.top),c.right=Le(h.right,c.right),c.bottom=Le(h.bottom,c.bottom),c.left=ue(h.left,c.left),c},En(r,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pi(e){const{width:r,height:t}=to(e);return{width:r,height:t}}function mi(e,r,t){const n=xe(r),o=Pe(r),s=t==="fixed",a=ze(e,!0,s,r);let i={scrollLeft:0,scrollTop:0};const l=we(0);function c(){l.x=Zt(o)}if(n||!n&&!s)if((lt(r)!=="body"||Pt(o))&&(i=Kt(r)),n){const g=ze(r,!0,s,r);l.x=g.x+r.clientLeft,l.y=g.y+r.clientTop}else o&&c();s&&!n&&o&&c();const u=o&&!n&&!s?no(o,i):we(0),h=a.left+i.scrollLeft-l.x-u.x,p=a.top+i.scrollTop-l.y-u.y;return{x:h,y:p,width:a.width,height:a.height}}function dr(e){return me(e).position==="static"}function Cn(e,r){if(!xe(e)||me(e).position==="fixed")return null;if(r)return r(e);let t=e.offsetParent;return Pe(e)===t&&(t=t.ownerDocument.body),t}function so(e,r){const t=fe(e);if(Qt(e))return t;if(!xe(e)){let o=Fe(e);for(;o&&!st(o);){if(pe(o)&&!dr(o))return o;o=Fe(o)}return t}let n=Cn(e,r);for(;n&&Ka(n)&&dr(n);)n=Cn(n,r);return n&&st(n)&&dr(n)&&!_r(n)?t:n||ri(e)||t}const gi=async function(e){const r=this.getOffsetParent||so,t=this.getDimensions,n=await t(e.floating);return{reference:mi(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function vi(e){return me(e).direction==="rtl"}const yi={convertOffsetParentRelativeRectToViewportRelativeRect:ai,getDocumentElement:Pe,getClippingRect:hi,getOffsetParent:so,getElementRects:gi,getClientRects:ii,getDimensions:pi,getScale:tt,isElement:pe,isRTL:vi};function ao(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function bi(e,r){let t=null,n;const o=Pe(e);function s(){var i;clearTimeout(n),(i=t)==null||i.disconnect(),t=null}function a(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:h,width:p,height:g}=c;if(i||r(),!p||!g)return;const v=Dt(h),m=Dt(o.clientWidth-(u+p)),y=Dt(o.clientHeight-(h+g)),b=Dt(u),x={rootMargin:-v+"px "+-m+"px "+-y+"px "+-b+"px",threshold:ue(0,Le(1,l))||1};let P=!0;function O(S){const k=S[0].intersectionRatio;if(k!==l){if(!P)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!ao(c,e.getBoundingClientRect())&&a(),P=!1}try{t=new IntersectionObserver(O,{...x,root:o.ownerDocument})}catch{t=new IntersectionObserver(O,x)}t.observe(e)}return a(!0),s}function wi(e,r,t,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Lr(e),u=o||s?[...c?xt(c):[],...xt(r)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",t,{passive:!0}),s&&b.addEventListener("resize",t)});const h=c&&i?bi(c,t):null;let p=-1,g=null;a&&(g=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&g&&(g.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(r)})),t()}),c&&!l&&g.observe(c),g.observe(r));let v,m=l?ze(e):null;l&&y();function y(){const b=ze(e);m&&!ao(m,b)&&t(),m=b,v=requestAnimationFrame(y)}return t(),()=>{var b;u.forEach(w=>{o&&w.removeEventListener("scroll",t),s&&w.removeEventListener("resize",t)}),h==null||h(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const xi=za,Pi=qa,Ei=Ha,Ci=Xa,Oi=Ba,On=$a,Ri=Ga,Ti=(e,r,t)=>{const n=new Map,o={platform:yi,...t},s={...o.platform,_c:n};return Ya(e,r,{...o,platform:s})};var ki=typeof document<"u",Si=function(){},Wt=ki?de.useLayoutEffect:Si;function Bt(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let t,n,o;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==r.length)return!1;for(n=t;n--!==0;)if(!Bt(e[n],r[n]))return!1;return!0}if(o=Object.keys(e),t=o.length,t!==Object.keys(r).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(r,o[n]))return!1;for(n=t;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Bt(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}function io(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rn(e,r){const t=io(e);return Math.round(r*t)/t}function fr(e){const r=f.useRef(e);return Wt(()=>{r.current=e}),r}function Mi(e){e===void 0&&(e={});const{placement:r="bottom",strategy:t="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[u,h]=f.useState({x:0,y:0,strategy:t,placement:r,middlewareData:{},isPositioned:!1}),[p,g]=f.useState(n);Bt(p,n)||g(n);const[v,m]=f.useState(null),[y,b]=f.useState(null),w=f.useCallback(A=>{A!==S.current&&(S.current=A,m(A))},[]),x=f.useCallback(A=>{A!==k.current&&(k.current=A,b(A))},[]),P=s||v,O=a||y,S=f.useRef(null),k=f.useRef(null),W=f.useRef(u),j=l!=null,$=fr(l),q=fr(o),M=fr(c),I=f.useCallback(()=>{if(!S.current||!k.current)return;const A={placement:r,strategy:t,middleware:p};q.current&&(A.platform=q.current),Ti(S.current,k.current,A).then(X=>{const ie={...X,isPositioned:M.current!==!1};L.current&&!Bt(W.current,ie)&&(W.current=ie,Vn.flushSync(()=>{h(ie)}))})},[p,r,t,q,M]);Wt(()=>{c===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[c]);const L=f.useRef(!1);Wt(()=>(L.current=!0,()=>{L.current=!1}),[]),Wt(()=>{if(P&&(S.current=P),O&&(k.current=O),P&&O){if($.current)return $.current(P,O,I);I()}},[P,O,I,$,j]);const Z=f.useMemo(()=>({reference:S,floating:k,setReference:w,setFloating:x}),[w,x]),V=f.useMemo(()=>({reference:P,floating:O}),[P,O]),G=f.useMemo(()=>{const A={position:t,left:0,top:0};if(!V.floating)return A;const X=Rn(V.floating,u.x),ie=Rn(V.floating,u.y);return i?{...A,transform:"translate("+X+"px, "+ie+"px)",...io(V.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:X,top:ie}},[t,i,V.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:I,refs:Z,elements:V,floatingStyles:G}),[u,I,Z,V,G])}const Di=e=>{function r(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:n,padding:o}=typeof e=="function"?e(t):e;return n&&r(n)?n.current!=null?On({element:n.current,padding:o}).fn(t):{}:n?On({element:n,padding:o}).fn(t):{}}}},Ai=(e,r)=>({...xi(e),options:[e,r]}),_i=(e,r)=>({...Pi(e),options:[e,r]}),Ni=(e,r)=>({...Ri(e),options:[e,r]}),Li=(e,r)=>({...Ei(e),options:[e,r]}),Fi=(e,r)=>({...Ci(e),options:[e,r]}),Wi=(e,r)=>({...Oi(e),options:[e,r]}),ji=(e,r)=>({...Di(e),options:[e,r]});var Ii="Arrow",co=f.forwardRef((e,r)=>{const{children:t,width:n=10,height:o=5,...s}=e;return C.jsx(ke.svg,{...s,ref:r,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?t:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});co.displayName=Ii;var Yi=co;function $i(e){const[r,t]=f.useState(void 0);return Ne(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,i=c.blockSize}else a=e.offsetWidth,i=e.offsetHeight;t({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else t(void 0)},[e]),r}var Fr="Popper",[lo,uo]=zn(Fr),[Hi,fo]=lo(Fr),ho=e=>{const{__scopePopper:r,children:t}=e,[n,o]=f.useState(null);return C.jsx(Hi,{scope:r,anchor:n,onAnchorChange:o,children:t})};ho.displayName=Fr;var po="PopperAnchor",mo=f.forwardRef((e,r)=>{const{__scopePopper:t,virtualRef:n,...o}=e,s=fo(po,t),a=f.useRef(null),i=We(r,a),l=f.useRef(null);return f.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||a.current,c!==l.current&&s.onAnchorChange(l.current)}),n?null:C.jsx(ke.div,{...o,ref:i})});mo.displayName=po;var Wr="PopperContent",[Bi,Vi]=lo(Wr),go=f.forwardRef((e,r)=>{var qe,Ie,Ge,Ye,Tt,ht;const{__scopePopper:t,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:v,...m}=e,y=fo(Wr,t),[b,w]=f.useState(null),x=We(r,$e=>w($e)),[P,O]=f.useState(null),S=$i(P),k=(S==null?void 0:S.width)??0,W=(S==null?void 0:S.height)??0,j=n+(s!=="center"?"-"+s:""),$=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},q=Array.isArray(c)?c:[c],M=q.length>0,I={padding:$,boundary:q.filter(qi),altBoundary:M},{refs:L,floatingStyles:Z,placement:V,isPositioned:G,middlewareData:A}=Mi({strategy:"fixed",placement:j,whileElementsMounted:(...$e)=>wi(...$e,{animationFrame:g==="always"}),elements:{reference:y.anchor},middleware:[Ai({mainAxis:o+W,alignmentAxis:a}),l&&_i({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Ni():void 0,...I}),l&&Li({...I}),Fi({...I,apply:({elements:$e,rects:kt,availableWidth:Xe,availableHeight:He})=>{const{width:St,height:Mt}=kt.reference,Ee=$e.floating.style;Ee.setProperty("--radix-popper-available-width",`${Xe}px`),Ee.setProperty("--radix-popper-available-height",`${He}px`),Ee.setProperty("--radix-popper-anchor-width",`${St}px`),Ee.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),P&&ji({element:P,padding:i}),Gi({arrowWidth:k,arrowHeight:W}),p&&Wi({strategy:"referenceHidden",...I})]}),[X,ie]=bo(V),se=ot(v);Ne(()=>{G&&(se==null||se())},[G,se]);const Ot=(qe=A.arrow)==null?void 0:qe.x,Rt=(Ie=A.arrow)==null?void 0:Ie.y,tr=((Ge=A.arrow)==null?void 0:Ge.centerOffset)!==0,[rr,ft]=f.useState();return Ne(()=>{b&&ft(window.getComputedStyle(b).zIndex)},[b]),C.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:G?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:rr,"--radix-popper-transform-origin":[(Ye=A.transformOrigin)==null?void 0:Ye.x,(Tt=A.transformOrigin)==null?void 0:Tt.y].join(" "),...((ht=A.hide)==null?void 0:ht.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(Bi,{scope:t,placedSide:X,onArrowChange:O,arrowX:Ot,arrowY:Rt,shouldHideArrow:tr,children:C.jsx(ke.div,{"data-side":X,"data-align":ie,...m,ref:x,style:{...m.style,animation:G?void 0:"none"}})})})});go.displayName=Wr;var vo="PopperArrow",zi={top:"bottom",right:"left",bottom:"top",left:"right"},yo=f.forwardRef(function(r,t){const{__scopePopper:n,...o}=r,s=Vi(vo,n),a=zi[s.placedSide];return C.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:C.jsx(Yi,{...o,ref:t,style:{...o.style,display:"block"}})})});yo.displayName=vo;function qi(e){return e!==null}var Gi=e=>({name:"transformOrigin",options:e,fn(r){var y,b,w;const{placement:t,rects:n,middlewareData:o}=r,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,u]=bo(t),h={start:"0%",center:"50%",end:"100%"}[u],p=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let v="",m="";return c==="bottom"?(v=a?h:`${p}px`,m=`${-l}px`):c==="top"?(v=a?h:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=a?h:`${g}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=a?h:`${g}px`),{data:{x:v,y:m}}}});function bo(e){const[r,t="center"]=e.split("-");return[r,t]}var Xi=ho,wo=mo,Ui=go,Qi=yo,Ki="Portal",xo=f.forwardRef((e,r)=>{var i;const{container:t,...n}=e,[o,s]=f.useState(!1);Ne(()=>s(!0),[]);const a=t||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Hn.createPortal(C.jsx(ke.div,{...n,ref:r}),a):null});xo.displayName=Ki;function Zi(e,r){return f.useReducer((t,n)=>r[t][n]??t,e)}var jr=e=>{const{present:r,children:t}=e,n=Ji(r),o=typeof t=="function"?t({present:n.isPresent}):f.Children.only(t),s=We(n.ref,ec(o));return typeof t=="function"||n.isPresent?f.cloneElement(o,{ref:s}):null};jr.displayName="Presence";function Ji(e){const[r,t]=f.useState(),n=f.useRef(null),o=f.useRef(e),s=f.useRef("none"),a=e?"mounted":"unmounted",[i,l]=Zi(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=At(n.current);s.current=i==="mounted"?c:"none"},[i]),Ne(()=>{const c=n.current,u=o.current;if(u!==e){const p=s.current,g=At(c);e?l("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ne(()=>{if(r){let c;const u=r.ownerDocument.defaultView??window,h=g=>{const m=At(n.current).includes(CSS.escape(g.animationName));if(g.target===r&&m&&(l("ANIMATION_END"),!o.current)){const y=r.style.animationFillMode;r.style.animationFillMode="forwards",c=u.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=y)})}},p=g=>{g.target===r&&(s.current=At(n.current))};return r.addEventListener("animationstart",p),r.addEventListener("animationcancel",h),r.addEventListener("animationend",h),()=>{u.clearTimeout(c),r.removeEventListener("animationstart",p),r.removeEventListener("animationcancel",h),r.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[r,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(c=>{n.current=c?getComputedStyle(c):null,t(c)},[])}}function At(e){return(e==null?void 0:e.animationName)||"none"}function ec(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function tc(e){const r=rc(e),t=f.forwardRef((n,o)=>{const{children:s,...a}=n,i=f.Children.toArray(s),l=i.find(oc);if(l){const c=l.props.children,u=i.map(h=>h===l?f.Children.count(c)>1?f.Children.only(null):f.isValidElement(c)?c.props.children:null:h);return C.jsx(r,{...a,ref:o,children:f.isValidElement(c)?f.cloneElement(c,void 0,u):null})}return C.jsx(r,{...a,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function rc(e){const r=f.forwardRef((t,n)=>{const{children:o,...s}=t;if(f.isValidElement(o)){const a=ac(o),i=sc(s,o.props);return o.type!==f.Fragment&&(i.ref=n?Xt(n,a):a),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var nc=Symbol("radix.slottable");function oc(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nc}function sc(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function ac(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var ic=f[" useInsertionEffect ".trim().toString()]||Ne;function cc({prop:e,defaultProp:r,onChange:t=()=>{},caller:n}){const[o,s,a]=lc({defaultProp:r,onChange:t}),i=e!==void 0,l=i?e:o;{const u=f.useRef(e!==void 0);f.useEffect(()=>{const h=u.current;h!==i&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const c=f.useCallback(u=>{var h;if(i){const p=uc(u)?u(e):u;p!==e&&((h=a.current)==null||h.call(a,p))}else s(u)},[i,e,s,a]);return[l,c]}function lc({defaultProp:e,onChange:r}){const[t,n]=f.useState(e),o=f.useRef(t),s=f.useRef(r);return ic(()=>{s.current=r},[r]),f.useEffect(()=>{var a;o.current!==t&&((a=s.current)==null||a.call(s,t),o.current=t)},[t,o]),[t,n,s]}function uc(e){return typeof e=="function"}var dc=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Ke=new WeakMap,_t=new WeakMap,Nt={},hr=0,Po=function(e){return e&&(e.host||Po(e.parentNode))},fc=function(e,r){return r.map(function(t){if(e.contains(t))return t;var n=Po(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},hc=function(e,r,t,n){var o=fc(r,Array.isArray(e)?e:[e]);Nt[t]||(Nt[t]=new WeakMap);var s=Nt[t],a=[],i=new Set,l=new Set(o),c=function(h){!h||i.has(h)||(i.add(h),c(h.parentNode))};o.forEach(c);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(i.has(p))u(p);else try{var g=p.getAttribute(n),v=g!==null&&g!=="false",m=(Ke.get(p)||0)+1,y=(s.get(p)||0)+1;Ke.set(p,m),s.set(p,y),a.push(p),m===1&&v&&_t.set(p,!0),y===1&&p.setAttribute(t,"true"),v||p.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return u(r),i.clear(),hr++,function(){a.forEach(function(h){var p=Ke.get(h)-1,g=s.get(h)-1;Ke.set(h,p),s.set(h,g),p||(_t.has(h)||h.removeAttribute(n),_t.delete(h)),g||h.removeAttribute(t)}),hr--,hr||(Ke=new WeakMap,Ke=new WeakMap,_t=new WeakMap,Nt={})}},pc=function(e,r,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=dc(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),hc(n,o,t,"aria-hidden")):function(){return null}},ge=function(){return ge=Object.assign||function(r){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},ge.apply(this,arguments)};function Eo(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function mc(e,r,t){if(t||arguments.length===2)for(var n=0,o=r.length,s;n<o;n++)(s||!(n in r))&&(s||(s=Array.prototype.slice.call(r,0,n)),s[n]=r[n]);return e.concat(s||Array.prototype.slice.call(r))}var jt="right-scroll-bar-position",It="width-before-scroll-bar",gc="with-scroll-bars-hidden",vc="--removed-body-scroll-bar-size";function pr(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function yc(e,r){var t=de.useState(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var o=t.value;o!==n&&(t.value=n,t.callback(n,o))}}}})[0];return t.callback=r,t.facade}var bc=typeof window<"u"?f.useLayoutEffect:f.useEffect,Tn=new WeakMap;function wc(e,r){var t=yc(null,function(n){return e.forEach(function(o){return pr(o,n)})});return bc(function(){var n=Tn.get(t);if(n){var o=new Set(n),s=new Set(e),a=t.current;o.forEach(function(i){s.has(i)||pr(i,null)}),s.forEach(function(i){o.has(i)||pr(i,a)})}Tn.set(t,e)},[e]),t}function xc(e){return e}function Pc(e,r){r===void 0&&(r=xc);var t=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(s){var a=r(s,n);return t.push(a),function(){t=t.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;t.length;){var a=t;t=[],a.forEach(s)}t={push:function(i){return s(i)},filter:function(){return t}}},assignMedium:function(s){n=!0;var a=[];if(t.length){var i=t;t=[],i.forEach(s),a=t}var l=function(){var u=a;a=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),t={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),t}}}};return o}function Ec(e){e===void 0&&(e={});var r=Pc(null);return r.options=ge({async:!0,ssr:!1},e),r}var Co=function(e){var r=e.sideCar,t=Eo(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=r.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,ge({},t))};Co.isSideCarExport=!0;function Cc(e,r){return e.useMedium(r),Co}var Oo=Ec(),mr=function(){},Jt=f.forwardRef(function(e,r){var t=f.useRef(null),n=f.useState({onScrollCapture:mr,onWheelCapture:mr,onTouchMoveCapture:mr}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,g=e.noRelative,v=e.noIsolation,m=e.inert,y=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=e.gapMode,P=Eo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,S=wc([t,r]),k=ge(ge({},P),o);return f.createElement(f.Fragment,null,u&&f.createElement(O,{sideCar:Oo,removeScrollBar:c,shards:h,noRelative:g,noIsolation:v,inert:m,setCallbacks:s,allowPinchZoom:!!y,lockRef:t,gapMode:x}),a?f.cloneElement(f.Children.only(i),ge(ge({},k),{ref:S})):f.createElement(w,ge({},k,{className:l,ref:S}),i))});Jt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jt.classNames={fullWidth:It,zeroRight:jt};var Oc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=Oc();return r&&e.setAttribute("nonce",r),e}function Tc(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function kc(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var Sc=function(){var e=0,r=null;return{add:function(t){e==0&&(r=Rc())&&(Tc(r,t),kc(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},Mc=function(){var e=Sc();return function(r,t){f.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&t])}},Ro=function(){var e=Mc(),r=function(t){var n=t.styles,o=t.dynamic;return e(n,o),null};return r},Dc={left:0,top:0,right:0,gap:0},gr=function(e){return parseInt(e||"",10)||0},Ac=function(e){var r=window.getComputedStyle(document.body),t=r[e==="padding"?"paddingLeft":"marginLeft"],n=r[e==="padding"?"paddingTop":"marginTop"],o=r[e==="padding"?"paddingRight":"marginRight"];return[gr(t),gr(n),gr(o)]},_c=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dc;var r=Ac(e),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,n-t+r[2]-r[0])}},Nc=Ro(),rt="data-scroll-locked",Lc=function(e,r,t,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return t===void 0&&(t="margin"),`
|
|
61
|
-
.`.concat(
|
|
60
|
+
*/const Zs=Gt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function _e(e,r,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e==null||e(o),t===!1||!o.defaultPrevented)return r==null?void 0:r(o)}}function cn(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Xt(...e){return r=>{let t=!1;const n=e.map(o=>{const s=cn(o,r);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():cn(e[o],null)}}}}function We(...e){return h.useCallback(Xt(...e),e)}function Vn(e,r=[]){let t=[];function n(s,a){const i=h.createContext(a),l=t.length;t=[...t,a];const c=f=>{var w;const{scope:p,children:g,...v}=f,m=((w=p==null?void 0:p[e])==null?void 0:w[l])||i,y=h.useMemo(()=>v,Object.values(v));return O.jsx(m.Provider,{value:y,children:g})};c.displayName=s+"Provider";function u(f,p){var m;const g=((m=p==null?void 0:p[e])==null?void 0:m[l])||i,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=t.map(a=>h.createContext(a));return function(i){const l=(i==null?void 0:i[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,Js(o,...r)]}function Js(...e){const r=e[0];if(e.length===1)return r;const t=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...i,...f}},{});return h.useMemo(()=>({[`__scope${r.scopeName}`]:a}),[a])}};return t.scopeName=r.scopeName,t}function ea(e){const r=ta(e),t=h.forwardRef((n,o)=>{const{children:s,...a}=n,i=h.Children.toArray(s),l=i.find(na);if(l){const c=l.props.children,u=i.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return O.jsx(r,{...a,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,u):null})}return O.jsx(r,{...a,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function ta(e){const r=h.forwardRef((t,n)=>{const{children:o,...s}=t;if(h.isValidElement(o)){const a=sa(o),i=oa(s,o.props);return o.type!==h.Fragment&&(i.ref=n?Xt(n,a):a),h.cloneElement(o,i)}return h.Children.count(o)>1?h.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var ra=Symbol("radix.slottable");function na(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ra}function oa(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function sa(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var aa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=aa.reduce((e,r)=>{const t=ea(`Primitive.${r}`),n=h.forwardRef((o,s)=>{const{asChild:a,...i}=o,l=a?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(l,{...i,ref:s})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});function ia(e,r){e&&Bn.flushSync(()=>e.dispatchEvent(r))}function ot(e){const r=h.useRef(e);return h.useEffect(()=>{r.current=e}),h.useMemo(()=>(...t)=>{var n;return(n=r.current)==null?void 0:n.call(r,...t)},[])}function ca(e,r=globalThis==null?void 0:globalThis.document){const t=ot(e);h.useEffect(()=>{const n=o=>{o.key==="Escape"&&t(o)};return r.addEventListener("keydown",n,{capture:!0}),()=>r.removeEventListener("keydown",n,{capture:!0})},[t,r])}var la="DismissableLayer",br="dismissableLayer.update",ua="dismissableLayer.pointerDownOutside",da="dismissableLayer.focusOutside",ln,zn=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qn=h.forwardRef((e,r)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...l}=e,c=h.useContext(zn),[u,f]=h.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=h.useState({}),v=We(r,k=>f(k)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(y),P=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,x=P>=w,C=ma(k=>{const W=k.target,j=[...c.branches].some($=>$.contains(W));!x||j||(o==null||o(k),a==null||a(k),k.defaultPrevented||i==null||i())},p),S=pa(k=>{const W=k.target;[...c.branches].some($=>$.contains(W))||(s==null||s(k),a==null||a(k),k.defaultPrevented||i==null||i())},p);return ca(k=>{P===c.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},p),h.useEffect(()=>{if(u)return t&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ln=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),un(),()=>{t&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ln)}},[u,p,t,c]),h.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),un())},[u,c]),h.useEffect(()=>{const k=()=>g({});return document.addEventListener(br,k),()=>document.removeEventListener(br,k)},[]),O.jsx(ke.div,{...l,ref:v,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,S.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,C.onPointerDownCapture)})});qn.displayName=la;var fa="DismissableLayerBranch",ha=h.forwardRef((e,r)=>{const t=h.useContext(zn),n=h.useRef(null),o=We(r,n);return h.useEffect(()=>{const s=n.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),O.jsx(ke.div,{...e,ref:o})});ha.displayName=fa;function ma(e,r=globalThis==null?void 0:globalThis.document){const t=ot(e),n=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let l=function(){Gn(ua,t,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(r.removeEventListener("click",o.current),o.current=l,r.addEventListener("click",o.current,{once:!0})):l()}else r.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{r.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),r.removeEventListener("pointerdown",s),r.removeEventListener("click",o.current)}},[r,t]),{onPointerDownCapture:()=>n.current=!0}}function pa(e,r=globalThis==null?void 0:globalThis.document){const t=ot(e),n=h.useRef(!1);return h.useEffect(()=>{const o=s=>{s.target&&!n.current&&Gn(da,t,{originalEvent:s},{discrete:!1})};return r.addEventListener("focusin",o),()=>r.removeEventListener("focusin",o)},[r,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function un(){const e=new CustomEvent(br);document.dispatchEvent(e)}function Gn(e,r,t,{discrete:n}){const o=t.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});r&&o.addEventListener(e,r,{once:!0}),n?ia(o,s):o.dispatchEvent(s)}var cr=0;function ga(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dn()),document.body.insertAdjacentElement("beforeend",e[1]??dn()),cr++,()=>{cr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),cr--}},[])}function dn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var lr="focusScope.autoFocusOnMount",ur="focusScope.autoFocusOnUnmount",fn={bubbles:!1,cancelable:!0},va="FocusScope",Xn=h.forwardRef((e,r)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,l]=h.useState(null),c=ot(o),u=ot(s),f=h.useRef(null),p=We(r,m=>l(m)),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(n){let m=function(b){if(g.paused||!i)return;const x=b.target;i.contains(x)?f.current=x:Ae(f.current,{select:!0})},y=function(b){if(g.paused||!i)return;const x=b.relatedTarget;x!==null&&(i.contains(x)||Ae(f.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&Ae(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const P=new MutationObserver(w);return i&&P.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),P.disconnect()}}},[n,i,g.paused]),h.useEffect(()=>{if(i){mn.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(lr,fn);i.addEventListener(lr,c),i.dispatchEvent(w),w.defaultPrevented||(ya(Ea(Un(i)),{select:!0}),document.activeElement===m&&Ae(i))}return()=>{i.removeEventListener(lr,c),setTimeout(()=>{const w=new CustomEvent(ur,fn);i.addEventListener(ur,u),i.dispatchEvent(w),w.defaultPrevented||Ae(m??document.body,{select:!0}),i.removeEventListener(ur,u),mn.remove(g)},0)}}},[i,c,u,g]);const v=h.useCallback(m=>{if(!t&&!n||g.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(y&&w){const P=m.currentTarget,[b,x]=wa(P);b&&x?!m.shiftKey&&w===x?(m.preventDefault(),t&&Ae(b,{select:!0})):m.shiftKey&&w===b&&(m.preventDefault(),t&&Ae(x,{select:!0})):w===P&&m.preventDefault()}},[t,n,g.paused]);return O.jsx(ke.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Xn.displayName=va;function ya(e,{select:r=!1}={}){const t=document.activeElement;for(const n of e)if(Ae(n,{select:r}),document.activeElement!==t)return}function wa(e){const r=Un(e),t=hn(r,e),n=hn(r.reverse(),e);return[t,n]}function Un(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)r.push(t.currentNode);return r}function hn(e,r){for(const t of e)if(!ba(t,{upTo:r}))return t}function ba(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xa(e){return e instanceof HTMLInputElement&&"select"in e}function Ae(e,{select:r=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&xa(e)&&r&&e.select()}}var mn=Pa();function Pa(){let e=[];return{add(r){const t=e[0];r!==t&&(t==null||t.pause()),e=pn(e,r),e.unshift(r)},remove(r){var t;e=pn(e,r),(t=e[0])==null||t.resume()}}}function pn(e,r){const t=[...e],n=t.indexOf(r);return n!==-1&&t.splice(n,1),t}function Ea(e){return e.filter(r=>r.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},Ca=h[" useId ".trim().toString()]||(()=>{}),Oa=0;function Ra(e){const[r,t]=h.useState(Ca());return Ne(()=>{t(n=>n??String(Oa++))},[e]),e||(r?`radix-${r}`:"")}const Ta=["top","right","bottom","left"],Le=Math.min,ue=Math.max,Yt=Math.round,Dt=Math.floor,be=e=>({x:e,y:e}),ka={left:"right",right:"left",bottom:"top",top:"bottom"},Sa={start:"end",end:"start"};function xr(e,r,t){return ue(e,Le(r,t))}function Oe(e,r){return typeof e=="function"?e(r):e}function Re(e){return e.split("-")[0]}function ct(e){return e.split("-")[1]}function Mr(e){return e==="x"?"y":"x"}function Dr(e){return e==="y"?"height":"width"}const Ma=new Set(["top","bottom"]);function we(e){return Ma.has(Re(e))?"y":"x"}function Ar(e){return Mr(we(e))}function Da(e,r,t){t===void 0&&(t=!1);const n=ct(e),o=Ar(e),s=Dr(o);let a=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return r.reference[s]>r.floating[s]&&(a=$t(a)),[a,$t(a)]}function Aa(e){const r=$t(e);return[Pr(e),r,Pr(r)]}function Pr(e){return e.replace(/start|end/g,r=>Sa[r])}const gn=["left","right"],vn=["right","left"],_a=["top","bottom"],Na=["bottom","top"];function La(e,r,t){switch(e){case"top":case"bottom":return t?r?vn:gn:r?gn:vn;case"left":case"right":return r?_a:Na;default:return[]}}function Fa(e,r,t,n){const o=ct(e);let s=La(Re(e),t==="start",n);return o&&(s=s.map(a=>a+"-"+o),r&&(s=s.concat(s.map(Pr)))),s}function $t(e){return e.replace(/left|right|bottom|top/g,r=>ka[r])}function Wa(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qn(e){return typeof e!="number"?Wa(e):{top:e,right:e,bottom:e,left:e}}function Ht(e){const{x:r,y:t,width:n,height:o}=e;return{width:n,height:o,top:t,left:r,right:r+n,bottom:t+o,x:r,y:t}}function yn(e,r,t){let{reference:n,floating:o}=e;const s=we(r),a=Ar(r),i=Dr(a),l=Re(r),c=s==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[i]/2-o[i]/2;let g;switch(l){case"top":g={x:u,y:n.y-o.height};break;case"bottom":g={x:u,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:f};break;case"left":g={x:n.x-o.width,y:f};break;default:g={x:n.x,y:n.y}}switch(ct(r)){case"start":g[a]-=p*(t&&c?-1:1);break;case"end":g[a]+=p*(t&&c?-1:1);break}return g}async function ja(e,r){var t;r===void 0&&(r={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:g=0}=Oe(r,e),v=Qn(g),y=i[p?f==="floating"?"reference":"floating":f],w=Ht(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:c,rootBoundary:u,strategy:l})),P=f==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),x=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},C=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:P,offsetParent:b,strategy:l}):P);return{top:(w.top-C.top+v.top)/x.y,bottom:(C.bottom-w.bottom+v.bottom)/x.y,left:(w.left-C.left+v.left)/x.x,right:(C.right-w.right+v.right)/x.x}}const Ia=async(e,r,t)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=t,i=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(r));let c=await a.getElementRects({reference:e,floating:r,strategy:o}),{x:u,y:f}=yn(c,n,l),p=n,g={},v=0;for(let y=0;y<i.length;y++){var m;const{name:w,fn:P}=i[y],{x:b,y:x,data:C,reset:S}=await P({x:u,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:g,rects:c,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:ja},elements:{reference:e,floating:r}});u=b??u,f=x??f,g={...g,[w]:{...g[w],...C}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:e,floating:r,strategy:o}):S.rects),{x:u,y:f}=yn(c,p,l)),y=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:g}},Ya=e=>({name:"arrow",options:e,async fn(r){const{x:t,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:l}=r,{element:c,padding:u=0}=Oe(e,r)||{};if(c==null)return{};const f=Qn(u),p={x:t,y:n},g=Ar(o),v=Dr(g),m=await a.getDimensions(c),y=g==="y",w=y?"top":"left",P=y?"bottom":"right",b=y?"clientHeight":"clientWidth",x=s.reference[v]+s.reference[g]-p[g]-s.floating[v],C=p[g]-s.reference[g],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=S?S[b]:0;(!k||!await(a.isElement==null?void 0:a.isElement(S)))&&(k=i.floating[b]||s.floating[v]);const W=x/2-C/2,j=k/2-m[v]/2-1,$=Le(f[w],j),q=Le(f[P],j),M=$,I=k-m[v]-q,L=k/2-m[v]/2+W,Z=xr(M,L,I),V=!l.arrow&&ct(o)!=null&&L!==Z&&s.reference[v]/2-(L<M?$:q)-m[v]/2<0,G=V?L<M?L-M:L-I:0;return{[g]:p[g]+G,data:{[g]:Z,centerOffset:L-Z-G,...V&&{alignmentOffset:G}},reset:V}}}),$a=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var t,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:l,elements:c}=r,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...y}=Oe(e,r);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const w=Re(o),P=we(i),b=Re(i)===i,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(b||!m?[$t(i)]:Aa(i)),S=v!=="none";!p&&S&&C.push(...Fa(i,m,v,x));const k=[i,...C],W=await l.detectOverflow(r,y),j=[];let $=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&j.push(W[w]),f){const L=Da(o,a,x);j.push(W[L[0]],W[L[1]])}if($=[...$,{placement:o,overflows:j}],!j.every(L=>L<=0)){var q,M;const L=(((q=s.flip)==null?void 0:q.index)||0)+1,Z=k[L];if(Z&&(!(f==="alignment"?P!==we(Z):!1)||$.every(A=>we(A.placement)===P?A.overflows[0]>0:!0)))return{data:{index:L,overflows:$},reset:{placement:Z}};let V=(M=$.filter(G=>G.overflows[0]<=0).sort((G,A)=>G.overflows[1]-A.overflows[1])[0])==null?void 0:M.placement;if(!V)switch(g){case"bestFit":{var I;const G=(I=$.filter(A=>{if(S){const X=we(A.placement);return X===P||X==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(X=>X>0).reduce((X,ie)=>X+ie,0)]).sort((A,X)=>A[1]-X[1])[0])==null?void 0:I[0];G&&(V=G);break}case"initialPlacement":V=i;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function wn(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function bn(e){return Ta.some(r=>e[r]>=0)}const Ha=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:t,platform:n}=r,{strategy:o="referenceHidden",...s}=Oe(e,r);switch(o){case"referenceHidden":{const a=await n.detectOverflow(r,{...s,elementContext:"reference"}),i=wn(a,t.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:bn(i)}}}case"escaped":{const a=await n.detectOverflow(r,{...s,altBoundary:!0}),i=wn(a,t.floating);return{data:{escapedOffsets:i,escaped:bn(i)}}}default:return{}}}}},Kn=new Set(["left","top"]);async function Ba(e,r){const{placement:t,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Re(t),i=ct(t),l=we(t)==="y",c=Kn.has(a)?-1:1,u=s&&l?-1:1,f=Oe(r,e);let{mainAxis:p,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),l?{x:g*u,y:p*c}:{x:p*c,y:g*u}}const Va=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var t,n;const{x:o,y:s,placement:a,middlewareData:i}=r,l=await Ba(r,e);return a===((t=i.offset)==null?void 0:t.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:a}}}}},za=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:t,y:n,placement:o,platform:s}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:P,y:b}=w;return{x:P,y:b}}},...c}=Oe(e,r),u={x:t,y:n},f=await s.detectOverflow(r,c),p=we(Re(o)),g=Mr(p);let v=u[g],m=u[p];if(a){const w=g==="y"?"top":"left",P=g==="y"?"bottom":"right",b=v+f[w],x=v-f[P];v=xr(b,v,x)}if(i){const w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",b=m+f[w],x=m-f[P];m=xr(b,m,x)}const y=l.fn({...r,[g]:v,[p]:m});return{...y,data:{x:y.x-t,y:y.y-n,enabled:{[g]:a,[p]:i}}}}}},qa=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:t,y:n,placement:o,rects:s,middlewareData:a}=r,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=Oe(e,r),u={x:t,y:n},f=we(o),p=Mr(f);let g=u[p],v=u[f];const m=Oe(i,r),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=p==="y"?"height":"width",x=s.reference[p]-s.floating[b]+y.mainAxis,C=s.reference[p]+s.reference[b]-y.mainAxis;g<x?g=x:g>C&&(g=C)}if(c){var w,P;const b=p==="y"?"width":"height",x=Kn.has(Re(o)),C=s.reference[f]-s.floating[b]+(x&&((w=a.offset)==null?void 0:w[f])||0)+(x?0:y.crossAxis),S=s.reference[f]+s.reference[b]+(x?0:((P=a.offset)==null?void 0:P[f])||0)-(x?y.crossAxis:0);v<C?v=C:v>S&&(v=S)}return{[p]:g,[f]:v}}}},Ga=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var t,n;const{placement:o,rects:s,platform:a,elements:i}=r,{apply:l=()=>{},...c}=Oe(e,r),u=await a.detectOverflow(r,c),f=Re(o),p=ct(o),g=we(o)==="y",{width:v,height:m}=s.floating;let y,w;f==="top"||f==="bottom"?(y=f,w=p===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(w=f,y=p==="end"?"top":"bottom");const P=m-u.top-u.bottom,b=v-u.left-u.right,x=Le(m-u[y],P),C=Le(v-u[w],b),S=!r.middlewareData.shift;let k=x,W=C;if((t=r.middlewareData.shift)!=null&&t.enabled.x&&(W=b),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(k=P),S&&!p){const $=ue(u.left,0),q=ue(u.right,0),M=ue(u.top,0),I=ue(u.bottom,0);g?W=v-2*($!==0||q!==0?$+q:ue(u.left,u.right)):k=m-2*(M!==0||I!==0?M+I:ue(u.top,u.bottom))}await l({...r,availableWidth:W,availableHeight:k});const j=await a.getDimensions(i.floating);return v!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Ut(){return typeof window<"u"}function lt(e){return Zn(e)?(e.nodeName||"").toLowerCase():"#document"}function fe(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Pe(e){var r;return(r=(Zn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Zn(e){return Ut()?e instanceof Node||e instanceof fe(e).Node:!1}function me(e){return Ut()?e instanceof Element||e instanceof fe(e).Element:!1}function xe(e){return Ut()?e instanceof HTMLElement||e instanceof fe(e).HTMLElement:!1}function xn(e){return!Ut()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fe(e).ShadowRoot}const Xa=new Set(["inline","contents"]);function Pt(e){const{overflow:r,overflowX:t,overflowY:n,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(r+n+t)&&!Xa.has(o)}const Ua=new Set(["table","td","th"]);function Qa(e){return Ua.has(lt(e))}const Ka=[":popover-open",":modal"];function Qt(e){return Ka.some(r=>{try{return e.matches(r)}catch{return!1}})}const Za=["transform","translate","scale","rotate","perspective"],Ja=["transform","translate","scale","rotate","perspective","filter"],ei=["paint","layout","strict","content"];function _r(e){const r=Nr(),t=me(e)?pe(e):e;return Za.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!r&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!r&&(t.filter?t.filter!=="none":!1)||Ja.some(n=>(t.willChange||"").includes(n))||ei.some(n=>(t.contain||"").includes(n))}function ti(e){let r=Fe(e);for(;xe(r)&&!st(r);){if(_r(r))return r;if(Qt(r))return null;r=Fe(r)}return null}function Nr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ri=new Set(["html","body","#document"]);function st(e){return ri.has(lt(e))}function pe(e){return fe(e).getComputedStyle(e)}function Kt(e){return me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fe(e){if(lt(e)==="html")return e;const r=e.assignedSlot||e.parentNode||xn(e)&&e.host||Pe(e);return xn(r)?r.host:r}function Jn(e){const r=Fe(e);return st(r)?e.ownerDocument?e.ownerDocument.body:e.body:xe(r)&&Pt(r)?r:Jn(r)}function xt(e,r,t){var n;r===void 0&&(r=[]),t===void 0&&(t=!0);const o=Jn(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=fe(o);if(s){const i=Er(a);return r.concat(a,a.visualViewport||[],Pt(o)?o:[],i&&t?xt(i):[])}return r.concat(o,xt(o,[],t))}function Er(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eo(e){const r=pe(e);let t=parseFloat(r.width)||0,n=parseFloat(r.height)||0;const o=xe(e),s=o?e.offsetWidth:t,a=o?e.offsetHeight:n,i=Yt(t)!==s||Yt(n)!==a;return i&&(t=s,n=a),{width:t,height:n,$:i}}function Lr(e){return me(e)?e:e.contextElement}function tt(e){const r=Lr(e);if(!xe(r))return be(1);const t=r.getBoundingClientRect(),{width:n,height:o,$:s}=eo(r);let a=(s?Yt(t.width):t.width)/n,i=(s?Yt(t.height):t.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const ni=be(0);function to(e){const r=fe(e);return!Nr()||!r.visualViewport?ni:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function oi(e,r,t){return r===void 0&&(r=!1),!t||r&&t!==fe(e)?!1:r}function ze(e,r,t,n){r===void 0&&(r=!1),t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Lr(e);let a=be(1);r&&(n?me(n)&&(a=tt(n)):a=tt(e));const i=oi(s,t,n)?to(s):be(0);let l=(o.left+i.x)/a.x,c=(o.top+i.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(s){const p=fe(s),g=n&&me(n)?fe(n):n;let v=p,m=Er(v);for(;m&&n&&g!==v;){const y=tt(m),w=m.getBoundingClientRect(),P=pe(m),b=w.left+(m.clientLeft+parseFloat(P.paddingLeft))*y.x,x=w.top+(m.clientTop+parseFloat(P.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=b,c+=x,v=fe(m),m=Er(v)}}return Ht({width:u,height:f,x:l,y:c})}function Zt(e,r){const t=Kt(e).scrollLeft;return r?r.left+t:ze(Pe(e)).left+t}function ro(e,r){const t=e.getBoundingClientRect(),n=t.left+r.scrollLeft-Zt(e,t),o=t.top+r.scrollTop;return{x:n,y:o}}function si(e){let{elements:r,rect:t,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=Pe(n),i=r?Qt(r.floating):!1;if(n===a||i&&s)return t;let l={scrollLeft:0,scrollTop:0},c=be(1);const u=be(0),f=xe(n);if((f||!f&&!s)&&((lt(n)!=="body"||Pt(a))&&(l=Kt(n)),xe(n))){const g=ze(n);c=tt(n),u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}const p=a&&!f&&!s?ro(a,l):be(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:t.y*c.y-l.scrollTop*c.y+u.y+p.y}}function ai(e){return Array.from(e.getClientRects())}function ii(e){const r=Pe(e),t=Kt(e),n=e.ownerDocument.body,o=ue(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),s=ue(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Zt(e);const i=-t.scrollTop;return pe(n).direction==="rtl"&&(a+=ue(r.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}const Pn=25;function ci(e,r){const t=fe(e),n=Pe(e),o=t.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,l=0;if(o){s=o.width,a=o.height;const u=Nr();(!u||u&&r==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const c=Zt(n);if(c<=0){const u=n.ownerDocument,f=u.body,p=getComputedStyle(f),g=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(n.clientWidth-f.clientWidth-g);v<=Pn&&(s-=v)}else c<=Pn&&(s+=c);return{width:s,height:a,x:i,y:l}}const li=new Set(["absolute","fixed"]);function ui(e,r){const t=ze(e,!0,r==="fixed"),n=t.top+e.clientTop,o=t.left+e.clientLeft,s=xe(e)?tt(e):be(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:a,height:i,x:l,y:c}}function En(e,r,t){let n;if(r==="viewport")n=ci(e,t);else if(r==="document")n=ii(Pe(e));else if(me(r))n=ui(r,t);else{const o=to(e);n={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Ht(n)}function no(e,r){const t=Fe(e);return t===r||!me(t)||st(t)?!1:pe(t).position==="fixed"||no(t,r)}function di(e,r){const t=r.get(e);if(t)return t;let n=xt(e,[],!1).filter(i=>me(i)&<(i)!=="body"),o=null;const s=pe(e).position==="fixed";let a=s?Fe(e):e;for(;me(a)&&!st(a);){const i=pe(a),l=_r(a);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&!!o&&li.has(o.position)||Pt(a)&&!l&&no(e,a))?n=n.filter(u=>u!==a):o=i,a=Fe(a)}return r.set(e,n),n}function fi(e){let{element:r,boundary:t,rootBoundary:n,strategy:o}=e;const a=[...t==="clippingAncestors"?Qt(r)?[]:di(r,this._c):[].concat(t),n],i=a[0],l=a.reduce((c,u)=>{const f=En(r,u,o);return c.top=ue(f.top,c.top),c.right=Le(f.right,c.right),c.bottom=Le(f.bottom,c.bottom),c.left=ue(f.left,c.left),c},En(r,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hi(e){const{width:r,height:t}=eo(e);return{width:r,height:t}}function mi(e,r,t){const n=xe(r),o=Pe(r),s=t==="fixed",a=ze(e,!0,s,r);let i={scrollLeft:0,scrollTop:0};const l=be(0);function c(){l.x=Zt(o)}if(n||!n&&!s)if((lt(r)!=="body"||Pt(o))&&(i=Kt(r)),n){const g=ze(r,!0,s,r);l.x=g.x+r.clientLeft,l.y=g.y+r.clientTop}else o&&c();s&&!n&&o&&c();const u=o&&!n&&!s?ro(o,i):be(0),f=a.left+i.scrollLeft-l.x-u.x,p=a.top+i.scrollTop-l.y-u.y;return{x:f,y:p,width:a.width,height:a.height}}function dr(e){return pe(e).position==="static"}function Cn(e,r){if(!xe(e)||pe(e).position==="fixed")return null;if(r)return r(e);let t=e.offsetParent;return Pe(e)===t&&(t=t.ownerDocument.body),t}function oo(e,r){const t=fe(e);if(Qt(e))return t;if(!xe(e)){let o=Fe(e);for(;o&&!st(o);){if(me(o)&&!dr(o))return o;o=Fe(o)}return t}let n=Cn(e,r);for(;n&&Qa(n)&&dr(n);)n=Cn(n,r);return n&&st(n)&&dr(n)&&!_r(n)?t:n||ti(e)||t}const pi=async function(e){const r=this.getOffsetParent||oo,t=this.getDimensions,n=await t(e.floating);return{reference:mi(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gi(e){return pe(e).direction==="rtl"}const vi={convertOffsetParentRelativeRectToViewportRelativeRect:si,getDocumentElement:Pe,getClippingRect:fi,getOffsetParent:oo,getElementRects:pi,getClientRects:ai,getDimensions:hi,getScale:tt,isElement:me,isRTL:gi};function so(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function yi(e,r){let t=null,n;const o=Pe(e);function s(){var i;clearTimeout(n),(i=t)==null||i.disconnect(),t=null}function a(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:g}=c;if(i||r(),!p||!g)return;const v=Dt(f),m=Dt(o.clientWidth-(u+p)),y=Dt(o.clientHeight-(f+g)),w=Dt(u),b={rootMargin:-v+"px "+-m+"px "+-y+"px "+-w+"px",threshold:ue(0,Le(1,l))||1};let x=!0;function C(S){const k=S[0].intersectionRatio;if(k!==l){if(!x)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!so(c,e.getBoundingClientRect())&&a(),x=!1}try{t=new IntersectionObserver(C,{...b,root:o.ownerDocument})}catch{t=new IntersectionObserver(C,b)}t.observe(e)}return a(!0),s}function wi(e,r,t,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Lr(e),u=o||s?[...c?xt(c):[],...xt(r)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",t,{passive:!0}),s&&w.addEventListener("resize",t)});const f=c&&i?yi(c,t):null;let p=-1,g=null;a&&(g=new ResizeObserver(w=>{let[P]=w;P&&P.target===c&&g&&(g.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=g)==null||b.observe(r)})),t()}),c&&!l&&g.observe(c),g.observe(r));let v,m=l?ze(e):null;l&&y();function y(){const w=ze(e);m&&!so(m,w)&&t(),m=w,v=requestAnimationFrame(y)}return t(),()=>{var w;u.forEach(P=>{o&&P.removeEventListener("scroll",t),s&&P.removeEventListener("resize",t)}),f==null||f(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const bi=Va,xi=za,Pi=$a,Ei=Ga,Ci=Ha,On=Ya,Oi=qa,Ri=(e,r,t)=>{const n=new Map,o={platform:vi,...t},s={...o.platform,_c:n};return Ia(e,r,{...o,platform:s})};var Ti=typeof document<"u",ki=function(){},Wt=Ti?de.useLayoutEffect:ki;function Bt(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let t,n,o;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==r.length)return!1;for(n=t;n--!==0;)if(!Bt(e[n],r[n]))return!1;return!0}if(o=Object.keys(e),t=o.length,t!==Object.keys(r).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(r,o[n]))return!1;for(n=t;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Bt(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}function ao(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rn(e,r){const t=ao(e);return Math.round(r*t)/t}function fr(e){const r=h.useRef(e);return Wt(()=>{r.current=e}),r}function Si(e){e===void 0&&(e={});const{placement:r="bottom",strategy:t="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[u,f]=h.useState({x:0,y:0,strategy:t,placement:r,middlewareData:{},isPositioned:!1}),[p,g]=h.useState(n);Bt(p,n)||g(n);const[v,m]=h.useState(null),[y,w]=h.useState(null),P=h.useCallback(A=>{A!==S.current&&(S.current=A,m(A))},[]),b=h.useCallback(A=>{A!==k.current&&(k.current=A,w(A))},[]),x=s||v,C=a||y,S=h.useRef(null),k=h.useRef(null),W=h.useRef(u),j=l!=null,$=fr(l),q=fr(o),M=fr(c),I=h.useCallback(()=>{if(!S.current||!k.current)return;const A={placement:r,strategy:t,middleware:p};q.current&&(A.platform=q.current),Ri(S.current,k.current,A).then(X=>{const ie={...X,isPositioned:M.current!==!1};L.current&&!Bt(W.current,ie)&&(W.current=ie,Bn.flushSync(()=>{f(ie)}))})},[p,r,t,q,M]);Wt(()=>{c===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[c]);const L=h.useRef(!1);Wt(()=>(L.current=!0,()=>{L.current=!1}),[]),Wt(()=>{if(x&&(S.current=x),C&&(k.current=C),x&&C){if($.current)return $.current(x,C,I);I()}},[x,C,I,$,j]);const Z=h.useMemo(()=>({reference:S,floating:k,setReference:P,setFloating:b}),[P,b]),V=h.useMemo(()=>({reference:x,floating:C}),[x,C]),G=h.useMemo(()=>{const A={position:t,left:0,top:0};if(!V.floating)return A;const X=Rn(V.floating,u.x),ie=Rn(V.floating,u.y);return i?{...A,transform:"translate("+X+"px, "+ie+"px)",...ao(V.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:X,top:ie}},[t,i,V.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:I,refs:Z,elements:V,floatingStyles:G}),[u,I,Z,V,G])}const Mi=e=>{function r(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:n,padding:o}=typeof e=="function"?e(t):e;return n&&r(n)?n.current!=null?On({element:n.current,padding:o}).fn(t):{}:n?On({element:n,padding:o}).fn(t):{}}}},Di=(e,r)=>({...bi(e),options:[e,r]}),Ai=(e,r)=>({...xi(e),options:[e,r]}),_i=(e,r)=>({...Oi(e),options:[e,r]}),Ni=(e,r)=>({...Pi(e),options:[e,r]}),Li=(e,r)=>({...Ei(e),options:[e,r]}),Fi=(e,r)=>({...Ci(e),options:[e,r]}),Wi=(e,r)=>({...Mi(e),options:[e,r]});var ji="Arrow",io=h.forwardRef((e,r)=>{const{children:t,width:n=10,height:o=5,...s}=e;return O.jsx(ke.svg,{...s,ref:r,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?t:O.jsx("polygon",{points:"0,0 30,0 15,10"})})});io.displayName=ji;var Ii=io;function Yi(e){const[r,t]=h.useState(void 0);return Ne(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,i=c.blockSize}else a=e.offsetWidth,i=e.offsetHeight;t({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else t(void 0)},[e]),r}var Fr="Popper",[co,lo]=Vn(Fr),[$i,uo]=co(Fr),fo=e=>{const{__scopePopper:r,children:t}=e,[n,o]=h.useState(null);return O.jsx($i,{scope:r,anchor:n,onAnchorChange:o,children:t})};fo.displayName=Fr;var ho="PopperAnchor",mo=h.forwardRef((e,r)=>{const{__scopePopper:t,virtualRef:n,...o}=e,s=uo(ho,t),a=h.useRef(null),i=We(r,a),l=h.useRef(null);return h.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||a.current,c!==l.current&&s.onAnchorChange(l.current)}),n?null:O.jsx(ke.div,{...o,ref:i})});mo.displayName=ho;var Wr="PopperContent",[Hi,Bi]=co(Wr),po=h.forwardRef((e,r)=>{var qe,Ie,Ge,Ye,Tt,ht;const{__scopePopper:t,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:v,...m}=e,y=uo(Wr,t),[w,P]=h.useState(null),b=We(r,$e=>P($e)),[x,C]=h.useState(null),S=Yi(x),k=(S==null?void 0:S.width)??0,W=(S==null?void 0:S.height)??0,j=n+(s!=="center"?"-"+s:""),$=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},q=Array.isArray(c)?c:[c],M=q.length>0,I={padding:$,boundary:q.filter(zi),altBoundary:M},{refs:L,floatingStyles:Z,placement:V,isPositioned:G,middlewareData:A}=Si({strategy:"fixed",placement:j,whileElementsMounted:(...$e)=>wi(...$e,{animationFrame:g==="always"}),elements:{reference:y.anchor},middleware:[Di({mainAxis:o+W,alignmentAxis:a}),l&&Ai({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?_i():void 0,...I}),l&&Ni({...I}),Li({...I,apply:({elements:$e,rects:kt,availableWidth:Xe,availableHeight:He})=>{const{width:St,height:Mt}=kt.reference,Ee=$e.floating.style;Ee.setProperty("--radix-popper-available-width",`${Xe}px`),Ee.setProperty("--radix-popper-available-height",`${He}px`),Ee.setProperty("--radix-popper-anchor-width",`${St}px`),Ee.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),x&&Wi({element:x,padding:i}),qi({arrowWidth:k,arrowHeight:W}),p&&Fi({strategy:"referenceHidden",...I})]}),[X,ie]=yo(V),se=ot(v);Ne(()=>{G&&(se==null||se())},[G,se]);const Ot=(qe=A.arrow)==null?void 0:qe.x,Rt=(Ie=A.arrow)==null?void 0:Ie.y,tr=((Ge=A.arrow)==null?void 0:Ge.centerOffset)!==0,[rr,ft]=h.useState();return Ne(()=>{w&&ft(window.getComputedStyle(w).zIndex)},[w]),O.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:G?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:rr,"--radix-popper-transform-origin":[(Ye=A.transformOrigin)==null?void 0:Ye.x,(Tt=A.transformOrigin)==null?void 0:Tt.y].join(" "),...((ht=A.hide)==null?void 0:ht.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:O.jsx(Hi,{scope:t,placedSide:X,onArrowChange:C,arrowX:Ot,arrowY:Rt,shouldHideArrow:tr,children:O.jsx(ke.div,{"data-side":X,"data-align":ie,...m,ref:b,style:{...m.style,animation:G?void 0:"none"}})})})});po.displayName=Wr;var go="PopperArrow",Vi={top:"bottom",right:"left",bottom:"top",left:"right"},vo=h.forwardRef(function(r,t){const{__scopePopper:n,...o}=r,s=Bi(go,n),a=Vi[s.placedSide];return O.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:O.jsx(Ii,{...o,ref:t,style:{...o.style,display:"block"}})})});vo.displayName=go;function zi(e){return e!==null}var qi=e=>({name:"transformOrigin",options:e,fn(r){var y,w,P;const{placement:t,rects:n,middlewareData:o}=r,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,u]=yo(t),f={start:"0%",center:"50%",end:"100%"}[u],p=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,g=(((P=o.arrow)==null?void 0:P.y)??0)+l/2;let v="",m="";return c==="bottom"?(v=a?f:`${p}px`,m=`${-l}px`):c==="top"?(v=a?f:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=a?f:`${g}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=a?f:`${g}px`),{data:{x:v,y:m}}}});function yo(e){const[r,t="center"]=e.split("-");return[r,t]}var Gi=fo,wo=mo,Xi=po,Ui=vo,Qi="Portal",bo=h.forwardRef((e,r)=>{var i;const{container:t,...n}=e,[o,s]=h.useState(!1);Ne(()=>s(!0),[]);const a=t||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?$n.createPortal(O.jsx(ke.div,{...n,ref:r}),a):null});bo.displayName=Qi;function Ki(e,r){return h.useReducer((t,n)=>r[t][n]??t,e)}var jr=e=>{const{present:r,children:t}=e,n=Zi(r),o=typeof t=="function"?t({present:n.isPresent}):h.Children.only(t),s=We(n.ref,Ji(o));return typeof t=="function"||n.isPresent?h.cloneElement(o,{ref:s}):null};jr.displayName="Presence";function Zi(e){const[r,t]=h.useState(),n=h.useRef(null),o=h.useRef(e),s=h.useRef("none"),a=e?"mounted":"unmounted",[i,l]=Ki(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=At(n.current);s.current=i==="mounted"?c:"none"},[i]),Ne(()=>{const c=n.current,u=o.current;if(u!==e){const p=s.current,g=At(c);e?l("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ne(()=>{if(r){let c;const u=r.ownerDocument.defaultView??window,f=g=>{const m=At(n.current).includes(CSS.escape(g.animationName));if(g.target===r&&m&&(l("ANIMATION_END"),!o.current)){const y=r.style.animationFillMode;r.style.animationFillMode="forwards",c=u.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=y)})}},p=g=>{g.target===r&&(s.current=At(n.current))};return r.addEventListener("animationstart",p),r.addEventListener("animationcancel",f),r.addEventListener("animationend",f),()=>{u.clearTimeout(c),r.removeEventListener("animationstart",p),r.removeEventListener("animationcancel",f),r.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[r,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:h.useCallback(c=>{n.current=c?getComputedStyle(c):null,t(c)},[])}}function At(e){return(e==null?void 0:e.animationName)||"none"}function Ji(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function ec(e){const r=tc(e),t=h.forwardRef((n,o)=>{const{children:s,...a}=n,i=h.Children.toArray(s),l=i.find(nc);if(l){const c=l.props.children,u=i.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return O.jsx(r,{...a,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,u):null})}return O.jsx(r,{...a,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function tc(e){const r=h.forwardRef((t,n)=>{const{children:o,...s}=t;if(h.isValidElement(o)){const a=sc(o),i=oc(s,o.props);return o.type!==h.Fragment&&(i.ref=n?Xt(n,a):a),h.cloneElement(o,i)}return h.Children.count(o)>1?h.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var rc=Symbol("radix.slottable");function nc(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rc}function oc(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function sc(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var ac=h[" useInsertionEffect ".trim().toString()]||Ne;function ic({prop:e,defaultProp:r,onChange:t=()=>{},caller:n}){const[o,s,a]=cc({defaultProp:r,onChange:t}),i=e!==void 0,l=i?e:o;{const u=h.useRef(e!==void 0);h.useEffect(()=>{const f=u.current;f!==i&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const c=h.useCallback(u=>{var f;if(i){const p=lc(u)?u(e):u;p!==e&&((f=a.current)==null||f.call(a,p))}else s(u)},[i,e,s,a]);return[l,c]}function cc({defaultProp:e,onChange:r}){const[t,n]=h.useState(e),o=h.useRef(t),s=h.useRef(r);return ac(()=>{s.current=r},[r]),h.useEffect(()=>{var a;o.current!==t&&((a=s.current)==null||a.call(s,t),o.current=t)},[t,o]),[t,n,s]}function lc(e){return typeof e=="function"}var uc=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Ke=new WeakMap,_t=new WeakMap,Nt={},hr=0,xo=function(e){return e&&(e.host||xo(e.parentNode))},dc=function(e,r){return r.map(function(t){if(e.contains(t))return t;var n=xo(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},fc=function(e,r,t,n){var o=dc(r,Array.isArray(e)?e:[e]);Nt[t]||(Nt[t]=new WeakMap);var s=Nt[t],a=[],i=new Set,l=new Set(o),c=function(f){!f||i.has(f)||(i.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(i.has(p))u(p);else try{var g=p.getAttribute(n),v=g!==null&&g!=="false",m=(Ke.get(p)||0)+1,y=(s.get(p)||0)+1;Ke.set(p,m),s.set(p,y),a.push(p),m===1&&v&&_t.set(p,!0),y===1&&p.setAttribute(t,"true"),v||p.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return u(r),i.clear(),hr++,function(){a.forEach(function(f){var p=Ke.get(f)-1,g=s.get(f)-1;Ke.set(f,p),s.set(f,g),p||(_t.has(f)||f.removeAttribute(n),_t.delete(f)),g||f.removeAttribute(t)}),hr--,hr||(Ke=new WeakMap,Ke=new WeakMap,_t=new WeakMap,Nt={})}},hc=function(e,r,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=uc(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),fc(n,o,t,"aria-hidden")):function(){return null}},ge=function(){return ge=Object.assign||function(r){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},ge.apply(this,arguments)};function Po(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function mc(e,r,t){if(t||arguments.length===2)for(var n=0,o=r.length,s;n<o;n++)(s||!(n in r))&&(s||(s=Array.prototype.slice.call(r,0,n)),s[n]=r[n]);return e.concat(s||Array.prototype.slice.call(r))}var jt="right-scroll-bar-position",It="width-before-scroll-bar",pc="with-scroll-bars-hidden",gc="--removed-body-scroll-bar-size";function mr(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function vc(e,r){var t=de.useState(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var o=t.value;o!==n&&(t.value=n,t.callback(n,o))}}}})[0];return t.callback=r,t.facade}var yc=typeof window<"u"?h.useLayoutEffect:h.useEffect,Tn=new WeakMap;function wc(e,r){var t=vc(null,function(n){return e.forEach(function(o){return mr(o,n)})});return yc(function(){var n=Tn.get(t);if(n){var o=new Set(n),s=new Set(e),a=t.current;o.forEach(function(i){s.has(i)||mr(i,null)}),s.forEach(function(i){o.has(i)||mr(i,a)})}Tn.set(t,e)},[e]),t}function bc(e){return e}function xc(e,r){r===void 0&&(r=bc);var t=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(s){var a=r(s,n);return t.push(a),function(){t=t.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;t.length;){var a=t;t=[],a.forEach(s)}t={push:function(i){return s(i)},filter:function(){return t}}},assignMedium:function(s){n=!0;var a=[];if(t.length){var i=t;t=[],i.forEach(s),a=t}var l=function(){var u=a;a=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),t={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),t}}}};return o}function Pc(e){e===void 0&&(e={});var r=xc(null);return r.options=ge({async:!0,ssr:!1},e),r}var Eo=function(e){var r=e.sideCar,t=Po(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=r.read();if(!n)throw new Error("Sidecar medium not found");return h.createElement(n,ge({},t))};Eo.isSideCarExport=!0;function Ec(e,r){return e.useMedium(r),Eo}var Co=Pc(),pr=function(){},Jt=h.forwardRef(function(e,r){var t=h.useRef(null),n=h.useState({onScrollCapture:pr,onWheelCapture:pr,onTouchMoveCapture:pr}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,g=e.noRelative,v=e.noIsolation,m=e.inert,y=e.allowPinchZoom,w=e.as,P=w===void 0?"div":w,b=e.gapMode,x=Po(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,S=wc([t,r]),k=ge(ge({},x),o);return h.createElement(h.Fragment,null,u&&h.createElement(C,{sideCar:Co,removeScrollBar:c,shards:f,noRelative:g,noIsolation:v,inert:m,setCallbacks:s,allowPinchZoom:!!y,lockRef:t,gapMode:b}),a?h.cloneElement(h.Children.only(i),ge(ge({},k),{ref:S})):h.createElement(P,ge({},k,{className:l,ref:S}),i))});Jt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jt.classNames={fullWidth:It,zeroRight:jt};var Cc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Oc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=Cc();return r&&e.setAttribute("nonce",r),e}function Rc(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function Tc(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var kc=function(){var e=0,r=null;return{add:function(t){e==0&&(r=Oc())&&(Rc(r,t),Tc(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},Sc=function(){var e=kc();return function(r,t){h.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&t])}},Oo=function(){var e=Sc(),r=function(t){var n=t.styles,o=t.dynamic;return e(n,o),null};return r},Mc={left:0,top:0,right:0,gap:0},gr=function(e){return parseInt(e||"",10)||0},Dc=function(e){var r=window.getComputedStyle(document.body),t=r[e==="padding"?"paddingLeft":"marginLeft"],n=r[e==="padding"?"paddingTop":"marginTop"],o=r[e==="padding"?"paddingRight":"marginRight"];return[gr(t),gr(n),gr(o)]},Ac=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Mc;var r=Dc(e),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,n-t+r[2]-r[0])}},_c=Oo(),rt="data-scroll-locked",Nc=function(e,r,t,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return t===void 0&&(t="margin"),`
|
|
61
|
+
.`.concat(pc,` {
|
|
62
62
|
overflow: hidden `).concat(n,`;
|
|
63
63
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
64
64
|
}
|
|
@@ -92,9 +92,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
body[`).concat(rt,`] {
|
|
95
|
-
`).concat(
|
|
95
|
+
`).concat(gc,": ").concat(i,`px;
|
|
96
96
|
}
|
|
97
|
-
`)},kn=function(){var e=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(e)?e:0},
|
|
97
|
+
`)},kn=function(){var e=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(e)?e:0},Lc=function(){h.useEffect(function(){return document.body.setAttribute(rt,(kn()+1).toString()),function(){var e=kn()-1;e<=0?document.body.removeAttribute(rt):document.body.setAttribute(rt,e.toString())}},[])},Fc=function(e){var r=e.noRelative,t=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Lc();var s=h.useMemo(function(){return Ac(o)},[o]);return h.createElement(_c,{styles:Nc(s,!r,o,t?"":"!important")})},Cr=!1;if(typeof window<"u")try{var Lt=Object.defineProperty({},"passive",{get:function(){return Cr=!0,!0}});window.addEventListener("test",Lt,Lt),window.removeEventListener("test",Lt,Lt)}catch{Cr=!1}var Ze=Cr?{passive:!1}:!1,Wc=function(e){return e.tagName==="TEXTAREA"},Ro=function(e,r){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[r]!=="hidden"&&!(t.overflowY===t.overflowX&&!Wc(e)&&t[r]==="visible")},jc=function(e){return Ro(e,"overflowY")},Ic=function(e){return Ro(e,"overflowX")},Sn=function(e,r){var t=r.ownerDocument,n=r;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=To(e,n);if(o){var s=ko(e,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},Yc=function(e){var r=e.scrollTop,t=e.scrollHeight,n=e.clientHeight;return[r,t,n]},$c=function(e){var r=e.scrollLeft,t=e.scrollWidth,n=e.clientWidth;return[r,t,n]},To=function(e,r){return e==="v"?jc(r):Ic(r)},ko=function(e,r){return e==="v"?Yc(r):$c(r)},Hc=function(e,r){return e==="h"&&r==="rtl"?-1:1},Bc=function(e,r,t,n,o){var s=Hc(e,window.getComputedStyle(r).direction),a=s*n,i=t.target,l=r.contains(i),c=!1,u=a>0,f=0,p=0;do{if(!i)break;var g=ko(e,i),v=g[0],m=g[1],y=g[2],w=m-y-s*v;(v||w)&&To(e,i)&&(f+=w,p+=v);var P=i.parentNode;i=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!l&&i!==document.body||l&&(r.contains(i)||r===i));return(u&&Math.abs(f)<1||!u&&Math.abs(p)<1)&&(c=!0),c},Ft=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mn=function(e){return[e.deltaX,e.deltaY]},Dn=function(e){return e&&"current"in e?e.current:e},Vc=function(e,r){return e[0]===r[0]&&e[1]===r[1]},zc=function(e){return`
|
|
98
98
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
99
99
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
100
|
-
`)},Gc=0,Je=[];function Xc(e){var r=f.useRef([]),t=f.useRef([0,0]),n=f.useRef(),o=f.useState(Gc++)[0],s=f.useState(Ro)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=mc([e.lockRef.current],(e.shards||[]).map(Dn),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var b=Ft(m),w=t.current,x="deltaX"in m?m.deltaX:w[0]-b[0],P="deltaY"in m?m.deltaY:w[1]-b[1],O,S=m.target,k=Math.abs(x)>Math.abs(P)?"h":"v";if("touches"in m&&k==="h"&&S.type==="range")return!1;var W=window.getSelection(),j=W&&W.anchorNode,$=j?j===S||j.contains(S):!1;if($)return!1;var q=Sn(k,S);if(!q)return!0;if(q?O=k:(O=k==="v"?"h":"v",q=Sn(k,S)),!q)return!1;if(!n.current&&"changedTouches"in m&&(x||P)&&(n.current=O),!O)return!0;var M=n.current||O;return Vc(M,y,m,M==="h"?x:P)},[]),l=f.useCallback(function(m){var y=m;if(!(!Je.length||Je[Je.length-1]!==s)){var b="deltaY"in y?Mn(y):Ft(y),w=r.current.filter(function(O){return O.name===y.type&&(O.target===y.target||y.target===O.shadowParent)&&zc(O.delta,b)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var x=(a.current.shards||[]).map(Dn).filter(Boolean).filter(function(O){return O.contains(y.target)}),P=x.length>0?i(y,x[0]):!a.current.noIsolation;P&&y.cancelable&&y.preventDefault()}}},[]),c=f.useCallback(function(m,y,b,w){var x={name:m,delta:y,target:b,should:w,shadowParent:Uc(b)};r.current.push(x),setTimeout(function(){r.current=r.current.filter(function(P){return P!==x})},1)},[]),u=f.useCallback(function(m){t.current=Ft(m),n.current=void 0},[]),h=f.useCallback(function(m){c(m.type,Mn(m),m.target,i(m,e.lockRef.current))},[]),p=f.useCallback(function(m){c(m.type,Ft(m),m.target,i(m,e.lockRef.current))},[]);f.useEffect(function(){return Je.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ze),document.addEventListener("touchmove",l,Ze),document.addEventListener("touchstart",u,Ze),function(){Je=Je.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Ze),document.removeEventListener("touchmove",l,Ze),document.removeEventListener("touchstart",u,Ze)}},[]);var g=e.removeScrollBar,v=e.inert;return f.createElement(f.Fragment,null,v?f.createElement(s,{styles:qc(o)}):null,g?f.createElement(Wc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Uc(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const Qc=Cc(Oo,Xc);var Mo=f.forwardRef(function(e,r){return f.createElement(Jt,ge({},e,{ref:r,sideCar:Qc}))});Mo.classNames=Jt.classNames;var er="Popover",[Do]=zn(er,[uo]),Et=uo(),[Kc,je]=Do(er),Ao=e=>{const{__scopePopover:r,children:t,open:n,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,i=Et(r),l=f.useRef(null),[c,u]=f.useState(!1),[h,p]=cc({prop:n,defaultProp:o??!1,onChange:s,caller:er});return C.jsx(Xi,{...i,children:C.jsx(Kc,{scope:r,contentId:Ta(),triggerRef:l,open:h,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(g=>!g),[p]),hasCustomAnchor:c,onCustomAnchorAdd:f.useCallback(()=>u(!0),[]),onCustomAnchorRemove:f.useCallback(()=>u(!1),[]),modal:a,children:t})})};Ao.displayName=er;var _o="PopoverAnchor",Zc=f.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=je(_o,t),s=Et(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(a(),()=>i()),[a,i]),C.jsx(wo,{...s,...n,ref:r})});Zc.displayName=_o;var No="PopoverTrigger",Lo=f.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=je(No,t),s=Et(t),a=We(r,o.triggerRef),i=C.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yo(o.open),...n,ref:a,onClick:_e(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:C.jsx(wo,{asChild:!0,...s,children:i})});Lo.displayName=No;var Ir="PopoverPortal",[Jc,el]=Do(Ir,{forceMount:void 0}),Fo=e=>{const{__scopePopover:r,forceMount:t,children:n,container:o}=e,s=je(Ir,r);return C.jsx(Jc,{scope:r,forceMount:t,children:C.jsx(jr,{present:t||s.open,children:C.jsx(xo,{asChild:!0,container:o,children:n})})})};Fo.displayName=Ir;var at="PopoverContent",Wo=f.forwardRef((e,r)=>{const t=el(at,e.__scopePopover),{forceMount:n=t.forceMount,...o}=e,s=je(at,e.__scopePopover);return C.jsx(jr,{present:n||s.open,children:s.modal?C.jsx(rl,{...o,ref:r}):C.jsx(nl,{...o,ref:r})})});Wo.displayName=at;var tl=tc("PopoverContent.RemoveScroll"),rl=f.forwardRef((e,r)=>{const t=je(at,e.__scopePopover),n=f.useRef(null),o=We(r,n),s=f.useRef(!1);return f.useEffect(()=>{const a=n.current;if(a)return pc(a)},[]),C.jsx(Mo,{as:tl,allowPinchZoom:!0,children:C.jsx(jo,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_e(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),s.current||(i=t.triggerRef.current)==null||i.focus()}),onPointerDownOutside:_e(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,c=i.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:_e(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),nl=f.forwardRef((e,r)=>{const t=je(at,e.__scopePopover),n=f.useRef(!1),o=f.useRef(!1);return C.jsx(jo,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(i=t.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((c=t.triggerRef.current)==null?void 0:c.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),jo=f.forwardRef((e,r)=>{const{__scopePopover:t,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...h}=e,p=je(at,t),g=Et(t);return va(),C.jsx(Un,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:C.jsx(Gn,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:C.jsx(Ui,{"data-state":Yo(p.open),role:"dialog",id:p.contentId,...g,...h,ref:r,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Io="PopoverClose",ol=f.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=je(Io,t);return C.jsx(ke.button,{type:"button",...n,ref:r,onClick:_e(e.onClick,()=>o.onOpenChange(!1))})});ol.displayName=Io;var sl="PopoverArrow",al=f.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=Et(t);return C.jsx(Qi,{...o,...n,ref:r})});al.displayName=sl;function Yo(e){return e?"open":"closed"}var il=Ao,cl=Lo,ll=Fo,$o=Wo;function Ho(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(t=Ho(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Bo(){for(var e,r,t=0,n="",o=arguments.length;t<o;t++)(e=arguments[t])&&(r=Ho(e))&&(n&&(n+=" "),n+=r);return n}const Yr="-",ul=e=>{const r=fl(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(Yr);return i[0]===""&&i.length!==1&&i.shift(),Vo(i,r)||dl(a)},getConflictingClassGroupIds:(a,i)=>{const l=t[a]||[];return i&&n[a]?[...l,...n[a]]:l}}},Vo=(e,r)=>{var a;if(e.length===0)return r.classGroupId;const t=e[0],n=r.nextPart.get(t),o=n?Vo(e.slice(1),n):void 0;if(o)return o;if(r.validators.length===0)return;const s=e.join(Yr);return(a=r.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},An=/^\[(.+)\]$/,dl=e=>{if(An.test(e)){const r=An.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},fl=e=>{const{theme:r,prefix:t}=e,n={nextPart:new Map,validators:[]};return pl(Object.entries(e.classGroups),t).forEach(([s,a])=>{Or(a,n,s,r)}),n},Or=(e,r,t,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?r:_n(r,o);s.classGroupId=t;return}if(typeof o=="function"){if(hl(o)){Or(o(n),r,t,n);return}r.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,a])=>{Or(a,_n(r,s),t,n)})})},_n=(e,r)=>{let t=e;return r.split(Yr).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},hl=e=>e.isThemeGetter,pl=(e,r)=>r?e.map(([t,n])=>{const o=n.map(s=>typeof s=="string"?r+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[r+a,i])):s);return[t,o]}):e,ml=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,n=new Map;const o=(s,a)=>{t.set(s,a),r++,r>e&&(r=0,n=t,t=new Map)};return{get(s){let a=t.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){t.has(s)?t.set(s,a):o(s,a)}}},zo="!",gl=e=>{const{separator:r,experimentalParseClassName:t}=e,n=r.length===1,o=r[0],s=r.length,a=i=>{const l=[];let c=0,u=0,h;for(let y=0;y<i.length;y++){let b=i[y];if(c===0){if(b===o&&(n||i.slice(y,y+s)===r)){l.push(i.slice(u,y)),u=y+s;continue}if(b==="/"){h=y;continue}}b==="["?c++:b==="]"&&c--}const p=l.length===0?i:i.substring(u),g=p.startsWith(zo),v=g?p.substring(1):p,m=h&&h>u?h-u:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:m}};return t?i=>t({className:i,parseClassName:a}):a},vl=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(n=>{n[0]==="["?(r.push(...t.sort(),n),t=[]):t.push(n)}),r.push(...t.sort()),r},yl=e=>({cache:ml(e.cacheSize),parseClassName:gl(e),...ul(e)}),bl=/\s+/,wl=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:o}=r,s=[],a=e.trim().split(bl);let i="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:u,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}=t(c);let v=!!g,m=n(v?p.substring(0,g):p);if(!m){if(!v){i=c+(i.length>0?" "+i:i);continue}if(m=n(p),!m){i=c+(i.length>0?" "+i:i);continue}v=!1}const y=vl(u).join(":"),b=h?y+zo:y,w=b+m;if(s.includes(w))continue;s.push(w);const x=o(m,v);for(let P=0;P<x.length;++P){const O=x[P];s.push(b+O)}i=c+(i.length>0?" "+i:i)}return i};function xl(){let e=0,r,t,n="";for(;e<arguments.length;)(r=arguments[e++])&&(t=qo(r))&&(n&&(n+=" "),n+=t);return n}const qo=e=>{if(typeof e=="string")return e;let r,t="";for(let n=0;n<e.length;n++)e[n]&&(r=qo(e[n]))&&(t&&(t+=" "),t+=r);return t};function Pl(e,...r){let t,n,o,s=a;function a(l){const c=r.reduce((u,h)=>h(u),e());return t=yl(c),n=t.cache.get,o=t.cache.set,s=i,i(l)}function i(l){const c=n(l);if(c)return c;const u=wl(l,t);return o(l,u),u}return function(){return s(xl.apply(null,arguments))}}const U=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},Go=/^\[(?:([a-z-]+):)?(.+)\]$/i,El=/^\d+\/\d+$/,Cl=new Set(["px","full","screen"]),Ol=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rl=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Tl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ce=e=>nt(e)||Cl.has(e)||El.test(e),Se=e=>ut(e,"length",Wl),nt=e=>!!e&&!Number.isNaN(Number(e)),vr=e=>ut(e,"number",nt),gt=e=>!!e&&Number.isInteger(Number(e)),Ml=e=>e.endsWith("%")&&nt(e.slice(0,-1)),_=e=>Go.test(e),Me=e=>Ol.test(e),Dl=new Set(["length","size","percentage"]),Al=e=>ut(e,Dl,Xo),_l=e=>ut(e,"position",Xo),Nl=new Set(["image","url"]),Ll=e=>ut(e,Nl,Il),Fl=e=>ut(e,"",jl),vt=()=>!0,ut=(e,r,t)=>{const n=Go.exec(e);return n?n[1]?typeof r=="string"?n[1]===r:r.has(n[1]):t(n[2]):!1},Wl=e=>Rl.test(e)&&!Tl.test(e),Xo=()=>!1,jl=e=>kl.test(e),Il=e=>Sl.test(e),Yl=()=>{const e=U("colors"),r=U("spacing"),t=U("blur"),n=U("brightness"),o=U("borderColor"),s=U("borderRadius"),a=U("borderSpacing"),i=U("borderWidth"),l=U("contrast"),c=U("grayscale"),u=U("hueRotate"),h=U("invert"),p=U("gap"),g=U("gradientColorStops"),v=U("gradientColorStopPositions"),m=U("inset"),y=U("margin"),b=U("opacity"),w=U("padding"),x=U("saturate"),P=U("scale"),O=U("sepia"),S=U("skew"),k=U("space"),W=U("translate"),j=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",_,r],M=()=>[_,r],I=()=>["",Ce,Se],L=()=>["auto",nt,_],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",_],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[nt,_];return{cacheSize:500,separator:":",theme:{colors:[vt],spacing:[Ce,Se],blur:["none","",Me,_],brightness:se(),borderColor:[e],borderRadius:["none","","full",Me,_],borderSpacing:M(),borderWidth:I(),contrast:se(),grayscale:X(),hueRotate:se(),invert:X(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Ml,Se],inset:q(),margin:q(),opacity:se(),padding:M(),saturate:se(),scale:se(),sepia:X(),skew:se(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",_]}],container:["container"],columns:[{columns:[Me]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),_]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gt,_]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",gt,_]}],"grid-cols":[{"grid-cols":[vt]}],"col-start-end":[{col:["auto",{span:["full",gt,_]},_]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[vt]}],"row-start-end":[{row:["auto",{span:[gt,_]},_]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",_,r]}],"min-w":[{"min-w":[_,r,"min","max","fit"]}],"max-w":[{"max-w":[_,r,"none","full","min","max","fit","prose",{screen:[Me]},Me]}],h:[{h:[_,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Me,Se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vr]}],"font-family":[{font:[vt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",_]}],"line-clamp":[{"line-clamp":["none",nt,vr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ce,_]}],"list-image":[{"list-image":["none",_]}],"list-style-type":[{list:["none","disc","decimal",_]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ce,Se]}],"underline-offset":[{"underline-offset":["auto",Ce,_]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),_l]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Al]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ll]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[Ce,_]}],"outline-w":[{outline:[Ce,Se]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ce,Se]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Me,Fl]}],"shadow-color":[{shadow:[vt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Me,_]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_]}],duration:[{duration:se()}],ease:[{ease:["linear","in","out","in-out",_]}],delay:[{delay:se()}],animate:[{animate:["none","spin","ping","pulse","bounce",_]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[gt,_]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ce,Se,vr]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},$l=Pl(Yl);function ae(...e){return $l(Bo(e))}const Hl=il,Bl=cl,Uo=f.forwardRef(({className:e,align:r="center",sideOffset:t=4,...n},o)=>C.jsx(ll,{children:C.jsx($o,{ref:o,align:r,sideOffset:t,className:ae("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Uo.displayName=$o.displayName;var Vl=Symbol.for("react.lazy"),Vt=f[" use ".trim().toString()];function zl(e){return typeof e=="object"&&e!==null&&"then"in e}function Qo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Vl&&"_payload"in e&&zl(e._payload)}function ql(e){const r=Xl(e),t=f.forwardRef((n,o)=>{let{children:s,...a}=n;Qo(s)&&typeof Vt=="function"&&(s=Vt(s._payload));const i=f.Children.toArray(s),l=i.find(Ql);if(l){const c=l.props.children,u=i.map(h=>h===l?f.Children.count(c)>1?f.Children.only(null):f.isValidElement(c)?c.props.children:null:h);return C.jsx(r,{...a,ref:o,children:f.isValidElement(c)?f.cloneElement(c,void 0,u):null})}return C.jsx(r,{...a,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}var Gl=ql("Slot");function Xl(e){const r=f.forwardRef((t,n)=>{let{children:o,...s}=t;if(Qo(o)&&typeof Vt=="function"&&(o=Vt(o._payload)),f.isValidElement(o)){const a=Zl(o),i=Kl(s,o.props);return o.type!==f.Fragment&&(i.ref=n?Xt(n,a):a),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Ul=Symbol("radix.slottable");function Ql(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ul}function Kl(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function Zl(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const Nn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ln=Bo,Jl=(e,r)=>t=>{var n;if((r==null?void 0:r.variants)==null)return Ln(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:s}=r,a=Object.keys(o).map(c=>{const u=t==null?void 0:t[c],h=s==null?void 0:s[c];if(u===null)return null;const p=Nn(u)||Nn(h);return o[c][p]}),i=t&&Object.entries(t).reduce((c,u)=>{let[h,p]=u;return p===void 0||(c[h]=p),c},{}),l=r==null||(n=r.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:h,className:p,...g}=u;return Object.entries(g).every(v=>{let[m,y]=v;return Array.isArray(y)?y.includes({...s,...i}[m]):{...s,...i}[m]===y})?[...c,h,p]:c},[]);return Ln(e,a,l,t==null?void 0:t.class,t==null?void 0:t.className)},eu=Jl("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),$r=f.forwardRef(({className:e,variant:r,size:t,asChild:n=!1,...o},s)=>{const a=n?Gl:"button";return C.jsx(a,{className:ae(eu({variant:r,size:t,className:e})),ref:s,...o})});$r.displayName="Button";const Ko=f.forwardRef(({className:e,...r},t)=>C.jsx("div",{ref:t,className:ae("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r}));Ko.displayName="Card";const tu=f.forwardRef(({className:e,...r},t)=>C.jsx("div",{ref:t,className:ae("flex flex-col space-y-1.5 p-6",e),...r}));tu.displayName="CardHeader";const ru=f.forwardRef(({className:e,...r},t)=>C.jsx("h3",{ref:t,className:ae("text-2xl font-semibold leading-none tracking-tight",e),...r}));ru.displayName="CardTitle";const nu=f.forwardRef(({className:e,...r},t)=>C.jsx("p",{ref:t,className:ae("text-sm text-muted-foreground",e),...r}));nu.displayName="CardDescription";const Zo=f.forwardRef(({className:e,...r},t)=>C.jsx("div",{ref:t,className:ae("p-6 pt-0",e),...r}));Zo.displayName="CardContent";const ou=f.forwardRef(({className:e,...r},t)=>C.jsx("div",{ref:t,className:ae("flex items-center p-6 pt-0",e),...r}));ou.displayName="CardFooter";const Rr=f.forwardRef(({className:e,type:r,...t},n)=>C.jsx("input",{type:r,className:ae("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Rr.displayName="Input";const su=({startDate:e,endDate:r,onStartDateChange:t,onEndDateChange:n,className:o})=>{const s=c=>{if(!c)return"";const u=c.getFullYear(),h=String(c.getMonth()+1).padStart(2,"0"),p=String(c.getDate()).padStart(2,"0");return`${u}-${h}-${p}`},a=c=>{if(!c)return null;const u=new Date(c);return isNaN(u.getTime())?null:u},i=c=>{const u=a(c.target.value);t(u)},l=c=>{const u=a(c.target.value);n(u)};return C.jsxs("div",{className:ae("flex justify-center items-center gap-4",o),children:[C.jsxs("div",{className:"w-full",children:[C.jsx("label",{className:"text-sm font-medium",children:"ວັນທີເລີ່ມຕົ້ນ"}),C.jsx(Rr,{type:"date",value:s(e),onChange:i,className:"w-full [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-inner-spin-button]:hidden [&::-webkit-clear-button]:hidden cursor-pointer hover:border-primary/50 focus:border-transparent focus:ring-1 focus-visible:ring-1 focus-visible:ring-offset-0 transition-colors"})]}),C.jsxs("div",{className:"w-full",children:[C.jsx("label",{className:"text-sm font-medium",children:"ວັນທີສິ້ນສຸດ "}),C.jsx(Rr,{type:"date",value:s(r),onChange:l,className:"w-full [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-inner-spin-button]:hidden [&::-webkit-clear-button]:hidden cursor-pointer hover:border-primary/50 focus:border-transparent focus:ring-1 focus-visible:ring-1 focus-visible:ring-offset-0 transition-colors"})]})]})};function ee(e){const r=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&r==="[object Date]"?new e.constructor(+e):typeof e=="number"||r==="[object Number]"||typeof e=="string"||r==="[object String]"?new Date(e):new Date(NaN)}function Q(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}function Hr(e,r){const t=ee(e);return isNaN(r)?Q(e,NaN):(r&&t.setDate(t.getDate()+r),t)}function Jo(e,r){const t=ee(e);if(isNaN(r))return Q(e,NaN);if(!r)return t;const n=t.getDate(),o=Q(e,t.getTime());o.setMonth(t.getMonth()+r+1,0);const s=o.getDate();return n>=s?o:(t.setFullYear(o.getFullYear(),o.getMonth(),n),t)}const es=6048e5,au=864e5,iu=6e4,cu=36e5,lu=1e3;let uu={};function dt(){return uu}function Te(e,r){var i,l,c,u;const t=dt(),n=(r==null?void 0:r.weekStartsOn)??((l=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((u=(c=t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=ee(e),s=o.getDay(),a=(s<n?7:0)+s-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function it(e){return Te(e,{weekStartsOn:1})}function ts(e){const r=ee(e),t=r.getFullYear(),n=Q(e,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);const o=it(n),s=Q(e,0);s.setFullYear(t,0,4),s.setHours(0,0,0,0);const a=it(s);return r.getTime()>=o.getTime()?t+1:r.getTime()>=a.getTime()?t:t-1}function Fn(e){const r=ee(e);return r.setHours(0,0,0,0),r}function zt(e){const r=ee(e),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+e-+t}function du(e,r){const t=Fn(e),n=Fn(r),o=+t-zt(t),s=+n-zt(n);return Math.round((o-s)/au)}function fu(e){const r=ts(e),t=Q(e,0);return t.setFullYear(r,0,4),t.setHours(0,0,0,0),it(t)}function hu(e,r){return Jo(e,r*12)}function pu(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ct(e){if(!pu(e)&&typeof e!="number")return!1;const r=ee(e);return!isNaN(Number(r))}function mu(e){const r=ee(e),t=r.getMonth();return r.setFullYear(r.getFullYear(),t+1,0),r.setHours(23,59,59,999),r}function rs(e){const r=ee(e);return r.setDate(1),r.setHours(0,0,0,0),r}function gu(e){const r=ee(e),t=r.getFullYear();return r.setFullYear(t+1,0,0),r.setHours(23,59,59,999),r}function Br(e){const r=ee(e),t=Q(e,0);return t.setFullYear(r.getFullYear(),0,1),t.setHours(0,0,0,0),t}const vu={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yu=(e,r,t)=>{let n;const o=vu[e];return typeof o=="string"?n=o:r===1?n=o.one:n=o.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function yr(e){return(r={})=>{const t=r.width?String(r.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const bu={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Pu={date:yr({formats:bu,defaultWidth:"full"}),time:yr({formats:wu,defaultWidth:"full"}),dateTime:yr({formats:xu,defaultWidth:"full"})},Eu={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cu=(e,r,t,n)=>Eu[e];function yt(e){return(r,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,i=t!=null&&t.width?String(t.width):a;o=e.formattingValues[i]||e.formattingValues[a]}else{const a=e.defaultWidth,i=t!=null&&t.width?String(t.width):e.defaultWidth;o=e.values[i]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(r):r;return o[s]}}const Ou={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ru={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Tu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ku={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Su={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Mu={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Du=(e,r)=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Au={ordinalNumber:Du,era:yt({values:Ou,defaultWidth:"wide"}),quarter:yt({values:Ru,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yt({values:Tu,defaultWidth:"wide"}),day:yt({values:ku,defaultWidth:"wide"}),dayPeriod:yt({values:Su,defaultWidth:"wide",formattingValues:Mu,defaultFormattingWidth:"wide"})};function bt(e){return(r,t={})=>{const n=t.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=r.match(o);if(!s)return null;const a=s[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?Nu(i,h=>h.test(a)):_u(i,h=>h.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const u=r.slice(a.length);return{value:c,rest:u}}}function _u(e,r){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&r(e[t]))return t}function Nu(e,r){for(let t=0;t<e.length;t++)if(r(e[t]))return t}function Lu(e){return(r,t={})=>{const n=r.match(e.matchPattern);if(!n)return null;const o=n[0],s=r.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=t.valueCallback?t.valueCallback(a):a;const i=r.slice(o.length);return{value:a,rest:i}}}const Fu=/^(\d+)(th|st|nd|rd)?/i,Wu=/\d+/i,ju={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Iu={any:[/^b/i,/^(a|c)/i]},Yu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$u={any:[/1/i,/2/i,/3/i,/4/i]},Hu={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Bu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},zu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},qu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Gu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Xu={ordinalNumber:Lu({matchPattern:Fu,parsePattern:Wu,valueCallback:e=>parseInt(e,10)}),era:bt({matchPatterns:ju,defaultMatchWidth:"wide",parsePatterns:Iu,defaultParseWidth:"any"}),quarter:bt({matchPatterns:Yu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any",valueCallback:e=>e+1}),month:bt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:Bu,defaultParseWidth:"any"}),day:bt({matchPatterns:Vu,defaultMatchWidth:"wide",parsePatterns:zu,defaultParseWidth:"any"}),dayPeriod:bt({matchPatterns:qu,defaultMatchWidth:"any",parsePatterns:Gu,defaultParseWidth:"any"})},ns={code:"en-US",formatDistance:yu,formatLong:Pu,formatRelative:Cu,localize:Au,match:Xu,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Uu(e){const r=ee(e);return du(r,Br(r))+1}function os(e){const r=ee(e),t=+it(r)-+fu(r);return Math.round(t/es)+1}function Vr(e,r){var u,h,p,g;const t=ee(e),n=t.getFullYear(),o=dt(),s=(r==null?void 0:r.firstWeekContainsDate)??((h=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(p=o.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,a=Q(e,0);a.setFullYear(n+1,0,s),a.setHours(0,0,0,0);const i=Te(a,r),l=Q(e,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);const c=Te(l,r);return t.getTime()>=i.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function Qu(e,r){var i,l,c,u;const t=dt(),n=(r==null?void 0:r.firstWeekContainsDate)??((l=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((u=(c=t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Vr(e,r),s=Q(e,0);return s.setFullYear(o,0,n),s.setHours(0,0,0,0),Te(s,r)}function ss(e,r){const t=ee(e),n=+Te(t,r)-+Qu(t,r);return Math.round(n/es)+1}function B(e,r){const t=e<0?"-":"",n=Math.abs(e).toString().padStart(r,"0");return t+n}const De={y(e,r){const t=e.getFullYear(),n=t>0?t:1-t;return B(r==="yy"?n%100:n,r.length)},M(e,r){const t=e.getMonth();return r==="M"?String(t+1):B(t+1,2)},d(e,r){return B(e.getDate(),r.length)},a(e,r){const t=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,r){return B(e.getHours()%12||12,r.length)},H(e,r){return B(e.getHours(),r.length)},m(e,r){return B(e.getMinutes(),r.length)},s(e,r){return B(e.getSeconds(),r.length)},S(e,r){const t=r.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,t-3));return B(o,r.length)}},et={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wn={G:function(e,r,t){const n=e.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(e,r,t){if(r==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return t.ordinalNumber(o,{unit:"year"})}return De.y(e,r)},Y:function(e,r,t,n){const o=Vr(e,n),s=o>0?o:1-o;if(r==="YY"){const a=s%100;return B(a,2)}return r==="Yo"?t.ordinalNumber(s,{unit:"year"}):B(s,r.length)},R:function(e,r){const t=ts(e);return B(t,r.length)},u:function(e,r){const t=e.getFullYear();return B(t,r.length)},Q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return B(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return B(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,r,t){const n=e.getMonth();switch(r){case"M":case"MM":return De.M(e,r);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(e,r,t){const n=e.getMonth();switch(r){case"L":return String(n+1);case"LL":return B(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(e,r,t,n){const o=ss(e,n);return r==="wo"?t.ordinalNumber(o,{unit:"week"}):B(o,r.length)},I:function(e,r,t){const n=os(e);return r==="Io"?t.ordinalNumber(n,{unit:"week"}):B(n,r.length)},d:function(e,r,t){return r==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):De.d(e,r)},D:function(e,r,t){const n=Uu(e);return r==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):B(n,r.length)},E:function(e,r,t){const n=e.getDay();switch(r){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(e,r,t,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return B(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,t,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return B(s,r.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,t){const n=e.getDay(),o=n===0?7:n;switch(r){case"i":return String(o);case"ii":return B(o,r.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(e,r,t){const o=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,t){const n=e.getHours();let o;switch(n===12?o=et.noon:n===0?o=et.midnight:o=n/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,t){const n=e.getHours();let o;switch(n>=17?o=et.evening:n>=12?o=et.afternoon:n>=4?o=et.morning:o=et.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,t){if(r==="ho"){let n=e.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return De.h(e,r)},H:function(e,r,t){return r==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):De.H(e,r)},K:function(e,r,t){const n=e.getHours()%12;return r==="Ko"?t.ordinalNumber(n,{unit:"hour"}):B(n,r.length)},k:function(e,r,t){let n=e.getHours();return n===0&&(n=24),r==="ko"?t.ordinalNumber(n,{unit:"hour"}):B(n,r.length)},m:function(e,r,t){return r==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):De.m(e,r)},s:function(e,r,t){return r==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):De.s(e,r)},S:function(e,r){return De.S(e,r)},X:function(e,r,t){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(r){case"X":return In(n);case"XXXX":case"XX":return Ve(n);case"XXXXX":case"XXX":default:return Ve(n,":")}},x:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"x":return In(n);case"xxxx":case"xx":return Ve(n);case"xxxxx":case"xxx":default:return Ve(n,":")}},O:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+jn(n,":");case"OOOO":default:return"GMT"+Ve(n,":")}},z:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+jn(n,":");case"zzzz":default:return"GMT"+Ve(n,":")}},t:function(e,r,t){const n=Math.trunc(e.getTime()/1e3);return B(n,r.length)},T:function(e,r,t){const n=e.getTime();return B(n,r.length)}};function jn(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),s=n%60;return s===0?t+String(o):t+String(o)+r+B(s,2)}function In(e,r){return e%60===0?(e>0?"-":"+")+B(Math.abs(e)/60,2):Ve(e,r)}function Ve(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),o=B(Math.trunc(n/60),2),s=B(n%60,2);return t+o+r+s}const Yn=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},as=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Ku=(e,r)=>{const t=e.match(/(P+)(p+)?/)||[],n=t[1],o=t[2];if(!o)return Yn(e,r);let s;switch(n){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",Yn(n,r)).replace("{{time}}",as(o,r))},Tr={p:as,P:Ku},Zu=/^D+$/,Ju=/^Y+$/,ed=["D","DD","YY","YYYY"];function is(e){return Zu.test(e)}function cs(e){return Ju.test(e)}function kr(e,r,t){const n=td(e,r,t);if(console.warn(n),ed.includes(e))throw new RangeError(n)}function td(e,r,t){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const rd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,od=/^'([^]*?)'?$/,sd=/''/g,ad=/[a-zA-Z]/;function id(e,r,t){var u,h,p,g;const n=dt(),o=n.locale??ns,s=n.firstWeekContainsDate??((h=(u=n.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??1,a=n.weekStartsOn??((g=(p=n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,i=ee(e);if(!Ct(i))throw new RangeError("Invalid time value");let l=r.match(nd).map(v=>{const m=v[0];if(m==="p"||m==="P"){const y=Tr[m];return y(v,o.formatLong)}return v}).join("").match(rd).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const m=v[0];if(m==="'")return{isToken:!1,value:cd(v)};if(Wn[m])return{isToken:!0,value:v};if(m.match(ad))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:v}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:o};return l.map(v=>{if(!v.isToken)return v.value;const m=v.value;(cs(m)||is(m))&&kr(m,r,String(e));const y=Wn[m[0]];return y(i,m,o.localize,c)}).join("")}function cd(e){const r=e.match(od);return r?r[1].replace(sd,"'"):e}function ld(){return Object.assign({},dt())}function ud(e){let t=ee(e).getDay();return t===0&&(t=7),t}function dd(e,r){const t=r instanceof Date?Q(r,0):new r(0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}const fd=10;class ls{constructor(){T(this,"subPriority",0)}validate(r,t){return!0}}class hd extends ls{constructor(r,t,n,o,s){super(),this.value=r,this.validateValue=t,this.setValue=n,this.priority=o,s&&(this.subPriority=s)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,n){return this.setValue(r,t,this.value,n)}}class pd extends ls{constructor(){super(...arguments);T(this,"priority",fd);T(this,"subPriority",-1)}set(t,n){return n.timestampIsSet?t:Q(t,dd(t,Date))}}class Y{run(r,t,n,o){const s=this.parse(r,t,n,o);return s?{setter:new hd(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(r,t,n){return!0}}class md extends Y{constructor(){super(...arguments);T(this,"priority",140);T(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,o){switch(n){case"G":case"GG":case"GGG":return o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"});case"GGGGG":return o.era(t,{width:"narrow"});case"GGGG":default:return o.era(t,{width:"wide"})||o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"})}}set(t,n,o){return n.era=o,t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}const re={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ve={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ne(e,r){return e&&{value:r(e.value),rest:e.rest}}function K(e,r){const t=r.match(e);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function ye(e,r){const t=r.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const n=t[1]==="+"?1:-1,o=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,a=t[5]?parseInt(t[5],10):0;return{value:n*(o*cu+s*iu+a*lu),rest:r.slice(t[0].length)}}function us(e){return K(re.anyDigitsSigned,e)}function J(e,r){switch(e){case 1:return K(re.singleDigit,r);case 2:return K(re.twoDigits,r);case 3:return K(re.threeDigits,r);case 4:return K(re.fourDigits,r);default:return K(new RegExp("^\\d{1,"+e+"}"),r)}}function qt(e,r){switch(e){case 1:return K(re.singleDigitSigned,r);case 2:return K(re.twoDigitsSigned,r);case 3:return K(re.threeDigitsSigned,r);case 4:return K(re.fourDigitsSigned,r);default:return K(new RegExp("^-?\\d{1,"+e+"}"),r)}}function zr(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ds(e,r){const t=r>0,n=t?r:1-r;let o;if(n<=50)o=e||100;else{const s=n+50,a=Math.trunc(s/100)*100,i=e>=s%100;o=e+a-(i?100:0)}return t?o:1-o}function fs(e){return e%400===0||e%4===0&&e%100!==0}class gd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,o){const s=a=>({year:a,isTwoDigitYear:n==="yy"});switch(n){case"y":return ne(J(4,t),s);case"yo":return ne(o.ordinalNumber(t,{unit:"year"}),s);default:return ne(J(n.length,t),s)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o){const s=t.getFullYear();if(o.isTwoDigitYear){const i=ds(o.year,s);return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}const a=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}class vd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,o){const s=a=>({year:a,isTwoDigitYear:n==="YY"});switch(n){case"Y":return ne(J(4,t),s);case"Yo":return ne(o.ordinalNumber(t,{unit:"year"}),s);default:return ne(J(n.length,t),s)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o,s){const a=Vr(t,s);if(o.isTwoDigitYear){const l=ds(o.year,a);return t.setFullYear(l,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),Te(t,s)}const i=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(i,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),Te(t,s)}}class yd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return qt(n==="R"?4:n.length,t)}set(t,n,o){const s=Q(t,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),it(s)}}class bd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return qt(n==="u"?4:n.length,t)}set(t,n,o){return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class wd extends Y{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"Q":case"QQ":return J(n.length,t);case"Qo":return o.ordinalNumber(t,{unit:"quarter"});case"QQQ":return o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(t,{width:"wide",context:"formatting"})||o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class xd extends Y{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"q":case"qq":return J(n.length,t);case"qo":return o.ordinalNumber(t,{unit:"quarter"});case"qqq":return o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(t,{width:"wide",context:"standalone"})||o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class Pd extends Y{constructor(){super(...arguments);T(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);T(this,"priority",110)}parse(t,n,o){const s=a=>a-1;switch(n){case"M":return ne(K(re.month,t),s);case"MM":return ne(J(2,t),s);case"Mo":return ne(o.ordinalNumber(t,{unit:"month"}),s);case"MMM":return o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(t,{width:"wide",context:"formatting"})||o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}class Ed extends Y{constructor(){super(...arguments);T(this,"priority",110);T(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,o){const s=a=>a-1;switch(n){case"L":return ne(K(re.month,t),s);case"LL":return ne(J(2,t),s);case"Lo":return ne(o.ordinalNumber(t,{unit:"month"}),s);case"LLL":return o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(t,{width:"wide",context:"standalone"})||o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}function Cd(e,r,t){const n=ee(e),o=ss(n,t)-r;return n.setDate(n.getDate()-o*7),n}class Od extends Y{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,o){switch(n){case"w":return K(re.week,t);case"wo":return o.ordinalNumber(t,{unit:"week"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o,s){return Te(Cd(t,o,s),s)}}function Rd(e,r){const t=ee(e),n=os(t)-r;return t.setDate(t.getDate()-n*7),t}class Td extends Y{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,o){switch(n){case"I":return K(re.week,t);case"Io":return o.ordinalNumber(t,{unit:"week"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o){return it(Rd(t,o))}}const kd=[31,28,31,30,31,30,31,31,30,31,30,31],Sd=[31,29,31,30,31,30,31,31,30,31,30,31];class Md extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"subPriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"d":return K(re.date,t);case"do":return o.ordinalNumber(t,{unit:"date"});default:return J(n.length,t)}}validate(t,n){const o=t.getFullYear(),s=fs(o),a=t.getMonth();return s?n>=1&&n<=Sd[a]:n>=1&&n<=kd[a]}set(t,n,o){return t.setDate(o),t.setHours(0,0,0,0),t}}class Dd extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"subpriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,o){switch(n){case"D":case"DD":return K(re.dayOfYear,t);case"Do":return o.ordinalNumber(t,{unit:"date"});default:return J(n.length,t)}}validate(t,n){const o=t.getFullYear();return fs(o)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,o){return t.setMonth(0,o),t.setHours(0,0,0,0),t}}function qr(e,r,t){var h,p,g,v;const n=dt(),o=(t==null?void 0:t.weekStartsOn)??((p=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??n.weekStartsOn??((v=(g=n.locale)==null?void 0:g.options)==null?void 0:v.weekStartsOn)??0,s=ee(e),a=s.getDay(),l=(r%7+7)%7,c=7-o,u=r<0||r>6?r-(a+c)%7:(l+c)%7-(a+c)%7;return Hr(s,u)}class Ad extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"E":case"EE":case"EEE":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,s){return t=qr(t,o,s),t.setHours(0,0,0,0),t}}class _d extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,o,s){const a=i=>{const l=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+l};switch(n){case"e":case"ee":return ne(J(n.length,t),a);case"eo":return ne(o.ordinalNumber(t,{unit:"day"}),a);case"eee":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeeee":return o.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,s){return t=qr(t,o,s),t.setHours(0,0,0,0),t}}class Nd extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,o,s){const a=i=>{const l=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+l};switch(n){case"c":case"cc":return ne(J(n.length,t),a);case"co":return ne(o.ordinalNumber(t,{unit:"day"}),a);case"ccc":return o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"ccccc":return o.day(t,{width:"narrow",context:"standalone"});case"cccccc":return o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(t,{width:"wide",context:"standalone"})||o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,s){return t=qr(t,o,s),t.setHours(0,0,0,0),t}}function Ld(e,r){const t=ee(e),n=ud(t),o=r-n;return Hr(t,o)}class Fd extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,o){const s=a=>a===0?7:a;switch(n){case"i":case"ii":return J(n.length,t);case"io":return o.ordinalNumber(t,{unit:"day"});case"iii":return ne(o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return ne(o.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ne(o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ne(o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),s)}}validate(t,n){return n>=1&&n<=7}set(t,n,o){return t=Ld(t,o),t.setHours(0,0,0,0),t}}class Wd extends Y{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,o){switch(n){case"a":case"aa":case"aaa":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(zr(o),0,0,0),t}}class jd extends Y{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,o){switch(n){case"b":case"bb":case"bbb":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(zr(o),0,0,0),t}}class Id extends Y{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,o){switch(n){case"B":case"BB":case"BBB":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(zr(o),0,0,0),t}}class Yd extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,o){switch(n){case"h":return K(re.hour12h,t);case"ho":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,o){const s=t.getHours()>=12;return s&&o<12?t.setHours(o+12,0,0,0):!s&&o===12?t.setHours(0,0,0,0):t.setHours(o,0,0,0),t}}class $d extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,o){switch(n){case"H":return K(re.hour23h,t);case"Ho":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,o){return t.setHours(o,0,0,0),t}}class Hd extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,o){switch(n){case"K":return K(re.hour11h,t);case"Ko":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.getHours()>=12&&o<12?t.setHours(o+12,0,0,0):t.setHours(o,0,0,0),t}}class Bd extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,o){switch(n){case"k":return K(re.hour24h,t);case"ko":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,o){const s=o<=24?o%24:o;return t.setHours(s,0,0,0),t}}class Vd extends Y{constructor(){super(...arguments);T(this,"priority",60);T(this,"incompatibleTokens",["t","T"])}parse(t,n,o){switch(n){case"m":return K(re.minute,t);case"mo":return o.ordinalNumber(t,{unit:"minute"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setMinutes(o,0,0),t}}class zd extends Y{constructor(){super(...arguments);T(this,"priority",50);T(this,"incompatibleTokens",["t","T"])}parse(t,n,o){switch(n){case"s":return K(re.second,t);case"so":return o.ordinalNumber(t,{unit:"second"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setSeconds(o,0),t}}class qd extends Y{constructor(){super(...arguments);T(this,"priority",30);T(this,"incompatibleTokens",["t","T"])}parse(t,n){const o=s=>Math.trunc(s*Math.pow(10,-n.length+3));return ne(J(n.length,t),o)}set(t,n,o){return t.setMilliseconds(o),t}}class Gd extends Y{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return ye(ve.basicOptionalMinutes,t);case"XX":return ye(ve.basic,t);case"XXXX":return ye(ve.basicOptionalSeconds,t);case"XXXXX":return ye(ve.extendedOptionalSeconds,t);case"XXX":default:return ye(ve.extended,t)}}set(t,n,o){return n.timestampIsSet?t:Q(t,t.getTime()-zt(t)-o)}}class Xd extends Y{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return ye(ve.basicOptionalMinutes,t);case"xx":return ye(ve.basic,t);case"xxxx":return ye(ve.basicOptionalSeconds,t);case"xxxxx":return ye(ve.extendedOptionalSeconds,t);case"xxx":default:return ye(ve.extended,t)}}set(t,n,o){return n.timestampIsSet?t:Q(t,t.getTime()-zt(t)-o)}}class Ud extends Y{constructor(){super(...arguments);T(this,"priority",40);T(this,"incompatibleTokens","*")}parse(t){return us(t)}set(t,n,o){return[Q(t,o*1e3),{timestampIsSet:!0}]}}class Qd extends Y{constructor(){super(...arguments);T(this,"priority",20);T(this,"incompatibleTokens","*")}parse(t){return us(t)}set(t,n,o){return[Q(t,o),{timestampIsSet:!0}]}}const Kd={G:new md,y:new gd,Y:new vd,R:new yd,u:new bd,Q:new wd,q:new xd,M:new Pd,L:new Ed,w:new Od,I:new Td,d:new Md,D:new Dd,E:new Ad,e:new _d,c:new Nd,i:new Fd,a:new Wd,b:new jd,B:new Id,h:new Yd,H:new $d,K:new Hd,k:new Bd,m:new Vd,s:new zd,S:new qd,X:new Gd,x:new Xd,t:new Ud,T:new Qd},Zd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ef=/^'([^]*?)'?$/,tf=/''/g,rf=/\S/,nf=/[a-zA-Z]/;function of(e,r,t,n){var m,y,b,w;const o=ld(),s=o.locale??ns,a=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,i=o.weekStartsOn??((w=(b=o.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??0,l={firstWeekContainsDate:a,weekStartsOn:i,locale:s},c=[new pd],u=r.match(Jd).map(x=>{const P=x[0];if(P in Tr){const O=Tr[P];return O(x,s.formatLong)}return x}).join("").match(Zd),h=[];for(let x of u){cs(x)&&kr(x,r,e),is(x)&&kr(x,r,e);const P=x[0],O=Kd[P];if(O){const{incompatibleTokens:S}=O;if(Array.isArray(S)){const W=h.find(j=>S.includes(j.token)||j.token===P);if(W)throw new RangeError(`The format string mustn't contain \`${W.fullToken}\` and \`${x}\` at the same time`)}else if(O.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${x}\` and any other token at the same time`);h.push({token:P,fullToken:x});const k=O.run(e,x,s.match,l);if(!k)return Q(t,NaN);c.push(k.setter),e=k.rest}else{if(P.match(nf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");if(x==="''"?x="'":P==="'"&&(x=sf(x)),e.indexOf(x)===0)e=e.slice(x.length);else return Q(t,NaN)}}if(e.length>0&&rf.test(e))return Q(t,NaN);const p=c.map(x=>x.priority).sort((x,P)=>P-x).filter((x,P,O)=>O.indexOf(x)===P).map(x=>c.filter(P=>P.priority===x).sort((P,O)=>O.subPriority-P.subPriority)).map(x=>x[0]);let g=ee(t);if(isNaN(g.getTime()))return Q(t,NaN);const v={};for(const x of p){if(!x.validate(g,l))return Q(t,NaN);const P=x.set(g,v,l);Array.isArray(P)?(g=P[0],Object.assign(v,P[1])):g=P}return Q(t,g)}function sf(e){return e.match(ef)[1].replace(tf,"'")}function Sr(e,r){return Hr(e,-r)}function af(e,r){return Jo(e,-1)}function cf(e,r){return hu(e,-1)}const hs=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:e,endDate:e}},ps=()=>{const e=Sr(new Date,1);return e.setHours(0,0,0,0),{startDate:e,endDate:e}},ms=()=>{const e=new Date;e.setHours(0,0,0,0);const r=Sr(e,7),t=Sr(e,1);return{startDate:r,endDate:t}},gs=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:Te(e,{weekStartsOn:1}),endDate:e}},vs=()=>{const e=af(new Date),r=rs(e),t=mu(e);return{startDate:r,endDate:t}},ys=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:rs(e),endDate:e}},bs=()=>{const e=cf(new Date),r=Br(e),t=gu(e);return{startDate:r,endDate:t}},ws=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:Br(e),endDate:e}},wt=e=>!e||!Ct(e)?"":id(e,"dd/MM/yyyy"),lf=e=>{const r=of(e,"dd/MM/yyyy",new Date);return Ct(r)?r:null},xs=(e,r,t)=>{if(!e||!r||!t||r<1||r>12||e<1||e>31||t<1900||t>2100)return!1;const n=new Date(t,r-1,e);return Ct(n)&&n.getDate()===e&&n.getMonth()===r-1&&n.getFullYear()===t},uf=(e,r,t)=>{if(!xs(e,r,t))return null;const n=new Date(t,r-1,e);return n.setHours(0,0,0,0),n},df=e=>!e||!Ct(e)?{day:0,month:0,year:0}:{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()},$n=[{label:"ມື້ນີ້",value:"today",fn:hs},{label:"ມື້ວານ",value:"yesterday",fn:ps},{label:"ອາທິດກ່ອນ",value:"lastWeek",fn:ms},{label:"ອາທິດນີ້",value:"thisWeek",fn:gs},{label:"ເດືອນກ່ອນ",value:"lastMonth",fn:vs},{label:"ເດືອນນີ້",value:"thisMonth",fn:ys},{label:"ປີກ່ອນ",value:"lastYear",fn:bs},{label:"ປີນີ້",value:"thisYear",fn:ws},{label:"ລ້າງຂໍ້ມູນ",value:"clear",fn:()=>({startDate:null,endDate:null})}],ff=({onPresetSelect:e,startDate:r,endDate:t,className:n})=>{const o=(a,i)=>!a||!i?!1:a.getFullYear()===i.getFullYear()&&a.getMonth()===i.getMonth()&&a.getDate()===i.getDate(),s=a=>{const i=a.fn();return o(r,i.startDate)&&o(t,i.endDate)};return C.jsxs("div",{className:ae("space-y-2",n),children:[C.jsx("label",{className:"text-sm font-bold",children:"ເລືອກໄລຍະເວລາ (Quick Select)"}),C.jsx("div",{className:"grid grid-cols-3 gap-2",children:$n.map((a,i)=>{const l=s(a),c=i===$n.length-1;return C.jsxs($r,{variant:c?"destructive":l?"default":"outline",size:"sm",onClick:()=>e(a.fn()),className:ae("flex items-center justify-center gap-3 rounded-xl w-full h-12 font-bold text-md transition-transform duration-200 ease-in-out hover:scale-105",l&&!c&&"bg-primary/50 text-primary-foreground hover:bg-primary/60",c&&"bg-red-500 text-white hover:bg-red-600"),children:[c?C.jsx(Js,{className:"h-4 w-4 text-white"}):l?C.jsx(Zs,{className:ae("h-4 w-4","text-primary-foreground")}):C.jsx(Ks,{className:ae("h-4 w-4","text-gray-300")}),a.label]},a.value)})})]})},hf=({startDate:e,endDate:r,onDateChange:t,className:n,buttonClassName:o,dropdownClassName:s,disabled:a=!1,placeholder:i="ເລືອກວັນທີ"})=>{const[l,c]=de.useState(!1),[u,h]=de.useState(e||null),[p,g]=de.useState(r||null);de.useEffect(()=>{e&&h(e)},[e]),de.useEffect(()=>{r&&g(r)},[r]);const v=w=>{h(w),t&&t(w,p),c(!1)},m=w=>{g(w),t&&t(u,w),c(!1)},y=w=>{h(w.startDate),g(w.endDate),t&&t(w.startDate,w.endDate),c(!1)},b=()=>!u&&!p?i:u&&p?`${wt(u)} - ${wt(p)}`:u?wt(u):p?wt(p):i;return C.jsx("div",{className:ae("relative",n),children:C.jsxs(Hl,{open:l,onOpenChange:c,children:[C.jsx(Bl,{asChild:!0,children:C.jsxs($r,{variant:"outline",disabled:a,className:ae("w-full justify-start text-left font-normal",!u&&!p&&"text-muted-foreground",o),children:[C.jsx(Qs,{className:"mr-2 h-4 w-4"}),b()]})}),C.jsx(Uo,{className:ae("w-auto rounded-2xl p-4 border-0",s),align:"start",children:C.jsx(Ko,{className:"border-0 shadow-none",children:C.jsxs(Zo,{className:"p-4 space-y-4",children:[C.jsx(su,{startDate:u,endDate:p,onStartDateChange:v,onEndDateChange:m}),C.jsx(ff,{onPresetSelect:y,startDate:u,endDate:p})]})})})]})})};exports.LLLDatePicker=hf;exports.createDate=uf;exports.extractDateParts=df;exports.formatDate=wt;exports.getLastMonth=vs;exports.getLastWeek=ms;exports.getLastYear=bs;exports.getThisMonth=ys;exports.getThisWeek=gs;exports.getThisYear=ws;exports.getToday=hs;exports.getYesterday=ps;exports.isValidDate=xs;exports.parseDate=lf;
|
|
100
|
+
`)},qc=0,Je=[];function Gc(e){var r=h.useRef([]),t=h.useRef([0,0]),n=h.useRef(),o=h.useState(qc++)[0],s=h.useState(Oo)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=mc([e.lockRef.current],(e.shards||[]).map(Dn),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=h.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=Ft(m),P=t.current,b="deltaX"in m?m.deltaX:P[0]-w[0],x="deltaY"in m?m.deltaY:P[1]-w[1],C,S=m.target,k=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in m&&k==="h"&&S.type==="range")return!1;var W=window.getSelection(),j=W&&W.anchorNode,$=j?j===S||j.contains(S):!1;if($)return!1;var q=Sn(k,S);if(!q)return!0;if(q?C=k:(C=k==="v"?"h":"v",q=Sn(k,S)),!q)return!1;if(!n.current&&"changedTouches"in m&&(b||x)&&(n.current=C),!C)return!0;var M=n.current||C;return Bc(M,y,m,M==="h"?b:x)},[]),l=h.useCallback(function(m){var y=m;if(!(!Je.length||Je[Je.length-1]!==s)){var w="deltaY"in y?Mn(y):Ft(y),P=r.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&Vc(C.delta,w)})[0];if(P&&P.should){y.cancelable&&y.preventDefault();return}if(!P){var b=(a.current.shards||[]).map(Dn).filter(Boolean).filter(function(C){return C.contains(y.target)}),x=b.length>0?i(y,b[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),c=h.useCallback(function(m,y,w,P){var b={name:m,delta:y,target:w,should:P,shadowParent:Xc(w)};r.current.push(b),setTimeout(function(){r.current=r.current.filter(function(x){return x!==b})},1)},[]),u=h.useCallback(function(m){t.current=Ft(m),n.current=void 0},[]),f=h.useCallback(function(m){c(m.type,Mn(m),m.target,i(m,e.lockRef.current))},[]),p=h.useCallback(function(m){c(m.type,Ft(m),m.target,i(m,e.lockRef.current))},[]);h.useEffect(function(){return Je.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ze),document.addEventListener("touchmove",l,Ze),document.addEventListener("touchstart",u,Ze),function(){Je=Je.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Ze),document.removeEventListener("touchmove",l,Ze),document.removeEventListener("touchstart",u,Ze)}},[]);var g=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(s,{styles:zc(o)}):null,g?h.createElement(Fc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Xc(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const Uc=Ec(Co,Gc);var So=h.forwardRef(function(e,r){return h.createElement(Jt,ge({},e,{ref:r,sideCar:Uc}))});So.classNames=Jt.classNames;var er="Popover",[Mo]=Vn(er,[lo]),Et=lo(),[Qc,je]=Mo(er),Do=e=>{const{__scopePopover:r,children:t,open:n,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,i=Et(r),l=h.useRef(null),[c,u]=h.useState(!1),[f,p]=ic({prop:n,defaultProp:o??!1,onChange:s,caller:er});return O.jsx(Gi,{...i,children:O.jsx(Qc,{scope:r,contentId:Ra(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:h.useCallback(()=>p(g=>!g),[p]),hasCustomAnchor:c,onCustomAnchorAdd:h.useCallback(()=>u(!0),[]),onCustomAnchorRemove:h.useCallback(()=>u(!1),[]),modal:a,children:t})})};Do.displayName=er;var Ao="PopoverAnchor",Kc=h.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=je(Ao,t),s=Et(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return h.useEffect(()=>(a(),()=>i()),[a,i]),O.jsx(wo,{...s,...n,ref:r})});Kc.displayName=Ao;var _o="PopoverTrigger",No=h.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=je(_o,t),s=Et(t),a=We(r,o.triggerRef),i=O.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Io(o.open),...n,ref:a,onClick:_e(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:O.jsx(wo,{asChild:!0,...s,children:i})});No.displayName=_o;var Ir="PopoverPortal",[Zc,Jc]=Mo(Ir,{forceMount:void 0}),Lo=e=>{const{__scopePopover:r,forceMount:t,children:n,container:o}=e,s=je(Ir,r);return O.jsx(Zc,{scope:r,forceMount:t,children:O.jsx(jr,{present:t||s.open,children:O.jsx(bo,{asChild:!0,container:o,children:n})})})};Lo.displayName=Ir;var at="PopoverContent",Fo=h.forwardRef((e,r)=>{const t=Jc(at,e.__scopePopover),{forceMount:n=t.forceMount,...o}=e,s=je(at,e.__scopePopover);return O.jsx(jr,{present:n||s.open,children:s.modal?O.jsx(tl,{...o,ref:r}):O.jsx(rl,{...o,ref:r})})});Fo.displayName=at;var el=ec("PopoverContent.RemoveScroll"),tl=h.forwardRef((e,r)=>{const t=je(at,e.__scopePopover),n=h.useRef(null),o=We(r,n),s=h.useRef(!1);return h.useEffect(()=>{const a=n.current;if(a)return hc(a)},[]),O.jsx(So,{as:el,allowPinchZoom:!0,children:O.jsx(Wo,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_e(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),s.current||(i=t.triggerRef.current)==null||i.focus()}),onPointerDownOutside:_e(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,c=i.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:_e(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),rl=h.forwardRef((e,r)=>{const t=je(at,e.__scopePopover),n=h.useRef(!1),o=h.useRef(!1);return O.jsx(Wo,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(i=t.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((c=t.triggerRef.current)==null?void 0:c.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Wo=h.forwardRef((e,r)=>{const{__scopePopover:t,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=e,p=je(at,t),g=Et(t);return ga(),O.jsx(Xn,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:O.jsx(qn,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:O.jsx(Xi,{"data-state":Io(p.open),role:"dialog",id:p.contentId,...g,...f,ref:r,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),jo="PopoverClose",nl=h.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=je(jo,t);return O.jsx(ke.button,{type:"button",...n,ref:r,onClick:_e(e.onClick,()=>o.onOpenChange(!1))})});nl.displayName=jo;var ol="PopoverArrow",sl=h.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=Et(t);return O.jsx(Ui,{...o,...n,ref:r})});sl.displayName=ol;function Io(e){return e?"open":"closed"}var al=Do,il=No,cl=Lo,Yo=Fo;function $o(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(t=$o(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ho(){for(var e,r,t=0,n="",o=arguments.length;t<o;t++)(e=arguments[t])&&(r=$o(e))&&(n&&(n+=" "),n+=r);return n}const Yr="-",ll=e=>{const r=dl(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(Yr);return i[0]===""&&i.length!==1&&i.shift(),Bo(i,r)||ul(a)},getConflictingClassGroupIds:(a,i)=>{const l=t[a]||[];return i&&n[a]?[...l,...n[a]]:l}}},Bo=(e,r)=>{var a;if(e.length===0)return r.classGroupId;const t=e[0],n=r.nextPart.get(t),o=n?Bo(e.slice(1),n):void 0;if(o)return o;if(r.validators.length===0)return;const s=e.join(Yr);return(a=r.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},An=/^\[(.+)\]$/,ul=e=>{if(An.test(e)){const r=An.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},dl=e=>{const{theme:r,prefix:t}=e,n={nextPart:new Map,validators:[]};return hl(Object.entries(e.classGroups),t).forEach(([s,a])=>{Or(a,n,s,r)}),n},Or=(e,r,t,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?r:_n(r,o);s.classGroupId=t;return}if(typeof o=="function"){if(fl(o)){Or(o(n),r,t,n);return}r.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,a])=>{Or(a,_n(r,s),t,n)})})},_n=(e,r)=>{let t=e;return r.split(Yr).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},fl=e=>e.isThemeGetter,hl=(e,r)=>r?e.map(([t,n])=>{const o=n.map(s=>typeof s=="string"?r+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[r+a,i])):s);return[t,o]}):e,ml=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,n=new Map;const o=(s,a)=>{t.set(s,a),r++,r>e&&(r=0,n=t,t=new Map)};return{get(s){let a=t.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){t.has(s)?t.set(s,a):o(s,a)}}},Vo="!",pl=e=>{const{separator:r,experimentalParseClassName:t}=e,n=r.length===1,o=r[0],s=r.length,a=i=>{const l=[];let c=0,u=0,f;for(let y=0;y<i.length;y++){let w=i[y];if(c===0){if(w===o&&(n||i.slice(y,y+s)===r)){l.push(i.slice(u,y)),u=y+s;continue}if(w==="/"){f=y;continue}}w==="["?c++:w==="]"&&c--}const p=l.length===0?i:i.substring(u),g=p.startsWith(Vo),v=g?p.substring(1):p,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:m}};return t?i=>t({className:i,parseClassName:a}):a},gl=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(n=>{n[0]==="["?(r.push(...t.sort(),n),t=[]):t.push(n)}),r.push(...t.sort()),r},vl=e=>({cache:ml(e.cacheSize),parseClassName:pl(e),...ll(e)}),yl=/\s+/,wl=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:o}=r,s=[],a=e.trim().split(yl);let i="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:u,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:g}=t(c);let v=!!g,m=n(v?p.substring(0,g):p);if(!m){if(!v){i=c+(i.length>0?" "+i:i);continue}if(m=n(p),!m){i=c+(i.length>0?" "+i:i);continue}v=!1}const y=gl(u).join(":"),w=f?y+Vo:y,P=w+m;if(s.includes(P))continue;s.push(P);const b=o(m,v);for(let x=0;x<b.length;++x){const C=b[x];s.push(w+C)}i=c+(i.length>0?" "+i:i)}return i};function bl(){let e=0,r,t,n="";for(;e<arguments.length;)(r=arguments[e++])&&(t=zo(r))&&(n&&(n+=" "),n+=t);return n}const zo=e=>{if(typeof e=="string")return e;let r,t="";for(let n=0;n<e.length;n++)e[n]&&(r=zo(e[n]))&&(t&&(t+=" "),t+=r);return t};function xl(e,...r){let t,n,o,s=a;function a(l){const c=r.reduce((u,f)=>f(u),e());return t=vl(c),n=t.cache.get,o=t.cache.set,s=i,i(l)}function i(l){const c=n(l);if(c)return c;const u=wl(l,t);return o(l,u),u}return function(){return s(bl.apply(null,arguments))}}const U=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},qo=/^\[(?:([a-z-]+):)?(.+)\]$/i,Pl=/^\d+\/\d+$/,El=new Set(["px","full","screen"]),Cl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ol=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Rl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ce=e=>nt(e)||El.has(e)||Pl.test(e),Se=e=>ut(e,"length",Fl),nt=e=>!!e&&!Number.isNaN(Number(e)),vr=e=>ut(e,"number",nt),gt=e=>!!e&&Number.isInteger(Number(e)),Sl=e=>e.endsWith("%")&&nt(e.slice(0,-1)),_=e=>qo.test(e),Me=e=>Cl.test(e),Ml=new Set(["length","size","percentage"]),Dl=e=>ut(e,Ml,Go),Al=e=>ut(e,"position",Go),_l=new Set(["image","url"]),Nl=e=>ut(e,_l,jl),Ll=e=>ut(e,"",Wl),vt=()=>!0,ut=(e,r,t)=>{const n=qo.exec(e);return n?n[1]?typeof r=="string"?n[1]===r:r.has(n[1]):t(n[2]):!1},Fl=e=>Ol.test(e)&&!Rl.test(e),Go=()=>!1,Wl=e=>Tl.test(e),jl=e=>kl.test(e),Il=()=>{const e=U("colors"),r=U("spacing"),t=U("blur"),n=U("brightness"),o=U("borderColor"),s=U("borderRadius"),a=U("borderSpacing"),i=U("borderWidth"),l=U("contrast"),c=U("grayscale"),u=U("hueRotate"),f=U("invert"),p=U("gap"),g=U("gradientColorStops"),v=U("gradientColorStopPositions"),m=U("inset"),y=U("margin"),w=U("opacity"),P=U("padding"),b=U("saturate"),x=U("scale"),C=U("sepia"),S=U("skew"),k=U("space"),W=U("translate"),j=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",_,r],M=()=>[_,r],I=()=>["",Ce,Se],L=()=>["auto",nt,_],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",_],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[nt,_];return{cacheSize:500,separator:":",theme:{colors:[vt],spacing:[Ce,Se],blur:["none","",Me,_],brightness:se(),borderColor:[e],borderRadius:["none","","full",Me,_],borderSpacing:M(),borderWidth:I(),contrast:se(),grayscale:X(),hueRotate:se(),invert:X(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Sl,Se],inset:q(),margin:q(),opacity:se(),padding:M(),saturate:se(),scale:se(),sepia:X(),skew:se(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",_]}],container:["container"],columns:[{columns:[Me]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),_]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gt,_]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",gt,_]}],"grid-cols":[{"grid-cols":[vt]}],"col-start-end":[{col:["auto",{span:["full",gt,_]},_]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[vt]}],"row-start-end":[{row:["auto",{span:[gt,_]},_]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",_,r]}],"min-w":[{"min-w":[_,r,"min","max","fit"]}],"max-w":[{"max-w":[_,r,"none","full","min","max","fit","prose",{screen:[Me]},Me]}],h:[{h:[_,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Me,Se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vr]}],"font-family":[{font:[vt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",_]}],"line-clamp":[{"line-clamp":["none",nt,vr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ce,_]}],"list-image":[{"list-image":["none",_]}],"list-style-type":[{list:["none","disc","decimal",_]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ce,Se]}],"underline-offset":[{"underline-offset":["auto",Ce,_]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),Al]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[Ce,_]}],"outline-w":[{outline:[Ce,Se]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ce,Se]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Me,Ll]}],"shadow-color":[{shadow:[vt]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Me,_]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_]}],duration:[{duration:se()}],ease:[{ease:["linear","in","out","in-out",_]}],delay:[{delay:se()}],animate:[{animate:["none","spin","ping","pulse","bounce",_]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[gt,_]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ce,Se,vr]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Yl=xl(Il);function ae(...e){return Yl(Ho(e))}const $l=al,Hl=il,Xo=h.forwardRef(({className:e,align:r="center",sideOffset:t=4,...n},o)=>O.jsx(cl,{children:O.jsx(Yo,{ref:o,align:r,sideOffset:t,className:ae("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Xo.displayName=Yo.displayName;var Bl=Symbol.for("react.lazy"),Vt=h[" use ".trim().toString()];function Vl(e){return typeof e=="object"&&e!==null&&"then"in e}function Uo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Bl&&"_payload"in e&&Vl(e._payload)}function zl(e){const r=Gl(e),t=h.forwardRef((n,o)=>{let{children:s,...a}=n;Uo(s)&&typeof Vt=="function"&&(s=Vt(s._payload));const i=h.Children.toArray(s),l=i.find(Ul);if(l){const c=l.props.children,u=i.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return O.jsx(r,{...a,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,u):null})}return O.jsx(r,{...a,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}var ql=zl("Slot");function Gl(e){const r=h.forwardRef((t,n)=>{let{children:o,...s}=t;if(Uo(o)&&typeof Vt=="function"&&(o=Vt(o._payload)),h.isValidElement(o)){const a=Kl(o),i=Ql(s,o.props);return o.type!==h.Fragment&&(i.ref=n?Xt(n,a):a),h.cloneElement(o,i)}return h.Children.count(o)>1?h.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Xl=Symbol("radix.slottable");function Ul(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xl}function Ql(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function Kl(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const Nn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ln=Ho,Zl=(e,r)=>t=>{var n;if((r==null?void 0:r.variants)==null)return Ln(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:s}=r,a=Object.keys(o).map(c=>{const u=t==null?void 0:t[c],f=s==null?void 0:s[c];if(u===null)return null;const p=Nn(u)||Nn(f);return o[c][p]}),i=t&&Object.entries(t).reduce((c,u)=>{let[f,p]=u;return p===void 0||(c[f]=p),c},{}),l=r==null||(n=r.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:f,className:p,...g}=u;return Object.entries(g).every(v=>{let[m,y]=v;return Array.isArray(y)?y.includes({...s,...i}[m]):{...s,...i}[m]===y})?[...c,f,p]:c},[]);return Ln(e,a,l,t==null?void 0:t.class,t==null?void 0:t.className)},Jl=Zl("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),$r=h.forwardRef(({className:e,variant:r,size:t,asChild:n=!1,...o},s)=>{const a=n?ql:"button";return O.jsx(a,{className:ae(Jl({variant:r,size:t,className:e})),ref:s,...o})});$r.displayName="Button";const Qo=h.forwardRef(({className:e,...r},t)=>O.jsx("div",{ref:t,className:ae("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r}));Qo.displayName="Card";const eu=h.forwardRef(({className:e,...r},t)=>O.jsx("div",{ref:t,className:ae("flex flex-col space-y-1.5 p-6",e),...r}));eu.displayName="CardHeader";const tu=h.forwardRef(({className:e,...r},t)=>O.jsx("h3",{ref:t,className:ae("text-2xl font-semibold leading-none tracking-tight",e),...r}));tu.displayName="CardTitle";const ru=h.forwardRef(({className:e,...r},t)=>O.jsx("p",{ref:t,className:ae("text-sm text-muted-foreground",e),...r}));ru.displayName="CardDescription";const Ko=h.forwardRef(({className:e,...r},t)=>O.jsx("div",{ref:t,className:ae("p-6 pt-0",e),...r}));Ko.displayName="CardContent";const nu=h.forwardRef(({className:e,...r},t)=>O.jsx("div",{ref:t,className:ae("flex items-center p-6 pt-0",e),...r}));nu.displayName="CardFooter";const Rr=h.forwardRef(({className:e,type:r,...t},n)=>O.jsx("input",{type:r,className:ae("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Rr.displayName="Input";const ou=({startDate:e,endDate:r,onStartDateChange:t,onEndDateChange:n,className:o,labelInputs:s})=>{const a=u=>{if(!u)return"";const f=u.getFullYear(),p=String(u.getMonth()+1).padStart(2,"0"),g=String(u.getDate()).padStart(2,"0");return`${f}-${p}-${g}`},i=u=>{if(!u)return null;const f=new Date(u);return isNaN(f.getTime())?null:f},l=u=>{const f=i(u.target.value);t(f)},c=u=>{const f=i(u.target.value);n(f)};return O.jsxs("div",{className:ae("flex justify-center items-center gap-4",o),children:[O.jsxs("div",{className:"w-full",children:[O.jsx("label",{className:"text-sm font-medium",children:(s==null?void 0:s.startLabel)||"ວັນທີເລີ່ມຕົ້ນ"}),O.jsx(Rr,{type:"date",value:a(e),onChange:l,className:"w-full [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-inner-spin-button]:hidden [&::-webkit-clear-button]:hidden cursor-pointer hover:border-primary/50 focus:border-transparent focus:ring-1 focus-visible:ring-1 focus-visible:ring-offset-0 transition-colors"})]}),O.jsxs("div",{className:"w-full",children:[O.jsx("label",{className:"text-sm font-medium",children:(s==null?void 0:s.endLabel)||"ວັນທີສິ້ນສຸດ"}),O.jsx(Rr,{type:"date",value:a(r),onChange:c,className:"w-full [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-inner-spin-button]:hidden [&::-webkit-clear-button]:hidden cursor-pointer hover:border-primary/50 focus:border-transparent focus:ring-1 focus-visible:ring-1 focus-visible:ring-offset-0 transition-colors"})]})]})};function ee(e){const r=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&r==="[object Date]"?new e.constructor(+e):typeof e=="number"||r==="[object Number]"||typeof e=="string"||r==="[object String]"?new Date(e):new Date(NaN)}function Q(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}function Hr(e,r){const t=ee(e);return isNaN(r)?Q(e,NaN):(r&&t.setDate(t.getDate()+r),t)}function Zo(e,r){const t=ee(e);if(isNaN(r))return Q(e,NaN);if(!r)return t;const n=t.getDate(),o=Q(e,t.getTime());o.setMonth(t.getMonth()+r+1,0);const s=o.getDate();return n>=s?o:(t.setFullYear(o.getFullYear(),o.getMonth(),n),t)}const Jo=6048e5,su=864e5,au=6e4,iu=36e5,cu=1e3;let lu={};function dt(){return lu}function Te(e,r){var i,l,c,u;const t=dt(),n=(r==null?void 0:r.weekStartsOn)??((l=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((u=(c=t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=ee(e),s=o.getDay(),a=(s<n?7:0)+s-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function it(e){return Te(e,{weekStartsOn:1})}function es(e){const r=ee(e),t=r.getFullYear(),n=Q(e,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);const o=it(n),s=Q(e,0);s.setFullYear(t,0,4),s.setHours(0,0,0,0);const a=it(s);return r.getTime()>=o.getTime()?t+1:r.getTime()>=a.getTime()?t:t-1}function Fn(e){const r=ee(e);return r.setHours(0,0,0,0),r}function zt(e){const r=ee(e),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+e-+t}function uu(e,r){const t=Fn(e),n=Fn(r),o=+t-zt(t),s=+n-zt(n);return Math.round((o-s)/su)}function du(e){const r=es(e),t=Q(e,0);return t.setFullYear(r,0,4),t.setHours(0,0,0,0),it(t)}function fu(e,r){return Zo(e,r*12)}function hu(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ct(e){if(!hu(e)&&typeof e!="number")return!1;const r=ee(e);return!isNaN(Number(r))}function mu(e){const r=ee(e),t=r.getMonth();return r.setFullYear(r.getFullYear(),t+1,0),r.setHours(23,59,59,999),r}function ts(e){const r=ee(e);return r.setDate(1),r.setHours(0,0,0,0),r}function pu(e){const r=ee(e),t=r.getFullYear();return r.setFullYear(t+1,0,0),r.setHours(23,59,59,999),r}function Br(e){const r=ee(e),t=Q(e,0);return t.setFullYear(r.getFullYear(),0,1),t.setHours(0,0,0,0),t}const gu={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vu=(e,r,t)=>{let n;const o=gu[e];return typeof o=="string"?n=o:r===1?n=o.one:n=o.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function yr(e){return(r={})=>{const t=r.width?String(r.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const yu={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},bu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xu={date:yr({formats:yu,defaultWidth:"full"}),time:yr({formats:wu,defaultWidth:"full"}),dateTime:yr({formats:bu,defaultWidth:"full"})},Pu={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Eu=(e,r,t,n)=>Pu[e];function yt(e){return(r,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,i=t!=null&&t.width?String(t.width):a;o=e.formattingValues[i]||e.formattingValues[a]}else{const a=e.defaultWidth,i=t!=null&&t.width?String(t.width):e.defaultWidth;o=e.values[i]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(r):r;return o[s]}}const Cu={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ou={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ru={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Tu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ku={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Su={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Mu=(e,r)=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Du={ordinalNumber:Mu,era:yt({values:Cu,defaultWidth:"wide"}),quarter:yt({values:Ou,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yt({values:Ru,defaultWidth:"wide"}),day:yt({values:Tu,defaultWidth:"wide"}),dayPeriod:yt({values:ku,defaultWidth:"wide",formattingValues:Su,defaultFormattingWidth:"wide"})};function wt(e){return(r,t={})=>{const n=t.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=r.match(o);if(!s)return null;const a=s[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?_u(i,f=>f.test(a)):Au(i,f=>f.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const u=r.slice(a.length);return{value:c,rest:u}}}function Au(e,r){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&r(e[t]))return t}function _u(e,r){for(let t=0;t<e.length;t++)if(r(e[t]))return t}function Nu(e){return(r,t={})=>{const n=r.match(e.matchPattern);if(!n)return null;const o=n[0],s=r.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=t.valueCallback?t.valueCallback(a):a;const i=r.slice(o.length);return{value:a,rest:i}}}const Lu=/^(\d+)(th|st|nd|rd)?/i,Fu=/\d+/i,Wu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ju={any:[/^b/i,/^(a|c)/i]},Iu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yu={any:[/1/i,/2/i,/3/i,/4/i]},$u={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Hu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Bu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},zu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Gu={ordinalNumber:Nu({matchPattern:Lu,parsePattern:Fu,valueCallback:e=>parseInt(e,10)}),era:wt({matchPatterns:Wu,defaultMatchWidth:"wide",parsePatterns:ju,defaultParseWidth:"any"}),quarter:wt({matchPatterns:Iu,defaultMatchWidth:"wide",parsePatterns:Yu,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wt({matchPatterns:$u,defaultMatchWidth:"wide",parsePatterns:Hu,defaultParseWidth:"any"}),day:wt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Vu,defaultParseWidth:"any"}),dayPeriod:wt({matchPatterns:zu,defaultMatchWidth:"any",parsePatterns:qu,defaultParseWidth:"any"})},rs={code:"en-US",formatDistance:vu,formatLong:xu,formatRelative:Eu,localize:Du,match:Gu,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xu(e){const r=ee(e);return uu(r,Br(r))+1}function ns(e){const r=ee(e),t=+it(r)-+du(r);return Math.round(t/Jo)+1}function Vr(e,r){var u,f,p,g;const t=ee(e),n=t.getFullYear(),o=dt(),s=(r==null?void 0:r.firstWeekContainsDate)??((f=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(p=o.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,a=Q(e,0);a.setFullYear(n+1,0,s),a.setHours(0,0,0,0);const i=Te(a,r),l=Q(e,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);const c=Te(l,r);return t.getTime()>=i.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function Uu(e,r){var i,l,c,u;const t=dt(),n=(r==null?void 0:r.firstWeekContainsDate)??((l=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((u=(c=t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Vr(e,r),s=Q(e,0);return s.setFullYear(o,0,n),s.setHours(0,0,0,0),Te(s,r)}function os(e,r){const t=ee(e),n=+Te(t,r)-+Uu(t,r);return Math.round(n/Jo)+1}function B(e,r){const t=e<0?"-":"",n=Math.abs(e).toString().padStart(r,"0");return t+n}const De={y(e,r){const t=e.getFullYear(),n=t>0?t:1-t;return B(r==="yy"?n%100:n,r.length)},M(e,r){const t=e.getMonth();return r==="M"?String(t+1):B(t+1,2)},d(e,r){return B(e.getDate(),r.length)},a(e,r){const t=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,r){return B(e.getHours()%12||12,r.length)},H(e,r){return B(e.getHours(),r.length)},m(e,r){return B(e.getMinutes(),r.length)},s(e,r){return B(e.getSeconds(),r.length)},S(e,r){const t=r.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,t-3));return B(o,r.length)}},et={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wn={G:function(e,r,t){const n=e.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(e,r,t){if(r==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return t.ordinalNumber(o,{unit:"year"})}return De.y(e,r)},Y:function(e,r,t,n){const o=Vr(e,n),s=o>0?o:1-o;if(r==="YY"){const a=s%100;return B(a,2)}return r==="Yo"?t.ordinalNumber(s,{unit:"year"}):B(s,r.length)},R:function(e,r){const t=es(e);return B(t,r.length)},u:function(e,r){const t=e.getFullYear();return B(t,r.length)},Q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return B(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return B(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,r,t){const n=e.getMonth();switch(r){case"M":case"MM":return De.M(e,r);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(e,r,t){const n=e.getMonth();switch(r){case"L":return String(n+1);case"LL":return B(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(e,r,t,n){const o=os(e,n);return r==="wo"?t.ordinalNumber(o,{unit:"week"}):B(o,r.length)},I:function(e,r,t){const n=ns(e);return r==="Io"?t.ordinalNumber(n,{unit:"week"}):B(n,r.length)},d:function(e,r,t){return r==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):De.d(e,r)},D:function(e,r,t){const n=Xu(e);return r==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):B(n,r.length)},E:function(e,r,t){const n=e.getDay();switch(r){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(e,r,t,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return B(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,t,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return B(s,r.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,t){const n=e.getDay(),o=n===0?7:n;switch(r){case"i":return String(o);case"ii":return B(o,r.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(e,r,t){const o=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,t){const n=e.getHours();let o;switch(n===12?o=et.noon:n===0?o=et.midnight:o=n/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,t){const n=e.getHours();let o;switch(n>=17?o=et.evening:n>=12?o=et.afternoon:n>=4?o=et.morning:o=et.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,t){if(r==="ho"){let n=e.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return De.h(e,r)},H:function(e,r,t){return r==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):De.H(e,r)},K:function(e,r,t){const n=e.getHours()%12;return r==="Ko"?t.ordinalNumber(n,{unit:"hour"}):B(n,r.length)},k:function(e,r,t){let n=e.getHours();return n===0&&(n=24),r==="ko"?t.ordinalNumber(n,{unit:"hour"}):B(n,r.length)},m:function(e,r,t){return r==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):De.m(e,r)},s:function(e,r,t){return r==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):De.s(e,r)},S:function(e,r){return De.S(e,r)},X:function(e,r,t){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(r){case"X":return In(n);case"XXXX":case"XX":return Ve(n);case"XXXXX":case"XXX":default:return Ve(n,":")}},x:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"x":return In(n);case"xxxx":case"xx":return Ve(n);case"xxxxx":case"xxx":default:return Ve(n,":")}},O:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+jn(n,":");case"OOOO":default:return"GMT"+Ve(n,":")}},z:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+jn(n,":");case"zzzz":default:return"GMT"+Ve(n,":")}},t:function(e,r,t){const n=Math.trunc(e.getTime()/1e3);return B(n,r.length)},T:function(e,r,t){const n=e.getTime();return B(n,r.length)}};function jn(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),s=n%60;return s===0?t+String(o):t+String(o)+r+B(s,2)}function In(e,r){return e%60===0?(e>0?"-":"+")+B(Math.abs(e)/60,2):Ve(e,r)}function Ve(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),o=B(Math.trunc(n/60),2),s=B(n%60,2);return t+o+r+s}const Yn=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},ss=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Qu=(e,r)=>{const t=e.match(/(P+)(p+)?/)||[],n=t[1],o=t[2];if(!o)return Yn(e,r);let s;switch(n){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",Yn(n,r)).replace("{{time}}",ss(o,r))},Tr={p:ss,P:Qu},Ku=/^D+$/,Zu=/^Y+$/,Ju=["D","DD","YY","YYYY"];function as(e){return Ku.test(e)}function is(e){return Zu.test(e)}function kr(e,r,t){const n=ed(e,r,t);if(console.warn(n),Ju.includes(e))throw new RangeError(n)}function ed(e,r,t){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const td=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nd=/^'([^]*?)'?$/,od=/''/g,sd=/[a-zA-Z]/;function ad(e,r,t){var u,f,p,g;const n=dt(),o=n.locale??rs,s=n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,a=n.weekStartsOn??((g=(p=n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,i=ee(e);if(!Ct(i))throw new RangeError("Invalid time value");let l=r.match(rd).map(v=>{const m=v[0];if(m==="p"||m==="P"){const y=Tr[m];return y(v,o.formatLong)}return v}).join("").match(td).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const m=v[0];if(m==="'")return{isToken:!1,value:id(v)};if(Wn[m])return{isToken:!0,value:v};if(m.match(sd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:v}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:o};return l.map(v=>{if(!v.isToken)return v.value;const m=v.value;(is(m)||as(m))&&kr(m,r,String(e));const y=Wn[m[0]];return y(i,m,o.localize,c)}).join("")}function id(e){const r=e.match(nd);return r?r[1].replace(od,"'"):e}function cd(){return Object.assign({},dt())}function ld(e){let t=ee(e).getDay();return t===0&&(t=7),t}function ud(e,r){const t=r instanceof Date?Q(r,0):new r(0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}const dd=10;class cs{constructor(){T(this,"subPriority",0)}validate(r,t){return!0}}class fd extends cs{constructor(r,t,n,o,s){super(),this.value=r,this.validateValue=t,this.setValue=n,this.priority=o,s&&(this.subPriority=s)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,n){return this.setValue(r,t,this.value,n)}}class hd extends cs{constructor(){super(...arguments);T(this,"priority",dd);T(this,"subPriority",-1)}set(t,n){return n.timestampIsSet?t:Q(t,ud(t,Date))}}class Y{run(r,t,n,o){const s=this.parse(r,t,n,o);return s?{setter:new fd(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(r,t,n){return!0}}class md extends Y{constructor(){super(...arguments);T(this,"priority",140);T(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,o){switch(n){case"G":case"GG":case"GGG":return o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"});case"GGGGG":return o.era(t,{width:"narrow"});case"GGGG":default:return o.era(t,{width:"wide"})||o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"})}}set(t,n,o){return n.era=o,t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}const re={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ve={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ne(e,r){return e&&{value:r(e.value),rest:e.rest}}function K(e,r){const t=r.match(e);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function ye(e,r){const t=r.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const n=t[1]==="+"?1:-1,o=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,a=t[5]?parseInt(t[5],10):0;return{value:n*(o*iu+s*au+a*cu),rest:r.slice(t[0].length)}}function ls(e){return K(re.anyDigitsSigned,e)}function J(e,r){switch(e){case 1:return K(re.singleDigit,r);case 2:return K(re.twoDigits,r);case 3:return K(re.threeDigits,r);case 4:return K(re.fourDigits,r);default:return K(new RegExp("^\\d{1,"+e+"}"),r)}}function qt(e,r){switch(e){case 1:return K(re.singleDigitSigned,r);case 2:return K(re.twoDigitsSigned,r);case 3:return K(re.threeDigitsSigned,r);case 4:return K(re.fourDigitsSigned,r);default:return K(new RegExp("^-?\\d{1,"+e+"}"),r)}}function zr(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function us(e,r){const t=r>0,n=t?r:1-r;let o;if(n<=50)o=e||100;else{const s=n+50,a=Math.trunc(s/100)*100,i=e>=s%100;o=e+a-(i?100:0)}return t?o:1-o}function ds(e){return e%400===0||e%4===0&&e%100!==0}class pd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,o){const s=a=>({year:a,isTwoDigitYear:n==="yy"});switch(n){case"y":return ne(J(4,t),s);case"yo":return ne(o.ordinalNumber(t,{unit:"year"}),s);default:return ne(J(n.length,t),s)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o){const s=t.getFullYear();if(o.isTwoDigitYear){const i=us(o.year,s);return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}const a=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}class gd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,o){const s=a=>({year:a,isTwoDigitYear:n==="YY"});switch(n){case"Y":return ne(J(4,t),s);case"Yo":return ne(o.ordinalNumber(t,{unit:"year"}),s);default:return ne(J(n.length,t),s)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o,s){const a=Vr(t,s);if(o.isTwoDigitYear){const l=us(o.year,a);return t.setFullYear(l,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),Te(t,s)}const i=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(i,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),Te(t,s)}}class vd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return qt(n==="R"?4:n.length,t)}set(t,n,o){const s=Q(t,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),it(s)}}class yd extends Y{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return qt(n==="u"?4:n.length,t)}set(t,n,o){return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class wd extends Y{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"Q":case"QQ":return J(n.length,t);case"Qo":return o.ordinalNumber(t,{unit:"quarter"});case"QQQ":return o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(t,{width:"wide",context:"formatting"})||o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class bd extends Y{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"q":case"qq":return J(n.length,t);case"qo":return o.ordinalNumber(t,{unit:"quarter"});case"qqq":return o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(t,{width:"wide",context:"standalone"})||o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class xd extends Y{constructor(){super(...arguments);T(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);T(this,"priority",110)}parse(t,n,o){const s=a=>a-1;switch(n){case"M":return ne(K(re.month,t),s);case"MM":return ne(J(2,t),s);case"Mo":return ne(o.ordinalNumber(t,{unit:"month"}),s);case"MMM":return o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(t,{width:"wide",context:"formatting"})||o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}class Pd extends Y{constructor(){super(...arguments);T(this,"priority",110);T(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,o){const s=a=>a-1;switch(n){case"L":return ne(K(re.month,t),s);case"LL":return ne(J(2,t),s);case"Lo":return ne(o.ordinalNumber(t,{unit:"month"}),s);case"LLL":return o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(t,{width:"wide",context:"standalone"})||o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}function Ed(e,r,t){const n=ee(e),o=os(n,t)-r;return n.setDate(n.getDate()-o*7),n}class Cd extends Y{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,o){switch(n){case"w":return K(re.week,t);case"wo":return o.ordinalNumber(t,{unit:"week"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o,s){return Te(Ed(t,o,s),s)}}function Od(e,r){const t=ee(e),n=ns(t)-r;return t.setDate(t.getDate()-n*7),t}class Rd extends Y{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,o){switch(n){case"I":return K(re.week,t);case"Io":return o.ordinalNumber(t,{unit:"week"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o){return it(Od(t,o))}}const Td=[31,28,31,30,31,30,31,31,30,31,30,31],kd=[31,29,31,30,31,30,31,31,30,31,30,31];class Sd extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"subPriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"d":return K(re.date,t);case"do":return o.ordinalNumber(t,{unit:"date"});default:return J(n.length,t)}}validate(t,n){const o=t.getFullYear(),s=ds(o),a=t.getMonth();return s?n>=1&&n<=kd[a]:n>=1&&n<=Td[a]}set(t,n,o){return t.setDate(o),t.setHours(0,0,0,0),t}}class Md extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"subpriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,o){switch(n){case"D":case"DD":return K(re.dayOfYear,t);case"Do":return o.ordinalNumber(t,{unit:"date"});default:return J(n.length,t)}}validate(t,n){const o=t.getFullYear();return ds(o)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,o){return t.setMonth(0,o),t.setHours(0,0,0,0),t}}function qr(e,r,t){var f,p,g,v;const n=dt(),o=(t==null?void 0:t.weekStartsOn)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??n.weekStartsOn??((v=(g=n.locale)==null?void 0:g.options)==null?void 0:v.weekStartsOn)??0,s=ee(e),a=s.getDay(),l=(r%7+7)%7,c=7-o,u=r<0||r>6?r-(a+c)%7:(l+c)%7-(a+c)%7;return Hr(s,u)}class Dd extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"E":case"EE":case"EEE":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,s){return t=qr(t,o,s),t.setHours(0,0,0,0),t}}class Ad extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,o,s){const a=i=>{const l=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+l};switch(n){case"e":case"ee":return ne(J(n.length,t),a);case"eo":return ne(o.ordinalNumber(t,{unit:"day"}),a);case"eee":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeeee":return o.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,s){return t=qr(t,o,s),t.setHours(0,0,0,0),t}}class _d extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,o,s){const a=i=>{const l=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+l};switch(n){case"c":case"cc":return ne(J(n.length,t),a);case"co":return ne(o.ordinalNumber(t,{unit:"day"}),a);case"ccc":return o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"ccccc":return o.day(t,{width:"narrow",context:"standalone"});case"cccccc":return o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(t,{width:"wide",context:"standalone"})||o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,s){return t=qr(t,o,s),t.setHours(0,0,0,0),t}}function Nd(e,r){const t=ee(e),n=ld(t),o=r-n;return Hr(t,o)}class Ld extends Y{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,o){const s=a=>a===0?7:a;switch(n){case"i":case"ii":return J(n.length,t);case"io":return o.ordinalNumber(t,{unit:"day"});case"iii":return ne(o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return ne(o.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ne(o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ne(o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),s)}}validate(t,n){return n>=1&&n<=7}set(t,n,o){return t=Nd(t,o),t.setHours(0,0,0,0),t}}class Fd extends Y{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,o){switch(n){case"a":case"aa":case"aaa":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(zr(o),0,0,0),t}}class Wd extends Y{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,o){switch(n){case"b":case"bb":case"bbb":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(zr(o),0,0,0),t}}class jd extends Y{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,o){switch(n){case"B":case"BB":case"BBB":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(zr(o),0,0,0),t}}class Id extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,o){switch(n){case"h":return K(re.hour12h,t);case"ho":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,o){const s=t.getHours()>=12;return s&&o<12?t.setHours(o+12,0,0,0):!s&&o===12?t.setHours(0,0,0,0):t.setHours(o,0,0,0),t}}class Yd extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,o){switch(n){case"H":return K(re.hour23h,t);case"Ho":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,o){return t.setHours(o,0,0,0),t}}class $d extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,o){switch(n){case"K":return K(re.hour11h,t);case"Ko":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.getHours()>=12&&o<12?t.setHours(o+12,0,0,0):t.setHours(o,0,0,0),t}}class Hd extends Y{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,o){switch(n){case"k":return K(re.hour24h,t);case"ko":return o.ordinalNumber(t,{unit:"hour"});default:return J(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,o){const s=o<=24?o%24:o;return t.setHours(s,0,0,0),t}}class Bd extends Y{constructor(){super(...arguments);T(this,"priority",60);T(this,"incompatibleTokens",["t","T"])}parse(t,n,o){switch(n){case"m":return K(re.minute,t);case"mo":return o.ordinalNumber(t,{unit:"minute"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setMinutes(o,0,0),t}}class Vd extends Y{constructor(){super(...arguments);T(this,"priority",50);T(this,"incompatibleTokens",["t","T"])}parse(t,n,o){switch(n){case"s":return K(re.second,t);case"so":return o.ordinalNumber(t,{unit:"second"});default:return J(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setSeconds(o,0),t}}class zd extends Y{constructor(){super(...arguments);T(this,"priority",30);T(this,"incompatibleTokens",["t","T"])}parse(t,n){const o=s=>Math.trunc(s*Math.pow(10,-n.length+3));return ne(J(n.length,t),o)}set(t,n,o){return t.setMilliseconds(o),t}}class qd extends Y{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return ye(ve.basicOptionalMinutes,t);case"XX":return ye(ve.basic,t);case"XXXX":return ye(ve.basicOptionalSeconds,t);case"XXXXX":return ye(ve.extendedOptionalSeconds,t);case"XXX":default:return ye(ve.extended,t)}}set(t,n,o){return n.timestampIsSet?t:Q(t,t.getTime()-zt(t)-o)}}class Gd extends Y{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return ye(ve.basicOptionalMinutes,t);case"xx":return ye(ve.basic,t);case"xxxx":return ye(ve.basicOptionalSeconds,t);case"xxxxx":return ye(ve.extendedOptionalSeconds,t);case"xxx":default:return ye(ve.extended,t)}}set(t,n,o){return n.timestampIsSet?t:Q(t,t.getTime()-zt(t)-o)}}class Xd extends Y{constructor(){super(...arguments);T(this,"priority",40);T(this,"incompatibleTokens","*")}parse(t){return ls(t)}set(t,n,o){return[Q(t,o*1e3),{timestampIsSet:!0}]}}class Ud extends Y{constructor(){super(...arguments);T(this,"priority",20);T(this,"incompatibleTokens","*")}parse(t){return ls(t)}set(t,n,o){return[Q(t,o),{timestampIsSet:!0}]}}const Qd={G:new md,y:new pd,Y:new gd,R:new vd,u:new yd,Q:new wd,q:new bd,M:new xd,L:new Pd,w:new Cd,I:new Rd,d:new Sd,D:new Md,E:new Dd,e:new Ad,c:new _d,i:new Ld,a:new Fd,b:new Wd,B:new jd,h:new Id,H:new Yd,K:new $d,k:new Hd,m:new Bd,s:new Vd,S:new zd,X:new qd,x:new Gd,t:new Xd,T:new Ud},Kd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jd=/^'([^]*?)'?$/,ef=/''/g,tf=/\S/,rf=/[a-zA-Z]/;function nf(e,r,t,n){var m,y,w,P;const o=cd(),s=o.locale??rs,a=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,i=o.weekStartsOn??((P=(w=o.locale)==null?void 0:w.options)==null?void 0:P.weekStartsOn)??0,l={firstWeekContainsDate:a,weekStartsOn:i,locale:s},c=[new hd],u=r.match(Zd).map(b=>{const x=b[0];if(x in Tr){const C=Tr[x];return C(b,s.formatLong)}return b}).join("").match(Kd),f=[];for(let b of u){is(b)&&kr(b,r,e),as(b)&&kr(b,r,e);const x=b[0],C=Qd[x];if(C){const{incompatibleTokens:S}=C;if(Array.isArray(S)){const W=f.find(j=>S.includes(j.token)||j.token===x);if(W)throw new RangeError(`The format string mustn't contain \`${W.fullToken}\` and \`${b}\` at the same time`)}else if(C.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${b}\` and any other token at the same time`);f.push({token:x,fullToken:b});const k=C.run(e,b,s.match,l);if(!k)return Q(t,NaN);c.push(k.setter),e=k.rest}else{if(x.match(rf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(b==="''"?b="'":x==="'"&&(b=of(b)),e.indexOf(b)===0)e=e.slice(b.length);else return Q(t,NaN)}}if(e.length>0&&tf.test(e))return Q(t,NaN);const p=c.map(b=>b.priority).sort((b,x)=>x-b).filter((b,x,C)=>C.indexOf(b)===x).map(b=>c.filter(x=>x.priority===b).sort((x,C)=>C.subPriority-x.subPriority)).map(b=>b[0]);let g=ee(t);if(isNaN(g.getTime()))return Q(t,NaN);const v={};for(const b of p){if(!b.validate(g,l))return Q(t,NaN);const x=b.set(g,v,l);Array.isArray(x)?(g=x[0],Object.assign(v,x[1])):g=x}return Q(t,g)}function of(e){return e.match(Jd)[1].replace(ef,"'")}function Sr(e,r){return Hr(e,-r)}function sf(e,r){return Zo(e,-1)}function af(e,r){return fu(e,-1)}const fs=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:e,endDate:e}},hs=()=>{const e=Sr(new Date,1);return e.setHours(0,0,0,0),{startDate:e,endDate:e}},ms=()=>{const e=new Date;e.setHours(0,0,0,0);const r=Sr(e,7),t=Sr(e,1);return{startDate:r,endDate:t}},ps=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:Te(e,{weekStartsOn:1}),endDate:e}},gs=()=>{const e=sf(new Date),r=ts(e),t=mu(e);return{startDate:r,endDate:t}},vs=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:ts(e),endDate:e}},ys=()=>{const e=af(new Date),r=Br(e),t=pu(e);return{startDate:r,endDate:t}},ws=()=>{const e=new Date;return e.setHours(0,0,0,0),{startDate:Br(e),endDate:e}},bt=e=>!e||!Ct(e)?"":ad(e,"dd/MM/yyyy"),cf=e=>{const r=nf(e,"dd/MM/yyyy",new Date);return Ct(r)?r:null},bs=(e,r,t)=>{if(!e||!r||!t||r<1||r>12||e<1||e>31||t<1900||t>2100)return!1;const n=new Date(t,r-1,e);return Ct(n)&&n.getDate()===e&&n.getMonth()===r-1&&n.getFullYear()===t},lf=(e,r,t)=>{if(!bs(e,r,t))return null;const n=new Date(t,r-1,e);return n.setHours(0,0,0,0),n},uf=e=>!e||!Ct(e)?{day:0,month:0,year:0}:{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()},df=({onPresetSelect:e,startDate:r,endDate:t,className:n,labels:o,quickSelectLabel:s})=>{const a=(c,u)=>!c||!u?!1:c.getFullYear()===u.getFullYear()&&c.getMonth()===u.getMonth()&&c.getDate()===u.getDate(),i=c=>{const u=c.fn();return a(r,u.startDate)&&a(t,u.endDate)},l=[{label:(o==null?void 0:o.today)||"ມື້ນີ້",value:"today",fn:fs},{label:(o==null?void 0:o.yesterday)||"ມື້ວານ",value:"yesterday",fn:hs},{label:(o==null?void 0:o.lastWeek)||"ອາທິດກ່ອນ",value:"lastWeek",fn:ms},{label:(o==null?void 0:o.thisWeek)||"ອາທິດນີ້",value:"thisWeek",fn:ps},{label:(o==null?void 0:o.lastMonth)||"ເດືອນກ່ອນ",value:"lastMonth",fn:gs},{label:(o==null?void 0:o.thisMonth)||"ເດືອນນີ້",value:"thisMonth",fn:vs},{label:(o==null?void 0:o.lastYear)||"ປີກ່ອນ",value:"lastYear",fn:ys},{label:(o==null?void 0:o.thisYear)||"ປີນີ້",value:"thisYear",fn:ws},{label:(o==null?void 0:o.clear)||"ລ້າງຂໍ້ມູນ",value:"clear",fn:()=>({startDate:null,endDate:null})}];return O.jsxs("div",{className:ae("space-y-2",n),children:[O.jsx("label",{className:"text-sm font-bold",children:s}),O.jsx("div",{className:"grid grid-cols-3 gap-2",children:l.map((c,u)=>{const f=i(c),p=u===l.length-1;return O.jsxs($r,{variant:p?"destructive":f?"default":"outline",size:"sm",onClick:()=>e(c.fn()),className:ae("flex items-center justify-center gap-3 rounded-xl w-full h-12 font-normal transition-transform duration-200 ease-in-out hover:scale-105",f&&!p&&"bg-primary/50 text-primary-foreground hover:bg-primary/60",p&&"bg-red-500 text-white hover:bg-red-600"),children:[p?O.jsx(Zs,{className:"h-4 w-4 text-white"}):f?O.jsx(Ks,{className:ae("h-4 w-4","text-primary-foreground")}):O.jsx(Qs,{className:ae("h-4 w-4","text-gray-300")}),(o==null?void 0:o[c.value])||c.label]},c.value)})})]})},ff=({startDate:e,endDate:r,onDateChange:t,className:n,buttonClassName:o,dropdownClassName:s,disabled:a=!1,placeholder:i="ເລືອກວັນທີ",labels:l,labelInputs:c,quickSelectLabel:u})=>{const[f,p]=de.useState(!1),[g,v]=de.useState(e||null),[m,y]=de.useState(r||null);de.useEffect(()=>{e&&v(e)},[e]),de.useEffect(()=>{r&&y(r)},[r]);const w=C=>{v(C),t&&t(C,m),p(!1)},P=C=>{y(C),t&&t(g,C),p(!1)},b=C=>{v(C.startDate),y(C.endDate),t&&t(C.startDate,C.endDate),p(!1)},x=()=>!g&&!m?i:g&&m?`${bt(g)} - ${bt(m)}`:g?bt(g):m?bt(m):i;return O.jsx("div",{className:ae("relative",n),children:O.jsxs($l,{open:f,onOpenChange:p,children:[O.jsx(Hl,{asChild:!0,children:O.jsxs($r,{variant:"outline",disabled:a,className:ae("w-full justify-start text-left font-normal",!g&&!m&&"text-muted-foreground",o),children:[O.jsx(Us,{className:"mr-2 h-4 w-4"}),x()]})}),O.jsx(Xo,{className:ae("w-auto rounded-2xl p-4 border-0",s),align:"start",children:O.jsx(Qo,{className:"border-0 shadow-none",children:O.jsxs(Ko,{className:"p-4 space-y-4",children:[O.jsx(ou,{startDate:g,endDate:m,onStartDateChange:w,onEndDateChange:P,labelInputs:c}),O.jsx(df,{onPresetSelect:b,startDate:g,endDate:m,labels:l,quickSelectLabel:u})]})})})]})})};exports.LLLDatePicker=ff;exports.createDate=lf;exports.extractDateParts=uf;exports.formatDate=bt;exports.getLastMonth=gs;exports.getLastWeek=ms;exports.getLastYear=ys;exports.getThisMonth=vs;exports.getThisWeek=ps;exports.getThisYear=ws;exports.getToday=fs;exports.getYesterday=hs;exports.isValidDate=bs;exports.parseDate=cf;
|