autoforma 1.0.65 → 1.0.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +10 -58
- package/dist/index.es.js +3252 -12423
- package/package.json +5 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),_=require("@mantine/core"),R=require("dayjs");function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ot={exports:{}},Ge={};/**
|
|
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
|
|
9
|
+
*/var Jt;function Gr(){if(Jt)return Ge;Jt=1;var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(l,i,u){var f,h={},y=null,w=null;u!==void 0&&(y=""+u),i.key!==void 0&&(y=""+i.key),i.ref!==void 0&&(w=i.ref);for(f in i)n.call(i,f)&&!o.hasOwnProperty(f)&&(h[f]=i[f]);if(l&&l.defaultProps)for(f in i=l.defaultProps,i)h[f]===void 0&&(h[f]=i[f]);return{$$typeof:t,type:l,key:y,ref:w,props:h,_owner:s.current}}return Ge.Fragment=r,Ge.jsx=a,Ge.jsxs=a,Ge}var Ke={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,65 +14,17 @@
|
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var Xt;function Kr(){return Xt||(Xt=1,process.env.NODE_ENV!=="production"&&function(){var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),b=Symbol.iterator,m="@@iterator";function d(c){if(c===null||typeof c!="object")return null;var T=b&&c[b]||c[m];return typeof T=="function"?T:null}var p=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(c){{for(var T=arguments.length,$=new Array(T>1?T-1:0),K=1;K<T;K++)$[K-1]=arguments[K];D("error",c,$)}}function D(c,T,$){{var K=p.ReactDebugCurrentFrame,le=K.getStackAddendum();le!==""&&(T+="%s",$=$.concat([le]));var fe=$.map(function(ae){return String(ae)});fe.unshift("Warning: "+T),Function.prototype.apply.call(console[c],console,fe)}}var L=!1,k=!1,v=!1,C=!1,O=!1,F;F=Symbol.for("react.module.reference");function Y(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===o||O||c===s||c===u||c===f||C||c===w||L||k||v||typeof c=="object"&&c!==null&&(c.$$typeof===y||c.$$typeof===h||c.$$typeof===a||c.$$typeof===l||c.$$typeof===i||c.$$typeof===F||c.getModuleId!==void 0))}function V(c,T,$){var K=c.displayName;if(K)return K;var le=T.displayName||T.name||"";return le!==""?$+"("+le+")":$}function z(c){return c.displayName||"Context"}function P(c){if(c==null)return null;if(typeof c.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case l:var T=c;return z(T)+".Consumer";case a:var $=c;return z($._context)+".Provider";case i:return V(c,c.render,"ForwardRef");case h:var K=c.displayName||null;return K!==null?K:P(c.type)||"Memo";case y:{var le=c,fe=le._payload,ae=le._init;try{return P(ae(fe))}catch{return null}}}return null}var H=Object.assign,I=0,q,A,U,E,J,j,W;function re(){}re.__reactDisabledLog=!0;function te(){{if(I===0){q=console.log,A=console.info,U=console.warn,E=console.error,J=console.group,j=console.groupCollapsed,W=console.groupEnd;var c={configurable:!0,enumerable:!0,value:re,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}I++}}function M(){{if(I--,I===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},c,{value:q}),info:H({},c,{value:A}),warn:H({},c,{value:U}),error:H({},c,{value:E}),group:H({},c,{value:J}),groupCollapsed:H({},c,{value:j}),groupEnd:H({},c,{value:W})})}I<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=p.ReactCurrentDispatcher,X;function ee(c,T,$){{if(X===void 0)try{throw Error()}catch(le){var K=le.stack.trim().match(/\n( *(at )?)/);X=K&&K[1]||""}return`
|
|
18
|
+
`+X+c}}var B=!1,ie;{var Z=typeof WeakMap=="function"?WeakMap:Map;ie=new Z}function ue(c,T){if(!c||B)return"";{var $=ie.get(c);if($!==void 0)return $}var K;B=!0;var le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=G.current,G.current=null,te();try{if(T){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(Se){K=Se}Reflect.construct(c,[],ae)}else{try{ae.call()}catch(Se){K=Se}c.call(ae.prototype)}}else{try{throw Error()}catch(Se){K=Se}c()}}catch(Se){if(Se&&K&&typeof Se.stack=="string"){for(var se=Se.stack.split(`
|
|
19
|
+
`),be=K.stack.split(`
|
|
20
|
+
`),me=se.length-1,pe=be.length-1;me>=1&&pe>=0&&se[me]!==be[pe];)pe--;for(;me>=1&&pe>=0;me--,pe--)if(se[me]!==be[pe]){if(me!==1||pe!==1)do if(me--,pe--,pe<0||se[me]!==be[pe]){var ke=`
|
|
21
|
+
`+se[me].replace(" at new "," at ");return c.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",c.displayName)),typeof c=="function"&&ie.set(c,ke),ke}while(me>=1&&pe>=0);break}}}finally{B=!1,G.current=fe,M(),Error.prepareStackTrace=le}var We=c?c.displayName||c.name:"",Ye=We?ee(We):"";return typeof c=="function"&&ie.set(c,Ye),Ye}function N(c,T,$){return ue(c,!1)}function ne(c){var T=c.prototype;return!!(T&&T.isReactComponent)}function Q(c,T,$){if(c==null)return"";if(typeof c=="function")return ue(c,ne(c));if(typeof c=="string")return ee(c);switch(c){case u:return ee("Suspense");case f:return ee("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case i:return N(c.render);case h:return Q(c.type,T,$);case y:{var K=c,le=K._payload,fe=K._init;try{return Q(fe(le),T,$)}catch{}}}return""}var ce=Object.prototype.hasOwnProperty,Ce={},De=p.ReactDebugCurrentFrame;function he(c){if(c){var T=c._owner,$=Q(c.type,c._source,T?T.type:null);De.setExtraStackFrame($)}else De.setExtraStackFrame(null)}function Oe(c,T,$,K,le){{var fe=Function.call.bind(ce);for(var ae in c)if(fe(c,ae)){var se=void 0;try{if(typeof c[ae]!="function"){var be=Error((K||"React class")+": "+$+" type `"+ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[ae]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw be.name="Invariant Violation",be}se=c[ae](T,ae,K,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(me){se=me}se&&!(se instanceof Error)&&(he(le),g("%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).",K||"React class",$,ae,typeof se),he(null)),se instanceof Error&&!(se.message in Ce)&&(Ce[se.message]=!0,he(le),g("Failed %s type: %s",$,se.message),he(null))}}}var $e=Array.isArray;function oe(c){return $e(c)}function _e(c){{var T=typeof Symbol=="function"&&Symbol.toStringTag,$=T&&c[Symbol.toStringTag]||c.constructor.name||"Object";return $}}function we(c){try{return je(c),!1}catch{return!0}}function je(c){return""+c}function Ae(c){if(we(c))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_e(c)),je(c)}var Ne=p.ReactCurrentOwner,Et={key:!0,ref:!0,__self:!0,__source:!0},tt,rt;function He(c){if(ce.call(c,"ref")){var T=Object.getOwnPropertyDescriptor(c,"ref").get;if(T&&T.isReactWarning)return!1}return c.ref!==void 0}function Ve(c){if(ce.call(c,"key")){var T=Object.getOwnPropertyDescriptor(c,"key").get;if(T&&T.isReactWarning)return!1}return c.key!==void 0}function Tt(c,T){typeof c.ref=="string"&&Ne.current}function Ee(c,T){{var $=function(){tt||(tt=!0,g("%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)",T))};$.isReactWarning=!0,Object.defineProperty(c,"key",{get:$,configurable:!0})}}function Be(c,T){{var $=function(){rt||(rt=!0,g("%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)",T))};$.isReactWarning=!0,Object.defineProperty(c,"ref",{get:$,configurable:!0})}}var jt=function(c,T,$,K,le,fe,ae){var se={$$typeof:t,type:c,key:T,ref:$,props:ae,_owner:fe};return se._store={},Object.defineProperty(se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.defineProperty(se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.freeze&&(Object.freeze(se.props),Object.freeze(se)),se};function Le(c,T,$,K,le){{var fe,ae={},se=null,be=null;$!==void 0&&(Ae($),se=""+$),Ve(T)&&(Ae(T.key),se=""+T.key),He(T)&&(be=T.ref,Tt(T,le));for(fe in T)ce.call(T,fe)&&!Et.hasOwnProperty(fe)&&(ae[fe]=T[fe]);if(c&&c.defaultProps){var me=c.defaultProps;for(fe in me)ae[fe]===void 0&&(ae[fe]=me[fe])}if(se||be){var pe=typeof c=="function"?c.displayName||c.name||"Unknown":c;se&&Ee(ae,pe),be&&Be(ae,pe)}return jt(c,se,be,le,K,Ne.current,ae)}}var Pe=p.ReactCurrentOwner,nt=p.ReactDebugCurrentFrame;function ge(c){if(c){var T=c._owner,$=Q(c.type,c._source,T?T.type:null);nt.setExtraStackFrame($)}else nt.setExtraStackFrame(null)}var Ue;Ue=!1;function qe(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function st(){{if(Pe.current){var c=P(Pe.current.type);if(c)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+c+"`."}return""}}function Ot(c){return""}var at={};function Lt(c){{var T=st();if(!T){var $=typeof c=="string"?c:c.displayName||c.name;$&&(T=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using
|
|
25
|
+
Check the top-level render call using <`+$+">.")}return T}}function de(c,T){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var $=Lt(T);if(at[$])return;at[$]=!0;var K="";c&&c._owner&&c._owner!==Pe.current&&(K=" It was passed a child from "+P(c._owner.type)+"."),ge(c),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,K),ge(null)}}function Re(c,T){{if(typeof c!="object")return;if(oe(c))for(var $=0;$<c.length;$++){var K=c[$];qe(K)&&de(K,T)}else if(qe(c))c._store&&(c._store.validated=!0);else if(c){var le=d(c);if(typeof le=="function"&&le!==c.entries)for(var fe=le.call(c),ae;!(ae=fe.next()).done;)qe(ae.value)&&de(ae.value,T)}}}function Pr(c){{var T=c.type;if(T==null||typeof T=="string")return;var $;if(typeof T=="function")$=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===i||T.$$typeof===h))$=T.propTypes;else return;if($){var K=P(T);Oe($,c.props,"prop",K,c)}else if(T.PropTypes!==void 0&&!Ue){Ue=!0;var le=P(T);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",le||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Wr(c){{for(var T=Object.keys(c.props),$=0;$<T.length;$++){var K=T[$];if(K!=="children"&&K!=="key"){ge(c),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",K),ge(null);break}}c.ref!==null&&(ge(c),g("Invalid attribute `ref` supplied to `React.Fragment`."),ge(null))}}var Kt={};function Zt(c,T,$,K,le,fe){{var ae=Y(c);if(!ae){var se="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(se+=" 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 be=Ot();be?se+=be:se+=st();var me;c===null?me="null":oe(c)?me="array":c!==void 0&&c.$$typeof===t?(me="<"+(P(c.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):me=typeof c,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",me,se)}var pe=Le(c,T,$,le,fe);if(pe==null)return pe;if(ae){var ke=T.children;if(ke!==void 0)if(K)if(oe(ke)){for(var We=0;We<ke.length;We++)Re(ke[We],c);Object.freeze&&Object.freeze(ke)}else g("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 Re(ke,c)}if(ce.call(T,"key")){var Ye=P(c),Se=Object.keys(T).filter(function(qr){return qr!=="key"}),Rt=Se.length>0?"{key: someKey, "+Se.join(": ..., ")+": ...}":"{key: someKey}";if(!Kt[Ye+Rt]){var Ur=Se.length>0?"{"+Se.join(": ..., ")+": ...}":"{}";g(`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} />`,qn,At,fl,At),Ps[At+qn]=!0}}return R===n?il(Le):al(Le),Le}}function cl(R,W,ne){return Ms(R,W,ne,!0)}function ll(R,W,ne){return Ms(R,W,ne,!1)}var ul=ll,dl=cl;yr.Fragment=n,yr.jsx=ul,yr.jsxs=dl}()),yr}var Fs;function gl(){return Fs||(Fs=1,process.env.NODE_ENV==="production"?Vr.exports=hl():Vr.exports=vl()),Vr.exports}var g=gl();function yl(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}const bl=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Ve(e,t){bl(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function xl(e,t){e&&yl(e),Ve(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),Ve(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),Ve(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),Ve(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),Ve(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),Ve(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),Ve(`mantine-form:${e}:clear-errors`,t.clearErrors),Ve(`mantine-form:${e}:reset`,t.reset),Ve(`mantine-form:${e}:validate`,t.validate),Ve(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),Ve(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),Ve(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),Ve(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),Ve(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),Ve(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),Ve(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),Ve(`mantine-form:${e}:reset-touched`,t.resetTouched)}function wl(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}function lo(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function Sl(e){const[t,r]=x.useState(lo(e)),n=x.useRef(t),o=x.useCallback(c=>{r(l=>{const u=lo(typeof c=="function"?c(l):c);return n.current=u,u})},[]),s=x.useCallback(()=>o({}),[]),a=x.useCallback(c=>{n.current[c]!==void 0&&o(l=>{const u={...l};return delete u[c],u})},[t]),i=x.useCallback((c,l)=>{l==null||l===!1?a(c):n.current[c]!==l&&o(u=>({...u,[c]:l}))},[t]);return{errorsState:t,setErrors:o,clearErrors:s,setFieldError:i,clearFieldError:a}}function uo(e,t){if(t===null||typeof t!="object")return{};const r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function Vs(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function zs(e,t,r,n){if(t===void 0)return r;const o=`${String(e)}`;let s=r;n===-1&&(s=uo(`${o}.${t}`,s));const a={...s},i=new Set;return Object.entries(s).filter(([c])=>{if(!c.startsWith(`${o}.`))return!1;const l=Vs(c,o);return Number.isNaN(l)?!1:l>=t}).forEach(([c,l])=>{const u=Vs(c,o),d=c.replace(`${o}.${u}`,`${o}.${u+n}`);a[d]=l,i.add(d),i.has(c)||delete a[c]}),a}function Cl(e,{from:t,to:r},n){const o=`${e}.${t}`,s=`${e}.${r}`,a={...n};return Object.keys(n).every(i=>{let c,l;if(i.startsWith(o)&&(c=i,l=i.replace(o,s)),i.startsWith(s)&&(c=i.replace(s,o),l=i),c&&l){const u=a[c],d=a[l];return d===void 0?delete a[c]:a[c]=d,u===void 0?delete a[l]:a[l]=u,!1}return!0}),a}function Bs(e,t,r){typeof r.value=="object"&&(r.value=Gt(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function Gt(e){if(typeof e!="object")return e;var t=0,r,n,o,s=Object.prototype.toString.call(e);if(s==="[object Object]"?o=Object.create(e.__proto__||null):s==="[object Array]"?o=Array(e.length):s==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(Gt(a))})):s==="[object Map]"?(o=new Map,e.forEach(function(a,i){o.set(Gt(i),Gt(a))})):s==="[object Date]"?o=new Date(+e):s==="[object RegExp]"?o=new RegExp(e.source,e.flags):s==="[object DataView]"?o=new e.constructor(Gt(e.buffer)):s==="[object ArrayBuffer]"?o=e.slice(0):s.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)Bs(o,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(o,r=n[t])&&o[r]===e[r]||Bs(o,r,Object.getOwnPropertyDescriptor(e,r))}return o||e}function Ya(e){return typeof e!="string"?[]:e.split(".")}function ze(e,t){const r=Ya(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let o=1;o<r.length&&n!=null;o+=1)n=n[r[o]];return n}function Tr(e,t,r){const n=Ya(e);if(n.length===0)return r;const o=Gt(r);if(n.length===1)return o[n[0]]=t,o;let s=o[n[0]];for(let a=1;a<n.length-1;a+=1){if(s===void 0)return o;s=s[n[a]]}return s[n[n.length-1]]=t,o}function Dl(e,{from:t,to:r},n){const o=ze(e,n);if(!Array.isArray(o))return n;const s=[...o],a=o[t];return s.splice(t,1),s.splice(r,0,a),Tr(e,s,n)}function _l(e,t,r,n){const o=ze(e,n);if(!Array.isArray(o))return n;const s=[...o];return s.splice(typeof r=="number"?r:s.length,0,t),Tr(e,s,n)}function Rl(e,t,r){const n=ze(e,r);return Array.isArray(n)?Tr(e,n.filter((o,s)=>s!==t),r):r}function El(e,t,r,n){const o=ze(e,n);if(!Array.isArray(o)||o.length<=r)return n;const s=[...o];return s[r]=t,Tr(e,s,n)}function Nl({$values:e,$errors:t,$status:r}){const n=x.useCallback((i,c)=>{r.clearFieldDirty(i),t.setErrors(l=>Cl(i,c,l)),e.setValues({values:Dl(i,c,e.refValues.current),updateState:!0})},[]),o=x.useCallback((i,c)=>{r.clearFieldDirty(i),t.setErrors(l=>zs(i,c,l,-1)),e.setValues({values:Rl(i,c,e.refValues.current),updateState:!0})},[]),s=x.useCallback((i,c,l)=>{r.clearFieldDirty(i),t.setErrors(u=>zs(i,l,u,1)),e.setValues({values:_l(i,c,l,e.refValues.current),updateState:!0})},[]),a=x.useCallback((i,c,l)=>{r.clearFieldDirty(i),e.setValues({values:El(i,l,c,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:o,insertListItem:s,replaceListItem:a}}var Xn,Ws;function Tl(){return Ws||(Ws=1,Xn=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var a=s[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Xn}var Ol=Tl();const zr=rr(Ol);function br(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function kl({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[o,s]=x.useState(t),[a,i]=x.useState(e),c=x.useRef(t),l=x.useRef(e),u=x.useCallback(S=>{const O=typeof S=="function"?S(c.current):S;c.current=O,r==="controlled"&&s(O)},[]),d=x.useCallback((S,O=!1)=>{const k=typeof S=="function"?S(l.current):S;l.current=k,(r==="controlled"||O)&&i(k)},[]),f=x.useCallback(()=>u({}),[]),m=x.useCallback(S=>{const O=S?{...n.refValues.current,...S}:n.refValues.current;n.setValuesSnapshot(O),d({})},[]),v=x.useCallback((S,O)=>{u(k=>br(k,S)===O?k:{...k,[S]:O})},[]),p=x.useCallback((S,O,k)=>{d(j=>br(j,S)===O?j:{...j,[S]:O},k)},[]),h=x.useCallback((S,O)=>{const k=br(l.current,S),j=!zr(ze(S,n.getValuesSnapshot()),O),P=uo(S,l.current);P[S]=j,d(P,k!==j)},[]),y=x.useCallback(S=>br(c.current,S),[]),w=x.useCallback(S=>d(O=>{if(typeof S!="string")return O;const k=uo(S,O);return delete k[S],zr(k,O)?O:k}),[]),b=x.useCallback(S=>{if(S){const k=ze(S,l.current);if(typeof k=="boolean")return k;const j=ze(S,n.refValues.current),P=ze(S,n.valuesSnapshot.current);return!zr(j,P)}return Object.keys(l.current).length>0?br(l.current):!zr(n.refValues.current,n.valuesSnapshot.current)},[]),C=x.useCallback(()=>l.current,[]),D=x.useCallback(()=>c.current,[]);return{touchedState:o,dirtyState:a,touchedRef:c,dirtyRef:l,setTouched:u,setDirty:d,resetDirty:m,resetTouched:f,isTouched:y,setFieldTouched:v,setFieldDirty:p,setTouchedState:s,setDirtyState:i,clearFieldDirty:w,isDirty:b,getDirty:C,getTouched:D,setCalculatedFieldDirty:h}}function $l({initialValues:e,onValuesChange:t,mode:r}){const n=x.useRef(!1),[o,s]=x.useState(e||{}),a=x.useRef(o),i=x.useRef(o),c=x.useCallback(({values:p,subscribers:h,updateState:y=!0,mergeWithPreviousValues:w=!0})=>{const b=a.current,C=p instanceof Function?p(a.current):p,D=w?{...b,...C}:C;a.current=D,y&&s(D),t==null||t(D,b),h==null||h.filter(Boolean).forEach(S=>S({updatedValues:D,previousValues:b}))},[t]),l=x.useCallback(p=>{var w;const h=ze(p.path,a.current),y=p.value instanceof Function?p.value(h):p.value;if(h!==y){const b=a.current,C=Tr(p.path,y,a.current);c({values:C,updateState:p.updateState}),(w=p.subscribers)==null||w.filter(Boolean).forEach(D=>D({path:p.path,updatedValues:C,previousValues:b}))}},[c]),u=x.useCallback(p=>{i.current=p},[]),d=x.useCallback((p,h)=>{n.current||(n.current=!0,c({values:p,updateState:r==="controlled"}),u(p),h())},[c]),f=x.useCallback(()=>{c({values:i.current,updateState:!0,mergeWithPreviousValues:!1})},[c]),m=x.useCallback(()=>a.current,[]),v=x.useCallback(()=>i.current,[]);return{initialized:n,stateValues:o,refValues:a,valuesSnapshot:i,setValues:c,setFieldValue:l,resetValues:f,setValuesSnapshot:u,initialize:d,getValues:m,getValuesSnapshot:v}}function jl({$status:e}){const t=x.useRef({}),r=x.useCallback((o,s)=>{x.useEffect(()=>(t.current[o]=t.current[o]||[],t.current[o].push(s),()=>{t.current[o]=t.current[o].filter(a=>a!==s)}),[s])},[]),n=x.useCallback(o=>t.current[o]?t.current[o].map(s=>a=>s({previousValue:ze(o,a.previousValues),value:ze(o,a.updatedValues),touched:e.isTouched(o),dirty:e.isDirty(o)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function Ys(e,t){return e?`${e}-${t.toString()}`:t.toString()}const Br=Symbol("root-rule");function Hs(e){const t=lo(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function fo(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,s)=>{const a=e[s],i=`${r===""?"":`${r}.`}${s}`,c=ze(i,t);let l=!1;return typeof a=="function"&&(o[i]=a(c,t,i)),typeof a=="object"&&Array.isArray(c)&&(l=!0,c.forEach((u,d)=>fo(a,t,`${i}.${d}`,o)),Br in a&&(o[i]=a[Br](c,t,i))),typeof a=="object"&&typeof c=="object"&&c!==null&&(l||fo(a,t,i,o),Br in a&&(o[i]=a[Br](c,t,i))),o},n)}function mo(e,t){return Hs(typeof e=="function"?e(t):fo(e,t))}function Wr(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=mo(t,r),o=Object.keys(n.errors).find(s=>e.split(".").every((a,i)=>a===s.split(".")[i]));return{hasError:!!o,error:o?n.errors[o]:null}}const Al="__MANTINE_FORM_INDEX__";function Us(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${Al}`)):!1:!1}function Pl({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:o={},initialTouched:s={},clearInputErrorOnChange:a=!0,validateInputOnChange:i=!1,validateInputOnBlur:c=!1,onValuesChange:l,transformValues:u=p=>p,enhanceGetInputProps:d,validate:f,onSubmitPreventDefault:m="always",touchTrigger:v="change"}={}){const p=Sl(n),h=$l({initialValues:r,onValuesChange:l,mode:t}),y=kl({initialDirty:o,initialTouched:s,$values:h,mode:t}),w=Nl({$values:h,$errors:p,$status:y}),b=jl({$status:y}),[C,D]=x.useState(0),[S,O]=x.useState({}),[k,j]=x.useState(!1),P=x.useCallback(()=>{h.resetValues(),p.clearErrors(),y.resetDirty(),y.resetTouched(),t==="uncontrolled"&&D(F=>F+1)},[]),L=x.useCallback(F=>{a&&p.clearErrors(),t==="uncontrolled"&&D(Q=>Q+1),Object.keys(b.subscribers.current).forEach(Q=>{const re=ze(Q,h.refValues.current),ae=ze(Q,F);re!==ae&&b.getFieldSubscribers(Q).forEach(Z=>Z({previousValues:F,updatedValues:h.refValues.current}))})},[a]),V=x.useCallback(F=>{const Q=h.refValues.current;h.initialize(F,()=>t==="uncontrolled"&&D(re=>re+1)),L(Q)},[L]),z=x.useCallback((F,Q,re)=>{const ae=Us(F,i),Z=Q instanceof Function?Q(ze(F,h.refValues.current)):Q;y.setCalculatedFieldDirty(F,Z),v==="change"&&y.setFieldTouched(F,!0),!ae&&a&&p.clearFieldError(F),h.setFieldValue({path:F,value:Q,updateState:t==="controlled",subscribers:[...b.getFieldSubscribers(F),ae?le=>{const ie=Wr(F,f,le.updatedValues);ie.hasError?p.setFieldError(F,ie.error):p.clearFieldError(F)}:null,(re==null?void 0:re.forceUpdate)!==!1&&t!=="controlled"?()=>O(le=>({...le,[F]:(le[F]||0)+1})):null]})},[l,f]),M=x.useCallback(F=>{const Q=h.refValues.current;h.setValues({values:F,updateState:t==="controlled"}),L(Q)},[l,L]),$=x.useCallback(()=>{const F=mo(f,h.refValues.current);return p.setErrors(F.errors),F},[f]),_=x.useCallback(F=>{const Q=Wr(F,f,h.refValues.current);return Q.hasError?p.setFieldError(F,Q.error):p.clearFieldError(F),Q},[f]),E=(F,{type:Q="input",withError:re=!0,withFocus:ae=!0,...Z}={})=>{const ie={onChange:wl(pe=>z(F,pe,{forceUpdate:!1})),"data-path":Ys(e,F)};return re&&(ie.error=p.errorsState[F]),Q==="checkbox"?ie[t==="controlled"?"checked":"defaultChecked"]=ze(F,h.refValues.current):ie[t==="controlled"?"value":"defaultValue"]=ze(F,h.refValues.current),ae&&(ie.onFocus=()=>y.setFieldTouched(F,!0),ie.onBlur=()=>{if(Us(F,c)){const pe=Wr(F,f,h.refValues.current);pe.hasError?p.setFieldError(F,pe.error):p.clearFieldError(F)}}),Object.assign(ie,d==null?void 0:d({inputProps:ie,field:F,options:{type:Q,withError:re,withFocus:ae,...Z},form:te}))},T=(F,Q)=>re=>{m==="always"&&(re==null||re.preventDefault());const ae=$();if(ae.hasErrors)m==="validation-failed"&&(re==null||re.preventDefault()),Q==null||Q(ae.errors,h.refValues.current,re);else{const Z=F==null?void 0:F(u(h.refValues.current),re);Z instanceof Promise&&(j(!0),Z.finally(()=>j(!1)))}},N=F=>u(F||h.refValues.current),I=x.useCallback(F=>{F.preventDefault(),P()},[]),A=x.useCallback(F=>F?!Wr(F,f,h.refValues.current).hasError:!mo(f,h.refValues.current).hasErrors,[f]),B=F=>`${C}-${F}-${S[F]||0}`,Y=x.useCallback(F=>document.querySelector(`[data-path="${Ys(e,F)}"]`),[]),te={watch:b.watch,initialized:h.initialized.current,values:h.stateValues,getValues:h.getValues,getInitialValues:h.getValuesSnapshot,setInitialValues:h.setValuesSnapshot,initialize:V,setValues:M,setFieldValue:z,submitting:k,setSubmitting:j,errors:p.errorsState,setErrors:p.setErrors,setFieldError:p.setFieldError,clearFieldError:p.clearFieldError,clearErrors:p.clearErrors,resetDirty:y.resetDirty,setTouched:y.setTouched,setDirty:y.setDirty,isTouched:y.isTouched,resetTouched:y.resetTouched,isDirty:y.isDirty,getTouched:y.getTouched,getDirty:y.getDirty,reorderListItem:w.reorderListItem,insertListItem:w.insertListItem,removeListItem:w.removeListItem,replaceListItem:w.replaceListItem,reset:P,validate:$,validateField:_,getInputProps:E,onSubmit:T,onReset:I,isValid:A,getTransformedValues:N,key:B,getInputNode:Y};return xl(e,te),te}function Ml(){const e=x.createContext(null);function t({form:n,children:o}){return g.jsx(e.Provider,{value:n,children:o})}function r(){const n=x.useContext(e);if(!n)throw new Error("useFormContext was called outside of FormProvider context");return n}return[t,r,Pl]}function Cr(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function Ll(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function Pt(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}const Il=()=>{};function Or(e,t){const r=typeof t=="number"?t:t.delay,n=typeof t=="number"?!1:t.flushOnUnmount,o=Pt(e),s=x.useRef(0),a=Object.assign(x.useCallback((...i)=>{window.clearTimeout(s.current);const c=()=>{s.current!==0&&(s.current=0,o(...i))};a.flush=c,s.current=window.setTimeout(c,r)},[o,r]),{flush:Il});return x.useEffect(()=>()=>{window.clearTimeout(s.current),n&&a.flush()},[a,n]),a}const Gs=["mousedown","touchstart"];function Ha(e,t,r){const n=x.useRef(null);return x.useEffect(()=>{const o=s=>{const{target:a}=s??{};if(Array.isArray(r)){const i=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(l=>!!l&&!s.composedPath().includes(l))&&!i&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||Gs).forEach(s=>document.addEventListener(s,o)),()=>{(t||Gs).forEach(s=>document.removeEventListener(s,o))}},[n,e,r]),n}function Fl(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function Vl(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function zl(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=x.useState(r?t:Vl(e)),s=x.useRef(null);return x.useEffect(()=>{if("matchMedia"in window)return s.current=window.matchMedia(e),o(s.current.matches),Fl(s.current,a=>o(a.matches))},[e]),n}const jo=typeof document<"u"?x.useLayoutEffect:x.useEffect;function yt(e,t){const r=x.useRef(!1);x.useEffect(()=>()=>{r.current=!1},[]),x.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function Ua({opened:e,shouldReturnFocus:t=!0}){const r=x.useRef(null),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return yt(()=>{let o=-1;const s=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",s),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",s)}},[e,t]),n}const Bl=/input|select|textarea|button|object/,Ga="a, input, select, textarea, button, object, [tabindex]";function Wl(e){return process.env.NODE_ENV==="test"?!1:e.style.display==="none"}function Yl(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(Wl(r))return!1;r=r.parentNode}return!0}function qa(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function po(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(qa(e));return(Bl.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&Yl(e)}function Xa(e){const t=qa(e);return(Number.isNaN(t)||t>=0)&&po(e)}function Hl(e){return Array.from(e.querySelectorAll(Ga)).filter(Xa)}function Ul(e,t){const r=Hl(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();let s=n===o.activeElement||e===o.activeElement;const a=o.activeElement;if(a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(s=r.filter(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===a.getAttribute("name")).includes(n)),!s)return;t.preventDefault();const c=r[t.shiftKey?r.length-1:0];c&&c.focus()}function Gl(e=!0){const t=x.useRef(null),r=o=>{let s=o.querySelector("[data-autofocus]");if(!s){const a=Array.from(o.querySelectorAll(Ga));s=a.find(Xa)||a.find(po)||null,!s&&po(o)&&(s=o)}s?s.focus({preventScroll:!0}):process.env.NODE_ENV==="development"&&console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",o)},n=x.useCallback(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()?r(o):process.env.NODE_ENV==="development"&&console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",o)}),t.current=o):t.current=null)},[e]);return x.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const o=s=>{s.key==="Tab"&&t.current&&Ul(t.current,s)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),n}const ql=x.useId||(()=>{});function Xl(){const e=ql();return e?`mantine-${e.replace(/:/g,"")}`:""}function nr(e){const t=Xl(),[r,n]=x.useState(t);return jo(()=>{n(Ll())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function Kl(e,t,r){x.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function rn(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function Zl(...e){const t=new Map;return r=>{if(e.forEach(n=>{const o=rn(n,r);o&&t.set(n,o)}),t.size>0)return()=>{e.forEach(n=>{const o=t.get(n);o?o():rn(n,null)}),t.clear()}}}function Ze(...e){return x.useCallback(Zl(...e),e)}function bt({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,s]=x.useState(t!==void 0?t:r),a=(i,...c)=>{s(i),n==null||n(i,...c)};return e!==void 0?[e,n,!0]:[o,a,!1]}function Ka(e,t){return zl("(prefers-reduced-motion: reduce)",e,t)}function Jl(e=!1,t){const{onOpen:r,onClose:n}={},[o,s]=x.useState(e),a=x.useCallback(()=>{s(l=>l||(r==null||r(),!0))},[r]),i=x.useCallback(()=>{s(l=>l&&(n==null||n(),!1))},[n]),c=x.useCallback(()=>{o?i():a()},[i,a,o]);return[o,{open:a,close:i,toggle:c}]}function Ql(e){const t=x.useRef(void 0);return x.useEffect(()=>{t.current=e},[e]),t.current}var ft=function(){return ft=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},ft.apply(this,arguments)};function Za(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function eu(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var qr="right-scroll-bar-position",Xr="width-before-scroll-bar",tu="with-scroll-bars-hidden",ru="--removed-body-scroll-bar-size";function Kn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nu(e,t){var r=x.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var ou=typeof window<"u"?G.useLayoutEffect:G.useEffect,qs=new WeakMap;function su(e,t){var r=nu(null,function(n){return e.forEach(function(o){return Kn(o,n)})});return ou(function(){var n=qs.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||Kn(i,null)}),s.forEach(function(i){o.has(i)||Kn(i,a)})}qs.set(r,e)},[e]),r}function au(e){return e}function iu(e,t){t===void 0&&(t=au);var r=[],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 r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return o}function cu(e){e===void 0&&(e={});var t=iu(null);return t.options=ft({async:!0,ssr:!1},e),t}var Ja=function(e){var t=e.sideCar,r=Za(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return G.createElement(n,ft({},r))};Ja.isSideCarExport=!0;function lu(e,t){return e.useMedium(t),Ja}var Qa=cu(),Zn=function(){},ln=G.forwardRef(function(e,t){var r=G.useRef(null),n=G.useState({onScrollCapture:Zn,onWheelCapture:Zn,onTouchMoveCapture:Zn}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,m=e.noIsolation,v=e.inert,p=e.allowPinchZoom,h=e.as,y=h===void 0?"div":h,w=e.gapMode,b=Za(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,D=su([r,t]),S=ft(ft({},b),o);return G.createElement(G.Fragment,null,u&&G.createElement(C,{sideCar:Qa,removeScrollBar:l,shards:d,noIsolation:m,inert:v,setCallbacks:s,allowPinchZoom:!!p,lockRef:r,gapMode:w}),a?G.cloneElement(G.Children.only(i),ft(ft({},S),{ref:D})):G.createElement(y,ft({},S,{className:c,ref:D}),i))});ln.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ln.classNames={fullWidth:Xr,zeroRight:qr};var uu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function du(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uu();return t&&e.setAttribute("nonce",t),e}function fu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pu=function(){var e=0,t=null;return{add:function(r){e==0&&(t=du())&&(fu(t,r),mu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hu=function(){var e=pu();return function(t,r){G.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ei=function(){var e=hu(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},vu={left:0,top:0,right:0,gap:0},Jn=function(e){return parseInt(e||"",10)||0},gu=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Jn(r),Jn(n),Jn(o)]},yu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vu;var t=gu(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},bu=ei(),qt="data-scroll-locked",xu=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
31
|
-
.`.concat(tu,` {
|
|
32
|
-
overflow: hidden `).concat(n,`;
|
|
33
|
-
padding-right: `).concat(i,"px ").concat(n,`;
|
|
34
|
-
}
|
|
35
|
-
body[`).concat(qt,`] {
|
|
36
|
-
overflow: hidden `).concat(n,`;
|
|
37
|
-
overscroll-behavior: contain;
|
|
38
|
-
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
39
|
-
padding-left: `.concat(o,`px;
|
|
40
|
-
padding-top: `).concat(s,`px;
|
|
41
|
-
padding-right: `).concat(a,`px;
|
|
42
|
-
margin-left:0;
|
|
43
|
-
margin-top:0;
|
|
44
|
-
margin-right: `).concat(i,"px ").concat(n,`;
|
|
45
|
-
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.`).concat(qr,` {
|
|
49
|
-
right: `).concat(i,"px ").concat(n,`;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.`).concat(Xr,` {
|
|
53
|
-
margin-right: `).concat(i,"px ").concat(n,`;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.`).concat(qr," .").concat(qr,` {
|
|
57
|
-
right: 0 `).concat(n,`;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.`).concat(Xr," .").concat(Xr,` {
|
|
61
|
-
margin-right: 0 `).concat(n,`;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
body[`).concat(qt,`] {
|
|
65
|
-
`).concat(ru,": ").concat(i,`px;
|
|
66
|
-
}
|
|
67
|
-
`)},Xs=function(){var e=parseInt(document.body.getAttribute(qt)||"0",10);return isFinite(e)?e:0},wu=function(){G.useEffect(function(){return document.body.setAttribute(qt,(Xs()+1).toString()),function(){var e=Xs()-1;e<=0?document.body.removeAttribute(qt):document.body.setAttribute(qt,e.toString())}},[])},Su=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;wu();var s=G.useMemo(function(){return yu(o)},[o]);return G.createElement(bu,{styles:xu(s,!t,o,r?"":"!important")})},ho=!1;if(typeof window<"u")try{var Yr=Object.defineProperty({},"passive",{get:function(){return ho=!0,!0}});window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{ho=!1}var Ht=ho?{passive:!1}:!1,Cu=function(e){return e.tagName==="TEXTAREA"},ti=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Cu(e)&&r[t]==="visible")},Du=function(e){return ti(e,"overflowY")},_u=function(e){return ti(e,"overflowX")},Ks=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=ri(e,n);if(o){var s=ni(e,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Ru=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Eu=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},ri=function(e,t){return e==="v"?Du(t):_u(t)},ni=function(e,t){return e==="v"?Ru(t):Eu(t)},Nu=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tu=function(e,t,r,n,o){var s=Nu(e,window.getComputedStyle(t).direction),a=s*n,i=r.target,c=t.contains(i),l=!1,u=a>0,d=0,f=0;do{var m=ni(e,i),v=m[0],p=m[1],h=m[2],y=p-h-s*v;(v||y)&&ri(e,i)&&(d+=y,f+=v),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(l=!0),l},Hr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zs=function(e){return[e.deltaX,e.deltaY]},Js=function(e){return e&&"current"in e?e.current:e},Ou=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ku=function(e){return`
|
|
68
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
69
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
70
|
-
`)},$u=0,Ut=[];function ju(e){var t=G.useRef([]),r=G.useRef([0,0]),n=G.useRef(),o=G.useState($u++)[0],s=G.useState(ei)[0],a=G.useRef(e);G.useEffect(function(){a.current=e},[e]),G.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=eu([e.lockRef.current],(e.shards||[]).map(Js),!0).filter(Boolean);return p.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=G.useCallback(function(p,h){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var y=Hr(p),w=r.current,b="deltaX"in p?p.deltaX:w[0]-y[0],C="deltaY"in p?p.deltaY:w[1]-y[1],D,S=p.target,O=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in p&&O==="h"&&S.type==="range")return!1;var k=Ks(O,S);if(!k)return!0;if(k?D=O:(D=O==="v"?"h":"v",k=Ks(O,S)),!k)return!1;if(!n.current&&"changedTouches"in p&&(b||C)&&(n.current=D),!D)return!0;var j=n.current||D;return Tu(j,h,p,j==="h"?b:C)},[]),c=G.useCallback(function(p){var h=p;if(!(!Ut.length||Ut[Ut.length-1]!==s)){var y="deltaY"in h?Zs(h):Hr(h),w=t.current.filter(function(D){return D.name===h.type&&(D.target===h.target||h.target===D.shadowParent)&&Ou(D.delta,y)})[0];if(w&&w.should){h.cancelable&&h.preventDefault();return}if(!w){var b=(a.current.shards||[]).map(Js).filter(Boolean).filter(function(D){return D.contains(h.target)}),C=b.length>0?i(h,b[0]):!a.current.noIsolation;C&&h.cancelable&&h.preventDefault()}}},[]),l=G.useCallback(function(p,h,y,w){var b={name:p,delta:h,target:y,should:w,shadowParent:Au(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),u=G.useCallback(function(p){r.current=Hr(p),n.current=void 0},[]),d=G.useCallback(function(p){l(p.type,Zs(p),p.target,i(p,e.lockRef.current))},[]),f=G.useCallback(function(p){l(p.type,Hr(p),p.target,i(p,e.lockRef.current))},[]);G.useEffect(function(){return Ut.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ht),document.addEventListener("touchmove",c,Ht),document.addEventListener("touchstart",u,Ht),function(){Ut=Ut.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,Ht),document.removeEventListener("touchmove",c,Ht),document.removeEventListener("touchstart",u,Ht)}},[]);var m=e.removeScrollBar,v=e.inert;return G.createElement(G.Fragment,null,v?G.createElement(s,{styles:ku(o)}):null,m?G.createElement(Su,{gapMode:e.gapMode}):null)}function Au(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pu=lu(Qa,ju);var oi=G.forwardRef(function(e,t){return G.createElement(ln,ft({},e,{ref:t,sideCar:Pu}))});oi.classNames=ln.classNames;function Ao(e){return Object.keys(e)}function Mu(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Qn(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function si(e,{shouldScale:t=!1}={}){function r(n){if(n===0||n==="0")return`0${e}`;if(typeof n=="number"){const o=`${n/16}${e}`;return t?Qn(o):o}if(typeof n=="string"){if(n===""||n.startsWith("calc(")||n.startsWith("clamp(")||n.includes("rgba("))return n;if(n.includes(","))return n.split(",").map(s=>r(s)).join(",");if(n.includes(" "))return n.split(" ").map(s=>r(s)).join(" ");if(n.includes(e))return t?Qn(n):n;const o=n.replace("px","");if(!Number.isNaN(Number(o))){const s=`${Number(o)/16}${e}`;return t?Qn(s):s}}return n}return r}const _e=si("rem",{shouldScale:!0});si("em");function Po(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}function ai(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(n=>t.test(n))}return!1}function kr(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==x.Fragment:!1}function or(e){const t=x.createContext(null);return[({children:o,value:s})=>g.jsx(t.Provider,{value:s,children:o}),()=>{const o=x.useContext(t);if(o===null)throw new Error(e);return o}]}function un(e=null){const t=x.createContext(e);return[({children:o,value:s})=>g.jsx(t.Provider,{value:s,children:o}),()=>x.useContext(t)]}const Lu={app:100,modal:200,popover:300,overlay:400,max:9999};function Ft(e){return Lu[e]}const vo=()=>{};function Iu(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||vo:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function Ne(e,t="size",r=!0){if(e!==void 0)return ai(e)?r?_e(e):e:`var(--${t}-${e})`}function ii(e){return Ne(e,"mantine-spacing")}function Je(e){return e===void 0?"var(--mantine-radius-default)":Ne(e,"mantine-radius")}function Ie(e){return Ne(e,"mantine-font-size")}function Fu(e){return Ne(e,"mantine-line-height",!1)}function Mo(e){if(e)return Ne(e,"mantine-shadow",!1)}function Vu(){return typeof process<"u"&&process.env&&process.env.NODE_ENV?process.env.NODE_ENV:"development"}function ci(e){var r;const t=x.version;return typeof x.version!="string"||t.startsWith("18.")?e==null?void 0:e.ref:(r=e==null?void 0:e.props)==null?void 0:r.ref}function li(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=li(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Fe(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=li(e))&&(n&&(n+=" "),n+=t);return n}const zu={};function Bu(e){const t={};return e.forEach(r=>{Object.entries(r).forEach(([n,o])=>{t[n]?t[n]=Fe(t[n],o):t[n]=o})}),t}function dn({theme:e,classNames:t,props:r,stylesCtx:n}){const s=(Array.isArray(t)?t:[t]).map(a=>typeof a=="function"?a(e,r,n):a||zu);return Bu(s)}function nn({theme:e,styles:t,props:r,stylesCtx:n}){return(Array.isArray(t)?t:[t]).reduce((s,a)=>typeof a=="function"?{...s,...a(e,r,n)}:{...s,...a},{})}const Wu=x.createContext(null);function Vt(){const e=x.useContext(Wu);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function Yu(){return Vt().classNamesPrefix}function Hu(){return Vt().getStyleNonce}function Uu(){return Vt().withStaticClasses}function Gu(){return Vt().headless}function qu(){var e;return(e=Vt().stylesTransform)==null?void 0:e.sx}function Xu(){var e;return(e=Vt().stylesTransform)==null?void 0:e.styles}function ui(){return Vt().env||"default"}function Ku(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Zu(e){let t=e.replace("#","");if(t.length===3){const a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}if(t.length===8){const a=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a}}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,s=r&255;return{r:n,g:o,b:s,a:1}}function Ju(e){const[t,r,n,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:r,b:n,a:o||1}}function Qu(e){const t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=e.match(t);if(!r)return{r:0,g:0,b:0,a:1};const n=parseInt(r[1],10),o=parseInt(r[2],10)/100,s=parseInt(r[3],10)/100,a=r[5]?parseFloat(r[5]):void 0,i=(1-Math.abs(2*s-1))*o,c=n/60,l=i*(1-Math.abs(c%2-1)),u=s-i/2;let d,f,m;return c>=0&&c<1?(d=i,f=l,m=0):c>=1&&c<2?(d=l,f=i,m=0):c>=2&&c<3?(d=0,f=i,m=l):c>=3&&c<4?(d=0,f=l,m=i):c>=4&&c<5?(d=l,f=0,m=i):(d=i,f=0,m=l),{r:Math.round((d+u)*255),g:Math.round((f+u)*255),b:Math.round((m+u)*255),a:a||1}}function di(e){return Ku(e)?Zu(e):e.startsWith("rgb")?Ju(e):e.startsWith("hsl")?Qu(e):{r:0,g:0,b:0,a:1}}function ed(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function eo(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function td(e){const t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function rd(e){if(e.startsWith("oklch("))return(td(e)||0)/100;const{r:t,g:r,b:n}=di(e),o=t/255,s=r/255,a=n/255,i=eo(o),c=eo(s),l=eo(a);return .2126*i+.7152*c+.0722*l}function xr(e,t=.179){return e.startsWith("var(")?!1:rd(e)>t}function sr({color:e,theme:t,colorScheme:r}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:r==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:xr(r==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:r==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:xr(r==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:xr(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};const[n,o]=e.split("."),s=o?Number(o):void 0,a=n in t.colors;if(a){const i=s!==void 0?t.colors[n][s]:t.colors[n][ed(t,r||"light")];return{color:n,value:i,shade:s,isThemeColor:a,isLight:xr(i,t.luminanceThreshold),variable:o?`--mantine-color-${n}-${s}`:`--mantine-color-${n}-filled`}}return{color:e,value:e,isThemeColor:a,isLight:xr(e,t.luminanceThreshold),shade:s,variable:void 0}}function xt(e,t){const r=sr({color:e||t.primaryColor,theme:t});return r.variable?`var(${r.variable})`:e}function nd(e,t){const r={from:(e==null?void 0:e.from)||t.defaultGradient.from,to:(e==null?void 0:e.to)||t.defaultGradient.to,deg:(e==null?void 0:e.deg)??t.defaultGradient.deg??0},n=xt(r.from,t),o=xt(r.to,t);return`linear-gradient(${r.deg}deg, ${n} 0%, ${o} 100%)`}function od(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){const s=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${s}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);const{r,g:n,b:o}=di(e);return`rgba(${r}, ${n}, ${o}, ${t})`}const sd=x.createContext(null);function ar(){const e=x.useContext(sd);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function fi({color:e,theme:t,autoContrast:r}){return(typeof r=="boolean"?r:t.autoContrast)&&sr({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function St({classNames:e,styles:t,props:r,stylesCtx:n}){const o=ar();return{resolvedClassNames:dn({theme:o,classNames:e,props:r,stylesCtx:n||void 0}),resolvedStyles:nn({theme:o,styles:t,props:r,stylesCtx:n||void 0})}}const ad={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function id({theme:e,options:t,unstyled:r}){return Fe((t==null?void 0:t.focusable)&&!r&&(e.focusClassName||ad[e.focusRing]),(t==null?void 0:t.active)&&!r&&e.activeClassName)}function cd({selector:e,stylesCtx:t,options:r,props:n,theme:o}){return dn({theme:o,classNames:r==null?void 0:r.classNames,props:(r==null?void 0:r.props)||n,stylesCtx:t})[e]}function Qs({selector:e,stylesCtx:t,theme:r,classNames:n,props:o}){return dn({theme:r,classNames:n,props:o,stylesCtx:t})[e]}function ld({rootSelector:e,selector:t,className:r}){return e===t?r:void 0}function ud({selector:e,classes:t,unstyled:r}){return r?void 0:t[e]}function dd({themeName:e,classNamesPrefix:t,selector:r,withStaticClass:n}){return n===!1?[]:e.map(o=>`${t}-${o}-${r}`)}function fd({themeName:e,theme:t,selector:r,props:n,stylesCtx:o}){return e.map(s=>{var a,i;return(i=dn({theme:t,classNames:(a=t.components[s])==null?void 0:a.classNames,props:n,stylesCtx:o}))==null?void 0:i[r]})}function md({options:e,classes:t,selector:r,unstyled:n}){return e!=null&&e.variant&&!n?t[`${r}--${e.variant}`]:void 0}function pd({theme:e,options:t,themeName:r,selector:n,classNamesPrefix:o,classNames:s,classes:a,unstyled:i,className:c,rootSelector:l,props:u,stylesCtx:d,withStaticClasses:f,headless:m,transformedStyles:v}){return Fe(id({theme:e,options:t,unstyled:i||m}),fd({theme:e,themeName:r,selector:n,props:u,stylesCtx:d}),md({options:t,classes:a,selector:n,unstyled:i}),Qs({selector:n,stylesCtx:d,theme:e,classNames:s,props:u}),Qs({selector:n,stylesCtx:d,theme:e,classNames:v,props:u}),cd({selector:n,stylesCtx:d,options:t,props:u,theme:e}),ld({rootSelector:l,selector:n,className:c}),ud({selector:n,classes:a,unstyled:i||m}),f&&!m&&dd({themeName:r,classNamesPrefix:o,selector:n,withStaticClass:t==null?void 0:t.withStaticClass}),t==null?void 0:t.className)}function hd({theme:e,themeName:t,props:r,stylesCtx:n,selector:o}){return t.map(s=>{var a;return nn({theme:e,styles:(a=e.components[s])==null?void 0:a.styles,props:r,stylesCtx:n})[o]}).reduce((s,a)=>({...s,...a}),{})}function go({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...go({style:n,theme:t})}),{}):typeof e=="function"?e(t):e??{}}function vd(e){return e.reduce((t,r)=>(r&&Object.keys(r).forEach(n=>{t[n]={...t[n],...Po(r[n])}}),t),{})}function gd({vars:e,varsResolver:t,theme:r,props:n,stylesCtx:o,selector:s,themeName:a,headless:i}){var c;return(c=vd([i?{}:t==null?void 0:t(r,n,o),...a.map(l=>{var u,d,f;return(f=(d=(u=r.components)==null?void 0:u[l])==null?void 0:d.vars)==null?void 0:f.call(d,r,n,o)}),e==null?void 0:e(r,n,o)]))==null?void 0:c[s]}function yd({theme:e,themeName:t,selector:r,options:n,props:o,stylesCtx:s,rootSelector:a,styles:i,style:c,vars:l,varsResolver:u,headless:d,withStylesTransform:f}){return{...!f&&hd({theme:e,themeName:t,props:o,stylesCtx:s,selector:r}),...!f&&nn({theme:e,styles:i,props:o,stylesCtx:s})[r],...!f&&nn({theme:e,styles:n==null?void 0:n.styles,props:(n==null?void 0:n.props)||o,stylesCtx:s})[r],...gd({theme:e,props:o,stylesCtx:s,vars:l,varsResolver:u,selector:r,themeName:t,headless:d}),...a===r?go({style:c,theme:e}):null,...go({style:n==null?void 0:n.style,theme:e})}}function bd({props:e,stylesCtx:t,themeName:r}){var a;const n=ar(),o=(a=Xu())==null?void 0:a();return{getTransformedStyles:i=>o?[...i.map(l=>o(l,{props:e,theme:n,ctx:t})),...r.map(l=>{var u;return o((u=n.components[l])==null?void 0:u.styles,{props:e,theme:n,ctx:t})})].filter(Boolean):[],withStylesTransform:!!o}}function ye({name:e,classes:t,props:r,stylesCtx:n,className:o,style:s,rootSelector:a="root",unstyled:i,classNames:c,styles:l,vars:u,varsResolver:d}){const f=ar(),m=Yu(),v=Uu(),p=Gu(),h=(Array.isArray(e)?e:[e]).filter(b=>b),{withStylesTransform:y,getTransformedStyles:w}=bd({props:r,stylesCtx:n,themeName:h});return(b,C)=>({className:pd({theme:f,options:C,themeName:h,selector:b,classNamesPrefix:m,classNames:c,classes:t,unstyled:i,className:o,rootSelector:a,props:r,stylesCtx:n,withStaticClasses:v,headless:p,transformedStyles:w([C==null?void 0:C.styles,l])}),style:yd({theme:f,themeName:h,selector:b,options:C,props:r,stylesCtx:n,rootSelector:a,styles:l,style:s,vars:u,varsResolver:d,headless:p,withStylesTransform:y})})}function mi(e,t){return typeof e=="boolean"?e:t.autoContrast}function K(e,t,r){var a;const n=ar(),o=(a=n.components[e])==null?void 0:a.defaultProps,s=typeof o=="function"?o(n):o;return{...t,...s,...Po(r)}}function to(e){return Ao(e).reduce((t,r)=>e[r]!==void 0?`${t}${Mu(r)}:${e[r]};`:t,"").trim()}function xd({selector:e,styles:t,media:r,container:n}){const o=t?to(t):"",s=Array.isArray(r)?r.map(i=>`@media${i.query}{${e}{${to(i.styles)}}}`):[],a=Array.isArray(n)?n.map(i=>`@container ${i.query}{${e}{${to(i.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${s.join("")}${a.join("")}`.trim()}function wd(e){const t=Hu();return g.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:xd(e)}})}function fn(e){const{m:t,mx:r,my:n,mt:o,mb:s,ml:a,mr:i,me:c,ms:l,p:u,px:d,py:f,pt:m,pb:v,pl:p,pr:h,pe:y,ps:w,bd:b,bg:C,c:D,opacity:S,ff:O,fz:k,fw:j,lts:P,ta:L,lh:V,fs:z,tt:M,td:$,w:_,miw:E,maw:T,h:N,mih:I,mah:A,bgsz:B,bgp:Y,bgr:te,bga:F,pos:Q,top:re,left:ae,bottom:Z,right:le,inset:ie,display:pe,flex:X,hiddenFrom:me,visibleFrom:fe,lightHidden:ge,darkHidden:U,sx:J,...ee}=e;return{styleProps:Po({m:t,mx:r,my:n,mt:o,mb:s,ml:a,mr:i,me:c,ms:l,p:u,px:d,py:f,pt:m,pb:v,pl:p,pr:h,pe:y,ps:w,bd:b,bg:C,c:D,opacity:S,ff:O,fz:k,fw:j,lts:P,ta:L,lh:V,fs:z,tt:M,td:$,w:_,miw:E,maw:T,h:N,mih:I,mah:A,bgsz:B,bgp:Y,bgr:te,bga:F,pos:Q,top:re,left:ae,bottom:Z,right:le,inset:ie,display:pe,flex:X,hiddenFrom:me,visibleFrom:fe,lightHidden:ge,darkHidden:U,sx:J}),rest:ee}}const Sd={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function Lo(e,t){const r=sr({color:e,theme:t});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}function Cd(e,t){const r=sr({color:e,theme:t});return r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:Lo(e,t)}function Dd(e,t){if(typeof e=="number")return _e(e);if(typeof e=="string"){const[r,n,...o]=e.split(" ").filter(a=>a.trim()!=="");let s=`${_e(r)}`;return n&&(s+=` ${n}`),o.length>0&&(s+=` ${Lo(o.join(" "),t)}`),s.trim()}return e}const ea={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function _d(e){return typeof e=="string"&&e in ea?ea[e]:e}const Rd=["h1","h2","h3","h4","h5","h6"];function Ed(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&Rd.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?_e(e):e}function Nd(e){return e}const Td=["h1","h2","h3","h4","h5","h6"];function Od(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&Td.includes(e)?`var(--mantine-${e}-line-height)`:e}function kd(e){return typeof e=="number"?_e(e):e}function $d(e,t){if(typeof e=="number")return _e(e);if(typeof e=="string"){const r=e.replace("-","");if(!(r in t.spacing))return _e(e);const n=`--mantine-spacing-${r}`;return e.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return e}const ro={color:Lo,textColor:Cd,fontSize:Ed,spacing:$d,identity:Nd,size:kd,lineHeight:Od,fontFamily:_d,border:Dd};function ta(e){return e.replace("(min-width: ","").replace("em)","")}function jd({media:e,...t}){const n=Object.keys(e).sort((o,s)=>Number(ta(o))-Number(ta(s))).map(o=>({query:o,styles:e[o]}));return{...t,media:n}}function Ad(e){if(typeof e!="object"||e===null)return!1;const t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function Pd(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function Md(e){return typeof e=="object"&&e!==null?Ao(e).filter(t=>t!=="base"):[]}function Ld(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function Id({styleProps:e,data:t,theme:r}){return jd(Ao(e).reduce((n,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return n;const s=t[o],a=Array.isArray(s.property)?s.property:[s.property],i=Pd(e[o]);if(!Ad(e[o]))return a.forEach(l=>{n.inlineStyles[l]=ro[s.type](i,r)}),n;n.hasResponsiveStyles=!0;const c=Md(e[o]);return a.forEach(l=>{i&&(n.styles[l]=ro[s.type](i,r)),c.forEach(u=>{const d=`(min-width: ${r.breakpoints[u]})`;n.media[d]={...n.media[d],[l]:ro[s.type](Ld(e[o],u),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Fd(){return`__m__-${x.useId().replace(/:/g,"")}`}function pi(e){return e.startsWith("data-")?e:`data-${e}`}function Vd(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return n===void 0||n===""||n===!1||n===null||(t[pi(r)]=e[r]),t},{})}function hi(e){return e?typeof e=="string"?{[pi(e)]:!0}:Array.isArray(e)?[...e].reduce((t,r)=>({...t,...hi(r)}),{}):Vd(e):null}function yo(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...yo(n,t)}),{}):typeof e=="function"?e(t):e??{}}function zd({theme:e,style:t,vars:r,styleProps:n}){const o=yo(t,e),s=yo(r,e);return{...o,...s,...n}}const vi=x.forwardRef(({component:e,style:t,__vars:r,className:n,variant:o,mod:s,size:a,hiddenFrom:i,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,...m},v)=>{var k;const p=ar(),h=e||"div",{styleProps:y,rest:w}=fn(m),b=qu(),C=(k=b==null?void 0:b())==null?void 0:k(y.sx),D=Fd(),S=Id({styleProps:y,theme:p,data:Sd}),O={ref:v,style:zd({theme:p,style:t,vars:r,styleProps:S.inlineStyles}),className:Fe(n,C,{[D]:S.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${i}`]:i,[`mantine-visible-from-${c}`]:c}),"data-variant":o,"data-size":ai(a)?void 0:a||void 0,size:f,...hi(s),...w};return g.jsxs(g.Fragment,{children:[S.hasResponsiveStyles&&g.jsx(wd,{selector:`.${D}`,styles:S.styles,media:S.media}),typeof d=="function"?d(O):g.jsx(h,{...O})]})});vi.displayName="@mantine/core/Box";const ue=vi;function gi(e){return e}function se(e){const t=x.forwardRef(e);return t.extend=gi,t.withProps=r=>{const n=x.forwardRef((o,s)=>g.jsx(t,{...r,...o,ref:s}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Ct(e){const t=x.forwardRef(e);return t.withProps=r=>{const n=x.forwardRef((o,s)=>g.jsx(t,{...r,...o,ref:s}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=gi,t}const Bd=x.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Io(){return x.useContext(Bd)}function mn(){return typeof window<"u"}function ir(e){return yi(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gt(e){var t;return(t=(yi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yi(e){return mn()?e instanceof Node||e instanceof et(e).Node:!1}function Ye(e){return mn()?e instanceof Element||e instanceof et(e).Element:!1}function vt(e){return mn()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function ra(e){return!mn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function $r(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Wd(e){return["table","td","th"].includes(ir(e))}function pn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fo(e){const t=Vo(),r=Ye(e)?ct(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Yd(e){let t=Ot(e);for(;vt(t)&&!Zt(t);){if(Fo(t))return t;if(pn(t))return null;t=Ot(t)}return null}function Vo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zt(e){return["html","body","#document"].includes(ir(e))}function ct(e){return et(e).getComputedStyle(e)}function hn(e){return Ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ot(e){if(ir(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ra(e)&&e.host||gt(e);return ra(t)?t.host:t}function bi(e){const t=Ot(e);return Zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:vt(t)&&$r(t)?t:bi(t)}function Dr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=bi(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=et(o);if(s){const i=bo(a);return t.concat(a,a.visualViewport||[],$r(o)?o:[],i&&r?Dr(i):[])}return t.concat(o,Dr(o,[],r))}function bo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const lt=Math.min,We=Math.max,on=Math.round,Ur=Math.floor,mt=e=>({x:e,y:e}),Hd={left:"right",right:"left",bottom:"top",top:"bottom"},Ud={start:"end",end:"start"};function xo(e,t,r){return We(e,lt(t,r))}function wt(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function cr(e){return e.split("-")[1]}function zo(e){return e==="x"?"y":"x"}function Bo(e){return e==="y"?"height":"width"}function pt(e){return["top","bottom"].includes(ut(e))?"y":"x"}function Wo(e){return zo(pt(e))}function Gd(e,t,r){r===void 0&&(r=!1);const n=cr(e),o=Wo(e),s=Bo(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=sn(a)),[a,sn(a)]}function qd(e){const t=sn(e);return[wo(e),t,wo(t)]}function wo(e){return e.replace(/start|end/g,t=>Ud[t])}function Xd(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:a;default:return[]}}function Kd(e,t,r,n){const o=cr(e);let s=Xd(ut(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(wo)))),s}function sn(e){return e.replace(/left|right|bottom|top/g,t=>Hd[t])}function Zd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yo(e){return typeof e!="number"?Zd(e):{top:e,right:e,bottom:e,left:e}}function Jt(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function na(e,t,r){let{reference:n,floating:o}=e;const s=pt(t),a=Wo(t),i=Bo(a),c=ut(t),l=s==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[i]/2-o[i]/2;let m;switch(c){case"top":m={x:u,y:n.y-o.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-o.width,y:d};break;default:m={x:n.x,y:n.y}}switch(cr(t)){case"start":m[a]-=f*(r&&l?-1:1);break;case"end":m[a]+=f*(r&&l?-1:1);break}return m}const Jd=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=na(l,n,c),f=n,m={},v=0;for(let p=0;p<i.length;p++){const{name:h,fn:y}=i[p],{x:w,y:b,data:C,reset:D}=await y({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});u=w??u,d=b??d,m={...m,[h]:{...m[h],...C}},D&&v<=50&&(v++,typeof D=="object"&&(D.placement&&(f=D.placement),D.rects&&(l=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):D.rects),{x:u,y:d}=na(l,f,c)),p=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};async function Ho(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=wt(t,e),v=Yo(m),h=i[f?d==="floating"?"reference":"floating":d],y=Jt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(h)))==null||r?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),w=d==="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)),C=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},D=Jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:b,strategy:c}):w);return{top:(y.top-D.top+v.top)/C.y,bottom:(D.bottom-y.bottom+v.bottom)/C.y,left:(y.left-D.left+v.left)/C.x,right:(D.right-y.right+v.right)/C.x}}const Qd=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=wt(e,t)||{};if(l==null)return{};const d=Yo(u),f={x:r,y:n},m=Wo(o),v=Bo(m),p=await a.getDimensions(l),h=m==="y",y=h?"top":"left",w=h?"bottom":"right",b=h?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[m]-f[m]-s.floating[v],D=f[m]-s.reference[m],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let O=S?S[b]:0;(!O||!await(a.isElement==null?void 0:a.isElement(S)))&&(O=i.floating[b]||s.floating[v]);const k=C/2-D/2,j=O/2-p[v]/2-1,P=lt(d[y],j),L=lt(d[w],j),V=P,z=O-p[v]-L,M=O/2-p[v]/2+k,$=xo(V,M,z),_=!c.arrow&&cr(o)!=null&&M!==$&&s.reference[v]/2-(M<V?P:L)-p[v]/2<0,E=_?M<V?M-V:M-z:0;return{[m]:f[m]+E,data:{[m]:$,centerOffset:M-$-E,..._&&{alignmentOffset:E}},reset:_}}}),ef=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...h}=wt(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=ut(o),w=pt(i),b=ut(i)===i,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),D=f||(b||!p?[sn(i)]:qd(i)),S=v!=="none";!f&&S&&D.push(...Kd(i,p,v,C));const O=[i,...D],k=await Ho(t,h),j=[];let P=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&j.push(k[y]),d){const $=Gd(o,a,C);j.push(k[$[0]],k[$[1]])}if(P=[...P,{placement:o,overflows:j}],!j.every($=>$<=0)){var L,V;const $=(((L=s.flip)==null?void 0:L.index)||0)+1,_=O[$];if(_){var z;const T=d==="alignment"?w!==pt(_):!1,N=((z=P[0])==null?void 0:z.overflows[0])>0;if(!T||N)return{data:{index:$,overflows:P},reset:{placement:_}}}let E=(V=P.filter(T=>T.overflows[0]<=0).sort((T,N)=>T.overflows[1]-N.overflows[1])[0])==null?void 0:V.placement;if(!E)switch(m){case"bestFit":{var M;const T=(M=P.filter(N=>{if(S){const I=pt(N.placement);return I===w||I==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(I=>I>0).reduce((I,A)=>I+A,0)]).sort((N,I)=>N[1]-I[1])[0])==null?void 0:M[0];T&&(E=T);break}case"initialPlacement":E=i;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function xi(e){const t=lt(...e.map(s=>s.left)),r=lt(...e.map(s=>s.top)),n=We(...e.map(s=>s.right)),o=We(...e.map(s=>s.bottom));return{x:t,y:r,width:n-t,height:o-r}}function tf(e){const t=e.slice().sort((o,s)=>o.y-s.y),r=[];let n=null;for(let o=0;o<t.length;o++){const s=t[o];!n||s.y-n.y>n.height/2?r.push([s]):r[r.length-1].push(s),n=s}return r.map(o=>Jt(xi(o)))}const rf=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:s,strategy:a}=t,{padding:i=2,x:c,y:l}=wt(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),d=tf(u),f=Jt(xi(u)),m=Yo(i);function v(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(h=>c>h.left-m.left&&c<h.right+m.right&&l>h.top-m.top&&l<h.bottom+m.bottom)||f;if(d.length>=2){if(pt(r)==="y"){const P=d[0],L=d[d.length-1],V=ut(r)==="top",z=P.top,M=L.bottom,$=V?P.left:L.left,_=V?P.right:L.right,E=_-$,T=M-z;return{top:z,bottom:M,left:$,right:_,width:E,height:T,x:$,y:z}}const h=ut(r)==="left",y=We(...d.map(P=>P.right)),w=lt(...d.map(P=>P.left)),b=d.filter(P=>h?P.left===w:P.right===y),C=b[0].top,D=b[b.length-1].bottom,S=w,O=y,k=O-S,j=D-C;return{top:C,bottom:D,left:S,right:O,width:k,height:j,x:S,y:C}}return f}const p=await s.getElementRects({reference:{getBoundingClientRect:v},floating:n.floating,strategy:a});return o.reference.x!==p.reference.x||o.reference.y!==p.reference.y||o.reference.width!==p.reference.width||o.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}};async function nf(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=ut(r),i=cr(r),c=pt(r)==="y",l=["left","top"].includes(a)?-1:1,u=s&&c?-1:1,d=wt(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof v=="number"&&(m=i==="end"?v*-1:v),c?{x:m*u,y:f*l}:{x:f*l,y:m*u}}const of=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await nf(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},sf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:h=>{let{x:y,y:w}=h;return{x:y,y:w}}},...c}=wt(e,t),l={x:r,y:n},u=await Ho(t,c),d=pt(ut(o)),f=zo(d);let m=l[f],v=l[d];if(s){const h=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=m+u[h],b=m-u[y];m=xo(w,m,b)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",w=v+u[h],b=v-u[y];v=xo(w,v,b)}const p=i.fn({...t,[f]:m,[d]:v});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[f]:s,[d]:a}}}}}},af=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=wt(e,t),u={x:r,y:n},d=pt(o),f=zo(d);let m=u[f],v=u[d];const p=wt(i,t),h=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=f==="y"?"height":"width",C=s.reference[f]-s.floating[b]+h.mainAxis,D=s.reference[f]+s.reference[b]-h.mainAxis;m<C?m=C:m>D&&(m=D)}if(l){var y,w;const b=f==="y"?"width":"height",C=["top","left"].includes(ut(o)),D=s.reference[d]-s.floating[b]+(C&&((y=a.offset)==null?void 0:y[d])||0)+(C?0:h.crossAxis),S=s.reference[d]+s.reference[b]+(C?0:((w=a.offset)==null?void 0:w[d])||0)-(C?h.crossAxis:0);v<D?v=D:v>S&&(v=S)}return{[f]:m,[d]:v}}}},cf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...l}=wt(e,t),u=await Ho(t,l),d=ut(o),f=cr(o),m=pt(o)==="y",{width:v,height:p}=s.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const w=p-u.top-u.bottom,b=v-u.left-u.right,C=lt(p-u[h],w),D=lt(v-u[y],b),S=!t.middlewareData.shift;let O=C,k=D;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=w),S&&!f){const P=We(u.left,0),L=We(u.right,0),V=We(u.top,0),z=We(u.bottom,0);m?k=v-2*(P!==0||L!==0?P+L:We(u.left,u.right)):O=p-2*(V!==0||z!==0?V+z:We(u.top,u.bottom))}await c({...t,availableWidth:k,availableHeight:O});const j=await a.getDimensions(i.floating);return v!==j.width||p!==j.height?{reset:{rects:!0}}:{}}}};function wi(e){const t=ct(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=vt(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=on(r)!==s||on(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function Uo(e){return Ye(e)?e:e.contextElement}function Xt(e){const t=Uo(e);if(!vt(t))return mt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=wi(t);let a=(s?on(r.width):r.width)/n,i=(s?on(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const lf=mt(0);function Si(e){const t=et(e);return!Vo()||!t.visualViewport?lf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==et(e)?!1:t}function It(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Uo(e);let a=mt(1);t&&(n?Ye(n)&&(a=Xt(n)):a=Xt(e));const i=uf(s,r,n)?Si(s):mt(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(s){const f=et(s),m=n&&Ye(n)?et(n):n;let v=f,p=bo(v);for(;p&&n&&m!==v;){const h=Xt(p),y=p.getBoundingClientRect(),w=ct(p),b=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,C=y.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;c*=h.x,l*=h.y,u*=h.x,d*=h.y,c+=b,l+=C,v=et(p),p=bo(v)}}return Jt({width:u,height:d,x:c,y:l})}function Go(e,t){const r=hn(e).scrollLeft;return t?t.left+r:It(gt(e)).left+r}function Ci(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Go(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function df(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=gt(n),i=t?pn(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},l=mt(1);const u=mt(0),d=vt(n);if((d||!d&&!s)&&((ir(n)!=="body"||$r(a))&&(c=hn(n)),vt(n))){const m=It(n);l=Xt(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const f=a&&!d&&!s?Ci(a,c,!0):mt(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:r.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ff(e){return Array.from(e.getClientRects())}function mf(e){const t=gt(e),r=hn(e),n=e.ownerDocument.body,o=We(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=We(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Go(e);const i=-r.scrollTop;return ct(n).direction==="rtl"&&(a+=We(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}function pf(e,t){const r=et(e),n=gt(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const l=Vo();(!l||l&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}function hf(e,t){const r=It(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=vt(e)?Xt(e):mt(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:a,height:i,x:c,y:l}}function oa(e,t,r){let n;if(t==="viewport")n=pf(e,r);else if(t==="document")n=mf(gt(e));else if(Ye(t))n=hf(t,r);else{const o=Si(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Jt(n)}function Di(e,t){const r=Ot(e);return r===t||!Ye(r)||Zt(r)?!1:ct(r).position==="fixed"||Di(r,t)}function vf(e,t){const r=t.get(e);if(r)return r;let n=Dr(e,[],!1).filter(i=>Ye(i)&&ir(i)!=="body"),o=null;const s=ct(e).position==="fixed";let a=s?Ot(e):e;for(;Ye(a)&&!Zt(a);){const i=ct(a),c=Fo(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$r(a)&&!c&&Di(e,a))?n=n.filter(u=>u!==a):o=i,a=Ot(a)}return t.set(e,n),n}function gf(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?pn(t)?[]:vf(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const d=oa(t,u,o);return l.top=We(d.top,l.top),l.right=lt(d.right,l.right),l.bottom=lt(d.bottom,l.bottom),l.left=We(d.left,l.left),l},oa(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yf(e){const{width:t,height:r}=wi(e);return{width:t,height:r}}function bf(e,t,r){const n=vt(t),o=gt(t),s=r==="fixed",a=It(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=mt(0);function l(){c.x=Go(o)}if(n||!n&&!s)if((ir(t)!=="body"||$r(o))&&(i=hn(t)),n){const m=It(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!n&&o&&l();const u=o&&!n&&!s?Ci(o,i):mt(0),d=a.left+i.scrollLeft-c.x-u.x,f=a.top+i.scrollTop-c.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function no(e){return ct(e).position==="static"}function sa(e,t){if(!vt(e)||ct(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return gt(e)===r&&(r=r.ownerDocument.body),r}function _i(e,t){const r=et(e);if(pn(e))return r;if(!vt(e)){let o=Ot(e);for(;o&&!Zt(o);){if(Ye(o)&&!no(o))return o;o=Ot(o)}return r}let n=sa(e,t);for(;n&&Wd(n)&&no(n);)n=sa(n,t);return n&&Zt(n)&&no(n)&&!Fo(n)?r:n||Yd(e)||r}const xf=async function(e){const t=this.getOffsetParent||_i,r=this.getDimensions,n=await r(e.floating);return{reference:bf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function wf(e){return ct(e).direction==="rtl"}const Sf={convertOffsetParentRelativeRectToViewportRelativeRect:df,getDocumentElement:gt,getClippingRect:gf,getOffsetParent:_i,getElementRects:xf,getClientRects:ff,getDimensions:yf,getScale:Xt,isElement:Ye,isRTL:wf};function Ri(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cf(e,t){let r=null,n;const o=gt(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=l;if(i||t(),!f||!m)return;const v=Ur(d),p=Ur(o.clientWidth-(u+f)),h=Ur(o.clientHeight-(d+m)),y=Ur(u),b={rootMargin:-v+"px "+-p+"px "+-h+"px "+-y+"px",threshold:We(0,lt(1,c))||1};let C=!0;function D(S){const O=S[0].intersectionRatio;if(O!==c){if(!C)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Ri(l,e.getBoundingClientRect())&&a(),C=!1}try{r=new IntersectionObserver(D,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(D,b)}r.observe(e)}return a(!0),s}function Df(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=Uo(e),u=o||s?[...l?Dr(l):[],...Dr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const d=l&&i?Cf(l,r):null;let f=-1,m=null;a&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),r()}),l&&!c&&m.observe(l),m.observe(t));let v,p=c?It(e):null;c&&h();function h(){const y=It(e);p&&!Ri(p,y)&&r(),p=y,v=requestAnimationFrame(h)}return r(),()=>{var y;u.forEach(w=>{o&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const _f=of,Rf=sf,Ef=ef,Nf=cf,aa=Qd,Tf=rf,Of=af,kf=(e,t,r)=>{const n=new Map,o={platform:Sf,...r},s={...o.platform,_c:n};return Jd(e,t,{...o,platform:s})};var Kr=typeof document<"u"?x.useLayoutEffect:x.useEffect;function an(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!an(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!an(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ei(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ia(e,t){const r=Ei(e);return Math.round(t*r)/r}function oo(e){const t=G.useRef(e);return Kr(()=>{t.current=e}),t}function $f(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,d]=G.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=G.useState(n);an(f,n)||m(n);const[v,p]=G.useState(null),[h,y]=G.useState(null),w=G.useCallback(T=>{T!==S.current&&(S.current=T,p(T))},[]),b=G.useCallback(T=>{T!==O.current&&(O.current=T,y(T))},[]),C=s||v,D=a||h,S=G.useRef(null),O=G.useRef(null),k=G.useRef(u),j=c!=null,P=oo(c),L=oo(o),V=oo(l),z=G.useCallback(()=>{if(!S.current||!O.current)return;const T={placement:t,strategy:r,middleware:f};L.current&&(T.platform=L.current),kf(S.current,O.current,T).then(N=>{const I={...N,isPositioned:V.current!==!1};M.current&&!an(k.current,I)&&(k.current=I,pl.flushSync(()=>{d(I)}))})},[f,t,r,L,V]);Kr(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[l]);const M=G.useRef(!1);Kr(()=>(M.current=!0,()=>{M.current=!1}),[]),Kr(()=>{if(C&&(S.current=C),D&&(O.current=D),C&&D){if(P.current)return P.current(C,D,z);z()}},[C,D,z,P,j]);const $=G.useMemo(()=>({reference:S,floating:O,setReference:w,setFloating:b}),[w,b]),_=G.useMemo(()=>({reference:C,floating:D}),[C,D]),E=G.useMemo(()=>{const T={position:r,left:0,top:0};if(!_.floating)return T;const N=ia(_.floating,u.x),I=ia(_.floating,u.y);return i?{...T,transform:"translate("+N+"px, "+I+"px)",...Ei(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:I}},[r,i,_.floating,u.x,u.y]);return G.useMemo(()=>({...u,update:z,refs:$,elements:_,floatingStyles:E}),[u,z,$,_,E])}const jf=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?aa({element:n.current,padding:o}).fn(r):{}:n?aa({element:n,padding:o}).fn(r):{}}}},Af=(e,t)=>({..._f(e),options:[e,t]}),Pf=(e,t)=>({...Rf(e),options:[e,t]}),ca=(e,t)=>({...Of(e),options:[e,t]}),la=(e,t)=>({...Ef(e),options:[e,t]}),Mf=(e,t)=>({...Nf(e),options:[e,t]}),ua=(e,t)=>({...Tf(e),options:[e,t]}),Lf=(e,t)=>({...jf(e),options:[e,t]});function If(e){return G.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}const Ni={...G},Ff=Ni.useInsertionEffect,Vf=Ff||(e=>e());function zf(e){const t=G.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Vf(()=>{t.current=e}),G.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var So=typeof document<"u"?x.useLayoutEffect:x.useEffect;let da=!1,Bf=0;const fa=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Bf++;function Wf(){const[e,t]=G.useState(()=>da?fa():void 0);return So(()=>{e==null&&t(fa())},[]),G.useEffect(()=>{da=!0},[]),e}const Yf=Ni.useId,Hf=Yf||Wf;let Co;process.env.NODE_ENV!=="production"&&(Co=new Set);function Uf(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=Co)!=null&&e.has(o))){var s;(s=Co)==null||s.add(o),console.error(o)}}function Gf(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const qf=G.createContext(null),Xf=G.createContext(null),Kf=()=>{var e;return((e=G.useContext(qf))==null?void 0:e.id)||null},Zf=()=>G.useContext(Xf);function Jf(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=Hf(),s=G.useRef({}),[a]=G.useState(()=>Gf()),i=Kf()!=null;if(process.env.NODE_ENV!=="production"){const m=n.reference;m&&!Ye(m)&&Uf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=G.useState(n.reference),u=zf((m,v,p)=>{s.current.openEvent=m?v:void 0,a.emit("openchange",{open:m,event:v,reason:p,nested:i}),r==null||r(m,v,p)}),d=G.useMemo(()=>({setPositionReference:l}),[]),f=G.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return G.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Qf(e){e===void 0&&(e={});const{nodeId:t}=e,r=Jf({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,a]=G.useState(null),[i,c]=G.useState(null),u=(o==null?void 0:o.domReference)||s,d=G.useRef(null),f=Zf();So(()=>{u&&(d.current=u)},[u]);const m=$f({...e,elements:{...o,...i&&{reference:i}}}),v=G.useCallback(b=>{const C=Ye(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;c(C),m.refs.setReference(C)},[m.refs]),p=G.useCallback(b=>{(Ye(b)||b===null)&&(d.current=b,a(b)),(Ye(m.refs.reference.current)||m.refs.reference.current===null||b!==null&&!Ye(b))&&m.refs.setReference(b)},[m.refs]),h=G.useMemo(()=>({...m.refs,setReference:p,setPositionReference:v,domReference:d}),[m.refs,p,v]),y=G.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),w=G.useMemo(()=>({...m,...n,refs:h,elements:y,nodeId:t}),[m,h,y,t,n]);return So(()=>{n.dataRef.current.floatingContext=w;const b=f==null?void 0:f.nodesRef.current.find(C=>C.id===t);b&&(b.context=w)}),G.useMemo(()=>({...m,context:w,refs:h,elements:y}),[m,h,y,w])}const[em,nt]=or("ScrollArea.Root component was not found in tree");function Qt(e,t){const r=Pt(t);jo(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const tm=x.forwardRef((e,t)=>{const{style:r,...n}=e,o=nt(),[s,a]=x.useState(0),[i,c]=x.useState(0),l=!!(s&&i);return Qt(o.scrollbarX,()=>{var d;const u=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(u),c(u)}),Qt(o.scrollbarY,()=>{var d;const u=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(u),a(u)}),l?g.jsx("div",{...n,ref:t,style:{...r,width:s,height:i}}):null}),rm=x.forwardRef((e,t)=>{const r=nt(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?g.jsx(tm,{...e,ref:t}):null}),nm={scrollHideDelay:1e3,type:"hover"},Ti=x.forwardRef((e,t)=>{const r=K("ScrollAreaRoot",nm,e),{type:n,scrollHideDelay:o,scrollbars:s,...a}=r,[i,c]=x.useState(null),[l,u]=x.useState(null),[d,f]=x.useState(null),[m,v]=x.useState(null),[p,h]=x.useState(null),[y,w]=x.useState(0),[b,C]=x.useState(0),[D,S]=x.useState(!1),[O,k]=x.useState(!1),j=Ze(t,P=>c(P));return g.jsx(em,{value:{type:n,scrollHideDelay:o,scrollArea:i,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:D,onScrollbarXEnabledChange:S,scrollbarY:p,onScrollbarYChange:h,scrollbarYEnabled:O,onScrollbarYEnabledChange:k,onCornerWidthChange:w,onCornerHeightChange:C},children:g.jsx(ue,{...a,ref:j,__vars:{"--sa-corner-width":s!=="xy"?"0px":`${y}px`,"--sa-corner-height":s!=="xy"?"0px":`${b}px`}})})});Ti.displayName="@mantine/core/ScrollAreaRoot";function Oi(e,t){const r=e/t;return Number.isNaN(r)?0:r}function vn(e){const t=Oi(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function ki(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function om(e,[t,r]){return Math.min(r,Math.max(t,e))}function ma(e,t,r="ltr"){const n=vn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,a=t.content-t.viewport,i=s-n,c=r==="ltr"?[0,a]:[a*-1,0],l=om(e,c);return ki([0,a],[0,i])(l)}function sm(e,t,r,n="ltr"){const o=vn(r),s=o/2,a=t||s,i=o-a,c=r.scrollbar.paddingStart+a,l=r.scrollbar.size-r.scrollbar.paddingEnd-i,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return ki([c,l],d)(e)}function $i(e,t){return e>0&&e<t}function cn(e){return e?parseInt(e,10):0}function Lt(e,t,{checkForDefaultPrevented:r=!0}={}){return n=>{e==null||e(n),(r===!1||!n.defaultPrevented)&&(t==null||t(n))}}const[am,ji]=or("ScrollAreaScrollbar was not found in tree"),Ai=x.forwardRef((e,t)=>{const{sizes:r,hasThumb:n,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:i,onDragScroll:c,onWheelScroll:l,onResize:u,...d}=e,f=nt(),[m,v]=x.useState(null),p=Ze(t,k=>v(k)),h=x.useRef(null),y=x.useRef(""),{viewport:w}=f,b=r.content-r.viewport,C=Pt(l),D=Pt(i),S=Or(u,10),O=k=>{if(h.current){const j=k.clientX-h.current.left,P=k.clientY-h.current.top;c({x:j,y:P})}};return x.useEffect(()=>{const k=j=>{const P=j.target;(m==null?void 0:m.contains(P))&&C(j,b)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[w,m,b,C]),x.useEffect(D,[r,D]),Qt(m,S),Qt(f.content,S),g.jsx(am,{value:{scrollbar:m,hasThumb:n,onThumbChange:Pt(o),onThumbPointerUp:Pt(s),onThumbPositionChange:D,onThumbPointerDown:Pt(a)},children:g.jsx("div",{...d,ref:p,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:Lt(e.onPointerDown,k=>{k.preventDefault(),k.button===0&&(k.target.setPointerCapture(k.pointerId),h.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",O(k))}),onPointerMove:Lt(e.onPointerMove,O),onPointerUp:Lt(e.onPointerUp,k=>{const j=k.target;j.hasPointerCapture(k.pointerId)&&(k.preventDefault(),j.releasePointerCapture(k.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=y.current,h.current=null}})})}),Pi=x.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,style:o,...s}=e,a=nt(),[i,c]=x.useState(),l=x.useRef(null),u=Ze(t,l,a.onScrollbarXChange);return x.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),g.jsx(Ai,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{...o,"--sa-thumb-width":`${vn(r)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),$i(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:cn(i.paddingLeft),paddingEnd:cn(i.paddingRight)}})}})});Pi.displayName="@mantine/core/ScrollAreaScrollbarX";const Mi=x.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,style:o,...s}=e,a=nt(),[i,c]=x.useState(),l=x.useRef(null),u=Ze(t,l,a.onScrollbarYChange);return x.useEffect(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),g.jsx(Ai,{...s,"data-orientation":"vertical",ref:u,sizes:r,style:{"--sa-thumb-height":`${vn(r)}px`,...o},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),$i(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:cn(i.paddingTop),paddingEnd:cn(i.paddingBottom)}})}})});Mi.displayName="@mantine/core/ScrollAreaScrollbarY";const gn=x.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,{dir:o}=Io(),s=nt(),a=x.useRef(null),i=x.useRef(0),[c,l]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Oi(c.viewport,c.content),d={...n,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>{a.current=m},onThumbPointerUp:()=>{i.current=0},onThumbPointerDown:m=>{i.current=m}},f=(m,v)=>sm(m,i.current,c,v);return r==="horizontal"?g.jsx(Pi,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){const m=s.viewport.scrollLeft,v=ma(m,c,o);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=f(m,o))}}):r==="vertical"?g.jsx(Mi,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){const m=s.viewport.scrollTop,v=ma(m,c);c.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=f(m))}}):null});gn.displayName="@mantine/core/ScrollAreaScrollbarVisible";const qo=x.forwardRef((e,t)=>{const r=nt(),{forceMount:n,...o}=e,[s,a]=x.useState(!1),i=e.orientation==="horizontal",c=Or(()=>{if(r.viewport){const l=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;a(i?l:u)}},10);return Qt(r.viewport,c),Qt(r.content,c),n||s?g.jsx(gn,{"data-state":s?"visible":"hidden",...o,ref:t}):null});qo.displayName="@mantine/core/ScrollAreaScrollbarAuto";const Li=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=nt(),[s,a]=x.useState(!1);return x.useEffect(()=>{const{scrollArea:i}=o;let c=0;if(i){const l=()=>{window.clearTimeout(c),a(!0)},u=()=>{c=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",l),i.addEventListener("pointerleave",u),()=>{window.clearTimeout(c),i.removeEventListener("pointerenter",l),i.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),r||s?g.jsx(qo,{"data-state":s?"visible":"hidden",...n,ref:t}):null});Li.displayName="@mantine/core/ScrollAreaScrollbarHover";const im=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=nt(),s=e.orientation==="horizontal",[a,i]=x.useState("hidden"),c=Or(()=>i("idle"),100);return x.useEffect(()=>{if(a==="idle"){const l=window.setTimeout(()=>i("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(l)}},[a,o.scrollHideDelay]),x.useEffect(()=>{const{viewport:l}=o,u=s?"scrollLeft":"scrollTop";if(l){let d=l[u];const f=()=>{const m=l[u];d!==m&&(i("scrolling"),c()),d=m};return l.addEventListener("scroll",f),()=>l.removeEventListener("scroll",f)}},[o.viewport,s,c]),r||a!=="hidden"?g.jsx(gn,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Lt(e.onPointerEnter,()=>i("interacting")),onPointerLeave:Lt(e.onPointerLeave,()=>i("idle"))}):null}),Do=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=nt(),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=o,i=e.orientation==="horizontal";return x.useEffect(()=>(i?s(!0):a(!0),()=>{i?s(!1):a(!1)}),[i,s,a]),o.type==="hover"?g.jsx(Li,{...n,ref:t,forceMount:r}):o.type==="scroll"?g.jsx(im,{...n,ref:t,forceMount:r}):o.type==="auto"?g.jsx(qo,{...n,ref:t,forceMount:r}):o.type==="always"?g.jsx(gn,{...n,ref:t}):null});Do.displayName="@mantine/core/ScrollAreaScrollbar";function cm(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},a=r.left!==s.left,i=r.top!==s.top;(a||i)&&t(),r=s,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)}const Ii=x.forwardRef((e,t)=>{const{style:r,...n}=e,o=nt(),s=ji(),{onThumbPositionChange:a}=s,i=Ze(t,u=>s.onThumbChange(u)),c=x.useRef(void 0),l=Or(()=>{c.current&&(c.current(),c.current=void 0)},100);return x.useEffect(()=>{const{viewport:u}=o;if(u){const d=()=>{if(l(),!c.current){const f=cm(u,a);c.current=f,a()}};return a(),u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[o.viewport,l,a]),g.jsx("div",{"data-state":s.hasThumb?"visible":"hidden",...n,ref:i,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:Lt(e.onPointerDownCapture,u=>{const f=u.target.getBoundingClientRect(),m=u.clientX-f.left,v=u.clientY-f.top;s.onThumbPointerDown({x:m,y:v})}),onPointerUp:Lt(e.onPointerUp,s.onThumbPointerUp)})});Ii.displayName="@mantine/core/ScrollAreaThumb";const _o=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ji();return r||o.hasThumb?g.jsx(Ii,{ref:t,...n}):null});_o.displayName="@mantine/core/ScrollAreaThumb";const Fi=x.forwardRef(({children:e,style:t,...r},n)=>{const o=nt(),s=Ze(n,o.onViewportChange);return g.jsx(ue,{...r,ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:g.jsx("div",{style:{minWidth:"100%",display:"table"},ref:o.onContentChange,children:e})})});Fi.displayName="@mantine/core/ScrollAreaViewport";var Xo={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const Vi={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},lm=(e,{scrollbarSize:t,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":_e(t),"--scrollarea-over-scroll-behavior":r}}),jr=se((e,t)=>{const r=K("ScrollArea",Vi,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,scrollbarSize:c,vars:l,type:u,scrollHideDelay:d,viewportProps:f,viewportRef:m,onScrollPositionChange:v,children:p,offsetScrollbars:h,scrollbars:y,onBottomReached:w,onTopReached:b,overscrollBehavior:C,...D}=r,[S,O]=x.useState(!1),[k,j]=x.useState(!1),[P,L]=x.useState(!1),V=ye({name:"ScrollArea",props:r,classes:Xo,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:l,varsResolver:lm}),z=x.useRef(null),M=If([m,z]);return x.useEffect(()=>{if(!z.current||h!=="present")return;const $=z.current,_=new ResizeObserver(()=>{const{scrollHeight:E,clientHeight:T,scrollWidth:N,clientWidth:I}=$;j(E>T),L(N>I)});return _.observe($),()=>_.disconnect()},[z,h]),g.jsxs(Ti,{type:u==="never"?"always":u,scrollHideDelay:d,ref:t,scrollbars:y,...V("root"),...D,children:[g.jsx(Fi,{...f,...V("viewport",{style:f==null?void 0:f.style}),ref:M,"data-offset-scrollbars":h===!0?"xy":h||void 0,"data-scrollbars":y||void 0,"data-horizontal-hidden":h==="present"&&!P?"true":void 0,"data-vertical-hidden":h==="present"&&!k?"true":void 0,onScroll:$=>{var N;(N=f==null?void 0:f.onScroll)==null||N.call(f,$),v==null||v({x:$.currentTarget.scrollLeft,y:$.currentTarget.scrollTop});const{scrollTop:_,scrollHeight:E,clientHeight:T}=$.currentTarget;_-(E-T)>=0&&(w==null||w()),_===0&&(b==null||b())},children:p}),(y==="xy"||y==="x")&&g.jsx(Do,{...V("scrollbar"),orientation:"horizontal","data-hidden":u==="never"||h==="present"&&!P?!0:void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:g.jsx(_o,{...V("thumb")})}),(y==="xy"||y==="y")&&g.jsx(Do,{...V("scrollbar"),orientation:"vertical","data-hidden":u==="never"||h==="present"&&!k?!0:void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:g.jsx(_o,{...V("thumb")})}),g.jsx(rm,{...V("corner"),"data-hovered":S||void 0,"data-hidden":u==="never"||void 0})]})});jr.displayName="@mantine/core/ScrollArea";const Ko=se((e,t)=>{const{children:r,classNames:n,styles:o,scrollbarSize:s,scrollHideDelay:a,type:i,dir:c,offsetScrollbars:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:m,viewportProps:v,scrollbars:p,style:h,vars:y,onBottomReached:w,onTopReached:b,...C}=K("ScrollAreaAutosize",Vi,e);return g.jsx(ue,{...C,ref:t,style:[{display:"flex",overflow:"auto"},h],children:g.jsx(ue,{style:{display:"flex",flexDirection:"column",flex:1},children:g.jsx(jr,{classNames:n,styles:o,scrollHideDelay:a,scrollbarSize:s,type:i,dir:c,offsetScrollbars:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:m,viewportProps:v,vars:y,scrollbars:p,onBottomReached:w,onTopReached:b,children:r})})})});jr.classes=Xo;Ko.displayName="@mantine/core/ScrollAreaAutosize";Ko.classes=Xo;jr.Autosize=Ko;var zi={root:"m_87cf2631"};const um={__staticSelector:"UnstyledButton"},tt=Ct((e,t)=>{const r=K("UnstyledButton",um,e),{className:n,component:o="button",__staticSelector:s,unstyled:a,classNames:i,styles:c,style:l,...u}=r,d=ye({name:s,props:r,classes:zi,className:n,style:l,classNames:i,styles:c,unstyled:a});return g.jsx(ue,{...d("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...u})});tt.classes=zi;tt.displayName="@mantine/core/UnstyledButton";var Bi={root:"m_515a97f8"};const dm={},Zo=se((e,t)=>{const r=K("VisuallyHidden",dm,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,...l}=r,u=ye({name:"VisuallyHidden",classes:Bi,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i});return g.jsx(ue,{component:"span",ref:t,...u("root"),...l})});Zo.classes=Bi;Zo.displayName="@mantine/core/VisuallyHidden";var Wi={root:"m_1b7284a3"};const fm={},mm=(e,{radius:t,shadow:r})=>({root:{"--paper-radius":t===void 0?void 0:Je(t),"--paper-shadow":Mo(r)}}),Jo=Ct((e,t)=>{const r=K("Paper",fm,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,withBorder:c,vars:l,radius:u,shadow:d,variant:f,mod:m,...v}=r,p=ye({name:"Paper",props:r,classes:Wi,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:l,varsResolver:mm});return g.jsx(ue,{ref:t,mod:[{"data-with-border":c},m],...p("root"),variant:f,...v})});Jo.classes=Wi;Jo.displayName="@mantine/core/Paper";function pm(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}function pa(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function ha(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const hm={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function vm({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:s,arrowY:a,dir:i}){const[c,l="center"]=e.split("-"),u={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[hm[c]]:n},d=-t/2;return c==="left"?{...u,...pa(l,a,r,o),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:c==="right"?{...u,...pa(l,a,r,o),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:c==="top"?{...u,...ha(l,s,r,o,i),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:c==="bottom"?{...u,...ha(l,s,r,o,i),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const Yi=x.forwardRef(({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,visible:s,arrowX:a,arrowY:i,style:c,...l},u)=>{const{dir:d}=Io();return s?g.jsx("div",{...l,ref:u,style:{...c,...vm({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,dir:d,arrowX:a,arrowY:i})}}):null});Yi.displayName="@mantine/core/FloatingArrow";var Hi={root:"m_9814e45f"};const gm={zIndex:Ft("modal")},ym=(e,{gradient:t,color:r,backgroundOpacity:n,blur:o,radius:s,zIndex:a})=>({root:{"--overlay-bg":t||(r!==void 0||n!==void 0)&&od(r||"#000",n??.6)||void 0,"--overlay-filter":o?`blur(${_e(o)})`:void 0,"--overlay-radius":s===void 0?void 0:Je(s),"--overlay-z-index":a==null?void 0:a.toString()}}),yn=Ct((e,t)=>{const r=K("Overlay",gm,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,fixed:l,center:u,children:d,radius:f,zIndex:m,gradient:v,blur:p,color:h,backgroundOpacity:y,mod:w,...b}=r,C=ye({name:"Overlay",props:r,classes:Hi,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:ym});return g.jsx(ue,{ref:t,...C("root"),mod:[{center:u,fixed:l},w],...b,children:d})});yn.classes=Hi;yn.displayName="@mantine/core/Overlay";function so(e){const t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}function bm({target:e,reuseTargetNode:t,...r}){if(e)return typeof e=="string"?document.querySelector(e)||so(r):e;if(t){const n=document.querySelector("[data-mantine-shared-portal-node]");if(n)return n;const o=so(r);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return so(r)}const xm={},Ui=se((e,t)=>{const{children:r,target:n,reuseTargetNode:o,...s}=K("Portal",xm,e),[a,i]=x.useState(!1),c=x.useRef(null);return jo(()=>(i(!0),c.current=bm({target:n,reuseTargetNode:o,...s}),rn(t,c.current),!n&&!o&&c.current&&document.body.appendChild(c.current),()=>{!n&&!o&&c.current&&document.body.removeChild(c.current)}),[n]),!a||!c.current?null:$o.createPortal(g.jsx(g.Fragment,{children:r}),c.current)});Ui.displayName="@mantine/core/Portal";const bn=se(({withinPortal:e=!0,children:t,...r},n)=>ui()==="test"||!e?g.jsx(g.Fragment,{children:t}):g.jsx(Ui,{ref:n,...r,children:t}));bn.displayName="@mantine/core/OptionalPortal";const wr=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Gr={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...wr("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...wr("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...wr("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...wr("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...wr("top"),common:{transformOrigin:"top right"}}},va={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function wm({transition:e,state:t,duration:r,timingFunction:n}){const o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Gr?{transitionProperty:Gr[e].transitionProperty,...o,...Gr[e].common,...Gr[e][va[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[va[t]]}}function Sm({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:s,onEntered:a,onExited:i,enterDelay:c,exitDelay:l}){const u=ar(),d=Ka(),f=u.respectReducedMotion?d:!1,[m,v]=x.useState(f?0:e),[p,h]=x.useState(n?"entered":"exited"),y=x.useRef(-1),w=x.useRef(-1),b=x.useRef(-1),C=S=>{const O=S?o:s,k=S?a:i;window.clearTimeout(y.current);const j=f?0:S?e:t;v(j),j===0?(typeof O=="function"&&O(),typeof k=="function"&&k(),h(S?"entered":"exited")):b.current=requestAnimationFrame(()=>{$o.flushSync(()=>{h(S?"pre-entering":"pre-exiting")}),b.current=requestAnimationFrame(()=>{typeof O=="function"&&O(),h(S?"entering":"exiting"),y.current=window.setTimeout(()=>{typeof k=="function"&&k(),h(S?"entered":"exited")},j)})})},D=S=>{if(window.clearTimeout(w.current),typeof(S?c:l)!="number"){C(S);return}w.current=window.setTimeout(()=>{C(S)},S?c:l)};return yt(()=>{D(n)},[n]),x.useEffect(()=>()=>{window.clearTimeout(y.current),cancelAnimationFrame(b.current)},[]),{transitionDuration:m,transitionStatus:p,transitionTimingFunction:r||"ease"}}function zt({keepMounted:e,transition:t="fade",duration:r=250,exitDuration:n=r,mounted:o,children:s,timingFunction:a="ease",onExit:i,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f}){const m=ui(),{transitionDuration:v,transitionStatus:p,transitionTimingFunction:h}=Sm({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:i,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f});return v===0||m==="test"?o?g.jsx(g.Fragment,{children:s({})}):e?s({display:"none"}):null:p==="exited"?e?s({display:"none"}):null:g.jsx(g.Fragment,{children:s(wm({transition:t,duration:v,state:p,timingFunction:h}))})}zt.displayName="@mantine/core/Transition";const[Cm,Gi]=or("Popover component was not found in the tree");function xn({children:e,active:t=!0,refProp:r="ref",innerRef:n}){const o=Gl(t),s=Ze(o,n);return kr(e)?x.cloneElement(e,{[r]:s}):e}function qi(e){return g.jsx(Zo,{tabIndex:-1,"data-autofocus":!0,...e})}xn.displayName="@mantine/core/FocusTrap";qi.displayName="@mantine/core/FocusTrapInitialFocus";xn.InitialFocus=qi;var Xi={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const Dm={},Qo=se((e,t)=>{var h,y,w,b;const r=K("PopoverDropdown",Dm,e),{className:n,style:o,vars:s,children:a,onKeyDownCapture:i,variant:c,classNames:l,styles:u,...d}=r,f=Gi(),m=Ua({opened:f.opened,shouldReturnFocus:f.returnFocus}),v=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},p=Ze(t,f.floating);return f.disabled?null:g.jsx(bn,{...f.portalProps,withinPortal:f.withinPortal,children:g.jsx(zt,{mounted:f.opened,...f.transitionProps,transition:((h=f.transitionProps)==null?void 0:h.transition)||"fade",duration:((y=f.transitionProps)==null?void 0:y.duration)??150,keepMounted:f.keepMounted,exitDuration:typeof((w=f.transitionProps)==null?void 0:w.exitDuration)=="number"?f.transitionProps.exitDuration:(b=f.transitionProps)==null?void 0:b.duration,children:C=>g.jsx(xn,{active:f.trapFocus&&f.opened,innerRef:p,children:g.jsxs(ue,{...v,...d,variant:c,onKeyDownCapture:Iu(()=>{var D,S;(D=f.onClose)==null||D.call(f),(S=f.onDismiss)==null||S.call(f)},{active:f.closeOnEscape,onTrigger:m,onKeyDown:i}),"data-position":f.placement,"data-fixed":f.floatingStrategy==="fixed"||void 0,...f.getStyles("dropdown",{className:n,props:r,classNames:l,styles:u,style:[{...C,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width==="target"?void 0:_e(f.width)},f.resolvedStyles.dropdown,u==null?void 0:u.dropdown,o]}),children:[a,g.jsx(Yi,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:r,classNames:l,styles:u})})]})})})})});Qo.classes=Xi;Qo.displayName="@mantine/core/PopoverDropdown";const _m={refProp:"ref",popupType:"dialog"},Ki=se((e,t)=>{const{children:r,refProp:n,popupType:o,...s}=K("PopoverTarget",_m,e);if(!kr(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=s,i=Gi(),c=Ze(i.reference,ci(r),t),l=i.withRoles?{"aria-haspopup":o,"aria-expanded":i.opened,"aria-controls":i.getDropdownId(),id:i.getTargetId()}:{};return x.cloneElement(r,{...a,...l,...i.targetProps,className:Fe(i.targetProps.className,a.className,r.props.className),[n]:c,...i.controlled?null:{onClick:i.onToggle}})});Ki.displayName="@mantine/core/PopoverTarget";function Rm({opened:e,floating:t,position:r,positionDependencies:n}){const[o,s]=x.useState(0);x.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return Df(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),yt(()=>{t.update()},n),yt(()=>{s(a=>a+1)},[e])}function Em(e){if(e===void 0)return{shift:!0,flip:!0};const t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Nm(e,t){const r=Em(e.middlewares),n=[Af(e.offset)];return r.shift&&n.push(Pf(typeof r.shift=="boolean"?{limiter:ca(),padding:5}:{limiter:ca(),padding:5,...r.shift})),r.flip&&n.push(typeof r.flip=="boolean"?la():la(r.flip)),r.inline&&n.push(typeof r.inline=="boolean"?ua():ua(r.inline)),n.push(Lf({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width==="target")&&n.push(Mf({...typeof r.size=="boolean"?{}:r.size,apply({rects:o,availableWidth:s,availableHeight:a,...i}){var u;const l=((u=t().refs.floating.current)==null?void 0:u.style)??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:o,availableWidth:s,availableHeight:a,...i}):Object.assign(l,{maxWidth:`${s}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(l,{width:`${o.reference.width}px`})}})),n}function Tm(e){const[t,r]=bt({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=x.useRef(t),o=()=>{t&&r(!1)},s=()=>r(!t),a=Qf({strategy:e.strategy,placement:e.position,middleware:Nm(e,()=>a)});return Rm({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:a}),yt(()=>{var i;(i=e.onPositionChange)==null||i.call(e,a.placement)},[a.placement]),yt(()=>{var i,c;t!==n.current&&(t?(c=e.onOpen)==null||c.call(e):(i=e.onClose)==null||i.call(e)),n.current=t},[t,e.onClose,e.onOpen]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:s}}const Om={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ft("popover"),__staticSelector:"Popover",width:"max-content"},km=(e,{radius:t,shadow:r})=>({dropdown:{"--popover-radius":t===void 0?void 0:Je(t),"--popover-shadow":Mo(r)}});function Xe(e){var ce,we,Oe,De,je,Pe;const t=K("Popover",Om,e),{children:r,position:n,offset:o,onPositionChange:s,positionDependencies:a,opened:i,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:m,arrowSize:v,arrowOffset:p,arrowRadius:h,arrowPosition:y,unstyled:w,classNames:b,styles:C,closeOnClickOutside:D,withinPortal:S,portalProps:O,closeOnEscape:k,clickOutsideEvents:j,trapFocus:P,onClose:L,onDismiss:V,onOpen:z,onChange:M,zIndex:$,radius:_,shadow:E,id:T,defaultOpened:N,__staticSelector:I,withRoles:A,disabled:B,returnFocus:Y,variant:te,keepMounted:F,vars:Q,floatingStrategy:re,withOverlay:ae,overlayProps:Z,...le}=t,ie=ye({name:I,props:t,classes:Xi,classNames:b,styles:C,unstyled:w,rootSelector:"dropdown",vars:Q,varsResolver:km}),{resolvedStyles:pe}=St({classNames:b,styles:C,props:t}),X=x.useRef(null),[me,fe]=x.useState(null),[ge,U]=x.useState(null),{dir:J}=Io(),ee=nr(T),de=Tm({middlewares:f,width:d,position:pm(J,n),offset:typeof o=="number"?o+(m?v/2:0):o,arrowRef:X,arrowOffset:p,onPositionChange:s,positionDependencies:a,opened:i,defaultOpened:N,onChange:M,onOpen:z,onClose:L,onDismiss:V,strategy:re});Ha(()=>{D&&(de.onClose(),V==null||V())},j,[me,ge]);const be=x.useCallback(Re=>{fe(Re),de.floating.refs.setReference(Re)},[de.floating.refs.setReference]),oe=x.useCallback(Re=>{U(Re),de.floating.refs.setFloating(Re)},[de.floating.refs.setFloating]),he=x.useCallback(()=>{var Re;(Re=c==null?void 0:c.onExited)==null||Re.call(c),l==null||l()},[c==null?void 0:c.onExited,l]),H=x.useCallback(()=>{var Re;(Re=c==null?void 0:c.onEntered)==null||Re.call(c),u==null||u()},[c==null?void 0:c.onEntered,u]);return g.jsxs(Cm,{value:{returnFocus:Y,disabled:B,controlled:de.controlled,reference:be,floating:oe,x:de.floating.x,y:de.floating.y,arrowX:(Oe=(we=(ce=de.floating)==null?void 0:ce.middlewareData)==null?void 0:we.arrow)==null?void 0:Oe.x,arrowY:(Pe=(je=(De=de.floating)==null?void 0:De.middlewareData)==null?void 0:je.arrow)==null?void 0:Pe.y,opened:de.opened,arrowRef:X,transitionProps:{...c,onExited:he,onEntered:H},width:d,withArrow:m,arrowSize:v,arrowOffset:p,arrowRadius:h,arrowPosition:y,placement:de.floating.placement,trapFocus:P,withinPortal:S,portalProps:O,zIndex:$,radius:_,shadow:E,closeOnEscape:k,onDismiss:V,onClose:de.onClose,onToggle:de.onToggle,getTargetId:()=>`${ee}-target`,getDropdownId:()=>`${ee}-dropdown`,withRoles:A,targetProps:le,__staticSelector:I,classNames:b,styles:C,unstyled:w,variant:te,keepMounted:F,getStyles:ie,resolvedStyles:pe,floatingStrategy:re},children:[r,ae&&g.jsx(zt,{transition:"fade",mounted:de.opened,duration:(c==null?void 0:c.duration)||250,exitDuration:(c==null?void 0:c.exitDuration)||250,children:Re=>g.jsx(bn,{withinPortal:S,children:g.jsx(yn,{...Z,...ie("overlay",{className:Z==null?void 0:Z.className,style:[Re,Z==null?void 0:Z.style]})})})})]})}Xe.Target=Ki;Xe.Dropdown=Qo;Xe.displayName="@mantine/core/Popover";Xe.extend=e=>e;var it={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const Zi=x.forwardRef(({className:e,...t},r)=>g.jsxs(ue,{component:"span",className:Fe(it.barsLoader,e),...t,ref:r,children:[g.jsx("span",{className:it.bar}),g.jsx("span",{className:it.bar}),g.jsx("span",{className:it.bar})]}));Zi.displayName="@mantine/core/Bars";const Ji=x.forwardRef(({className:e,...t},r)=>g.jsxs(ue,{component:"span",className:Fe(it.dotsLoader,e),...t,ref:r,children:[g.jsx("span",{className:it.dot}),g.jsx("span",{className:it.dot}),g.jsx("span",{className:it.dot})]}));Ji.displayName="@mantine/core/Dots";const Qi=x.forwardRef(({className:e,...t},r)=>g.jsx(ue,{component:"span",className:Fe(it.ovalLoader,e),...t,ref:r}));Qi.displayName="@mantine/core/Oval";const ec={bars:Zi,oval:Qi,dots:Ji},$m={loaders:ec,type:"oval"},jm=(e,{size:t,color:r})=>({root:{"--loader-size":Ne(t,"loader-size"),"--loader-color":r?xt(r,e):void 0}}),Ar=se((e,t)=>{const r=K("Loader",$m,e),{size:n,color:o,type:s,vars:a,className:i,style:c,classNames:l,styles:u,unstyled:d,loaders:f,variant:m,children:v,...p}=r,h=ye({name:"Loader",props:r,classes:it,className:i,style:c,classNames:l,styles:u,unstyled:d,vars:a,varsResolver:jm});return v?g.jsx(ue,{...h("root"),ref:t,...p,children:v}):g.jsx(ue,{...h("root"),ref:t,component:f[s],variant:m,size:n,...p})});Ar.defaultLoaders=ec;Ar.classes=it;Ar.displayName="@mantine/core/Loader";var lr={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const ga={orientation:"horizontal"},Am=(e,{borderWidth:t})=>({group:{"--ai-border-width":_e(t)}}),es=se((e,t)=>{const r=K("ActionIconGroup",ga,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,...m}=K("ActionIconGroup",ga,e),v=ye({name:"ActionIconGroup",props:r,classes:lr,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:l,varsResolver:Am,rootSelector:"group"});return g.jsx(ue,{...v("group"),ref:t,variant:d,mod:[{"data-orientation":c},f],role:"group",...m})});es.classes=lr;es.displayName="@mantine/core/ActionIconGroup";const ya={},Pm=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:s,size:a})=>{const i=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{groupSection:{"--section-height":Ne(a,"section-height"),"--section-padding-x":Ne(a,"section-padding-x"),"--section-fz":Ie(a),"--section-radius":t===void 0?void 0:Je(t),"--section-bg":r||o?i.background:void 0,"--section-color":i.color,"--section-bd":r||o?i.border:void 0}}},ts=se((e,t)=>{const r=K("ActionIconGroupSection",ya,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,...m}=K("ActionIconGroupSection",ya,e),v=ye({name:"ActionIconGroupSection",props:r,classes:lr,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,varsResolver:Pm,rootSelector:"groupSection"});return g.jsx(ue,{...v("groupSection"),ref:t,variant:l,...m})});ts.classes=lr;ts.displayName="@mantine/core/ActionIconGroupSection";const Mm={},Lm=(e,{size:t,radius:r,variant:n,gradient:o,color:s,autoContrast:a})=>{const i=e.variantColorResolver({color:s||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ai-size":Ne(t,"ai-size"),"--ai-radius":r===void 0?void 0:Je(r),"--ai-bg":s||n?i.background:void 0,"--ai-hover":s||n?i.hover:void 0,"--ai-hover-color":s||n?i.hoverColor:void 0,"--ai-color":i.color,"--ai-bd":s||n?i.border:void 0}}},ur=Ct((e,t)=>{const r=K("ActionIcon",Mm,e),{className:n,unstyled:o,variant:s,classNames:a,styles:i,style:c,loading:l,loaderProps:u,size:d,color:f,radius:m,__staticSelector:v,gradient:p,vars:h,children:y,disabled:w,"data-disabled":b,autoContrast:C,mod:D,...S}=r,O=ye({name:["ActionIcon",v],props:r,className:n,style:c,classes:lr,classNames:a,styles:i,unstyled:o,vars:h,varsResolver:Lm});return g.jsxs(tt,{...O("root",{active:!w&&!l&&!b}),...S,unstyled:o,variant:s,size:d,disabled:w||l,ref:t,mod:[{loading:l,disabled:w||b},D],children:[g.jsx(zt,{mounted:!!l,transition:"slide-down",duration:150,children:k=>g.jsx(ue,{component:"span",...O("loader",{style:k}),"aria-hidden":!0,children:g.jsx(Ar,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...u})})}),g.jsx(ue,{component:"span",mod:{loading:l},...O("icon"),children:y})]})});ur.classes=lr;ur.displayName="@mantine/core/ActionIcon";ur.Group=es;ur.GroupSection=ts;const tc=x.forwardRef(({size:e="var(--cb-icon-size, 70%)",style:t,...r},n)=>g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:n,...r,children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));tc.displayName="@mantine/core/CloseIcon";var rc={root:"m_86a44da5","root--subtle":"m_220c80f2"};const Im={variant:"subtle"},Fm=(e,{size:t,radius:r,iconSize:n})=>({root:{"--cb-size":Ne(t,"cb-size"),"--cb-radius":r===void 0?void 0:Je(r),"--cb-icon-size":_e(n)}}),Pr=Ct((e,t)=>{const r=K("CloseButton",Im,e),{iconSize:n,children:o,vars:s,radius:a,className:i,classNames:c,style:l,styles:u,unstyled:d,"data-disabled":f,disabled:m,variant:v,icon:p,mod:h,__staticSelector:y,...w}=r,b=ye({name:y||"CloseButton",props:r,className:i,style:l,classes:rc,classNames:c,styles:u,unstyled:d,vars:s,varsResolver:Fm});return g.jsxs(tt,{ref:t,...w,unstyled:d,variant:v,disabled:m,mod:[{disabled:m||f},h],...b("root",{variant:v,active:!m&&!f}),children:[p||g.jsx(tc,{}),o]})});Pr.classes=rc;Pr.displayName="@mantine/core/CloseButton";const[Vm,Dt]=or("ModalBase component was not found in tree");function zm({opened:e,transitionDuration:t}){const[r,n]=x.useState(e),o=x.useRef(-1),a=Ka()?0:t;return x.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}function Bm({id:e,transitionProps:t,opened:r,trapFocus:n,closeOnEscape:o,onClose:s,returnFocus:a}){const i=nr(e),[c,l]=x.useState(!1),[u,d]=x.useState(!1),f=typeof(t==null?void 0:t.duration)=="number"?t==null?void 0:t.duration:200,m=zm({opened:r,transitionDuration:f});return Kl("keydown",v=>{var p;v.key==="Escape"&&o&&!v.isComposing&&r&&((p=v.target)==null?void 0:p.getAttribute("data-mantine-stop-propagation"))!=="true"&&s()},{capture:!0}),Ua({opened:r,shouldReturnFocus:n&&a}),{_id:i,titleMounted:c,bodyMounted:u,shouldLockScroll:m,setTitleMounted:l,setBodyMounted:d}}const nc=x.forwardRef(({keepMounted:e,opened:t,onClose:r,id:n,transitionProps:o,onExitTransitionEnd:s,onEnterTransitionEnd:a,trapFocus:i,closeOnEscape:c,returnFocus:l,closeOnClickOutside:u,withinPortal:d,portalProps:f,lockScroll:m,children:v,zIndex:p,shadow:h,padding:y,__vars:w,unstyled:b,removeScrollProps:C,...D},S)=>{const{_id:O,titleMounted:k,bodyMounted:j,shouldLockScroll:P,setTitleMounted:L,setBodyMounted:V}=Bm({id:n,transitionProps:o,opened:t,trapFocus:i,closeOnEscape:c,onClose:r,returnFocus:l}),{key:z,...M}=C||{};return g.jsx(bn,{...f,withinPortal:d,children:g.jsx(Vm,{value:{opened:t,onClose:r,closeOnClickOutside:u,onExitTransitionEnd:s,onEnterTransitionEnd:a,transitionProps:{...o,keepMounted:e},getTitleId:()=>`${O}-title`,getBodyId:()=>`${O}-body`,titleMounted:k,bodyMounted:j,setTitleMounted:L,setBodyMounted:V,trapFocus:i,closeOnEscape:c,zIndex:p,unstyled:b},children:g.jsx(oi,{enabled:P&&m,...M,children:g.jsx(ue,{ref:S,...D,__vars:{...w,"--mb-z-index":(p||Ft("modal")).toString(),"--mb-shadow":Mo(h),"--mb-padding":ii(y)},children:v})},z)})})});nc.displayName="@mantine/core/ModalBase";function Wm(){const e=Dt();return x.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var er={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};const oc=x.forwardRef(({className:e,...t},r)=>{const n=Wm(),o=Dt();return g.jsx(ue,{ref:r,...t,id:n,className:Fe({[er.body]:!o.unstyled},e)})});oc.displayName="@mantine/core/ModalBaseBody";const sc=x.forwardRef(({className:e,onClick:t,...r},n)=>{const o=Dt();return g.jsx(Pr,{ref:n,...r,onClick:s=>{o.onClose(),t==null||t(s)},className:Fe({[er.close]:!o.unstyled},e),unstyled:o.unstyled})});sc.displayName="@mantine/core/ModalBaseCloseButton";const ac=x.forwardRef(({transitionProps:e,className:t,innerProps:r,onKeyDown:n,style:o,...s},a)=>{const i=Dt();return g.jsx(zt,{mounted:i.opened,transition:"pop",...i.transitionProps,onExited:()=>{var c,l,u;(c=i.onExitTransitionEnd)==null||c.call(i),(u=(l=i.transitionProps)==null?void 0:l.onExited)==null||u.call(l)},onEntered:()=>{var c,l,u;(c=i.onEnterTransitionEnd)==null||c.call(i),(u=(l=i.transitionProps)==null?void 0:l.onEntered)==null||u.call(l)},...e,children:c=>g.jsx("div",{...r,className:Fe({[er.inner]:!i.unstyled},r.className),children:g.jsx(xn,{active:i.opened&&i.trapFocus,innerRef:a,children:g.jsx(Jo,{...s,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":i.bodyMounted?i.getBodyId():void 0,"aria-labelledby":i.titleMounted?i.getTitleId():void 0,style:[o,c],className:Fe({[er.content]:!i.unstyled},t),unstyled:i.unstyled,children:s.children})})})})});ac.displayName="@mantine/core/ModalBaseContent";const ic=x.forwardRef(({className:e,...t},r)=>{const n=Dt();return g.jsx(ue,{component:"header",ref:r,className:Fe({[er.header]:!n.unstyled},e),...t})});ic.displayName="@mantine/core/ModalBaseHeader";const Ym={duration:200,timingFunction:"ease",transition:"fade"};function Hm(e){const t=Dt();return{...Ym,...t.transitionProps,...e}}const cc=x.forwardRef(({onClick:e,transitionProps:t,style:r,visible:n,...o},s)=>{const a=Dt(),i=Hm(t);return g.jsx(zt,{mounted:n!==void 0?n:a.opened,...i,transition:"fade",children:c=>g.jsx(yn,{ref:s,fixed:!0,style:[r,c],zIndex:a.zIndex,unstyled:a.unstyled,onClick:l=>{e==null||e(l),a.closeOnClickOutside&&a.onClose()},...o})})});cc.displayName="@mantine/core/ModalBaseOverlay";function Um(){const e=Dt();return x.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}const lc=x.forwardRef(({className:e,...t},r)=>{const n=Um(),o=Dt();return g.jsx(ue,{component:"h2",ref:r,className:Fe({[er.title]:!o.unstyled},e),...t,id:n})});lc.displayName="@mantine/core/ModalBaseTitle";function Gm({children:e}){return g.jsx(g.Fragment,{children:e})}const[qm,Xm]=un({size:"sm"}),Km={},uc=se((e,t)=>{const r=K("InputClearButton",Km,e),{size:n,variant:o,vars:s,classNames:a,styles:i,...c}=r,l=Xm(),{resolvedClassNames:u,resolvedStyles:d}=St({classNames:a,styles:i,props:r});return g.jsx(Pr,{variant:o||"transparent",ref:t,size:n||(l==null?void 0:l.size)||"sm",classNames:u,styles:d,__staticSelector:"InputClearButton",...c})});uc.displayName="@mantine/core/InputClearButton";const[Zm,Mr]=un({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ot={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const ba={},Jm=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${Ie(t)} - ${_e(2)})`}}),wn=se((e,t)=>{const r=K("InputDescription",ba,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,size:l,__staticSelector:u,__inheritStyles:d=!0,variant:f,...m}=K("InputDescription",ba,r),v=Mr(),p=ye({name:["InputWrapper",u],props:r,classes:ot,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"description",vars:c,varsResolver:Jm}),h=d&&(v==null?void 0:v.getStyles)||p;return g.jsx(ue,{component:"p",ref:t,variant:f,size:l,...h("description",v!=null&&v.getStyles?{className:o,style:s}:void 0),...m})});wn.classes=ot;wn.displayName="@mantine/core/InputDescription";const Qm={},ep=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${Ie(t)} - ${_e(2)})`}}),Sn=se((e,t)=>{const r=K("InputError",Qm,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,size:l,__staticSelector:u,__inheritStyles:d=!0,variant:f,...m}=r,v=ye({name:["InputWrapper",u],props:r,classes:ot,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"error",vars:c,varsResolver:ep}),p=Mr(),h=d&&(p==null?void 0:p.getStyles)||v;return g.jsx(ue,{component:"p",ref:t,variant:f,size:l,...h("error",p!=null&&p.getStyles?{className:o,style:s}:void 0),...m})});Sn.classes=ot;Sn.displayName="@mantine/core/InputError";const xa={labelElement:"label"},tp=(e,{size:t})=>({label:{"--input-label-size":Ie(t),"--input-asterisk-color":void 0}}),Cn=se((e,t)=>{const r=K("InputLabel",xa,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,labelElement:l,size:u,required:d,htmlFor:f,onMouseDown:m,children:v,__staticSelector:p,variant:h,mod:y,...w}=K("InputLabel",xa,r),b=ye({name:["InputWrapper",p],props:r,classes:ot,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"label",vars:c,varsResolver:tp}),C=Mr(),D=(C==null?void 0:C.getStyles)||b;return g.jsxs(ue,{...D("label",C!=null&&C.getStyles?{className:o,style:s}:void 0),component:l,variant:h,size:u,ref:t,htmlFor:l==="label"?f:void 0,mod:[{required:d},y],onMouseDown:S=>{m==null||m(S),!S.defaultPrevented&&S.detail>1&&S.preventDefault()},...w,children:[v,d&&g.jsx("span",{...D("required"),"aria-hidden":!0,children:" *"})]})});Cn.classes=ot;Cn.displayName="@mantine/core/InputLabel";const wa={},rs=se((e,t)=>{const r=K("InputPlaceholder",wa,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,variant:u,error:d,mod:f,...m}=K("InputPlaceholder",wa,r),v=ye({name:["InputPlaceholder",l],props:r,classes:ot,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"placeholder"});return g.jsx(ue,{...v("placeholder"),mod:[{error:!!d},f],component:"span",variant:u,ref:t,...m})});rs.classes=ot;rs.displayName="@mantine/core/InputPlaceholder";function rp(e,{hasDescription:t,hasError:r}){const n=e.findIndex(c=>c==="input"),o=e.slice(0,n),s=e.slice(n+1),a=t&&o.includes("description")||r&&o.includes("error");return{offsetBottom:t&&s.includes("description")||r&&s.includes("error"),offsetTop:a}}const np={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},op=(e,{size:t})=>({label:{"--input-label-size":Ie(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${Ie(t)} - ${_e(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${Ie(t)} - ${_e(2)})`}}),ns=se((e,t)=>{const r=K("InputWrapper",np,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,size:l,variant:u,__staticSelector:d,inputContainer:f,inputWrapperOrder:m,label:v,error:p,description:h,labelProps:y,descriptionProps:w,errorProps:b,labelElement:C,children:D,withAsterisk:S,id:O,required:k,__stylesApiProps:j,mod:P,...L}=r,V=ye({name:["InputWrapper",d],props:j||r,classes:ot,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:op}),z={size:l,variant:u,__staticSelector:d},M=nr(O),$=typeof S=="boolean"?S:k,_=(b==null?void 0:b.id)||`${M}-error`,E=(w==null?void 0:w.id)||`${M}-description`,T=M,N=!!p&&typeof p!="boolean",I=!!h,A=`${N?_:""} ${I?E:""}`,B=A.trim().length>0?A.trim():void 0,Y=(y==null?void 0:y.id)||`${M}-label`,te=v&&g.jsx(Cn,{labelElement:C,id:Y,htmlFor:T,required:$,...z,...y,children:v},"label"),F=I&&g.jsx(wn,{...w,...z,size:(w==null?void 0:w.size)||z.size,id:(w==null?void 0:w.id)||E,children:h},"description"),Q=g.jsx(x.Fragment,{children:f(D)},"input"),re=N&&x.createElement(Sn,{...b,...z,size:(b==null?void 0:b.size)||z.size,key:"error",id:(b==null?void 0:b.id)||_},p),ae=m.map(Z=>{switch(Z){case"label":return te;case"input":return Q;case"description":return F;case"error":return re;default:return null}});return g.jsx(Zm,{value:{getStyles:V,describedBy:B,inputId:T,labelId:Y,...rp(m,{hasDescription:I,hasError:N})},children:g.jsx(ue,{ref:t,variant:u,size:l,mod:[{error:!!p},P],...V("root"),...L,children:ae})})});ns.classes=ot;ns.displayName="@mantine/core/InputWrapper";const sp={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},ap=(e,t,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Ne(t.size,"input-height"),"--input-fz":Ie(t.size),"--input-radius":t.radius===void 0?void 0:Je(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?_e(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?_e(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?Ne(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),$e=Ct((e,t)=>{const r=K("Input",sp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,required:c,__staticSelector:l,__stylesApiProps:u,size:d,wrapperProps:f,error:m,disabled:v,leftSection:p,leftSectionProps:h,leftSectionWidth:y,rightSection:w,rightSectionProps:b,rightSectionWidth:C,rightSectionPointerEvents:D,leftSectionPointerEvents:S,variant:O,vars:k,pointer:j,multiline:P,radius:L,id:V,withAria:z,withErrorStyles:M,mod:$,inputSize:_,__clearSection:E,__clearable:T,__defaultRightSection:N,...I}=r,{styleProps:A,rest:B}=fn(I),Y=Mr(),te={offsetBottom:Y==null?void 0:Y.offsetBottom,offsetTop:Y==null?void 0:Y.offsetTop},F=ye({name:["Input",l],props:u||r,classes:ot,className:o,style:s,classNames:n,styles:a,unstyled:i,stylesCtx:te,rootSelector:"wrapper",vars:k,varsResolver:ap}),Q=z?{required:c,disabled:v,"aria-invalid":!!m,"aria-describedby":Y==null?void 0:Y.describedBy,id:(Y==null?void 0:Y.inputId)||V}:{},re=w||T&&E||N;return g.jsx(qm,{value:{size:d||"sm"},children:g.jsxs(ue,{...F("wrapper"),...A,...f,mod:[{error:!!m&&M,pointer:j,disabled:v,multiline:P,"data-with-right-section":!!re,"data-with-left-section":!!p},$],variant:O,size:d,children:[p&&g.jsx("div",{...h,"data-position":"left",...F("section",{className:h==null?void 0:h.className,style:h==null?void 0:h.style}),children:p}),g.jsx(ue,{component:"input",...B,...Q,ref:t,required:c,mod:{disabled:v,error:!!m&&M},variant:O,__size:_,...F("input")}),re&&g.jsx("div",{...b,"data-position":"right",...F("section",{className:b==null?void 0:b.className,style:b==null?void 0:b.style}),children:re})]})})});$e.classes=ot;$e.Wrapper=ns;$e.Label=Cn;$e.Error=Sn;$e.Description=wn;$e.Placeholder=rs;$e.ClearButton=uc;$e.displayName="@mantine/core/Input";function os(e,t,r){const n=K(e,t,r),{label:o,description:s,error:a,required:i,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:m,errorProps:v,labelProps:p,descriptionProps:h,wrapperProps:y,id:w,size:b,style:C,inputContainer:D,inputWrapperOrder:S,withAsterisk:O,variant:k,vars:j,mod:P,...L}=n,{styleProps:V,rest:z}=fn(L),M={label:o,description:s,error:a,required:i,classNames:c,className:u,__staticSelector:f,__stylesApiProps:m||n,errorProps:v,labelProps:p,descriptionProps:h,unstyled:d,styles:l,size:b,style:C,inputContainer:D,inputWrapperOrder:S,withAsterisk:O,variant:k,id:w,mod:P,...y};return{...z,classNames:c,styles:l,unstyled:d,wrapperProps:{...M,...V},inputProps:{required:i,classNames:c,styles:l,unstyled:d,size:b,__staticSelector:f,__stylesApiProps:m||n,error:a,variant:k,id:w}}}const ip={__staticSelector:"InputBase",withAria:!0},st=Ct((e,t)=>{const{inputProps:r,wrapperProps:n,...o}=os("InputBase",ip,e);return g.jsx($e.Wrapper,{...n,children:g.jsx($e,{...r,...o,ref:t})})});st.classes={...$e.classes,...$e.Wrapper.classes};st.displayName="@mantine/core/InputBase";function Ro({style:e,size:t=16,...r}){return g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:_e(t),height:_e(t),display:"block"},...r,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Ro.displayName="@mantine/core/AccordionChevron";var dc={root:"m_b6d8b162"};function cp(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const lp={inherit:!1},up=(e,{variant:t,lineClamp:r,gradient:n,size:o,color:s})=>({root:{"--text-fz":Ie(o),"--text-lh":Fu(o),"--text-gradient":t==="gradient"?nd(n,e):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":s?xt(s,e):void 0}}),Dn=Ct((e,t)=>{const r=K("Text",lp,e),{lineClamp:n,truncate:o,inline:s,inherit:a,gradient:i,span:c,__staticSelector:l,vars:u,className:d,style:f,classNames:m,styles:v,unstyled:p,variant:h,mod:y,size:w,...b}=r,C=ye({name:["Text",l],props:r,classes:dc,className:d,style:f,classNames:m,styles:v,unstyled:p,vars:u,varsResolver:up});return g.jsx(ue,{...C("root",{focusable:!0}),ref:t,component:c?"span":"p",variant:h,mod:[{"data-truncate":cp(o),"data-line-clamp":typeof n=="number","data-inline":s,"data-inherit":a},y],size:w,...b})});Dn.classes=dc;Dn.displayName="@mantine/core/Text";function fc(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(t=>fc(t))}:e}function dp(e){return e?e.map(t=>fc(t)):[]}function mc(e){return e.reduce((t,r)=>"group"in r?{...t,...mc(r.items)}:(t[r.value]=r,t),{})}var Ke={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const fp={error:null},mp=(e,{size:t,color:r})=>({chevron:{"--combobox-chevron-size":Ne(t,"combobox-chevron-size"),"--combobox-chevron-color":r?xt(r,e):void 0}}),ss=se((e,t)=>{const r=K("ComboboxChevron",fp,e),{size:n,error:o,style:s,className:a,classNames:i,styles:c,unstyled:l,vars:u,mod:d,...f}=r,m=ye({name:"ComboboxChevron",classes:Ke,props:r,style:s,className:a,classNames:i,styles:c,unstyled:l,vars:u,varsResolver:mp,rootSelector:"chevron"});return g.jsx(ue,{component:"svg",...f,...m("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},d],ref:t,children:g.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});ss.classes=Ke;ss.displayName="@mantine/core/ComboboxChevron";const[pp,at]=or("Combobox component was not found in tree"),pc=x.forwardRef(({size:e,onMouseDown:t,onClick:r,onClear:n,...o},s)=>g.jsx($e.ClearButton,{ref:s,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:a=>{a.preventDefault(),t==null||t(a)},onClick:a=>{n(),r==null||r(a)}}));pc.displayName="@mantine/core/ComboboxClearButton";const hp={},as=se((e,t)=>{const{classNames:r,styles:n,className:o,style:s,hidden:a,...i}=K("ComboboxDropdown",hp,e),c=at();return g.jsx(Xe.Dropdown,{...i,ref:t,role:"presentation","data-hidden":a||void 0,...c.getStyles("dropdown",{className:o,style:s,classNames:r,styles:n})})});as.classes=Ke;as.displayName="@mantine/core/ComboboxDropdown";const vp={refProp:"ref"},hc=se((e,t)=>{const{children:r,refProp:n}=K("ComboboxDropdownTarget",vp,e);if(at(),!kr(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return g.jsx(Xe.Target,{ref:t,refProp:n,children:r})});hc.displayName="@mantine/core/ComboboxDropdownTarget";const gp={},is=se((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,...i}=K("ComboboxEmpty",gp,e),c=at();return g.jsx(ue,{ref:t,...c.getStyles("empty",{className:n,classNames:r,styles:s,style:o}),...i})});is.classes=Ke;is.displayName="@mantine/core/ComboboxEmpty";function cs({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:r,withExpandedAttribute:n,targetType:o,autoComplete:s}){const a=at(),[i,c]=x.useState(null),l=d=>{if(e==null||e(d),!a.readOnly&&t){if(d.nativeEvent.isComposing)return;if(d.nativeEvent.code==="ArrowDown"&&(d.preventDefault(),a.store.dropdownOpened?c(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),c(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),d.nativeEvent.code==="ArrowUp"&&(d.preventDefault(),a.store.dropdownOpened?c(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),c(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),d.nativeEvent.code==="Enter"||d.nativeEvent.code==="NumpadEnter"){if(d.nativeEvent.keyCode===229)return;const f=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&f!==-1?(d.preventDefault(),a.store.clickSelectedOption()):o==="button"&&(d.preventDefault(),a.store.openDropdown("keyboard"))}d.key==="Escape"&&a.store.closeDropdown("keyboard"),d.nativeEvent.code==="Space"&&o==="button"&&(d.preventDefault(),a.store.toggleDropdown("keyboard"))}};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(a.store.listId&&a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&i||void 0,autoComplete:s,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:l}}const yp={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},vc=se((e,t)=>{const{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:s,withExpandedAttribute:a,targetType:i,autoComplete:c,...l}=K("ComboboxEventsTarget",yp,e);if(!kr(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=at(),d=cs({targetType:i,withAriaAttributes:s,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:c});return x.cloneElement(r,{...d,...l,[n]:Ze(t,u.store.targetRef,ci(r))})});vc.displayName="@mantine/core/ComboboxEventsTarget";const bp={},ls=se((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,...i}=K("ComboboxFooter",bp,e),c=at();return g.jsx(ue,{ref:t,...c.getStyles("footer",{className:n,classNames:r,style:o,styles:s}),...i,onMouseDown:l=>{l.preventDefault()}})});ls.classes=Ke;ls.displayName="@mantine/core/ComboboxFooter";const xp={},us=se((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,children:i,label:c,...l}=K("ComboboxGroup",xp,e),u=at();return g.jsxs(ue,{ref:t,...u.getStyles("group",{className:n,classNames:r,style:o,styles:s}),...l,children:[c&&g.jsx("div",{...u.getStyles("groupLabel",{classNames:r,styles:s}),children:c}),i]})});us.classes=Ke;us.displayName="@mantine/core/ComboboxGroup";const wp={},ds=se((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,...i}=K("ComboboxHeader",wp,e),c=at();return g.jsx(ue,{ref:t,...c.getStyles("header",{className:n,classNames:r,style:o,styles:s}),...i,onMouseDown:l=>{l.preventDefault()}})});ds.classes=Ke;ds.displayName="@mantine/core/ComboboxHeader";function gc({value:e,valuesDivider:t=",",...r}){return g.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...r})}gc.displayName="@mantine/core/ComboboxHiddenInput";const Sp={},fs=se((e,t)=>{const r=K("ComboboxOption",Sp,e),{classNames:n,className:o,style:s,styles:a,vars:i,onClick:c,id:l,active:u,onMouseDown:d,onMouseOver:f,disabled:m,selected:v,mod:p,...h}=r,y=at(),w=x.useId(),b=l||w;return g.jsx(ue,{...y.getStyles("option",{className:o,classNames:n,styles:a,style:s}),...h,ref:t,id:b,mod:["combobox-option",{"combobox-active":u,"combobox-disabled":m,"combobox-selected":v},p],role:"option",onClick:C=>{var D;m?C.preventDefault():((D=y.onOptionSubmit)==null||D.call(y,r.value,r),c==null||c(C))},onMouseDown:C=>{C.preventDefault(),d==null||d(C)},onMouseOver:C=>{y.resetSelectionOnOptionHover&&y.store.resetSelectedOption(),f==null||f(C)}})});fs.classes=Ke;fs.displayName="@mantine/core/ComboboxOption";const Cp={},ms=se((e,t)=>{const r=K("ComboboxOptions",Cp,e),{classNames:n,className:o,style:s,styles:a,id:i,onMouseDown:c,labelledBy:l,...u}=r,d=at(),f=nr(i);return x.useEffect(()=>{d.store.setListId(f)},[f]),g.jsx(ue,{ref:t,...d.getStyles("options",{className:o,style:s,classNames:n,styles:a}),...u,id:f,role:"listbox","aria-labelledby":l,onMouseDown:m=>{m.preventDefault(),c==null||c(m)}})});ms.classes=Ke;ms.displayName="@mantine/core/ComboboxOptions";const Dp={withAriaAttributes:!0,withKeyboardNavigation:!0},ps=se((e,t)=>{const r=K("ComboboxSearch",Dp,e),{classNames:n,styles:o,unstyled:s,vars:a,withAriaAttributes:i,onKeyDown:c,withKeyboardNavigation:l,size:u,...d}=r,f=at(),m=f.getStyles("search"),v=cs({targetType:"input",withAriaAttributes:i,withKeyboardNavigation:l,withExpandedAttribute:!1,onKeyDown:c,autoComplete:"off"});return g.jsx($e,{ref:Ze(t,f.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},o],size:u||f.size,...v,...d,__staticSelector:"Combobox"})});ps.classes=Ke;ps.displayName="@mantine/core/ComboboxSearch";const _p={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},yc=se((e,t)=>{const{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:s,withExpandedAttribute:a,targetType:i,autoComplete:c,...l}=K("ComboboxTarget",_p,e);if(!kr(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=at(),d=cs({targetType:i,withAriaAttributes:s,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:c}),f=x.cloneElement(r,{...d,...l});return g.jsx(Xe.Target,{ref:Ze(t,u.store.targetRef),children:f})});yc.displayName="@mantine/core/ComboboxTarget";function Rp(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function Ep(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function Np(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}function bc({defaultOpened:e,opened:t,onOpenedChange:r,onDropdownClose:n,onDropdownOpen:o,loop:s=!0,scrollBehavior:a="instant"}={}){const[i,c]=bt({value:t,defaultValue:e,finalValue:!1,onChange:r}),l=x.useRef(null),u=x.useRef(-1),d=x.useRef(null),f=x.useRef(null),m=x.useRef(-1),v=x.useRef(-1),p=x.useRef(-1),h=x.useCallback((_="unknown")=>{i||(c(!0),o==null||o(_))},[c,o,i]),y=x.useCallback((_="unknown")=>{i&&(c(!1),n==null||n(_))},[c,n,i]),w=x.useCallback((_="unknown")=>{i?y(_):h(_)},[y,h,i]),b=x.useCallback(()=>{const _=document.querySelector(`#${l.current} [data-combobox-selected]`);_==null||_.removeAttribute("data-combobox-selected"),_==null||_.removeAttribute("aria-selected")},[]),C=x.useCallback(_=>{const E=document.getElementById(l.current),T=E==null?void 0:E.querySelectorAll("[data-combobox-option]");if(!T)return null;const N=_>=T.length?0:_<0?T.length-1:_;return u.current=N,T!=null&&T[N]&&!T[N].hasAttribute("data-combobox-disabled")?(b(),T[N].setAttribute("data-combobox-selected","true"),T[N].setAttribute("aria-selected","true"),T[N].scrollIntoView({block:"nearest",behavior:a}),T[N].id):null},[a,b]),D=x.useCallback(()=>{const _=document.querySelector(`#${l.current} [data-combobox-active]`);if(_){const E=document.querySelectorAll(`#${l.current} [data-combobox-option]`),T=Array.from(E).findIndex(N=>N===_);return C(T)}return C(0)},[C]),S=x.useCallback(()=>C(Ep(u.current,document.querySelectorAll(`#${l.current} [data-combobox-option]`),s)),[C,s]),O=x.useCallback(()=>C(Rp(u.current,document.querySelectorAll(`#${l.current} [data-combobox-option]`),s)),[C,s]),k=x.useCallback(()=>C(Np(document.querySelectorAll(`#${l.current} [data-combobox-option]`))),[C]),j=x.useCallback((_="selected",E)=>{p.current=window.setTimeout(()=>{var I;const T=document.querySelectorAll(`#${l.current} [data-combobox-option]`),N=Array.from(T).findIndex(A=>A.hasAttribute(`data-combobox-${_}`));u.current=N,E!=null&&E.scrollIntoView&&((I=T[N])==null||I.scrollIntoView({block:"nearest",behavior:a}))},0)},[]),P=x.useCallback(()=>{u.current=-1,b()},[b]),L=x.useCallback(()=>{const _=document.querySelectorAll(`#${l.current} [data-combobox-option]`),E=_==null?void 0:_[u.current];E==null||E.click()},[]),V=x.useCallback(_=>{l.current=_},[]),z=x.useCallback(()=>{m.current=window.setTimeout(()=>d.current.focus(),0)},[]),M=x.useCallback(()=>{v.current=window.setTimeout(()=>f.current.focus(),0)},[]),$=x.useCallback(()=>u.current,[]);return x.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(v.current),window.clearTimeout(p.current)},[]),{dropdownOpened:i,openDropdown:h,closeDropdown:y,toggleDropdown:w,selectedOptionIndex:u.current,getSelectedOptionIndex:$,selectOption:C,selectFirstOption:k,selectActiveOption:D,selectNextOption:S,selectPreviousOption:O,resetSelectedOption:P,updateSelectedOptionIndex:j,listId:l.current,setListId:V,clickSelectedOption:L,searchRef:d,focusSearchInput:z,targetRef:f,focusTarget:M}}const Tp={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},Op=(e,{size:t,dropdownPadding:r})=>({options:{"--combobox-option-fz":Ie(t),"--combobox-option-padding":Ne(t,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:_e(r),"--combobox-option-fz":Ie(t),"--combobox-option-padding":Ne(t,"combobox-option-padding")}});function Ee(e){const t=K("Combobox",Tp,e),{classNames:r,styles:n,unstyled:o,children:s,store:a,vars:i,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:m,readOnly:v,...p}=t,h=bc(),y=a||h,w=ye({name:m||"Combobox",classes:Ke,props:t,classNames:r,styles:n,unstyled:o,vars:i,varsResolver:Op}),b=()=>{l==null||l(),y.closeDropdown()};return g.jsx(pp,{value:{getStyles:w,store:y,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:v},children:g.jsx(Xe,{opened:y.dropdownOpened,...p,onChange:C=>!C&&b(),withRoles:!1,unstyled:o,children:s})})}const kp=e=>e;Ee.extend=kp;Ee.classes=Ke;Ee.displayName="@mantine/core/Combobox";Ee.Target=yc;Ee.Dropdown=as;Ee.Options=ms;Ee.Option=fs;Ee.Search=ps;Ee.Empty=is;Ee.Chevron=ss;Ee.Footer=ls;Ee.Header=ds;Ee.EventsTarget=vc;Ee.DropdownTarget=hc;Ee.Group=us;Ee.ClearButton=pc;Ee.HiddenInput=gc;var xc={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const $p=xc,wc=x.forwardRef(({__staticSelector:e,__stylesApiProps:t,className:r,classNames:n,styles:o,unstyled:s,children:a,label:i,description:c,id:l,disabled:u,error:d,size:f,labelPosition:m="left",bodyElement:v="div",labelElement:p="label",variant:h,style:y,vars:w,mod:b,...C},D)=>{const S=ye({name:e,props:t,className:r,style:y,classes:xc,classNames:n,styles:o,unstyled:s});return g.jsx(ue,{...S("root"),ref:D,__vars:{"--label-fz":Ie(f),"--label-lh":Ne(f,"label-lh")},mod:[{"label-position":m},b],variant:h,size:f,...C,children:g.jsxs(ue,{component:v,htmlFor:v==="label"?l:void 0,...S("body"),children:[a,g.jsxs("div",{...S("labelWrapper"),"data-disabled":u||void 0,children:[i&&g.jsx(ue,{component:p,htmlFor:p==="label"?l:void 0,...S("label"),"data-disabled":u||void 0,children:i}),c&&g.jsx($e.Description,{size:f,__inheritStyles:!1,...S("description"),children:c}),d&&typeof d!="boolean"&&g.jsx($e.Error,{size:f,__inheritStyles:!1,...S("error"),children:d})]})]})})});wc.displayName="@mantine/core/InlineInput";const Sc=x.createContext(null),jp=Sc.Provider,Cc=()=>x.useContext(Sc),[Ap,Pp]=un();var Dc={card:"m_26775b0a"};const Mp={withBorder:!0},Lp=(e,{radius:t})=>({card:{"--card-radius":Je(t)}}),hs=se((e,t)=>{const r=K("CheckboxCard",Mp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,checked:l,mod:u,withBorder:d,value:f,onClick:m,defaultChecked:v,onChange:p,...h}=r,y=ye({name:"CheckboxCard",classes:Dc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Lp,rootSelector:"card"}),w=Cc(),b=typeof l=="boolean"?l:w?w.value.includes(f||""):void 0,[C,D]=bt({value:b,defaultValue:v,finalValue:!1,onChange:p});return g.jsx(Ap,{value:{checked:C},children:g.jsx(tt,{ref:t,mod:[{"with-border":d,checked:C},u],...y("card"),...h,role:"checkbox","aria-checked":C,onClick:S=>{m==null||m(S),w==null||w.onChange(f||""),D(!C)}})})});hs.displayName="@mantine/core/CheckboxCard";hs.classes=Dc;function Ip({children:e,role:t}){const r=Mr();return r?g.jsx("div",{role:t,"aria-labelledby":r.labelId,"aria-describedby":r.describedBy,children:e}):g.jsx(g.Fragment,{children:e})}const Fp={},vs=se((e,t)=>{const{value:r,defaultValue:n,onChange:o,size:s,wrapperProps:a,children:i,readOnly:c,...l}=K("CheckboxGroup",Fp,e),[u,d]=bt({value:r,defaultValue:n,finalValue:[],onChange:o}),f=m=>{const v=typeof m=="string"?m:m.currentTarget.value;!c&&d(u.includes(v)?u.filter(p=>p!==v):[...u,v])};return g.jsx(jp,{value:{value:u,onChange:f,size:s},children:g.jsx($e.Wrapper,{size:s,ref:t,...a,...l,labelElement:"div",__staticSelector:"CheckboxGroup",children:g.jsx(Ip,{role:"group",children:i})})})});vs.classes=$e.Wrapper.classes;vs.displayName="@mantine/core/CheckboxGroup";function gs({size:e,style:t,...r}){const n=e!==void 0?{width:_e(e),height:_e(e),...t}:t;return g.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r,children:g.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function _c({indeterminate:e,...t}){return e?g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...t,children:g.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):g.jsx(gs,{...t})}var Rc={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const Vp={icon:_c},zp=(e,{radius:t,color:r,size:n,iconColor:o,variant:s,autoContrast:a})=>{const i=sr({color:r||e.primaryColor,theme:e}),c=i.isThemeColor&&i.shade===void 0?`var(--mantine-color-${i.color}-outline)`:i.color;return{indicator:{"--checkbox-size":Ne(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Je(t),"--checkbox-color":s==="outline"?c:xt(r,e),"--checkbox-icon-color":o?xt(o,e):mi(a,e)?fi({color:r,theme:e,autoContrast:a}):void 0}}},ys=se((e,t)=>{const r=K("CheckboxIndicator",Vp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,icon:l,indeterminate:u,radius:d,color:f,iconColor:m,autoContrast:v,checked:p,mod:h,variant:y,disabled:w,...b}=r,C=l,D=ye({name:"CheckboxIndicator",classes:Rc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:zp,rootSelector:"indicator"}),S=Pp(),O=typeof p=="boolean"||typeof u=="boolean"?p||u:(S==null?void 0:S.checked)||!1;return g.jsx(ue,{ref:t,...D("indicator",{variant:y}),variant:y,mod:[{checked:O,disabled:w},h],...b,children:g.jsx(C,{indeterminate:u,...D("icon")})})});ys.displayName="@mantine/core/CheckboxIndicator";ys.classes=Rc;var Ec={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const Bp={labelPosition:"right",icon:_c},Wp=(e,{radius:t,color:r,size:n,iconColor:o,variant:s,autoContrast:a})=>{const i=sr({color:r||e.primaryColor,theme:e}),c=i.isThemeColor&&i.shade===void 0?`var(--mantine-color-${i.color}-outline)`:i.color;return{root:{"--checkbox-size":Ne(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Je(t),"--checkbox-color":s==="outline"?c:xt(r,e),"--checkbox-icon-color":o?xt(o,e):mi(a,e)?fi({color:r,theme:e,autoContrast:a}):void 0}}},dr=se((e,t)=>{const r=K("Checkbox",Bp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,color:l,label:u,id:d,size:f,radius:m,wrapperProps:v,checked:p,labelPosition:h,description:y,error:w,disabled:b,variant:C,indeterminate:D,icon:S,rootRef:O,iconColor:k,onChange:j,autoContrast:P,mod:L,...V}=r,z=Cc(),M=f||(z==null?void 0:z.size),$=S,_=ye({name:"Checkbox",props:r,classes:Ec,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Wp}),{styleProps:E,rest:T}=fn(V),N=nr(d),I=z?{checked:z.value.includes(T.value),onChange:Y=>{z.onChange(Y),j==null||j(Y)}}:{},A=x.useRef(null),B=t||A;return x.useEffect(()=>{B&&"current"in B&&B.current&&(B.current.indeterminate=D||!1)},[D,B]),g.jsx(wc,{..._("root"),__staticSelector:"Checkbox",__stylesApiProps:r,id:N,size:M,labelPosition:h,label:u,description:y,error:w,disabled:b,classNames:n,styles:a,unstyled:i,"data-checked":I.checked||p||void 0,variant:C,ref:O,mod:L,...E,...v,children:g.jsxs(ue,{..._("inner"),mod:{"data-label-position":h},children:[g.jsx(ue,{component:"input",id:N,ref:B,checked:p,disabled:b,mod:{error:!!w,indeterminate:D},..._("input",{focusable:!0,variant:C}),onChange:j,...T,...I,type:"checkbox"}),g.jsx($,{indeterminate:D,..._("icon")})]})})});dr.classes={...Ec,...$p};dr.displayName="@mantine/core/Checkbox";dr.Group=vs;dr.Indicator=ys;dr.Card=hs;function _r(e){return"group"in e}function Nc({options:e,search:t,limit:r}){const n=t.trim().toLowerCase(),o=[];for(let s=0;s<e.length;s+=1){const a=e[s];if(o.length===r)return o;_r(a)&&o.push({group:a.group,items:Nc({options:a.items,search:t,limit:r-o.length})}),_r(a)||a.label.toLowerCase().includes(n)&&o.push(a)}return o}function Yp(e){if(e.length===0)return!0;for(const t of e)if(!("group"in t)||t.items.length>0)return!1;return!0}function Tc(e,t=new Set){if(Array.isArray(e))for(const r of e)if(_r(r))Tc(r.items,t);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(t.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);t.add(r.value)}}function Hp(e,t){return Array.isArray(e)?e.includes(t):e===t}function Oc({data:e,withCheckIcon:t,value:r,checkIconPosition:n,unstyled:o,renderOption:s}){if(!_r(e)){const i=Hp(r,e.value),c=t&&i&&g.jsx(gs,{className:Ke.optionsDropdownCheckIcon}),l=g.jsxs(g.Fragment,{children:[n==="left"&&c,g.jsx("span",{children:e.label}),n==="right"&&c]});return g.jsx(Ee.Option,{value:e.value,disabled:e.disabled,className:Fe({[Ke.optionsDropdownOption]:!o}),"data-reverse":n==="right"||void 0,"data-checked":i||void 0,"aria-selected":i,active:i,children:typeof s=="function"?s({option:e,checked:i}):l})}const a=e.items.map(i=>g.jsx(Oc,{data:i,value:r,unstyled:o,withCheckIcon:t,checkIconPosition:n,renderOption:s},i.value));return g.jsx(Ee.Group,{label:e.group,children:a})}function Up({data:e,hidden:t,hiddenWhenEmpty:r,filter:n,search:o,limit:s,maxDropdownHeight:a,withScrollArea:i=!0,filterOptions:c=!0,withCheckIcon:l=!1,value:u,checkIconPosition:d,nothingFoundMessage:f,unstyled:m,labelId:v,renderOption:p,scrollAreaProps:h,"aria-label":y}){Tc(e);const b=typeof o=="string"?(n||Nc)({options:e,search:c?o:"",limit:s??1/0}):e,C=Yp(b),D=b.map(S=>g.jsx(Oc,{data:S,withCheckIcon:l,value:u,checkIconPosition:d,unstyled:m,renderOption:p},_r(S)?S.group:S.value));return g.jsx(Ee.Dropdown,{hidden:t||r&&C,"data-composed":!0,children:g.jsxs(Ee.Options,{labelledBy:v,"aria-label":y,children:[i?g.jsx(jr.Autosize,{mah:a??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...h,children:D}):D,C&&f&&g.jsx(Ee.Empty,{children:f})]})})}var fr={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const Sa={orientation:"horizontal"},Gp=(e,{borderWidth:t})=>({group:{"--button-border-width":_e(t)}}),bs=se((e,t)=>{const r=K("ButtonGroup",Sa,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,...m}=K("ButtonGroup",Sa,e),v=ye({name:"ButtonGroup",props:r,classes:fr,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:l,varsResolver:Gp,rootSelector:"group"});return g.jsx(ue,{...v("group"),ref:t,variant:d,mod:[{"data-orientation":c},f],role:"group",...m})});bs.classes=fr;bs.displayName="@mantine/core/ButtonGroup";const Ca={},qp=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:s,size:a})=>{const i=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{groupSection:{"--section-height":Ne(a,"section-height"),"--section-padding-x":Ne(a,"section-padding-x"),"--section-fz":a!=null&&a.includes("compact")?Ie(a.replace("compact-","")):Ie(a),"--section-radius":t===void 0?void 0:Je(t),"--section-bg":r||o?i.background:void 0,"--section-color":i.color,"--section-bd":r||o?i.border:void 0}}},xs=se((e,t)=>{const r=K("ButtonGroupSection",Ca,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,...m}=K("ButtonGroupSection",Ca,e),v=ye({name:"ButtonGroupSection",props:r,classes:fr,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,varsResolver:qp,rootSelector:"groupSection"});return g.jsx(ue,{...v("groupSection"),ref:t,variant:l,...m})});xs.classes=fr;xs.displayName="@mantine/core/ButtonGroupSection";const Xp={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${_e(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Kp={},Zp=(e,{radius:t,color:r,gradient:n,variant:o,size:s,justify:a,autoContrast:i})=>{const c=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{root:{"--button-justify":a,"--button-height":Ne(s,"button-height"),"--button-padding-x":Ne(s,"button-padding-x"),"--button-fz":s!=null&&s.includes("compact")?Ie(s.replace("compact-","")):Ie(s),"--button-radius":t===void 0?void 0:Je(t),"--button-bg":r||o?c.background:void 0,"--button-hover":r||o?c.hover:void 0,"--button-color":c.color,"--button-bd":r||o?c.border:void 0,"--button-hover-color":r||o?c.hoverColor:void 0}}},tr=Ct((e,t)=>{const r=K("Button",Kp,e),{style:n,vars:o,className:s,color:a,disabled:i,children:c,leftSection:l,rightSection:u,fullWidth:d,variant:f,radius:m,loading:v,loaderProps:p,gradient:h,classNames:y,styles:w,unstyled:b,"data-disabled":C,autoContrast:D,mod:S,...O}=r,k=ye({name:"Button",props:r,classes:fr,className:s,style:n,classNames:y,styles:w,unstyled:b,vars:o,varsResolver:Zp}),j=!!l,P=!!u;return g.jsxs(tt,{ref:t,...k("root",{active:!i&&!v&&!C}),unstyled:b,variant:f,disabled:i||v,mod:[{disabled:i||C,loading:v,block:d,"with-left-section":j,"with-right-section":P},S],...O,children:[g.jsx(zt,{mounted:!!v,transition:Xp,duration:150,children:L=>g.jsx(ue,{component:"span",...k("loader",{style:L}),"aria-hidden":!0,children:g.jsx(Ar,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...p})})}),g.jsxs("span",{...k("inner"),children:[l&&g.jsx(ue,{component:"span",...k("section"),mod:{position:"left"},children:l}),g.jsx(ue,{component:"span",mod:{loading:v},...k("label"),children:c}),u&&g.jsx(ue,{component:"span",...k("section"),mod:{position:"right"},children:u})]})]})});tr.classes=fr;tr.displayName="@mantine/core/Button";tr.Group=bs;tr.GroupSection=xs;var kc={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};const Jp={variant:"default"},Qp=(e,{radius:t})=>({root:{"--fieldset-radius":t===void 0?void 0:Je(t)}}),ws=se((e,t)=>{const r=K("Fieldset",Jp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,legend:l,variant:u,children:d,...f}=r,m=ye({name:"Fieldset",classes:kc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Qp});return g.jsxs(ue,{component:"fieldset",ref:t,variant:u,...m("root",{variant:u}),...f,children:[l&&g.jsx("legend",{...m("legend",{variant:u}),children:l}),d]})});ws.classes=kc;ws.displayName="@mantine/core/Fieldset";function Eo(){return Eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eo.apply(null,arguments)}function eh(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var th=x.useLayoutEffect,rh=function(t){var r=x.useRef(t);return th(function(){r.current=t}),r},Da=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},nh=function(t,r){var n=x.useRef();return x.useCallback(function(o){t.current=o,n.current&&Da(n.current,null),n.current=r,r&&Da(r,o)},[r])},_a={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},oh=function(t){Object.keys(_a).forEach(function(r){t.style.setProperty(r,_a[r],"important")})},Ra=oh,Ge=null,Ea=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function sh(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Ge||(Ge=document.createElement("textarea"),Ge.setAttribute("tabindex","-1"),Ge.setAttribute("aria-hidden","true"),Ra(Ge)),Ge.parentNode===null&&document.body.appendChild(Ge);var o=e.paddingSize,s=e.borderSize,a=e.sizingStyle,i=a.boxSizing;Object.keys(a).forEach(function(f){var m=f;Ge.style[m]=a[m]}),Ra(Ge),Ge.value=t;var c=Ea(Ge,e);Ge.value=t,c=Ea(Ge,e),Ge.value="x";var l=Ge.scrollHeight-o,u=l*r;i==="border-box"&&(u=u+o+s),c=Math.max(u,c);var d=l*n;return i==="border-box"&&(d=d+o+s),c=Math.min(d,c),[c,l]}var Na=function(){},ah=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},ih=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],ch=!!document.documentElement.currentStyle,lh=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=ah(ih,r),o=n.boxSizing;if(o==="")return null;ch&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var s=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:s,borderSize:a}},uh=lh;function Ss(e,t,r){var n=rh(r);G.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var dh=function(t,r){Ss(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},fh=function(t){Ss(window,"resize",t)},mh=function(t){Ss(document.fonts,"loadingdone",t)},ph=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],hh=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,s=t.minRows,a=t.onChange,i=a===void 0?Na:a,c=t.onHeightChange,l=c===void 0?Na:c,u=eh(t,ph),d=u.value!==void 0,f=G.useRef(null),m=nh(f,r),v=G.useRef(0),p=G.useRef(),h=function(){var b=f.current,C=n&&p.current?p.current:uh(b);if(C){p.current=C;var D=sh(C,b.value||b.placeholder||"x",s,o),S=D[0],O=D[1];v.current!==S&&(v.current=S,b.style.setProperty("height",S+"px","important"),l(S,{rowHeight:O}))}},y=function(b){d||h(),i(b)};return G.useLayoutEffect(h),dh(f,function(){if(!d){var w=f.current.value;requestAnimationFrame(function(){var b=f.current;b&&w!==b.value&&h()})}}),fh(h),mh(h),G.createElement("textarea",Eo({},u,{onChange:y,ref:m}))},vh=G.forwardRef(hh);const gh={},Cs=se((e,t)=>{const{autosize:r,maxRows:n,minRows:o,__staticSelector:s,resize:a,...i}=K("Textarea",gh,e),c=r&&Vu()!=="test",l=c?{maxRows:n,minRows:o}:{};return g.jsx(st,{component:c?vh:"textarea",ref:t,...i,__staticSelector:s||"Textarea",multiline:!0,"data-no-overflow":r&&n===void 0||void 0,__vars:{"--input-resize":a},...l})});Cs.classes=st.classes;Cs.displayName="@mantine/core/Textarea";const[yh,mr]=or("Modal component was not found in tree");var _t={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const bh={},_n=se((e,t)=>{const r=K("ModalBody",bh,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=mr();return g.jsx(oc,{ref:t,...l.getStyles("body",{classNames:n,style:s,styles:a,className:o}),...c})});_n.classes=_t;_n.displayName="@mantine/core/ModalBody";const xh={},Rn=se((e,t)=>{const r=K("ModalCloseButton",xh,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=mr();return g.jsx(sc,{ref:t,...l.getStyles("close",{classNames:n,style:s,styles:a,className:o}),...c})});Rn.classes=_t;Rn.displayName="@mantine/core/ModalCloseButton";const wh={},En=se((e,t)=>{const r=K("ModalContent",wh,e),{classNames:n,className:o,style:s,styles:a,vars:i,children:c,__hidden:l,...u}=r,d=mr(),f=d.scrollAreaComponent||Gm;return g.jsx(ac,{...d.getStyles("content",{className:o,style:s,styles:a,classNames:n}),innerProps:d.getStyles("inner",{className:o,style:s,styles:a,classNames:n}),"data-full-screen":d.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,ref:t,...u,children:g.jsx(f,{style:{maxHeight:d.fullScreen?"100dvh":`calc(100dvh - (${_e(d.yOffset)} * 2))`},children:c})})});En.classes=_t;En.displayName="@mantine/core/ModalContent";const Sh={},Nn=se((e,t)=>{const r=K("ModalHeader",Sh,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=mr();return g.jsx(ic,{ref:t,...l.getStyles("header",{classNames:n,style:s,styles:a,className:o}),...c})});Nn.classes=_t;Nn.displayName="@mantine/core/ModalHeader";const Ch={},Tn=se((e,t)=>{const r=K("ModalOverlay",Ch,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=mr();return g.jsx(cc,{ref:t,...l.getStyles("overlay",{classNames:n,style:s,styles:a,className:o}),...c})});Tn.classes=_t;Tn.displayName="@mantine/core/ModalOverlay";const Dh={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ft("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},_h=(e,{radius:t,size:r,yOffset:n,xOffset:o})=>({root:{"--modal-radius":t===void 0?void 0:Je(t),"--modal-size":Ne(r,"modal-size"),"--modal-y-offset":_e(n),"--modal-x-offset":_e(o)}}),On=se((e,t)=>{const r=K("ModalRoot",Dh,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,yOffset:l,scrollAreaComponent:u,radius:d,fullScreen:f,centered:m,xOffset:v,__staticSelector:p,...h}=r,y=ye({name:p,classes:_t,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:_h});return g.jsx(yh,{value:{yOffset:l,scrollAreaComponent:u,getStyles:y,fullScreen:f},children:g.jsx(nc,{ref:t,...y("root"),"data-full-screen":f||void 0,"data-centered":m||void 0,unstyled:i,...h})})});On.classes=_t;On.displayName="@mantine/core/ModalRoot";const[Rh,Eh]=un();function $c({children:e}){const[t,r]=x.useState([]),[n,o]=x.useState(Ft("modal"));return g.jsx(Rh,{value:{stack:t,addModal:(s,a)=>{r(i=>[...new Set([...i,s])]),o(i=>typeof a=="number"&&typeof i=="number"?Math.max(i,a):i)},removeModal:s=>r(a=>a.filter(i=>i!==s)),getZIndex:s=>`calc(${n} + ${t.indexOf(s)} + 1)`,currentId:t[t.length-1],maxZIndex:n},children:e})}$c.displayName="@mantine/core/ModalStack";const Nh={},kn=se((e,t)=>{const r=K("ModalTitle",Nh,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=mr();return g.jsx(lc,{ref:t,...l.getStyles("title",{classNames:n,style:s,styles:a,className:o}),...c})});kn.classes=_t;kn.displayName="@mantine/core/ModalTitle";const Th={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ft("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},dt=se((e,t)=>{const{title:r,withOverlay:n,overlayProps:o,withCloseButton:s,closeButtonProps:a,children:i,radius:c,opened:l,stackId:u,zIndex:d,...f}=K("Modal",Th,e),m=Eh(),v=!!r||s,p=m&&u?{closeOnEscape:m.currentId===u,trapFocus:m.currentId===u,zIndex:m.getZIndex(u)}:{},h=n===!1?!1:u&&m?m.currentId===u:l;return x.useEffect(()=>{m&&u&&(l?m.addModal(u,d||Ft("modal")):m.removeModal(u))},[l,u,d]),g.jsxs(On,{ref:t,radius:c,opened:l,zIndex:m&&u?m.getZIndex(u):d,...f,...p,children:[n&&g.jsx(Tn,{visible:h,transitionProps:m&&u?{duration:0}:void 0,...o}),g.jsxs(En,{radius:c,__hidden:m&&u&&l?u!==m.currentId:!1,children:[v&&g.jsxs(Nn,{children:[r&&g.jsx(kn,{children:r}),s&&g.jsx(Rn,{...a})]}),g.jsx(_n,{children:i})]})]})});dt.classes=_t;dt.displayName="@mantine/core/Modal";dt.Root=On;dt.Overlay=Tn;dt.Content=En;dt.Body=_n;dt.Header=Nn;dt.Title=kn;dt.CloseButton=Rn;dt.Stack=$c;function jc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var Rr;(function(e){e.event="event",e.props="prop"})(Rr||(Rr={}));function Tt(){}function Oh(e){var t,r=void 0;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t&&n.length===t.length&&n.every(function(s,a){return s===t[a]})||(t=n,r=e.apply(void 0,n)),r}}function Er(e){return!!(e||"").match(/\d/)}function Kt(e){return e==null}function kh(e){return typeof e=="number"&&isNaN(e)}function Ac(e){return Kt(e)||kh(e)||typeof e=="number"&&!isFinite(e)}function Pc(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function $h(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function jh(e,t,r){var n=$h(r),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}function Ah(e){var t=x.useRef(e);t.current=e;var r=x.useRef(function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t.current.apply(t,n)});return r.current}function Ds(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var o=e.split("."),s=o[0],a=o[1]||"";return{beforeDecimal:s,afterDecimal:a,hasNegation:r,addNegation:n}}function Ph(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}function Mc(e,t,r){for(var n="",o=r?"0":"",s=0;s<=t-1;s++)n+=e[s]||o;return n}function Ta(e,t){return Array(t+1).join(e)}function Lc(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],s=n[1];if(s=Number(s),!s)return r+o;o=o.replace(".","");var a=1+s,i=o.length;return a<0?o="0."+Ta("0",Math.abs(a))+o:a>=i?o=o+Ta("0",a-i):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function Oa(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,o=Ds(e),s=o.beforeDecimal,a=o.afterDecimal,i=o.hasNegation,c=parseFloat("0."+(a||"0")),l=a.length<=t?"0."+a:c.toFixed(t),u=l.split("."),d=s;s&&Number(u[0])&&(d=s.split("").reverse().reduce(function(p,h,y){return p.length>y?(Number(p[0])+Number(h)).toString()+p.substring(1,p.length):h+p},u[0]));var f=Mc(u[1]||"",t,r),m=i?"-":"",v=n?".":"";return""+m+d+v+f}function Mt(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ic=Oh(function(e,t){for(var r=0,n=0,o=e.length,s=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[s-1-n]&&s-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:s-n}}}),Mh=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Lh(e,t,r){return Math.min(Math.max(e,t),r)}function ao(e){return Math.max(e.selectionStart,e.selectionEnd)}function Ih(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Fh(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Vh(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function zh(e,t,r,n,o,s,a){a===void 0&&(a=Vh);var i=o.findIndex(function(C){return C}),c=e.slice(0,i);!t&&!r.startsWith(c)&&(t=c,r=c+r,n=n+c.length);for(var l=r.length,u=e.length,d={},f=new Array(l),m=0;m<l;m++){f[m]=-1;for(var v=0,p=u;v<p;v++){var h=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:m,formattedValueIndex:v});if(h&&d[v]!==!0){f[m]=v,d[v]=!0;break}}}for(var y=n;y<l&&(f[y]===-1||!s(r[y]));)y++;var w=y===l||f[y]===-1?u:f[y];for(y=n-1;y>0&&f[y]===-1;)y--;var b=y===-1||f[y]===-1?0:f[y]+1;return b>w?w:n-b<w-n?b:w}function ka(e,t,r,n){var o=e.length;if(t=Lh(t,0,o),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=o&&!r[t];)t++;t>o&&(t=r.lastIndexOf(!0))}return t===-1&&(t=o),t}function Bh(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(Er(e[r])||Er(e[r-1]));return t}function Fc(e,t,r,n,o,s){s===void 0&&(s=Tt);var a=Ah(function(v,p){var h,y;return Ac(v)?(y="",h=""):typeof v=="number"||p?(y=typeof v=="number"?Lc(v):v,h=n(y)):(y=o(v,void 0),h=n(y)),{formattedValue:h,numAsString:y}}),i=x.useState(function(){return a(Kt(e)?t:e,r)}),c=i[0],l=i[1],u=function(v,p){v.formattedValue!==c.formattedValue&&l({formattedValue:v.formattedValue,numAsString:v.value}),s(v,p)},d=e,f=r;Kt(e)&&(d=c.numAsString,f=!0);var m=a(d,f);return x.useMemo(function(){l(m)},[m.formattedValue]),[c,u]}function Wh(e){return e.replace(/[^0-9]/g,"")}function Yh(e){return e}function Hh(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,o=e.renderText,s=e.getInputRef,a=e.format;a===void 0&&(a=Yh);var i=e.removeFormatting;i===void 0&&(i=Wh);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Tt);var m=e.onKeyDown;m===void 0&&(m=Tt);var v=e.onMouseUp;v===void 0&&(v=Tt);var p=e.onFocus;p===void 0&&(p=Tt);var h=e.onBlur;h===void 0&&(h=Tt);var y=e.value,w=e.getCaretBoundary;w===void 0&&(w=Bh);var b=e.isValidInputCharacter;b===void 0&&(b=Er);var C=e.isCharacterSame,D=jc(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),S=Fc(y,c,!!l,a,i,u),O=S[0],k=O.formattedValue,j=O.numAsString,P=S[1],L=x.useRef(),V=x.useRef({formattedValue:k,numAsString:j}),z=function(U,J){V.current={formattedValue:U.formattedValue,numAsString:U.value},P(U,J)},M=x.useState(!1),$=M[0],_=M[1],E=x.useRef(null),T=x.useRef({setCaretTimeout:null,focusTimeout:null});x.useEffect(function(){return _(!0),function(){clearTimeout(T.current.setCaretTimeout),clearTimeout(T.current.focusTimeout)}},[]);var N=a,I=function(U,J){var ee=parseFloat(J);return{formattedValue:U,value:J,floatValue:isNaN(ee)?void 0:ee}},A=function(U,J,ee){U.selectionStart===0&&U.selectionEnd===U.value.length||(Mt(U,J),T.current.setCaretTimeout=setTimeout(function(){U.value===ee&&U.selectionStart!==J&&Mt(U,J)},0))},B=function(U,J,ee){return ka(U,J,w(U),ee)},Y=function(U,J,ee){var de=w(J),be=zh(J,k,U,ee,de,b,C);return be=ka(J,be,de),be},te=function(U){var J=U.formattedValue;J===void 0&&(J="");var ee=U.input,de=U.source,be=U.event,oe=U.numAsString,he;if(ee){var H=U.inputValue||ee.value,ce=ao(ee);ee.value=J,he=Y(H,J,ce),he!==void 0&&A(ee,he,J)}J!==k&&z(I(J,oe),{event:be,source:de})};x.useEffect(function(){var U=V.current,J=U.formattedValue,ee=U.numAsString;(k!==J||j!==ee)&&z(I(k,j),{event:void 0,source:Rr.props})},[k,j]);var F=E.current?ao(E.current):void 0,Q=typeof window<"u"?x.useLayoutEffect:x.useEffect;Q(function(){var U=E.current;if(k!==V.current.formattedValue&&U){var J=Y(V.current.formattedValue,k,F);U.value=k,A(U,J,k)}},[k]);var re=function(U,J,ee){var de=J.target,be=L.current?Mh(L.current,de.selectionEnd):Ic(k,U),oe=Object.assign(Object.assign({},be),{lastValue:k}),he=i(U,oe),H=N(he);if(he=i(H,void 0),d&&!d(I(H,he))){var ce=J.target,we=ao(ce),Oe=Y(U,k,we);return ce.value=k,A(ce,Oe,k),!1}return te({formattedValue:H,numAsString:he,inputValue:U,event:J,source:ee,input:J.target}),!0},ae=function(U,J){J===void 0&&(J=0);var ee=U.selectionStart,de=U.selectionEnd;L.current={selectionStart:ee,selectionEnd:de+J}},Z=function(U){var J=U.target,ee=J.value,de=re(ee,U,Rr.event);de&&f(U),L.current=void 0},le=function(U){var J=U.target,ee=U.key,de=J.selectionStart,be=J.selectionEnd,oe=J.value;oe===void 0&&(oe="");var he;ee==="ArrowLeft"||ee==="Backspace"?he=Math.max(de-1,0):ee==="ArrowRight"?he=Math.min(de+1,oe.length):ee==="Delete"&&(he=de);var H=0;ee==="Delete"&&de===be&&(H=1);var ce=ee==="ArrowLeft"||ee==="ArrowRight";if(he===void 0||de!==be&&!ce){m(U),ae(J,H);return}var we=he;if(ce){var Oe=ee==="ArrowLeft"?"left":"right";we=B(oe,he,Oe),we!==he&&U.preventDefault()}else ee==="Delete"&&!b(oe[he])?we=B(oe,he,"right"):ee==="Backspace"&&!b(oe[he])&&(we=B(oe,he,"left"));we!==he&&A(J,we,oe),m(U),ae(J,H)},ie=function(U){var J=U.target,ee=function(){var de=J.selectionStart,be=J.selectionEnd,oe=J.value;if(oe===void 0&&(oe=""),de===be){var he=B(oe,de);he!==de&&A(J,he,oe)}};ee(),requestAnimationFrame(function(){ee()}),v(U),ae(J)},pe=function(U){U.persist&&U.persist();var J=U.target,ee=U.currentTarget;E.current=J,T.current.focusTimeout=setTimeout(function(){var de=J.selectionStart,be=J.selectionEnd,oe=J.value;oe===void 0&&(oe="");var he=B(oe,de);he!==de&&!(de===0&&be===oe.length)&&A(J,he,oe),p(Object.assign(Object.assign({},U),{currentTarget:ee}))},0)},X=function(U){E.current=null,clearTimeout(T.current.focusTimeout),clearTimeout(T.current.setCaretTimeout),h(U)},me=$&&Ih()?"numeric":void 0,fe=Object.assign({inputMode:me},D,{type:t,value:k,onChange:Z,onKeyDown:le,onMouseUp:ie,onFocus:pe,onBlur:X});if(r==="text")return o?x.createElement(x.Fragment,null,o(k,D)||null):x.createElement("span",Object.assign({},D,{ref:s}),k);if(n){var ge=n;return x.createElement(ge,Object.assign({},fe,{ref:s}))}return x.createElement("input",Object.assign({},fe,{ref:s}))}function $a(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var s=t.suffix;s===void 0&&(s="");var a=t.allowNegative,i=t.thousandsGroupStyle;if(i===void 0&&(i="thousand"),e===""||e==="-")return e;var c=$n(t),l=c.thousandSeparator,u=c.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,f=Ds(e,a),m=f.beforeDecimal,v=f.afterDecimal,p=f.addNegation;return r!==void 0&&(v=Mc(v,r,!!n)),l&&(m=jh(m,l,i)),o&&(m=o+m),s&&(v=v+s),p&&(m="-"+m),e=m+(d&&u||"")+v,e}function $n(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Uh(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),s=n.test(e);return e=e.replace(/-/g,""),o&&!s&&t&&(e="-"+e),e}function Gh(e,t){return new RegExp("(^-)|[0-9]|"+Pc(e),"g")}function qh(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Xh(e,t,r){var n;t===void 0&&(t=Fh(e));var o=r.allowNegative,s=r.prefix;s===void 0&&(s="");var a=r.suffix;a===void 0&&(a="");var i=r.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=$n(r),m=f.allowedDecimalSeparators,v=f.decimalSeparator,p=e[d]===v;if(Er(e)&&(e===s||e===a)&&t.lastValue==="")return e;if(d-u===1&&m.indexOf(e[u])!==-1){var h=i===0?"":v;e=e.substring(0,u)+h+e.substring(u+1,e.length)}var y=function(E,T,N){var I=!1,A=!1;s.startsWith("-")?I=!1:E.startsWith("--")?(I=!1,A=!0):a.startsWith("-")&&E.length===a.length?I=!1:E[0]==="-"&&(I=!0);var B=I?1:0;return A&&(B=2),B&&(E=E.substring(B),T-=B,N-=B),{value:E,start:T,end:N,hasNegation:I}},w=y(e,u,d),b=w.hasNegation;n=w,e=n.value,u=n.start,d=n.end;var C=y(t.lastValue,c.start,c.end),D=C.start,S=C.end,O=C.value,k=e.substring(u,d);e.length&&O.length&&(D>O.length-a.length||S<s.length)&&!(k&&a.startsWith(k))&&(e=O);var j=0;e.startsWith(s)?j+=s.length:u<s.length&&(j=u),e=e.substring(j),d-=j;var P=e.length,L=e.length-a.length;e.endsWith(a)?P=L:(d>L||d>e.length-a.length)&&(P=d),e=e.substring(0,P),e=Uh(b?"-"+e:e,o),e=(e.match(Gh(v))||[]).join("");var V=e.indexOf(v);e=e.replace(new RegExp(Pc(v),"g"),function(E,T){return T===V?".":""});var z=Ds(e,o),M=z.beforeDecimal,$=z.afterDecimal,_=z.addNegation;return l.end-l.start<c.end-c.start&&M===""&&p&&!parseFloat($)&&(e=_?"-":""),e}function Kh(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),s=e[0]==="-";o.fill(!1,0,r.length+(s?1:0));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}function Zh(e){var t=$n(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var s=e.allowNegative;if(s===void 0&&(s=!0),r===n)throw new Error(`
|
|
71
|
-
Decimal separator can't be same as thousand separator.
|
|
72
|
-
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
73
|
-
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
|
74
|
-
`);return o.startsWith("-")&&s&&(console.error(`
|
|
75
|
-
Prefix can't start with '-' when allowNegative is true.
|
|
76
|
-
prefix: `+o+`
|
|
77
|
-
allowNegative: `+s+`
|
|
78
|
-
`),s=!1),Object.assign(Object.assign({},e),{allowNegative:s})}function Jh(e){e=Zh(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,o=e.onKeyDown;o===void 0&&(o=Tt);var s=e.onBlur;s===void 0&&(s=Tt);var a=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,m=e.onValueChange,v=jc(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),p=$n(e),h=p.decimalSeparator,y=p.allowedDecimalSeparators,w=function(_){return $a(_,e)},b=function(_,E){return Xh(_,E,e)},C=Kt(d)?u:d,D=f??qh(C,l,t);Kt(d)?Kt(u)||(D=D||typeof u=="number"):D=D||typeof d=="number";var S=function(_){return Ac(_)?_:(typeof _=="number"&&(_=Lc(_)),D&&typeof i=="number"?Oa(_,i,!!c):_)},O=Fc(S(d),S(u),!!D,w,b,m),k=O[0],j=k.numAsString,P=k.formattedValue,L=O[1],V=function(_){var E=_.target,T=_.key,N=E.selectionStart,I=E.selectionEnd,A=E.value;if(A===void 0&&(A=""),(T==="Backspace"||T==="Delete")&&I<l.length){_.preventDefault();return}if(N!==I){o(_);return}T==="Backspace"&&A[0]==="-"&&N===l.length+1&&r&&Mt(E,1),i&&c&&(T==="Backspace"&&A[N-1]===h?(Mt(E,N-1),_.preventDefault()):T==="Delete"&&A[N]===h&&_.preventDefault()),y!=null&&y.includes(T)&&A[N]===h&&Mt(E,N+1);var B=a===!0?",":a;T==="Backspace"&&A[N-1]===B&&Mt(E,N-1),T==="Delete"&&A[N]===B&&Mt(E,N+1),o(_)},z=function(_){var E=j;if(E.match(/\d/g)||(E=""),n||(E=Ph(E)),c&&i&&(E=Oa(E,i,c)),E!==j){var T=$a(E,e);L({formattedValue:T,value:E,floatValue:parseFloat(E)},{event:_,source:Rr.event})}s(_)},M=function(_){return _===h?!0:Er(_)},$=function(_){var E=_.currentValue,T=_.lastValue,N=_.formattedValue,I=_.currentValueIndex,A=_.formattedValueIndex,B=E[I],Y=N[A],te=Ic(T,E),F=te.to,Q=function(re){return b(re).indexOf(".")+l.length};return d===0&&c&&i&&E[F.start]===h&&Q(E)<I&&Q(N)>A?!1:I>=F.start&&I<F.end&&y&&y.includes(B)&&Y===h?!0:B===Y};return Object.assign(Object.assign({},v),{value:P,valueIsNumericString:!1,isValidInputCharacter:M,isCharacterSame:$,onValueChange:L,format:w,removeFormatting:b,getCaretBoundary:function(_){return Kh(_,e)},onKeyDown:V,onBlur:z})}function Qh(e){var t=Jh(e);return x.createElement(Hh,Object.assign({},t))}function ja({direction:e,style:t,...r}){return g.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var No={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const ev=/^(0\.0*|-0(\.0*)?)$/,tv=/^-?0\d+(\.\d+)?\.?$/;function To(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function io(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||To(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function rv(e){return e.toString().replace(".","").length}function nv(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&rv(t)<14&&t!==""}function Aa(e,t,r){if(e===void 0)return!0;const n=t===void 0||e>=t,o=r===void 0||e<=r;return n&&o}const ov={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},sv=(e,{size:t})=>({controls:{"--ni-chevron-size":Ne(t,"ni-chevron-size")}}),_s=se((e,t)=>{const r=K("NumberInput",ov,e),{className:n,classNames:o,styles:s,unstyled:a,vars:i,onChange:c,onValueChange:l,value:u,defaultValue:d,max:f,min:m,step:v,hideControls:p,rightSection:h,isAllowed:y,clampBehavior:w,onBlur:b,allowDecimal:C,decimalScale:D,onKeyDown:S,onKeyDownCapture:O,handlersRef:k,startValue:j,disabled:P,rightSectionPointerEvents:L,allowNegative:V,readOnly:z,size:M,rightSectionWidth:$,stepHoldInterval:_,stepHoldDelay:E,allowLeadingZeros:T,withKeyboardEvents:N,trimLeadingZeroesOnBlur:I,...A}=r,B=ye({name:"NumberInput",classes:No,props:r,classNames:o,styles:s,unstyled:a,vars:i,varsResolver:sv}),{resolvedClassNames:Y,resolvedStyles:te}=St({classNames:o,styles:s,props:r}),[F,Q]=bt({value:u,defaultValue:d,finalValue:"",onChange:c}),re=E!==void 0&&_!==void 0,ae=x.useRef(null),Z=x.useRef(null),le=x.useRef(0),ie=(H,ce)=>{ce.source==="event"&&Q(nv(H.floatValue,H.value)&&!ev.test(H.value)&&!(T&&tv.test(H.value))?H.floatValue:H.value),l==null||l(H,ce)},pe=H=>{const ce=String(H).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return ce?Math.max(0,(ce[1]?ce[1].length:0)-(ce[2]?+ce[2]:0)):0},X=H=>{ae.current&&typeof H<"u"&&ae.current.setSelectionRange(H,H)},me=x.useRef(vo);me.current=()=>{if(!io(F))return;let H;const ce=pe(F),we=pe(v),Oe=Math.max(ce,we),De=10**Oe;if(!To(F)&&(typeof F!="number"||Number.isNaN(F)))H=Cr(j,m,f);else if(f!==void 0){const Pe=(Math.round(Number(F)*De)+Math.round(v*De))/De;H=Pe<=f?Pe:f}else H=(Math.round(Number(F)*De)+Math.round(v*De))/De;const je=H.toFixed(Oe);Q(parseFloat(je)),l==null||l({floatValue:parseFloat(je),formattedValue:je,value:je},{source:"increment"}),setTimeout(()=>{var Pe;return X((Pe=ae.current)==null?void 0:Pe.value.length)},0)};const fe=x.useRef(vo);fe.current=()=>{if(!io(F))return;let H;const ce=m!==void 0?m:V?Number.MIN_SAFE_INTEGER:0,we=pe(F),Oe=pe(v),De=Math.max(we,Oe),je=10**De;if(!To(F)&&typeof F!="number"||Number.isNaN(F))H=Cr(j,ce,f);else{const Re=(Math.round(Number(F)*je)-Math.round(v*je))/je;H=ce!==void 0&&Re<ce?ce:Re}const Pe=H.toFixed(De);Q(parseFloat(Pe)),l==null||l({floatValue:parseFloat(Pe),formattedValue:Pe,value:Pe},{source:"decrement"}),setTimeout(()=>{var Re;return X((Re=ae.current)==null?void 0:Re.value.length)},0)};const ge=H=>{S==null||S(H),!(z||!N)&&(H.key==="ArrowUp"&&(H.preventDefault(),me.current()),H.key==="ArrowDown"&&(H.preventDefault(),fe.current()))},U=H=>{if(O==null||O(H),H.key==="Backspace"){const ce=ae.current;ce.selectionStart===0&&ce.selectionStart===ce.selectionEnd&&(H.preventDefault(),window.setTimeout(()=>X(0),0))}},J=H=>{let ce=F;if(w==="blur"&&typeof ce=="number"&&(ce=Cr(ce,m,f)),I&&typeof ce=="string"&&pe(ce)<15){const we=ce.toString().replace(/^0+/,""),Oe=parseFloat(we);ce=Number.isNaN(Oe)||Oe>Number.MAX_SAFE_INTEGER?we:Cr(Oe,m,f)}F!==ce&&Q(ce),b==null||b(H)};rn(k,{increment:me.current,decrement:fe.current});const ee=H=>{H?me.current():fe.current(),le.current+=1},de=H=>{if(ee(H),re){const ce=typeof _=="number"?_:_(le.current);Z.current=window.setTimeout(()=>de(H),ce)}},be=(H,ce)=>{var we;H.preventDefault(),(we=ae.current)==null||we.focus(),ee(ce),re&&(Z.current=window.setTimeout(()=>de(ce),E))},oe=()=>{Z.current&&window.clearTimeout(Z.current),Z.current=null,le.current=0},he=g.jsxs("div",{...B("controls"),children:[g.jsx(tt,{...B("control"),tabIndex:-1,"aria-hidden":!0,disabled:P||typeof F=="number"&&f!==void 0&&F>=f,mod:{direction:"up"},onMouseDown:H=>H.preventDefault(),onPointerDown:H=>{be(H,!0)},onPointerUp:oe,onPointerLeave:oe,children:g.jsx(ja,{direction:"up"})}),g.jsx(tt,{...B("control"),tabIndex:-1,"aria-hidden":!0,disabled:P||typeof F=="number"&&m!==void 0&&F<=m,mod:{direction:"down"},onMouseDown:H=>H.preventDefault(),onPointerDown:H=>{be(H,!1)},onPointerUp:oe,onPointerLeave:oe,children:g.jsx(ja,{direction:"down"})})]});return g.jsx(st,{component:Qh,allowNegative:V,className:Fe(No.root,n),size:M,...A,readOnly:z,disabled:P,value:F,getInputRef:Ze(t,ae),onValueChange:ie,rightSection:p||z||!io(F)?h:h||he,classNames:Y,styles:te,unstyled:a,__staticSelector:"NumberInput",decimalScale:C?D:0,onKeyDown:ge,onKeyDownCapture:U,rightSectionPointerEvents:L??(P?"none":void 0),rightSectionWidth:$??`var(--ni-right-section-width-${M||"sm"})`,allowLeadingZeros:T,onBlur:J,isAllowed:H=>w==="strict"?y?y(H)&&Aa(H.floatValue,m,f):Aa(H.floatValue,m,f):y?y(H):!0})});_s.classes={...st.classes,...No};_s.displayName="@mantine/core/NumberInput";const av={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Rs=se((e,t)=>{const r=K("Select",av,e),{classNames:n,styles:o,unstyled:s,vars:a,dropdownOpened:i,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:m,onChange:v,data:p,value:h,defaultValue:y,selectFirstOptionOnChange:w,onOptionSubmit:b,comboboxProps:C,readOnly:D,disabled:S,filter:O,limit:k,withScrollArea:j,maxDropdownHeight:P,size:L,searchable:V,rightSection:z,checkIconPosition:M,withCheckIcon:$,nothingFoundMessage:_,name:E,form:T,searchValue:N,defaultSearchValue:I,onSearchChange:A,allowDeselect:B,error:Y,rightSectionPointerEvents:te,id:F,clearable:Q,clearButtonProps:re,hiddenInputProps:ae,renderOption:Z,onClear:le,autoComplete:ie,scrollAreaProps:pe,__defaultRightSection:X,__clearSection:me,__clearable:fe,chevronColor:ge,...U}=r,J=x.useMemo(()=>dp(p),[p]),ee=x.useMemo(()=>mc(J),[J]),de=nr(F),[be,oe,he]=bt({value:h,defaultValue:y,finalValue:null,onChange:v}),H=typeof be=="string"?ee[be]:void 0,ce=Ql(H),[we,Oe]=bt({value:N,defaultValue:I,finalValue:H?H.label:"",onChange:A}),De=bc({opened:i,defaultOpened:c,onDropdownOpen:()=>{u==null||u(),De.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{l==null||l(),De.resetSelectedOption()}}),je=ke=>{Oe(ke),De.resetSelectedOption()},{resolvedClassNames:Pe,resolvedStyles:Re}=St({props:r,styles:o,classNames:n});x.useEffect(()=>{w&&De.selectFirstOption()},[w,we]),x.useEffect(()=>{h===null&&je(""),typeof h=="string"&&H&&((ce==null?void 0:ce.value)!==H.value||(ce==null?void 0:ce.label)!==H.label)&&je(H.label)},[h,H]);const Rt=g.jsx(Ee.ClearButton,{...re,onClear:()=>{oe(null,null),je(""),le==null||le()}}),Bt=Q&&!!be&&!S&&!D;return g.jsxs(g.Fragment,{children:[g.jsxs(Ee,{store:De,__staticSelector:"Select",classNames:Pe,styles:Re,unstyled:s,readOnly:D,onOptionSubmit:ke=>{b==null||b(ke);const He=B&&ee[ke].value===be?null:ee[ke],jt=He?He.value:null;jt!==be&&oe(jt,He),!he&&je(typeof jt=="string"&&(He==null?void 0:He.label)||""),De.closeDropdown()},size:L,...C,children:[g.jsx(Ee.Target,{targetType:V?"input":"button",autoComplete:ie,children:g.jsx(st,{id:de,ref:t,__defaultRightSection:g.jsx(Ee.Chevron,{size:L,error:Y,unstyled:s,color:ge}),__clearSection:Rt,__clearable:Bt,rightSection:z,rightSectionPointerEvents:te||(Bt?"all":"none"),...U,size:L,__staticSelector:"Select",disabled:S,readOnly:D||!V,value:we,onChange:ke=>{je(ke.currentTarget.value),De.openDropdown(),w&&De.selectFirstOption()},onFocus:ke=>{V&&De.openDropdown(),d==null||d(ke)},onBlur:ke=>{var He;V&&De.closeDropdown(),je(be!=null&&((He=ee[be])==null?void 0:He.label)||""),f==null||f(ke)},onClick:ke=>{V?De.openDropdown():De.toggleDropdown(),m==null||m(ke)},classNames:Pe,styles:Re,unstyled:s,pointer:!V,error:Y})}),g.jsx(Up,{data:J,hidden:D||S,filter:O,search:we,limit:k,hiddenWhenEmpty:!_,withScrollArea:j,maxDropdownHeight:P,filterOptions:V&&(H==null?void 0:H.label)!==we,value:be,checkIconPosition:M,withCheckIcon:$,nothingFoundMessage:_,unstyled:s,labelId:U.label?`${de}-label`:void 0,"aria-label":U.label?void 0:U["aria-label"],renderOption:Z,scrollAreaProps:pe})]}),g.jsx(Ee.HiddenInput,{value:be,name:E,form:T,disabled:S,...ae})]})});Rs.classes={...st.classes,...Ee.classes};Rs.displayName="@mantine/core/Select";const iv={},Es=se((e,t)=>{const r=K("TextInput",iv,e);return g.jsx(st,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});Es.classes=st.classes;Es.displayName="@mantine/core/TextInput";const cv=e=>{const{fields:t,options:r,value:n,error:o={},name:s,readOnly:a}=e,i=n.map((c,l)=>{const u=(d,f)=>{c[d]=f,r.replaceElement(l,c)};return t.map((d,f)=>g.jsxs(x.Fragment,{children:[g.jsx(As,{field:d,formValues:c,onChange:u,value:c[d.name],error:d.name in(o[l]??{})?o[l][d.name]:void 0,readOnly:a}),!a&&g.jsx(tr,{onClick:()=>r.removeElement(l),children:"Remove"})]},f))});return g.jsxs(g.Fragment,{children:[typeof o=="string"&&g.jsx(Dn,{c:"red",fz:"sm",fw:500,children:o}),i,!a&&g.jsx(tr,{display:"block",onClick:()=>r.addElement({}),children:"Add"})]})},lv=e=>{const{name:t,onChange:r,value:n,readOnly:o,label:s}=e;return g.jsx(dr,{name:t,checked:n,readOnly:o,onChange:a=>r(t,a.target.checked),label:s})};var Zr={exports:{}},uv=Zr.exports,Pa;function dv(){return Pa||(Pa=1,function(e,t){(function(r,n){e.exports=n()})(uv,function(){var r=1e3,n=6e4,o=36e5,s="millisecond",a="second",i="minute",c="hour",l="day",u="week",d="month",f="quarter",m="year",v="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var $=["th","st","nd","rd"],_=M%100;return"["+M+($[(_-20)%10]||$[_]||$[0])+"]"}},b=function(M,$,_){var E=String(M);return!E||E.length>=$?M:""+Array($+1-E.length).join(_)+M},C={s:b,z:function(M){var $=-M.utcOffset(),_=Math.abs($),E=Math.floor(_/60),T=_%60;return($<=0?"+":"-")+b(E,2,"0")+":"+b(T,2,"0")},m:function M($,_){if($.date()<_.date())return-M(_,$);var E=12*(_.year()-$.year())+(_.month()-$.month()),T=$.clone().add(E,d),N=_-T<0,I=$.clone().add(E+(N?-1:1),d);return+(-(E+(_-T)/(N?T-I:I-T))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:d,y:m,w:u,d:l,D:v,h:c,m:i,s:a,ms:s,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},D="en",S={};S[D]=w;var O="$isDayjsObject",k=function(M){return M instanceof V||!(!M||!M[O])},j=function M($,_,E){var T;if(!$)return D;if(typeof $=="string"){var N=$.toLowerCase();S[N]&&(T=N),_&&(S[N]=_,T=N);var I=$.split("-");if(!T&&I.length>1)return M(I[0])}else{var A=$.name;S[A]=$,T=A}return!E&&T&&(D=T),T||!E&&D},P=function(M,$){if(k(M))return M.clone();var _=typeof $=="object"?$:{};return _.date=M,_.args=arguments,new V(_)},L=C;L.l=j,L.i=k,L.w=function(M,$){return P(M,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var V=function(){function M(_){this.$L=j(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[O]=!0}var $=M.prototype;return $.parse=function(_){this.$d=function(E){var T=E.date,N=E.utc;if(T===null)return new Date(NaN);if(L.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var I=T.match(h);if(I){var A=I[2]-1||0,B=(I[7]||"0").substring(0,3);return N?new Date(Date.UTC(I[1],A,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)):new Date(I[1],A,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)}}return new Date(T)}(_),this.init()},$.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},$.$utils=function(){return L},$.isValid=function(){return this.$d.toString()!==p},$.isSame=function(_,E){var T=P(_);return this.startOf(E)<=T&&T<=this.endOf(E)},$.isAfter=function(_,E){return P(_)<this.startOf(E)},$.isBefore=function(_,E){return this.endOf(E)<P(_)},$.$g=function(_,E,T){return L.u(_)?this[E]:this.set(T,_)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(_,E){var T=this,N=!!L.u(E)||E,I=L.p(_),A=function(Z,le){var ie=L.w(T.$u?Date.UTC(T.$y,le,Z):new Date(T.$y,le,Z),T);return N?ie:ie.endOf(l)},B=function(Z,le){return L.w(T.toDate()[Z].apply(T.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(le)),T)},Y=this.$W,te=this.$M,F=this.$D,Q="set"+(this.$u?"UTC":"");switch(I){case m:return N?A(1,0):A(31,11);case d:return N?A(1,te):A(0,te+1);case u:var re=this.$locale().weekStart||0,ae=(Y<re?Y+7:Y)-re;return A(N?F-ae:F+(6-ae),te);case l:case v:return B(Q+"Hours",0);case c:return B(Q+"Minutes",1);case i:return B(Q+"Seconds",2);case a:return B(Q+"Milliseconds",3);default:return this.clone()}},$.endOf=function(_){return this.startOf(_,!1)},$.$set=function(_,E){var T,N=L.p(_),I="set"+(this.$u?"UTC":""),A=(T={},T[l]=I+"Date",T[v]=I+"Date",T[d]=I+"Month",T[m]=I+"FullYear",T[c]=I+"Hours",T[i]=I+"Minutes",T[a]=I+"Seconds",T[s]=I+"Milliseconds",T)[N],B=N===l?this.$D+(E-this.$W):E;if(N===d||N===m){var Y=this.clone().set(v,1);Y.$d[A](B),Y.init(),this.$d=Y.set(v,Math.min(this.$D,Y.daysInMonth())).$d}else A&&this.$d[A](B);return this.init(),this},$.set=function(_,E){return this.clone().$set(_,E)},$.get=function(_){return this[L.p(_)]()},$.add=function(_,E){var T,N=this;_=Number(_);var I=L.p(E),A=function(te){var F=P(N);return L.w(F.date(F.date()+Math.round(te*_)),N)};if(I===d)return this.set(d,this.$M+_);if(I===m)return this.set(m,this.$y+_);if(I===l)return A(1);if(I===u)return A(7);var B=(T={},T[i]=n,T[c]=o,T[a]=r,T)[I]||1,Y=this.$d.getTime()+_*B;return L.w(Y,this)},$.subtract=function(_,E){return this.add(-1*_,E)},$.format=function(_){var E=this,T=this.$locale();if(!this.isValid())return T.invalidDate||p;var N=_||"YYYY-MM-DDTHH:mm:ssZ",I=L.z(this),A=this.$H,B=this.$m,Y=this.$M,te=T.weekdays,F=T.months,Q=T.meridiem,re=function(le,ie,pe,X){return le&&(le[ie]||le(E,N))||pe[ie].slice(0,X)},ae=function(le){return L.s(A%12||12,le,"0")},Z=Q||function(le,ie,pe){var X=le<12?"AM":"PM";return pe?X.toLowerCase():X};return N.replace(y,function(le,ie){return ie||function(pe){switch(pe){case"YY":return String(E.$y).slice(-2);case"YYYY":return L.s(E.$y,4,"0");case"M":return Y+1;case"MM":return L.s(Y+1,2,"0");case"MMM":return re(T.monthsShort,Y,F,3);case"MMMM":return re(F,Y);case"D":return E.$D;case"DD":return L.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return re(T.weekdaysMin,E.$W,te,2);case"ddd":return re(T.weekdaysShort,E.$W,te,3);case"dddd":return te[E.$W];case"H":return String(A);case"HH":return L.s(A,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return Z(A,B,!0);case"A":return Z(A,B,!1);case"m":return String(B);case"mm":return L.s(B,2,"0");case"s":return String(E.$s);case"ss":return L.s(E.$s,2,"0");case"SSS":return L.s(E.$ms,3,"0");case"Z":return I}return null}(le)||I.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(_,E,T){var N,I=this,A=L.p(E),B=P(_),Y=(B.utcOffset()-this.utcOffset())*n,te=this-B,F=function(){return L.m(I,B)};switch(A){case m:N=F()/12;break;case d:N=F();break;case f:N=F()/3;break;case u:N=(te-Y)/6048e5;break;case l:N=(te-Y)/864e5;break;case c:N=te/o;break;case i:N=te/n;break;case a:N=te/r;break;default:N=te}return T?N:L.a(N)},$.daysInMonth=function(){return this.endOf(d).$D},$.$locale=function(){return S[this.$L]},$.locale=function(_,E){if(!_)return this.$L;var T=this.clone(),N=j(_,E,!0);return N&&(T.$L=N),T},$.clone=function(){return L.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},M}(),z=V.prototype;return P.prototype=z,[["$ms",s],["$s",a],["$m",i],["$H",c],["$W",l],["$M",d],["$y",m],["$D",v]].forEach(function(M){z[M[1]]=function($){return this.$g($,M[0],M[1])}}),P.extend=function(M,$){return M.$i||(M($,V,P),M.$i=!0),P},P.locale=j,P.isDayjs=k,P.unix=function(M){return P(1e3*M)},P.en=S[D],P.Ls=S,P.p={},P})}(Zr)),Zr.exports}var fv=dv();const q=rr(fv);var Jr={exports:{}},mv=Jr.exports,Ma;function pv(){return Ma||(Ma=1,function(e,t){(function(r,n){e.exports=n()})(mv,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,s=/\d\d/,a=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,c={},l=function(h){return(h=+h)+(h>68?1900:2e3)},u=function(h){return function(y){this[h]=+y}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var w=y.match(/([+-]|\d\d)/g),b=60*w[1]+(+w[2]||0);return b===0?0:w[0]==="+"?-b:b}(h)}],f=function(h){var y=c[h];return y&&(y.indexOf?y:y.s.concat(y.f))},m=function(h,y){var w,b=c.meridiem;if(b){for(var C=1;C<=24;C+=1)if(h.indexOf(b(C,0,y))>-1){w=C>12;break}}else w=h===(y?"pm":"PM");return w},v={A:[i,function(h){this.afternoon=m(h,!1)}],a:[i,function(h){this.afternoon=m(h,!0)}],Q:[o,function(h){this.month=3*(h-1)+1}],S:[o,function(h){this.milliseconds=100*+h}],SS:[s,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[a,u("seconds")],ss:[a,u("seconds")],m:[a,u("minutes")],mm:[a,u("minutes")],H:[a,u("hours")],h:[a,u("hours")],HH:[a,u("hours")],hh:[a,u("hours")],D:[a,u("day")],DD:[s,u("day")],Do:[i,function(h){var y=c.ordinal,w=h.match(/\d+/);if(this.day=w[0],y)for(var b=1;b<=31;b+=1)y(b).replace(/\[|\]/g,"")===h&&(this.day=b)}],w:[a,u("week")],ww:[s,u("week")],M:[a,u("month")],MM:[s,u("month")],MMM:[i,function(h){var y=f("months"),w=(f("monthsShort")||y.map(function(b){return b.slice(0,3)})).indexOf(h)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[i,function(h){var y=f("months").indexOf(h)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[s,function(h){this.year=l(h)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function p(h){var y,w;y=h,w=c&&c.formats;for(var b=(h=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,L,V){var z=V&&V.toUpperCase();return L||w[V]||r[V]||w[z].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,$,_){return $||_.slice(1)})})).match(n),C=b.length,D=0;D<C;D+=1){var S=b[D],O=v[S],k=O&&O[0],j=O&&O[1];b[D]=j?{regex:k,parser:j}:S.replace(/^\[|\]$/g,"")}return function(P){for(var L={},V=0,z=0;V<C;V+=1){var M=b[V];if(typeof M=="string")z+=M.length;else{var $=M.regex,_=M.parser,E=P.slice(z),T=$.exec(E)[0];_.call(L,T),P=P.replace(T,"")}}return function(N){var I=N.afternoon;if(I!==void 0){var A=N.hours;I?A<12&&(N.hours+=12):A===12&&(N.hours=0),delete N.afternoon}}(L),L}}return function(h,y,w){w.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(l=h.parseTwoDigitYear);var b=y.prototype,C=b.parse;b.parse=function(D){var S=D.date,O=D.utc,k=D.args;this.$u=O;var j=k[1];if(typeof j=="string"){var P=k[2]===!0,L=k[3]===!0,V=P||L,z=k[2];L&&(z=k[2]),c=this.$locale(),!P&&z&&(c=w.Ls[z]),this.$d=function(E,T,N,I){try{if(["x","X"].indexOf(T)>-1)return new Date((T==="X"?1e3:1)*E);var A=p(T)(E),B=A.year,Y=A.month,te=A.day,F=A.hours,Q=A.minutes,re=A.seconds,ae=A.milliseconds,Z=A.zone,le=A.week,ie=new Date,pe=te||(B||Y?1:ie.getDate()),X=B||ie.getFullYear(),me=0;B&&!Y||(me=Y>0?Y-1:ie.getMonth());var fe,ge=F||0,U=Q||0,J=re||0,ee=ae||0;return Z?new Date(Date.UTC(X,me,pe,ge,U,J,ee+60*Z.offset*1e3)):N?new Date(Date.UTC(X,me,pe,ge,U,J,ee)):(fe=new Date(X,me,pe,ge,U,J,ee),le&&(fe=I(fe).week(le).toDate()),fe)}catch{return new Date("")}}(S,j,O,w),this.init(),z&&z!==!0&&(this.$L=this.locale(z).$L),V&&S!=this.format(j)&&(this.$d=new Date("")),c={}}else if(j instanceof Array)for(var M=j.length,$=1;$<=M;$+=1){k[1]=j[$-1];var _=w.apply(this,k);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}$===M&&(this.$d=new Date(""))}else C.call(this,D)}}})}(Jr)),Jr.exports}var hv=pv();const Vc=rr(hv);function vv({direction:e,levelIndex:t,rowIndex:r,cellIndex:n,size:o}){switch(e){case"up":return t===0&&r===0?null:r===0?{levelIndex:t-1,rowIndex:n<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:n}:{levelIndex:t,rowIndex:r-1,cellIndex:n};case"down":return r===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:n}:r===o[t].length-2&&n>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:n}:{levelIndex:t,rowIndex:r+1,cellIndex:n};case"left":return t===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:n===0?{levelIndex:t,rowIndex:r-1,cellIndex:o[t][r-1]-1}:{levelIndex:t,rowIndex:r,cellIndex:n-1};case"right":return r===o[t].length-1&&n===o[t][r]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:n===o[t][r]-1?{levelIndex:t,rowIndex:r+1,cellIndex:0}:{levelIndex:t,rowIndex:r,cellIndex:n+1};default:return{levelIndex:t,rowIndex:r,cellIndex:n}}}function zc({controlsRef:e,direction:t,levelIndex:r,rowIndex:n,cellIndex:o,size:s}){var c,l,u;const a=vv({direction:t,size:s,rowIndex:n,cellIndex:o,levelIndex:r});if(!a)return;const i=(u=(l=(c=e.current)==null?void 0:c[a.levelIndex])==null?void 0:l[a.rowIndex])==null?void 0:u[a.cellIndex];i&&(i.disabled||i.getAttribute("data-hidden")||i.getAttribute("data-outside")?zc({controlsRef:e,direction:t,levelIndex:a.levelIndex,cellIndex:a.cellIndex,rowIndex:a.rowIndex,size:s}):i.focus())}function gv(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function yv(e){var t;return(t=e.current)==null?void 0:t.map(r=>r.map(n=>n.length))}function Ns({controlsRef:e,levelIndex:t,rowIndex:r,cellIndex:n,event:o}){const s=gv(o.key);if(s){o.preventDefault();const a=yv(e);zc({controlsRef:e,direction:s,levelIndex:t,rowIndex:r,cellIndex:n,size:a})}}function Oo(e,t){if(!e||!t)return t;const r=e.getHours(),n=e.getMinutes(),o=e.getSeconds(),s=e.getMilliseconds(),a=new Date(t);return a.setHours(r),a.setMinutes(n),a.setSeconds(o),a.setMilliseconds(s),a}var Qr={exports:{}},bv=Qr.exports,La;function xv(){return La||(La=1,function(e,t){(function(r,n){e.exports=n()})(bv,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(o,s,a){var i,c=function(f,m,v){v===void 0&&(v={});var p=new Date(f),h=function(y,w){w===void 0&&(w={});var b=w.timeZoneName||"short",C=y+"|"+b,D=n[C];return D||(D=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:b}),n[C]=D),D}(m,v);return h.formatToParts(p)},l=function(f,m){for(var v=c(f,m),p=[],h=0;h<v.length;h+=1){var y=v[h],w=y.type,b=y.value,C=r[w];C>=0&&(p[C]=parseInt(b,10))}var D=p[3],S=D===24?0:D,O=p[0]+"-"+p[1]+"-"+p[2]+" "+S+":"+p[4]+":"+p[5]+":000",k=+f;return(a.utc(O).valueOf()-(k-=k%1e3))/6e4},u=s.prototype;u.tz=function(f,m){f===void 0&&(f=i);var v,p=this.utcOffset(),h=this.toDate(),y=h.toLocaleString("en-US",{timeZone:f}),w=Math.round((h-new Date(y))/1e3/60),b=15*-Math.round(h.getTimezoneOffset()/15)-w;if(!Number(b))v=this.utcOffset(0,m);else if(v=a(y,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(b,!0),m){var C=v.utcOffset();v=v.add(p-C,"minute")}return v.$x.$timezone=f,v},u.offsetName=function(f){var m=this.$x.$timezone||a.tz.guess(),v=c(this.valueOf(),m,{timeZoneName:f}).find(function(p){return p.type.toLowerCase()==="timezonename"});return v&&v.value};var d=u.startOf;u.startOf=function(f,m){if(!this.$x||!this.$x.$timezone)return d.call(this,f,m);var v=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(v,f,m).tz(this.$x.$timezone,!0)},a.tz=function(f,m,v){var p=v&&m,h=v||m||i,y=l(+a(),h);if(typeof f!="string")return a(f).tz(h);var w=function(S,O,k){var j=S-60*O*1e3,P=l(j,k);if(O===P)return[j,O];var L=l(j-=60*(P-O)*1e3,k);return P===L?[j,P]:[S-60*Math.min(P,L)*1e3,Math.max(P,L)]}(a.utc(f,p).valueOf(),y,h),b=w[0],C=w[1],D=a(b).utcOffset(C);return D.$x.$timezone=h,D},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(f){i=f}}})}(Qr)),Qr.exports}var wv=xv();const Sv=rr(wv);var en={exports:{}},Cv=en.exports,Ia;function Dv(){return Ia||(Ia=1,function(e,t){(function(r,n){e.exports=n()})(Cv,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(s,a,i){var c=a.prototype;i.utc=function(p){var h={date:p,utc:!0,args:arguments};return new a(h)},c.utc=function(p){var h=i(this.toDate(),{locale:this.$L,utc:!0});return p?h.add(this.utcOffset(),r):h},c.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var l=c.parse;c.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),l.call(this,p)};var u=c.init;c.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else u.call(this)};var d=c.utcOffset;c.utcOffset=function(p,h){var y=this.$utils().u;if(y(p))return this.$u?0:y(this.$offset)?d.call(this):this.$offset;if(typeof p=="string"&&(p=function(D){D===void 0&&(D="");var S=D.match(n);if(!S)return null;var O=(""+S[0]).match(o)||["-",0,0],k=O[0],j=60*+O[1]+ +O[2];return j===0?0:k==="+"?j:-j}(p),p===null))return this;var w=Math.abs(p)<=16?60*p:p,b=this;if(h)return b.$offset=w,b.$u=p===0,b;if(p!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(w+C,r)).$offset=w,b.$x.$localOffset=C}else b=this.utc();return b};var f=c.format;c.format=function(p){var h=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,h)},c.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var m=c.toDate;c.toDate=function(p){return p==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var v=c.diff;c.diff=function(p,h,y){if(p&&this.$u===p.$u)return v.call(this,p,h,y);var w=this.local(),b=i(p).local();return v.call(w,b,h,y)}}})}(en)),en.exports}var _v=Dv();const Rv=rr(_v);q.extend(Rv);q.extend(Sv);function Ev(e,t){return t?q(e).tz(t).utcOffset()+e.getTimezoneOffset():0}const Fa=(e,t,r)=>{if(!e)return null;if(!t)return e;let n=Ev(e,t);return r==="remove"&&(n*=-1),q(e).add(n,"minutes").toDate()};function ht(e,t,r,n){return n||!t?t:Array.isArray(t)?t.map(o=>Fa(o,r,e)):Fa(t,r,e)}const Nv={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Tv=x.createContext(Nv);function Qe(){const e=x.useContext(Tv),t=x.useCallback(a=>a||e.locale,[e.locale]),r=x.useCallback(a=>a||e.timezone||void 0,[e.timezone]),n=x.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),o=x.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),s=x.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getTimezone:r,getFirstDayOfWeek:n,getWeekendDays:o,getLabelSeparator:s}}function Ov(e,t){const r=Qe(),n=o=>ht("remove",o,r.getTimezone()).toISOString();if(t==="range"&&Array.isArray(e)){const[o,s]=e;return o?s?`${n(o)} – ${n(s)}`:`${n(o)} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(o=>o&&n(o)).filter(Boolean).join(", "):!Array.isArray(e)&&e?n(e):""}function Ts({value:e,type:t,name:r,form:n}){return g.jsx("input",{type:"hidden",value:Ov(e,t),name:r,form:n})}Ts.displayName="@mantine/dates/HiddenDatesInput";var kv={input:"m_468e7eda"};const $v={},jn=se((e,t)=>{const r=K("TimeInput",$v,e),{classNames:n,styles:o,unstyled:s,vars:a,withSeconds:i,minTime:c,maxTime:l,value:u,onChange:d,...f}=r,{resolvedClassNames:m,resolvedStyles:v}=St({classNames:n,styles:o,props:r}),p=y=>{if(c!==void 0||l!==void 0){const[w,b,C]=y.split(":").map(Number);if(c){const[D,S,O]=c.split(":").map(Number);if(w<D||w===D&&b<S||i&&w===D&&b===S&&C<O)return-1}if(l){const[D,S,O]=l.split(":").map(Number);if(w>D||w===D&&b>S||i&&w===D&&b===S&&C>O)return 1}}return 0},h=y=>{var w,b,C;if((w=r.onBlur)==null||w.call(r,y),c!==void 0||l!==void 0){const D=y.currentTarget.value;if(D){const S=p(D);S===1?(y.currentTarget.value=l,(b=r.onChange)==null||b.call(r,y)):S===-1&&(y.currentTarget.value=c,(C=r.onChange)==null||C.call(r,y))}}};return g.jsx(st,{classNames:{...m,input:Fe(kv.input,m==null?void 0:m.input)},styles:v,unstyled:s,ref:t,value:u,...f,step:i?1:60,onChange:d,onBlur:h,type:"time",__staticSelector:"TimeInput"})});jn.classes=st.classes;jn.displayName="@mantine/dates/TimeInput";var Bc={day:"m_396ce5cb"};const jv={},Av=(e,{size:t})=>({day:{"--day-size":Ne(t,"day-size")}}),Os=se((e,t)=>{const r=K("Day",jv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,date:l,disabled:u,__staticSelector:d,weekend:f,outside:m,selected:v,renderDay:p,inRange:h,firstInRange:y,lastInRange:w,hidden:b,static:C,highlightToday:D,...S}=r,O=ye({name:d||"Day",classes:Bc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Av,rootSelector:"day"}),k=Qe();return g.jsx(tt,{...O("day",{style:b?{display:"none"}:void 0}),component:C?"div":"button",ref:t,disabled:u,"data-today":q(l).isSame(ht("add",new Date,k.getTimezone()),"day")||void 0,"data-hidden":b||void 0,"data-highlight-today":D||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!m&&f||void 0,"data-outside":!u&&m||void 0,"data-selected":!u&&v||void 0,"data-in-range":h&&!u||void 0,"data-first-in-range":y&&!u||void 0,"data-last-in-range":w&&!u||void 0,"data-static":C||void 0,unstyled:i,...S,children:(p==null?void 0:p(l))||q(l).date()})});Os.classes=Bc;Os.displayName="@mantine/dates/Day";function Pv({locale:e,format:t="dd",firstDayOfWeek:r=1}){const n=q().day(r),o=[];for(let s=0;s<7;s+=1)typeof t=="string"?o.push(q(n).add(s,"days").locale(e).format(t)):o.push(t(q(n).add(s,"days").toDate()));return o}var Wc={weekday:"m_18a3eca"};const Mv={},Lv=(e,{size:t})=>({weekdaysRow:{"--wr-fz":Ie(t),"--wr-spacing":ii(t)}}),ks=se((e,t)=>{const r=K("WeekdaysRow",Mv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,cellComponent:f="th",__staticSelector:m,withWeekNumbers:v,...p}=r,h=ye({name:m||"WeekdaysRow",classes:Wc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Lv,rootSelector:"weekdaysRow"}),y=Qe(),w=Pv({locale:y.getLocale(l),format:d,firstDayOfWeek:y.getFirstDayOfWeek(u)}).map((b,C)=>g.jsx(f,{...h("weekday"),children:b},C));return g.jsxs(ue,{component:"tr",ref:t,...h("weekdaysRow"),...p,children:[v&&g.jsx(f,{...h("weekday"),children:"#"}),w]})});ks.classes=Wc;ks.displayName="@mantine/dates/WeekdaysRow";function Iv(e,t=1){let r=q(e);const n=t===0?6:t-1;for(;r.day()!==n;)r=r.add(1,"day");return r.toDate()}function Fv(e,t=1){let r=q(e);for(;r.day()!==t;)r=r.subtract(1,"day");return r.toDate()}function Vv({month:e,firstDayOfWeek:t=1,consistentWeeks:r}){const n=q(e).subtract(q(e).date()-1,"day"),o=q(n).startOf("day"),s=o.toDate(),a=o.add(+o.daysInMonth()-1,"day").toDate(),i=Iv(a,t),c=Fv(s,t),l=[];for(;c<=i;){const u=[];for(let d=0;d<7;d+=1)u.push(new Date(c)),c.setDate(c.getDate()+1);l.push(u)}if(r&&l.length<6){const u=l[l.length-1],d=u[u.length-1],f=new Date(d);for(f.setDate(f.getDate()+1);l.length<6;){const m=[];for(let v=0;v<7;v+=1)m.push(new Date(f)),f.setDate(f.getDate()+1);l.push(m)}}return l}function Yc(e,t){return q(e).format("YYYY-MM")===q(t).format("YYYY-MM")}function Hc(e,t){return t instanceof Date?q(e).isAfter(q(t).subtract(1,"day"),"day"):!0}function Uc(e,t){return t instanceof Date?q(e).isBefore(q(t).add(1,"day"),"day"):!0}function zv(e,t,r,n,o,s,a){const i=e.flat().filter(u=>{var d;return Uc(u,r)&&Hc(u,t)&&!(o!=null&&o(u))&&!((d=n==null?void 0:n(u))!=null&&d.disabled)&&(!s||Yc(u,a))}),c=i.find(u=>{var d;return(d=n==null?void 0:n(u))==null?void 0:d.selected});if(c)return c;const l=i.find(u=>q().isSame(u,"date"));return l||i[0]}var tn={exports:{}},Bv=tn.exports,Va;function Wv(){return Va||(Va=1,function(e,t){(function(r,n){e.exports=n()})(Bv,function(){var r="day";return function(n,o,s){var a=function(l){return l.add(4-l.isoWeekday(),r)},i=o.prototype;i.isoWeekYear=function(){return a(this).year()},i.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),r);var u,d,f,m,v=a(this),p=(u=this.isoWeekYear(),d=this.$u,f=(d?s.utc:s)().year(u).startOf("year"),m=4-f.isoWeekday(),f.isoWeekday()>4&&(m+=7),f.add(m,r));return v.diff(p,"week")+1},i.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var c=i.startOf;i.startOf=function(l,u){var d=this.$utils(),f=!!d.u(u)||u;return d.p(l)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(l,u)}}})}(tn)),tn.exports}var Yv=Wv();const Hv=rr(Yv);q.extend(Hv);function Uv(e){const t=e.find(r=>q(r).day()===1);return q(t).isoWeek()}var Gc={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const Gv={withCellSpacing:!0},qv=(e,{size:t})=>({weekNumber:{"--wn-fz":Ie(t),"--wn-size":Ne(t,"wn-size")}}),An=se((e,t)=>{const r=K("Month",Gv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,locale:u,firstDayOfWeek:d,weekdayFormat:f,month:m,weekendDays:v,getDayProps:p,excludeDate:h,minDate:y,maxDate:w,renderDay:b,hideOutsideDates:C,hideWeekdays:D,getDayAriaLabel:S,static:O,__getDayRef:k,__onDayKeyDown:j,__onDayClick:P,__onDayMouseEnter:L,__preventFocus:V,__stopPropagation:z,withCellSpacing:M,size:$,highlightToday:_,withWeekNumbers:E,...T}=r,N=ye({name:l||"Month",classes:Gc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:qv,rootSelector:"month"}),I=Qe(),A=Vv({month:m,firstDayOfWeek:I.getFirstDayOfWeek(d),consistentWeeks:I.consistentWeeks}),B=zv(A,y,w,p,h,C,m),{resolvedClassNames:Y,resolvedStyles:te}=St({classNames:n,styles:a,props:r}),F=A.map((Q,re)=>{const ae=Q.map((Z,le)=>{const ie=!Yc(Z,m),pe=(S==null?void 0:S(Z))||q(Z).locale(u||I.locale).format("D MMMM YYYY"),X=p==null?void 0:p(Z),me=q(Z).isSame(B,"date");return g.jsx("td",{...N("monthCell"),"data-with-spacing":M||void 0,children:g.jsx(Os,{__staticSelector:l||"Month",classNames:Y,styles:te,unstyled:i,"data-mantine-stop-propagation":z||void 0,highlightToday:_,renderDay:b,date:Z,size:$,weekend:I.getWeekendDays(v).includes(Z.getDay()),outside:ie,hidden:C?ie:!1,"aria-label":pe,static:O,disabled:(h==null?void 0:h(Z))||!Uc(Z,w)||!Hc(Z,y),ref:fe=>k==null?void 0:k(re,le,fe),...X,onKeyDown:fe=>{var ge;(ge=X==null?void 0:X.onKeyDown)==null||ge.call(X,fe),j==null||j(fe,{rowIndex:re,cellIndex:le,date:Z})},onMouseEnter:fe=>{var ge;(ge=X==null?void 0:X.onMouseEnter)==null||ge.call(X,fe),L==null||L(fe,Z)},onClick:fe=>{var ge;(ge=X==null?void 0:X.onClick)==null||ge.call(X,fe),P==null||P(fe,Z)},onMouseDown:fe=>{var ge;(ge=X==null?void 0:X.onMouseDown)==null||ge.call(X,fe),V&&fe.preventDefault()},tabIndex:V||!me?-1:0})},Z.toString())});return g.jsxs("tr",{...N("monthRow"),children:[E&&g.jsx("td",{...N("weekNumber"),children:Uv(Q)}),ae]},re)});return g.jsxs(ue,{component:"table",...N("month"),size:$,ref:t,...T,children:[!D&&g.jsx("thead",{...N("monthThead"),children:g.jsx(ks,{__staticSelector:l||"Month",locale:u,firstDayOfWeek:d,weekdayFormat:f,size:$,classNames:Y,styles:te,unstyled:i,withWeekNumbers:E})}),g.jsx("tbody",{...N("monthTbody"),children:F})]})});An.classes=Gc;An.displayName="@mantine/dates/Month";var qc={pickerControl:"m_dc6a3c71"};const Xv={},Kv=(e,{size:t})=>({pickerControl:{"--dpc-fz":Ie(t),"--dpc-size":Ne(t,"dpc-size")}}),Pn=se((e,t)=>{const r=K("PickerControl",Xv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,firstInRange:l,lastInRange:u,inRange:d,__staticSelector:f,selected:m,disabled:v,...p}=r,h=ye({name:f||"PickerControl",classes:qc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Kv,rootSelector:"pickerControl"});return g.jsx(tt,{...h("pickerControl"),ref:t,unstyled:i,"data-picker-control":!0,"data-selected":m&&!v||void 0,"data-disabled":v||void 0,"data-in-range":d&&!v&&!m||void 0,"data-first-in-range":l&&!v||void 0,"data-last-in-range":u&&!v||void 0,disabled:v,...p})});Pn.classes=qc;Pn.displayName="@mantine/dates/PickerControl";function Xc(e,t,r){return!t&&!r?!1:!!(t&&q(e).isBefore(t,"year")||r&&q(e).isAfter(r,"year"))}function Zv(e,t,r,n){const o=e.flat().filter(i=>{var c;return!Xc(i,t,r)&&!((c=n==null?void 0:n(i))!=null&&c.disabled)}),s=o.find(i=>{var c;return(c=n==null?void 0:n(i))==null?void 0:c.selected});if(s)return s;const a=o.find(i=>q().isSame(i,"year"));return a||o[0]}function Kc(e){const t=e.getFullYear(),r=t-t%10;let n=0;const o=[[],[],[],[]];for(let s=0;s<4;s+=1){const a=s===3?1:3;for(let i=0;i<a;i+=1)o[s].push(new Date(r+n,0)),n+=1}return o}var Zc={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const Jv={yearsListFormat:"YYYY",withCellSpacing:!0},Mn=se((e,t)=>{const r=K("YearsList",Jv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,decade:l,yearsListFormat:u,locale:d,minDate:f,maxDate:m,getYearControlProps:v,__staticSelector:p,__getControlRef:h,__onControlKeyDown:y,__onControlClick:w,__onControlMouseEnter:b,__preventFocus:C,__stopPropagation:D,withCellSpacing:S,size:O,...k}=r,j=ye({name:p||"YearsList",classes:Zc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,rootSelector:"yearsList"}),P=Qe(),L=Kc(l),V=Zv(L,f,m,v),z=L.map((M,$)=>{const _=M.map((E,T)=>{const N=v==null?void 0:v(E),I=q(E).isSame(V,"year");return g.jsx("td",{...j("yearsListCell"),"data-with-spacing":S||void 0,children:g.jsx(Pn,{...j("yearsListControl"),size:O,unstyled:i,"data-mantine-stop-propagation":D||void 0,disabled:Xc(E,f,m),ref:A=>h==null?void 0:h($,T,A),...N,onKeyDown:A=>{var B;(B=N==null?void 0:N.onKeyDown)==null||B.call(N,A),y==null||y(A,{rowIndex:$,cellIndex:T,date:E})},onClick:A=>{var B;(B=N==null?void 0:N.onClick)==null||B.call(N,A),w==null||w(A,E)},onMouseEnter:A=>{var B;(B=N==null?void 0:N.onMouseEnter)==null||B.call(N,A),b==null||b(A,E)},onMouseDown:A=>{var B;(B=N==null?void 0:N.onMouseDown)==null||B.call(N,A),C&&A.preventDefault()},tabIndex:C||!I?-1:0,children:q(E).locale(P.getLocale(d)).format(u)})},T)});return g.jsx("tr",{...j("yearsListRow"),children:_},$)});return g.jsx(ue,{component:"table",ref:t,size:O,...j("yearsList"),...k,children:g.jsx("tbody",{children:z})})});Mn.classes=Zc;Mn.displayName="@mantine/dates/YearsList";function Jc(e,t,r){return!t&&!r?!1:!!(t&&q(e).isBefore(t,"month")||r&&q(e).isAfter(r,"month"))}function Qv(e,t,r,n){const o=e.flat().filter(i=>{var c;return!Jc(i,t,r)&&!((c=n==null?void 0:n(i))!=null&&c.disabled)}),s=o.find(i=>{var c;return(c=n==null?void 0:n(i))==null?void 0:c.selected});if(s)return s;const a=o.find(i=>q().isSame(i,"month"));return a||o[0]}function eg(e){const t=q(e).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let o=0;o<4;o+=1)for(let s=0;s<3;s+=1)r[o].push(q(t).add(n,"months").toDate()),n+=1;return r}var Qc={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const tg={monthsListFormat:"MMM",withCellSpacing:!0},Ln=se((e,t)=>{const r=K("MonthsList",tg,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,year:u,monthsListFormat:d,locale:f,minDate:m,maxDate:v,getMonthControlProps:p,__getControlRef:h,__onControlKeyDown:y,__onControlClick:w,__onControlMouseEnter:b,__preventFocus:C,__stopPropagation:D,withCellSpacing:S,size:O,...k}=r,j=ye({name:l||"MonthsList",classes:Qc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,rootSelector:"monthsList"}),P=Qe(),L=eg(u),V=Qv(L,m,v,p),z=L.map((M,$)=>{const _=M.map((E,T)=>{const N=p==null?void 0:p(E),I=q(E).isSame(V,"month");return g.jsx("td",{...j("monthsListCell"),"data-with-spacing":S||void 0,children:g.jsx(Pn,{...j("monthsListControl"),size:O,unstyled:i,__staticSelector:l||"MonthsList","data-mantine-stop-propagation":D||void 0,disabled:Jc(E,m,v),ref:A=>h==null?void 0:h($,T,A),...N,onKeyDown:A=>{var B;(B=N==null?void 0:N.onKeyDown)==null||B.call(N,A),y==null||y(A,{rowIndex:$,cellIndex:T,date:E})},onClick:A=>{var B;(B=N==null?void 0:N.onClick)==null||B.call(N,A),w==null||w(A,E)},onMouseEnter:A=>{var B;(B=N==null?void 0:N.onMouseEnter)==null||B.call(N,A),b==null||b(A,E)},onMouseDown:A=>{var B;(B=N==null?void 0:N.onMouseDown)==null||B.call(N,A),C&&A.preventDefault()},tabIndex:C||!I?-1:0,children:q(E).locale(P.getLocale(f)).format(d)})},T)});return g.jsx("tr",{...j("monthsListRow"),children:_},$)});return g.jsx(ue,{component:"table",ref:t,size:O,...j("monthsList"),...k,children:g.jsx("tbody",{children:z})})});Ln.classes=Qc;Ln.displayName="@mantine/dates/MonthsList";var el={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const rg={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},ng=(e,{size:t})=>({calendarHeader:{"--dch-control-size":Ne(t,"dch-control-size"),"--dch-fz":Ie(t)}}),kt=se((e,t)=>{const r=K("CalendarHeader",rg,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,nextIcon:l,previousIcon:u,nextLabel:d,previousLabel:f,onNext:m,onPrevious:v,onLevelClick:p,label:h,nextDisabled:y,previousDisabled:w,hasNextLevel:b,levelControlAriaLabel:C,withNext:D,withPrevious:S,__staticSelector:O,__preventFocus:k,__stopPropagation:j,...P}=r,L=ye({name:O||"CalendarHeader",classes:el,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:ng,rootSelector:"calendarHeader"}),V=k?z=>z.preventDefault():void 0;return g.jsxs(ue,{...L("calendarHeader"),ref:t,...P,children:[S&&g.jsx(tt,{...L("calendarHeaderControl"),"data-direction":"previous","aria-label":f,onClick:v,unstyled:i,onMouseDown:V,disabled:w,"data-disabled":w||void 0,tabIndex:k||w?-1:0,"data-mantine-stop-propagation":j||void 0,children:u||g.jsx(Ro,{...L("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),g.jsx(tt,{component:b?"button":"div",...L("calendarHeaderLevel"),onClick:b?p:void 0,unstyled:i,onMouseDown:b?V:void 0,disabled:!b,"data-static":!b||void 0,"aria-label":C,tabIndex:k||!b?-1:0,"data-mantine-stop-propagation":j||void 0,children:h}),D&&g.jsx(tt,{...L("calendarHeaderControl"),"data-direction":"next","aria-label":d,onClick:m,unstyled:i,onMouseDown:V,disabled:y,"data-disabled":y||void 0,tabIndex:k||y?-1:0,"data-mantine-stop-propagation":j||void 0,children:l||g.jsx(Ro,{...L("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});kt.classes=el;kt.displayName="@mantine/dates/CalendarHeader";function og(e){const t=Kc(e);return[t[0][0],t[3][0]]}const sg={decadeLabelFormat:"YYYY"},In=se((e,t)=>{const r=K("DecadeLevel",sg,e),{decade:n,locale:o,minDate:s,maxDate:a,yearsListFormat:i,getYearControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:m,__preventFocus:v,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,nextDisabled:D,previousDisabled:S,levelControlAriaLabel:O,withNext:k,withPrevious:j,decadeLabelFormat:P,classNames:L,styles:V,unstyled:z,__staticSelector:M,__stopPropagation:$,size:_,...E}=r,T=Qe(),[N,I]=og(n),A={__staticSelector:M||"DecadeLevel",classNames:L,styles:V,unstyled:z,size:_},B=typeof D=="boolean"?D:a?!q(I).endOf("year").isBefore(a):!1,Y=typeof S=="boolean"?S:s?!q(N).startOf("year").isAfter(s):!1,te=(F,Q)=>q(F).locale(o||T.locale).format(Q);return g.jsxs(ue,{"data-decade-level":!0,size:_,ref:t,...E,children:[g.jsx(kt,{label:typeof P=="function"?P(N,I):`${te(N,P)} – ${te(I,P)}`,__preventFocus:v,__stopPropagation:$,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,nextDisabled:B,previousDisabled:Y,hasNextLevel:!1,levelControlAriaLabel:O,withNext:k,withPrevious:j,...A}),g.jsx(Mn,{decade:n,locale:o,minDate:s,maxDate:a,yearsListFormat:i,getYearControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:v,__stopPropagation:$,withCellSpacing:m,...A})]})});In.classes={...Mn.classes,...kt.classes};In.displayName="@mantine/dates/DecadeLevel";const ag={yearLabelFormat:"YYYY"},Fn=se((e,t)=>{const r=K("YearLevel",ag,e),{year:n,locale:o,minDate:s,maxDate:a,monthsListFormat:i,getMonthControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:m,__preventFocus:v,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,onLevelClick:D,nextDisabled:S,previousDisabled:O,hasNextLevel:k,levelControlAriaLabel:j,withNext:P,withPrevious:L,yearLabelFormat:V,__staticSelector:z,__stopPropagation:M,size:$,classNames:_,styles:E,unstyled:T,...N}=r,I=Qe(),A={__staticSelector:z||"YearLevel",classNames:_,styles:E,unstyled:T,size:$},B=typeof S=="boolean"?S:a?!q(n).endOf("year").isBefore(a):!1,Y=typeof O=="boolean"?O:s?!q(n).startOf("year").isAfter(s):!1;return g.jsxs(ue,{"data-year-level":!0,size:$,ref:t,...N,children:[g.jsx(kt,{label:typeof V=="function"?V(n):q(n).locale(o||I.locale).format(V),__preventFocus:v,__stopPropagation:M,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,onLevelClick:D,nextDisabled:B,previousDisabled:Y,hasNextLevel:k,levelControlAriaLabel:j,withNext:P,withPrevious:L,...A}),g.jsx(Ln,{year:n,locale:o,minDate:s,maxDate:a,monthsListFormat:i,getMonthControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:v,__stopPropagation:M,withCellSpacing:m,...A})]})});Fn.classes={...kt.classes,...Ln.classes};Fn.displayName="@mantine/dates/YearLevel";const ig={monthLabelFormat:"MMMM YYYY"},Vn=se((e,t)=>{const r=K("MonthLevel",ig,e),{month:n,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__getDayRef:h,__onDayKeyDown:y,__onDayClick:w,__onDayMouseEnter:b,withCellSpacing:C,highlightToday:D,withWeekNumbers:S,__preventFocus:O,__stopPropagation:k,nextIcon:j,previousIcon:P,nextLabel:L,previousLabel:V,onNext:z,onPrevious:M,onLevelClick:$,nextDisabled:_,previousDisabled:E,hasNextLevel:T,levelControlAriaLabel:N,withNext:I,withPrevious:A,monthLabelFormat:B,classNames:Y,styles:te,unstyled:F,__staticSelector:Q,size:re,static:ae,...Z}=r,le=Qe(),ie={__staticSelector:Q||"MonthLevel",classNames:Y,styles:te,unstyled:F,size:re},pe=typeof _=="boolean"?_:d?!q(n).endOf("month").isBefore(d):!1,X=typeof E=="boolean"?E:u?!q(n).startOf("month").isAfter(u):!1;return g.jsxs(ue,{"data-month-level":!0,size:re,ref:t,...Z,children:[g.jsx(kt,{label:typeof B=="function"?B(n):q(n).locale(o||le.locale).format(B),__preventFocus:O,__stopPropagation:k,nextIcon:j,previousIcon:P,nextLabel:L,previousLabel:V,onNext:z,onPrevious:M,onLevelClick:$,nextDisabled:pe,previousDisabled:X,hasNextLevel:T,levelControlAriaLabel:N,withNext:I,withPrevious:A,...ie}),g.jsx(An,{month:n,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__getDayRef:h,__onDayKeyDown:y,__onDayClick:w,__onDayMouseEnter:b,__preventFocus:O,__stopPropagation:k,static:ae,withCellSpacing:C,highlightToday:D,withWeekNumbers:S,...ie})]})});Vn.classes={...An.classes,...kt.classes};Vn.displayName="@mantine/dates/MonthLevel";var tl={levelsGroup:"m_30b26e33"};const cg={},$t=se((e,t)=>{const r=K("LevelsGroup",cg,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,...u}=r,d=ye({name:l||"LevelsGroup",classes:tl,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,rootSelector:"levelsGroup"});return g.jsx(ue,{ref:t,...d("levelsGroup"),...u})});$t.classes=tl;$t.displayName="@mantine/dates/LevelsGroup";const lg={numberOfColumns:1},zn=se((e,t)=>{const r=K("DecadeLevelGroup",lg,e),{decade:n,locale:o,minDate:s,maxDate:a,yearsListFormat:i,getYearControlProps:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,nextDisabled:b,previousDisabled:C,classNames:D,styles:S,unstyled:O,__staticSelector:k,__stopPropagation:j,numberOfColumns:P,levelControlAriaLabel:L,decadeLabelFormat:V,size:z,vars:M,...$}=r,_=x.useRef([]),E=Array(P).fill(0).map((T,N)=>{const I=q(n).add(N*10,"years").toDate();return g.jsx(In,{size:z,yearsListFormat:i,decade:I,withNext:N===P-1,withPrevious:N===0,decadeLabelFormat:V,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(A,B)=>Ns({levelIndex:N,rowIndex:B.rowIndex,cellIndex:B.cellIndex,event:A,controlsRef:_}),__getControlRef:(A,B,Y)=>{Array.isArray(_.current[N])||(_.current[N]=[]),Array.isArray(_.current[N][A])||(_.current[N][A]=[]),_.current[N][A][B]=Y},levelControlAriaLabel:typeof L=="function"?L(I):L,locale:o,minDate:s,maxDate:a,__preventFocus:f,__stopPropagation:j,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,nextDisabled:b,previousDisabled:C,getYearControlProps:c,__staticSelector:k||"DecadeLevelGroup",classNames:D,styles:S,unstyled:O,withCellSpacing:d},N)});return g.jsx($t,{classNames:D,styles:S,__staticSelector:k||"DecadeLevelGroup",ref:t,size:z,unstyled:O,...$,children:E})});zn.classes={...$t.classes,...In.classes};zn.displayName="@mantine/dates/DecadeLevelGroup";const ug={numberOfColumns:1},Bn=se((e,t)=>{const r=K("YearLevelGroup",ug,e),{year:n,locale:o,minDate:s,maxDate:a,monthsListFormat:i,getMonthControlProps:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,onLevelClick:b,nextDisabled:C,previousDisabled:D,hasNextLevel:S,classNames:O,styles:k,unstyled:j,__staticSelector:P,__stopPropagation:L,numberOfColumns:V,levelControlAriaLabel:z,yearLabelFormat:M,size:$,vars:_,...E}=r,T=x.useRef([]),N=Array(V).fill(0).map((I,A)=>{const B=q(n).add(A,"years").toDate();return g.jsx(Fn,{size:$,monthsListFormat:i,year:B,withNext:A===V-1,withPrevious:A===0,yearLabelFormat:M,__stopPropagation:L,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(Y,te)=>Ns({levelIndex:A,rowIndex:te.rowIndex,cellIndex:te.cellIndex,event:Y,controlsRef:T}),__getControlRef:(Y,te,F)=>{Array.isArray(T.current[A])||(T.current[A]=[]),Array.isArray(T.current[A][Y])||(T.current[A][Y]=[]),T.current[A][Y][te]=F},levelControlAriaLabel:typeof z=="function"?z(B):z,locale:o,minDate:s,maxDate:a,__preventFocus:f,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,onLevelClick:b,nextDisabled:C,previousDisabled:D,hasNextLevel:S,getMonthControlProps:c,classNames:O,styles:k,unstyled:j,__staticSelector:P||"YearLevelGroup",withCellSpacing:d},A)});return g.jsx($t,{classNames:O,styles:k,__staticSelector:P||"YearLevelGroup",ref:t,size:$,unstyled:j,...E,children:N})});Bn.classes={...Fn.classes,...$t.classes};Bn.displayName="@mantine/dates/YearLevelGroup";const dg={numberOfColumns:1},Wn=se((e,t)=>{const r=K("MonthLevelGroup",dg,e),{month:n,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__onDayClick:h,__onDayMouseEnter:y,withCellSpacing:w,highlightToday:b,withWeekNumbers:C,__preventFocus:D,nextIcon:S,previousIcon:O,nextLabel:k,previousLabel:j,onNext:P,onPrevious:L,onLevelClick:V,nextDisabled:z,previousDisabled:M,hasNextLevel:$,classNames:_,styles:E,unstyled:T,numberOfColumns:N,levelControlAriaLabel:I,monthLabelFormat:A,__staticSelector:B,__stopPropagation:Y,size:te,static:F,vars:Q,...re}=r,ae=x.useRef([]),Z=Array(N).fill(0).map((le,ie)=>{const pe=q(n).add(ie,"months").toDate();return g.jsx(Vn,{month:pe,withNext:ie===N-1,withPrevious:ie===0,monthLabelFormat:A,__stopPropagation:Y,__onDayClick:h,__onDayMouseEnter:y,__onDayKeyDown:(X,me)=>Ns({levelIndex:ie,rowIndex:me.rowIndex,cellIndex:me.cellIndex,event:X,controlsRef:ae}),__getDayRef:(X,me,fe)=>{Array.isArray(ae.current[ie])||(ae.current[ie]=[]),Array.isArray(ae.current[ie][X])||(ae.current[ie][X]=[]),ae.current[ie][X][me]=fe},levelControlAriaLabel:typeof I=="function"?I(pe):I,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__preventFocus:D,nextIcon:S,previousIcon:O,nextLabel:k,previousLabel:j,onNext:P,onPrevious:L,onLevelClick:V,nextDisabled:z,previousDisabled:M,hasNextLevel:$,classNames:_,styles:E,unstyled:T,__staticSelector:B||"MonthLevelGroup",size:te,static:F,withCellSpacing:w,highlightToday:b,withWeekNumbers:C},ie)});return g.jsx($t,{classNames:_,styles:E,__staticSelector:B||"MonthLevelGroup",ref:t,size:te,...re,children:Z})});Wn.classes={...$t.classes,...Vn.classes};Wn.displayName="@mantine/dates/MonthLevelGroup";var rl={input:"m_6fa5e2aa"};const fg={},Yn=se((e,t)=>{const{inputProps:r,wrapperProps:n,placeholder:o,classNames:s,styles:a,unstyled:i,popoverProps:c,modalProps:l,dropdownType:u,children:d,formattedValue:f,dropdownHandlers:m,dropdownOpened:v,onClick:p,clearable:h,onClear:y,clearButtonProps:w,rightSection:b,shouldClear:C,readOnly:D,disabled:S,value:O,name:k,form:j,type:P,...L}=os("PickerInputBase",fg,e),V=g.jsx($e.ClearButton,{onClick:y,unstyled:i,...w}),z=()=>{P==="range"&&Array.isArray(O)&&O[0]&&!O[1]&&y(),m.close()};return g.jsxs(g.Fragment,{children:[u==="modal"&&!D&&g.jsx(dt,{opened:v,onClose:z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:i,...l,children:d}),g.jsx($e.Wrapper,{...n,children:g.jsxs(Xe,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:i,...c,disabled:(c==null?void 0:c.disabled)||u==="modal"||D,onChange:M=>{var $;M||(($=c==null?void 0:c.onClose)==null||$.call(c),z())},children:[g.jsx(Xe.Target,{children:g.jsx($e,{"data-dates-input":!0,"data-read-only":D||void 0,disabled:S,component:"button",type:"button",multiline:!0,onClick:M=>{p==null||p(M),m.toggle()},__clearSection:V,__clearable:h&&C&&!D&&!S,rightSection:b,...r,ref:t,classNames:{...s,input:Fe(rl.input,s==null?void 0:s.input)},...L,children:f||g.jsx($e.Placeholder,{error:r.error,unstyled:i,className:s==null?void 0:s.placeholder,style:a==null?void 0:a.placeholder,children:o})})}),g.jsx(Xe.Dropdown,{"data-dates-dropdown":!0,children:d})]})}),g.jsx(Ts,{value:O,name:k,form:j,type:P})]})});Yn.classes=rl;Yn.displayName="@mantine/dates/PickerInputBase";const za=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function Nr({type:e,value:t,defaultValue:r,onChange:n,applyTimezone:o=!0}){const s=x.useRef(e),a=Qe(),[i,c,l]=bt({value:ht("add",t,a.getTimezone(),!o),defaultValue:ht("add",r,a.getTimezone(),!o),finalValue:za(e),onChange:d=>{n==null||n(ht("remove",d,a.getTimezone(),!o))}});let u=i;if(s.current!==e){if(s.current=e,t===void 0)u=r!==void 0?r:za(e),c(u);else if(process.env.NODE_ENV==="development")switch(e){case"default":t!==null&&typeof t!="string"&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `null` or `string`");break;case"multiple":t instanceof Array||console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `string[]`");break;case"range":(!(t instanceof Array)||t.length!==2)&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `[string, string]`");break}}return[u,c,l]}function co(e,t){return e?e==="month"?0:e==="year"?1:2:t||0}function mg(e){return e===0?"month":e===1?"year":"decade"}function Sr(e,t,r){return mg(Cr(co(e,0),co(t,0),co(r,2)))}const pg={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},pr=se((e,t)=>{const r=K("Calendar",pg,e),{vars:n,maxLevel:o,minLevel:s,defaultLevel:a,level:i,onLevelChange:c,date:l,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:m,ariaLabels:v,nextLabel:p,previousLabel:h,onYearSelect:y,onMonthSelect:w,onYearMouseEnter:b,onMonthMouseEnter:C,__updateDateOnYearSelect:D,__updateDateOnMonthSelect:S,firstDayOfWeek:O,weekdayFormat:k,weekendDays:j,getDayProps:P,excludeDate:L,renderDay:V,hideOutsideDates:z,hideWeekdays:M,getDayAriaLabel:$,monthLabelFormat:_,nextIcon:E,previousIcon:T,__onDayClick:N,__onDayMouseEnter:I,withCellSpacing:A,highlightToday:B,withWeekNumbers:Y,monthsListFormat:te,getMonthControlProps:F,yearLabelFormat:Q,yearsListFormat:re,getYearControlProps:ae,decadeLabelFormat:Z,classNames:le,styles:ie,unstyled:pe,minDate:X,maxDate:me,locale:fe,__staticSelector:ge,size:U,__preventFocus:J,__stopPropagation:ee,onNextDecade:de,onPreviousDecade:be,onNextYear:oe,onPreviousYear:he,onNextMonth:H,onPreviousMonth:ce,static:we,__timezoneApplied:Oe,...De}=r,{resolvedClassNames:je,resolvedStyles:Pe}=St({classNames:le,styles:ie,props:r}),[Re,Rt]=bt({value:i?Sr(i,s,o):void 0,defaultValue:a?Sr(a,s,o):void 0,finalValue:Sr(void 0,s,o),onChange:c}),[Bt,ke]=Nr({type:"default",value:l,defaultValue:u,onChange:d,applyTimezone:!Oe}),He={__staticSelector:ge||"Calendar",styles:Pe,classNames:je,unstyled:pe,size:U},jt=Qe(),Et=m||f||1,Wt=new Date,Lr=X&&X>Wt?X:Wt,Be=Bt||ht("add",Lr,jt.getTimezone()),hr=()=>{const Ae=q(Be).add(Et,"month").toDate();H==null||H(Ae),ke(Ae)},vr=()=>{const Ae=q(Be).subtract(Et,"month").toDate();ce==null||ce(Ae),ke(Ae)},Ir=()=>{const Ae=q(Be).add(Et,"year").toDate();oe==null||oe(Ae),ke(Ae)},Un=()=>{const Ae=q(Be).subtract(Et,"year").toDate();he==null||he(Ae),ke(Ae)},Fr=()=>{const Ae=q(Be).add(10*Et,"year").toDate();de==null||de(Ae),ke(Ae)},Gn=()=>{const Ae=q(Be).subtract(10*Et,"year").toDate();be==null||be(Ae),ke(Ae)};return g.jsxs(ue,{ref:t,size:U,"data-calendar":!0,...De,children:[Re==="month"&&g.jsx(Wn,{month:Be,minDate:X,maxDate:me,firstDayOfWeek:O,weekdayFormat:k,weekendDays:j,getDayProps:P,excludeDate:L,renderDay:V,hideOutsideDates:z,hideWeekdays:M,getDayAriaLabel:$,onNext:hr,onPrevious:vr,hasNextLevel:o!=="month",onLevelClick:()=>Rt("year"),numberOfColumns:f,locale:fe,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??p,nextIcon:E,previousLabel:(v==null?void 0:v.previousMonth)??h,previousIcon:T,monthLabelFormat:_,__onDayClick:N,__onDayMouseEnter:I,__preventFocus:J,__stopPropagation:ee,static:we,withCellSpacing:A,highlightToday:B,withWeekNumbers:Y,...He}),Re==="year"&&g.jsx(Bn,{year:Be,numberOfColumns:f,minDate:X,maxDate:me,monthsListFormat:te,getMonthControlProps:F,locale:fe,onNext:Ir,onPrevious:Un,hasNextLevel:o!=="month"&&o!=="year",onLevelClick:()=>Rt("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??p,nextIcon:E,previousLabel:(v==null?void 0:v.previousYear)??h,previousIcon:T,yearLabelFormat:Q,__onControlMouseEnter:C,__onControlClick:(Ae,Nt)=>{S&&ke(Nt),Rt(Sr("month",s,o)),w==null||w(Nt)},__preventFocus:J,__stopPropagation:ee,withCellSpacing:A,...He}),Re==="decade"&&g.jsx(zn,{decade:Be,minDate:X,maxDate:me,yearsListFormat:re,getYearControlProps:ae,locale:fe,onNext:Fr,onPrevious:Gn,numberOfColumns:f,nextLabel:(v==null?void 0:v.nextDecade)??p,nextIcon:E,previousLabel:(v==null?void 0:v.previousDecade)??h,previousIcon:T,decadeLabelFormat:Z,__onControlMouseEnter:b,__onControlClick:(Ae,Nt)=>{D&&ke(Nt),Rt(Sr("year",s,o)),y==null||y(Nt)},__preventFocus:J,__stopPropagation:ee,withCellSpacing:A,...He})]})});pr.classes={...zn.classes,...Bn.classes,...Wn.classes};pr.displayName="@mantine/dates/Calendar";function nl(e){const{maxLevel:t,minLevel:r,defaultLevel:n,level:o,onLevelChange:s,nextIcon:a,previousIcon:i,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:m,nextLabel:v,previousLabel:p,onYearSelect:h,onMonthSelect:y,onYearMouseEnter:w,onMonthMouseEnter:b,onNextMonth:C,onPreviousMonth:D,onNextYear:S,onPreviousYear:O,onNextDecade:k,onPreviousDecade:j,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:z,withWeekNumbers:M,firstDayOfWeek:$,weekdayFormat:_,weekendDays:E,getDayProps:T,excludeDate:N,renderDay:I,hideOutsideDates:A,hideWeekdays:B,getDayAriaLabel:Y,monthLabelFormat:te,monthsListFormat:F,getMonthControlProps:Q,yearLabelFormat:re,yearsListFormat:ae,getYearControlProps:Z,decadeLabelFormat:le,allowSingleDateInRange:ie,allowDeselect:pe,minDate:X,maxDate:me,locale:fe,...ge}=e;return{calendarProps:{maxLevel:t,minLevel:r,defaultLevel:n,level:o,onLevelChange:s,nextIcon:a,previousIcon:i,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:m,nextLabel:v,previousLabel:p,onYearSelect:h,onMonthSelect:y,onYearMouseEnter:w,onMonthMouseEnter:b,onNextMonth:C,onPreviousMonth:D,onNextYear:S,onPreviousYear:O,onNextDecade:k,onPreviousDecade:j,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:z,withWeekNumbers:M,firstDayOfWeek:$,weekdayFormat:_,weekendDays:E,getDayProps:T,excludeDate:N,renderDay:I,hideOutsideDates:A,hideWeekdays:B,getDayAriaLabel:Y,monthLabelFormat:te,monthsListFormat:F,getMonthControlProps:Q,yearLabelFormat:re,yearsListFormat:ae,getYearControlProps:Z,decadeLabelFormat:le,allowSingleDateInRange:ie,allowDeselect:pe,minDate:X,maxDate:me,locale:fe},others:ge}}function Ba(e,t){const r=[...t].sort((n,o)=>n.getTime()-o.getTime());return q(r[0]).startOf("day").subtract(1,"ms").isBefore(e)&&q(r[1]).endOf("day").add(1,"ms").isAfter(e)}function hg({type:e,level:t,value:r,defaultValue:n,onChange:o,allowSingleDateInRange:s,allowDeselect:a,onMouseLeave:i,applyTimezone:c=!0}){const[l,u]=Nr({type:e,value:r,defaultValue:n,onChange:o,applyTimezone:c}),[d,f]=x.useState(e==="range"&&l[0]&&!l[1]?l[0]:null),[m,v]=x.useState(null),p=S=>{if(e==="range"){if(d instanceof Date&&!l[1]){if(q(S).isSame(d,t)&&!s){f(null),v(null),u([null,null]);return}const O=[S,d];O.sort((k,j)=>k.getTime()-j.getTime()),u(O),v(null),f(null);return}if(l[0]&&!l[1]&&q(S).isSame(l[0],t)&&!s){f(null),v(null),u([null,null]);return}u([S,null]),v(null),f(S);return}if(e==="multiple"){l.some(O=>q(O).isSame(S,t))?u(l.filter(O=>!q(O).isSame(S,t))):u([...l,S]);return}l&&a&&q(S).isSame(l,t)?u(null):u(S)},h=S=>d instanceof Date&&m instanceof Date?Ba(S,[m,d]):l[0]instanceof Date&&l[1]instanceof Date?Ba(S,l):!1,y=e==="range"?S=>{i==null||i(S),v(null)}:i,w=S=>l[0]instanceof Date&&q(S).isSame(l[0],t)?!(m&&q(m).isBefore(l[0])):!1,b=S=>l[1]instanceof Date?q(S).isSame(l[1],t):!(l[0]instanceof Date)||!m?!1:q(m).isBefore(l[0])&&q(S).isSame(l[0],t),C=S=>{if(e==="range")return{selected:l.some(k=>k&&q(k).isSame(S,t)),inRange:h(S),firstInRange:w(S),lastInRange:b(S),"data-autofocus":!!l[0]&&q(l[0]).isSame(S,t)||void 0};if(e==="multiple")return{selected:l.some(k=>k&&q(k).isSame(S,t)),"data-autofocus":!!l[0]&&q(l[0]).isSame(S,t)||void 0};const O=q(l).isSame(S,t);return{selected:O,"data-autofocus":O||void 0}},D=e==="range"&&d?v:()=>{};return x.useEffect(()=>{if(e==="range")if(l[0]&&!l[1]&&(d==null?void 0:d.getTime())!==l[0].getTime())f(l[0]);else{const S=l[0]==null&&l[1]==null,O=l[0]!=null&&l[1]!=null;(S||O)&&(f(null),v(null))}},[l]),{onDateChange:p,onRootMouseLeave:y,onHoveredDateChange:D,getControlProps:C,_value:l,setValue:u}}const vg={type:"default",defaultLevel:"month",numberOfColumns:1},Hn=se((e,t)=>{const r=K("DatePicker",vg,e),{classNames:n,styles:o,vars:s,type:a,defaultValue:i,value:c,onChange:l,__staticSelector:u,getDayProps:d,allowSingleDateInRange:f,allowDeselect:m,onMouseLeave:v,numberOfColumns:p,hideOutsideDates:h,__onDayMouseEnter:y,__onDayClick:w,__timezoneApplied:b,...C}=r,{onDateChange:D,onRootMouseLeave:S,onHoveredDateChange:O,getControlProps:k}=hg({type:a,level:"day",allowDeselect:m,allowSingleDateInRange:f,value:c,defaultValue:i,onChange:l,onMouseLeave:v,applyTimezone:!b}),{resolvedClassNames:j,resolvedStyles:P}=St({classNames:n,styles:o,props:r}),L=Qe();return g.jsx(pr,{ref:t,minLevel:"month",classNames:j,styles:P,__staticSelector:u||"DatePicker",onMouseLeave:S,numberOfColumns:p,hideOutsideDates:h??p!==1,__onDayMouseEnter:(V,z)=>{O(z),y==null||y(V,z)},__onDayClick:(V,z)=>{D(z),w==null||w(V,z)},getDayProps:V=>({...k(V),...d==null?void 0:d(V)}),...C,date:ht("add",C.date,L.getTimezone(),b),__timezoneApplied:!0})});Hn.classes=pr.classes;Hn.displayName="@mantine/dates/DatePicker";function gg(e,t){if(e===null)return null;const r=ht("add",new Date(e),t);return Number.isNaN(r.getTime())||!e?null:r}function yg({date:e,maxDate:t,minDate:r}){return!(e==null||Number.isNaN(e.getTime())||t&&q(e).isAfter(t,"date")||r&&q(e).isBefore(r,"date"))}const bg={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},$s=se((e,t)=>{const r=os("DateInput",bg,e),{inputProps:n,wrapperProps:o,value:s,defaultValue:a,onChange:i,clearable:c,clearButtonProps:l,popoverProps:u,getDayProps:d,locale:f,valueFormat:m,dateParser:v,minDate:p,maxDate:h,fixOnBlur:y,onFocus:w,onBlur:b,onClick:C,readOnly:D,name:S,form:O,rightSection:k,unstyled:j,classNames:P,styles:L,allowDeselect:V,preserveTime:z,date:M,defaultDate:$,onDateChange:_,...E}=r,T=x.useRef(null),N=x.useRef(null),[I,A]=x.useState(!1),{calendarProps:B,others:Y}=nl(E),te=Qe(),Q=v||(oe=>{const he=q(oe,m,te.getLocale(f)).toDate();return Number.isNaN(he.getTime())?gg(oe,te.getTimezone()):he}),re=V!==void 0?V:c,ae=oe=>oe?q(oe).locale(te.getLocale(f)).format(m):"",[Z,le,ie]=Nr({type:"default",value:s,defaultValue:a,onChange:i}),[pe,X]=Nr({type:"default",value:M,defaultValue:a||$,onChange:_});x.useEffect(()=>{ie&&s!==null&&X(s)},[ie,s]);const[me,fe]=x.useState(ae(Z));x.useEffect(()=>{fe(ae(Z))},[te.getLocale(f)]);const ge=oe=>{const he=oe.currentTarget.value;if(fe(he),A(!0),he.trim()===""&&c)le(null);else{const H=Q(he);yg({date:H,minDate:p,maxDate:h})&&(le(H),X(H))}},U=oe=>{b==null||b(oe),A(!1),y&&fe(ae(Z))},J=oe=>{w==null||w(oe),A(!0)},ee=oe=>{C==null||C(oe),A(!0)},de=oe=>({...d==null?void 0:d(oe),selected:q(Z).isSame(oe,"day"),onClick:he=>{var we,Oe;(Oe=d==null?void 0:(we=d(oe)).onClick)==null||Oe.call(we,he);const H=z?Oo(Z,oe):oe,ce=c&&re&&q(Z).isSame(oe,"day")?null:H;le(ce),!ie&&fe(ae(ce)),A(!1)}}),be=k||(c&&Z&&!D?g.jsx(Pr,{variant:"transparent",onMouseDown:oe=>oe.preventDefault(),tabIndex:-1,onClick:()=>{le(null),!ie&&fe(""),A(!1)},unstyled:j,size:n.size||"sm",...l}):null);return yt(()=>{Z!==void 0&&!I&&fe(ae(Z))},[Z]),Ha(()=>A(!1),void 0,[T.current,N.current]),g.jsxs(g.Fragment,{children:[g.jsx($e.Wrapper,{...o,__staticSelector:"DateInput",ref:T,children:g.jsxs(Xe,{opened:I,trapFocus:!1,position:"bottom-start",disabled:D,withRoles:!1,unstyled:j,...u,children:[g.jsx(Xe.Target,{children:g.jsx($e,{"data-dates-input":!0,"data-read-only":D||void 0,autoComplete:"off",ref:t,value:me,onChange:ge,onBlur:U,onFocus:J,onClick:ee,readOnly:D,rightSection:be,...n,...Y,__staticSelector:"DateInput"})}),g.jsx(Xe.Dropdown,{onMouseDown:oe=>oe.preventDefault(),"data-dates-dropdown":!0,ref:N,children:g.jsx(pr,{__staticSelector:"DateInput",__timezoneApplied:!0,...B,classNames:P,styles:L,unstyled:j,__preventFocus:!0,minDate:p,maxDate:h,locale:f,getDayProps:de,size:n.size,date:pe,onDateChange:X})})]})}),g.jsx(Ts,{name:S,form:O,value:Z,type:"default"})]})});$s.classes={...$e.classes,...pr.classes};$s.displayName="@mantine/dates/DateInput";var ol={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const xg={dropdownType:"popover"},js=se((e,t)=>{const r=K("DateTimePicker",xg,e),{value:n,defaultValue:o,onChange:s,valueFormat:a,locale:i,classNames:c,styles:l,unstyled:u,timeInputProps:d,submitButtonProps:f,withSeconds:m,level:v,defaultLevel:p,size:h,variant:y,dropdownType:w,vars:b,minDate:C,maxDate:D,...S}=r,O=ye({name:"DateTimePicker",classes:ol,props:r,classNames:c,styles:l,unstyled:u,vars:b}),{resolvedClassNames:k,resolvedStyles:j}=St({classNames:c,styles:l,props:r}),P=a||(m?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),L=x.useRef(null),V=Ze(L,d==null?void 0:d.ref),{calendarProps:{allowSingleDateInRange:z,...M},others:$}=nl(S),_=Qe(),[E,T]=Nr({type:"default",value:n,defaultValue:o,onChange:s}),N=X=>X?q(X).format(m?"HH:mm:ss":"HH:mm"):"",[I,A]=x.useState(N(E)),[B,Y]=x.useState(v||p||"month"),[te,F]=Jl(!1),Q=E?q(E).locale(_.getLocale(i)).tz(_.getTimezone(),!0).format(P):"",re=X=>{var fe;(fe=d==null?void 0:d.onChange)==null||fe.call(d,X);const me=X.currentTarget.value;if(A(me),me){const[ge,U,J]=me.split(":").map(Number),ee=ht("add",new Date,_.getTimezone());ee.setHours(ge),ee.setMinutes(U),ee.setSeconds(J||0),ee.setMilliseconds(0),T(Oo(ee,E||ht("add",new Date,_.getTimezone())))}},ae=X=>{var me;X&&T(Oo(E,X)),(me=L.current)==null||me.focus()},Z=X=>{var me;(me=d==null?void 0:d.onKeyDown)==null||me.call(d,X),X.key==="Enter"&&(X.preventDefault(),F.close())};yt(()=>{te||A(N(E))},[E,te]),yt(()=>{te&&Y("month")},[te]);const le=C?q(C).format("HH:mm:ss"):null,ie=D?q(D).format("HH:mm:ss"):null,pe=w==="popover";return g.jsxs(Yn,{formattedValue:Q,dropdownOpened:S.disabled?!1:te,dropdownHandlers:F,classNames:k,styles:j,unstyled:u,ref:t,onClear:()=>T(null),shouldClear:!!E,value:E,size:h,variant:y,dropdownType:w,...$,type:"default",__staticSelector:"DateTimePicker",children:[g.jsx(Hn,{...M,maxDate:D,minDate:C,size:h,variant:y,type:"default",value:E,defaultDate:E,onChange:ae,locale:i,classNames:k,styles:j,unstyled:u,__staticSelector:"DateTimePicker",__stopPropagation:pe,level:v,defaultLevel:p,onLevelChange:X=>{var me;Y(X),(me=M.onLevelChange)==null||me.call(M,X)},__timezoneApplied:!0}),B==="month"&&g.jsxs("div",{...O("timeWrapper"),children:[g.jsx(jn,{value:I,withSeconds:m,ref:V,unstyled:u,minTime:E&&C&&E.toDateString()===C.toDateString()?le??void 0:void 0,maxTime:E&&D&&E.toDateString()===D.toDateString()?ie??void 0:void 0,...d,...O("timeInput",{className:d==null?void 0:d.className,style:d==null?void 0:d.style}),onChange:re,onKeyDown:Z,size:h,"data-mantine-stop-propagation":pe||void 0}),g.jsx(ur,{variant:"default",size:`input-${h||"sm"}`,...O("submitButton",{className:f==null?void 0:f.className,style:f==null?void 0:f.style}),unstyled:u,"data-mantine-stop-propagation":pe||void 0,children:g.jsx(gs,{size:"30%"}),...f,onClick:X=>{var me;(me=f==null?void 0:f.onClick)==null||me.call(f,X),F.close()}})]})]})});js.classes={...ol,...Yn.classes,...Hn.classes};js.displayName="@mantine/dates/DateTimePicker";q.extend(Vc);const wg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx($s,{name:t,onChange:s=>r(t,s),value:n,readOnly:o,valueFormat:"YYYY-MM-DD",clearable:!0})};q.extend(Vc);const Sg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(js,{name:t,onChange:s=>r(t,s),value:n,readOnly:o,valueFormat:"YYYY-MM-DD HH:mm:ss",clearable:!0})},Cg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(_s,{name:t,onChange:s=>r(t,s),value:n,readOnly:o})},Dg=e=>{const{fields:t,name:r,onChange:n,value:o,formValues:s,error:a={},readOnly:i}=e,c=(u,d)=>{n(`${r}.${u}`,d)};return t.map((u,d)=>g.jsx(As,{field:u,formValues:s,onChange:c,value:o[u.name],error:a[u.name],readOnly:i},d))},_g=e=>{const{data:t,name:r,onChange:n,value:o,readOnly:s}=e;return g.jsx(Rs,{name:r,data:t,value:o,onChange:a=>n(r,a),readOnly:s,clearable:!0})},Rg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(Cs,{name:t,onChange:s=>r(t,s.target.value),value:n,readOnly:o,styles:{input:{height:200}}})},Eg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(Es,{name:t,onChange:s=>r(t,s.target.value),value:n,readOnly:o})},Ng=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e,s=x.useRef(null),a=g.jsx(ur,{variant:"subtle",color:"gray",onClick:()=>{var i;return(i=s.current)==null?void 0:i.showPicker()},children:"🕛"});return g.jsx(jn,{name:t,onChange:i=>r(t,i.target.value),value:n,readOnly:o,ref:s,rightSection:a,withSeconds:!0})};function Tg(e,t,r){return{addElement:n=>{t(e,[...r,n])},replaceElement:(n,o)=>{const s=r.map((a,i)=>i===n?o:a);t(e,s)},removeElement:n=>{t(e,r.filter((o,s)=>s!==n))}}}const As=({field:e,value:t,error:r,onChange:n,formValues:o,fieldContainer:s=c=>g.jsx(g.Fragment,{children:c}),customRender:a,readOnly:i})=>{const c=x.useMemo(()=>typeof e.visible=="function"?e.visible(o):e.visible!==!1,[e.visible,o]),l=x.useMemo(()=>typeof e.disabled=="function"?e.disabled(o):e.disabled===!0,[e.disabled,o]),u=x.useMemo(()=>{if(e.type==="array")return Tg(e.name,n,t)},[e.type,e.name,n,t]),d=x.useMemo(()=>a==null?void 0:a(e,t,r,n,o,u,i||e.readOnly),[a,e,t,r,n,o,u,i,e.readOnly]);if(!c)return null;if(d)return d;const f=()=>{switch(e.type){case"text":return g.jsx(Eg,{name:e.name,value:t,onChange:n,readOnly:i});case"number":return g.jsx(Cg,{name:e.name,value:t,onChange:n,readOnly:i});case"object":return g.jsx(Dg,{name:e.name,onChange:n,value:t,fields:e.fields??[],formValues:o,error:r,readOnly:i});case"array":return g.jsx(cv,{name:e.name,onChange:n,value:t,fields:e.fields,options:u,error:r,readOnly:i});case"check":return g.jsx(lv,{name:e.name,value:t,onChange:n,readOnly:i,label:e.label});case"select":return g.jsx(_g,{name:e.name,value:t,onChange:n,readOnly:i,data:e.data});case"textarea":return g.jsx(Rg,{name:e.name,value:t,onChange:n,readOnly:i});case"date":return g.jsx(wg,{name:e.name,value:t,onChange:n,readOnly:i});case"datetime":return g.jsx(Sg,{name:e.name,value:t,onChange:n,readOnly:i});case"time":return g.jsx(Ng,{name:e.name,value:t,onChange:n,readOnly:i});default:return null}},m=g.jsxs(ws,{legend:e.type==="check"?void 0:e.label,variant:"unstyled",disabled:l||i,styles:{legend:{fontWeight:500}},children:[f(),!["object","array"].includes(e.type)&&typeof r=="string"&&g.jsx(Dn,{c:"red",fz:"sm",fw:500,children:r})]});return s(m,e)},[Og,Mg,kg]=Ml(),$g=e=>{switch(e){case"number":return 0;case"array":return[];case"check":return!1;case"object":return{};case"select":case"date":case"datetime":return null;default:return""}},sl=e=>{const t={};for(const r of e)r.type==="object"&&r.fields?t[r.name]=sl(r.fields):t[r.name]=r.initialValue??$g(r.type);return t},jg=e=>e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0,ko=(e,t,r="")=>{const n={};for(const o of e){const s=r?`${r}.${o.name}`:o.name,a=t==null?void 0:t[o.name];if(o.type==="object")Object.assign(n,ko(o.fields,a||{},s));else if(o.type==="array"){if(o.required&&(!Array.isArray(a)||a.length===0)){n[s]=o.name+" is required";continue}Array.isArray(a)&&a.forEach((i,c)=>{Object.assign(n,ko(o.fields,i,`${s}.${c}`))})}else o.required&&jg(a)&&(n[s]=o.name+" is required")}return n};function Ag(e){const t={};return Object.entries(e).forEach(([r,n])=>{const o=r.split(".");let s=t;o.forEach((a,i)=>{const c=i===o.length-1;o[i+1],c?s[a]=n:(a in s||(s[a]={}),s=s[a])})}),t}const Pg=({onSubmit:e,schema:t,container:r,fieldContainer:n,customRender:o,validate:s,readOnly:a,values:i,onFieldChange:c})=>{const l=kg({mode:"uncontrolled",initialValues:sl(t),validate:s}),u=x.useMemo(()=>l.getValues(),[l.getValues()]),d=Or((p,h)=>{if(l.setFieldValue(p,h),c){const y=c(p,h,u);l.setValues(y)}},0),f=x.useCallback((p,h)=>{const y=l.errors;return p==="object"||p==="array"?Ag(y)[h]:y[h]},[l.errors]),m=x.useCallback(()=>{const p=l.getValues(),h=ko(t,p);if(Object.keys(h).length>0){l.setErrors(h);return}l.onSubmit(e)()},[l,e,t]);x.useEffect(()=>{i&&l.initialize(i)},[i]);const v=g.jsx(Og,{form:l,children:t.map((p,h)=>g.jsx(As,{field:p,formValues:u,value:u[p.name],error:f(p.type,p.name),onChange:d,fieldContainer:n,customRender:o,readOnly:p.readOnly||a},h))});return r(v,m,a)};exports.AutoForm=Pg;
|
|
30
|
+
<%s key={someKey} {...props} />`,Rt,Ye,Ur,Ye),Kt[Ye+Rt]=!0}}return c===n?Wr(pe):Pr(pe),pe}}function zr(c,T,$){return Zt(c,T,$,!0)}function Ir(c,T,$){return Zt(c,T,$,!1)}var Hr=Ir,Br=zr;Ke.Fragment=n,Ke.jsx=Hr,Ke.jsxs=Br}()),Ke}var Qt;function Zr(){return Qt||(Qt=1,process.env.NODE_ENV==="production"?ot.exports=Gr():ot.exports=Kr()),ot.exports}var S=Zr();function Jr(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}const Xr=typeof window<"u"?x.useLayoutEffect:x.useEffect;function ye(e,t){Xr(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function Qr(e,t){e&&Jr(e),ye(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),ye(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),ye(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),ye(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),ye(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),ye(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),ye(`mantine-form:${e}:clear-errors`,t.clearErrors),ye(`mantine-form:${e}:reset`,t.reset),ye(`mantine-form:${e}:validate`,t.validate),ye(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),ye(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),ye(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),ye(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),ye(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),ye(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),ye(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),ye(`mantine-form:${e}:reset-touched`,t.resetTouched)}function en(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}function $t(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function tn(e){const[t,r]=x.useState($t(e)),n=x.useRef(t),s=x.useCallback(i=>{r(u=>{const f=$t(typeof i=="function"?i(u):i);return n.current=f,f})},[]),o=x.useCallback(()=>s({}),[]),a=x.useCallback(i=>{n.current[i]!==void 0&&s(u=>{const f={...u};return delete f[i],f})},[t]),l=x.useCallback((i,u)=>{u==null||u===!1?a(i):n.current[i]!==u&&s(f=>({...f,[i]:u}))},[t]);return{errorsState:t,setErrors:s,clearErrors:o,setFieldError:l,clearFieldError:a}}function At(e,t){if(t===null||typeof t!="object")return{};const r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function er(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function tr(e,t,r,n){if(t===void 0)return r;const s=`${String(e)}`;let o=r;n===-1&&(o=At(`${s}.${t}`,o));const a={...o},l=new Set;return Object.entries(o).filter(([i])=>{if(!i.startsWith(`${s}.`))return!1;const u=er(i,s);return Number.isNaN(u)?!1:u>=t}).forEach(([i,u])=>{const f=er(i,s),h=i.replace(`${s}.${f}`,`${s}.${f+n}`);a[h]=u,l.add(h),l.has(i)||delete a[i]}),a}function rn(e,{from:t,to:r},n){const s=`${e}.${t}`,o=`${e}.${r}`,a={...n};return Object.keys(n).every(l=>{let i,u;if(l.startsWith(s)&&(i=l,u=l.replace(s,o)),l.startsWith(o)&&(i=l.replace(o,s),u=l),i&&u){const f=a[i],h=a[u];return h===void 0?delete a[i]:a[i]=h,f===void 0?delete a[u]:a[u]=f,!1}return!0}),a}function rr(e,t,r){typeof r.value=="object"&&(r.value=ze(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function ze(e){if(typeof e!="object")return e;var t=0,r,n,s,o=Object.prototype.toString.call(e);if(o==="[object Object]"?s=Object.create(e.__proto__||null):o==="[object Array]"?s=Array(e.length):o==="[object Set]"?(s=new Set,e.forEach(function(a){s.add(ze(a))})):o==="[object Map]"?(s=new Map,e.forEach(function(a,l){s.set(ze(l),ze(a))})):o==="[object Date]"?s=new Date(+e):o==="[object RegExp]"?s=new RegExp(e.source,e.flags):o==="[object DataView]"?s=new e.constructor(ze(e.buffer)):o==="[object ArrayBuffer]"?s=e.slice(0):o.slice(-6)==="Array]"&&(s=new e.constructor(e)),s){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)rr(s,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(s,r=n[t])&&s[r]===e[r]||rr(s,r,Object.getOwnPropertyDescriptor(e,r))}return s||e}function yr(e){return typeof e!="string"?[]:e.split(".")}function ve(e,t){const r=yr(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let s=1;s<r.length&&n!=null;s+=1)n=n[r[s]];return n}function et(e,t,r){const n=yr(e);if(n.length===0)return r;const s=ze(r);if(n.length===1)return s[n[0]]=t,s;let o=s[n[0]];for(let a=1;a<n.length-1;a+=1){if(o===void 0)return s;o=o[n[a]]}return o[n[n.length-1]]=t,s}function nn(e,{from:t,to:r},n){const s=ve(e,n);if(!Array.isArray(s))return n;const o=[...s],a=s[t];return o.splice(t,1),o.splice(r,0,a),et(e,o,n)}function sn(e,t,r,n){const s=ve(e,n);if(!Array.isArray(s))return n;const o=[...s];return o.splice(typeof r=="number"?r:o.length,0,t),et(e,o,n)}function an(e,t,r){const n=ve(e,r);return Array.isArray(n)?et(e,n.filter((s,o)=>o!==t),r):r}function on(e,t,r,n){const s=ve(e,n);if(!Array.isArray(s)||s.length<=r)return n;const o=[...s];return o[r]=t,et(e,o,n)}function ln({$values:e,$errors:t,$status:r}){const n=x.useCallback((l,i)=>{r.clearFieldDirty(l),t.setErrors(u=>rn(l,i,u)),e.setValues({values:nn(l,i,e.refValues.current),updateState:!0})},[]),s=x.useCallback((l,i)=>{r.clearFieldDirty(l),t.setErrors(u=>tr(l,i,u,-1)),e.setValues({values:an(l,i,e.refValues.current),updateState:!0})},[]),o=x.useCallback((l,i,u)=>{r.clearFieldDirty(l),t.setErrors(f=>tr(l,u,f,1)),e.setValues({values:sn(l,i,u,e.refValues.current),updateState:!0})},[]),a=x.useCallback((l,i,u)=>{r.clearFieldDirty(l),e.setValues({values:on(l,u,i,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:s,insertListItem:o,replaceListItem:a}}var Ft,nr;function cn(){return nr||(nr=1,Ft=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var a=o[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ft}var un=cn();const it=Qe(un);function Ze(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(s=>s.startsWith(`${t}.`));return e[t]||n.some(s=>e[s])||!1}return r.some(n=>e[n])}function fn({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[s,o]=x.useState(t),[a,l]=x.useState(e),i=x.useRef(t),u=x.useRef(e),f=x.useCallback(v=>{const C=typeof v=="function"?v(i.current):v;i.current=C,r==="controlled"&&o(C)},[]),h=x.useCallback((v,C=!1)=>{const O=typeof v=="function"?v(u.current):v;u.current=O,(r==="controlled"||C)&&l(O)},[]),y=x.useCallback(()=>f({}),[]),w=x.useCallback(v=>{const C=v?{...n.refValues.current,...v}:n.refValues.current;n.setValuesSnapshot(C),h({})},[]),b=x.useCallback((v,C)=>{f(O=>Ze(O,v)===C?O:{...O,[v]:C})},[]),m=x.useCallback((v,C,O)=>{h(F=>Ze(F,v)===C?F:{...F,[v]:C},O)},[]),d=x.useCallback((v,C)=>{const O=Ze(u.current,v),F=!it(ve(v,n.getValuesSnapshot()),C),Y=At(v,u.current);Y[v]=F,h(Y,O!==F)},[]),p=x.useCallback(v=>Ze(i.current,v),[]),g=x.useCallback(v=>h(C=>{if(typeof v!="string")return C;const O=At(v,C);return delete O[v],it(O,C)?C:O}),[]),D=x.useCallback(v=>{if(v){const O=ve(v,u.current);if(typeof O=="boolean")return O;const F=ve(v,n.refValues.current),Y=ve(v,n.valuesSnapshot.current);return!it(F,Y)}return Object.keys(u.current).length>0?Ze(u.current):!it(n.refValues.current,n.valuesSnapshot.current)},[]),L=x.useCallback(()=>u.current,[]),k=x.useCallback(()=>i.current,[]);return{touchedState:s,dirtyState:a,touchedRef:i,dirtyRef:u,setTouched:f,setDirty:h,resetDirty:w,resetTouched:y,isTouched:p,setFieldTouched:b,setFieldDirty:m,setTouchedState:o,setDirtyState:l,clearFieldDirty:g,isDirty:D,getDirty:L,getTouched:k,setCalculatedFieldDirty:d}}function dn({initialValues:e,onValuesChange:t,mode:r}){const n=x.useRef(!1),[s,o]=x.useState(e||{}),a=x.useRef(s),l=x.useRef(s),i=x.useCallback(({values:m,subscribers:d,updateState:p=!0,mergeWithPreviousValues:g=!0})=>{const D=a.current,L=m instanceof Function?m(a.current):m,k=g?{...D,...L}:L;a.current=k,p&&o(k),t==null||t(k,D),d==null||d.filter(Boolean).forEach(v=>v({updatedValues:k,previousValues:D}))},[t]),u=x.useCallback(m=>{var g;const d=ve(m.path,a.current),p=m.value instanceof Function?m.value(d):m.value;if(d!==p){const D=a.current,L=et(m.path,p,a.current);i({values:L,updateState:m.updateState}),(g=m.subscribers)==null||g.filter(Boolean).forEach(k=>k({path:m.path,updatedValues:L,previousValues:D}))}},[i]),f=x.useCallback(m=>{l.current=m},[]),h=x.useCallback((m,d)=>{n.current||(n.current=!0,i({values:m,updateState:r==="controlled"}),f(m),d())},[i]),y=x.useCallback(()=>{i({values:l.current,updateState:!0,mergeWithPreviousValues:!1})},[i]),w=x.useCallback(()=>a.current,[]),b=x.useCallback(()=>l.current,[]);return{initialized:n,stateValues:s,refValues:a,valuesSnapshot:l,setValues:i,setFieldValue:u,resetValues:y,setValuesSnapshot:f,initialize:h,getValues:w,getValuesSnapshot:b}}function mn({$status:e}){const t=x.useRef({}),r=x.useCallback((s,o)=>{x.useEffect(()=>(t.current[s]=t.current[s]||[],t.current[s].push(o),()=>{t.current[s]=t.current[s].filter(a=>a!==o)}),[o])},[]),n=x.useCallback(s=>t.current[s]?t.current[s].map(o=>a=>o({previousValue:ve(s,a.previousValues),value:ve(s,a.updatedValues),touched:e.isTouched(s),dirty:e.isDirty(s)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function sr(e,t){return e?`${e}-${t.toString()}`:t.toString()}const lt=Symbol("root-rule");function ar(e){const t=$t(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Nt(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((s,o)=>{const a=e[o],l=`${r===""?"":`${r}.`}${o}`,i=ve(l,t);let u=!1;return typeof a=="function"&&(s[l]=a(i,t,l)),typeof a=="object"&&Array.isArray(i)&&(u=!0,i.forEach((f,h)=>Nt(a,t,`${l}.${h}`,s)),lt in a&&(s[l]=a[lt](i,t,l))),typeof a=="object"&&typeof i=="object"&&i!==null&&(u||Nt(a,t,l,s),lt in a&&(s[l]=a[lt](i,t,l))),s},n)}function Yt(e,t){return ar(typeof e=="function"?e(t):Nt(e,t))}function ct(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Yt(t,r),s=Object.keys(n.errors).find(o=>e.split(".").every((a,l)=>a===o.split(".")[l]));return{hasError:!!s,error:s?n.errors[s]:null}}const hn="__MANTINE_FORM_INDEX__";function or(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${hn}`)):!1:!1}function pn({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:s={},initialTouched:o={},clearInputErrorOnChange:a=!0,validateInputOnChange:l=!1,validateInputOnBlur:i=!1,onValuesChange:u,transformValues:f=m=>m,enhanceGetInputProps:h,validate:y,onSubmitPreventDefault:w="always",touchTrigger:b="change"}={}){const m=tn(n),d=dn({initialValues:r,onValuesChange:u,mode:t}),p=fn({initialDirty:s,initialTouched:o,$values:d,mode:t}),g=ln({$values:d,$errors:m,$status:p}),D=mn({$status:p}),[L,k]=x.useState(0),[v,C]=x.useState({}),[O,F]=x.useState(!1),Y=x.useCallback(()=>{d.resetValues(),m.clearErrors(),p.resetDirty(),p.resetTouched(),t==="uncontrolled"&&k(M=>M+1)},[]),V=x.useCallback(M=>{a&&m.clearErrors(),t==="uncontrolled"&&k(G=>G+1),Object.keys(D.subscribers.current).forEach(G=>{const X=ve(G,d.refValues.current),ee=ve(G,M);X!==ee&&D.getFieldSubscribers(G).forEach(B=>B({previousValues:M,updatedValues:d.refValues.current}))})},[a]),z=x.useCallback(M=>{const G=d.refValues.current;d.initialize(M,()=>t==="uncontrolled"&&k(X=>X+1)),V(G)},[V]),P=x.useCallback((M,G,X)=>{const ee=or(M,l),B=G instanceof Function?G(ve(M,d.refValues.current)):G;p.setCalculatedFieldDirty(M,B),b==="change"&&p.setFieldTouched(M,!0),!ee&&a&&m.clearFieldError(M),d.setFieldValue({path:M,value:G,updateState:t==="controlled",subscribers:[...D.getFieldSubscribers(M),ee?ie=>{const Z=ct(M,y,ie.updatedValues);Z.hasError?m.setFieldError(M,Z.error):m.clearFieldError(M)}:null,(X==null?void 0:X.forceUpdate)!==!1&&t!=="controlled"?()=>C(ie=>({...ie,[M]:(ie[M]||0)+1})):null]})},[u,y]),H=x.useCallback(M=>{const G=d.refValues.current;d.setValues({values:M,updateState:t==="controlled"}),V(G)},[u,V]),I=x.useCallback(()=>{const M=Yt(y,d.refValues.current);return m.setErrors(M.errors),M},[y]),q=x.useCallback(M=>{const G=ct(M,y,d.refValues.current);return G.hasError?m.setFieldError(M,G.error):m.clearFieldError(M),G},[y]),A=(M,{type:G="input",withError:X=!0,withFocus:ee=!0,...B}={})=>{const Z={onChange:en(ue=>P(M,ue,{forceUpdate:!1})),"data-path":sr(e,M)};return X&&(Z.error=m.errorsState[M]),G==="checkbox"?Z[t==="controlled"?"checked":"defaultChecked"]=ve(M,d.refValues.current):Z[t==="controlled"?"value":"defaultValue"]=ve(M,d.refValues.current),ee&&(Z.onFocus=()=>p.setFieldTouched(M,!0),Z.onBlur=()=>{if(or(M,i)){const ue=ct(M,y,d.refValues.current);ue.hasError?m.setFieldError(M,ue.error):m.clearFieldError(M)}}),Object.assign(Z,h==null?void 0:h({inputProps:Z,field:M,options:{type:G,withError:X,withFocus:ee,...B},form:te}))},U=(M,G)=>X=>{w==="always"&&(X==null||X.preventDefault());const ee=I();if(ee.hasErrors)w==="validation-failed"&&(X==null||X.preventDefault()),G==null||G(ee.errors,d.refValues.current,X);else{const B=M==null?void 0:M(f(d.refValues.current),X);B instanceof Promise&&(F(!0),B.finally(()=>F(!1)))}},E=M=>f(M||d.refValues.current),J=x.useCallback(M=>{M.preventDefault(),Y()},[]),j=x.useCallback(M=>M?!ct(M,y,d.refValues.current).hasError:!Yt(y,d.refValues.current).hasErrors,[y]),W=M=>`${L}-${M}-${v[M]||0}`,re=x.useCallback(M=>document.querySelector(`[data-path="${sr(e,M)}"]`),[]),te={watch:D.watch,initialized:d.initialized.current,values:d.stateValues,getValues:d.getValues,getInitialValues:d.getValuesSnapshot,setInitialValues:d.setValuesSnapshot,initialize:z,setValues:H,setFieldValue:P,submitting:O,setSubmitting:F,errors:m.errorsState,setErrors:m.setErrors,setFieldError:m.setFieldError,clearFieldError:m.clearFieldError,clearErrors:m.clearErrors,resetDirty:p.resetDirty,setTouched:p.setTouched,setDirty:p.setDirty,isTouched:p.isTouched,resetTouched:p.resetTouched,isDirty:p.isDirty,getTouched:p.getTouched,getDirty:p.getDirty,reorderListItem:g.reorderListItem,insertListItem:g.insertListItem,removeListItem:g.removeListItem,replaceListItem:g.replaceListItem,reset:Y,validate:I,validateField:q,getInputProps:A,onSubmit:U,onReset:J,isValid:j,getTransformedValues:E,key:W,getInputNode:re};return Qr(e,te),te}function yn(){const e=x.createContext(null);function t({form:n,children:s}){return S.jsx(e.Provider,{value:n,children:s})}function r(){const n=x.useContext(e);if(!n)throw new Error("useFormContext was called outside of FormProvider context");return n}return[t,r,pn]}function vn(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function gn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}const bn=()=>{};function Dn(e,t){const r=t,n=!1,s=gn(e),o=x.useRef(0),a=Object.assign(x.useCallback((...l)=>{window.clearTimeout(o.current);const i=()=>{o.current!==0&&(o.current=0,s(...l))};a.flush=i,o.current=window.setTimeout(i,r)},[s,r]),{flush:bn});return x.useEffect(()=>()=>{window.clearTimeout(o.current)},[a,n]),a}const ir=["mousedown","touchstart"];function _n(e,t,r){const n=x.useRef(null);return x.useEffect(()=>{const s=o=>{const{target:a}=o??{};if(Array.isArray(r)){const l=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(u=>!!u&&!o.composedPath().includes(u))&&!l&&e()}else n.current&&!n.current.contains(a)&&e()};return ir.forEach(o=>document.addEventListener(o,s)),()=>{ir.forEach(o=>document.removeEventListener(o,s))}},[n,e,r]),n}function Vt(e,t){const r=x.useRef(!1);x.useEffect(()=>()=>{r.current=!1},[]),x.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function lr(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function Sn(...e){const t=new Map;return r=>{if(e.forEach(n=>{const s=lr(n,r);s&&t.set(n,s)}),t.size>0)return()=>{e.forEach(n=>{const s=t.get(n);s?s():lr(n,null)}),t.clear()}}}function xn(...e){return x.useCallback(Sn(...e),e)}function vr({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[s,o]=x.useState(t!==void 0?t:r),a=(l,...i)=>{o(l),n==null||n(l,...i)};return e!==void 0?[e,n,!0]:[s,a,!1]}function Cn(e=!1,t){const{onOpen:r,onClose:n}={},[s,o]=x.useState(e),a=x.useCallback(()=>{o(u=>u||(r==null||r(),!0))},[r]),l=x.useCallback(()=>{o(u=>u&&(n==null||n(),!1))},[n]),i=x.useCallback(()=>{s?l():a()},[l,a,s]);return[s,{open:a,close:l,toggle:i}]}const wn=e=>{const{fields:t,options:r,value:n,error:s={},name:o,readOnly:a}=e,l=n.map((i,u)=>{const f=(h,y)=>{i[h]=y,r.replaceElement(u,i)};return t.map((h,y)=>S.jsxs(x.Fragment,{children:[S.jsx(Gt,{field:h,formValues:i,onChange:f,value:i[h.name],error:h.name in(s[u]??{})?s[u][h.name]:void 0,readOnly:a}),!a&&S.jsx(_.Button,{onClick:()=>r.removeElement(u),children:"Remove"})]},y))});return S.jsxs(S.Fragment,{children:[typeof s=="string"&&S.jsx(_.Text,{c:"red",fz:"sm",fw:500,children:s}),l,!a&&S.jsx(_.Button,{display:"block",onClick:()=>r.addElement({}),children:"Add"})]})},kn=e=>{const{name:t,onChange:r,value:n,readOnly:s,label:o}=e;return S.jsx(_.Checkbox,{name:t,checked:n,readOnly:s,onChange:a=>r(t,a.target.checked),label:o})};var ut={exports:{}},En=ut.exports,cr;function Tn(){return cr||(cr=1,function(e,t){(function(r,n){e.exports=n()})(En,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,i={},u=function(d){return(d=+d)+(d>68?1900:2e3)},f=function(d){return function(p){this[d]=+p}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(d){(this.zone||(this.zone={})).offset=function(p){if(!p||p==="Z")return 0;var g=p.match(/([+-]|\d\d)/g),D=60*g[1]+(+g[2]||0);return D===0?0:g[0]==="+"?-D:D}(d)}],y=function(d){var p=i[d];return p&&(p.indexOf?p:p.s.concat(p.f))},w=function(d,p){var g,D=i.meridiem;if(D){for(var L=1;L<=24;L+=1)if(d.indexOf(D(L,0,p))>-1){g=L>12;break}}else g=d===(p?"pm":"PM");return g},b={A:[l,function(d){this.afternoon=w(d,!1)}],a:[l,function(d){this.afternoon=w(d,!0)}],Q:[s,function(d){this.month=3*(d-1)+1}],S:[s,function(d){this.milliseconds=100*+d}],SS:[o,function(d){this.milliseconds=10*+d}],SSS:[/\d{3}/,function(d){this.milliseconds=+d}],s:[a,f("seconds")],ss:[a,f("seconds")],m:[a,f("minutes")],mm:[a,f("minutes")],H:[a,f("hours")],h:[a,f("hours")],HH:[a,f("hours")],hh:[a,f("hours")],D:[a,f("day")],DD:[o,f("day")],Do:[l,function(d){var p=i.ordinal,g=d.match(/\d+/);if(this.day=g[0],p)for(var D=1;D<=31;D+=1)p(D).replace(/\[|\]/g,"")===d&&(this.day=D)}],w:[a,f("week")],ww:[o,f("week")],M:[a,f("month")],MM:[o,f("month")],MMM:[l,function(d){var p=y("months"),g=(y("monthsShort")||p.map(function(D){return D.slice(0,3)})).indexOf(d)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[l,function(d){var p=y("months").indexOf(d)+1;if(p<1)throw new Error;this.month=p%12||p}],Y:[/[+-]?\d+/,f("year")],YY:[o,function(d){this.year=u(d)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function m(d){var p,g;p=d,g=i&&i.formats;for(var D=(d=p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Y,V,z){var P=z&&z.toUpperCase();return V||g[z]||r[z]||g[P].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(H,I,q){return I||q.slice(1)})})).match(n),L=D.length,k=0;k<L;k+=1){var v=D[k],C=b[v],O=C&&C[0],F=C&&C[1];D[k]=F?{regex:O,parser:F}:v.replace(/^\[|\]$/g,"")}return function(Y){for(var V={},z=0,P=0;z<L;z+=1){var H=D[z];if(typeof H=="string")P+=H.length;else{var I=H.regex,q=H.parser,A=Y.slice(P),U=I.exec(A)[0];q.call(V,U),Y=Y.replace(U,"")}}return function(E){var J=E.afternoon;if(J!==void 0){var j=E.hours;J?j<12&&(E.hours+=12):j===12&&(E.hours=0),delete E.afternoon}}(V),V}}return function(d,p,g){g.p.customParseFormat=!0,d&&d.parseTwoDigitYear&&(u=d.parseTwoDigitYear);var D=p.prototype,L=D.parse;D.parse=function(k){var v=k.date,C=k.utc,O=k.args;this.$u=C;var F=O[1];if(typeof F=="string"){var Y=O[2]===!0,V=O[3]===!0,z=Y||V,P=O[2];V&&(P=O[2]),i=this.$locale(),!Y&&P&&(i=g.Ls[P]),this.$d=function(A,U,E,J){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*A);var j=m(U)(A),W=j.year,re=j.month,te=j.day,M=j.hours,G=j.minutes,X=j.seconds,ee=j.milliseconds,B=j.zone,ie=j.week,Z=new Date,ue=te||(W||re?1:Z.getDate()),N=W||Z.getFullYear(),ne=0;W&&!re||(ne=re>0?re-1:Z.getMonth());var Q,ce=M||0,Ce=G||0,De=X||0,he=ee||0;return B?new Date(Date.UTC(N,ne,ue,ce,Ce,De,he+60*B.offset*1e3)):E?new Date(Date.UTC(N,ne,ue,ce,Ce,De,he)):(Q=new Date(N,ne,ue,ce,Ce,De,he),ie&&(Q=J(Q).week(ie).toDate()),Q)}catch{return new Date("")}}(v,F,C,g),this.init(),P&&P!==!0&&(this.$L=this.locale(P).$L),z&&v!=this.format(F)&&(this.$d=new Date("")),i={}}else if(F instanceof Array)for(var H=F.length,I=1;I<=H;I+=1){O[1]=F[I-1];var q=g.apply(this,O);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}I===H&&(this.$d=new Date(""))}else L.call(this,k)}}})}(ut)),ut.exports}var jn=Tn();const gr=Qe(jn);function On({direction:e,levelIndex:t,rowIndex:r,cellIndex:n,size:s}){switch(e){case"up":return t===0&&r===0?null:r===0?{levelIndex:t-1,rowIndex:n<=s[t-1][s[t-1].length-1]-1?s[t-1].length-1:s[t-1].length-2,cellIndex:n}:{levelIndex:t,rowIndex:r-1,cellIndex:n};case"down":return r===s[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:n}:r===s[t].length-2&&n>=s[t][s[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:n}:{levelIndex:t,rowIndex:r+1,cellIndex:n};case"left":return t===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:t-1,rowIndex:s[t-1].length-1,cellIndex:s[t-1][s[t-1].length-1]-1}:n===0?{levelIndex:t,rowIndex:r-1,cellIndex:s[t][r-1]-1}:{levelIndex:t,rowIndex:r,cellIndex:n-1};case"right":return r===s[t].length-1&&n===s[t][r]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:n===s[t][r]-1?{levelIndex:t,rowIndex:r+1,cellIndex:0}:{levelIndex:t,rowIndex:r,cellIndex:n+1};default:return{levelIndex:t,rowIndex:r,cellIndex:n}}}function br({controlsRef:e,direction:t,levelIndex:r,rowIndex:n,cellIndex:s,size:o}){var i,u,f;const a=On({direction:t,size:o,rowIndex:n,cellIndex:s,levelIndex:r});if(!a)return;const l=(f=(u=(i=e.current)==null?void 0:i[a.levelIndex])==null?void 0:u[a.rowIndex])==null?void 0:f[a.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?br({controlsRef:e,direction:t,levelIndex:a.levelIndex,cellIndex:a.cellIndex,rowIndex:a.rowIndex,size:o}):l.focus())}function Ln(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Rn(e){var t;return(t=e.current)==null?void 0:t.map(r=>r.map(n=>n.length))}function zt({controlsRef:e,levelIndex:t,rowIndex:r,cellIndex:n,event:s}){const o=Ln(s.key);if(o){s.preventDefault();const a=Rn(e);br({controlsRef:e,direction:o,levelIndex:t,rowIndex:r,cellIndex:n,size:a})}}function Pt(e,t){if(!e||!t)return t;const r=e.getHours(),n=e.getMinutes(),s=e.getSeconds(),o=e.getMilliseconds(),a=new Date(t);return a.setHours(r),a.setMinutes(n),a.setSeconds(s),a.setMilliseconds(o),a}var ft={exports:{}},Fn=ft.exports,ur;function Mn(){return ur||(ur=1,function(e,t){(function(r,n){e.exports=n()})(Fn,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,o,a){var l,i=function(y,w,b){b===void 0&&(b={});var m=new Date(y),d=function(p,g){g===void 0&&(g={});var D=g.timeZoneName||"short",L=p+"|"+D,k=n[L];return k||(k=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:p,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:D}),n[L]=k),k}(w,b);return d.formatToParts(m)},u=function(y,w){for(var b=i(y,w),m=[],d=0;d<b.length;d+=1){var p=b[d],g=p.type,D=p.value,L=r[g];L>=0&&(m[L]=parseInt(D,10))}var k=m[3],v=k===24?0:k,C=m[0]+"-"+m[1]+"-"+m[2]+" "+v+":"+m[4]+":"+m[5]+":000",O=+y;return(a.utc(C).valueOf()-(O-=O%1e3))/6e4},f=o.prototype;f.tz=function(y,w){y===void 0&&(y=l);var b,m=this.utcOffset(),d=this.toDate(),p=d.toLocaleString("en-US",{timeZone:y}),g=Math.round((d-new Date(p))/1e3/60),D=15*-Math.round(d.getTimezoneOffset()/15)-g;if(!Number(D))b=this.utcOffset(0,w);else if(b=a(p,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(D,!0),w){var L=b.utcOffset();b=b.add(m-L,"minute")}return b.$x.$timezone=y,b},f.offsetName=function(y){var w=this.$x.$timezone||a.tz.guess(),b=i(this.valueOf(),w,{timeZoneName:y}).find(function(m){return m.type.toLowerCase()==="timezonename"});return b&&b.value};var h=f.startOf;f.startOf=function(y,w){if(!this.$x||!this.$x.$timezone)return h.call(this,y,w);var b=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return h.call(b,y,w).tz(this.$x.$timezone,!0)},a.tz=function(y,w,b){var m=b&&w,d=b||w||l,p=u(+a(),d);if(typeof y!="string")return a(y).tz(d);var g=function(v,C,O){var F=v-60*C*1e3,Y=u(F,O);if(C===Y)return[F,C];var V=u(F-=60*(Y-C)*1e3,O);return Y===V?[F,Y]:[v-60*Math.min(Y,V)*1e3,Math.max(Y,V)]}(a.utc(y,m).valueOf(),p,d),D=g[0],L=g[1],k=a(D).utcOffset(L);return k.$x.$timezone=d,k},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(y){l=y}}})}(ft)),ft.exports}var $n=Mn();const An=Qe($n);var dt={exports:{}},Nn=dt.exports,fr;function Yn(){return fr||(fr=1,function(e,t){(function(r,n){e.exports=n()})(Nn,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(o,a,l){var i=a.prototype;l.utc=function(m){var d={date:m,utc:!0,args:arguments};return new a(d)},i.utc=function(m){var d=l(this.toDate(),{locale:this.$L,utc:!0});return m?d.add(this.utcOffset(),r):d},i.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var u=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var f=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else f.call(this)};var h=i.utcOffset;i.utcOffset=function(m,d){var p=this.$utils().u;if(p(m))return this.$u?0:p(this.$offset)?h.call(this):this.$offset;if(typeof m=="string"&&(m=function(k){k===void 0&&(k="");var v=k.match(n);if(!v)return null;var C=(""+v[0]).match(s)||["-",0,0],O=C[0],F=60*+C[1]+ +C[2];return F===0?0:O==="+"?F:-F}(m),m===null))return this;var g=Math.abs(m)<=16?60*m:m,D=this;if(d)return D.$offset=g,D.$u=m===0,D;if(m!==0){var L=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(D=this.local().add(g+L,r)).$offset=g,D.$x.$localOffset=L}else D=this.utc();return D};var y=i.format;i.format=function(m){var d=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,d)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var w=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():w.call(this)};var b=i.diff;i.diff=function(m,d,p){if(m&&this.$u===m.$u)return b.call(this,m,d,p);var g=this.local(),D=l(m).local();return b.call(g,D,d,p)}}})}(dt)),dt.exports}var Vn=Yn();const Pn=Qe(Vn);R.extend(Pn);R.extend(An);function Wn(e,t){return t?R(e).tz(t).utcOffset()+e.getTimezoneOffset():0}const dr=(e,t,r)=>{if(!e)return null;if(!t)return e;let n=Wn(e,t);return r==="remove"&&(n*=-1),R(e).add(n,"minutes").toDate()};function Te(e,t,r,n){return n||!t?t:Array.isArray(t)?t.map(s=>dr(s,r,e)):dr(t,r,e)}const zn={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},In=x.createContext(zn);function xe(){const e=x.useContext(In),t=x.useCallback(a=>a||e.locale,[e.locale]),r=x.useCallback(a=>a||e.timezone||void 0,[e.timezone]),n=x.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),s=x.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),o=x.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getTimezone:r,getFirstDayOfWeek:n,getWeekendDays:s,getLabelSeparator:o}}function Hn(e,t){const r=xe(),n=s=>Te("remove",s,r.getTimezone()).toISOString();if(t==="range"&&Array.isArray(e)){const[s,o]=e;return s?o?`${n(s)} – ${n(o)}`:`${n(s)} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(s=>s&&n(s)).filter(Boolean).join(", "):!Array.isArray(e)&&e?n(e):""}function It({value:e,type:t,name:r,form:n}){return S.jsx("input",{type:"hidden",value:Hn(e,t),name:r,form:n})}It.displayName="@mantine/dates/HiddenDatesInput";function Dr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Dr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function _r(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Dr(e))&&(n&&(n+=" "),n+=t);return n}var Bn={input:"m_468e7eda"};const Un={},ht=_.factory((e,t)=>{const r=_.useProps("TimeInput",Un,e),{classNames:n,styles:s,unstyled:o,vars:a,withSeconds:l,minTime:i,maxTime:u,value:f,onChange:h,...y}=r,{resolvedClassNames:w,resolvedStyles:b}=_.useResolvedStylesApi({classNames:n,styles:s,props:r}),m=p=>{if(i!==void 0||u!==void 0){const[g,D,L]=p.split(":").map(Number);if(i){const[k,v,C]=i.split(":").map(Number);if(g<k||g===k&&D<v||l&&g===k&&D===v&&L<C)return-1}if(u){const[k,v,C]=u.split(":").map(Number);if(g>k||g===k&&D>v||l&&g===k&&D===v&&L>C)return 1}}return 0},d=p=>{var g,D,L;if((g=r.onBlur)==null||g.call(r,p),i!==void 0||u!==void 0){const k=p.currentTarget.value;if(k){const v=m(k);v===1?(p.currentTarget.value=u,(D=r.onChange)==null||D.call(r,p)):v===-1&&(p.currentTarget.value=i,(L=r.onChange)==null||L.call(r,p))}}};return S.jsx(_.InputBase,{classNames:{...w,input:_r(Bn.input,w==null?void 0:w.input)},styles:b,unstyled:o,ref:t,value:f,...y,step:l?1:60,onChange:h,onBlur:d,type:"time",__staticSelector:"TimeInput"})});ht.classes=_.InputBase.classes;ht.displayName="@mantine/dates/TimeInput";var Sr={day:"m_396ce5cb"};const qn={},Gn=_.createVarsResolver((e,{size:t})=>({day:{"--day-size":_.getSize(t,"day-size")}})),Ht=_.factory((e,t)=>{const r=_.useProps("Day",qn,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,date:u,disabled:f,__staticSelector:h,weekend:y,outside:w,selected:b,renderDay:m,inRange:d,firstInRange:p,lastInRange:g,hidden:D,static:L,highlightToday:k,...v}=r,C=_.useStyles({name:h||"Day",classes:Sr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:Gn,rootSelector:"day"}),O=xe();return S.jsx(_.UnstyledButton,{...C("day",{style:D?{display:"none"}:void 0}),component:L?"div":"button",ref:t,disabled:f,"data-today":R(u).isSame(Te("add",new Date,O.getTimezone()),"day")||void 0,"data-hidden":D||void 0,"data-highlight-today":k||void 0,"data-disabled":f||void 0,"data-weekend":!f&&!w&&y||void 0,"data-outside":!f&&w||void 0,"data-selected":!f&&b||void 0,"data-in-range":d&&!f||void 0,"data-first-in-range":p&&!f||void 0,"data-last-in-range":g&&!f||void 0,"data-static":L||void 0,unstyled:l,...v,children:(m==null?void 0:m(u))||R(u).date()})});Ht.classes=Sr;Ht.displayName="@mantine/dates/Day";function Kn({locale:e,format:t="dd",firstDayOfWeek:r=1}){const n=R().day(r),s=[];for(let o=0;o<7;o+=1)typeof t=="string"?s.push(R(n).add(o,"days").locale(e).format(t)):s.push(t(R(n).add(o,"days").toDate()));return s}var xr={weekday:"m_18a3eca"};const Zn={},Jn=_.createVarsResolver((e,{size:t})=>({weekdaysRow:{"--wr-fz":_.getFontSize(t),"--wr-spacing":_.getSpacing(t)}})),Bt=_.factory((e,t)=>{const r=_.useProps("WeekdaysRow",Zn,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,locale:u,firstDayOfWeek:f,weekdayFormat:h,cellComponent:y="th",__staticSelector:w,withWeekNumbers:b,...m}=r,d=_.useStyles({name:w||"WeekdaysRow",classes:xr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:Jn,rootSelector:"weekdaysRow"}),p=xe(),g=Kn({locale:p.getLocale(u),format:h,firstDayOfWeek:p.getFirstDayOfWeek(f)}).map((D,L)=>S.jsx(y,{...d("weekday"),children:D},L));return S.jsxs(_.Box,{component:"tr",ref:t,...d("weekdaysRow"),...m,children:[b&&S.jsx(y,{...d("weekday"),children:"#"}),g]})});Bt.classes=xr;Bt.displayName="@mantine/dates/WeekdaysRow";function Xn(e,t=1){let r=R(e);const n=t===0?6:t-1;for(;r.day()!==n;)r=r.add(1,"day");return r.toDate()}function Qn(e,t=1){let r=R(e);for(;r.day()!==t;)r=r.subtract(1,"day");return r.toDate()}function es({month:e,firstDayOfWeek:t=1,consistentWeeks:r}){const n=R(e).subtract(R(e).date()-1,"day"),s=R(n).startOf("day"),o=s.toDate(),a=s.add(+s.daysInMonth()-1,"day").toDate(),l=Xn(a,t),i=Qn(o,t),u=[];for(;i<=l;){const f=[];for(let h=0;h<7;h+=1)f.push(new Date(i)),i.setDate(i.getDate()+1);u.push(f)}if(r&&u.length<6){const f=u[u.length-1],h=f[f.length-1],y=new Date(h);for(y.setDate(y.getDate()+1);u.length<6;){const w=[];for(let b=0;b<7;b+=1)w.push(new Date(y)),y.setDate(y.getDate()+1);u.push(w)}}return u}function Cr(e,t){return R(e).format("YYYY-MM")===R(t).format("YYYY-MM")}function wr(e,t){return t instanceof Date?R(e).isAfter(R(t).subtract(1,"day"),"day"):!0}function kr(e,t){return t instanceof Date?R(e).isBefore(R(t).add(1,"day"),"day"):!0}function ts(e,t,r,n,s,o,a){const l=e.flat().filter(f=>{var h;return kr(f,r)&&wr(f,t)&&!(s!=null&&s(f))&&!((h=n==null?void 0:n(f))!=null&&h.disabled)&&(!o||Cr(f,a))}),i=l.find(f=>{var h;return(h=n==null?void 0:n(f))==null?void 0:h.selected});if(i)return i;const u=l.find(f=>R().isSame(f,"date"));return u||l[0]}var mt={exports:{}},rs=mt.exports,mr;function ns(){return mr||(mr=1,function(e,t){(function(r,n){e.exports=n()})(rs,function(){var r="day";return function(n,s,o){var a=function(u){return u.add(4-u.isoWeekday(),r)},l=s.prototype;l.isoWeekYear=function(){return a(this).year()},l.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),r);var f,h,y,w,b=a(this),m=(f=this.isoWeekYear(),h=this.$u,y=(h?o.utc:o)().year(f).startOf("year"),w=4-y.isoWeekday(),y.isoWeekday()>4&&(w+=7),y.add(w,r));return b.diff(m,"week")+1},l.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var i=l.startOf;l.startOf=function(u,f){var h=this.$utils(),y=!!h.u(f)||f;return h.p(u)==="isoweek"?y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):i.bind(this)(u,f)}}})}(mt)),mt.exports}var ss=ns();const as=Qe(ss);R.extend(as);function os(e){const t=e.find(r=>R(r).day()===1);return R(t).isoWeek()}var Er={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const is={withCellSpacing:!0},ls=_.createVarsResolver((e,{size:t})=>({weekNumber:{"--wn-fz":_.getFontSize(t),"--wn-size":_.getSize(t,"wn-size")}})),pt=_.factory((e,t)=>{const r=_.useProps("Month",is,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,__staticSelector:u,locale:f,firstDayOfWeek:h,weekdayFormat:y,month:w,weekendDays:b,getDayProps:m,excludeDate:d,minDate:p,maxDate:g,renderDay:D,hideOutsideDates:L,hideWeekdays:k,getDayAriaLabel:v,static:C,__getDayRef:O,__onDayKeyDown:F,__onDayClick:Y,__onDayMouseEnter:V,__preventFocus:z,__stopPropagation:P,withCellSpacing:H,size:I,highlightToday:q,withWeekNumbers:A,...U}=r,E=_.useStyles({name:u||"Month",classes:Er,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:ls,rootSelector:"month"}),J=xe(),j=es({month:w,firstDayOfWeek:J.getFirstDayOfWeek(h),consistentWeeks:J.consistentWeeks}),W=ts(j,p,g,m,d,L,w),{resolvedClassNames:re,resolvedStyles:te}=_.useResolvedStylesApi({classNames:n,styles:a,props:r}),M=j.map((G,X)=>{const ee=G.map((B,ie)=>{const Z=!Cr(B,w),ue=(v==null?void 0:v(B))||R(B).locale(f||J.locale).format("D MMMM YYYY"),N=m==null?void 0:m(B),ne=R(B).isSame(W,"date");return S.jsx("td",{...E("monthCell"),"data-with-spacing":H||void 0,children:S.jsx(Ht,{__staticSelector:u||"Month",classNames:re,styles:te,unstyled:l,"data-mantine-stop-propagation":P||void 0,highlightToday:q,renderDay:D,date:B,size:I,weekend:J.getWeekendDays(b).includes(B.getDay()),outside:Z,hidden:L?Z:!1,"aria-label":ue,static:C,disabled:(d==null?void 0:d(B))||!kr(B,g)||!wr(B,p),ref:Q=>O==null?void 0:O(X,ie,Q),...N,onKeyDown:Q=>{var ce;(ce=N==null?void 0:N.onKeyDown)==null||ce.call(N,Q),F==null||F(Q,{rowIndex:X,cellIndex:ie,date:B})},onMouseEnter:Q=>{var ce;(ce=N==null?void 0:N.onMouseEnter)==null||ce.call(N,Q),V==null||V(Q,B)},onClick:Q=>{var ce;(ce=N==null?void 0:N.onClick)==null||ce.call(N,Q),Y==null||Y(Q,B)},onMouseDown:Q=>{var ce;(ce=N==null?void 0:N.onMouseDown)==null||ce.call(N,Q),z&&Q.preventDefault()},tabIndex:z||!ne?-1:0})},B.toString())});return S.jsxs("tr",{...E("monthRow"),children:[A&&S.jsx("td",{...E("weekNumber"),children:os(G)}),ee]},X)});return S.jsxs(_.Box,{component:"table",...E("month"),size:I,ref:t,...U,children:[!k&&S.jsx("thead",{...E("monthThead"),children:S.jsx(Bt,{__staticSelector:u||"Month",locale:f,firstDayOfWeek:h,weekdayFormat:y,size:I,classNames:re,styles:te,unstyled:l,withWeekNumbers:A})}),S.jsx("tbody",{...E("monthTbody"),children:M})]})});pt.classes=Er;pt.displayName="@mantine/dates/Month";var Tr={pickerControl:"m_dc6a3c71"};const cs={},us=_.createVarsResolver((e,{size:t})=>({pickerControl:{"--dpc-fz":_.getFontSize(t),"--dpc-size":_.getSize(t,"dpc-size")}})),yt=_.factory((e,t)=>{const r=_.useProps("PickerControl",cs,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,firstInRange:u,lastInRange:f,inRange:h,__staticSelector:y,selected:w,disabled:b,...m}=r,d=_.useStyles({name:y||"PickerControl",classes:Tr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:us,rootSelector:"pickerControl"});return S.jsx(_.UnstyledButton,{...d("pickerControl"),ref:t,unstyled:l,"data-picker-control":!0,"data-selected":w&&!b||void 0,"data-disabled":b||void 0,"data-in-range":h&&!b&&!w||void 0,"data-first-in-range":u&&!b||void 0,"data-last-in-range":f&&!b||void 0,disabled:b,...m})});yt.classes=Tr;yt.displayName="@mantine/dates/PickerControl";function jr(e,t,r){return!t&&!r?!1:!!(t&&R(e).isBefore(t,"year")||r&&R(e).isAfter(r,"year"))}function fs(e,t,r,n){const s=e.flat().filter(l=>{var i;return!jr(l,t,r)&&!((i=n==null?void 0:n(l))!=null&&i.disabled)}),o=s.find(l=>{var i;return(i=n==null?void 0:n(l))==null?void 0:i.selected});if(o)return o;const a=s.find(l=>R().isSame(l,"year"));return a||s[0]}function Or(e){const t=e.getFullYear(),r=t-t%10;let n=0;const s=[[],[],[],[]];for(let o=0;o<4;o+=1){const a=o===3?1:3;for(let l=0;l<a;l+=1)s[o].push(new Date(r+n,0)),n+=1}return s}var Lr={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const ds={yearsListFormat:"YYYY",withCellSpacing:!0},vt=_.factory((e,t)=>{const r=_.useProps("YearsList",ds,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,decade:u,yearsListFormat:f,locale:h,minDate:y,maxDate:w,getYearControlProps:b,__staticSelector:m,__getControlRef:d,__onControlKeyDown:p,__onControlClick:g,__onControlMouseEnter:D,__preventFocus:L,__stopPropagation:k,withCellSpacing:v,size:C,...O}=r,F=_.useStyles({name:m||"YearsList",classes:Lr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,rootSelector:"yearsList"}),Y=xe(),V=Or(u),z=fs(V,y,w,b),P=V.map((H,I)=>{const q=H.map((A,U)=>{const E=b==null?void 0:b(A),J=R(A).isSame(z,"year");return S.jsx("td",{...F("yearsListCell"),"data-with-spacing":v||void 0,children:S.jsx(yt,{...F("yearsListControl"),size:C,unstyled:l,"data-mantine-stop-propagation":k||void 0,disabled:jr(A,y,w),ref:j=>d==null?void 0:d(I,U,j),...E,onKeyDown:j=>{var W;(W=E==null?void 0:E.onKeyDown)==null||W.call(E,j),p==null||p(j,{rowIndex:I,cellIndex:U,date:A})},onClick:j=>{var W;(W=E==null?void 0:E.onClick)==null||W.call(E,j),g==null||g(j,A)},onMouseEnter:j=>{var W;(W=E==null?void 0:E.onMouseEnter)==null||W.call(E,j),D==null||D(j,A)},onMouseDown:j=>{var W;(W=E==null?void 0:E.onMouseDown)==null||W.call(E,j),L&&j.preventDefault()},tabIndex:L||!J?-1:0,children:R(A).locale(Y.getLocale(h)).format(f)})},U)});return S.jsx("tr",{...F("yearsListRow"),children:q},I)});return S.jsx(_.Box,{component:"table",ref:t,size:C,...F("yearsList"),...O,children:S.jsx("tbody",{children:P})})});vt.classes=Lr;vt.displayName="@mantine/dates/YearsList";function Rr(e,t,r){return!t&&!r?!1:!!(t&&R(e).isBefore(t,"month")||r&&R(e).isAfter(r,"month"))}function ms(e,t,r,n){const s=e.flat().filter(l=>{var i;return!Rr(l,t,r)&&!((i=n==null?void 0:n(l))!=null&&i.disabled)}),o=s.find(l=>{var i;return(i=n==null?void 0:n(l))==null?void 0:i.selected});if(o)return o;const a=s.find(l=>R().isSame(l,"month"));return a||s[0]}function hs(e){const t=R(e).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let s=0;s<4;s+=1)for(let o=0;o<3;o+=1)r[s].push(R(t).add(n,"months").toDate()),n+=1;return r}var Fr={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const ps={monthsListFormat:"MMM",withCellSpacing:!0},gt=_.factory((e,t)=>{const r=_.useProps("MonthsList",ps,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,__staticSelector:u,year:f,monthsListFormat:h,locale:y,minDate:w,maxDate:b,getMonthControlProps:m,__getControlRef:d,__onControlKeyDown:p,__onControlClick:g,__onControlMouseEnter:D,__preventFocus:L,__stopPropagation:k,withCellSpacing:v,size:C,...O}=r,F=_.useStyles({name:u||"MonthsList",classes:Fr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,rootSelector:"monthsList"}),Y=xe(),V=hs(f),z=ms(V,w,b,m),P=V.map((H,I)=>{const q=H.map((A,U)=>{const E=m==null?void 0:m(A),J=R(A).isSame(z,"month");return S.jsx("td",{...F("monthsListCell"),"data-with-spacing":v||void 0,children:S.jsx(yt,{...F("monthsListControl"),size:C,unstyled:l,__staticSelector:u||"MonthsList","data-mantine-stop-propagation":k||void 0,disabled:Rr(A,w,b),ref:j=>d==null?void 0:d(I,U,j),...E,onKeyDown:j=>{var W;(W=E==null?void 0:E.onKeyDown)==null||W.call(E,j),p==null||p(j,{rowIndex:I,cellIndex:U,date:A})},onClick:j=>{var W;(W=E==null?void 0:E.onClick)==null||W.call(E,j),g==null||g(j,A)},onMouseEnter:j=>{var W;(W=E==null?void 0:E.onMouseEnter)==null||W.call(E,j),D==null||D(j,A)},onMouseDown:j=>{var W;(W=E==null?void 0:E.onMouseDown)==null||W.call(E,j),L&&j.preventDefault()},tabIndex:L||!J?-1:0,children:R(A).locale(Y.getLocale(y)).format(h)})},U)});return S.jsx("tr",{...F("monthsListRow"),children:q},I)});return S.jsx(_.Box,{component:"table",ref:t,size:C,...F("monthsList"),...O,children:S.jsx("tbody",{children:P})})});gt.classes=Fr;gt.displayName="@mantine/dates/MonthsList";var Mr={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const ys={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},vs=_.createVarsResolver((e,{size:t})=>({calendarHeader:{"--dch-control-size":_.getSize(t,"dch-control-size"),"--dch-fz":_.getFontSize(t)}})),Fe=_.factory((e,t)=>{const r=_.useProps("CalendarHeader",ys,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,nextIcon:u,previousIcon:f,nextLabel:h,previousLabel:y,onNext:w,onPrevious:b,onLevelClick:m,label:d,nextDisabled:p,previousDisabled:g,hasNextLevel:D,levelControlAriaLabel:L,withNext:k,withPrevious:v,__staticSelector:C,__preventFocus:O,__stopPropagation:F,...Y}=r,V=_.useStyles({name:C||"CalendarHeader",classes:Mr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:vs,rootSelector:"calendarHeader"}),z=O?P=>P.preventDefault():void 0;return S.jsxs(_.Box,{...V("calendarHeader"),ref:t,...Y,children:[v&&S.jsx(_.UnstyledButton,{...V("calendarHeaderControl"),"data-direction":"previous","aria-label":y,onClick:b,unstyled:l,onMouseDown:z,disabled:g,"data-disabled":g||void 0,tabIndex:O||g?-1:0,"data-mantine-stop-propagation":F||void 0,children:f||S.jsx(_.AccordionChevron,{...V("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),S.jsx(_.UnstyledButton,{component:D?"button":"div",...V("calendarHeaderLevel"),onClick:D?m:void 0,unstyled:l,onMouseDown:D?z:void 0,disabled:!D,"data-static":!D||void 0,"aria-label":L,tabIndex:O||!D?-1:0,"data-mantine-stop-propagation":F||void 0,children:d}),k&&S.jsx(_.UnstyledButton,{...V("calendarHeaderControl"),"data-direction":"next","aria-label":h,onClick:w,unstyled:l,onMouseDown:z,disabled:p,"data-disabled":p||void 0,tabIndex:O||p?-1:0,"data-mantine-stop-propagation":F||void 0,children:u||S.jsx(_.AccordionChevron,{...V("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});Fe.classes=Mr;Fe.displayName="@mantine/dates/CalendarHeader";function gs(e){const t=Or(e);return[t[0][0],t[3][0]]}const bs={decadeLabelFormat:"YYYY"},bt=_.factory((e,t)=>{const r=_.useProps("DecadeLevel",bs,e),{decade:n,locale:s,minDate:o,maxDate:a,yearsListFormat:l,getYearControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,withCellSpacing:w,__preventFocus:b,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,nextDisabled:k,previousDisabled:v,levelControlAriaLabel:C,withNext:O,withPrevious:F,decadeLabelFormat:Y,classNames:V,styles:z,unstyled:P,__staticSelector:H,__stopPropagation:I,size:q,...A}=r,U=xe(),[E,J]=gs(n),j={__staticSelector:H||"DecadeLevel",classNames:V,styles:z,unstyled:P,size:q},W=typeof k=="boolean"?k:a?!R(J).endOf("year").isBefore(a):!1,re=typeof v=="boolean"?v:o?!R(E).startOf("year").isAfter(o):!1,te=(M,G)=>R(M).locale(s||U.locale).format(G);return S.jsxs(_.Box,{"data-decade-level":!0,size:q,ref:t,...A,children:[S.jsx(Fe,{label:typeof Y=="function"?Y(E,J):`${te(E,Y)} – ${te(J,Y)}`,__preventFocus:b,__stopPropagation:I,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,nextDisabled:W,previousDisabled:re,hasNextLevel:!1,levelControlAriaLabel:C,withNext:O,withPrevious:F,...j}),S.jsx(vt,{decade:n,locale:s,minDate:o,maxDate:a,yearsListFormat:l,getYearControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:I,withCellSpacing:w,...j})]})});bt.classes={...vt.classes,...Fe.classes};bt.displayName="@mantine/dates/DecadeLevel";const Ds={yearLabelFormat:"YYYY"},Dt=_.factory((e,t)=>{const r=_.useProps("YearLevel",Ds,e),{year:n,locale:s,minDate:o,maxDate:a,monthsListFormat:l,getMonthControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,withCellSpacing:w,__preventFocus:b,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,onLevelClick:k,nextDisabled:v,previousDisabled:C,hasNextLevel:O,levelControlAriaLabel:F,withNext:Y,withPrevious:V,yearLabelFormat:z,__staticSelector:P,__stopPropagation:H,size:I,classNames:q,styles:A,unstyled:U,...E}=r,J=xe(),j={__staticSelector:P||"YearLevel",classNames:q,styles:A,unstyled:U,size:I},W=typeof v=="boolean"?v:a?!R(n).endOf("year").isBefore(a):!1,re=typeof C=="boolean"?C:o?!R(n).startOf("year").isAfter(o):!1;return S.jsxs(_.Box,{"data-year-level":!0,size:I,ref:t,...E,children:[S.jsx(Fe,{label:typeof z=="function"?z(n):R(n).locale(s||J.locale).format(z),__preventFocus:b,__stopPropagation:H,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,onLevelClick:k,nextDisabled:W,previousDisabled:re,hasNextLevel:O,levelControlAriaLabel:F,withNext:Y,withPrevious:V,...j}),S.jsx(gt,{year:n,locale:s,minDate:o,maxDate:a,monthsListFormat:l,getMonthControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:H,withCellSpacing:w,...j})]})});Dt.classes={...Fe.classes,...gt.classes};Dt.displayName="@mantine/dates/YearLevel";const _s={monthLabelFormat:"MMMM YYYY"},_t=_.factory((e,t)=>{const r=_.useProps("MonthLevel",_s,e),{month:n,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__getDayRef:d,__onDayKeyDown:p,__onDayClick:g,__onDayMouseEnter:D,withCellSpacing:L,highlightToday:k,withWeekNumbers:v,__preventFocus:C,__stopPropagation:O,nextIcon:F,previousIcon:Y,nextLabel:V,previousLabel:z,onNext:P,onPrevious:H,onLevelClick:I,nextDisabled:q,previousDisabled:A,hasNextLevel:U,levelControlAriaLabel:E,withNext:J,withPrevious:j,monthLabelFormat:W,classNames:re,styles:te,unstyled:M,__staticSelector:G,size:X,static:ee,...B}=r,ie=xe(),Z={__staticSelector:G||"MonthLevel",classNames:re,styles:te,unstyled:M,size:X},ue=typeof q=="boolean"?q:h?!R(n).endOf("month").isBefore(h):!1,N=typeof A=="boolean"?A:f?!R(n).startOf("month").isAfter(f):!1;return S.jsxs(_.Box,{"data-month-level":!0,size:X,ref:t,...B,children:[S.jsx(Fe,{label:typeof W=="function"?W(n):R(n).locale(s||ie.locale).format(W),__preventFocus:C,__stopPropagation:O,nextIcon:F,previousIcon:Y,nextLabel:V,previousLabel:z,onNext:P,onPrevious:H,onLevelClick:I,nextDisabled:ue,previousDisabled:N,hasNextLevel:U,levelControlAriaLabel:E,withNext:J,withPrevious:j,...Z}),S.jsx(pt,{month:n,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__getDayRef:d,__onDayKeyDown:p,__onDayClick:g,__onDayMouseEnter:D,__preventFocus:C,__stopPropagation:O,static:ee,withCellSpacing:L,highlightToday:k,withWeekNumbers:v,...Z})]})});_t.classes={...pt.classes,...Fe.classes};_t.displayName="@mantine/dates/MonthLevel";var $r={levelsGroup:"m_30b26e33"};const Ss={},Me=_.factory((e,t)=>{const r=_.useProps("LevelsGroup",Ss,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,__staticSelector:u,...f}=r,h=_.useStyles({name:u||"LevelsGroup",classes:$r,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,rootSelector:"levelsGroup"});return S.jsx(_.Box,{ref:t,...h("levelsGroup"),...f})});Me.classes=$r;Me.displayName="@mantine/dates/LevelsGroup";const xs={numberOfColumns:1},St=_.factory((e,t)=>{const r=_.useProps("DecadeLevelGroup",xs,e),{decade:n,locale:s,minDate:o,maxDate:a,yearsListFormat:l,getYearControlProps:i,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:y,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,nextDisabled:D,previousDisabled:L,classNames:k,styles:v,unstyled:C,__staticSelector:O,__stopPropagation:F,numberOfColumns:Y,levelControlAriaLabel:V,decadeLabelFormat:z,size:P,vars:H,...I}=r,q=x.useRef([]),A=Array(Y).fill(0).map((U,E)=>{const J=R(n).add(E*10,"years").toDate();return S.jsx(bt,{size:P,yearsListFormat:l,decade:J,withNext:E===Y-1,withPrevious:E===0,decadeLabelFormat:z,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(j,W)=>zt({levelIndex:E,rowIndex:W.rowIndex,cellIndex:W.cellIndex,event:j,controlsRef:q}),__getControlRef:(j,W,re)=>{Array.isArray(q.current[E])||(q.current[E]=[]),Array.isArray(q.current[E][j])||(q.current[E][j]=[]),q.current[E][j][W]=re},levelControlAriaLabel:typeof V=="function"?V(J):V,locale:s,minDate:o,maxDate:a,__preventFocus:y,__stopPropagation:F,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,nextDisabled:D,previousDisabled:L,getYearControlProps:i,__staticSelector:O||"DecadeLevelGroup",classNames:k,styles:v,unstyled:C,withCellSpacing:h},E)});return S.jsx(Me,{classNames:k,styles:v,__staticSelector:O||"DecadeLevelGroup",ref:t,size:P,unstyled:C,...I,children:A})});St.classes={...Me.classes,...bt.classes};St.displayName="@mantine/dates/DecadeLevelGroup";const Cs={numberOfColumns:1},xt=_.factory((e,t)=>{const r=_.useProps("YearLevelGroup",Cs,e),{year:n,locale:s,minDate:o,maxDate:a,monthsListFormat:l,getMonthControlProps:i,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:y,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,onLevelClick:D,nextDisabled:L,previousDisabled:k,hasNextLevel:v,classNames:C,styles:O,unstyled:F,__staticSelector:Y,__stopPropagation:V,numberOfColumns:z,levelControlAriaLabel:P,yearLabelFormat:H,size:I,vars:q,...A}=r,U=x.useRef([]),E=Array(z).fill(0).map((J,j)=>{const W=R(n).add(j,"years").toDate();return S.jsx(Dt,{size:I,monthsListFormat:l,year:W,withNext:j===z-1,withPrevious:j===0,yearLabelFormat:H,__stopPropagation:V,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(re,te)=>zt({levelIndex:j,rowIndex:te.rowIndex,cellIndex:te.cellIndex,event:re,controlsRef:U}),__getControlRef:(re,te,M)=>{Array.isArray(U.current[j])||(U.current[j]=[]),Array.isArray(U.current[j][re])||(U.current[j][re]=[]),U.current[j][re][te]=M},levelControlAriaLabel:typeof P=="function"?P(W):P,locale:s,minDate:o,maxDate:a,__preventFocus:y,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,onLevelClick:D,nextDisabled:L,previousDisabled:k,hasNextLevel:v,getMonthControlProps:i,classNames:C,styles:O,unstyled:F,__staticSelector:Y||"YearLevelGroup",withCellSpacing:h},j)});return S.jsx(Me,{classNames:C,styles:O,__staticSelector:Y||"YearLevelGroup",ref:t,size:I,unstyled:F,...A,children:E})});xt.classes={...Dt.classes,...Me.classes};xt.displayName="@mantine/dates/YearLevelGroup";const ws={numberOfColumns:1},Ct=_.factory((e,t)=>{const r=_.useProps("MonthLevelGroup",ws,e),{month:n,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__onDayClick:d,__onDayMouseEnter:p,withCellSpacing:g,highlightToday:D,withWeekNumbers:L,__preventFocus:k,nextIcon:v,previousIcon:C,nextLabel:O,previousLabel:F,onNext:Y,onPrevious:V,onLevelClick:z,nextDisabled:P,previousDisabled:H,hasNextLevel:I,classNames:q,styles:A,unstyled:U,numberOfColumns:E,levelControlAriaLabel:J,monthLabelFormat:j,__staticSelector:W,__stopPropagation:re,size:te,static:M,vars:G,...X}=r,ee=x.useRef([]),B=Array(E).fill(0).map((ie,Z)=>{const ue=R(n).add(Z,"months").toDate();return S.jsx(_t,{month:ue,withNext:Z===E-1,withPrevious:Z===0,monthLabelFormat:j,__stopPropagation:re,__onDayClick:d,__onDayMouseEnter:p,__onDayKeyDown:(N,ne)=>zt({levelIndex:Z,rowIndex:ne.rowIndex,cellIndex:ne.cellIndex,event:N,controlsRef:ee}),__getDayRef:(N,ne,Q)=>{Array.isArray(ee.current[Z])||(ee.current[Z]=[]),Array.isArray(ee.current[Z][N])||(ee.current[Z][N]=[]),ee.current[Z][N][ne]=Q},levelControlAriaLabel:typeof J=="function"?J(ue):J,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__preventFocus:k,nextIcon:v,previousIcon:C,nextLabel:O,previousLabel:F,onNext:Y,onPrevious:V,onLevelClick:z,nextDisabled:P,previousDisabled:H,hasNextLevel:I,classNames:q,styles:A,unstyled:U,__staticSelector:W||"MonthLevelGroup",size:te,static:M,withCellSpacing:g,highlightToday:D,withWeekNumbers:L},Z)});return S.jsx(Me,{classNames:q,styles:A,__staticSelector:W||"MonthLevelGroup",ref:t,size:te,...X,children:B})});Ct.classes={...Me.classes,..._t.classes};Ct.displayName="@mantine/dates/MonthLevelGroup";var Ar={input:"m_6fa5e2aa"};const ks={},wt=_.factory((e,t)=>{const{inputProps:r,wrapperProps:n,placeholder:s,classNames:o,styles:a,unstyled:l,popoverProps:i,modalProps:u,dropdownType:f,children:h,formattedValue:y,dropdownHandlers:w,dropdownOpened:b,onClick:m,clearable:d,onClear:p,clearButtonProps:g,rightSection:D,shouldClear:L,readOnly:k,disabled:v,value:C,name:O,form:F,type:Y,...V}=_.useInputProps("PickerInputBase",ks,e),z=S.jsx(_.Input.ClearButton,{onClick:p,unstyled:l,...g}),P=()=>{Y==="range"&&Array.isArray(C)&&C[0]&&!C[1]&&p(),w.close()};return S.jsxs(S.Fragment,{children:[f==="modal"&&!k&&S.jsx(_.Modal,{opened:b,onClose:P,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:l,...u,children:h}),S.jsx(_.Input.Wrapper,{...n,children:S.jsxs(_.Popover,{position:"bottom-start",opened:b,trapFocus:!0,returnFocus:!1,unstyled:l,...i,disabled:(i==null?void 0:i.disabled)||f==="modal"||k,onChange:H=>{var I;H||((I=i==null?void 0:i.onClose)==null||I.call(i),P())},children:[S.jsx(_.Popover.Target,{children:S.jsx(_.Input,{"data-dates-input":!0,"data-read-only":k||void 0,disabled:v,component:"button",type:"button",multiline:!0,onClick:H=>{m==null||m(H),w.toggle()},__clearSection:z,__clearable:d&&L&&!k&&!v,rightSection:D,...r,ref:t,classNames:{...o,input:_r(Ar.input,o==null?void 0:o.input)},...V,children:y||S.jsx(_.Input.Placeholder,{error:r.error,unstyled:l,className:o==null?void 0:o.placeholder,style:a==null?void 0:a.placeholder,children:s})})}),S.jsx(_.Popover.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),S.jsx(It,{value:C,name:O,form:F,type:Y})]})});wt.classes=Ar;wt.displayName="@mantine/dates/PickerInputBase";const hr=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function Xe({type:e,value:t,defaultValue:r,onChange:n,applyTimezone:s=!0}){const o=x.useRef(e),a=xe(),[l,i,u]=vr({value:Te("add",t,a.getTimezone(),!s),defaultValue:Te("add",r,a.getTimezone(),!s),finalValue:hr(e),onChange:h=>{n==null||n(Te("remove",h,a.getTimezone(),!s))}});let f=l;if(o.current!==e){if(o.current=e,t===void 0)f=r!==void 0?r:hr(e),i(f);else if(process.env.NODE_ENV==="development")switch(e){case"default":t!==null&&typeof t!="string"&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `null` or `string`");break;case"multiple":t instanceof Array||console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `string[]`");break;case"range":(!(t instanceof Array)||t.length!==2)&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `[string, string]`");break}}return[f,i,u]}function Mt(e,t){return e?e==="month"?0:e==="year"?1:2:t||0}function Es(e){return e===0?"month":e===1?"year":"decade"}function Je(e,t,r){return Es(vn(Mt(e,0),Mt(t,0),Mt(r,2)))}const Ts={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Ie=_.factory((e,t)=>{const r=_.useProps("Calendar",Ts,e),{vars:n,maxLevel:s,minLevel:o,defaultLevel:a,level:l,onLevelChange:i,date:u,defaultDate:f,onDateChange:h,numberOfColumns:y,columnsToScroll:w,ariaLabels:b,nextLabel:m,previousLabel:d,onYearSelect:p,onMonthSelect:g,onYearMouseEnter:D,onMonthMouseEnter:L,__updateDateOnYearSelect:k,__updateDateOnMonthSelect:v,firstDayOfWeek:C,weekdayFormat:O,weekendDays:F,getDayProps:Y,excludeDate:V,renderDay:z,hideOutsideDates:P,hideWeekdays:H,getDayAriaLabel:I,monthLabelFormat:q,nextIcon:A,previousIcon:U,__onDayClick:E,__onDayMouseEnter:J,withCellSpacing:j,highlightToday:W,withWeekNumbers:re,monthsListFormat:te,getMonthControlProps:M,yearLabelFormat:G,yearsListFormat:X,getYearControlProps:ee,decadeLabelFormat:B,classNames:ie,styles:Z,unstyled:ue,minDate:N,maxDate:ne,locale:Q,__staticSelector:ce,size:Ce,__preventFocus:De,__stopPropagation:he,onNextDecade:Oe,onPreviousDecade:$e,onNextYear:oe,onPreviousYear:_e,onNextMonth:we,onPreviousMonth:je,static:Ae,__timezoneApplied:Ne,...Et}=r,{resolvedClassNames:tt,resolvedStyles:rt}=_.useResolvedStylesApi({classNames:ie,styles:Z,props:r}),[He,Ve]=vr({value:l?Je(l,o,s):void 0,defaultValue:a?Je(a,o,s):void 0,finalValue:Je(void 0,o,s),onChange:i}),[Tt,Ee]=Xe({type:"default",value:u,defaultValue:f,onChange:h,applyTimezone:!Ne}),Be={__staticSelector:ce||"Calendar",styles:rt,classNames:tt,unstyled:ue,size:Ce},jt=xe(),Le=w||y||1,Pe=new Date,nt=N&&N>Pe?N:Pe,ge=Tt||Te("add",nt,jt.getTimezone()),Ue=()=>{const de=R(ge).add(Le,"month").toDate();we==null||we(de),Ee(de)},qe=()=>{const de=R(ge).subtract(Le,"month").toDate();je==null||je(de),Ee(de)},st=()=>{const de=R(ge).add(Le,"year").toDate();oe==null||oe(de),Ee(de)},Ot=()=>{const de=R(ge).subtract(Le,"year").toDate();_e==null||_e(de),Ee(de)},at=()=>{const de=R(ge).add(10*Le,"year").toDate();Oe==null||Oe(de),Ee(de)},Lt=()=>{const de=R(ge).subtract(10*Le,"year").toDate();$e==null||$e(de),Ee(de)};return S.jsxs(_.Box,{ref:t,size:Ce,"data-calendar":!0,...Et,children:[He==="month"&&S.jsx(Ct,{month:ge,minDate:N,maxDate:ne,firstDayOfWeek:C,weekdayFormat:O,weekendDays:F,getDayProps:Y,excludeDate:V,renderDay:z,hideOutsideDates:P,hideWeekdays:H,getDayAriaLabel:I,onNext:Ue,onPrevious:qe,hasNextLevel:s!=="month",onLevelClick:()=>Ve("year"),numberOfColumns:y,locale:Q,levelControlAriaLabel:b==null?void 0:b.monthLevelControl,nextLabel:(b==null?void 0:b.nextMonth)??m,nextIcon:A,previousLabel:(b==null?void 0:b.previousMonth)??d,previousIcon:U,monthLabelFormat:q,__onDayClick:E,__onDayMouseEnter:J,__preventFocus:De,__stopPropagation:he,static:Ae,withCellSpacing:j,highlightToday:W,withWeekNumbers:re,...Be}),He==="year"&&S.jsx(xt,{year:ge,numberOfColumns:y,minDate:N,maxDate:ne,monthsListFormat:te,getMonthControlProps:M,locale:Q,onNext:st,onPrevious:Ot,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>Ve("decade"),levelControlAriaLabel:b==null?void 0:b.yearLevelControl,nextLabel:(b==null?void 0:b.nextYear)??m,nextIcon:A,previousLabel:(b==null?void 0:b.previousYear)??d,previousIcon:U,yearLabelFormat:G,__onControlMouseEnter:L,__onControlClick:(de,Re)=>{v&&Ee(Re),Ve(Je("month",o,s)),g==null||g(Re)},__preventFocus:De,__stopPropagation:he,withCellSpacing:j,...Be}),He==="decade"&&S.jsx(St,{decade:ge,minDate:N,maxDate:ne,yearsListFormat:X,getYearControlProps:ee,locale:Q,onNext:at,onPrevious:Lt,numberOfColumns:y,nextLabel:(b==null?void 0:b.nextDecade)??m,nextIcon:A,previousLabel:(b==null?void 0:b.previousDecade)??d,previousIcon:U,decadeLabelFormat:B,__onControlMouseEnter:D,__onControlClick:(de,Re)=>{k&&Ee(Re),Ve(Je("year",o,s)),p==null||p(Re)},__preventFocus:De,__stopPropagation:he,withCellSpacing:j,...Be})]})});Ie.classes={...St.classes,...xt.classes,...Ct.classes};Ie.displayName="@mantine/dates/Calendar";function Nr(e){const{maxLevel:t,minLevel:r,defaultLevel:n,level:s,onLevelChange:o,nextIcon:a,previousIcon:l,date:i,defaultDate:u,onDateChange:f,numberOfColumns:h,columnsToScroll:y,ariaLabels:w,nextLabel:b,previousLabel:m,onYearSelect:d,onMonthSelect:p,onYearMouseEnter:g,onMonthMouseEnter:D,onNextMonth:L,onPreviousMonth:k,onNextYear:v,onPreviousYear:C,onNextDecade:O,onPreviousDecade:F,withCellSpacing:Y,highlightToday:V,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:P,withWeekNumbers:H,firstDayOfWeek:I,weekdayFormat:q,weekendDays:A,getDayProps:U,excludeDate:E,renderDay:J,hideOutsideDates:j,hideWeekdays:W,getDayAriaLabel:re,monthLabelFormat:te,monthsListFormat:M,getMonthControlProps:G,yearLabelFormat:X,yearsListFormat:ee,getYearControlProps:B,decadeLabelFormat:ie,allowSingleDateInRange:Z,allowDeselect:ue,minDate:N,maxDate:ne,locale:Q,...ce}=e;return{calendarProps:{maxLevel:t,minLevel:r,defaultLevel:n,level:s,onLevelChange:o,nextIcon:a,previousIcon:l,date:i,defaultDate:u,onDateChange:f,numberOfColumns:h,columnsToScroll:y,ariaLabels:w,nextLabel:b,previousLabel:m,onYearSelect:d,onMonthSelect:p,onYearMouseEnter:g,onMonthMouseEnter:D,onNextMonth:L,onPreviousMonth:k,onNextYear:v,onPreviousYear:C,onNextDecade:O,onPreviousDecade:F,withCellSpacing:Y,highlightToday:V,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:P,withWeekNumbers:H,firstDayOfWeek:I,weekdayFormat:q,weekendDays:A,getDayProps:U,excludeDate:E,renderDay:J,hideOutsideDates:j,hideWeekdays:W,getDayAriaLabel:re,monthLabelFormat:te,monthsListFormat:M,getMonthControlProps:G,yearLabelFormat:X,yearsListFormat:ee,getYearControlProps:B,decadeLabelFormat:ie,allowSingleDateInRange:Z,allowDeselect:ue,minDate:N,maxDate:ne,locale:Q},others:ce}}function pr(e,t){const r=[...t].sort((n,s)=>n.getTime()-s.getTime());return R(r[0]).startOf("day").subtract(1,"ms").isBefore(e)&&R(r[1]).endOf("day").add(1,"ms").isAfter(e)}function js({type:e,level:t,value:r,defaultValue:n,onChange:s,allowSingleDateInRange:o,allowDeselect:a,onMouseLeave:l,applyTimezone:i=!0}){const[u,f]=Xe({type:e,value:r,defaultValue:n,onChange:s,applyTimezone:i}),[h,y]=x.useState(e==="range"&&u[0]&&!u[1]?u[0]:null),[w,b]=x.useState(null),m=v=>{if(e==="range"){if(h instanceof Date&&!u[1]){if(R(v).isSame(h,t)&&!o){y(null),b(null),f([null,null]);return}const C=[v,h];C.sort((O,F)=>O.getTime()-F.getTime()),f(C),b(null),y(null);return}if(u[0]&&!u[1]&&R(v).isSame(u[0],t)&&!o){y(null),b(null),f([null,null]);return}f([v,null]),b(null),y(v);return}if(e==="multiple"){u.some(C=>R(C).isSame(v,t))?f(u.filter(C=>!R(C).isSame(v,t))):f([...u,v]);return}u&&a&&R(v).isSame(u,t)?f(null):f(v)},d=v=>h instanceof Date&&w instanceof Date?pr(v,[w,h]):u[0]instanceof Date&&u[1]instanceof Date?pr(v,u):!1,p=e==="range"?v=>{l==null||l(v),b(null)}:l,g=v=>u[0]instanceof Date&&R(v).isSame(u[0],t)?!(w&&R(w).isBefore(u[0])):!1,D=v=>u[1]instanceof Date?R(v).isSame(u[1],t):!(u[0]instanceof Date)||!w?!1:R(w).isBefore(u[0])&&R(v).isSame(u[0],t),L=v=>{if(e==="range")return{selected:u.some(O=>O&&R(O).isSame(v,t)),inRange:d(v),firstInRange:g(v),lastInRange:D(v),"data-autofocus":!!u[0]&&R(u[0]).isSame(v,t)||void 0};if(e==="multiple")return{selected:u.some(O=>O&&R(O).isSame(v,t)),"data-autofocus":!!u[0]&&R(u[0]).isSame(v,t)||void 0};const C=R(u).isSame(v,t);return{selected:C,"data-autofocus":C||void 0}},k=e==="range"&&h?b:()=>{};return x.useEffect(()=>{if(e==="range")if(u[0]&&!u[1]&&(h==null?void 0:h.getTime())!==u[0].getTime())y(u[0]);else{const v=u[0]==null&&u[1]==null,C=u[0]!=null&&u[1]!=null;(v||C)&&(y(null),b(null))}},[u]),{onDateChange:m,onRootMouseLeave:p,onHoveredDateChange:k,getControlProps:L,_value:u,setValue:f}}const Os={type:"default",defaultLevel:"month",numberOfColumns:1},kt=_.factory((e,t)=>{const r=_.useProps("DatePicker",Os,e),{classNames:n,styles:s,vars:o,type:a,defaultValue:l,value:i,onChange:u,__staticSelector:f,getDayProps:h,allowSingleDateInRange:y,allowDeselect:w,onMouseLeave:b,numberOfColumns:m,hideOutsideDates:d,__onDayMouseEnter:p,__onDayClick:g,__timezoneApplied:D,...L}=r,{onDateChange:k,onRootMouseLeave:v,onHoveredDateChange:C,getControlProps:O}=js({type:a,level:"day",allowDeselect:w,allowSingleDateInRange:y,value:i,defaultValue:l,onChange:u,onMouseLeave:b,applyTimezone:!D}),{resolvedClassNames:F,resolvedStyles:Y}=_.useResolvedStylesApi({classNames:n,styles:s,props:r}),V=xe();return S.jsx(Ie,{ref:t,minLevel:"month",classNames:F,styles:Y,__staticSelector:f||"DatePicker",onMouseLeave:v,numberOfColumns:m,hideOutsideDates:d??m!==1,__onDayMouseEnter:(z,P)=>{C(P),p==null||p(z,P)},__onDayClick:(z,P)=>{k(P),g==null||g(z,P)},getDayProps:z=>({...O(z),...h==null?void 0:h(z)}),...L,date:Te("add",L.date,V.getTimezone(),D),__timezoneApplied:!0})});kt.classes=Ie.classes;kt.displayName="@mantine/dates/DatePicker";function Ls(e,t){if(e===null)return null;const r=Te("add",new Date(e),t);return Number.isNaN(r.getTime())||!e?null:r}function Rs({date:e,maxDate:t,minDate:r}){return!(e==null||Number.isNaN(e.getTime())||t&&R(e).isAfter(t,"date")||r&&R(e).isBefore(r,"date"))}const Fs={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},Ut=_.factory((e,t)=>{const r=_.useInputProps("DateInput",Fs,e),{inputProps:n,wrapperProps:s,value:o,defaultValue:a,onChange:l,clearable:i,clearButtonProps:u,popoverProps:f,getDayProps:h,locale:y,valueFormat:w,dateParser:b,minDate:m,maxDate:d,fixOnBlur:p,onFocus:g,onBlur:D,onClick:L,readOnly:k,name:v,form:C,rightSection:O,unstyled:F,classNames:Y,styles:V,allowDeselect:z,preserveTime:P,date:H,defaultDate:I,onDateChange:q,...A}=r,U=x.useRef(null),E=x.useRef(null),[J,j]=x.useState(!1),{calendarProps:W,others:re}=Nr(A),te=xe(),G=b||(oe=>{const _e=R(oe,w,te.getLocale(y)).toDate();return Number.isNaN(_e.getTime())?Ls(oe,te.getTimezone()):_e}),X=z!==void 0?z:i,ee=oe=>oe?R(oe).locale(te.getLocale(y)).format(w):"",[B,ie,Z]=Xe({type:"default",value:o,defaultValue:a,onChange:l}),[ue,N]=Xe({type:"default",value:H,defaultValue:a||I,onChange:q});x.useEffect(()=>{Z&&o!==null&&N(o)},[Z,o]);const[ne,Q]=x.useState(ee(B));x.useEffect(()=>{Q(ee(B))},[te.getLocale(y)]);const ce=oe=>{const _e=oe.currentTarget.value;if(Q(_e),j(!0),_e.trim()===""&&i)ie(null);else{const we=G(_e);Rs({date:we,minDate:m,maxDate:d})&&(ie(we),N(we))}},Ce=oe=>{D==null||D(oe),j(!1),p&&Q(ee(B))},De=oe=>{g==null||g(oe),j(!0)},he=oe=>{L==null||L(oe),j(!0)},Oe=oe=>({...h==null?void 0:h(oe),selected:R(B).isSame(oe,"day"),onClick:_e=>{var Ae,Ne;(Ne=h==null?void 0:(Ae=h(oe)).onClick)==null||Ne.call(Ae,_e);const we=P?Pt(B,oe):oe,je=i&&X&&R(B).isSame(oe,"day")?null:we;ie(je),!Z&&Q(ee(je)),j(!1)}}),$e=O||(i&&B&&!k?S.jsx(_.CloseButton,{variant:"transparent",onMouseDown:oe=>oe.preventDefault(),tabIndex:-1,onClick:()=>{ie(null),!Z&&Q(""),j(!1)},unstyled:F,size:n.size||"sm",...u}):null);return Vt(()=>{B!==void 0&&!J&&Q(ee(B))},[B]),_n(()=>j(!1),void 0,[U.current,E.current]),S.jsxs(S.Fragment,{children:[S.jsx(_.Input.Wrapper,{...s,__staticSelector:"DateInput",ref:U,children:S.jsxs(_.Popover,{opened:J,trapFocus:!1,position:"bottom-start",disabled:k,withRoles:!1,unstyled:F,...f,children:[S.jsx(_.Popover.Target,{children:S.jsx(_.Input,{"data-dates-input":!0,"data-read-only":k||void 0,autoComplete:"off",ref:t,value:ne,onChange:ce,onBlur:Ce,onFocus:De,onClick:he,readOnly:k,rightSection:$e,...n,...re,__staticSelector:"DateInput"})}),S.jsx(_.Popover.Dropdown,{onMouseDown:oe=>oe.preventDefault(),"data-dates-dropdown":!0,ref:E,children:S.jsx(Ie,{__staticSelector:"DateInput",__timezoneApplied:!0,...W,classNames:Y,styles:V,unstyled:F,__preventFocus:!0,minDate:m,maxDate:d,locale:y,getDayProps:Oe,size:n.size,date:ue,onDateChange:N})})]})}),S.jsx(It,{name:v,form:C,value:B,type:"default"})]})});Ut.classes={..._.Input.classes,...Ie.classes};Ut.displayName="@mantine/dates/DateInput";var Yr={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const Ms={dropdownType:"popover"},qt=_.factory((e,t)=>{const r=_.useProps("DateTimePicker",Ms,e),{value:n,defaultValue:s,onChange:o,valueFormat:a,locale:l,classNames:i,styles:u,unstyled:f,timeInputProps:h,submitButtonProps:y,withSeconds:w,level:b,defaultLevel:m,size:d,variant:p,dropdownType:g,vars:D,minDate:L,maxDate:k,...v}=r,C=_.useStyles({name:"DateTimePicker",classes:Yr,props:r,classNames:i,styles:u,unstyled:f,vars:D}),{resolvedClassNames:O,resolvedStyles:F}=_.useResolvedStylesApi({classNames:i,styles:u,props:r}),Y=a||(w?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),V=x.useRef(null),z=xn(V,h==null?void 0:h.ref),{calendarProps:{allowSingleDateInRange:P,...H},others:I}=Nr(v),q=xe(),[A,U]=Xe({type:"default",value:n,defaultValue:s,onChange:o}),E=N=>N?R(N).format(w?"HH:mm:ss":"HH:mm"):"",[J,j]=x.useState(E(A)),[W,re]=x.useState(b||m||"month"),[te,M]=Cn(!1),G=A?R(A).locale(q.getLocale(l)).tz(q.getTimezone(),!0).format(Y):"",X=N=>{var Q;(Q=h==null?void 0:h.onChange)==null||Q.call(h,N);const ne=N.currentTarget.value;if(j(ne),ne){const[ce,Ce,De]=ne.split(":").map(Number),he=Te("add",new Date,q.getTimezone());he.setHours(ce),he.setMinutes(Ce),he.setSeconds(De||0),he.setMilliseconds(0),U(Pt(he,A||Te("add",new Date,q.getTimezone())))}},ee=N=>{var ne;N&&U(Pt(A,N)),(ne=V.current)==null||ne.focus()},B=N=>{var ne;(ne=h==null?void 0:h.onKeyDown)==null||ne.call(h,N),N.key==="Enter"&&(N.preventDefault(),M.close())};Vt(()=>{te||j(E(A))},[A,te]),Vt(()=>{te&&re("month")},[te]);const ie=L?R(L).format("HH:mm:ss"):null,Z=k?R(k).format("HH:mm:ss"):null,ue=g==="popover";return S.jsxs(wt,{formattedValue:G,dropdownOpened:v.disabled?!1:te,dropdownHandlers:M,classNames:O,styles:F,unstyled:f,ref:t,onClear:()=>U(null),shouldClear:!!A,value:A,size:d,variant:p,dropdownType:g,...I,type:"default",__staticSelector:"DateTimePicker",children:[S.jsx(kt,{...H,maxDate:k,minDate:L,size:d,variant:p,type:"default",value:A,defaultDate:A,onChange:ee,locale:l,classNames:O,styles:F,unstyled:f,__staticSelector:"DateTimePicker",__stopPropagation:ue,level:b,defaultLevel:m,onLevelChange:N=>{var ne;re(N),(ne=H.onLevelChange)==null||ne.call(H,N)},__timezoneApplied:!0}),W==="month"&&S.jsxs("div",{...C("timeWrapper"),children:[S.jsx(ht,{value:J,withSeconds:w,ref:z,unstyled:f,minTime:A&&L&&A.toDateString()===L.toDateString()?ie??void 0:void 0,maxTime:A&&k&&A.toDateString()===k.toDateString()?Z??void 0:void 0,...h,...C("timeInput",{className:h==null?void 0:h.className,style:h==null?void 0:h.style}),onChange:X,onKeyDown:B,size:d,"data-mantine-stop-propagation":ue||void 0}),S.jsx(_.ActionIcon,{variant:"default",size:`input-${d||"sm"}`,...C("submitButton",{className:y==null?void 0:y.className,style:y==null?void 0:y.style}),unstyled:f,"data-mantine-stop-propagation":ue||void 0,children:S.jsx(_.CheckIcon,{size:"30%"}),...y,onClick:N=>{var ne;(ne=y==null?void 0:y.onClick)==null||ne.call(y,N),M.close()}})]})]})});qt.classes={...Yr,...wt.classes,...kt.classes};qt.displayName="@mantine/dates/DateTimePicker";R.extend(gr);const $s=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(Ut,{name:t,onChange:o=>r(t,o),value:n,readOnly:s,valueFormat:"YYYY-MM-DD",clearable:!0})};R.extend(gr);const As=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(qt,{name:t,onChange:o=>r(t,o),value:n,readOnly:s,valueFormat:"YYYY-MM-DD HH:mm:ss",clearable:!0})},Ns=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(_.NumberInput,{name:t,onChange:o=>r(t,o),value:n,readOnly:s})},Ys=e=>{const{fields:t,name:r,onChange:n,value:s,formValues:o,error:a={},readOnly:l}=e,i=(f,h)=>{n(`${r}.${f}`,h)};return t.map((f,h)=>S.jsx(Gt,{field:f,formValues:o,onChange:i,value:s[f.name],error:a[f.name],readOnly:l},h))},Vs=e=>{const{data:t,name:r,onChange:n,value:s,readOnly:o}=e;return S.jsx(_.Select,{name:r,data:t,value:s,onChange:a=>n(r,a),readOnly:o,clearable:!0})},Ps=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(_.Textarea,{name:t,onChange:o=>r(t,o.target.value),value:n,readOnly:s,styles:{input:{height:200}}})},Ws=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(_.TextInput,{name:t,onChange:o=>r(t,o.target.value),value:n,readOnly:s})},zs=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e,o=x.useRef(null),a=S.jsx(_.ActionIcon,{variant:"subtle",color:"gray",onClick:()=>{var l;return(l=o.current)==null?void 0:l.showPicker()},children:"🕛"});return S.jsx(ht,{name:t,onChange:l=>r(t,l.target.value),value:n,readOnly:s,ref:o,rightSection:a,withSeconds:!0})};function Is(e,t,r){return{addElement:n=>{t(e,[...r,n])},replaceElement:(n,s)=>{const o=r.map((a,l)=>l===n?s:a);t(e,o)},removeElement:n=>{t(e,r.filter((s,o)=>o!==n))}}}const Gt=({field:e,value:t,error:r,onChange:n,formValues:s,fieldContainer:o=i=>S.jsx(S.Fragment,{children:i}),customRender:a,readOnly:l})=>{const i=x.useMemo(()=>typeof e.visible=="function"?e.visible(s):e.visible!==!1,[e.visible,s]),u=x.useMemo(()=>typeof e.disabled=="function"?e.disabled(s):e.disabled===!0,[e.disabled,s]),f=x.useMemo(()=>{if(e.type==="array")return Is(e.name,n,t)},[e.type,e.name,n,t]),h=x.useMemo(()=>a==null?void 0:a(e,t,r,n,s,f,l||e.readOnly),[a,e,t,r,n,s,f,l,e.readOnly]);if(!i)return null;if(h)return h;const y=()=>{switch(e.type){case"text":return S.jsx(Ws,{name:e.name,value:t,onChange:n,readOnly:l});case"number":return S.jsx(Ns,{name:e.name,value:t,onChange:n,readOnly:l});case"object":return S.jsx(Ys,{name:e.name,onChange:n,value:t,fields:e.fields??[],formValues:s,error:r,readOnly:l});case"array":return S.jsx(wn,{name:e.name,onChange:n,value:t,fields:e.fields,options:f,error:r,readOnly:l});case"check":return S.jsx(kn,{name:e.name,value:t,onChange:n,readOnly:l,label:e.label});case"select":return S.jsx(Vs,{name:e.name,value:t,onChange:n,readOnly:l,data:e.data});case"textarea":return S.jsx(Ps,{name:e.name,value:t,onChange:n,readOnly:l});case"date":return S.jsx($s,{name:e.name,value:t,onChange:n,readOnly:l});case"datetime":return S.jsx(As,{name:e.name,value:t,onChange:n,readOnly:l});case"time":return S.jsx(zs,{name:e.name,value:t,onChange:n,readOnly:l});default:return null}},w=S.jsxs(_.Fieldset,{legend:e.type==="check"?void 0:e.label,variant:"unstyled",disabled:u||l,styles:{legend:{fontWeight:500}},children:[y(),!["object","array"].includes(e.type)&&typeof r=="string"&&S.jsx(_.Text,{c:"red",fz:"sm",fw:500,children:r})]});return o(w,e)},[Hs,Zs,Bs]=yn(),Us=e=>{switch(e){case"number":return 0;case"array":return[];case"check":return!1;case"object":return{};case"select":case"date":case"datetime":return null;default:return""}},Vr=e=>{const t={};for(const r of e)r.type==="object"&&r.fields?t[r.name]=Vr(r.fields):t[r.name]=r.initialValue??Us(r.type);return t},qs=e=>e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0,Wt=(e,t,r="")=>{const n={};for(const s of e){const o=r?`${r}.${s.name}`:s.name,a=t==null?void 0:t[s.name];if(s.type==="object")Object.assign(n,Wt(s.fields,a||{},o));else if(s.type==="array"){if(s.required&&(!Array.isArray(a)||a.length===0)){n[o]=s.name+" is required";continue}Array.isArray(a)&&a.forEach((l,i)=>{Object.assign(n,Wt(s.fields,l,`${o}.${i}`))})}else s.required&&qs(a)&&(n[o]=s.name+" is required")}return n};function Gs(e){const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.split(".");let o=t;s.forEach((a,l)=>{const i=l===s.length-1;s[l+1],i?o[a]=n:(a in o||(o[a]={}),o=o[a])})}),t}const Ks=({onSubmit:e,schema:t,container:r,fieldContainer:n,customRender:s,validate:o,readOnly:a,values:l,onFieldChange:i})=>{const u=Bs({mode:"uncontrolled",initialValues:Vr(t),validate:o}),f=x.useMemo(()=>u.getValues(),[u.getValues()]),h=Dn((m,d)=>{if(u.setFieldValue(m,d),i){const p=i(m,d,f);u.setValues(p)}},0),y=x.useCallback((m,d)=>{const p=u.errors;return m==="object"||m==="array"?Gs(p)[d]:p[d]},[u.errors]),w=x.useCallback(()=>{const m=u.getValues(),d=Wt(t,m);if(Object.keys(d).length>0){u.setErrors(d);return}u.onSubmit(e)()},[u,e,t]);x.useEffect(()=>{l&&u.initialize(l)},[l]);const b=S.jsx(Hs,{form:u,children:t.map((m,d)=>S.jsx(Gt,{field:m,formValues:f,value:f[m.name],error:y(m.type,m.name),onChange:h,fieldContainer:n,customRender:s,readOnly:m.readOnly||a},d))});return r(b,w,a)};exports.AutoForm=Ks;
|