@alepha/devtools 0.14.3 → 0.14.4
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/assets/devtools/actions.html +37 -0
- package/assets/devtools/actions.html.br +0 -0
- package/assets/devtools/actions.html.gz +0 -0
- package/assets/devtools/asset.BZV40eAE.css.br +0 -0
- package/assets/devtools/asset.BZV40eAE.css.gz +0 -0
- package/assets/devtools/asset.DbJSgVPr.css.br +0 -0
- package/assets/devtools/asset.DbJSgVPr.css.gz +0 -0
- package/assets/devtools/atoms.html +37 -0
- package/assets/devtools/atoms.html.br +0 -0
- package/assets/devtools/atoms.html.gz +0 -0
- package/assets/devtools/caches.html +37 -0
- package/assets/devtools/caches.html.br +0 -0
- package/assets/devtools/caches.html.gz +0 -0
- package/assets/devtools/{chunk.XsVAJU_N.js → chunk.5EOPWu_h.js} +1 -1
- package/assets/devtools/chunk.5EOPWu_h.js.br +0 -0
- package/assets/devtools/chunk.5EOPWu_h.js.gz +0 -0
- package/assets/devtools/{chunk.Dwv4A_H_.js → chunk.B-FEo0lV.js} +1 -1
- package/assets/devtools/chunk.B-FEo0lV.js.br +0 -0
- package/assets/devtools/chunk.B-FEo0lV.js.gz +0 -0
- package/assets/devtools/{chunk.I1TSx4X4.js → chunk.BCBZ1wAk.js} +1 -1
- package/assets/devtools/chunk.BCBZ1wAk.js.br +0 -0
- package/assets/devtools/chunk.BCBZ1wAk.js.gz +0 -0
- package/assets/devtools/{chunk.ChDpavl2.js → chunk.BKZ6YEV4.js} +1 -1
- package/assets/devtools/chunk.BKZ6YEV4.js.br +0 -0
- package/assets/devtools/chunk.BKZ6YEV4.js.gz +0 -0
- package/assets/devtools/{chunk.DN-SKgAD.js → chunk.BQQ5nN1l.js} +1 -1
- package/assets/devtools/chunk.BQQ5nN1l.js.br +0 -0
- package/assets/devtools/chunk.BQQ5nN1l.js.gz +0 -0
- package/assets/devtools/{chunk.CAWWjC4E.js → chunk.BX7p74D8.js} +1 -1
- package/assets/devtools/chunk.BX7p74D8.js.br +0 -0
- package/assets/devtools/chunk.BX7p74D8.js.gz +0 -0
- package/assets/devtools/{chunk.DF8tZYh8.js → chunk.BZpSlmHc.js} +1 -1
- package/assets/devtools/chunk.BZpSlmHc.js.br +0 -0
- package/assets/devtools/chunk.BZpSlmHc.js.gz +0 -0
- package/assets/devtools/{chunk.DcaVw31J.js → chunk.BgMi2Pqe.js} +1 -1
- package/assets/devtools/chunk.BgMi2Pqe.js.br +0 -0
- package/assets/devtools/chunk.BgMi2Pqe.js.gz +0 -0
- package/assets/devtools/chunk.BjFrJKj1.js.br +2 -0
- package/assets/devtools/chunk.BjFrJKj1.js.gz +0 -0
- package/assets/devtools/{chunk.ByuRJbSC.js → chunk.BjOMCPQ3.js} +1 -1
- package/assets/devtools/chunk.BjOMCPQ3.js.br +0 -0
- package/assets/devtools/chunk.BjOMCPQ3.js.gz +0 -0
- package/assets/devtools/chunk.BlqFPyLh.js.br +0 -0
- package/assets/devtools/chunk.BlqFPyLh.js.gz +0 -0
- package/assets/devtools/{chunk.DLDchrhP.js → chunk.BqEqrty9.js} +1 -1
- package/assets/devtools/chunk.BqEqrty9.js.br +0 -0
- package/assets/devtools/chunk.BqEqrty9.js.gz +0 -0
- package/assets/devtools/{chunk.BPjMdorr.js → chunk.BuGWOypT.js} +1 -1
- package/assets/devtools/chunk.BuGWOypT.js.br +0 -0
- package/assets/devtools/chunk.BuGWOypT.js.gz +0 -0
- package/assets/devtools/{chunk.UAANdYnt.js → chunk.C3geCUq9.js} +1 -1
- package/assets/devtools/chunk.C3geCUq9.js.br +0 -0
- package/assets/devtools/chunk.C3geCUq9.js.gz +0 -0
- package/assets/devtools/{chunk.BjjA59Pf.js → chunk.CEbDj1NR.js} +1 -1
- package/assets/devtools/chunk.CEbDj1NR.js.br +0 -0
- package/assets/devtools/chunk.CEbDj1NR.js.gz +0 -0
- package/assets/devtools/{chunk.BC4Lys4j.js → chunk.CIYikik4.js} +1 -1
- package/assets/devtools/chunk.CIYikik4.js.br +0 -0
- package/assets/devtools/chunk.CIYikik4.js.gz +0 -0
- package/assets/devtools/{chunk.Bdi_dTor.js → chunk.CQO49DQF.js} +1 -1
- package/assets/devtools/chunk.CQO49DQF.js.br +0 -0
- package/assets/devtools/chunk.CQO49DQF.js.gz +0 -0
- package/assets/devtools/{chunk.C1yl87Yo.js → chunk.CWwJDVEM.js} +1 -1
- package/assets/devtools/chunk.CWwJDVEM.js.br +0 -0
- package/assets/devtools/chunk.CWwJDVEM.js.gz +0 -0
- package/assets/devtools/{chunk.CYVZxO-p.js → chunk.CZ4J9K5b.js} +1 -1
- package/assets/devtools/chunk.CZ4J9K5b.js.br +4 -0
- package/assets/devtools/chunk.CZ4J9K5b.js.gz +0 -0
- package/assets/devtools/{chunk.mJxmm31y.js → chunk.CoD2sLa1.js} +1 -1
- package/assets/devtools/chunk.CoD2sLa1.js.br +0 -0
- package/assets/devtools/chunk.CoD2sLa1.js.gz +0 -0
- package/assets/devtools/{chunk.CQ8PqHT0.js → chunk.CsxSstrk.js} +1 -1
- package/assets/devtools/chunk.CsxSstrk.js.br +0 -0
- package/assets/devtools/chunk.CsxSstrk.js.gz +0 -0
- package/assets/devtools/{chunk.BeYM7pih.js → chunk.D0jFBu2p.js} +1 -1
- package/assets/devtools/chunk.D0jFBu2p.js.br +0 -0
- package/assets/devtools/chunk.D0jFBu2p.js.gz +0 -0
- package/assets/devtools/{chunk.BNC0DJB8.js → chunk.D7ro5_n3.js} +1 -1
- package/assets/devtools/chunk.D7ro5_n3.js.br +0 -0
- package/assets/devtools/chunk.D7ro5_n3.js.gz +0 -0
- package/assets/devtools/{chunk.BBrq-Wwo.js → chunk.W-1mjDd7.js} +1 -1
- package/assets/devtools/chunk.W-1mjDd7.js.br +0 -0
- package/assets/devtools/chunk.W-1mjDd7.js.gz +0 -0
- package/assets/devtools/{chunk.B3_W5FaN.js → chunk._3YEef80.js} +1 -1
- package/assets/devtools/chunk._3YEef80.js.br +0 -0
- package/assets/devtools/chunk._3YEef80.js.gz +0 -0
- package/assets/devtools/{chunk.DI-f4xNk.js → chunk._t5z0lP9.js} +1 -1
- package/assets/devtools/chunk._t5z0lP9.js.br +0 -0
- package/assets/devtools/chunk._t5z0lP9.js.gz +0 -0
- package/assets/devtools/{chunk.DxjqPOcc.js → chunk.albVVSQX.js} +1 -1
- package/assets/devtools/chunk.albVVSQX.js.br +0 -0
- package/assets/devtools/chunk.albVVSQX.js.gz +0 -0
- package/assets/devtools/{chunk.C5K_AIru.js → chunk.bPNpu2iW.js} +1 -1
- package/assets/devtools/chunk.bPNpu2iW.js.br +0 -0
- package/assets/devtools/chunk.bPNpu2iW.js.gz +0 -0
- package/assets/devtools/{chunk.DAVfKvCa.js → chunk.fWijEdcZ.js} +1 -1
- package/assets/devtools/chunk.fWijEdcZ.js.br +0 -0
- package/assets/devtools/chunk.fWijEdcZ.js.gz +0 -0
- package/assets/devtools/{chunk.ospt8-RN.js → chunk.ffYG67rk.js} +1 -1
- package/assets/devtools/chunk.ffYG67rk.js.br +0 -0
- package/assets/devtools/chunk.ffYG67rk.js.gz +0 -0
- package/assets/devtools/{chunk.C6NWzsJg.js → chunk.lo8X57tY.js} +1 -1
- package/assets/devtools/chunk.lo8X57tY.js.br +0 -0
- package/assets/devtools/chunk.lo8X57tY.js.gz +0 -0
- package/assets/devtools/{chunk.PWK2K2kI.js → chunk.rqjDVBSo.js} +1 -1
- package/assets/devtools/chunk.rqjDVBSo.js.br +0 -0
- package/assets/devtools/chunk.rqjDVBSo.js.gz +0 -0
- package/assets/devtools/{chunk.INuuLdYd.js → chunk.u4exfSZ6.js} +1 -1
- package/assets/devtools/chunk.u4exfSZ6.js.br +0 -0
- package/assets/devtools/chunk.u4exfSZ6.js.gz +0 -0
- package/assets/devtools/chunk.uyVen0u2.js.br +0 -0
- package/assets/devtools/chunk.uyVen0u2.js.gz +0 -0
- package/assets/devtools/{chunk.iyc5GsVj.js → chunk.xjh83uy1.js} +1 -1
- package/assets/devtools/chunk.xjh83uy1.js.br +0 -0
- package/assets/devtools/chunk.xjh83uy1.js.gz +0 -0
- package/assets/devtools/{chunk.BOc4btAA.js → chunk.yZM2qlCX.js} +1 -1
- package/assets/devtools/chunk.yZM2qlCX.js.br +0 -0
- package/assets/devtools/chunk.yZM2qlCX.js.gz +0 -0
- package/assets/devtools/db.html +34 -0
- package/assets/devtools/db.html.br +0 -0
- package/assets/devtools/db.html.gz +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js +79 -0
- package/assets/devtools/entry.BWhdC3SJ.js.br +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js.gz +0 -0
- package/assets/devtools/env.html +35 -0
- package/assets/devtools/env.html.br +0 -0
- package/assets/devtools/env.html.gz +0 -0
- package/assets/devtools/graph.html +38 -0
- package/assets/devtools/graph.html.br +0 -0
- package/assets/devtools/graph.html.gz +0 -0
- package/assets/devtools/index.html +28 -8
- package/assets/devtools/index.html.br +0 -0
- package/assets/devtools/index.html.gz +0 -0
- package/assets/devtools/logs.html +38 -0
- package/assets/devtools/logs.html.br +0 -0
- package/assets/devtools/logs.html.gz +0 -0
- package/assets/devtools/queues.html +30 -0
- package/assets/devtools/queues.html.br +0 -0
- package/assets/devtools/queues.html.gz +0 -0
- package/assets/devtools/topics.html +38 -0
- package/assets/devtools/topics.html.br +0 -0
- package/assets/devtools/topics.html.gz +0 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +0 -4
- package/assets/devtools/entry.DBfTnVUe.js +0 -75
|
@@ -1 +1 @@
|
|
|
1
|
-
import{as as Ao,at as Vo,au as kr,ar as q,av as Fo,r as P,aw as Ze,$ as Ke,n as Eo,f as oe,b as ne,_ as Zt,ax as Xe,j as n,a2 as Je,c as Qt,p as cn,B as de,q as ye,a8 as Yo,s as Me,g as Ge,e as He,a0 as Xt,ay as un,i as ys,az as St,ah as nt,aA as zo,t as De,aB as dn,aa as Ft,aC as Fe,aD as Bo,aq as pn,aE as vs,k as dt,I as xs,aF as mn,d as bs,aG as Ho,aH as hn,U as ot,aI as Wo,ak as Go,v as Mr,aJ as Rt,al as qo,a5 as ut,aK as Xn,aL as Ko,aj as Uo,w as Ne,H as qe,aM as Zo,D as fn,T as ve,F as fe,aN as L,ad as Kt,an as Qo,aO as Xo,aP as Nr,aQ as ge,aR as ct,aS as Nt,aT as Ht,aU as Jo,aV as ea,aW as ta,aX as sa,aY as na,aZ as ra,a_ as oa,af as Lr,ag as Ir,a6 as ms,a$ as aa,a3 as sn,b0 as ia,b1 as la,b2 as ca,a4 as ua,ai as da,b3 as Jn,b4 as pa}from"./entry.DBfTnVUe.js";import{a as gn,c as os,b as ma,d as Cs,A as Ae,u as ha}from"./chunk.UAANdYnt.js";import{I as er}from"./chunk.CYVZxO-p.js";import{a as tr,I as fa}from"./chunk.ByuRJbSC.js";import{S as We,B as Rr}from"./chunk.DLDchrhP.js";import{g as yn,c as vn,u as xn,d as Ie,O as bn,e as Tr,i as $r,b as ga,S as Or,C as hs,a as ya,I as va}from"./chunk.Dwv4A_H_.js";import{A as sr}from"./chunk.I1TSx4X4.js";import{P as Pe,D as nn}from"./chunk.mJxmm31y.js";import{u as xa}from"./chunk.CAWWjC4E.js";import{N as ba,S as Ca,I as wa}from"./chunk.XsVAJU_N.js";import{S as Sa}from"./chunk.DxjqPOcc.js";import{T as ja}from"./chunk.DI-f4xNk.js";import{T as mt}from"./chunk.BjjA59Pf.js";import"./chunk.DN-SKgAD.js";import"./chunk.BlqFPyLh.js";import"./chunk.BNC0DJB8.js";import"./chunk.BjFrJKj1.js";import"./chunk.uyVen0u2.js";class Pa{constructor(t,s){this.id=t,this.options=s,this.options=s,s.initialValues&&(this.values=this.alepha.codec.decode(s.schema,s.initialValues)),this.input=this.createProxyFromSchema(s,s.schema,{store:this.values,parent:""})}log=Ao();alepha=Vo(kr);values={};submitInProgress=!1;input;get submitting(){return this.submitInProgress}get element(){return window.document.getElementById(this.id)}get currentValues(){return this.restructureValues(this.values)}get props(){return{id:this.id,noValidate:!0,onSubmit:t=>{t?.preventDefault?.(),this.submit()},onReset:t=>this.reset(t)}}reset=t=>{for(const s in this.values)delete this.values[s];return this.options.onReset?.(),this.alepha.events.emit("form:reset",{id:this.id,values:this.values},{catch:!0})};submit=async()=>{if(this.submitInProgress){this.log.warn("Form submission already in progress, ignoring duplicate submit.");return}await this.alepha.events.emit("react:action:begin",{type:"form",id:this.id}),await this.alepha.events.emit("form:submit:begin",{id:this.id}),this.submitInProgress=!0;const t=this.options,r={form:this.element};try{let o=this.restructureValues(this.values);q.schema.isSchema(t.schema)&&(o=this.alepha.codec.decode(t.schema,o)),await t.handler(o,r),await this.alepha.events.emit("react:action:success",{type:"form",id:this.id}),await this.alepha.events.emit("form:submit:success",{id:this.id,values:o})}catch(o){this.log.error("Form submission error:",o),t.onError?.(o,r),await this.alepha.events.emit("react:action:error",{type:"form",id:this.id,error:o}),await this.alepha.events.emit("form:submit:error",{error:o,id:this.id})}finally{this.submitInProgress=!1}await this.alepha.events.emit("react:action:end",{type:"form",id:this.id}),await this.alepha.events.emit("form:submit:end",{id:this.id})};restructureValues(t){const s={};for(const[r,o]of Object.entries(t))r.includes(".")?this.restructureNestedValue(s,r,o):s[r]=o;return s}restructureNestedValue(t,s,r){const o=s.split("."),i=o.pop();if(!i)return;let l=t;for(const a of o)l[a]??={},l=l[a];l[i]=r}createProxyFromSchema(t,s,r){return r.parent,new Proxy({},{get:(o,i)=>{if(!t.schema||!q.schema.isObject(s))return{};if(i in s.properties)return this.createInputFromSchema(i,t,s,s.required?.includes(i)||!1,r)}})}createInputFromSchema(t,s,r,o,i){const l=i.parent||"",a=r.properties?.[t];if(!a)return{path:"",required:o,props:{},schema:r,set:()=>{},form:this};const u=r.required?.includes(t)??!1,d=l?`${l}.${t}`:t,c=`/${d.replaceAll(".","/")}`,p=(h,m=!0)=>{const w=this.getValueFromInput(h,a);if(i.store[d],i.store[d]=w,s.onChange&&s.onChange(d,w,i.store),this.alepha.events.emit("form:change",{id:this.id,path:c,value:w},{catch:!0}),m){const g=window.document.querySelector(`[data-path="${c}"]`);g instanceof HTMLInputElement&&(q.schema.isBoolean(a)?(g.value=h,g.checked=!!h):g.value=h)}},f={name:d,autoComplete:"off",onChange:h=>{if(typeof h=="string"){p(h,!1);return}if(typeof h=="number"){p(h,!1);return}q.schema.isBoolean(a)?h.target.value==="true"?p(!0,!1):h.target.value==="false"?p(!1,!1):h.target.value===""?p(void 0,!1):p(h.target.checked,!1):p(h.target.value,!1)}};if(f["data-path"]=c,s.id&&(f.id=`${s.id}-${d}`,f["data-testid"]=f.id),q.schema.isString(a)&&(a.maxLength!=null&&(f.maxLength=Number(a.maxLength)),a.minLength!=null&&(f.minLength=Number(a.minLength))),s.initialValues?.[t]!=null?f.defaultValue=this.valueToInputEntry(s.initialValues[t]):"default"in a&&a.default!=null&&(f.defaultValue=this.valueToInputEntry(a.default)),u&&(f.required=!0),"description"in a&&typeof a.description=="string"&&(f["aria-label"]=a.description),q.schema.isInteger(a)||q.schema.isNumber(a)?f.type="number":t==="password"?f.type="password":t==="email"?f.type="email":t==="url"?f.type="url":q.schema.isString(a)?a.format==="binary"?f.type="file":a.format==="date"?f.type="date":a.format==="time"?f.type="time":a.format==="date-time"?f.type="datetime-local":f.type="text":q.schema.isBoolean(a)&&(f.type="checkbox"),s.onCreateField){const h=s.onCreateField(t,a);Object.assign(f,h)}return q.schema.isObject(a)?{path:c,props:f,schema:a,set:p,form:this,required:o,items:this.createProxyFromSchema(s,a,{parent:d,store:i.store})}:q.schema.isArray(a)?{path:c,props:f,schema:a,set:p,form:this,required:o,items:[]}:{path:c,props:f,schema:a,set:p,form:this,required:o}}getValueFromInput(t,s){if(t instanceof File)return q.schema.isString(s)&&s.format==="binary"?t:null;if(q.schema.isBoolean(s))return t==="true"?!0:t==="false"?!1:t===""||t===null||t===void 0?void 0:!!t;if(q.schema.isNumber(s)){const r=Number(t);return Number.isNaN(r)?null:r}return q.schema.isString(s)?s.format==="date"?new Date(t).toISOString().slice(0,10):s.format==="time"?new Date(`1970-01-01T${t}`).toISOString().slice(11,16):s.format==="date-time"?new Date(t).toISOString():String(t):t}valueToInputEntry(t){return t==null?"":typeof t=="boolean"||typeof t=="number"||typeof t=="string"?t:t instanceof Date?t.toISOString().slice(0,16):t}}const Da=(e,t=[])=>{const s=Fo(),r=P.useId();return P.useMemo(()=>s.inject(Pa,{lifetime:"transient",args:[e.id||r,e]}),t)};function rt(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function Ar(e){return{x:Ze(e.x,0,1),y:Ze(e.y,0,1)}}function Cn(e,t,s="ltr"){const r=P.useRef(!1),o=P.useRef(!1),i=P.useRef(0),[l,a]=P.useState(!1),u=P.useRef(null);return P.useEffect(()=>{r.current=!0},[]),{ref:P.useCallback(c=>{if(u.current&&(u.current(),u.current=null),!c)return;const p=({x:b,y:x})=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{if(r.current&&c){c.style.userSelect="none";const D=c.getBoundingClientRect();if(D.width&&D.height){const M=Ze((b-D.left)/D.width,0,1);e({x:s==="ltr"?M:1-M,y:Ze((x-D.top)/D.height,0,1)})}}})},f=()=>{document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),document.addEventListener("touchmove",v,{passive:!1}),document.addEventListener("touchend",w)},h=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",w)},m=()=>{!o.current&&r.current&&(o.current=!0,typeof t?.onScrubStart=="function"&&t.onScrubStart(),a(!0),f())},w=()=>{o.current&&r.current&&(o.current=!1,a(!1),h(),setTimeout(()=>{typeof t?.onScrubEnd=="function"&&t.onScrubEnd()},0))},g=b=>{m(),b.preventDefault(),S(b)},S=b=>p({x:b.clientX,y:b.clientY}),y=b=>{b.cancelable&&b.preventDefault(),m(),v(b)},v=b=>{b.cancelable&&b.preventDefault(),p({x:b.changedTouches[0].clientX,y:b.changedTouches[0].clientY})};c.addEventListener("mousedown",g),c.addEventListener("touchstart",y,{passive:!1}),u.current=()=>{c.removeEventListener("mousedown",g),c.removeEventListener("touchstart",y)}},[s,e]),active:l}}function wt(e,t){const s=t-e+1;return Array.from({length:s},(r,o)=>o+e)}const as="dots";function _a({total:e,siblings:t=1,boundaries:s=1,page:r,initialPage:o=1,onChange:i}){const l=Math.max(Math.trunc(e),0),[a,u]=Ke({value:r,onChange:i,defaultValue:o,finalValue:o}),d=w=>{w<=0?u(1):w>l?u(l):u(w)},c=()=>d(a+1),p=()=>d(a-1),f=()=>d(1),h=()=>d(l);return{range:P.useMemo(()=>{if(t*2+3+s*2>=l)return wt(1,l);const g=Math.max(a-t,s),S=Math.min(a+t,l-s),y=g>s+2,v=S<l-(s+1);if(!y&&v){const b=t*2+s+2;return[...wt(1,b),as,...wt(l-(s-1),l)]}if(y&&!v){const b=s+1+2*t;return[...wt(1,s),as,...wt(l-b,l)]}return[...wt(1,s),as,...wt(g,S),as,...wt(l-s+1,l)]},[l,t,a]),active:a,setPage:d,next:c,previous:p,first:f,last:h}}function ka(){const[e,t]=P.useState(!1);Eo(()=>{t(typeof window<"u"&&!Ma()&&"EyeDropper"in window)},[]);const s=P.useCallback((r={})=>e?new window.EyeDropper().open(r):Promise.resolve(void 0),[e]);return{supported:e,open:s}}function Ma(){return navigator.userAgent.includes("OPR")}function nr(e,t){return t.length===0?e:t.reduce((s,r)=>Math.abs(r-e)<Math.abs(s-e)?r:s)}const wn=oe((e,t)=>{const s=ne("Autocomplete",null,e),{classNames:r,styles:o,unstyled:i,vars:l,dropdownOpened:a,defaultDropdownOpened:u,onDropdownClose:d,onDropdownOpen:c,onFocus:p,onBlur:f,onClick:h,onChange:m,data:w,value:g,defaultValue:S,selectFirstOptionOnChange:y,onOptionSubmit:v,comboboxProps:b,readOnly:x,disabled:D,filter:M,limit:$,withScrollArea:O,maxDropdownHeight:z,size:A,id:Y,renderOption:B,autoComplete:I,scrollAreaProps:F,onClear:E,clearButtonProps:H,error:R,clearable:T,rightSection:j,autoSelectOnBlur:C,attributes:_,...k}=s,N=Zt(Y),W=yn(w),G=vn(W),[ee,ae]=Ke({value:g,defaultValue:S,finalValue:"",onChange:m}),re=xn({opened:a,defaultOpened:u,onDropdownOpen:c,onDropdownClose:()=>{d?.(),setTimeout(re.resetSelectedOption,0)}}),K=J=>{ae(J),re.resetSelectedOption()},{resolvedClassNames:te,resolvedStyles:X}=Xe({props:s,styles:o,classNames:r});P.useEffect(()=>{y&&re.selectFirstOption()},[y,ee]);const le=n.jsx(Ie.ClearButton,{...H,onClear:()=>{K(""),E?.()}});return n.jsxs(Ie,{store:re,__staticSelector:"Autocomplete",classNames:te,styles:X,unstyled:i,readOnly:x,size:A,attributes:_,keepMounted:C,onOptionSubmit:J=>{v?.(J),K(G[J].label),re.closeDropdown()},...b,children:[n.jsx(Ie.Target,{autoComplete:I,children:n.jsx(Je,{ref:t,...k,size:A,__staticSelector:"Autocomplete",__clearSection:le,__clearable:T&&!!ee&&!D&&!x,rightSection:j,disabled:D,readOnly:x,value:ee,error:R,onChange:J=>{K(J.currentTarget.value),re.openDropdown(),y&&re.selectFirstOption()},onFocus:J=>{re.openDropdown(),p?.(J)},onBlur:J=>{C&&re.clickSelectedOption(),re.closeDropdown(),f?.(J)},onClick:J=>{re.openDropdown(),h?.(J)},classNames:te,styles:X,unstyled:i,attributes:_,id:N})}),n.jsx(bn,{data:W,hidden:x||D,filter:M,search:ee,limit:$,hiddenWhenEmpty:!0,withScrollArea:O,maxDropdownHeight:z,unstyled:i,labelId:k.label?`${N}-label`:void 0,"aria-label":k.label?void 0:k["aria-label"],renderOption:B,scrollAreaProps:F})]})});wn.classes={...Je.classes,...Ie.classes};wn.displayName="@mantine/core/Autocomplete";const[Na,La]=Qt("Card component was not found in tree");var Sn={root:"m_e615b15f",section:"m_599a2148"};const ws=cn((e,t)=>{const s=ne("CardSection",null,e),{classNames:r,className:o,style:i,styles:l,vars:a,withBorder:u,inheritPadding:d,mod:c,...p}=s,f=La();return n.jsx(de,{ref:t,mod:[{"with-border":u,"inherit-padding":d},c],...f.getStyles("section",{className:o,style:i,styles:l,classNames:r}),...p})});ws.classes=Sn;ws.displayName="@mantine/core/CardSection";const Ia=Me((e,{padding:t})=>({root:{"--card-padding":Ge(t)}})),Ss=cn((e,t)=>{const s=ne("Card",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,children:d,padding:c,attributes:p,...f}=s,h=ye({name:"Card",props:s,classes:Sn,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:p,vars:u,varsResolver:Ia}),m=P.Children.toArray(d),w=m.map((g,S)=>typeof g=="object"&&g&&"type"in g&&g.type===ws?P.cloneElement(g,{"data-first-section":S===0||void 0,"data-last-section":S===m.length-1||void 0}):g);return n.jsx(Na,{value:{getStyles:h},children:n.jsx(Yo,{ref:t,unstyled:a,...h("root"),...f,children:w})})});Ss.classes=Sn;Ss.displayName="@mantine/core/Card";Ss.Section=ws;var Vr={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const rr={withShadow:!0},Ra=Me((e,{radius:t,size:s})=>({root:{"--cs-radius":t===void 0?void 0:Xt(t),"--cs-size":He(s)}})),Jt=cn((e,t)=>{const s=ne("ColorSwatch",rr,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,color:d,size:c,radius:p,withShadow:f,children:h,variant:m,attributes:w,...g}=ne("ColorSwatch",rr,s),S=ye({name:"ColorSwatch",props:s,classes:Vr,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:w,vars:u,varsResolver:Ra});return n.jsxs(de,{ref:t,variant:m,size:c,...S("root",{focusable:!0}),...g,children:[n.jsx("span",{...S("alphaOverlay")}),f&&n.jsx("span",{...S("shadowOverlay")}),n.jsx("span",{...S("colorOverlay",{style:{backgroundColor:d}})}),n.jsx("span",{...S("childrenOverlay"),children:h})]})});Jt.classes=Vr;Jt.displayName="@mantine/core/ColorSwatch";const[Ta,jn]=un(null),Pn=P.forwardRef(({position:e,...t},s)=>n.jsx(de,{ref:s,__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...t}));Pn.displayName="@mantine/core/ColorPickerThumb";var Dn={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const _n=oe((e,t)=>{const s=ne("ColorSlider",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,onChange:d,onChangeEnd:c,maxValue:p,round:f,size:h="md",focusable:m=!0,value:w,overlays:g,thumbColor:S="transparent",onScrubStart:y,onScrubEnd:v,__staticSelector:b="ColorPicker",attributes:x,...D}=s,M=ye({name:b,classes:Dn,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:x}),O=jn()?.getStyles||M,z=ys(),[A,Y]=P.useState({y:0,x:w/p}),B=P.useRef(A),I=T=>f?Math.round(T*p):T*p,{ref:F}=Cn(({x:T,y:j})=>{B.current={x:T,y:j},d?.(I(T))},{onScrubEnd:()=>{const{x:T}=B.current;c?.(I(T)),v?.()},onScrubStart:y});St(()=>{Y({y:0,x:w/p})},[w]);const E=(T,j)=>{T.preventDefault();const C=Ar(j);d?.(I(C.x)),c?.(I(C.x))},H=T=>{switch(T.key){case"ArrowRight":{E(T,{x:A.x+.05,y:A.y});break}case"ArrowLeft":{E(T,{x:A.x-.05,y:A.y});break}}},R=g.map((T,j)=>P.createElement("div",{...O("sliderOverlay"),style:T,key:j}));return n.jsxs(de,{...D,ref:nt(F,t),...O("slider"),role:"slider","aria-valuenow":w,"aria-valuemax":p,"aria-valuemin":0,tabIndex:m?0:-1,onKeyDown:H,"data-focus-ring":z.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${h})`},children:[R,n.jsx(Pn,{position:A,...O("thumb",{style:{top:He(1),background:S}})})]})});_n.displayName="@mantine/core/ColorSlider";function Qe(e,t=0,s=10**t){return Math.round(s*e)/s}function $a({h:e,s:t,l:s,a:r}){const o=t*((s<50?s:100-s)/100);return{h:e,s:o>0?2*o/(s+o)*100:0,v:s+o,a:r}}const Oa={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Aa(e,t="deg"){return Number(e)*(Oa[t]||1)}const Va=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function or(e){const t=Va.exec(e);return t?$a({h:Aa(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function rn({r:e,g:t,b:s,a:r}){const o=Math.max(e,t,s),i=o-Math.min(e,t,s),l=i?o===e?(t-s)/i:o===t?2+(s-e)/i:4+(e-t)/i:0;return{h:Qe(60*(l<0?l+6:l),3),s:Qe(o?i/o*100:0,3),v:Qe(o/255*100,3),a:r}}function on(e){const t=e[0]==="#"?e.slice(1):e;return t.length===3?rn({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):rn({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function Fa(e){const t=e[0]==="#"?e.slice(1):e,s=l=>Qe(parseInt(l,16)/255,3);if(t.length===4){const l=t.slice(0,3),a=s(t[3]+t[3]);return{...on(l),a}}const r=t.slice(0,6),o=s(t.slice(6,8));return{...on(r),a:o}}const Ea=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function ar(e){const t=Ea.exec(e);return t?rn({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}const Fr={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},Ya={hex:on,hexa:Fa,rgb:ar,rgba:ar,hsl:or,hsla:or};function Gt(e){for(const[,t]of Object.entries(Fr))if(t.test(e))return!0;return!1}function Lt(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const t=e.trim();for(const[s,r]of Object.entries(Fr))if(r.test(t))return Ya[s](t);return{h:0,s:0,v:0,a:1}}const Er=P.forwardRef((e,t)=>{const{value:s,onChange:r,onChangeEnd:o,color:i,...l}=ne("AlphaSlider",null,e);return n.jsx(_n,{...l,ref:t,value:s,onChange:a=>r?.(Qe(a,2)),onChangeEnd:a=>o?.(Qe(a,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${He(8)} ${He(8)}`,backgroundPosition:`0 0, 0 ${He(4)}, ${He(4)} ${He(-4)}, ${He(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${i})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${He(1)} inset, rgb(0, 0, 0, .15) 0 0 ${He(4)} inset`}]})});Er.displayName="@mantine/core/AlphaSlider";function Yr({h:e,s:t,v:s,a:r}){const o=e/360*6,i=t/100,l=s/100,a=Math.floor(o),u=l*(1-i),d=l*(1-(o-a)*i),c=l*(1-(1-o+a)*i),p=a%6;return{r:Qe([l,d,u,u,c,l][p]*255),g:Qe([c,l,l,d,u,u][p]*255),b:Qe([u,u,c,l,l,d][p]*255),a:Qe(r,2)}}function ir(e,t){const{r:s,g:r,b:o,a:i}=Yr(e);return t?`rgba(${s}, ${r}, ${o}, ${Qe(i,2)})`:`rgb(${s}, ${r}, ${o})`}function lr({h:e,s:t,v:s,a:r},o){const i=(200-t)*s/100,l={h:Math.round(e),s:Math.round(i>0&&i<200?t*s/100/(i<=100?i:200-i)*100:0),l:Math.round(i/2)};return o?`hsla(${l.h}, ${l.s}%, ${l.l}%, ${Qe(r,2)})`:`hsl(${l.h}, ${l.s}%, ${l.l}%)`}function ls(e){const t=e.toString(16);return t.length<2?`0${t}`:t}function zr(e){const{r:t,g:s,b:r}=Yr(e);return`#${ls(t)}${ls(s)}${ls(r)}`}function za(e){const t=Math.round(e.a*255);return`${zr(e)}${ls(t)}`}const Ks={hex:zr,hexa:e=>za(e),rgb:e=>ir(e,!1),rgba:e=>ir(e,!0),hsl:e=>lr(e,!1),hsla:e=>lr(e,!0)};function st(e,t){return t?e in Ks?Ks[e](t):Ks.hex(t):"#000000"}const Br=P.forwardRef((e,t)=>{const{value:s,onChange:r,onChangeEnd:o,color:i,...l}=ne("HueSlider",{},e);return n.jsx(_n,{...l,ref:t,value:s,onChange:r,onChangeEnd:o,maxValue:360,thumbColor:`hsl(${s}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${He(1)} inset, rgb(0, 0, 0, .15) 0 0 ${He(4)} inset`}]})});Br.displayName="@mantine/core/HueSlider";function Hr({className:e,onChange:t,onChangeEnd:s,value:r,saturationLabel:o,focusable:i=!0,size:l,color:a,onScrubStart:u,onScrubEnd:d,...c}){const{getStyles:p}=jn(),[f,h]=P.useState({x:r.s/100,y:1-r.v/100}),m=P.useRef(f),{ref:w}=Cn(({x:y,y:v})=>{m.current={x:y,y:v},t({s:Math.round(y*100),v:Math.round((1-v)*100)})},{onScrubEnd:()=>{const{x:y,y:v}=m.current;s({s:Math.round(y*100),v:Math.round((1-v)*100)}),d?.()},onScrubStart:u});P.useEffect(()=>{h({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);const g=(y,v)=>{y.preventDefault();const b=Ar(v);t({s:Math.round(b.x*100),v:Math.round((1-b.y)*100)}),s({s:Math.round(b.x*100),v:Math.round((1-b.y)*100)})},S=y=>{switch(y.key){case"ArrowUp":{g(y,{y:f.y-.05,x:f.x});break}case"ArrowDown":{g(y,{y:f.y+.05,x:f.x});break}case"ArrowRight":{g(y,{x:f.x+.05,y:f.y});break}case"ArrowLeft":{g(y,{x:f.x-.05,y:f.y});break}}};return n.jsxs(de,{...p("saturation"),ref:w,...c,role:"slider","aria-label":o,"aria-valuenow":f.x,"aria-valuetext":st("rgba",r),tabIndex:i?0:-1,onKeyDown:S,children:[n.jsx("div",{...p("saturationOverlay",{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),n.jsx("div",{...p("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),n.jsx("div",{...p("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),n.jsx(Pn,{position:f,...p("thumb",{style:{backgroundColor:a}})})]})}Hr.displayName="@mantine/core/Saturation";const Wr=P.forwardRef(({className:e,datatype:t,setValue:s,onChangeEnd:r,size:o,focusable:i,data:l,swatchesPerRow:a,value:u,...d},c)=>{const p=jn(),f=l.map((h,m)=>P.createElement(Jt,{...p.getStyles("swatch"),unstyled:p.unstyled,component:"button",type:"button",color:h,key:m,radius:"sm",onClick:()=>{s(h),r?.(h)},"aria-label":h,tabIndex:i?0:-1,"data-swatch":!0},u===h&&n.jsx(Tr,{size:"35%",color:zo(h)<.5?"white":"black"})));return n.jsx(de,{...p.getStyles("swatches"),ref:c,...d,children:f})});Wr.displayName="@mantine/core/Swatches";const Ba={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},Ha=Me((e,{size:t,swatchesPerRow:s})=>({wrapper:{"--cp-preview-size":De(t,"cp-preview-size"),"--cp-width":De(t,"cp-width"),"--cp-body-spacing":Ge(t),"--cp-swatch-size":`${100/s}%`,"--cp-thumb-size":De(t,"cp-thumb-size"),"--cp-saturation-height":De(t,"cp-saturation-height")}})),kn=oe((e,t)=>{const s=ne("ColorPicker",Ba,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,format:d="hex",value:c,defaultValue:p,onChange:f,onChangeEnd:h,withPicker:m,size:w,saturationLabel:g,hueLabel:S,alphaLabel:y,focusable:v,swatches:b,swatchesPerRow:x,fullWidth:D,onColorSwatchClick:M,__staticSelector:$,mod:O,attributes:z,...A}=s,Y=ye({name:$,props:s,classes:Dn,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:z,rootSelector:"wrapper",vars:u,varsResolver:Ha}),B=P.useRef(d||"hex"),I=P.useRef(""),F=P.useRef(-1),E=P.useRef(!1),H=d==="hexa"||d==="rgba"||d==="hsla",[R,T,j]=Ke({value:c,defaultValue:p,finalValue:"#FFFFFF",onChange:f}),[C,_]=P.useState(Lt(R)),k=()=>{window.clearTimeout(F.current),E.current=!0},N=()=>{window.clearTimeout(F.current),F.current=window.setTimeout(()=>{E.current=!1},200)},W=G=>{_(ee=>{const ae={...ee,...G};return I.current=st(B.current,ae),ae}),T(I.current)};return St(()=>{typeof c=="string"&&Gt(c)&&!E.current&&_(Lt(c))},[c]),St(()=>{B.current=d||"hex",T(st(B.current,C))},[d]),n.jsx(Ta,{value:{getStyles:Y,unstyled:a},children:n.jsxs(de,{ref:t,...Y("wrapper"),size:w,mod:[{"full-width":D},O],...A,children:[m&&n.jsxs(n.Fragment,{children:[n.jsx(Hr,{value:C,onChange:W,onChangeEnd:({s:G,v:ee})=>h?.(st(B.current,{...C,s:G,v:ee})),color:R,size:w,focusable:v,saturationLabel:g,onScrubStart:k,onScrubEnd:N}),n.jsxs("div",{...Y("body"),children:[n.jsxs("div",{...Y("sliders"),children:[n.jsx(Br,{value:C.h,onChange:G=>W({h:G}),onChangeEnd:G=>h?.(st(B.current,{...C,h:G})),size:w,focusable:v,"aria-label":S,onScrubStart:k,onScrubEnd:N}),H&&n.jsx(Er,{value:C.a,onChange:G=>W({a:G}),onChangeEnd:G=>{h?.(st(B.current,{...C,a:G}))},size:w,color:st("hex",C),focusable:v,"aria-label":y,onScrubStart:k,onScrubEnd:N})]}),H&&n.jsx(Jt,{color:R,radius:"sm",size:"var(--cp-preview-size)",...Y("preview")})]})]}),Array.isArray(b)&&n.jsx(Wr,{data:b,swatchesPerRow:x,focusable:v,setValue:T,value:R,onChangeEnd:G=>{const ee=st(d,Lt(G));M?.(ee),h?.(ee),j||_(Lt(G))}})]})})});kn.classes=Dn;kn.displayName="@mantine/core/ColorPicker";function Wa({style:e,...t}){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--ci-eye-dropper-icon-size)",height:"var(--ci-eye-dropper-icon-size)",...e},viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...t,children:[n.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),n.jsx("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),n.jsx("path",{d:"M12 3l0 4"}),n.jsx("path",{d:"M12 21l0 -3"}),n.jsx("path",{d:"M3 12l4 0"}),n.jsx("path",{d:"M21 12l-3 0"}),n.jsx("path",{d:"M12 12l0 .01"})]})}var cr={eyeDropperIcon:"m_b077c2bc",eyeDropperButton:"m_66a028b5",colorPreview:"m_c5ccdcab",dropdown:"m_5ece2cd7"};const ur={format:"hex",fixOnBlur:!0,withPreview:!0,swatchesPerRow:7,withPicker:!0,popoverProps:{transitionProps:{transition:"fade",duration:0}},withEyeDropper:!0,size:"sm"},Ga=Me((e,{size:t})=>({eyeDropperIcon:{"--ci-eye-dropper-icon-size":De(t,"ci-eye-dropper-icon-size")},eyeDropperButton:{"--ci-button-size":De(t,"ci-button-size")},colorPreview:{"--ci-preview-size":De(t,"ci-preview-size")}})),Mn=oe((e,t)=>{const s=ne("ColorInput",ur,e),{classNames:r,styles:o,unstyled:i,disallowInput:l,fixOnBlur:a,popoverProps:u,withPreview:d,withEyeDropper:c,eyeDropperIcon:p,closeOnColorSwatchClick:f,eyeDropperButtonProps:h,value:m,defaultValue:w,onChange:g,onChangeEnd:S,onClick:y,onFocus:v,onBlur:b,inputProps:x,format:D="hex",wrapperProps:M,readOnly:$,withPicker:O,swatches:z,disabled:A,leftSection:Y,rightSection:B,swatchesPerRow:I,...F}=dn("ColorInput",ur,e),E=ye({name:"ColorInput",props:s,classes:cr,classNames:r,styles:o,unstyled:i,rootSelector:"wrapper",vars:s.vars,varsResolver:Ga}),{resolvedClassNames:H,resolvedStyles:R}=Xe({classNames:r,styles:o,props:s}),[T,j]=P.useState(!1),[C,_]=P.useState(""),[k,N]=Ke({value:m,defaultValue:w,finalValue:"",onChange:g}),{supported:W,open:G}=ka(),ee=n.jsx(Ft,{...h,...E("eyeDropperButton",{className:h?.className,style:h?.style}),variant:"subtle",color:"gray",unstyled:i,onClick:()=>G().then(te=>{if(te?.sRGBHex){const X=st(D,Lt(te.sRGBHex));N(X),S?.(X)}}).catch(()=>{}),children:p||n.jsx(Wa,{...E("eyeDropperIcon")})}),ae=te=>{v?.(te),j(!0)},re=te=>{a&&N(C),b?.(te),j(!1)},K=te=>{y?.(te),j(!0)};return P.useEffect(()=>{(Gt(k)||k.trim()==="")&&_(k)},[k]),St(()=>{Gt(k)&&N(st(D,Lt(k)))},[D]),n.jsx(Fe.Wrapper,{...M,classNames:H,styles:R,__staticSelector:"ColorInput",children:n.jsxs(Pe,{__staticSelector:"ColorInput",position:"bottom-start",offset:5,opened:T,...u,classNames:H,styles:R,unstyled:i,withRoles:!1,disabled:$||O===!1&&(!Array.isArray(z)||z.length===0),children:[n.jsx(Pe.Target,{children:n.jsx(Fe,{autoComplete:"off",...F,...x,classNames:H,styles:R,disabled:A,ref:t,__staticSelector:"ColorInput",onFocus:ae,onBlur:re,onClick:K,spellCheck:!1,value:k,onChange:te=>{const X=te.currentTarget.value;N(X),Gt(X)&&S?.(st(D,Lt(X)))},leftSection:Y||(d?n.jsx(Jt,{color:Gt(k)?k:"#fff",size:"var(--ci-preview-size)",...E("colorPreview")}):null),readOnly:l||$,pointer:l,unstyled:i,rightSection:B||(c&&!A&&!$&&W?ee:null)})}),n.jsx(Pe.Dropdown,{onMouseDown:te=>te.preventDefault(),className:cr.dropdown,children:n.jsx(kn,{__staticSelector:"ColorInput",value:k,onChange:N,onChangeEnd:S,format:D,swatches:z,swatchesPerRow:I,withPicker:O,size:x.size,focusable:!1,unstyled:i,styles:R,classNames:H,onColorSwatchClick:()=>f&&j(!1),attributes:M.attributes})})]})})});Mn.classes=Je.classes;Mn.displayName="@mantine/core/ColorInput";var Gr={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};const qa={variant:"default"},Ka=Me((e,{radius:t})=>({root:{"--fieldset-radius":t===void 0?void 0:Xt(t)}})),js=oe((e,t)=>{const s=ne("Fieldset",qa,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,legend:d,variant:c,children:p,attributes:f,...h}=s,m=ye({name:"Fieldset",classes:Gr,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:f,vars:u,varsResolver:Ka});return n.jsxs(de,{component:"fieldset",ref:t,variant:c,...m("root",{variant:c}),...h,children:[d&&n.jsx("legend",{...m("legend",{variant:c}),children:d}),p]})});js.classes=Gr;js.displayName="@mantine/core/Fieldset";const Ua={multiple:!1},qr=P.forwardRef((e,t)=>{const{onChange:s,children:r,multiple:o,accept:i,name:l,form:a,resetRef:u,disabled:d,capture:c,inputProps:p,...f}=ne("FileButton",Ua,e),h=P.useRef(null),m=()=>{!d&&h.current?.click()},w=S=>{if(S.currentTarget.files===null)return s(o?[]:null);s(o?Array.from(S.currentTarget.files):S.currentTarget.files[0]||null)};return Bo(u,()=>{h.current&&(h.current.value="")}),n.jsxs(n.Fragment,{children:[n.jsx("input",{style:{display:"none"},type:"file",accept:i,multiple:o,onChange:w,ref:nt(t,h),name:l,form:a,capture:c,...p}),r({onClick:m,...f})]})});qr.displayName="@mantine/core/FileButton";const Za=({value:e})=>n.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Array.isArray(e)?e.map(t=>t.name).join(", "):e?.name}),Qa={valueComponent:Za,size:"sm"},Nn=oe((e,t)=>{const s=ne("FileInput",Qa,e),{unstyled:r,vars:o,onChange:i,value:l,defaultValue:a,multiple:u,accept:d,name:c,form:p,valueComponent:f,clearable:h,clearButtonProps:m,readOnly:w,capture:g,fileInputProps:S,rightSection:y,size:v,placeholder:b,component:x,resetRef:D,classNames:M,styles:$,attributes:O,...z}=s,A=P.useRef(null),{resolvedClassNames:Y,resolvedStyles:B}=Xe({classNames:M,styles:$,props:s}),[I,F]=Ke({value:l,defaultValue:a,onChange:i,finalValue:u?[]:null}),E=Array.isArray(I)?I.length!==0:I!==null,H=y||(h&&E&&!w?n.jsx(pn,{...m,variant:"subtle",onClick:()=>F(u?[]:null),size:v,unstyled:r}):null);return P.useEffect(()=>{(Array.isArray(I)&&I.length===0||I===null)&&A.current?.()},[I]),n.jsx(qr,{onChange:F,multiple:u,accept:d,name:c,form:p,resetRef:nt(A,D),disabled:w,capture:g,inputProps:S,children:R=>n.jsx(Je,{component:x||"button",ref:t,rightSection:H,...R,...z,__staticSelector:"FileInput",multiline:!0,type:"button",pointer:!0,__stylesApiProps:s,unstyled:r,size:v,classNames:M,styles:$,attributes:O,children:E?n.jsx(f,{value:I}):n.jsx(Fe.Placeholder,{__staticSelector:"FileInput",classNames:Y,styles:B,attributes:O,children:b})})})});Nn.classes=Je.classes;Nn.displayName="@mantine/core/FileInput";const Xa=Nn,[dr,Kr]=Qt("Grid component was not found in tree"),an=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,pr=(e,t,s)=>s||e==="auto"?"100%":e==="content"?"unset":an(e,t),mr=(e,t)=>{if(e)return e==="auto"||t?"1":"auto"},hr=(e,t)=>e===0?"0":e?`${100/(t/e)}%`:void 0;function Ja({span:e,order:t,offset:s,selector:r}){const o=ys(),i=Kr(),l=i.breakpoints||o.breakpoints,u=rt(e)===void 0?12:rt(e),d=vs({"--col-order":rt(t)?.toString(),"--col-flex-grow":mr(u,i.grow),"--col-flex-basis":an(u,i.columns),"--col-width":u==="content"?"auto":void 0,"--col-max-width":pr(u,i.columns,i.grow),"--col-offset":hr(rt(s),i.columns)}),c=dt(l).reduce((h,m)=>(h[m]||(h[m]={}),typeof t=="object"&&t[m]!==void 0&&(h[m]["--col-order"]=t[m]?.toString()),typeof e=="object"&&e[m]!==void 0&&(h[m]["--col-flex-grow"]=mr(e[m],i.grow),h[m]["--col-flex-basis"]=an(e[m],i.columns),h[m]["--col-width"]=e[m]==="content"?"auto":void 0,h[m]["--col-max-width"]=pr(e[m],i.columns,i.grow)),typeof s=="object"&&s[m]!==void 0&&(h[m]["--col-offset"]=hr(s[m],i.columns)),h),{}),f=gn(dt(c),l).filter(h=>dt(c[h.value]).length>0).map(h=>({query:i.type==="container"?`mantine-grid (min-width: ${l[h.value]})`:`(min-width: ${l[h.value]})`,styles:c[h.value]}));return n.jsx(xs,{styles:d,media:i.type==="container"?void 0:f,container:i.type==="container"?f:void 0,selector:r})}var Ln={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const ei={span:12},In=oe((e,t)=>{const s=ne("GridCol",ei,e),{classNames:r,className:o,style:i,styles:l,vars:a,span:u,order:d,offset:c,...p}=s,f=Kr(),h=mn();return n.jsxs(n.Fragment,{children:[n.jsx(Ja,{selector:`.${h}`,span:u,order:d,offset:c}),n.jsx(de,{ref:t,...f.getStyles("col",{className:bs(o,h),style:i,classNames:r,styles:l}),...p})]})});In.classes=Ln;In.displayName="@mantine/core/GridCol";function fr({gutter:e,selector:t,breakpoints:s,type:r}){const o=ys(),i=s||o.breakpoints,l=vs({"--grid-gutter":Ge(rt(e))}),a=dt(i).reduce((c,p)=>(c[p]||(c[p]={}),typeof e=="object"&&e[p]!==void 0&&(c[p]["--grid-gutter"]=Ge(e[p])),c),{}),d=gn(dt(a),i).filter(c=>dt(a[c.value]).length>0).map(c=>({query:r==="container"?`mantine-grid (min-width: ${i[c.value]})`:`(min-width: ${i[c.value]})`,styles:a[c.value]}));return n.jsx(xs,{styles:l,media:r==="container"?void 0:d,container:r==="container"?d:void 0,selector:t})}const ti={gutter:"md",grow:!1,columns:12},si=Me((e,{justify:t,align:s,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":s,"--grid-overflow":r}})),ht=oe((e,t)=>{const s=ne("Grid",ti,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,grow:d,gutter:c,columns:p,align:f,justify:h,children:m,breakpoints:w,type:g,attributes:S,...y}=s,v=ye({name:"Grid",classes:Ln,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:S,vars:u,varsResolver:si}),b=mn();return g==="container"&&w?n.jsxs(dr,{value:{getStyles:v,grow:d,columns:p,breakpoints:w,type:g},children:[n.jsx(fr,{selector:`.${b}`,...s}),n.jsx("div",{...v("container"),children:n.jsx(de,{ref:t,...v("root",{className:b}),...y,children:n.jsx("div",{...v("inner"),children:m})})})]}):n.jsxs(dr,{value:{getStyles:v,grow:d,columns:p,breakpoints:w,type:g},children:[n.jsx(fr,{selector:`.${b}`,...s}),n.jsx(de,{ref:t,...v("root",{className:b}),...y,children:n.jsx("div",{...v("inner"),children:m})})]})});ht.classes=Ln;ht.displayName="@mantine/core/Grid";ht.Col=In;const[ni,Rn]=un(),[ri,oi]=un();var Ps={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const ai=Me((e,{gap:t},{size:s})=>({group:{"--pg-gap":t!==void 0?De(t):De(s,"pg-gap")}})),Tn=oe((e,t)=>{const s=ne("PillGroup",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,size:d,disabled:c,attributes:p,...f}=s,m=Rn()?.size||d||void 0,w=ye({name:"PillGroup",classes:Ps,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:p,vars:u,varsResolver:ai,stylesCtx:{size:m},rootSelector:"group"});return n.jsx(ri,{value:{size:m,disabled:c},children:n.jsx(de,{ref:t,size:m,...w("group"),...f})})});Tn.classes=Ps;Tn.displayName="@mantine/core/PillGroup";const ii={variant:"default"},li=Me((e,{radius:t},{size:s})=>({root:{"--pill-fz":De(s,"pill-fz"),"--pill-height":De(s,"pill-height"),"--pill-radius":t===void 0?void 0:Xt(t)}})),It=oe((e,t)=>{const s=ne("Pill",ii,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,variant:d,children:c,withRemoveButton:p,onRemove:f,removeButtonProps:h,radius:m,size:w,disabled:g,mod:S,attributes:y,...v}=s,b=oi(),x=Rn(),D=w||b?.size||void 0,M=x?.variant==="filled"?"contrast":d||"default",$=ye({name:"Pill",classes:Ps,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:y,vars:u,varsResolver:li,stylesCtx:{size:D}});return n.jsxs(de,{component:"span",ref:t,variant:M,size:D,...$("root",{variant:M}),mod:[{"with-remove":p&&!g,disabled:g||b?.disabled},S],...v,children:[n.jsx("span",{...$("label"),children:c}),p&&n.jsx(pn,{variant:"transparent",radius:m,tabIndex:-1,"aria-hidden":!0,unstyled:a,...h,...$("remove",{className:h?.className,style:h?.style}),onMouseDown:O=>{O.preventDefault(),O.stopPropagation(),h?.onMouseDown?.(O)},onClick:O=>{O.stopPropagation(),f?.(),h?.onClick?.(O)}})]})});It.classes=Ps;It.displayName="@mantine/core/Pill";It.Group=Tn;var Ur={field:"m_45c4369d"};const ci={type:"visible"},$n=oe((e,t)=>{const s=ne("PillsInputField",ci,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,type:d,disabled:c,id:p,pointer:f,mod:h,attributes:m,...w}=s,g=Rn(),S=Ho(),y=ye({name:"PillsInputField",classes:Ur,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:m,rootSelector:"field"}),v=c||g?.disabled;return n.jsx(de,{component:"input",ref:nt(t,g?.fieldRef),"data-type":d,disabled:v,mod:[{disabled:v,pointer:f},h],...y("field"),...w,id:S?.inputId||p,"aria-invalid":g?.hasError,"aria-describedby":S?.describedBy,type:"text",onMouseDown:b=>!f&&b.stopPropagation()})});$n.classes=Ur;$n.displayName="@mantine/core/PillsInputField";const ui={size:"sm"},Et=oe((e,t)=>{const s=ne("PillsInput",ui,e),{children:r,onMouseDown:o,onClick:i,size:l,disabled:a,__staticSelector:u,error:d,variant:c,...p}=s,f=P.useRef(null);return n.jsx(ni,{value:{fieldRef:f,size:l,disabled:a,hasError:!!d,variant:c},children:n.jsx(Je,{size:l,error:d,variant:c,component:"div",ref:t,"data-no-overflow":!0,onMouseDown:h=>{h.preventDefault(),o?.(h),f.current?.focus()},onClick:h=>{h.preventDefault(),h.currentTarget.closest("fieldset")?.disabled||(f.current?.focus(),i?.(h))},...p,multiline:!0,disabled:a,__staticSelector:u||"PillsInput",withAria:!1,children:r})})});Et.displayName="@mantine/core/PillsInput";Et.Field=$n;function di({data:e,value:t}){const s=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>($r(i)?o.push({group:i.group,items:i.items.filter(l=>s.indexOf(l.value.toLowerCase().trim())===-1)}):s.indexOf(i.value.toLowerCase().trim())===-1&&o.push(i),o),[])}const pi={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,size:"sm"},On=oe((e,t)=>{const s=ne("MultiSelect",pi,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,size:d,value:c,defaultValue:p,onChange:f,onKeyDown:h,variant:m,data:w,dropdownOpened:g,defaultDropdownOpened:S,onDropdownOpen:y,onDropdownClose:v,selectFirstOptionOnChange:b,onOptionSubmit:x,comboboxProps:D,filter:M,limit:$,withScrollArea:O,maxDropdownHeight:z,searchValue:A,defaultSearchValue:Y,onSearchChange:B,readOnly:I,disabled:F,onFocus:E,onBlur:H,radius:R,rightSection:T,rightSectionWidth:j,rightSectionPointerEvents:C,rightSectionProps:_,leftSection:k,leftSectionWidth:N,leftSectionPointerEvents:W,leftSectionProps:G,inputContainer:ee,inputWrapperOrder:ae,withAsterisk:re,labelProps:K,descriptionProps:te,errorProps:X,wrapperProps:le,description:J,label:pe,error:se,maxValues:we,searchable:Z,nothingFoundMessage:me,withCheckIcon:Ye,withAlignedLabels:he,checkIconPosition:ue,hidePickedOptions:xe,withErrorStyles:et,name:pt,form:Re,id:V,clearable:Te,clearButtonProps:_e,hiddenInputProps:gt,placeholder:yt,hiddenInputValuesDivider:vt,required:it,mod:Dt,renderOption:Ue,onRemove:Le,onClear:xt,scrollAreaProps:Q,chevronColor:Be,attributes:Se,clearSearchOnChange:lt,...$t}=s,$e=Zt(V),_t=yn(w),je=vn(_t),bt=P.useRef({}),ke=xn({opened:g,defaultOpened:S,onDropdownOpen:y,onDropdownClose:()=>{v?.(),ke.resetSelectedOption()}}),{styleProps:kt,rest:{type:Ot,autoComplete:be,...tt}}=hn($t),[U,Ce]=Ke({value:c,defaultValue:p,finalValue:[],onChange:f}),[Oe,Ct]=Ke({value:A,defaultValue:Y,finalValue:"",onChange:B}),Mt=ie=>{Ct(ie),ke.resetSelectedOption()},At=ye({name:"MultiSelect",classes:{},props:s,classNames:r,styles:l,unstyled:a,attributes:Se}),{resolvedClassNames:Bt,resolvedStyles:ns}=Xe({props:s,styles:l,classNames:r}),Ws=ie=>{h?.(ie),ie.key===" "&&!Z&&(ie.preventDefault(),ke.toggleDropdown()),ie.key==="Backspace"&&Oe.length===0&&U.length>0&&(Le?.(U[U.length-1]),Ce(U.slice(0,U.length-1)))},Gs=U.map((ie,rs)=>{const $o=je[ie]||bt.current[ie];return n.jsx(It,{withRemoveButton:!I&&!je[ie]?.disabled,onRemove:()=>{Ce(U.filter(Oo=>ie!==Oo)),Le?.(ie)},unstyled:a,disabled:F,...At("pill"),children:$o?.label||ie},`${ie}-${rs}`)});P.useEffect(()=>{b&&ke.selectFirstOption()},[b,Oe]),P.useEffect(()=>{U.forEach(ie=>{ie in je&&(bt.current[ie]=je[ie])})},[je,U]);const qs=n.jsx(Ie.ClearButton,{..._e,onClear:()=>{xt?.(),Ce([]),Mt("")}}),ce=di({data:_t,value:U}),ze=Te&&U.length>0&&!F&&!I;return n.jsxs(n.Fragment,{children:[n.jsxs(Ie,{store:ke,classNames:Bt,styles:ns,unstyled:a,size:d,readOnly:I,__staticSelector:"MultiSelect",attributes:Se,onOptionSubmit:ie=>{x?.(ie),lt&&Mt(""),ke.updateSelectedOptionIndex("selected"),U.includes(je[ie].value)?(Ce(U.filter(rs=>rs!==je[ie].value)),Le?.(je[ie].value)):U.length<we&&Ce([...U,je[ie].value])},...D,children:[n.jsx(Ie.DropdownTarget,{children:n.jsx(Et,{...kt,__staticSelector:"MultiSelect",classNames:Bt,styles:ns,unstyled:a,size:d,className:o,style:i,variant:m,disabled:F,radius:R,__defaultRightSection:n.jsx(Ie.Chevron,{size:d,error:se,unstyled:a,color:Be}),__clearSection:qs,__clearable:ze,rightSection:T,rightSectionPointerEvents:C||"none",rightSectionWidth:j,rightSectionProps:_,leftSection:k,leftSectionWidth:N,leftSectionPointerEvents:W,leftSectionProps:G,inputContainer:ee,inputWrapperOrder:ae,withAsterisk:re,labelProps:K,descriptionProps:te,errorProps:X,wrapperProps:le,description:J,label:pe,error:se,withErrorStyles:et,__stylesApiProps:{...s,rightSectionPointerEvents:C||(ze?"all":"none"),multiline:!0},pointer:!Z,onClick:()=>Z?ke.openDropdown():ke.toggleDropdown(),"data-expanded":ke.dropdownOpened||void 0,id:$e,required:it,mod:Dt,attributes:Se,children:n.jsxs(It.Group,{attributes:Se,disabled:F,unstyled:a,...At("pillsList"),children:[Gs,n.jsx(Ie.EventsTarget,{autoComplete:be,children:n.jsx(Et.Field,{...tt,ref:t,id:$e,placeholder:yt,type:!Z&&!yt?"hidden":"visible",...At("inputField"),unstyled:a,onFocus:ie=>{E?.(ie),Z&&ke.openDropdown()},onBlur:ie=>{H?.(ie),ke.closeDropdown(),Mt("")},onKeyDown:Ws,value:Oe,onChange:ie=>{Mt(ie.currentTarget.value),Z&&ke.openDropdown(),b&&ke.selectFirstOption()},disabled:F,readOnly:I||!Z,pointer:!Z})})]})})}),n.jsx(bn,{data:xe?ce:_t,hidden:I||F,filter:M,search:Oe,limit:$,hiddenWhenEmpty:!me,withScrollArea:O,maxDropdownHeight:z,filterOptions:Z,value:U,checkIconPosition:ue,withCheckIcon:Ye,withAlignedLabels:he,nothingFoundMessage:me,unstyled:a,labelId:pe?`${$e}-label`:void 0,"aria-label":pe?void 0:$t["aria-label"],renderOption:Ue,scrollAreaProps:Q})]}),n.jsx(Ie.HiddenInput,{name:pt,valuesDivider:vt,value:U,form:Re,disabled:F,...gt})]})});On.classes={...Je.classes,...Ie.classes};On.displayName="@mantine/core/MultiSelect";const[mi,Ds]=Qt("Pagination.Root component was not found in tree");var es={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const hi={withPadding:!0},ts=oe((e,t)=>{const s=ne("PaginationControl",hi,e),{classNames:r,className:o,style:i,styles:l,vars:a,active:u,disabled:d,withPadding:c,mod:p,...f}=s,h=Ds(),m=d||h.disabled;return n.jsx(ot,{ref:t,disabled:m,mod:[{active:u,disabled:m,"with-padding":c},p],...h.getStyles("control",{className:o,style:i,classNames:r,styles:l,active:!m}),...f})});ts.classes=es;ts.displayName="@mantine/core/PaginationControl";function ss({style:e,children:t,path:s,...r}){return n.jsx("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...e},...r,children:n.jsx("path",{d:s,fill:"currentColor"})})}const fi=e=>n.jsx(ss,{...e,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),gi=e=>n.jsx(ss,{...e,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),yi=e=>n.jsx(ss,{...e,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),vi=e=>n.jsx(ss,{...e,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),xi=e=>n.jsx(ss,{...e,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}),bi={icon:xi},_s=oe((e,t)=>{const s=ne("PaginationDots",bi,e),{classNames:r,className:o,style:i,styles:l,vars:a,icon:u,...d}=s,c=Ds();return n.jsx(de,{ref:t,...c.getStyles("dots",{className:o,style:i,styles:l,classNames:r}),...d,children:n.jsx(u,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});_s.classes=es;_s.displayName="@mantine/core/PaginationDots";function ks({icon:e,name:t,action:s,type:r}){const o={icon:e},i=P.forwardRef((l,a)=>{const{icon:u,...d}=ne(t,o,l),c=Ds(),p=r==="next"?c.active===c.total:c.active===1;return n.jsx(ts,{disabled:c.disabled||p,ref:a,onClick:c[s],withPadding:!1,...d,children:n.jsx(u,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});return i.displayName=`@mantine/core/${t}`,Wo(i)}const Zr=ks({icon:fi,name:"PaginationNext",action:"onNext",type:"next"}),Qr=ks({icon:gi,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),Xr=ks({icon:yi,name:"PaginationFirst",action:"onFirst",type:"previous"}),Jr=ks({icon:vi,name:"PaginationLast",action:"onLast",type:"next"});function An({dotsIcon:e}){const t=Ds(),s=t.range.map((r,o)=>r==="dots"?n.jsx(_s,{icon:e},o):n.jsx(ts,{active:r===t.active,"aria-current":r===t.active?"page":void 0,onClick:()=>t.onChange(r),disabled:t.disabled,...t.getItemProps?.(r),children:t.getItemProps?.(r)?.children??r},o));return n.jsx(n.Fragment,{children:s})}An.displayName="@mantine/core/PaginationItems";const Ci={siblings:1,boundaries:1},wi=Me((e,{size:t,radius:s,color:r,autoContrast:o})=>({root:{"--pagination-control-radius":s===void 0?void 0:Xt(s),"--pagination-control-size":De(t,"pagination-control-size"),"--pagination-control-fz":Rt(t),"--pagination-active-bg":r?Mr(r,e):void 0,"--pagination-active-color":qo(o,e)?Go({color:r,theme:e,autoContrast:o}):void 0}})),Ms=oe((e,t)=>{const s=ne("PaginationRoot",Ci,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,total:d,value:c,defaultValue:p,onChange:f,disabled:h,siblings:m,boundaries:w,color:g,radius:S,onNextPage:y,onPreviousPage:v,onFirstPage:b,onLastPage:x,getItemProps:D,autoContrast:M,attributes:$,...O}=s,z=ye({name:"Pagination",classes:es,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:$,vars:u,varsResolver:wi}),{range:A,setPage:Y,next:B,previous:I,active:F,first:E,last:H}=_a({page:c,initialPage:p,onChange:f,total:d,siblings:m,boundaries:w}),R=os(y,B),T=os(v,I),j=os(b,E),C=os(x,H);return n.jsx(mi,{value:{total:d,range:A,active:F,disabled:h,getItemProps:D,onChange:Y,onNext:R,onPrevious:T,onFirst:j,onLast:C,getStyles:z},children:n.jsx(de,{ref:t,...z("root"),...O})})});Ms.classes=es;Ms.displayName="@mantine/core/PaginationRoot";const Si={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8},at=oe((e,t)=>{const s=ne("Pagination",Si,e),{withEdges:r,withControls:o,getControlProps:i,nextIcon:l,previousIcon:a,lastIcon:u,firstIcon:d,dotsIcon:c,total:p,gap:f,hideWithOnePage:h,withPages:m,...w}=s;return p<=0||h&&p===1?null:n.jsx(Ms,{ref:t,total:p,...w,children:n.jsxs(ut,{gap:f,children:[r&&n.jsx(Xr,{icon:d,...i?.("first")}),o&&n.jsx(Qr,{icon:a,...i?.("previous")}),m&&n.jsx(An,{dotsIcon:c}),o&&n.jsx(Zr,{icon:l,...i?.("next")}),r&&n.jsx(Jr,{icon:u,...i?.("last")})]})})});at.classes=es;at.displayName="@mantine/core/Pagination";at.Root=Ms;at.Control=ts;at.Dots=_s;at.First=Xr;at.Last=Jr;at.Next=Zr;at.Previous=Qr;at.Items=An;const ji=({reveal:e})=>n.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:n.jsx("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var ln={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Pi={visibilityToggleIcon:ji},Di=Me((e,{size:t})=>({root:{"--psi-icon-size":De(t,"psi-icon-size"),"--psi-button-size":De(t,"psi-button-size")}})),Vn=oe((e,t)=>{const s=ne("PasswordInput",Pi,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,required:d,error:c,leftSection:p,disabled:f,id:h,variant:m,inputContainer:w,description:g,label:S,size:y,errorProps:v,descriptionProps:b,labelProps:x,withAsterisk:D,inputWrapperOrder:M,wrapperProps:$,radius:O,rightSection:z,rightSectionWidth:A,rightSectionPointerEvents:Y,leftSectionWidth:B,visible:I,defaultVisible:F,onVisibilityChange:E,visibilityToggleIcon:H,visibilityToggleButtonProps:R,rightSectionProps:T,leftSectionProps:j,leftSectionPointerEvents:C,withErrorStyles:_,mod:k,attributes:N,...W}=s,G=Zt(h),[ee,ae]=Ke({value:I,defaultValue:F,finalValue:!1,onChange:E}),re=()=>ae(!ee),K=ye({name:"PasswordInput",classes:ln,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:N,vars:u,varsResolver:Di}),{resolvedClassNames:te,resolvedStyles:X}=Xe({classNames:r,styles:l,props:s}),{styleProps:le,rest:J}=hn(W),pe=v?.id||`${G}-error`,se=b?.id||`${G}-description`,me=`${!!c&&typeof c!="boolean"?pe:""} ${!!g?se:""}`,Ye=me.trim().length>0?me.trim():void 0,he=n.jsx(Ft,{...K("visibilityToggle"),disabled:f,radius:O,"aria-hidden":!R,"aria-pressed":ee,tabIndex:-1,...R,variant:R?.variant??"subtle",color:"gray",unstyled:a,onTouchEnd:ue=>{ue.preventDefault(),R?.onTouchEnd?.(ue),re()},onMouseDown:ue=>{ue.preventDefault(),R?.onMouseDown?.(ue),re()},onKeyDown:ue=>{R?.onKeyDown?.(ue),ue.key===" "&&(ue.preventDefault(),re())},children:n.jsx(H,{reveal:ee})});return n.jsx(Fe.Wrapper,{required:d,id:G,label:S,error:c,description:g,size:y,classNames:te,styles:X,__staticSelector:"PasswordInput",unstyled:a,withAsterisk:D,inputWrapperOrder:M,inputContainer:w,variant:m,labelProps:{...x,htmlFor:G},descriptionProps:{...b,id:se},errorProps:{...v,id:pe},mod:k,attributes:N,...K("root"),...le,...$,children:n.jsx(Fe,{component:"div",error:c,leftSection:p,size:y,classNames:{...te,input:bs(ln.input,te.input)},styles:X,radius:O,disabled:f,__staticSelector:"PasswordInput",rightSectionWidth:A,rightSection:z??he,variant:m,unstyled:a,leftSectionWidth:B,rightSectionPointerEvents:Y||"all",rightSectionProps:T,leftSectionProps:j,leftSectionPointerEvents:C,withAria:!1,withErrorStyles:_,attributes:N,children:n.jsx("input",{required:d,"data-invalid":!!c||void 0,"data-with-left-section":!!p||void 0,...K("innerInput"),disabled:f,id:G,ref:t,...J,"aria-describedby":Ye,autoComplete:J.autoComplete||"off",type:ee?"text":"password"})})})});Vn.classes={...Je.classes,...ln};Vn.displayName="@mantine/core/PasswordInput";function _i({spacing:e,verticalSpacing:t,cols:s,selector:r}){const o=ys(),i=t===void 0?e:t,l=vs({"--sg-spacing-x":Ge(rt(e)),"--sg-spacing-y":Ge(rt(i)),"--sg-cols":rt(s)?.toString()}),a=dt(o.breakpoints).reduce((c,p)=>(c[p]||(c[p]={}),typeof e=="object"&&e[p]!==void 0&&(c[p]["--sg-spacing-x"]=Ge(e[p])),typeof i=="object"&&i[p]!==void 0&&(c[p]["--sg-spacing-y"]=Ge(i[p])),typeof s=="object"&&s[p]!==void 0&&(c[p]["--sg-cols"]=s[p]),c),{}),d=gn(dt(a),o.breakpoints).filter(c=>dt(a[c.value]).length>0).map(c=>({query:`(min-width: ${o.breakpoints[c.value]})`,styles:a[c.value]}));return n.jsx(xs,{styles:l,media:d,selector:r})}function Us(e){return typeof e=="object"&&e!==null?dt(e):[]}function ki(e){return e.sort((t,s)=>Xn(t)-Xn(s))}function Mi({spacing:e,verticalSpacing:t,cols:s}){const r=Array.from(new Set([...Us(e),...Us(t),...Us(s)]));return ki(r)}function Ni({spacing:e,verticalSpacing:t,cols:s,selector:r}){const o=t===void 0?e:t,i=vs({"--sg-spacing-x":Ge(rt(e)),"--sg-spacing-y":Ge(rt(o)),"--sg-cols":rt(s)?.toString()}),l=Mi({spacing:e,verticalSpacing:t,cols:s}),a=l.reduce((d,c)=>(d[c]||(d[c]={}),typeof e=="object"&&e[c]!==void 0&&(d[c]["--sg-spacing-x"]=Ge(e[c])),typeof o=="object"&&o[c]!==void 0&&(d[c]["--sg-spacing-y"]=Ge(o[c])),typeof s=="object"&&s[c]!==void 0&&(d[c]["--sg-cols"]=s[c]),d),{}),u=l.map(d=>({query:`simple-grid (min-width: ${d})`,styles:a[d]}));return n.jsx(xs,{styles:i,container:u,selector:r})}var eo={container:"m_925c2d2c",root:"m_2415a157"};const Li={cols:1,spacing:"md",type:"media"},Ns=oe((e,t)=>{const s=ne("SimpleGrid",Li,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,cols:d,verticalSpacing:c,spacing:p,type:f,attributes:h,...m}=s,w=ye({name:"SimpleGrid",classes:eo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:h,vars:u}),g=mn();return f==="container"?n.jsxs(n.Fragment,{children:[n.jsx(Ni,{...s,selector:`.${g}`}),n.jsx("div",{...w("container"),children:n.jsx(de,{ref:t,...w("root",{className:g}),...m})})]}):n.jsxs(n.Fragment,{children:[n.jsx(_i,{...s,selector:`.${g}`}),n.jsx(de,{ref:t,...w("root",{className:g}),...m})]})});Ns.classes=eo;Ns.displayName="@mantine/core/SimpleGrid";const[Ii,Ls]=Qt("SliderProvider was not found in tree"),to=P.forwardRef(({size:e,disabled:t,variant:s,color:r,thumbSize:o,radius:i,...l},a)=>{const{getStyles:u}=Ls();return n.jsx(de,{tabIndex:-1,variant:s,size:e,ref:a,...u("root"),...l})});to.displayName="@mantine/core/SliderRoot";const so=P.forwardRef(({max:e,min:t,value:s,position:r,label:o,dragging:i,onMouseDown:l,onKeyDownCapture:a,labelTransitionProps:u,labelAlwaysOn:d,thumbLabel:c,onFocus:p,onBlur:f,showLabelOnHover:h,isHovered:m,children:w=null,disabled:g},S)=>{const{getStyles:y}=Ls(),[v,b]=P.useState(!1),x=d||i||v||h&&m;return n.jsxs(de,{tabIndex:0,role:"slider","aria-label":c,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":s,ref:S,__vars:{"--slider-thumb-offset":`${r}%`},...y("thumb",{focusable:!0}),mod:{dragging:i,disabled:g},onFocus:D=>{b(!0),typeof p=="function"&&p(D)},onBlur:D=>{b(!1),typeof f=="function"&&f(D)},onTouchStart:l,onMouseDown:l,onKeyDownCapture:a,onClick:D=>D.stopPropagation(),children:[w,n.jsx(Ko,{mounted:o!=null&&!!x,transition:"fade",duration:0,...u,children:D=>n.jsx("div",{...y("label",{style:D}),children:o})})]})});so.displayName="@mantine/core/SliderThumb";function no({value:e,min:t,max:s}){const r=(e-t)/(s-t)*100;return Math.min(Math.max(r,0),100)}function Ri({mark:e,offset:t,value:s,inverted:r=!1}){return r?typeof t=="number"&&e.value<=t||e.value>=s:typeof t=="number"?e.value>=t&&e.value<=s:e.value<=s}function ro({marks:e,min:t,max:s,disabled:r,value:o,offset:i,inverted:l}){const{getStyles:a}=Ls();if(!e)return null;const u=e.map((d,c)=>P.createElement(de,{...a("markWrapper"),__vars:{"--mark-offset":`${no({value:d.value,min:t,max:s})}%`},key:c},n.jsx(de,{...a("mark"),mod:{filled:Ri({mark:d,value:o,offset:i,inverted:l}),disabled:r}}),d.label&&n.jsx("div",{...a("markLabel"),children:d.label})));return n.jsx("div",{children:u})}ro.displayName="@mantine/core/SliderMarks";function oo({filled:e,children:t,offset:s,disabled:r,marksOffset:o,inverted:i,containerProps:l,...a}){const{getStyles:u}=Ls();return n.jsx(de,{...u("trackContainer"),mod:{disabled:r},...l,children:n.jsxs(de,{...u("track"),mod:{inverted:i,disabled:r},children:[n.jsx(de,{mod:{inverted:i,disabled:r},__vars:{"--slider-bar-width":`calc(${e}% + 2 * var(--slider-size))`,"--slider-bar-offset":`calc(${s}% - var(--slider-size))`},...u("bar")}),t,n.jsx(ro,{...a,offset:o,disabled:r,inverted:i})]})})}oo.displayName="@mantine/core/SliderTrack";function Ti({value:e,containerWidth:t,min:s,max:r,step:o,precision:i}){const a=(t?Math.min(Math.max(e,0),t)/t:e)*(r-s),u=(a!==0?Math.round(a/o)*o:0)+s,d=Math.max(u,s);return i!==void 0?Number(d.toFixed(i)):d}function is(e,t){return parseFloat(e.toFixed(t))}function $i(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}function Zs(e,t){const r=[...t].sort((o,i)=>o.value-i.value).find(o=>o.value>e);return r?r.value:e}function Qs(e,t){const r=[...t].sort((o,i)=>i.value-o.value).find(o=>o.value<e);return r?r.value:e}function gr(e){const t=[...e].sort((s,r)=>s.value-r.value);return t.length>0?t[0].value:0}function yr(e){const t=[...e].sort((s,r)=>s.value-r.value);return t.length>0?t[t.length-1].value:100}var ao={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};const Oi={radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:"fade",duration:0},thumbLabel:"",showLabelOnHover:!0,scale:e=>e,size:"md"},Ai=Me((e,{size:t,color:s,thumbSize:r,radius:o})=>({root:{"--slider-size":De(t,"slider-size"),"--slider-color":s?Mr(s,e):void 0,"--slider-radius":o===void 0?void 0:Xt(o),"--slider-thumb-size":r!==void 0?He(r):"calc(var(--slider-size) * 2)"}})),Fn=oe((e,t)=>{const s=ne("Slider",Oi,e),{classNames:r,styles:o,value:i,onChange:l,onChangeEnd:a,size:u,min:d,max:c,domain:p,step:f,precision:h,defaultValue:m,name:w,marks:g,label:S,labelTransitionProps:y,labelAlwaysOn:v,thumbLabel:b,showLabelOnHover:x,thumbChildren:D,disabled:M,unstyled:$,scale:O,inverted:z,className:A,style:Y,vars:B,hiddenInputProps:I,restrictToMarks:F,thumbProps:E,attributes:H,...R}=s,T=ye({name:"Slider",props:s,classes:ao,classNames:r,className:A,styles:o,style:Y,attributes:H,vars:B,varsResolver:Ai,unstyled:$}),{dir:j}=Uo(),[C,_]=P.useState(!1),[k,N]=Ke({value:typeof i=="number"?Ze(i,d,c):i,defaultValue:typeof m=="number"?Ze(m,d,c):m,finalValue:Ze(0,d,c),onChange:l}),W=P.useRef(k),G=P.useRef(a);P.useEffect(()=>{G.current=a},[a]);const ee=P.useRef(null),ae=P.useRef(null),[re,K]=p||[d,c],te=no({value:k,min:re,max:K}),X=O(k),le=typeof S=="function"?S(X):S,J=h??$i(f),pe=P.useCallback(({x:he})=>{if(!M){const ue=Ti({value:he,min:re,max:K,step:f,precision:J}),xe=Ze(ue,d,c);N(F&&g?.length?nr(xe,g.map(et=>et.value)):xe),W.current=xe}},[M,d,c,re,K,f,J,N,g,F]),se=P.useCallback(()=>{if(!M&&G.current){const he=F&&g?.length?nr(W.current,g.map(ue=>ue.value)):W.current;G.current(he)}},[M,g,F]),{ref:we,active:Z}=Cn(pe,{onScrubEnd:se},j),me=P.useCallback(he=>{!M&&G.current&&G.current(he)},[M]),Ye=he=>{if(!M)switch(he.key){case"ArrowUp":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=Zs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(k+f,d),c),J);N(ue),me(ue);break}case"ArrowRight":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=j==="rtl"?Qs(k,g):Zs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(j==="rtl"?k-f:k+f,d),c),J);N(ue),me(ue);break}case"ArrowDown":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=Qs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(k-f,d),c),J);N(ue),me(ue);break}case"ArrowLeft":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=j==="rtl"?Zs(k,g):Qs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(j==="rtl"?k+f:k-f,d),c),J);N(ue),me(ue);break}case"Home":{if(he.preventDefault(),ae.current?.focus(),F&&g){N(gr(g)),me(gr(g));break}N(d),me(d);break}case"End":{if(he.preventDefault(),ae.current?.focus(),F&&g){N(yr(g)),me(yr(g));break}N(c),me(c);break}}};return n.jsx(Ii,{value:{getStyles:T},children:n.jsxs(to,{...R,ref:nt(t,ee),onKeyDownCapture:Ye,onMouseDownCapture:()=>ee.current?.focus(),size:u,disabled:M,children:[n.jsx(oo,{inverted:z,offset:0,filled:te,marks:g,min:re,max:K,value:X,disabled:M,containerProps:{ref:we,onMouseEnter:x?()=>_(!0):void 0,onMouseLeave:x?()=>_(!1):void 0},children:n.jsx(so,{max:K,min:re,value:X,position:te,dragging:Z,label:le,ref:ae,labelTransitionProps:y,labelAlwaysOn:v,thumbLabel:b,showLabelOnHover:x,isHovered:C,disabled:M,...E,children:D})}),n.jsx("input",{type:"hidden",name:w,value:X,...I})]})})});Fn.classes=ao;Fn.displayName="@mantine/core/Slider";function Vi({data:e,value:t}){const s=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>($r(i)?o.push({group:i.group,items:i.items.filter(l=>s.indexOf(l.label.toLowerCase().trim())===-1)}):s.indexOf(i.label.toLowerCase().trim())===-1&&o.push(i),o),[])}function Fi(e,t){return e?t.split(new RegExp(`[${e.join("")}]`)).map(s=>s.trim()).filter(s=>s!==""):[t]}function vr({splitChars:e,allowDuplicates:t,maxTags:s,value:r,currentTags:o}){const i=Fi(e,r),l=t?[...o,...i]:[...new Set([...o,...i])];return s?l.slice(0,s):l}const Ei={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",size:"sm"},En=oe((e,t)=>{const s=ne("TagsInput",Ei,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,size:d,value:c,defaultValue:p,onChange:f,onKeyDown:h,maxTags:m,allowDuplicates:w,onDuplicate:g,variant:S,data:y,dropdownOpened:v,defaultDropdownOpened:b,onDropdownOpen:x,onDropdownClose:D,selectFirstOptionOnChange:M,onOptionSubmit:$,comboboxProps:O,filter:z,limit:A,withScrollArea:Y,maxDropdownHeight:B,searchValue:I,defaultSearchValue:F,onSearchChange:E,readOnly:H,disabled:R,splitChars:T,onFocus:j,onBlur:C,onPaste:_,radius:k,rightSection:N,rightSectionWidth:W,rightSectionPointerEvents:G,rightSectionProps:ee,leftSection:ae,leftSectionWidth:re,leftSectionPointerEvents:K,leftSectionProps:te,inputContainer:X,inputWrapperOrder:le,withAsterisk:J,required:pe,labelProps:se,descriptionProps:we,errorProps:Z,wrapperProps:me,description:Ye,label:he,error:ue,withErrorStyles:xe,name:et,form:pt,id:Re,clearable:V,clearButtonProps:Te,hiddenInputProps:_e,hiddenInputValuesDivider:gt,mod:yt,renderOption:vt,onRemove:it,onClear:Dt,scrollAreaProps:Ue,acceptValueOnBlur:Le,isDuplicate:xt,attributes:Q,...Be}=s,Se=Zt(Re),lt=yn(y),$t=vn(lt),$e=P.useRef(null),_t=nt($e,t),je=xn({opened:v,defaultOpened:b,onDropdownOpen:x,onDropdownClose:()=>{D?.(),je.resetSelectedOption()}}),{styleProps:bt,rest:{type:ke,autoComplete:kt,...Ot}}=hn(Be),[be,tt]=Ke({value:c,defaultValue:p,finalValue:[],onChange:f}),[U,Ce]=Ke({value:I,defaultValue:F,finalValue:"",onChange:E}),Oe=ce=>{Ce(ce),je.resetSelectedOption()},Ct=ye({name:"TagsInput",classes:{},props:s,classNames:r,styles:l,unstyled:a}),{resolvedClassNames:Mt,resolvedStyles:At}=Xe({props:s,styles:l,classNames:r}),Bt=ce=>{const ze=xt?xt(ce,be):be.some(ie=>ie.toLowerCase()===ce.toLowerCase());ze&&g?.(ce),(!ze||ze&&w)&&be.length<m&&($?.(ce),Oe(""),ce.length>0&&tt([...be,ce]))},ns=ce=>{if(h?.(ce),ce.isPropagationStopped())return;const ze=U.trim(),{length:ie}=ze;if(T.includes(ce.key)&&ie>0&&(tt(vr({splitChars:T,allowDuplicates:w,maxTags:m,value:U,currentTags:be})),Oe(""),ce.preventDefault()),ce.key==="Enter"&&ie>0&&!ce.nativeEvent.isComposing){if(ce.preventDefault(),!!document.querySelector(`#${je.listId} [data-combobox-option][data-combobox-selected]`))return;Bt(ze)}ce.key==="Backspace"&&ie===0&&be.length>0&&!ce.nativeEvent.isComposing&&!H&&(it?.(be[be.length-1]),tt(be.slice(0,be.length-1)))},Ws=ce=>{if(_?.(ce),ce.preventDefault(),ce.clipboardData){const ze=ce.clipboardData.getData("text/plain");tt(vr({splitChars:T,allowDuplicates:w,maxTags:m,value:`${U}${ze}`,currentTags:be})),Oe("")}},Gs=be.map((ce,ze)=>n.jsx(It,{withRemoveButton:!H,onRemove:()=>{const ie=be.slice();ie.splice(ze,1),tt(ie),it?.(ce)},unstyled:a,disabled:R,attributes:Q,...Ct("pill"),children:ce},`${ce}-${ze}`));P.useEffect(()=>{M&&je.selectFirstOption()},[M,be,U]);const qs=n.jsx(Ie.ClearButton,{...Te,onClear:()=>{tt([]),Oe(""),$e.current?.focus(),je.openDropdown(),Dt?.()}});return n.jsxs(n.Fragment,{children:[n.jsxs(Ie,{store:je,classNames:Mt,styles:At,unstyled:a,size:d,readOnly:H,__staticSelector:"TagsInput",attributes:Q,onOptionSubmit:ce=>{$?.(ce),Oe(""),be.length<m&&tt([...be,$t[ce].label]),je.resetSelectedOption()},...O,children:[n.jsx(Ie.DropdownTarget,{children:n.jsx(Et,{...bt,__staticSelector:"TagsInput",classNames:Mt,styles:At,unstyled:a,size:d,className:o,style:i,variant:S,disabled:R,radius:k,rightSection:N,__clearSection:qs,__clearable:V&&be.length>0&&!R&&!H,rightSectionWidth:W,rightSectionPointerEvents:G,rightSectionProps:ee,leftSection:ae,leftSectionWidth:re,leftSectionPointerEvents:K,leftSectionProps:te,inputContainer:X,inputWrapperOrder:le,withAsterisk:J,required:pe,labelProps:se,descriptionProps:we,errorProps:Z,wrapperProps:me,description:Ye,label:he,error:ue,withErrorStyles:xe,__stylesApiProps:{...s,multiline:!0},id:Se,mod:yt,attributes:Q,children:n.jsxs(It.Group,{disabled:R,unstyled:a,...Ct("pillsList"),children:[Gs,n.jsx(Ie.EventsTarget,{autoComplete:kt,children:n.jsx(Et.Field,{...Ot,ref:_t,...Ct("inputField"),unstyled:a,onKeyDown:ns,onFocus:ce=>{j?.(ce),je.openDropdown()},onBlur:ce=>{C?.(ce),Le&&Bt(U),je.closeDropdown()},onPaste:Ws,value:U,onChange:ce=>Oe(ce.currentTarget.value),required:pe&&be.length===0,disabled:R,readOnly:H,id:Se})})]})})}),n.jsx(bn,{data:Vi({data:lt,value:be}),hidden:H||R,filter:z,search:U,limit:A,hiddenWhenEmpty:!0,withScrollArea:Y,maxDropdownHeight:B,unstyled:a,labelId:he?`${Se}-label`:void 0,"aria-label":he?void 0:Be["aria-label"],renderOption:vt,scrollAreaProps:Ue})]}),n.jsx(Ie.HiddenInput,{name:et,form:pt,value:be,valuesDivider:gt,disabled:R,..._e})]})});En.classes={...Je.classes,...Ie.classes};En.displayName="@mantine/core/TagsInput";const Yi=[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]],zi=Ne("outline","arrows-sort","ArrowsSort",Yi);const Bi=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]],Hi=Ne("outline","at","At",Bi);const Wi=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Xs=Ne("outline","calendar","Calendar",Wi);const Gi=[["path",{d:"M11 7l6 6",key:"svg-0"}],["path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4",key:"svg-1"}]],qi=Ne("outline","color-picker","ColorPicker",Gi);const Ki=[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]],Ui=Ne("outline","columns","Columns",Ki);const Zi=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}]],Qi=Ne("outline","file","File",Zi);const Xi=[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}]],io=Ne("outline","filter","Filter",Xi);const Ji=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],el=Ne("outline","grip-vertical","GripVertical",Ji);const tl=[["path",{d:"M5 9l14 0",key:"svg-0"}],["path",{d:"M5 15l14 0",key:"svg-1"}],["path",{d:"M11 4l-4 16",key:"svg-2"}],["path",{d:"M17 4l-4 16",key:"svg-3"}]],sl=Ne("outline","hash","Hash",tl);const nl=[["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],rl=Ne("outline","info-triangle","InfoTriangle",nl);const ol=[["path",{d:"M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0",key:"svg-0"}],["path",{d:"M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5",key:"svg-1"}],["path",{d:"M3 13h7",key:"svg-2"}],["path",{d:"M21 12v7",key:"svg-3"}]],al=Ne("outline","letter-case","LetterCase",ol);const il=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],xr=Ne("outline","link","Link",il);const ll=[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]],cl=Ne("outline","list","List",ll);const ul=[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]],br=Ne("outline","mail","Mail",ul);const dl=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],pl=Ne("outline","palette","Palette",dl);const ml=[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}]],Cr=Ne("outline","phone","Phone",ml);const hl=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],fl=Ne("outline","selector","Selector",hl);const gl=[["path",{d:"M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6",key:"svg-1"}]],yl=Ne("outline","toggle-left","ToggleLeft",gl),vl=e=>{const{type:t,format:s,name:r,isEnum:o,isArray:i,size:l="sm"}=e,a=qe.sizes.icon[l];if(s)switch(s){case"email":return n.jsx(br,{size:a});case"url":case"uri":return n.jsx(xr,{size:a});case"tel":case"phone":return n.jsx(Cr,{size:a});case"date":return n.jsx(Xs,{size:a});case"date-time":return n.jsx(Xs,{size:a});case"time":return n.jsx(tr,{size:a});case"color":return n.jsx(qi,{size:a});case"uuid":return n.jsx(er,{size:a})}if(r){const u=r.toLowerCase();if(u.includes("password")||u.includes("secret"))return n.jsx(er,{size:a});if(u.includes("email")||u.includes("mail"))return n.jsx(br,{size:a});if(u.includes("url")||u.includes("link"))return n.jsx(xr,{size:a});if(u.includes("phone")||u.includes("tel"))return n.jsx(Cr,{size:a});if(u.includes("color"))return n.jsx(pl,{size:a});if(u.includes("file")||u.includes("upload"))return n.jsx(Qi,{size:a});if(u.includes("date"))return n.jsx(Xs,{size:a});if(u.includes("time"))return n.jsx(tr,{size:a})}if(o||i)return n.jsx(fl,{size:a});if(t)switch(t){case"boolean":return n.jsx(yl,{size:a});case"number":case"integer":return n.jsx(sl,{size:a});case"array":return n.jsx(cl,{size:a});case"string":return n.jsx(al,{size:a})}return n.jsx(Hi,{size:a})},xl=e=>e.charAt(0).toUpperCase()+e.slice(1),bl=e=>xl(e.replaceAll("/","")),Yt=(e,t)=>{const r=e.input.props.id,o=e.title??("title"in e.input.schema&&typeof e.input.schema.title=="string"?e.input.schema.title:void 0)??bl(e.input.path),i=e.description??("description"in e.input.schema&&typeof e.input.schema.description=="string"?e.input.schema.description:void 0),l=t.error&&t.error instanceof Zo?t.error.value.message:void 0,a=e.icon?P.isValidElement(e.icon)?e.icon:P.createElement(e.icon,{size:qe.sizes.icon.md}):vl({type:e.input.schema&&"type"in e.input.schema?String(e.input.schema.type):void 0,format:e.input.schema&&"format"in e.input.schema&&typeof e.input.schema.format=="string"?e.input.schema.format:void 0,name:e.input.props.name,isEnum:e.input.schema&&"enum"in e.input.schema&&!!e.input.schema.enum,isArray:e.input.schema&&"type"in e.input.schema&&e.input.schema.type==="array"}),u=e.input.schema&&"format"in e.input.schema&&typeof e.input.schema.format=="string"?e.input.schema.format:void 0,d=e.input.required,c=e.input.schema,p={label:o,description:i,error:l,required:d,disabled:!1};return"minLength"in c&&typeof c.minLength=="number"&&(p.minLength=c.minLength),"maxLength"in c&&typeof c.maxLength=="number"&&(p.maxLength=c.maxLength),"minimum"in c&&typeof c.minimum=="number"&&(p.minimum=c.minimum),"maximum"in c&&typeof c.maximum=="number"&&(p.maximum=c.maximum),{id:r,icon:a,format:u,schema:e.input.schema,inputProps:p}},Cl=e=>{const{inputProps:t}=Yt(e,{}),s=P.useRef(0),[r,o]=P.useState(()=>{const v=e.input?.props?.defaultValue;return Array.isArray(v)?v.map(b=>({key:s.current++,value:b})):[]});if(fn({"form:reset":v=>{if(v.id===e.input?.form?.id){const b=e.input?.props?.defaultValue;Array.isArray(b)?(s.current=0,o(b.map(x=>({key:s.current++,value:x})))):o([])}}},[e.input]),!e.input?.props)return null;const i=e.input.schema;if(!i||!("items"in i))return null;const l=i.items,a=l&&"properties"in l,{min:u=0,max:d=Number.POSITIVE_INFINITY,columns:c=1}=e,p=v=>{e.input.set(v.map(b=>b.value))},f=()=>{if(r.length>=d)return;let v;if(a){v={};const x=l;for(const[D,M]of Object.entries(x.properties))"default"in M&&(v[D]=M.default)}else v="";const b=[...r,{key:s.current++,value:v}];o(b),p(b)},h=v=>{if(r.length<=u)return;const b=r.filter((x,D)=>D!==v);o(b),p(b)},m=(v,b)=>{const x=[...r];x[v]={...x[v],value:b},o(x),p(x)},w=(v,b,x)=>{const D=[...r];D[v]={...D[v],value:{...D[v].value,[b]:x}},o(D),p(D)},g=12/c,S=a?Object.keys(l.properties):[],y=()=>n.jsxs(We,{gap:"sm",children:[r.map((v,b)=>n.jsxs(fe,{gap:"sm",align:"flex-start",p:"xs",bg:qe.colors.surface,style:{borderRadius:"var(--mantine-radius-sm)"},children:[e.sortable&&n.jsx(Ft,{variant:"subtle",color:"gray",style:{cursor:"grab"},children:n.jsx(el,{size:16})}),a?n.jsx(ht,{style:{flex:1},gutter:"sm",children:S.map(x=>{const D=l.properties[x],M=e.controlProps?.[x]??{},$={schema:D,props:{id:`${e.input.props.id}-${v.key}-${x}`,name:`${e.input.props.name}[${b}].${x}`,defaultValue:v.value?.[x]},path:`${e.input.path}/${b}/${x}`,required:l.required?.includes(x)??!1,form:e.input.form,set:O=>w(b,x,O)};return n.jsx(ht.Col,{span:g,children:n.jsx(gs,{input:$,...M})},x)})}):n.jsx(fe,{style:{flex:1},children:n.jsx(gs,{input:{schema:l,props:{id:`${e.input.props.id}-${v.key}`,name:`${e.input.props.name}[${b}]`,defaultValue:v.value},path:`${e.input.path}/${b}`,required:!1,form:e.input.form,set:x=>m(b,x)},...e.itemControlProps})}),n.jsx(Ft,{variant:"subtle",color:"red",onClick:()=>h(b),disabled:r.length<=u,children:n.jsx(fa,{size:16})})]},v.key)),n.jsxs(ot,{onClick:f,disabled:r.length>=d,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 12px",borderRadius:"var(--mantine-radius-sm)",border:"1px dashed var(--mantine-color-dimmed)",color:"var(--mantine-color-dimmed)",fontSize:"var(--mantine-font-size-sm)",cursor:r.length>=d?"not-allowed":"pointer",opacity:r.length>=d?.5:1,transition:"all 150ms ease"},onMouseEnter:v=>{r.length<d&&(v.currentTarget.style.borderColor="var(--mantine-color-blue-filled)",v.currentTarget.style.color="var(--mantine-color-blue-filled)",v.currentTarget.style.background="var(--mantine-color-blue-light)")},onMouseLeave:v=>{v.currentTarget.style.borderColor="var(--mantine-color-dimmed)",v.currentTarget.style.color="var(--mantine-color-dimmed)",v.currentTarget.style.background="transparent"},children:[n.jsx(ga,{size:14}),e.addLabel??"Add"]})]});return e.variant==="plain"?n.jsxs(We,{gap:"xs",children:[t.label&&n.jsx(ve,{size:"sm",fw:500,children:t.label}),t.description&&n.jsx(ve,{size:"sm",c:"dimmed",children:t.description}),y(),t.error&&n.jsx(ve,{size:"sm",c:"red",children:t.error})]}):n.jsx(js,{legend:t.label,children:n.jsxs(We,{gap:"xs",children:[t.description&&n.jsx(ve,{size:"sm",c:"dimmed",children:t.description}),y(),t.error&&n.jsx(ve,{size:"sm",c:"red",children:t.error})]})})};function wl({direction:e,levelIndex:t,rowIndex:s,cellIndex:r,size:o}){switch(e){case"up":return t===0&&s===0?null:s===0?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:s-1,cellIndex:r};case"down":return s===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:r}:s===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:s+1,cellIndex:r};case"left":return t===0&&s===0&&r===0?null:s===0&&r===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:s-1,cellIndex:o[t][s-1]-1}:{levelIndex:t,rowIndex:s,cellIndex:r-1};case"right":return s===o[t].length-1&&r===o[t][s]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][s]-1?{levelIndex:t,rowIndex:s+1,cellIndex:0}:{levelIndex:t,rowIndex:s,cellIndex:r+1};default:return{levelIndex:t,rowIndex:s,cellIndex:r}}}function lo({controlsRef:e,direction:t,levelIndex:s,rowIndex:r,cellIndex:o,size:i}){const l=wl({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:s});if(!l)return;const a=e.current?.[l.levelIndex]?.[l.rowIndex]?.[l.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?lo({controlsRef:e,direction:t,levelIndex:l.levelIndex,cellIndex:l.cellIndex,rowIndex:l.rowIndex,size:i}):a.focus())}function Sl(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function jl(e){return e.current?.map(t=>t.map(s=>s.length))}function Yn({controlsRef:e,levelIndex:t,rowIndex:s,cellIndex:r,event:o}){const i=Sl(o.key);if(i){o.preventDefault();const l=jl(e);lo({controlsRef:e,direction:i,levelIndex:t,rowIndex:s,cellIndex:r,size:l})}}function wr(e,t){let s=e?L(e):L();if(t==="")return s.format("YYYY-MM-DD HH:mm:ss");const[r,o,i=0]=t.split(":").map(Number);return s=s.set("hour",r),s=s.set("minute",o),s=s.set("second",i),s=s.set("millisecond",0),s.format("YYYY-MM-DD HH:mm:ss")}function Ee(e){return e==null||e===""?e:L(e).format("YYYY-MM-DD")}function Vt(e){return e==null||e===""?e:L(e).format("YYYY-MM-DD HH:mm:ss")}function Pl({minDate:e,maxDate:t}){const s=L();return!e&&!t?Ee(s):e&&L(s).isBefore(e)?Ee(e):t&&L(s).isAfter(t)?Ee(t):Ee(s)}function Js(e,t,s){return!e&&!t?Vt(s):e&&L(s).isBefore(e)?Vt(e):t&&L(s).isAfter(t)?Vt(t):Vt(s)}const Dl={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},_l=P.createContext(Dl);function ft(){const e=P.useContext(_l),t=P.useCallback(i=>i||e.locale,[e.locale]),s=P.useCallback(i=>typeof i=="number"?i:e.firstDayOfWeek,[e.firstDayOfWeek]),r=P.useCallback(i=>Array.isArray(i)?i:e.weekendDays,[e.weekendDays]),o=P.useCallback(i=>typeof i=="string"?i:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:s,getWeekendDays:r,getLabelSeparator:o}}function kl({value:e,type:t,withTime:s}){const r=s?Vt:Ee;if(t==="range"&&Array.isArray(e)){const o=r(e[0]),i=r(e[1]);return o?i?`${o} – ${i}`:`${o} –`:""}return t==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?r(e):""}function zn({value:e,type:t,name:s,form:r,withTime:o=!1}){return n.jsx("input",{type:"hidden",value:kl({value:e,type:t,withTime:o}),name:s,form:r})}zn.displayName="@mantine/dates/HiddenDatesInput";var Ml={input:"m_468e7eda"};const Bn=oe((e,t)=>{const s=ne("TimeInput",null,e),{classNames:r,styles:o,unstyled:i,vars:l,withSeconds:a,minTime:u,maxTime:d,value:c,onChange:p,step:f,...h}=s,{resolvedClassNames:m,resolvedStyles:w}=Xe({classNames:r,styles:o,props:s}),g=y=>{if(u!==void 0||d!==void 0){const[v,b,x]=y.split(":").map(Number);if(u){const[D,M,$]=u.split(":").map(Number);if(v<D||v===D&&b<M||a&&v===D&&b===M&&x<$)return-1}if(d){const[D,M,$]=d.split(":").map(Number);if(v>D||v===D&&b>M||a&&v===D&&b===M&&x>$)return 1}}return 0},S=y=>{if(s.onBlur?.(y),u!==void 0||d!==void 0){const v=y.currentTarget.value;if(v){const b=g(v);b===1?(d&&(y.currentTarget.value=d),s.onChange?.(y)):b===-1&&(u&&(y.currentTarget.value=u),s.onChange?.(y))}}};return n.jsx(Je,{classNames:{...m,input:bs(Ml.input,m?.input)},styles:w,unstyled:i,ref:t,value:c,step:f??(a?1:60),...h,onChange:p,onBlur:S,type:"time",__staticSelector:"TimeInput"})});Bn.classes=Je.classes;Bn.displayName="@mantine/dates/TimeInput";function Ve(e){return e<10?`0${e}`:`${e}`}const Nl=e=>Number(e.toFixed(0)[0]),cs=P.forwardRef(({value:e,min:t,max:s,onChange:r,focusable:o,step:i,onNextInput:l,onPreviousInput:a,onFocus:u,readOnly:d,allowTemporaryZero:c=!1,placeholder:p="--",...f},h)=>{const m=Nl(s),w=s+1-i,g=y=>{if(d)return;const v=y.replace(/\D/g,"");if(v!==""){const b=parseInt(v,10),x=c&&b===0&&t>0?0:Ze(b,t,s);r(x),(x>m||y.startsWith("00"))&&l?.()}},S=y=>{if(!d){if((y.key==="0"||y.key==="Num0")&&e===0&&(y.preventDefault(),l?.()),y.key==="Home"&&(y.preventDefault(),r(t)),y.key==="End"&&(y.preventDefault(),r(s)),(y.key==="Backspace"||y.key==="Delete")&&(y.preventDefault(),e!==null?r(null):a?.()),y.key==="ArrowRight"&&(y.preventDefault(),l?.()),y.key==="ArrowLeft"&&(y.preventDefault(),a?.()),y.key==="ArrowUp"){y.preventDefault();const v=e===null?t:Ze(e+i,t,w);r(v)}if(y.key==="ArrowDown"){y.preventDefault();const v=e===null?w:Ze(e-i,t,w);r(v)}}};return n.jsx("input",{ref:h,type:"text",role:"spinbutton","aria-valuemin":t,"aria-valuemax":s,"aria-valuenow":e===null?0:e,"data-empty":e===null||void 0,inputMode:"numeric",placeholder:p,value:e===null?"":Ve(e),onChange:y=>g(y.currentTarget.value),onKeyDown:S,onFocus:y=>{y.currentTarget.select(),u?.(y)},onClick:y=>{y.stopPropagation(),y.currentTarget.select()},onMouseDown:y=>y.stopPropagation(),...f})});cs.displayName="@mantine/dates/SpinInput";const[Ll,Tt]=Qt("TimeInput component was not found in the component tree"),co=P.forwardRef(({labels:e,value:t,onChange:s,className:r,style:o,onPreviousInput:i,readOnly:l,onMouseDown:a,onTouchStart:u,inputType:d,...c},p)=>{const f=Tt(),h=m=>{l||(m.key==="Home"&&(m.preventDefault(),s(e.am)),m.key==="End"&&(m.preventDefault(),s(e.pm)),(m.key==="Backspace"||m.key==="Delete")&&(m.preventDefault(),t===null?i?.():s(null)),m.key==="ArrowLeft"&&(m.preventDefault(),i?.()),(m.key==="ArrowUp"||m.key==="ArrowDown")&&(m.preventDefault(),s(t===e.am?e.pm:e.am)),m.code==="KeyA"&&(m.preventDefault(),s(e.am)),m.code==="KeyP"&&(m.preventDefault(),s(e.pm)))};if(d==="input"){const m=t||"--",w=m.length+1;return n.jsx("input",{...f.getStyles("field",{className:r,style:o}),ref:p,value:m,size:w,readOnly:!0,onChange:()=>{},onClick:(g=>g.stopPropagation()),onKeyDown:h,onMouseDown:g=>{g.stopPropagation(),a?.(g)},"data-am-pm":!0,...c})}return n.jsxs("select",{...f.getStyles("field",{className:r,style:o}),ref:p,value:t||"",onChange:m=>!l&&s(m.target.value||null),onClick:m=>m.stopPropagation(),onKeyDown:h,onMouseDown:m=>{m.stopPropagation(),a?.(m)},"data-am-pm":!0,...c,children:[n.jsx("option",{value:"",children:"--"}),n.jsx("option",{value:e.am,children:e.am}),n.jsx("option",{value:e.pm,children:e.pm})]})});co.displayName="@mantine/dates/AmPmInput";function Hn({value:e,active:t,onSelect:s}){const r=Tt();return n.jsx(ot,{mod:{active:t},onClick:()=>s(e),onMouseDown:o=>o.preventDefault(),"data-value":e,tabIndex:-1,...r.getStyles("control"),children:typeof e=="number"?Ve(e):e})}Hn.displayName="@mantine/dates/TimeControl";function uo({labels:e,value:t,onSelect:s}){const r=Tt(),o=[e.am,e.pm].map(i=>n.jsx(Hn,{value:i,active:t===i,onSelect:s},i));return n.jsx("div",{...r.getStyles("controlsList"),children:o})}uo.displayName="@mantine/dates/AmPmControlsList";function Il(e,t){if(!e||!t)return!1;const s=e.getBoundingClientRect(),r=t.getBoundingClientRect();return s.top>=r.top&&s.bottom<=r.bottom&&s.left>=r.left&&s.right<=r.right}function Rl(e,t,s){const r=[];for(let o=e;o<=t;o+=s)r.push(o);return r}function us({min:e,max:t,step:s,value:r,onSelect:o,reversed:i}){const l=Tt(),a=P.useRef(null),u=Rl(e,t,s),d=(i?u.reverse():u).map(c=>n.jsx(Hn,{value:c,active:r===c,onSelect:o},c));return P.useEffect(()=>{r!==null&&requestAnimationFrame(()=>{const p=a.current?.querySelector(`[data-value="${r}"]`);Il(p,a.current)||p?.scrollIntoView({block:"nearest"})})},[r]),n.jsx(Kt,{h:l.maxDropdownContentHeight,type:"never",viewportRef:a,...l.getStyles("scrollarea"),...l.scrollAreaProps,children:n.jsx("div",{...l.getStyles("controlsList"),children:d})})}us.displayName="@mantine/dates/TimeControlsList";function fs(e){const[t=null,s=null,r=null]=e.split(":").map(Number);return{hours:t,minutes:s,seconds:r}}function po({time:e,compare:t,withSeconds:s}){const r=fs(e),o=fs(t);return s?r.hours===o.hours&&r.minutes===o.minutes&&r.seconds===o.seconds:r.hours===o.hours&&r.minutes===o.minutes}function Tl(e,t){return`${e.getHours()}:${e.getMinutes()}${t?`:${e.getSeconds()}`:""}`}function $l({value:e,format:t,amPmLabels:s,withSeconds:r}){const o=fs(typeof e=="string"?e:Tl(e,r));if(o.hours===null||o.minutes===null)return null;if(t==="24h")return`${Ve(o.hours)}:${Ve(o.minutes)}${r?`:${Ve(o.seconds||0)}`:""}`;const i=o.hours>=12;return`${o.hours%12===0?12:o.hours%12}:${Ve(o.minutes)}${r?`:${Ve(o.seconds||0)}`:""} ${i?s.pm:s.am}`}function mo({value:e,format:t="24h",amPmLabels:s={am:"AM",pm:"PM"},withSeconds:r=!1}){return n.jsx(n.Fragment,{children:$l({value:e,format:t,amPmLabels:s,withSeconds:r})})}mo.displayName="@mantine/dates/TimeValue";function Wn({value:e,active:t,onChange:s,format:r,amPmLabels:o,withSeconds:i}){const l=Tt();return n.jsx(ot,{mod:{active:t},onClick:()=>s(e),...l.getStyles("presetControl"),children:n.jsx(mo,{withSeconds:i,value:e,format:r,amPmLabels:o})})}Wn.displayName="@mantine/dates/TimePresetControl";function ho({value:e,data:t,onChange:s,format:r,amPmLabels:o,withSeconds:i}){const l=Tt(),a=t.values.map(u=>n.jsx(Wn,{value:u,format:r,amPmLabels:o,withSeconds:i,active:po({time:u,compare:e,withSeconds:i}),onChange:s},u));return n.jsxs("div",{...l.getStyles("presetsGroup"),children:[n.jsx("div",{...l.getStyles("presetsGroupLabel"),children:t.label}),n.jsx(Ns,{cols:i?2:3,spacing:4,children:a})]})}ho.displayName="@mantine/dates/TimePresetGroup";function fo({presets:e,format:t,amPmLabels:s,withSeconds:r,value:o,onChange:i}){const l=Tt();if(e.length===0)return null;if(typeof e[0]=="string"){const u=e.map(d=>n.jsx(Wn,{value:d,format:t,amPmLabels:s,withSeconds:r,active:po({time:d,compare:o,withSeconds:r}),onChange:i},d));return n.jsx(Kt.Autosize,{mah:l.maxDropdownContentHeight,type:"never",...l.getStyles("scrollarea"),...l.scrollAreaProps,children:n.jsx("div",{...l.getStyles("presetsRoot"),children:n.jsx(Ns,{cols:r?2:3,spacing:4,children:u})})})}const a=e.map((u,d)=>n.jsx(ho,{data:u,value:o,format:t,amPmLabels:s,withSeconds:r,onChange:i},d));return n.jsx(Kt.Autosize,{mah:l.maxDropdownContentHeight,type:"never",...l.getStyles("scrollarea"),...l.scrollAreaProps,children:n.jsx("div",{...l.getStyles("presetsRoot"),children:a})})}fo.displayName="@mantine/dates/TimePresets";function en(e){const[t=0,s=0,r=0]=e.split(":").map(Number);return t*3600+s*60+r}function Ol(e){const t=Math.floor(e/3600),s=Math.floor(e%3600/60),r=e%60;return{timeString:`${Ve(t)}:${Ve(s)}:${Ve(r)}`,hours:t,minutes:s,seconds:r}}function go(e,t,s){const r=en(e),o=t?en(t):-1/0,i=s?en(s):1/0,l=Math.max(o,Math.min(r,i));return Ol(l)}function Al({hours:e,minutes:t,seconds:s,amPmLabels:r}){if(e===null)return{hours:null,minutes:null,seconds:null,amPm:null};const o=e>=12?r.pm:r.am;return{hours:e%12===0?12:e%12,minutes:typeof t=="number"?t:null,seconds:typeof s=="number"?s:null,amPm:o}}function qt({time:e,format:t,amPmLabels:s}){if(e==="")return{hours:null,minutes:null,seconds:null,amPm:null};const{hours:r,minutes:o,seconds:i}=fs(e),l={hours:r,minutes:o,seconds:i};return t==="12h"?Al({...l,amPmLabels:s}):{...l,amPm:null}}function Vl({hours:e,minutes:t,seconds:s,amPm:r,amPmLabels:o,withSeconds:i}){let l=e;return r===o.pm&&e!==12?l+=12:r===o.am&&e===12&&(l=0),`${Ve(l)}:${Ve(t)}${i?`:${Ve(s||0)}`:""}`}function ds({hours:e,minutes:t,seconds:s,format:r,withSeconds:o,amPm:i,amPmLabels:l}){return e===null||t===null?{valid:!1,value:""}:o&&s===null?{valid:!1,value:""}:r==="24h"?{valid:!0,value:`${Ve(e)}:${Ve(t)}${o?`:${Ve(s)}`:""}`}:i===null?{valid:!1,value:""}:{valid:!0,value:Vl({hours:e,minutes:t,seconds:s,amPm:i,amPmLabels:l,withSeconds:o})}}function Fl({value:e,defaultValue:t,onChange:s,format:r,amPmLabels:o,withSeconds:i=!1,min:l,max:a,clearable:u,readOnly:d,disabled:c,pasteSplit:p}){const f=qt({time:e||t||"",amPmLabels:o,format:r}),h=P.useRef(!0),[m,w]=P.useState(f.hours),[g,S]=P.useState(f.minutes),[y,v]=P.useState(f.seconds),[b,x]=P.useState(f.amPm),D=u&&!d&&!c&&(m!==null||g!==null||y!==null||b!==null),M=P.useRef(null),$=P.useRef(null),O=P.useRef(null),z=P.useRef(null),A=C=>{C==="hours"&&M.current?.focus(),C==="minutes"&&$.current?.focus(),C==="seconds"&&O.current?.focus(),C==="amPm"&&z.current?.focus()},Y=(C,_)=>{const k={hours:m,minutes:g,seconds:y,amPm:b,[C]:_},N=ds({...k,format:r,withSeconds:i,amPmLabels:o});N.valid?(h.current=!1,C==="hours"&&w(_),C==="minutes"&&S(_),C==="seconds"&&v(_),C==="amPm"&&x(_),s?.(N.value)):(h.current=!1,typeof e=="string"&&e!==""&&s?.(""))},B=C=>{h.current=!1;const _=qt({time:C,amPmLabels:o,format:r});w(_.hours),S(_.minutes),v(_.seconds),x(_.amPm),s?.(C)},I=C=>{let _=C;r==="12h"&&typeof C=="number"&&C>12&&(_=(C-1)%12+1),w(_),Y("hours",_),A("hours")},F=C=>{S(C),Y("minutes",C),A("minutes")},E=C=>{v(C),Y("seconds",C),A("seconds")},H=C=>{x(C),Y("amPm",C),A("amPm")},R=()=>{h.current=!1,w(null),S(null),v(null),x(null),s?.(""),A("hours")},T=C=>{C.preventDefault();const _=C.clipboardData.getData("text"),k=(p||qt)({time:_,format:r,amPmLabels:o}),N=ds({...k,format:r,withSeconds:i,amPmLabels:o});if(N.valid){h.current=!1;const W=go(N.value,l||"00:00:00",a||"23:59:59");s?.(W.timeString),w(k.hours),S(k.minutes),v(k.seconds),x(k.amPm)}},j=ds({hours:m,minutes:g,seconds:y,format:r,withSeconds:i,amPm:b,amPmLabels:o});return St(()=>{if(e===""){h.current=!1,w(null),S(null),v(null),x(null),h.current=!0;return}if(h.current&&typeof e=="string"){const C=qt({time:e||"",amPmLabels:o,format:r});w(C.hours),S(C.minutes),v(C.seconds),x(C.amPm)}h.current=!0},[e]),{refs:{hours:M,minutes:$,seconds:O,amPm:z},values:{hours:m,minutes:g,seconds:y,amPm:b},setHours:I,setMinutes:F,setSeconds:E,setAmPm:H,focus:A,clear:R,onPaste:T,setTimeString:B,isClearable:D,hiddenInputValue:j.value}}var yo={fieldsRoot:"m_7a8f1e6d",fieldsGroup:"m_d6bb0a54",controlsList:"m_b97ecb26",controlsListGroup:"m_31fe42f9",dropdown:"m_9c4817c3",control:"m_154c536b",presetControl:"m_7be09d0c",presetsGroup:"m_7d00001d",presetsGroupLabel:"m_d8d918d7",field:"m_6b43ba88"};const El={hoursStep:1,minutesStep:1,secondsStep:1,format:"24h",amPmLabels:{am:"AM",pm:"PM"},pasteSplit:qt,maxDropdownContentHeight:200,hoursPlaceholder:"--",minutesPlaceholder:"--",secondsPlaceholder:"--"},Yl=Me((e,{size:t})=>({dropdown:{"--control-font-size":Rt(t)}})),Gn=oe((e,t)=>{const s=ne("TimePicker",El,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,onClick:d,format:c,value:p,defaultValue:f,onChange:h,hoursStep:m,minutesStep:w,secondsStep:g,withSeconds:S,hoursInputLabel:y,minutesInputLabel:v,secondsInputLabel:b,amPmInputLabel:x,amPmLabels:D,clearable:M,onMouseDown:$,onFocusCapture:O,onBlurCapture:z,min:A,max:Y,popoverProps:B,withDropdown:I,rightSection:F,onFocus:E,onBlur:H,clearButtonProps:R,hoursInputProps:T,minutesInputProps:j,secondsInputProps:C,amPmSelectProps:_,readOnly:k,disabled:N,size:W,name:G,form:ee,hiddenInputProps:ae,labelProps:re,pasteSplit:K,hoursRef:te,minutesRef:X,secondsRef:le,amPmRef:J,presets:pe,maxDropdownContentHeight:se,scrollAreaProps:we,attributes:Z,reverseTimeControlsList:me,hoursPlaceholder:Ye,minutesPlaceholder:he,secondsPlaceholder:ue,...xe}=s,{resolvedClassNames:et,resolvedStyles:pt}=Xe({classNames:r,styles:l,props:s}),Re=ye({name:"TimePicker",classes:yo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:Z,vars:u,varsResolver:Yl}),V=Fl({value:p,defaultValue:f,onChange:h,format:c,amPmLabels:D,withSeconds:S,min:A,max:Y,clearable:M,disabled:N,readOnly:k,pasteSplit:K}),Te=nt(V.refs.hours,te),_e=nt(V.refs.minutes,X),gt=nt(V.refs.seconds,le),yt=nt(V.refs.amPm,J),vt=Zt(),it=P.useRef(!1),[Dt,Ue]=P.useState(!1),Le=Q=>{it.current||(it.current=!0,E?.(Q))},xt=Q=>{if(!Q.currentTarget.contains(Q.relatedTarget)){const Be=V.values,Se=ds({...Be,format:c,amPmLabels:D,withSeconds:!!S});if(Se.valid&&(A||Y)){const lt=go(Se.value,A,Y);lt.timeString!==Se.value&&V.setTimeString(lt.timeString)}it.current=!1,H?.(Q)}};return n.jsx(Ll,{value:{getStyles:Re,scrollAreaProps:we,maxDropdownContentHeight:se},children:n.jsxs(Pe,{opened:Dt,transitionProps:{duration:0},position:"bottom-start",withRoles:!1,disabled:N||k||!I,...B,children:[n.jsx(Pe.Target,{children:n.jsxs(Je,{component:"div",size:W,disabled:N,ref:t,onClick:Q=>{d?.(Q),V.focus("hours")},onMouseDown:Q=>{Q.preventDefault(),$?.(Q)},onFocusCapture:Q=>{Ue(!0),O?.(Q)},onBlurCapture:Q=>{Ue(!1),z?.(Q)},rightSection:F||V.isClearable&&n.jsx(pn,{...R,size:W,onClick:Q=>{V.clear(),R?.onClick?.(Q)},onMouseDown:Q=>{Q.preventDefault(),R?.onMouseDown?.(Q)}}),labelProps:{htmlFor:vt,...re},style:i,className:o,classNames:et,styles:pt,__staticSelector:"TimePicker",...xe,children:[n.jsx("div",{...Re("fieldsRoot"),dir:"ltr",children:n.jsxs("div",{...Re("fieldsGroup"),onBlur:xt,children:[n.jsx(cs,{id:vt,...T,...Re("field",{className:T?.className,style:T?.style}),value:V.values.hours,onChange:V.setHours,onNextInput:()=>V.focus("minutes"),min:c==="12h"?1:0,max:c==="12h"?12:23,allowTemporaryZero:c==="12h",focusable:!0,step:m,ref:Te,"aria-label":y,readOnly:k,disabled:N,onPaste:V.onPaste,onFocus:Q=>{Le(Q),T?.onFocus?.(Q)},onBlur:Q=>{const Be=Q.currentTarget.value,Se=Be?parseInt(Be,10):null;c==="12h"&&Se===0&&V.setHours(12),T?.onBlur?.(Q)},placeholder:Ye}),n.jsx("span",{children:":"}),n.jsx(cs,{...j,...Re("field",{className:j?.className,style:j?.style}),value:V.values.minutes,onChange:V.setMinutes,min:0,max:59,focusable:!0,step:w,ref:_e,onPreviousInput:()=>V.focus("hours"),onNextInput:()=>S?V.focus("seconds"):V.focus("amPm"),"aria-label":v,tabIndex:-1,readOnly:k,disabled:N,onPaste:V.onPaste,onFocus:Q=>{Le(Q),j?.onFocus?.(Q)},placeholder:he}),S&&n.jsxs(n.Fragment,{children:[n.jsx("span",{children:":"}),n.jsx(cs,{...C,...Re("field",{className:C?.className,style:C?.style}),value:V.values.seconds,onChange:V.setSeconds,min:0,max:59,focusable:!0,step:g,ref:gt,onPreviousInput:()=>V.focus("minutes"),onNextInput:()=>V.focus("amPm"),"aria-label":b,tabIndex:-1,readOnly:k,disabled:N,onPaste:V.onPaste,onFocus:Q=>{Le(Q),C?.onFocus?.(Q)},placeholder:ue})]}),c==="12h"&&n.jsx(co,{..._,inputType:I?"input":"select",labels:D,value:V.values.amPm,onChange:V.setAmPm,ref:yt,"aria-label":x,onPreviousInput:()=>S?V.focus("seconds"):V.focus("minutes"),readOnly:k,disabled:N,tabIndex:-1,onPaste:V.onPaste,onFocus:Q=>{Le(Q),_?.onFocus?.(Q)}})]})}),n.jsx("input",{type:"hidden",name:G,form:ee,value:V.hiddenInputValue,...ae})]})}),n.jsx(Pe.Dropdown,{...Re("dropdown"),onMouseDown:Q=>Q.preventDefault(),children:pe?n.jsx(fo,{value:V.hiddenInputValue,onChange:V.setTimeString,format:c,presets:pe,amPmLabels:D,withSeconds:S||!1}):n.jsxs("div",{...Re("controlsListGroup"),children:[n.jsx(us,{min:c==="12h"?1:0,max:c==="12h"?12:23,step:m,value:V.values.hours,onSelect:V.setHours,reversed:me}),n.jsx(us,{min:0,max:59,step:w,value:V.values.minutes,onSelect:V.setMinutes,reversed:me}),S&&n.jsx(us,{min:0,max:59,step:g,value:V.values.seconds,onSelect:V.setSeconds,reversed:me}),c==="12h"&&n.jsx(uo,{labels:D,value:V.values.amPm,onSelect:V.setAmPm})]})})]})})});Gn.displayName="@mantine/dates/TimePicker";Gn.classes=yo;var vo={day:"m_396ce5cb"};const zl=Me((e,{size:t})=>({day:{"--day-size":De(t,"day-size")}})),qn=oe((e,t)=>{const s=ne("Day",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,date:d,disabled:c,__staticSelector:p,weekend:f,outside:h,selected:m,renderDay:w,inRange:g,firstInRange:S,lastInRange:y,hidden:v,static:b,highlightToday:x,attributes:D,...M}=s,$=ye({name:p||"Day",classes:vo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:D,vars:u,varsResolver:zl,rootSelector:"day"});return n.jsx(ot,{...$("day",{style:v?{display:"none"}:void 0}),component:b?"div":"button",ref:t,disabled:c,"data-today":L(d).isSame(new Date,"day")||void 0,"data-hidden":v||void 0,"data-highlight-today":x||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!h&&f||void 0,"data-outside":!c&&h||void 0,"data-selected":!c&&m||void 0,"data-in-range":g&&!c||void 0,"data-first-in-range":S&&!c||void 0,"data-last-in-range":y&&!c||void 0,"data-static":b||void 0,unstyled:a,...M,children:w?.(d)||L(d).date()})});qn.classes=vo;qn.displayName="@mantine/dates/Day";function Bl({locale:e,format:t="dd",firstDayOfWeek:s=1}){const r=L().day(s),o=[];for(let i=0;i<7;i+=1)typeof t=="string"?o.push(L(r).add(i,"days").locale(e).format(t)):o.push(t(L(r).add(i,"days").format("YYYY-MM-DD")));return o}var xo={weekday:"m_18a3eca"};const Hl=Me((e,{size:t})=>({weekdaysRow:{"--wr-fz":Rt(t),"--wr-spacing":Ge(t)}})),Kn=oe((e,t)=>{const s=ne("WeekdaysRow",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,locale:d,firstDayOfWeek:c,weekdayFormat:p,cellComponent:f="th",__staticSelector:h,withWeekNumbers:m,attributes:w,...g}=s,S=ye({name:h||"WeekdaysRow",classes:xo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:w,vars:u,varsResolver:Hl,rootSelector:"weekdaysRow"}),y=ft(),v=Bl({locale:y.getLocale(d),format:p,firstDayOfWeek:y.getFirstDayOfWeek(c)}).map((b,x)=>n.jsx(f,{...S("weekday"),children:b},x));return n.jsxs(de,{component:"tr",ref:t,...S("weekdaysRow"),...g,children:[m&&n.jsx(f,{...S("weekday"),children:"#"}),v]})});Kn.classes=xo;Kn.displayName="@mantine/dates/WeekdaysRow";function Wl(e,t=1){let s=L(e);if(!s.isValid())return s;const r=t===0?6:t-1;for(;s.day()!==r;)s=s.add(1,"day");return s.format("YYYY-MM-DD")}function Gl(e,t=1){let s=L(e);for(;s.day()!==t;)s=s.subtract(1,"day");return s.format("YYYY-MM-DD")}function ql({month:e,firstDayOfWeek:t=1,consistentWeeks:s}){const r=L(e).subtract(L(e).date()-1,"day"),o=L(r.format("YYYY-M-D")),i=o.format("YYYY-MM-DD"),l=o.add(+o.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=Wl(l,t),u=[];let d=L(Gl(i,t));for(;L(d).isBefore(a,"day");){const c=[];for(let p=0;p<7;p+=1)c.push(d.format("YYYY-MM-DD")),d=d.add(1,"day");u.push(c)}if(s&&u.length<6){const c=u[u.length-1],p=c[c.length-1];let f=L(p).add(1,"day");for(;u.length<6;){const h=[];for(let m=0;m<7;m+=1)h.push(f.format("YYYY-MM-DD")),f=f.add(1,"day");u.push(h)}}return u}function Is(e,t){return L(e).format("YYYY-MM")===L(t).format("YYYY-MM")}function bo(e,t){return t?L(e).isAfter(L(t).subtract(1,"day"),"day"):!0}function Co(e,t){return t?L(e).isBefore(L(t).add(1,"day"),"day"):!0}function Kl({dates:e,minDate:t,maxDate:s,getDayProps:r,excludeDate:o,hideOutsideDates:i,month:l}){const a=e.flat().filter(c=>Co(c,s)&&bo(c,t)&&!o?.(c)&&!r?.(c)?.disabled&&(!i||Is(c,l))),u=a.find(c=>r?.(c)?.selected);if(u)return u;const d=a.find(c=>L().isSame(c,"date"));return d||a[0]}var ps={exports:{}},Ul=ps.exports,Sr;function Zl(){return Sr||(Sr=1,(function(e,t){(function(s,r){e.exports=r()})(Ul,(function(){var s="day";return function(r,o,i){var l=function(d){return d.add(4-d.isoWeekday(),s)},a=o.prototype;a.isoWeekYear=function(){return l(this).year()},a.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),s);var c,p,f,h,m=l(this),w=(c=this.isoWeekYear(),p=this.$u,f=(p?i.utc:i)().year(c).startOf("year"),h=4-f.isoWeekday(),f.isoWeekday()>4&&(h+=7),f.add(h,s));return m.diff(w,"week")+1},a.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var u=a.startOf;a.startOf=function(d,c){var p=this.$utils(),f=!!p.u(c)||c;return p.p(d)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(d,c)}}}))})(ps)),ps.exports}var Ql=Zl();const Xl=Qo(Ql);L.extend(Xl);function Jl(e){const t=e.find(s=>L(s).day()===1);return L(t).isoWeek()}var wo={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const ec={withCellSpacing:!0},tc=Me((e,{size:t})=>({weekNumber:{"--wn-fz":Rt(t),"--wn-size":De(t,"wn-size")}})),Rs=oe((e,t)=>{const s=ne("Month",ec,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,__staticSelector:d,locale:c,firstDayOfWeek:p,weekdayFormat:f,month:h,weekendDays:m,getDayProps:w,excludeDate:g,minDate:S,maxDate:y,renderDay:v,hideOutsideDates:b,hideWeekdays:x,getDayAriaLabel:D,static:M,__getDayRef:$,__onDayKeyDown:O,__onDayClick:z,__onDayMouseEnter:A,__preventFocus:Y,__stopPropagation:B,withCellSpacing:I,size:F,highlightToday:E,withWeekNumbers:H,attributes:R,...T}=s,j=ye({name:d||"Month",classes:wo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:R,vars:u,varsResolver:tc,rootSelector:"month"}),C=ft(),_=ql({month:h,firstDayOfWeek:C.getFirstDayOfWeek(p),consistentWeeks:C.consistentWeeks}),k=Kl({dates:_,minDate:Ee(S),maxDate:Ee(y),getDayProps:w,excludeDate:g,hideOutsideDates:b,month:h}),{resolvedClassNames:N,resolvedStyles:W}=Xe({classNames:r,styles:l,props:s}),G=_.map((ee,ae)=>{const re=ee.map((K,te)=>{const X=!Is(K,h),le=D?.(K)||L(K).locale(c||C.locale).format("D MMMM YYYY"),J=w?.(K),pe=L(K).isSame(k,"date");return n.jsx("td",{...j("monthCell"),"data-with-spacing":I||void 0,children:n.jsx(qn,{__staticSelector:d||"Month",classNames:N,styles:W,unstyled:a,"data-mantine-stop-propagation":B||void 0,highlightToday:E,renderDay:v,date:K,size:F,weekend:C.getWeekendDays(m).includes(L(K).get("day")),outside:X,hidden:b?X:!1,"aria-label":le,static:M,disabled:g?.(K)||!Co(K,Ee(y))||!bo(K,Ee(S)),ref:se=>{se&&$?.(ae,te,se)},...J,onKeyDown:se=>{J?.onKeyDown?.(se),O?.(se,{rowIndex:ae,cellIndex:te,date:K})},onMouseEnter:se=>{J?.onMouseEnter?.(se),A?.(se,K)},onClick:se=>{J?.onClick?.(se),z?.(se,K)},onMouseDown:se=>{J?.onMouseDown?.(se),Y&&se.preventDefault()},tabIndex:Y||!pe?-1:0})},K.toString())});return n.jsxs("tr",{...j("monthRow"),children:[H&&n.jsx("td",{...j("weekNumber"),children:Jl(ee)}),re]},ae)});return n.jsxs(de,{component:"table",...j("month"),size:F,ref:t,...T,children:[!x&&n.jsx("thead",{...j("monthThead"),children:n.jsx(Kn,{__staticSelector:d||"Month",locale:c,firstDayOfWeek:p,weekdayFormat:f,size:F,classNames:N,styles:W,unstyled:a,withWeekNumbers:H})}),n.jsx("tbody",{...j("monthTbody"),children:G})]})});Rs.classes=wo;Rs.displayName="@mantine/dates/Month";var So={pickerControl:"m_dc6a3c71"};const sc=Me((e,{size:t})=>({pickerControl:{"--dpc-fz":Rt(t),"--dpc-size":De(t,"dpc-size")}})),Ts=oe((e,t)=>{const s=ne("PickerControl",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,firstInRange:d,lastInRange:c,inRange:p,__staticSelector:f,selected:h,disabled:m,attributes:w,...g}=s,S=ye({name:f||"PickerControl",classes:So,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:w,vars:u,varsResolver:sc,rootSelector:"pickerControl"});return n.jsx(ot,{...S("pickerControl"),ref:t,unstyled:a,"data-picker-control":!0,"data-selected":h&&!m||void 0,"data-disabled":m||void 0,"data-in-range":p&&!m&&!h||void 0,"data-first-in-range":d&&!m||void 0,"data-last-in-range":c&&!m||void 0,disabled:m,...g})});Ts.classes=So;Ts.displayName="@mantine/dates/PickerControl";function jo({year:e,minDate:t,maxDate:s}){return!t&&!s?!1:!!(t&&L(e).isBefore(t,"year")||s&&L(e).isAfter(s,"year"))}function nc({years:e,minDate:t,maxDate:s,getYearControlProps:r}){const o=e.flat().filter(a=>!jo({year:a,minDate:t,maxDate:s})&&!r?.(a)?.disabled),i=o.find(a=>r?.(a)?.selected);if(i)return i;const l=o.find(a=>L().isSame(a,"year"));return l||o[0]}function Po(e){const t=L(e).year(),s=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const l=i===3?1:3;for(let a=0;a<l;a+=1)o[i].push(L(new Date(s+r,0)).format("YYYY-MM-DD")),r+=1}return o}var Do={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const rc={yearsListFormat:"YYYY",withCellSpacing:!0},$s=oe((e,t)=>{const s=ne("YearsList",rc,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,decade:d,yearsListFormat:c,locale:p,minDate:f,maxDate:h,getYearControlProps:m,__staticSelector:w,__getControlRef:g,__onControlKeyDown:S,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:D,size:M,attributes:$,...O}=s,z=ye({name:w||"YearsList",classes:Do,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:$,vars:u,rootSelector:"yearsList"}),A=ft(),Y=Po(d),B=nc({years:Y,minDate:f,maxDate:h,getYearControlProps:m}),I=Y.map((F,E)=>{const H=F.map((R,T)=>{const j=m?.(R),C=L(R).isSame(B,"year");return n.jsx("td",{...z("yearsListCell"),"data-with-spacing":D||void 0,children:n.jsx(Ts,{...z("yearsListControl"),size:M,unstyled:a,"data-mantine-stop-propagation":x||void 0,disabled:jo({year:R,minDate:f,maxDate:h}),ref:_=>{_&&g?.(E,T,_)},...j,onKeyDown:_=>{j?.onKeyDown?.(_),S?.(_,{rowIndex:E,cellIndex:T,date:R})},onClick:_=>{j?.onClick?.(_),y?.(_,R)},onMouseEnter:_=>{j?.onMouseEnter?.(_),v?.(_,R)},onMouseDown:_=>{j?.onMouseDown?.(_),b&&_.preventDefault()},tabIndex:b||!C?-1:0,children:j?.children??L(R).locale(A.getLocale(p)).format(c)})},T)});return n.jsx("tr",{...z("yearsListRow"),children:H},E)});return n.jsx(de,{component:"table",ref:t,size:M,...z("yearsList"),...O,children:n.jsx("tbody",{children:I})})});$s.classes=Do;$s.displayName="@mantine/dates/YearsList";function _o({month:e,minDate:t,maxDate:s}){return!t&&!s?!1:!!(t&&L(e).isBefore(t,"month")||s&&L(e).isAfter(s,"month"))}function oc({months:e,minDate:t,maxDate:s,getMonthControlProps:r}){const o=e.flat().filter(a=>!_o({month:a,minDate:t,maxDate:s})&&!r?.(a)?.disabled),i=o.find(a=>r?.(a)?.selected);if(i)return i;const l=o.find(a=>L().isSame(a,"month"));return l||o[0]}function ac(e){const t=L(e).startOf("year").toDate(),s=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let i=0;i<3;i+=1)s[o].push(L(t).add(r,"months").format("YYYY-MM-DD")),r+=1;return s}var ko={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const ic={monthsListFormat:"MMM",withCellSpacing:!0},Os=oe((e,t)=>{const s=ne("MonthsList",ic,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,__staticSelector:d,year:c,monthsListFormat:p,locale:f,minDate:h,maxDate:m,getMonthControlProps:w,__getControlRef:g,__onControlKeyDown:S,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:D,size:M,attributes:$,...O}=s,z=ye({name:d||"MonthsList",classes:ko,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:$,vars:u,rootSelector:"monthsList"}),A=ft(),Y=ac(c),B=oc({months:Y,minDate:Ee(h),maxDate:Ee(m),getMonthControlProps:w}),I=Y.map((F,E)=>{const H=F.map((R,T)=>{const j=w?.(R),C=L(R).isSame(B,"month");return n.jsx("td",{...z("monthsListCell"),"data-with-spacing":D||void 0,children:n.jsx(Ts,{...z("monthsListControl"),size:M,unstyled:a,__staticSelector:d||"MonthsList","data-mantine-stop-propagation":x||void 0,disabled:_o({month:R,minDate:Ee(h),maxDate:Ee(m)}),ref:_=>{_&&g?.(E,T,_)},...j,onKeyDown:_=>{j?.onKeyDown?.(_),S?.(_,{rowIndex:E,cellIndex:T,date:R})},onClick:_=>{j?.onClick?.(_),y?.(_,R)},onMouseEnter:_=>{j?.onMouseEnter?.(_),v?.(_,R)},onMouseDown:_=>{j?.onMouseDown?.(_),b&&_.preventDefault()},tabIndex:b||!C?-1:0,children:j?.children??L(R).locale(A.getLocale(f)).format(p)})},T)});return n.jsx("tr",{...z("monthsListRow"),children:H},E)});return n.jsx(de,{component:"table",ref:t,size:M,...z("monthsList"),...O,children:n.jsx("tbody",{children:I})})});Os.classes=ko;Os.displayName="@mantine/dates/MonthsList";var Mo={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const lc={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},cc=Me((e,{size:t})=>({calendarHeader:{"--dch-control-size":De(t,"dch-control-size"),"--dch-fz":Rt(t)}})),jt=oe((e,t)=>{const s=ne("CalendarHeader",lc,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,nextIcon:d,previousIcon:c,nextLabel:p,previousLabel:f,onNext:h,onPrevious:m,onLevelClick:w,label:g,nextDisabled:S,previousDisabled:y,hasNextLevel:v,levelControlAriaLabel:b,withNext:x,withPrevious:D,headerControlsOrder:M,__staticSelector:$,__preventFocus:O,__stopPropagation:z,attributes:A,...Y}=s,B=ye({name:$||"CalendarHeader",classes:Mo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:A,vars:u,varsResolver:cc,rootSelector:"calendarHeader"}),I=O?T=>T.preventDefault():void 0,F=D&&P.createElement(ot,{...B("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":f,onClick:m,unstyled:a,onMouseDown:I,disabled:y,"data-disabled":y||void 0,tabIndex:O||y?-1:0,"data-mantine-stop-propagation":z||void 0},c||n.jsx(sr,{...B("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),E=P.createElement(ot,{component:v?"button":"div",...B("calendarHeaderLevel"),key:"level",onClick:v?w:void 0,unstyled:a,onMouseDown:v?I:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":b,tabIndex:O||!v?-1:0,"data-mantine-stop-propagation":z||void 0},g),H=x&&P.createElement(ot,{...B("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":p,onClick:h,unstyled:a,onMouseDown:I,disabled:S,"data-disabled":S||void 0,tabIndex:O||S?-1:0,"data-mantine-stop-propagation":z||void 0},d||n.jsx(sr,{...B("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),R=M.map(T=>T==="previous"?F:T==="level"?E:T==="next"?H:null);return n.jsx(de,{...B("calendarHeader"),ref:t,...Y,children:R})});jt.classes=Mo;jt.displayName="@mantine/dates/CalendarHeader";function uc(e){const t=Po(e);return[t[0][0],t[3][0]]}const dc={decadeLabelFormat:"YYYY"},As=oe((e,t)=>{const s=ne("DecadeLevel",dc,e),{decade:r,locale:o,minDate:i,maxDate:l,yearsListFormat:a,getYearControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:m,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:x,previousDisabled:D,levelControlAriaLabel:M,withNext:$,withPrevious:O,headerControlsOrder:z,decadeLabelFormat:A,classNames:Y,styles:B,unstyled:I,__staticSelector:F,__stopPropagation:E,size:H,attributes:R,...T}=s,j=ft(),[C,_]=uc(r),k={__staticSelector:F||"DecadeLevel",classNames:Y,styles:B,unstyled:I,size:H,attributes:R},N=typeof x=="boolean"?x:l?!L(_).endOf("year").isBefore(l):!1,W=typeof D=="boolean"?D:i?!L(C).startOf("year").isAfter(i):!1,G=(ee,ae)=>L(ee).locale(o||j.locale).format(ae);return n.jsxs(de,{"data-decade-level":!0,size:H,ref:t,...T,children:[n.jsx(jt,{label:typeof A=="function"?A(C,_):`${G(C,A)} – ${G(_,A)}`,__preventFocus:m,__stopPropagation:E,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:N,previousDisabled:W,hasNextLevel:!1,levelControlAriaLabel:M,withNext:$,withPrevious:O,headerControlsOrder:z,...k}),n.jsx($s,{decade:r,locale:o,minDate:i,maxDate:l,yearsListFormat:a,getYearControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,__preventFocus:m,__stopPropagation:E,withCellSpacing:h,...k})]})});As.classes={...$s.classes,...jt.classes};As.displayName="@mantine/dates/DecadeLevel";const pc={yearLabelFormat:"YYYY"},Vs=oe((e,t)=>{const s=ne("YearLevel",pc,e),{year:r,locale:o,minDate:i,maxDate:l,monthsListFormat:a,getMonthControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:m,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:D,previousDisabled:M,hasNextLevel:$,levelControlAriaLabel:O,withNext:z,withPrevious:A,headerControlsOrder:Y,yearLabelFormat:B,__staticSelector:I,__stopPropagation:F,size:E,classNames:H,styles:R,unstyled:T,attributes:j,...C}=s,_=ft(),k={__staticSelector:I||"YearLevel",classNames:H,styles:R,unstyled:T,size:E,attributes:j},N=typeof D=="boolean"?D:l?!L(r).endOf("year").isBefore(l):!1,W=typeof M=="boolean"?M:i?!L(r).startOf("year").isAfter(i):!1;return n.jsxs(de,{"data-year-level":!0,size:E,ref:t,...C,children:[n.jsx(jt,{label:typeof B=="function"?B(r):L(r).locale(o||_.locale).format(B),__preventFocus:m,__stopPropagation:F,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:N,previousDisabled:W,hasNextLevel:$,levelControlAriaLabel:O,withNext:z,withPrevious:A,headerControlsOrder:Y,...k}),n.jsx(Os,{year:r,locale:o,minDate:i,maxDate:l,monthsListFormat:a,getMonthControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,__preventFocus:m,__stopPropagation:F,withCellSpacing:h,...k})]})});Vs.classes={...jt.classes,...Os.classes};Vs.displayName="@mantine/dates/YearLevel";const mc={monthLabelFormat:"MMMM YYYY"},Fs=oe((e,t)=>{const s=ne("MonthLevel",mc,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__getDayRef:g,__onDayKeyDown:S,__onDayClick:y,__onDayMouseEnter:v,withCellSpacing:b,highlightToday:x,withWeekNumbers:D,__preventFocus:M,__stopPropagation:$,nextIcon:O,previousIcon:z,nextLabel:A,previousLabel:Y,onNext:B,onPrevious:I,onLevelClick:F,nextDisabled:E,previousDisabled:H,hasNextLevel:R,levelControlAriaLabel:T,withNext:j,withPrevious:C,headerControlsOrder:_,monthLabelFormat:k,classNames:N,styles:W,unstyled:G,__staticSelector:ee,size:ae,static:re,attributes:K,...te}=s,X=ft(),le={__staticSelector:ee||"MonthLevel",classNames:N,styles:W,unstyled:G,size:ae,attributes:K},J=typeof E=="boolean"?E:p?!L(r).endOf("month").isBefore(p):!1,pe=typeof H=="boolean"?H:c?!L(r).startOf("month").isAfter(c):!1;return n.jsxs(de,{"data-month-level":!0,size:ae,ref:t,...te,children:[n.jsx(jt,{label:typeof k=="function"?k(r):L(r).locale(o||X.locale).format(k),__preventFocus:M,__stopPropagation:$,nextIcon:O,previousIcon:z,nextLabel:A,previousLabel:Y,onNext:B,onPrevious:I,onLevelClick:F,nextDisabled:J,previousDisabled:pe,hasNextLevel:R,levelControlAriaLabel:T,withNext:j,withPrevious:C,headerControlsOrder:_,...le}),n.jsx(Rs,{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__getDayRef:g,__onDayKeyDown:S,__onDayClick:y,__onDayMouseEnter:v,__preventFocus:M,__stopPropagation:$,static:re,withCellSpacing:b,highlightToday:x,withWeekNumbers:D,...le})]})});Fs.classes={...Rs.classes,...jt.classes};Fs.displayName="@mantine/dates/MonthLevel";var No={levelsGroup:"m_30b26e33"};const Pt=oe((e,t)=>{const s=ne("LevelsGroup",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,__staticSelector:d,attributes:c,...p}=s,f=ye({name:d||"LevelsGroup",classes:No,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:c,vars:u,rootSelector:"levelsGroup"});return n.jsx(de,{ref:t,...f("levelsGroup"),...p})});Pt.classes=No;Pt.displayName="@mantine/dates/LevelsGroup";const hc={numberOfColumns:1},Es=oe((e,t)=>{const s=ne("DecadeLevelGroup",hc,e),{decade:r,locale:o,minDate:i,maxDate:l,yearsListFormat:a,getYearControlProps:u,__onControlClick:d,__onControlMouseEnter:c,withCellSpacing:p,__preventFocus:f,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,nextDisabled:v,previousDisabled:b,headerControlsOrder:x,classNames:D,styles:M,unstyled:$,__staticSelector:O,__stopPropagation:z,numberOfColumns:A,levelControlAriaLabel:Y,decadeLabelFormat:B,size:I,vars:F,attributes:E,...H}=s,R=P.useRef([]),T=Array(A).fill(0).map((j,C)=>{const _=L(r).add(C*10,"years").format("YYYY-MM-DD");return n.jsx(As,{size:I,yearsListFormat:a,decade:_,withNext:C===A-1,withPrevious:C===0,decadeLabelFormat:B,__onControlClick:d,__onControlMouseEnter:c,__onControlKeyDown:(k,N)=>Yn({levelIndex:C,rowIndex:N.rowIndex,cellIndex:N.cellIndex,event:k,controlsRef:R}),__getControlRef:(k,N,W)=>{Array.isArray(R.current[C])||(R.current[C]=[]),Array.isArray(R.current[C][k])||(R.current[C][k]=[]),R.current[C][k][N]=W},levelControlAriaLabel:typeof Y=="function"?Y(_):Y,locale:o,minDate:i,maxDate:l,__preventFocus:f,__stopPropagation:z,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,nextDisabled:v,previousDisabled:b,getYearControlProps:u,__staticSelector:O||"DecadeLevelGroup",classNames:D,styles:M,unstyled:$,withCellSpacing:p,headerControlsOrder:x,attributes:E},C)});return n.jsx(Pt,{classNames:D,styles:M,__staticSelector:O||"DecadeLevelGroup",ref:t,size:I,unstyled:$,attributes:E,...H,children:T})});Es.classes={...Pt.classes,...As.classes};Es.displayName="@mantine/dates/DecadeLevelGroup";const fc={numberOfColumns:1},Ys=oe((e,t)=>{const s=ne("YearLevelGroup",fc,e),{year:r,locale:o,minDate:i,maxDate:l,monthsListFormat:a,getMonthControlProps:u,__onControlClick:d,__onControlMouseEnter:c,withCellSpacing:p,__preventFocus:f,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:D,headerControlsOrder:M,classNames:$,styles:O,unstyled:z,__staticSelector:A,__stopPropagation:Y,numberOfColumns:B,levelControlAriaLabel:I,yearLabelFormat:F,size:E,vars:H,attributes:R,...T}=s,j=P.useRef([]),C=Array(B).fill(0).map((_,k)=>{const N=L(r).add(k,"years").format("YYYY-MM-DD");return n.jsx(Vs,{size:E,monthsListFormat:a,year:N,withNext:k===B-1,withPrevious:k===0,yearLabelFormat:F,__stopPropagation:Y,__onControlClick:d,__onControlMouseEnter:c,__onControlKeyDown:(W,G)=>Yn({levelIndex:k,rowIndex:G.rowIndex,cellIndex:G.cellIndex,event:W,controlsRef:j}),__getControlRef:(W,G,ee)=>{Array.isArray(j.current[k])||(j.current[k]=[]),Array.isArray(j.current[k][W])||(j.current[k][W]=[]),j.current[k][W][G]=ee},levelControlAriaLabel:typeof I=="function"?I(N):I,locale:o,minDate:i,maxDate:l,__preventFocus:f,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:D,getMonthControlProps:u,classNames:$,styles:O,unstyled:z,__staticSelector:A||"YearLevelGroup",withCellSpacing:p,headerControlsOrder:M,attributes:R},k)});return n.jsx(Pt,{classNames:$,styles:O,__staticSelector:A||"YearLevelGroup",ref:t,size:E,unstyled:z,attributes:R,...T,children:C})});Ys.classes={...Vs.classes,...Pt.classes};Ys.displayName="@mantine/dates/YearLevelGroup";const gc={numberOfColumns:1},zs=oe((e,t)=>{const s=ne("MonthLevelGroup",gc,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__onDayClick:g,__onDayMouseEnter:S,withCellSpacing:y,highlightToday:v,withWeekNumbers:b,__preventFocus:x,nextIcon:D,previousIcon:M,nextLabel:$,previousLabel:O,onNext:z,onPrevious:A,onLevelClick:Y,nextDisabled:B,previousDisabled:I,hasNextLevel:F,headerControlsOrder:E,classNames:H,styles:R,unstyled:T,numberOfColumns:j,levelControlAriaLabel:C,monthLabelFormat:_,__staticSelector:k,__stopPropagation:N,size:W,static:G,vars:ee,attributes:ae,...re}=s,K=P.useRef([]),te=Array(j).fill(0).map((X,le)=>{const J=L(r).add(le,"months").format("YYYY-MM-DD");return n.jsx(Fs,{month:J,withNext:le===j-1,withPrevious:le===0,monthLabelFormat:_,__stopPropagation:N,__onDayClick:g,__onDayMouseEnter:S,__onDayKeyDown:(pe,se)=>Yn({levelIndex:le,rowIndex:se.rowIndex,cellIndex:se.cellIndex,event:pe,controlsRef:K}),__getDayRef:(pe,se,we)=>{Array.isArray(K.current[le])||(K.current[le]=[]),Array.isArray(K.current[le][pe])||(K.current[le][pe]=[]),K.current[le][pe][se]=we},levelControlAriaLabel:typeof C=="function"?C(J):C,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__preventFocus:x,nextIcon:D,previousIcon:M,nextLabel:$,previousLabel:O,onNext:z,onPrevious:A,onLevelClick:Y,nextDisabled:B,previousDisabled:I,hasNextLevel:F,classNames:H,styles:R,unstyled:T,__staticSelector:k||"MonthLevelGroup",size:W,static:G,withCellSpacing:y,highlightToday:v,withWeekNumbers:b,headerControlsOrder:E,attributes:ae},le)});return n.jsx(Pt,{classNames:H,styles:R,__staticSelector:k||"MonthLevelGroup",ref:t,size:W,attributes:ae,...re,children:te})});zs.classes={...Pt.classes,...Fs.classes};zs.displayName="@mantine/dates/MonthLevelGroup";var Lo={input:"m_6fa5e2aa"};const Bs=oe((e,t)=>{const{inputProps:s,wrapperProps:r,placeholder:o,classNames:i,styles:l,unstyled:a,popoverProps:u,modalProps:d,dropdownType:c,children:p,formattedValue:f,dropdownHandlers:h,dropdownOpened:m,onClick:w,clearable:g,onClear:S,clearButtonProps:y,rightSection:v,shouldClear:b,readOnly:x,disabled:D,value:M,name:$,form:O,type:z,onDropdownClose:A,withTime:Y,...B}=dn("PickerInputBase",{size:"sm"},e),I=n.jsx(Fe.ClearButton,{onClick:S,unstyled:a,...y}),F=()=>{z==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&S(),h.close()};return n.jsxs(n.Fragment,{children:[c==="modal"&&!x&&n.jsx(Xo,{opened:m,onClose:F,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:a,...d,children:p}),n.jsx(Fe.Wrapper,{...r,children:n.jsxs(Pe,{position:"bottom-start",opened:m,trapFocus:!0,returnFocus:!1,unstyled:a,onClose:A,...u,disabled:u?.disabled||c==="modal"||x,onChange:E=>{E||(u?.onClose?.(),F())},children:[n.jsx(Pe.Target,{children:n.jsx(Fe,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:D,component:"button",type:"button",multiline:!0,onClick:E=>{w?.(E),h.toggle()},__clearSection:I,__clearable:g&&b&&!x&&!D,rightSection:v,...s,ref:t,classNames:{...i,input:bs(Lo.input,i?.input)},...B,children:f||n.jsx(Fe.Placeholder,{error:s.error,unstyled:a,classNames:i,styles:l,__staticSelector:s.__staticSelector,children:o})})}),n.jsx(Pe.Dropdown,{"data-dates-dropdown":!0,children:p})]})}),n.jsx(zn,{value:M,name:$,form:O,type:z,withTime:Y})]})});Bs.classes=Lo;Bs.displayName="@mantine/dates/PickerInputBase";const jr=e=>e==="range"?[null,null]:e==="multiple"?[]:null,Pr=(e,t)=>{const s=t?Vt:Ee;return Array.isArray(e)?e.map(s):s(e)};function Ut({type:e,value:t,defaultValue:s,onChange:r,withTime:o=!1}){const i=P.useRef(e),[l,a,u]=Ke({value:Pr(t,o),defaultValue:Pr(s,o),finalValue:jr(e),onChange:r});let d=l;return i.current!==e&&(i.current=e,t===void 0&&(d=s!==void 0?s:jr(e),a(d))),[d,a,u]}function tn(e,t){return e?e==="month"?0:e==="year"?1:2:t||0}function yc(e){return e===0?"month":e===1?"year":"decade"}function Wt(e,t,s){return yc(Ze(tn(e,0),tn(t,0),tn(s,2)))}const vc={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},zt=oe((e,t)=>{const s=ne("Calendar",vc,e),{vars:r,maxLevel:o,minLevel:i,defaultLevel:l,level:a,onLevelChange:u,date:d,defaultDate:c,onDateChange:p,numberOfColumns:f,columnsToScroll:h,ariaLabels:m,nextLabel:w,previousLabel:g,onYearSelect:S,onMonthSelect:y,onYearMouseEnter:v,onMonthMouseEnter:b,headerControlsOrder:x,__updateDateOnYearSelect:D,__updateDateOnMonthSelect:M,__setDateRef:$,__setLevelRef:O,firstDayOfWeek:z,weekdayFormat:A,weekendDays:Y,getDayProps:B,excludeDate:I,renderDay:F,hideOutsideDates:E,hideWeekdays:H,getDayAriaLabel:R,monthLabelFormat:T,nextIcon:j,previousIcon:C,__onDayClick:_,__onDayMouseEnter:k,withCellSpacing:N,highlightToday:W,withWeekNumbers:G,monthsListFormat:ee,getMonthControlProps:ae,yearLabelFormat:re,yearsListFormat:K,getYearControlProps:te,decadeLabelFormat:X,classNames:le,styles:J,unstyled:pe,minDate:se,maxDate:we,locale:Z,__staticSelector:me,size:Ye,__preventFocus:he,__stopPropagation:ue,onNextDecade:xe,onPreviousDecade:et,onNextYear:pt,onPreviousYear:Re,onNextMonth:V,onPreviousMonth:Te,static:_e,enableKeyboardNavigation:gt,attributes:yt,...vt}=s,{resolvedClassNames:it,resolvedStyles:Dt}=Xe({classNames:le,styles:J,props:s}),[Ue,Le]=Ke({value:a?Wt(a,i,o):void 0,defaultValue:l?Wt(l,i,o):void 0,finalValue:Wt(void 0,i,o),onChange:u}),[xt,Q]=Ut({type:"default",value:Ee(d),defaultValue:Ee(c),onChange:p});P.useImperativeHandle($,()=>U=>{Q(U)}),P.useImperativeHandle(O,()=>U=>{Le(U)});const Be={__staticSelector:me||"Calendar",styles:Dt,classNames:it,unstyled:pe,size:Ye,attributes:yt},Se=h||f||1,lt=new Date,$t=se&&L(lt).isAfter(se)?se:L(lt).format("YYYY-MM-DD"),$e=xt||$t,_t=()=>{const U=L($e).add(Se,"month").format("YYYY-MM-DD");V?.(U),Q(U)},je=()=>{const U=L($e).subtract(Se,"month").format("YYYY-MM-DD");Te?.(U),Q(U)},bt=()=>{const U=L($e).add(Se,"year").format("YYYY-MM-DD");pt?.(U),Q(U)},ke=()=>{const U=L($e).subtract(Se,"year").format("YYYY-MM-DD");Re?.(U),Q(U)},kt=()=>{const U=L($e).add(10*Se,"year").format("YYYY-MM-DD");xe?.(U),Q(U)},Ot=()=>{const U=L($e).subtract(10*Se,"year").format("YYYY-MM-DD");et?.(U),Q(U)},be=P.useRef(null);P.useEffect(()=>{if(!gt||_e)return;const U=Ce=>{if(!be.current?.contains(document.activeElement))return;const Oe=Ce.ctrlKey||Ce.metaKey,Ct=Ce.shiftKey;switch(Ce.key){case"ArrowUp":Oe&&Ct?(Ce.preventDefault(),Ot()):Oe&&(Ce.preventDefault(),ke());break;case"ArrowDown":Oe&&Ct?(Ce.preventDefault(),kt()):Oe&&(Ce.preventDefault(),bt());break;case"y":case"Y":Ue==="month"&&(Ce.preventDefault(),Le("year"));break}};return document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}},[gt,_e,Ue,bt,ke,kt,Ot]);const tt=U=>{be.current=U,typeof t=="function"?t(U):t&&(t.current=U)};return n.jsxs(de,{ref:tt,size:Ye,"data-calendar":!0,...vt,children:[Ue==="month"&&n.jsx(zs,{month:$e,minDate:se,maxDate:we,firstDayOfWeek:z,weekdayFormat:A,weekendDays:Y,getDayProps:B,excludeDate:I,renderDay:F,hideOutsideDates:E,hideWeekdays:H,getDayAriaLabel:R,onNext:_t,onPrevious:je,hasNextLevel:o!=="month",onLevelClick:()=>Le("year"),numberOfColumns:f,locale:Z,levelControlAriaLabel:m?.monthLevelControl,nextLabel:m?.nextMonth??w,nextIcon:j,previousLabel:m?.previousMonth??g,previousIcon:C,monthLabelFormat:T,__onDayClick:_,__onDayMouseEnter:k,__preventFocus:he,__stopPropagation:ue,static:_e,withCellSpacing:N,highlightToday:W,withWeekNumbers:G,headerControlsOrder:x,...Be}),Ue==="year"&&n.jsx(Ys,{year:$e,numberOfColumns:f,minDate:se,maxDate:we,monthsListFormat:ee,getMonthControlProps:ae,locale:Z,onNext:bt,onPrevious:ke,hasNextLevel:o!=="month"&&o!=="year",onLevelClick:()=>Le("decade"),levelControlAriaLabel:m?.yearLevelControl,nextLabel:m?.nextYear??w,nextIcon:j,previousLabel:m?.previousYear??g,previousIcon:C,yearLabelFormat:re,__onControlMouseEnter:b,__onControlClick:(U,Ce)=>{M&&Q(Ce),Le(Wt("month",i,o)),y?.(Ce)},__preventFocus:he,__stopPropagation:ue,withCellSpacing:N,headerControlsOrder:x,...Be}),Ue==="decade"&&n.jsx(Es,{decade:$e,minDate:se,maxDate:we,yearsListFormat:K,getYearControlProps:te,locale:Z,onNext:kt,onPrevious:Ot,numberOfColumns:f,nextLabel:m?.nextDecade??w,nextIcon:j,previousLabel:m?.previousDecade??g,previousIcon:C,decadeLabelFormat:X,__onControlMouseEnter:v,__onControlClick:(U,Ce)=>{D&&Q(Ce),Le(Wt("year",i,o)),S?.(Ce)},__preventFocus:he,__stopPropagation:ue,withCellSpacing:N,headerControlsOrder:x,...Be})]})});zt.classes={...Es.classes,...Ys.classes,...zs.classes};zt.displayName="@mantine/dates/Calendar";function Un(e){const{maxLevel:t,minLevel:s,defaultLevel:r,level:o,onLevelChange:i,nextIcon:l,previousIcon:a,date:u,defaultDate:d,onDateChange:c,numberOfColumns:p,columnsToScroll:f,ariaLabels:h,nextLabel:m,previousLabel:w,onYearSelect:g,onMonthSelect:S,onYearMouseEnter:y,onMonthMouseEnter:v,onNextMonth:b,onPreviousMonth:x,onNextYear:D,onPreviousYear:M,onNextDecade:$,onPreviousDecade:O,withCellSpacing:z,highlightToday:A,__updateDateOnYearSelect:Y,__updateDateOnMonthSelect:B,__setDateRef:I,__setLevelRef:F,withWeekNumbers:E,headerControlsOrder:H,firstDayOfWeek:R,weekdayFormat:T,weekendDays:j,getDayProps:C,excludeDate:_,renderDay:k,hideOutsideDates:N,hideWeekdays:W,getDayAriaLabel:G,monthLabelFormat:ee,monthsListFormat:ae,getMonthControlProps:re,yearLabelFormat:K,yearsListFormat:te,getYearControlProps:X,decadeLabelFormat:le,allowSingleDateInRange:J,allowDeselect:pe,minDate:se,maxDate:we,locale:Z,...me}=e;return{calendarProps:{maxLevel:t,minLevel:s,defaultLevel:r,level:o,onLevelChange:i,nextIcon:l,previousIcon:a,date:u,defaultDate:d,onDateChange:c,numberOfColumns:p,columnsToScroll:f,ariaLabels:h,nextLabel:m,previousLabel:w,onYearSelect:g,onMonthSelect:S,onYearMouseEnter:y,onMonthMouseEnter:v,onNextMonth:b,onPreviousMonth:x,onNextYear:D,onPreviousYear:M,onNextDecade:$,onPreviousDecade:O,withCellSpacing:z,highlightToday:A,__updateDateOnYearSelect:Y,__updateDateOnMonthSelect:B,__setDateRef:I,withWeekNumbers:E,headerControlsOrder:H,firstDayOfWeek:R,weekdayFormat:T,weekendDays:j,getDayProps:C,excludeDate:_,renderDay:k,hideOutsideDates:N,hideWeekdays:W,getDayAriaLabel:G,monthLabelFormat:ee,monthsListFormat:ae,getMonthControlProps:re,yearLabelFormat:K,yearsListFormat:te,getYearControlProps:X,decadeLabelFormat:le,allowSingleDateInRange:J,allowDeselect:pe,minDate:se,maxDate:we,locale:Z},others:me}}function Dr(e,t){const s=[...t].sort((r,o)=>L(r).isAfter(L(o))?1:-1);return L(s[0]).startOf("day").subtract(1,"ms").isBefore(e)&&L(s[1]).endOf("day").add(1,"ms").isAfter(e)}function xc({type:e,level:t,value:s,defaultValue:r,onChange:o,allowSingleDateInRange:i,allowDeselect:l,onMouseLeave:a}){const[u,d]=Ut({type:e,value:s,defaultValue:r,onChange:o}),[c,p]=P.useState(e==="range"&&u[0]&&!u[1]?u[0]:null),[f,h]=P.useState(null),m=x=>{if(e==="range"){if(c&&!u[1]){if(L(x).isSame(c,t)&&!i){p(null),h(null),d([null,null]);return}const D=[x,c];D.sort((M,$)=>L(M).isAfter(L($))?1:-1),d(D),h(null),p(null);return}if(u[0]&&!u[1]&&L(x).isSame(u[0],t)&&!i){p(null),h(null),d([null,null]);return}d([x,null]),h(null),p(x);return}if(e==="multiple"){u.some(D=>L(D).isSame(x,t))?d(u.filter(D=>!L(D).isSame(x,t))):d([...u,x]);return}u&&l&&L(x).isSame(u,t)?d(null):d(x)},w=x=>c&&f?Dr(x,[f,c]):u[0]&&u[1]?Dr(x,u):!1,g=e==="range"?x=>{a?.(x),h(null)}:a,S=x=>u[0]&&L(x).isSame(u[0],t)?!(f&&L(f).isBefore(u[0])):!1,y=x=>u[1]?L(x).isSame(u[1],t):!u[0]||!f?!1:L(f).isBefore(u[0])&&L(x).isSame(u[0],t),v=x=>{if(e==="range")return{selected:u.some(M=>M&&L(M).isSame(x,t)),inRange:w(x),firstInRange:S(x),lastInRange:y(x),"data-autofocus":!!u[0]&&L(u[0]).isSame(x,t)||void 0};if(e==="multiple")return{selected:u.some(M=>M&&L(M).isSame(x,t)),"data-autofocus":!!u[0]&&L(u[0]).isSame(x,t)||void 0};const D=L(u).isSame(x,t);return{selected:D,"data-autofocus":D||void 0}},b=e==="range"&&c?h:()=>{};return P.useEffect(()=>{if(e==="range")if(u[0]&&!u[1])p(u[0]);else{const x=u[0]==null&&u[1]==null,D=u[0]!=null&&u[1]!=null;(x||D)&&(p(null),h(null))}},[u]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:v,_value:u,setValue:d}}var bc={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const Cc=Me((e,{size:t})=>({datePickerRoot:{"--preset-font-size":Rt(t)}})),wc={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Hs=oe((e,t)=>{const s=ne("DatePicker",wc,e),{allowDeselect:r,allowSingleDateInRange:o,value:i,defaultValue:l,onChange:a,onMouseLeave:u,classNames:d,styles:c,__staticSelector:p,__onDayClick:f,__onDayMouseEnter:h,__onPresetSelect:m,__stopPropagation:w,presets:g,className:S,style:y,unstyled:v,size:b,vars:x,attributes:D,...M}=s,{calendarProps:$,others:O}=Un(M),z=P.useRef(null),A=P.useRef(null),Y=ye({name:p||"DatePicker",classes:bc,props:s,className:S,style:y,classNames:d,styles:c,unstyled:v,attributes:D,rootSelector:g?"datePickerRoot":void 0,varsResolver:Cc,vars:x}),{onDateChange:B,onRootMouseLeave:I,onHoveredDateChange:F,getControlProps:E,_value:H,setValue:R}=xc({type:O.type,level:"day",allowDeselect:r,allowSingleDateInRange:o,value:i,defaultValue:l,onChange:a,onMouseLeave:u}),{resolvedClassNames:T,resolvedStyles:j}=Xe({classNames:d,styles:c,props:s}),C=n.jsx(zt,{ref:t,classNames:T,styles:j,__staticSelector:p||"DatePicker",onMouseLeave:I,size:b,...$,...g?{}:O,__stopPropagation:w,__setDateRef:z,__setLevelRef:A,minLevel:$.minLevel||"month",__onDayMouseEnter:(N,W)=>{F(W),h?.(N,W)},__onDayClick:(N,W)=>{B(W),f?.(N,W)},getDayProps:N=>({...E(N),...$.getDayProps?.(N)}),getMonthControlProps:N=>({selected:typeof H=="string"?Is(N,H):!1,...$.getMonthControlProps?.(N)}),getYearControlProps:N=>({selected:typeof H=="string"?L(N).isSame(H,"year"):!1,...$.getYearControlProps?.(N)}),hideOutsideDates:$.hideOutsideDates??$.numberOfColumns!==1,...g?{}:{className:S,style:y,attributes:D}});if(!g)return C;const _=N=>{const W=Array.isArray(N)?N[0]:N;W!==void 0&&(z.current?.(W),A.current?.("month"),m?m(W):R(N))},k=g.map((N,W)=>n.jsx(ot,{...Y("presetButton"),onClick:()=>_(N.value),onMouseDown:G=>G.preventDefault(),"data-mantine-stop-propagation":w||void 0,children:N.label},W));return n.jsxs(de,{...Y("datePickerRoot"),size:b,...O,children:[n.jsx("div",{...Y("presetsList"),children:k}),C]})});Hs.classes=zt.classes;Hs.displayName="@mantine/dates/DatePicker";function Sc(e){if(e===null)return null;const t=new Date(e);return Number.isNaN(t.getTime())||!e?null:L(t).format("YYYY-MM-DD")}function jc({date:e,maxDate:t,minDate:s}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&L(e).isAfter(t,"date")||s&&L(e).isBefore(s,"date"))}const Pc={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,size:"sm"},Zn=oe((e,t)=>{const s=dn("DateInput",Pc,e),{inputProps:r,wrapperProps:o,value:i,defaultValue:l,onChange:a,clearable:u,clearButtonProps:d,popoverProps:c,getDayProps:p,locale:f,valueFormat:h,dateParser:m,minDate:w,maxDate:g,fixOnBlur:S,onFocus:y,onBlur:v,onClick:b,onKeyDown:x,readOnly:D,name:M,form:$,rightSection:O,unstyled:z,classNames:A,styles:Y,allowDeselect:B,date:I,defaultDate:F,onDateChange:E,getMonthControlProps:H,getYearControlProps:R,disabled:T,...j}=s,C=P.useRef(null),_=P.useRef(null),[k,N]=P.useState(!1),{calendarProps:W,others:G}=Un(j),ee=ft(),re=m||(V=>{const Te=L(V,h,ee.getLocale(f)).toDate();return Number.isNaN(Te.getTime())?Sc(V):L(Te).format("YYYY-MM-DD")}),K=B!==void 0?B:u,te=V=>V?L(V).locale(ee.getLocale(f)).format(h):"",[X,le,J]=Ut({type:"default",value:i,defaultValue:l,onChange:a}),[pe,se]=Ut({type:"default",value:I,defaultValue:l||F,onChange:E});P.useEffect(()=>{J&&i!==null&&se(i)},[J,i]);const[we,Z]=P.useState(te(X));P.useEffect(()=>{Z(te(X))},[ee.getLocale(f)]);const me=V=>{const Te=V.currentTarget.value;if(Z(Te),N(!0),Te.trim()===""&&(B||u))le(null);else{const _e=re(Te);_e&&jc({date:_e,minDate:w,maxDate:g})&&(le(_e),se(_e))}},Ye=V=>{v?.(V),N(!1),S&&Z(te(X))},he=V=>{y?.(V),N(!0)},ue=V=>{b?.(V),N(!0)},xe=V=>{V.key==="Escape"&&N(!1),x?.(V)},et=V=>({...p?.(V),selected:L(X).isSame(V,"day"),onClick:Te=>{p?.(V).onClick?.(Te);const _e=K&&L(X).isSame(V,"day")?null:V;le(_e),!J&&_e&&Z(te(_e)),N(!1)}}),pt=n.jsx(Fe.ClearButton,{onClick:()=>{le(null),!J&&Z(""),N(!1)},unstyled:z,...d}),Re=u&&!!X&&!D&&!T;return St(()=>{X!==void 0&&!k&&Z(te(X))},[X]),xa(()=>N(!1),void 0,[C.current,_.current]),n.jsxs(n.Fragment,{children:[n.jsx(Fe.Wrapper,{...o,__staticSelector:"DateInput",ref:C,children:n.jsxs(Pe,{opened:k,trapFocus:!1,position:"bottom-start",disabled:D||T,withRoles:!1,unstyled:z,...c,children:[n.jsx(Pe.Target,{children:n.jsx(Fe,{"data-dates-input":!0,"data-read-only":D||void 0,autoComplete:"off",ref:t,value:we,onChange:me,onBlur:Ye,onFocus:he,onClick:ue,onKeyDown:xe,readOnly:D,rightSection:O,__clearSection:pt,__clearable:Re,...r,...G,disabled:T,__staticSelector:"DateInput"})}),n.jsx(Pe.Dropdown,{onMouseDown:V=>V.preventDefault(),"data-dates-dropdown":!0,ref:_,children:n.jsx(zt,{__staticSelector:"DateInput",...W,classNames:A,styles:Y,unstyled:z,__preventFocus:!0,minDate:w,maxDate:g,locale:f,getDayProps:et,size:r.size,date:pe,onDateChange:se,getMonthControlProps:V=>({selected:typeof X=="string"?Is(V,X):!1,...H?.(V)}),getYearControlProps:V=>({selected:typeof X=="string"?L(V).isSame(X,"year"):!1,...R?.(V)}),attributes:o.attributes})})]})}),n.jsx(zn,{name:M,form:$,value:X,type:"default"})]})});Zn.classes={...Fe.classes,...zt.classes};Zn.displayName="@mantine/dates/DateInput";function Dc({minDate:e,value:t}){const s=e?L(e).format("HH:mm:ss"):null;return t&&e&&t===e?s??void 0:void 0}function _c({maxDate:e,value:t}){const s=e?L(e).format("HH:mm:ss"):null;return t&&e&&t===e?s??void 0:void 0}var Io={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const kc={dropdownType:"popover",size:"sm"},Qn=oe((e,t)=>{const s=ne("DateTimePicker",kc,e),{value:r,defaultValue:o,onChange:i,valueFormat:l,locale:a,classNames:u,styles:d,unstyled:c,timePickerProps:p,submitButtonProps:f,withSeconds:h,level:m,defaultLevel:w,size:g,variant:S,dropdownType:y,vars:v,minDate:b,maxDate:x,defaultDate:D,defaultTimeValue:M,presets:$,attributes:O,onDropdownClose:z,...A}=s,Y=ye({name:"DateTimePicker",classes:Io,props:s,classNames:u,styles:d,unstyled:c,attributes:O,vars:v}),{resolvedClassNames:B,resolvedStyles:I}=Xe({classNames:u,styles:d,props:s}),F=l||(h?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),E=P.useRef(null),H=nt(E,p?.hoursRef),{calendarProps:{allowSingleDateInRange:R,...T},others:j}=Un(A),C=ft(),[_,k]=Ut({type:"default",value:r,defaultValue:o,onChange:i,withTime:!0}),N=D||_,W=Z=>Z?L(Z).format(h?"HH:mm:ss":"HH:mm"):"",[G,ee]=P.useState(M||W(_)),[ae,re]=P.useState(m||w||"month"),[K,te]=ma(!1),X=_?L(_).locale(C.getLocale(a)).format(F):"",le=Z=>{p?.onChange?.(Z),ee(Z),Z&&k(wr(_,Z))},J=Z=>{Z&&k(wr(Js(b,x,Z),G||M||"")),E.current?.focus()},pe=Z=>{Z.key==="Enter"&&(Z.preventDefault(),te.close())};St(()=>{K||ee(W(_))},[_,K]),St(()=>{K&&re("month")},[K]);const se=y==="popover",we=()=>{const Z=Js(b,x,_);_&&_!==Z&&k(Js(b,x,_)),z?.()};return n.jsxs(Bs,{formattedValue:X,dropdownOpened:A.disabled?!1:K,dropdownHandlers:te,classNames:B,styles:I,unstyled:c,ref:t,onClear:()=>k(null),shouldClear:!!_,value:_,size:g,variant:S,dropdownType:y,...j,type:"default",__staticSelector:"DateTimePicker",onDropdownClose:we,withTime:!0,attributes:O,children:[n.jsx(Hs,{...T,maxDate:x,minDate:b,size:g,variant:S,type:"default",value:_,defaultDate:N||Pl({maxDate:x,minDate:b}),onChange:J,locale:a,classNames:B,styles:I,unstyled:c,__staticSelector:"DateTimePicker",__stopPropagation:se,level:m,defaultLevel:w,onLevelChange:Z=>{re(Z),T.onLevelChange?.(Z)},presets:$,__onPresetSelect:Z=>{k(Z),Z&&ee(W(Z))},attributes:O}),ae==="month"&&n.jsxs("div",{...Y("timeWrapper"),children:[n.jsx(Gn,{value:G,withSeconds:h,unstyled:c,min:Dc({minDate:b,value:_}),max:_c({maxDate:x,value:_}),...p,...Y("timeInput",{className:p?.className,style:p?.style}),onChange:le,onKeyDown:pe,size:g,"data-mantine-stop-propagation":se||void 0,hoursRef:H,attributes:O}),n.jsx(Ft,{variant:"default",size:`input-${g||"sm"}`,...Y("submitButton",{className:f?.className,style:f?.style}),unstyled:c,"data-mantine-stop-propagation":se||void 0,children:n.jsx(Tr,{size:"30%"}),...f,onClick:Z=>{f?.onClick?.(Z),te.close(),we()}})]})]})});Qn.classes={...Io,...Bs.classes,...Hs.classes};Qn.displayName="@mantine/dates/DateTimePicker";const Mc=e=>{const t=Cs(e.input),{inputProps:s,id:r,icon:o,format:i}=Yt(e,t);if(!e.input?.props)return null;if(e.datetime||i==="date-time"){const l=typeof e.datetime=="object"?e.datetime:{};return n.jsx(Qn,{...s,id:r,leftSection:o,defaultValue:e.input.props.defaultValue?new Date(e.input.props.defaultValue):void 0,onChange:a=>{e.input.set(a?new Date(a).toISOString():void 0)},...l})}if(e.date||i==="date"){const l=typeof e.date=="object"?e.date:{};return n.jsx(Zn,{...s,id:r,leftSection:o,defaultValue:e.input.props.defaultValue?new Date(e.input.props.defaultValue):void 0,onChange:a=>{e.input.set(a?new Date(a).toISOString().slice(0,10):void 0)},...l})}if(e.time||i==="time"){const l=typeof e.time=="object"?e.time:{};return n.jsx(Bn,{...s,id:r,leftSection:o,defaultValue:e.input.props.defaultValue,onChange:a=>{e.input.set(a.currentTarget.value)},...l})}return null},Nc=e=>{const t=Cs(e.input),{inputProps:s,id:r,icon:o}=Yt(e,t),i=P.useRef(null),[l,a]=P.useState(e.input.props.defaultValue);if(fn({"form:reset":c=>{c.id===e.input?.form.id&&i.current&&a(e.input.props.defaultValue)}},[e.input]),!e.input?.props)return null;const{type:u,...d}=e.input.props;if(e.sliderProps){const c=e.sliderProps.min??s.minimum??0,p=e.sliderProps.max??s.maximum??100;return n.jsx(Fe.Wrapper,{...s,children:n.jsx("div",{style:{height:32,padding:8},children:n.jsx(Fn,{...s,ref:i,id:r,...d,...e.sliderProps,value:l,min:c,max:p,label:()=>l,onChange:f=>{a(f),e.input.set(f)}})})})}return n.jsx(ba,{...s,ref:i,id:r,leftSection:o,...d,...e.numberInputProps,value:l??"",onChange:c=>{const p=c!==null?Number(c):void 0;a(p),e.input.set(p)}})},Lc=e=>{const{inputProps:t}=Yt(e,{});if(!e.input?.props)return null;const s=e.input.schema;if(!s?.properties)return null;const r=Object.keys(s.properties),i=12/(e.columns??1),a=e.input.items,u=()=>n.jsx(ht,{children:r.map(d=>{const c=e.controlProps?.[d]??{},p=a?.[d];return p?n.jsx(ht.Col,{span:i,children:n.jsx(gs,{input:p,...c})},d):null})});return e.variant==="plain"?u():n.jsx(js,{legend:t.label,children:n.jsxs(We,{gap:"xs",children:[t.description&&n.jsx(ve,{size:"sm",c:"dimmed",children:t.description}),u(),t.error&&n.jsx(ve,{size:"sm",c:"red",children:t.error})]})})};function Ic(e){return!e||e.trim()===""?{}:new Rc(e).parse()}class Rc{pos=0;query;constructor(t){this.query=t.trim()}parse(){return this.parseExpression()}parseExpression(){return this.parseOr()}parseOr(){const t=this.parseAnd();if(this.peek()==="|"){const s=[t];for(;this.peek()==="|";)this.consume("|"),s.push(this.parseAnd());return{or:s}}return t}parseAnd(){const t=this.parsePrimary();if(this.peek()==="&"){const s=[t];for(;this.peek()==="&";)this.consume("&"),s.push(this.parsePrimary());return{and:s}}return t}parsePrimary(){if(this.skipWhitespace(),this.peek()==="("){this.consume("(");const t=this.parseExpression();return this.consume(")"),t}return this.parseCondition()}parseCondition(){const t=this.parseFieldPath();this.skipWhitespace();const s=this.parseOperator();this.skipWhitespace();const r=this.parseValue();if(r==="")throw new Nr(`Expected value for field '${t.join(".")}'`);return this.buildCondition(t,s,r)}parseFieldPath(){const t=[];let s="";for(;this.pos<this.query.length;){const r=this.query[this.pos];if(r==="."&&s){t.push(s),s="",this.pos++;continue}if(r==="="||r==="!"||r===">"||r==="<"||r===" ")break;s+=r,this.pos++}return s&&t.push(s),t}parseOperator(){this.skipWhitespace();const t=this.query.slice(this.pos);if(t.startsWith(">="))return this.pos+=2,">=";if(t.startsWith("<="))return this.pos+=2,"<=";if(t.startsWith("!="))return this.pos+=2,"!=";const s=this.query[this.pos];if(s==="="||s===">"||s==="<")return this.pos++,s;throw new Error(`Expected operator at position ${this.pos}`)}parseValue(){if(this.skipWhitespace(),this.query.slice(this.pos,this.pos+4).toLowerCase()==="null")return this.pos+=4,null;if(this.query[this.pos]==="[")return this.parseArray();if(this.query[this.pos]==='"'||this.query[this.pos]==="'")return this.parseQuotedString();let t="";for(;this.pos<this.query.length;){const s=this.query[this.pos];if(s==="&"||s==="|"||s===")")break;t+=s,this.pos++}return this.coerceValue(t.trim())}parseArray(){this.consume("[");const t=[];for(;this.pos<this.query.length&&this.query[this.pos]!=="]";){if(this.skipWhitespace(),this.query[this.pos]==='"'||this.query[this.pos]==="'")t.push(this.parseQuotedString());else{let s="";for(;this.pos<this.query.length&&this.query[this.pos]!==","&&this.query[this.pos]!=="]";)s+=this.query[this.pos],this.pos++;t.push(this.coerceValue(s.trim()))}this.skipWhitespace(),this.query[this.pos]===","&&this.pos++}return this.consume("]"),t}parseQuotedString(){const t=this.query[this.pos];this.pos++;let s="",r=!1;for(;this.pos<this.query.length;){const o=this.query[this.pos];if(r){s+=o,r=!1,this.pos++;continue}if(o==="\\"){r=!0,this.pos++;continue}if(o===t){this.pos++;break}s+=o,this.pos++}return s}coerceValue(t){return/^-?\d+$/.test(t)?parseInt(t,10):/^-?\d+\.\d+$/.test(t)?parseFloat(t):t.toLowerCase()==="true"?!0:t.toLowerCase()==="false"?!1:t}buildCondition(t,s,r){let o;if(s==="=")if(r===null)o={isNull:!0};else if(Array.isArray(r))o={inArray:r};else if(typeof r=="string"&&r.includes("*")){const l=r.startsWith("*"),a=r.endsWith("*"),u=r.replace(/^\*|\*$/g,"");l&&a?o={contains:u}:l?o={endsWith:u}:a?o={startsWith:u}:o={eq:r}}else o={eq:r};else if(s==="!=")r===null?o={isNotNull:!0}:o={ne:r};else if(s===">")o={gt:r};else if(s===">=")o={gte:r};else if(s==="<")o={lt:r};else if(s==="<=")o={lte:r};else throw new Error(`Unsupported operator: ${s}`);if(t.length===1)return{[t[0]]:o};let i=o;for(let l=t.length-1;l>=0;l--)i={[t[l]]:i};return i}peek(){return this.skipWhitespace(),this.query[this.pos]||""}consume(t){if(this.skipWhitespace(),this.query[this.pos]!==t)throw new Error(`Expected '${t}' at position ${this.pos}, got '${this.query[this.pos]}'`);this.pos++}skipWhitespace(){for(;this.pos<this.query.length&&/\s/.test(this.query[this.pos]);)this.pos++}}class Tc{attr=ge;identityPrimaryKey=(t,s)=>ge(ge(ge(q.integer(s),Nt),Ht,t),ct);bigIdentityPrimaryKey=(t,s)=>ge(ge(ge(q.int64(s),Nt),Ht,t),ct);uuidPrimaryKey=()=>ge(ge(q.uuid(),Nt),ct);primaryKey(t,s,r){if(!t||q.schema.isInteger(t))return ge(ge(ge(q.integer(s),Nt),Ht,r),ct);if(q.schema.isString(t)&&t.format==="uuid")return ge(ge(q.uuid(),Nt),ct);if(q.schema.isNumber(t)&&t.format==="int64")return ge(ge(ge(q.number(s),Nt),Ht,r),ct);if(q.schema.isBigInt(t))return ge(ge(ge(q.bigint(s),Nt),Ht,r),ct);throw new Nr(`Unsupported type for primary key: ${t}`)}default=(t,s)=>(s!=null&&Object.assign(t,{default:s}),this.attr(t,ct));version=(t={})=>this.default(ge(q.integer(t),Jo),0);createdAt=t=>ge(ge(q.datetime(t),ea),ct);updatedAt=t=>ge(ge(q.datetime(t),ta),ct);deletedAt=t=>ge(q.optional(q.datetime(t)),sa);enum=(t,s,r)=>ge(q.enum(t,{description:s?.description,...r}),na,s);ref=(t,s,r)=>{const o=r??{onDelete:q.schema.isOptional(t)?"set null":"cascade"};return this.attr(t,ra,{ref:s,actions:o})};page=(t,s)=>oa(t,s)}const $c=new Tc,Oc=$c;function Ro(e,t=""){const s=[];if(!e||typeof e!="object")return s;const r="properties"in e?e.properties:e;if(!r||typeof r!="object")return s;for(const[o,i]of Object.entries(r)){if(typeof i!="object"||i===null)continue;const l=i,a=t?`${t}.${o}`:o,u="format"in l?l.format:void 0;let c="type"in l?l.type:"object";u==="date-time"?c="datetime":u==="date"?c="date":u==="time"?c="time":u==="duration"&&(c="duration");const p={name:o,path:a,type:c,format:u,description:"description"in l?l.description:void 0};"enum"in l&&l.enum&&(p.enum=l.enum,p.type="enum"),"type"in l&&l.type==="object"&&"properties"in l&&typeof l.properties=="object"&&(p.nested=Ro(l.properties,a)),s.push(p),p.nested&&s.push(...p.nested)}return s}const Ac={eq:{symbol:"=",label:"equals",example:"name=John"},ne:{symbol:"!=",label:"not equals",example:"status!=archived"},gt:{symbol:">",label:"greater than",example:"age>18"},gte:{symbol:">=",label:"greater or equal",example:"age>=18"},lt:{symbol:"<",label:"less than",example:"age<65"},lte:{symbol:"<=",label:"less or equal",example:"age<=65"},null:{symbol:"=null",label:"is null",example:"deletedAt=null"},notNull:{symbol:"!=null",label:"is not null",example:"email!=null"},in:{symbol:"[...]",label:"in array",example:"status=[active,pending]"}},Vc=({schema:e,value:t="",onChange:s,placeholder:r="Enter query or click for assistance...",...o})=>{const[i,l]=P.useState(!1),[a,u]=P.useState(t),d=P.useRef(null),c=e?Ro(e):[],[p,f]=P.useState(null),h=S=>{try{Ic(S.trim())}catch(y){return f(y.message),!1}return f(null),!0},m=S=>{u(S),h(S)&&s?.(S)},w=()=>{u(""),s?.(""),h("")},g=S=>{const y=a?`${a}${S} `:`${S} `;u(y),h(y)&&s?.(y),setTimeout(()=>{d.current?.focus();const v=d.current?.value.length||0;d.current?.setSelectionRange(v,v)},0)};return fn({"form:change":S=>{S.id===d.current?.form?.id&&S.path===o["data-path"]&&u(S.value??"")}},[]),n.jsxs(Pe,{width:800,position:"bottom-start",shadow:"md",opened:i,onChange:l,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:"fade-up",duration:200,timingFunction:"ease"},children:[n.jsx(Pe.Target,{children:n.jsx(Lr,{ref:d,placeholder:r,value:a,onChange:S=>m(S.currentTarget.value),onFocus:()=>l(!0),leftSection:p?n.jsx(rl,{size:16}):n.jsx(io,{size:16}),rightSection:a&&n.jsx(Ft,{size:"sm",variant:"subtle",color:"gray",onClick:w,children:n.jsx(Ir,{size:14})}),...o})}),n.jsx(Pe.Dropdown,{bg:"transparent",p:"xs",bd:`1px solid ${qe.colors.border}`,style:{backdropFilter:"blur(20px)"},children:n.jsx(Fc,{fields:c,onInsert:g})})]})};function Fc({fields:e,onInsert:t}){return n.jsxs(ut,{gap:"md",align:"flex-start",wrap:"nowrap",bg:qe.colors.surface,p:"sm",bdrs:"sm",children:[n.jsxs(We,{gap:"md",style:{flex:1},children:[n.jsxs(We,{gap:"xs",children:[n.jsx(ve,{size:"sm",fw:600,children:"Operators"}),n.jsx(We,{gap:4,children:Object.entries(Ac).map(([s,r])=>n.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"center",miw:48,onClick:()=>t(r.symbol),children:r.symbol}),n.jsx(ve,{size:"xs",c:"dimmed",style:{flex:1},children:r.label})]},s))})]}),n.jsx(nn,{}),n.jsxs(We,{gap:"xs",children:[n.jsx(ve,{size:"sm",fw:600,children:"Logic"}),n.jsxs(We,{gap:4,children:[n.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"center",miw:48,onClick:()=>t("&"),children:"&"}),n.jsx(ve,{size:"xs",c:"dimmed",children:"AND"})]}),n.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"center",miw:48,onClick:()=>t("|"),children:"|"}),n.jsx(ve,{size:"xs",c:"dimmed",children:"OR"})]})]})]})]}),e.length>0&&n.jsx(nn,{orientation:"vertical"}),e.length>0&&n.jsxs(fe,{direction:"column",gap:"xs",style:{flex:2},children:[n.jsx(ve,{size:"sm",fw:600,children:"Fields"}),n.jsx(fe,{direction:"column",gap:4,style:{maxHeight:300,overflowY:"auto"},children:e.map(s=>n.jsxs(fe,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"end",miw:120,onClick:()=>t(s.path),children:s.path}),n.jsxs(fe,{mt:3,direction:"column",gap:2,style:{flex:1,minWidth:0},children:[n.jsx(ve,{size:"xs",c:"dimmed",lineClamp:1,children:s.description||s.type}),s.enum&&n.jsx(ut,{gap:0,wrap:"wrap",children:s.enum.map(r=>n.jsx(Ae,{px:"xs",size:"xs",h:24,onClick:()=>t(r),children:r},r))})]}),n.jsx(Rr,{size:"xs",variant:"light",style:{flexShrink:0},children:s.type})]},s.path))})]})]})}const _r=e=>{const t=Cs(e.input),{inputProps:s,id:r,icon:o}=Yt(e,t),i=e.input.schema&&"type"in e.input.schema&&e.input.schema.type==="array";let l;if(i&&"items"in e.input.schema&&e.input.schema.items){const p=e.input.schema.items;"enum"in p&&Array.isArray(p.enum)&&(l=p.enum)}const a=e.input.schema&&"enum"in e.input.schema&&Array.isArray(e.input.schema.enum)?e.input.schema.enum:[],[u,d]=P.useState([]);if(P.useEffect(()=>{e.input?.props&&(e.loader?e.loader().then(d):d(a))},[e.input,e.loader]),!e.input?.props)return null;if(e.segmented){const p=typeof e.segmented=="object"?e.segmented:{};return n.jsx(Fe.Wrapper,{...s,children:n.jsx(fe,{children:n.jsx(Sa,{disabled:s.disabled,defaultValue:String(e.input.props.defaultValue),...p,onChange:f=>{e.input.set(f)},data:u.slice(0,10)})})})}if(e.autocomplete){const p=typeof e.autocomplete=="object"?e.autocomplete:{};return n.jsx(wn,{...s,id:r,leftSection:o,data:u,...e.input.props,...p})}if(i&&!l||e.tags){const p=typeof e.tags=="object"?e.tags:{};return n.jsx(En,{...s,id:r,leftSection:o,defaultValue:Array.isArray(e.input.props.defaultValue)?e.input.props.defaultValue:[],onChange:f=>{e.input.set(f)},...p})}if(i&&l||e.multi){const p=l?.map(h=>({value:h,label:h}))||[],f=typeof e.multi=="object"?e.multi:{};return n.jsx(On,{...s,id:r,leftSection:o,data:p,defaultValue:Array.isArray(e.input.props.defaultValue)?e.input.props.defaultValue:[],onChange:h=>{e.input.set(h)},...f})}const c=typeof e.select=="object"?e.select:{};return n.jsx(Or,{...s,id:r,leftSection:o,data:u,...e.input.props,...c})},gs=e=>{const t=Cs(e.input,["error"]);if(!e.input?.props)return null;const{inputProps:s,id:r,icon:o,format:i,schema:l}=Yt(e,t),a={...e,...l.$control};if(a.query)return n.jsx(Vc,{...a.input.props,...s,schema:a.query,value:a.input.props.value,onChange:m=>{a.input.set(m)}});if(a.custom){const m=a.custom;return n.jsx(Fe.Wrapper,{...s,children:n.jsx(fe,{flex:1,mt:"calc(var(--mantine-spacing-xs) / 2)",children:n.jsx(m,{defaultValue:a.input.props.defaultValue,onChange:w=>{a.input.set(w)}})})})}const u=a.input.schema&&"type"in a.input.schema&&a.input.schema.type==="object"&&"properties"in a.input.schema;if(a.object||u){const m=typeof a.object=="object"?a.object:{};return n.jsx(Lc,{input:a.input,title:a.title,description:a.description,...m})}const d=a.input.schema&&"type"in a.input.schema&&a.input.schema.type==="array",c=d&&"items"in a.input.schema&&a.input.schema.items&&typeof a.input.schema.items=="object"&&"properties"in a.input.schema.items;if(a.array||c){const m=typeof a.array=="object"?a.array:{};return n.jsx(Cl,{input:a.input,title:a.title,description:a.description,...m})}if(a.number||a.input.schema&&"type"in a.input.schema&&(a.input.schema.type==="number"||a.input.schema.type==="integer")){const m=typeof a.number=="object"?a.number:{};return a.slider&&(m.sliderProps??={}),n.jsx(Nc,{input:a.input,title:a.title,description:a.description,icon:o,...m})}if(a.file){const m=typeof a.file=="object"?a.file:{};return n.jsx(Xa,{...s,id:r,leftSection:o,onChange:w=>{a.input.set(w)},...m})}if(a.color||i==="color"){const m=typeof a.color=="object"?a.color:{};return n.jsx(Mn,{...s,id:r,leftSection:o,...a.input.props,...m})}if(a.input.schema&&"enum"in a.input.schema&&a.input.schema.enum||d&&!c||a.select){const m=typeof a.select=="object"?a.select:{};return a.segmented&&(m.segmented??={}),n.jsx(_r,{input:a.input,title:a.title,description:a.description,icon:o,...m})}if(a.input.schema&&"type"in a.input.schema&&a.input.schema.type==="boolean"){if(a.switch){const w=typeof a.switch=="object"?a.switch:{};return n.jsx(Ca,{...s,id:r,color:"blue",defaultChecked:a.input.props.defaultValue,onChange:g=>{a.input.set(g.currentTarget.checked)},...w})}const m={loader:async()=>[{value:"true",label:"Yes"},{value:"false",label:"No"},{value:"",label:""}],...a.input.props};return n.jsx(_r,{input:a.input,title:a.title,description:a.description,icon:o,...m})}if(a.password||a.input.props.name?.includes("password")){const m=typeof a.password=="object"?a.password:{};return n.jsx(Vn,{...s,id:r,leftSection:o,...a.input.props,...m})}if(a.area){const m=typeof a.area=="object"?a.area:{};return n.jsx(ja,{...s,id:r,leftSection:o,...a.input.props,...m})}if(a.date||a.datetime||a.time||i==="date"||i==="date-time"||i==="time")return n.jsx(Mc,{input:a.input,title:a.title,description:a.description,icon:o,date:a.date,datetime:a.datetime,time:a.time});const f=typeof a.text=="object"?a.text:{},h=()=>{switch(i){case"email":return"email";case"url":case"uri":return"url";case"tel":case"phone":return"tel";default:return}};return n.jsx(Lr,{...s,id:r,leftSection:o,type:h(),...a.input.props,...f,inputWrapperOrder:["label","input","description","error"]})},Ec=e=>{const{form:t,columns:s=3,children:r,controlProps:o,fieldControlProps:i,skipFormElement:l=!1,skipSubmitButton:a=!1,submitButtonProps:u,fill:d=!0}=e,c=e.schema||t.options.schema;if(!c?.properties)return null;const f=Object.keys(c.properties),h=typeof s=="number"?{xs:12,sm:6,lg:12/s}:{base:s.base?12/s.base:void 0,xs:s.xs?12/s.xs:12,sm:s.sm?12/s.sm:6,md:s.md?12/s.md:void 0,lg:s.lg?12/s.lg:4,xl:s.xl?12/s.xl:void 0},m=()=>r?n.jsx(n.Fragment,{children:r(t.input)}):n.jsx(ht,{children:f.map(g=>{const S=t.input[g],y=c.properties[g];if(!S||!y)return null;const v=y&&"type"in y&&y.type==="object",b=y&&"type"in y&&y.type==="array"&&"items"in y&&y.items&&"properties"in y.items,x=v||b?12:h,D={...o,...i?.[g]};return n.jsx(ht.Col,{span:x,children:n.jsx(gs,{input:S,...D})},g)})}),w=n.jsxs(fe,{direction:"column",gap:"sm",flex:d?1:void 0,...e.flexProps,children:[n.jsx(fe,{direction:"column",gap:"sm",flex:1,children:m()}),!a&&n.jsx(Ss,{w:"100%",withBorder:!0,children:n.jsxs(fe,{gap:"sm",flex:1,children:[n.jsx(fe,{}),n.jsx(fe,{flex:1}),n.jsxs(fe,{gap:"sm",children:[n.jsx(Ae,{variant:"subtle",type:"reset",children:"Reset"}),n.jsx(Ae,{intent:"primary",form:t,...u,children:u?.children??"Submit"})]})]})})]});return l?w:n.jsx(fe,{component:"form",flex:d?1:void 0,...t.props,...e.flexProps,children:w})},Yc=({schema:e,form:t,typeFormProps:s,filterVisibility:r})=>{const o=P.useMemo(()=>{const i=Object.keys(e.properties).filter(a=>r[a]!==!1);if(i.length===0)return null;const l=i.reduce((a,u)=>(a[u]=e.properties[u],a),{});return q.object(l)},[e,r]);return o?n.jsx(fe,{w:"100%",p:"xs",bg:qe.colors.surface,style:{borderBottom:"1px solid var(--alepha-border)"},children:n.jsx(Ec,{...s,skipSubmitButton:!0,fill:!0,form:t,schema:o})}):null},zc=({page:e,size:t,totalPages:s,onPageChange:r,onSizeChange:o})=>n.jsxs(fe,{align:"center",justify:"end",gap:"md",p:"xs",style:{borderTop:"1px solid var(--alepha-border)"},children:[n.jsx(fe,{children:n.jsx(Or,{w:96,variant:"default",value:t,onChange:i=>{i&&o(Number(i))},data:[{value:"5",label:"5"},{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"},{value:"100",label:"100"}]})}),n.jsx(fe,{children:n.jsx(at,{withEdges:!0,total:s,value:e,onChange:r})})]}),Bc=({columns:e,visibility:t,onVisibilityChange:s})=>{const[r,o]=P.useState(!1),i=Object.entries(e),l=()=>{const c=i.reduce((p,[f])=>({...p,[f]:!0}),{});s(c)},a=()=>{const c=i.reduce((p,[f])=>({...p,[f]:!1}),{});s(c)},u=(c,p)=>{s({...t,[c]:p})},d=i.filter(([c])=>t[c]!==!1).length;return n.jsxs(Pe,{width:280,position:"bottom-start",shadow:"md",opened:r,onChange:o,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:"fade-up",duration:200,timingFunction:"ease"},children:[n.jsx(Pe.Target,{children:n.jsx(Ae,{variant:"subtle",icon:Ui})}),n.jsx(Pe.Dropdown,{bg:"transparent",p:"xs",bd:`1px solid ${qe.colors.border}`,style:{backdropFilter:"blur(20px)"},children:n.jsxs(We,{gap:"xs",bg:qe.colors.surface,p:"sm",bdrs:"sm",children:[n.jsxs(ut,{justify:"space-between",children:[n.jsxs(ve,{size:"sm",fw:500,children:["Columns (",d,"/",i.length,")"]}),n.jsxs(ut,{gap:4,children:[n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:l,children:"All"}),n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:a,children:"None"})]})]}),n.jsx(Kt.Autosize,{mah:300,children:n.jsx(We,{gap:4,children:i.map(([c,p])=>n.jsx(hs,{label:p.label,checked:t[c]!==!1,onChange:f=>u(c,f.currentTarget.checked),size:"sm"},c))})})]})})]})},Hc=(e,t)=>{const s=e.properties[t];return s&&typeof s=="object"&&"title"in s&&s.title?s.title:t.replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim()},Wc=({schema:e,visibility:t,onVisibilityChange:s})=>{const[r,o]=P.useState(!1),i=Object.keys(e.properties),l=()=>{const c=i.reduce((p,f)=>({...p,[f]:!0}),{});s(c)},a=()=>{const c=i.reduce((p,f)=>({...p,[f]:!1}),{});s(c)},u=(c,p)=>{s({...t,[c]:p})},d=i.filter(c=>t[c]!==!1).length;return n.jsxs(Pe,{width:280,position:"bottom-start",shadow:"md",opened:r,onChange:o,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:"fade-up",duration:200,timingFunction:"ease"},children:[n.jsx(Pe.Target,{children:n.jsx(Ae,{variant:"subtle",icon:io})}),n.jsx(Pe.Dropdown,{bg:"transparent",p:"xs",bd:`1px solid ${qe.colors.border}`,style:{backdropFilter:"blur(20px)"},children:n.jsxs(We,{gap:"xs",bg:qe.colors.surface,p:"sm",bdrs:"sm",children:[n.jsxs(ut,{justify:"space-between",children:[n.jsxs(ve,{size:"sm",fw:500,children:["Filters (",d,"/",i.length,")"]}),n.jsxs(ut,{gap:4,children:[n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:l,children:"All"}),n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:a,children:"None"})]})]}),n.jsx(Kt.Autosize,{mah:300,children:n.jsx(We,{gap:4,children:i.map(c=>n.jsx(hs,{label:Hc(e,c),checked:t[c]!==!1,onChange:p=>u(c,p.currentTarget.checked),size:"sm"},c))})})]})})]})},Gc=({columns:e,filters:t,columnVisibility:s,filterVisibility:r,onColumnVisibilityChange:o,onFilterVisibilityChange:i,actions:l,onRefresh:a,selectedItems:u=[],checkboxActions:d,onClearSelection:c})=>{const p=u.length>0,f=async h=>{const m={selectedItems:u,clearSelection:c||(()=>{})};await h.onClick(m)};return n.jsxs(fe,{p:"xs",style:{borderBottom:"1px solid var(--alepha-border)"},children:[n.jsxs(fe,{gap:4,align:"center",children:[t&&n.jsx(Wc,{schema:t,visibility:r,onVisibilityChange:i}),n.jsx(Bc,{columns:e,visibility:s,onVisibilityChange:o}),p&&n.jsxs(n.Fragment,{children:[n.jsx(nn,{orientation:"vertical",mx:"xs"}),n.jsxs(Rr,{variant:"light",size:"lg",children:[u.length," selected"]}),n.jsx(Ae,{variant:"subtle",size:"compact-sm",icon:Ir,onClick:c,children:"Clear"}),d?.map((h,m)=>n.jsx(Ae,{variant:"light",size:"compact-sm",intent:h.intent,icon:h.icon&&aa(h.icon)?h.icon:void 0,onClick:()=>f(h),children:h.label},m))]})]}),n.jsx(fe,{flex:1}),n.jsxs(fe,{gap:"xs",children:[l?.map((h,m)=>P.isValidElement(h)?h:n.jsx(Ae,{...h,children:h.label},m)),n.jsx(Ae,{icon:wa,onClick:a,children:"Refresh"})]})]})},qc=10,To=(e,t)=>{if(!e)return null;const s=e.split(",").map(r=>r.trim());for(const r of s){if(r===t)return"asc";if(r===`-${t}`)return"desc"}return null},Kc=(e,t)=>{const s=To(e,t),r=(e||"").split(",").map(o=>o.trim()).filter(o=>o&&o!==t&&o!==`-${t}`);return s===null?r.unshift(t):s==="asc"&&r.unshift(`-${t}`),r.length>0?r.join(","):void 0},Uc=e=>{const[t,s]=P.useState(typeof e.items=="function"?{content:[]}:e.items),r=e.infinityScroll?100:e.defaultSize||10,[o,i]=P.useState(1),[l,a]=P.useState(String(r)),[u,d]=P.useState(0),c=sn(kr),[p,f]=P.useState(()=>{if(e.defaultColumnVisibility)return e.defaultColumnVisibility;const j=Object.keys(e.columns),C=e.defaultVisibleColumnCount??qc;return j.reduce((_,k,N)=>({..._,[k]:N<C}),{})}),[h,m]=P.useState(()=>e.defaultFilterVisibility?e.defaultFilterVisibility:e.filters?.properties?Object.keys(e.filters.properties).reduce((j,C)=>({...j,[C]:!0}),{}):{}),w=j=>{f(j),e.onColumnVisibilityChange?.(j)},g=j=>{m(j),e.onFilterVisibilityChange?.(j)},S=P.useMemo(()=>Object.entries(e.columns).filter(([j])=>p[j]!==!1),[e.columns,p]),[y,v]=P.useState(void 0),b=(j,C)=>{const k=Kc(y,C||j);v(k),I.input.sort.set(k),I.input.page.set(0)},[x,D]=P.useState(new Set),M=P.useCallback(j=>e.getItemKey?e.getItemKey(j):JSON.stringify(j),[e.getItemKey]),$=P.useMemo(()=>e.withCheckbox?t.content.filter(j=>x.has(M(j))):[],[t.content,x,M,e.withCheckbox]),O=P.useMemo(()=>t.content.length===0?!1:t.content.every(j=>x.has(M(j))),[t.content,x,M]),z=P.useMemo(()=>{if(t.content.length===0)return!1;const j=t.content.filter(C=>x.has(M(C))).length;return j>0&&j<t.content.length},[t.content,x,M]),A=P.useCallback(j=>{const C=M(j);D(_=>{const k=new Set(_);return k.has(C)?k.delete(C):k.add(C),k})},[M]),Y=P.useCallback(()=>{D(O?j=>{const C=new Set(j);for(const _ of t.content)C.delete(M(_));return C}:j=>{const C=new Set(j);for(const _ of t.content)C.add(M(_));return C})},[O,t.content,M]),B=P.useCallback(()=>{D(new Set)},[]),I=Da({schema:q.object({...e.filters?e.filters.properties:{},page:q.number({default:0}),size:q.number({default:r}),sort:q.optional(q.string())}),handler:async j=>{if(typeof e.items=="function"){const C=await e.items(j,{items:t.content});e.infinityScroll&&j.page>0?s(_=>({...C,content:[..._.content,...C.content]})):s(C),d(j.page)}},onReset:async()=>{i(1),a("10"),await I.submit()},onChange:async(j,C)=>{if(j==="page"){i(C+1),await I.submit();return}if(j==="size"){a(String(C)),I.input.page.set(0);return}e.onFilterChange?.(j,C,I)}},[t]);ia(()=>I.submit(),{delay:800});const F=sn(la);P.useEffect(()=>{if(e.submitOnInit&&I.submit(),e.submitEvery){const j=F.createInterval(()=>{I.submit()},e.submitEvery);return()=>F.clearInterval(j)}},[]),P.useEffect(()=>{typeof e.items!="function"&&s(e.items)},[e.items]),P.useEffect(()=>{if(!e.infinityScroll||typeof e.items!="function")return;const j=()=>{if(I.submitting)return;const C=window.scrollY,_=window.innerHeight,k=document.documentElement.scrollHeight;if(C+_>=k-300){const W=t.page?.totalPages??1;u+1<W&&I.input.page.set(u+1)}};return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[e.infinityScroll,I.submitting,t.page?.totalPages,u,I]);const E=e.withCheckbox?n.jsx(mt.Th,{style:{width:40},children:n.jsx(hs,{checked:O,indeterminate:z,onChange:Y,"aria-label":"Select all"})}):null,H=S.map(([j,C])=>{const _=C.sortKey||j,k=C.sortable?To(y,_):null,N=n.jsxs(fe,{align:"center",gap:4,children:[n.jsx(ve,{size:"xs",children:C.label}),C.sortable&&n.jsxs(fe,{c:"dimmed",children:[k==="asc"&&n.jsx(ya,{size:qe.sizes.icon.sm}),k==="desc"&&n.jsx(va,{size:qe.sizes.icon.sm}),k===null&&n.jsx(zi,{size:qe.sizes.icon.sm})]})]});return n.jsx(mt.Th,{style:{...C.fit?{}:{},...C.sortable?{cursor:"pointer"}:{}},children:C.sortable?n.jsx(ot,{onClick:()=>b(j,C.sortKey),children:N}):N},j)}),R=t.content.map((j,C)=>{const _=e.tableTrProps?e.tableTrProps(j):{},k=M(j),N=x.has(k);return n.jsxs(mt.Tr,{..._,children:[e.withCheckbox&&n.jsx(mt.Td,{style:{width:40},children:n.jsx(hs,{checked:N,onChange:()=>A(j),"aria-label":"Select row"})}),S.map(([W,G])=>n.jsx(mt.Td,{children:G.value(j,{index:C,form:I,alepha:c})},W))]},k)}),T=P.useMemo(()=>e.filters?q.omit(I.options.schema,["page","size","sort"]):null,[e.filters,I.options.schema]);return n.jsxs(fe,{flex:1,p:0,bg:"var(--alepha-elevated)",bdrs:"sm",bd:"1px solid var(--alepha-border)",direction:"column",children:[n.jsx(Gc,{columns:e.columns,filters:e.filters,columnVisibility:p,filterVisibility:h,onColumnVisibilityChange:w,onFilterVisibilityChange:g,actions:e.actions,onRefresh:()=>I.submit(),selectedItems:$,checkboxActions:e.checkboxActions,onClearSelection:B}),T&&e.filters&&n.jsx(Yc,{schema:T,form:I,typeFormProps:e.typeFormProps,filterVisibility:h}),n.jsx(fe,{className:"overflow-auto",children:n.jsxs(mt,{withColumnBorders:!0,withRowBorders:!0,...e.tableProps,children:[n.jsx(mt.Thead,{children:n.jsxs(mt.Tr,{children:[E,H]})}),n.jsx(mt.Tbody,{children:R})]})}),!e.infinityScroll&&n.jsx(zc,{page:o,size:l,totalPages:t.page?.totalPages??1,onPageChange:j=>{I.input.page.set(j-1)},onSizeChange:j=>{I.input.size.set(j)}})]})},Zc=ca({name:"logs",schema:q.object({id:Oc.primaryKey(),level:q.enum(["TRACE","DEBUG","INFO","WARN","ERROR"]),message:q.text({size:"rich"}),service:q.text(),module:q.text(),context:q.optional(q.text()),app:q.optional(q.text()),data:q.optional(q.json()),timestamp:q.integer()})}),fu=()=>{const e=sn(ua),{l:t}=ha(),s=o=>{switch(o.toLowerCase()){case"error":return n.jsx(ve,{ff:"monospace",c:"red",children:o.slice(0,5)});case"warn":return n.jsx(ve,{ff:"monospace",c:"orange",children:o.slice(0,5)});case"info":return n.jsx(ve,{ff:"monospace",c:"green",children:o.slice(0,5)});case"debug":return n.jsx(ve,{ff:"monospace",c:"grape",children:o.slice(0,5)});case"trace":return n.jsx(ve,{ff:"monospace",c:"dimmed",children:o.slice(0,5)});default:return n.jsx(ve,{children:o})}},r=q.object({search:q.optional(q.string({$control:{query:q.omit(Zc.schema,["id"])}})),level:q.optional(q.array(q.enum(["TRACE","DEBUG","INFO","WARN","ERROR"],{$control:{}})))});return n.jsx(Uc,{submitOnInit:!0,infinityScroll:!0,submitEvery:[10,"seconds"],defaultSize:20,typeFormProps:{skipSubmitButton:!0,columns:2},tableProps:{horizontalSpacing:"xs",verticalSpacing:0},onFilterChange:(o,i,l)=>{if(o==="search"||o==="level")return l.submit()},filters:r,tableTrProps:o=>o.level.toLowerCase()==="error"?{bg:"rgba(255,0,0,0.1)"}:o.level.toLowerCase()==="warn"?{bg:"rgba(255,153,0,0.1)"}:{},items:async(o,i)=>{if(o.search&&(o.search=o.search.replace("now()",new Date().toISOString())),o.page&&o.page>0){const u=`timestamp < ${i.items[0].timestamp}`;o.search?o.search+=`& ${u}`:o.search=u}if(o.level){const u=o.level.map(d=>`level = ${d}`).join(" | ");o.search?o.search+=`& (${u})`:o.search=u}const l=new URLSearchParams(o).toString();return(await e.fetch(`/devtools/api/logs?${l}`,{schema:{response:q.page(pa)}})).data},columns:{timestamp:{label:"timestamp",value:(o,{form:i})=>n.jsx(Ae,{intent:"none",variant:"transparent",h:20,size:"xs",tooltip:t(o.timestamp,{date:"DD MMM YYYY HH:mm:ss.SSS"}),onClick:()=>{const l=Jn(o.timestamp).subtract(1,"minute"),a=Jn(o.timestamp).add(1,"minute");i.input.search.set(`timestamp >= ${l.toISOString()} & timestamp <= ${a.toISOString()}`)},children:t(o.timestamp,{date:"HH:mm:ss.SSS"})})},level:{label:"level",value:o=>s(o.level)},app:{label:"app",value:o=>o.app},context:{fit:!0,label:"context",value:(o,{form:i})=>o.context&&n.jsx(Ae,{intent:"none",variant:"transparent",h:20,size:"xs",onClick:()=>{i.input.search.set(`context = ${o.context}`)},children:n.jsx(ve,{ff:"monospace",size:"xs",children:o.context.replaceAll("-","").slice(0,10)})})},service:{fit:!0,label:"service",value:o=>n.jsxs(fe,{align:"center",justify:"end",children:[o.module&&n.jsxs(ve,{c:"dimmed",size:"xs",children:[o.module,"."]}),n.jsx(ve,{size:"sm",children:o.service})]})},message:{label:"message",value:o=>o.data?.ms&&o.data.status?`${o.message} - ${o.data.status} [${o.data.ms}ms]`:o.data?.path&&o.data.method?`${o.message} - ${o.data.method} ${o.data.path}`:o.message},data:{label:"more",value:(o,{alepha:i})=>{if(o.data&&Object.keys(o.data).length!==0)return n.jsx(Ae,{opacity:.5,h:20,px:4,size:"xs",fw:"bold",onClick:()=>i.inject(da).json(o.data),children:"{ ... }"})}}}})};export{fu as default};
|
|
1
|
+
import{as as Ao,at as Vo,au as kr,ar as q,av as Fo,r as P,aw as Ze,$ as Ke,n as Eo,f as oe,b as ne,_ as Zt,ax as Xe,j as n,a2 as Je,c as Qt,p as cn,B as de,q as ye,a8 as Yo,s as Me,g as Ge,e as He,a0 as Xt,ay as un,i as ys,az as St,ah as nt,aA as zo,t as De,aB as dn,aa as Ft,aC as Fe,aD as Bo,aq as pn,aE as vs,k as dt,I as xs,aF as mn,d as bs,aG as Ho,aH as hn,U as ot,aI as Wo,ak as Go,v as Mr,aJ as Rt,al as qo,a5 as ut,aK as Xn,aL as Ko,aj as Uo,w as Ne,H as qe,aM as Zo,D as fn,T as ve,F as fe,aN as L,ad as Kt,an as Qo,aO as Xo,aP as Nr,aQ as ge,aR as ct,aS as Nt,aT as Ht,aU as Jo,aV as ea,aW as ta,aX as sa,aY as na,aZ as ra,a_ as oa,af as Lr,ag as Ir,a6 as ms,a$ as aa,a3 as sn,b0 as ia,b1 as la,b2 as ca,a4 as ua,ai as da,b3 as Jn,b4 as pa}from"./entry.BWhdC3SJ.js";import{a as gn,c as os,b as ma,d as Cs,A as Ae,u as ha}from"./chunk.C3geCUq9.js";import{I as er}from"./chunk.CZ4J9K5b.js";import{a as tr,I as fa}from"./chunk.BjOMCPQ3.js";import{S as We,B as Rr}from"./chunk.BqEqrty9.js";import{g as yn,c as vn,u as xn,d as Ie,O as bn,e as Tr,i as $r,b as ga,S as Or,C as hs,a as ya,I as va}from"./chunk.B-FEo0lV.js";import{A as sr}from"./chunk.BCBZ1wAk.js";import{P as Pe,D as nn}from"./chunk.CoD2sLa1.js";import{u as xa}from"./chunk.BX7p74D8.js";import{N as ba,S as Ca,I as wa}from"./chunk.5EOPWu_h.js";import{S as Sa}from"./chunk.albVVSQX.js";import{T as ja}from"./chunk._t5z0lP9.js";import{T as mt}from"./chunk.CEbDj1NR.js";import"./chunk.BQQ5nN1l.js";import"./chunk.BlqFPyLh.js";import"./chunk.D7ro5_n3.js";import"./chunk.BjFrJKj1.js";import"./chunk.uyVen0u2.js";class Pa{constructor(t,s){this.id=t,this.options=s,this.options=s,s.initialValues&&(this.values=this.alepha.codec.decode(s.schema,s.initialValues)),this.input=this.createProxyFromSchema(s,s.schema,{store:this.values,parent:""})}log=Ao();alepha=Vo(kr);values={};submitInProgress=!1;input;get submitting(){return this.submitInProgress}get element(){return window.document.getElementById(this.id)}get currentValues(){return this.restructureValues(this.values)}get props(){return{id:this.id,noValidate:!0,onSubmit:t=>{t?.preventDefault?.(),this.submit()},onReset:t=>this.reset(t)}}reset=t=>{for(const s in this.values)delete this.values[s];return this.options.onReset?.(),this.alepha.events.emit("form:reset",{id:this.id,values:this.values},{catch:!0})};submit=async()=>{if(this.submitInProgress){this.log.warn("Form submission already in progress, ignoring duplicate submit.");return}await this.alepha.events.emit("react:action:begin",{type:"form",id:this.id}),await this.alepha.events.emit("form:submit:begin",{id:this.id}),this.submitInProgress=!0;const t=this.options,r={form:this.element};try{let o=this.restructureValues(this.values);q.schema.isSchema(t.schema)&&(o=this.alepha.codec.decode(t.schema,o)),await t.handler(o,r),await this.alepha.events.emit("react:action:success",{type:"form",id:this.id}),await this.alepha.events.emit("form:submit:success",{id:this.id,values:o})}catch(o){this.log.error("Form submission error:",o),t.onError?.(o,r),await this.alepha.events.emit("react:action:error",{type:"form",id:this.id,error:o}),await this.alepha.events.emit("form:submit:error",{error:o,id:this.id})}finally{this.submitInProgress=!1}await this.alepha.events.emit("react:action:end",{type:"form",id:this.id}),await this.alepha.events.emit("form:submit:end",{id:this.id})};restructureValues(t){const s={};for(const[r,o]of Object.entries(t))r.includes(".")?this.restructureNestedValue(s,r,o):s[r]=o;return s}restructureNestedValue(t,s,r){const o=s.split("."),i=o.pop();if(!i)return;let l=t;for(const a of o)l[a]??={},l=l[a];l[i]=r}createProxyFromSchema(t,s,r){return r.parent,new Proxy({},{get:(o,i)=>{if(!t.schema||!q.schema.isObject(s))return{};if(i in s.properties)return this.createInputFromSchema(i,t,s,s.required?.includes(i)||!1,r)}})}createInputFromSchema(t,s,r,o,i){const l=i.parent||"",a=r.properties?.[t];if(!a)return{path:"",required:o,props:{},schema:r,set:()=>{},form:this};const u=r.required?.includes(t)??!1,d=l?`${l}.${t}`:t,c=`/${d.replaceAll(".","/")}`,p=(h,m=!0)=>{const w=this.getValueFromInput(h,a);if(i.store[d],i.store[d]=w,s.onChange&&s.onChange(d,w,i.store),this.alepha.events.emit("form:change",{id:this.id,path:c,value:w},{catch:!0}),m){const g=window.document.querySelector(`[data-path="${c}"]`);g instanceof HTMLInputElement&&(q.schema.isBoolean(a)?(g.value=h,g.checked=!!h):g.value=h)}},f={name:d,autoComplete:"off",onChange:h=>{if(typeof h=="string"){p(h,!1);return}if(typeof h=="number"){p(h,!1);return}q.schema.isBoolean(a)?h.target.value==="true"?p(!0,!1):h.target.value==="false"?p(!1,!1):h.target.value===""?p(void 0,!1):p(h.target.checked,!1):p(h.target.value,!1)}};if(f["data-path"]=c,s.id&&(f.id=`${s.id}-${d}`,f["data-testid"]=f.id),q.schema.isString(a)&&(a.maxLength!=null&&(f.maxLength=Number(a.maxLength)),a.minLength!=null&&(f.minLength=Number(a.minLength))),s.initialValues?.[t]!=null?f.defaultValue=this.valueToInputEntry(s.initialValues[t]):"default"in a&&a.default!=null&&(f.defaultValue=this.valueToInputEntry(a.default)),u&&(f.required=!0),"description"in a&&typeof a.description=="string"&&(f["aria-label"]=a.description),q.schema.isInteger(a)||q.schema.isNumber(a)?f.type="number":t==="password"?f.type="password":t==="email"?f.type="email":t==="url"?f.type="url":q.schema.isString(a)?a.format==="binary"?f.type="file":a.format==="date"?f.type="date":a.format==="time"?f.type="time":a.format==="date-time"?f.type="datetime-local":f.type="text":q.schema.isBoolean(a)&&(f.type="checkbox"),s.onCreateField){const h=s.onCreateField(t,a);Object.assign(f,h)}return q.schema.isObject(a)?{path:c,props:f,schema:a,set:p,form:this,required:o,items:this.createProxyFromSchema(s,a,{parent:d,store:i.store})}:q.schema.isArray(a)?{path:c,props:f,schema:a,set:p,form:this,required:o,items:[]}:{path:c,props:f,schema:a,set:p,form:this,required:o}}getValueFromInput(t,s){if(t instanceof File)return q.schema.isString(s)&&s.format==="binary"?t:null;if(q.schema.isBoolean(s))return t==="true"?!0:t==="false"?!1:t===""||t===null||t===void 0?void 0:!!t;if(q.schema.isNumber(s)){const r=Number(t);return Number.isNaN(r)?null:r}return q.schema.isString(s)?s.format==="date"?new Date(t).toISOString().slice(0,10):s.format==="time"?new Date(`1970-01-01T${t}`).toISOString().slice(11,16):s.format==="date-time"?new Date(t).toISOString():String(t):t}valueToInputEntry(t){return t==null?"":typeof t=="boolean"||typeof t=="number"||typeof t=="string"?t:t instanceof Date?t.toISOString().slice(0,16):t}}const Da=(e,t=[])=>{const s=Fo(),r=P.useId();return P.useMemo(()=>s.inject(Pa,{lifetime:"transient",args:[e.id||r,e]}),t)};function rt(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function Ar(e){return{x:Ze(e.x,0,1),y:Ze(e.y,0,1)}}function Cn(e,t,s="ltr"){const r=P.useRef(!1),o=P.useRef(!1),i=P.useRef(0),[l,a]=P.useState(!1),u=P.useRef(null);return P.useEffect(()=>{r.current=!0},[]),{ref:P.useCallback(c=>{if(u.current&&(u.current(),u.current=null),!c)return;const p=({x:b,y:x})=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{if(r.current&&c){c.style.userSelect="none";const D=c.getBoundingClientRect();if(D.width&&D.height){const M=Ze((b-D.left)/D.width,0,1);e({x:s==="ltr"?M:1-M,y:Ze((x-D.top)/D.height,0,1)})}}})},f=()=>{document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),document.addEventListener("touchmove",v,{passive:!1}),document.addEventListener("touchend",w)},h=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",w)},m=()=>{!o.current&&r.current&&(o.current=!0,typeof t?.onScrubStart=="function"&&t.onScrubStart(),a(!0),f())},w=()=>{o.current&&r.current&&(o.current=!1,a(!1),h(),setTimeout(()=>{typeof t?.onScrubEnd=="function"&&t.onScrubEnd()},0))},g=b=>{m(),b.preventDefault(),S(b)},S=b=>p({x:b.clientX,y:b.clientY}),y=b=>{b.cancelable&&b.preventDefault(),m(),v(b)},v=b=>{b.cancelable&&b.preventDefault(),p({x:b.changedTouches[0].clientX,y:b.changedTouches[0].clientY})};c.addEventListener("mousedown",g),c.addEventListener("touchstart",y,{passive:!1}),u.current=()=>{c.removeEventListener("mousedown",g),c.removeEventListener("touchstart",y)}},[s,e]),active:l}}function wt(e,t){const s=t-e+1;return Array.from({length:s},(r,o)=>o+e)}const as="dots";function _a({total:e,siblings:t=1,boundaries:s=1,page:r,initialPage:o=1,onChange:i}){const l=Math.max(Math.trunc(e),0),[a,u]=Ke({value:r,onChange:i,defaultValue:o,finalValue:o}),d=w=>{w<=0?u(1):w>l?u(l):u(w)},c=()=>d(a+1),p=()=>d(a-1),f=()=>d(1),h=()=>d(l);return{range:P.useMemo(()=>{if(t*2+3+s*2>=l)return wt(1,l);const g=Math.max(a-t,s),S=Math.min(a+t,l-s),y=g>s+2,v=S<l-(s+1);if(!y&&v){const b=t*2+s+2;return[...wt(1,b),as,...wt(l-(s-1),l)]}if(y&&!v){const b=s+1+2*t;return[...wt(1,s),as,...wt(l-b,l)]}return[...wt(1,s),as,...wt(g,S),as,...wt(l-s+1,l)]},[l,t,a]),active:a,setPage:d,next:c,previous:p,first:f,last:h}}function ka(){const[e,t]=P.useState(!1);Eo(()=>{t(typeof window<"u"&&!Ma()&&"EyeDropper"in window)},[]);const s=P.useCallback((r={})=>e?new window.EyeDropper().open(r):Promise.resolve(void 0),[e]);return{supported:e,open:s}}function Ma(){return navigator.userAgent.includes("OPR")}function nr(e,t){return t.length===0?e:t.reduce((s,r)=>Math.abs(r-e)<Math.abs(s-e)?r:s)}const wn=oe((e,t)=>{const s=ne("Autocomplete",null,e),{classNames:r,styles:o,unstyled:i,vars:l,dropdownOpened:a,defaultDropdownOpened:u,onDropdownClose:d,onDropdownOpen:c,onFocus:p,onBlur:f,onClick:h,onChange:m,data:w,value:g,defaultValue:S,selectFirstOptionOnChange:y,onOptionSubmit:v,comboboxProps:b,readOnly:x,disabled:D,filter:M,limit:$,withScrollArea:O,maxDropdownHeight:z,size:A,id:Y,renderOption:B,autoComplete:I,scrollAreaProps:F,onClear:E,clearButtonProps:H,error:R,clearable:T,rightSection:j,autoSelectOnBlur:C,attributes:_,...k}=s,N=Zt(Y),W=yn(w),G=vn(W),[ee,ae]=Ke({value:g,defaultValue:S,finalValue:"",onChange:m}),re=xn({opened:a,defaultOpened:u,onDropdownOpen:c,onDropdownClose:()=>{d?.(),setTimeout(re.resetSelectedOption,0)}}),K=J=>{ae(J),re.resetSelectedOption()},{resolvedClassNames:te,resolvedStyles:X}=Xe({props:s,styles:o,classNames:r});P.useEffect(()=>{y&&re.selectFirstOption()},[y,ee]);const le=n.jsx(Ie.ClearButton,{...H,onClear:()=>{K(""),E?.()}});return n.jsxs(Ie,{store:re,__staticSelector:"Autocomplete",classNames:te,styles:X,unstyled:i,readOnly:x,size:A,attributes:_,keepMounted:C,onOptionSubmit:J=>{v?.(J),K(G[J].label),re.closeDropdown()},...b,children:[n.jsx(Ie.Target,{autoComplete:I,children:n.jsx(Je,{ref:t,...k,size:A,__staticSelector:"Autocomplete",__clearSection:le,__clearable:T&&!!ee&&!D&&!x,rightSection:j,disabled:D,readOnly:x,value:ee,error:R,onChange:J=>{K(J.currentTarget.value),re.openDropdown(),y&&re.selectFirstOption()},onFocus:J=>{re.openDropdown(),p?.(J)},onBlur:J=>{C&&re.clickSelectedOption(),re.closeDropdown(),f?.(J)},onClick:J=>{re.openDropdown(),h?.(J)},classNames:te,styles:X,unstyled:i,attributes:_,id:N})}),n.jsx(bn,{data:W,hidden:x||D,filter:M,search:ee,limit:$,hiddenWhenEmpty:!0,withScrollArea:O,maxDropdownHeight:z,unstyled:i,labelId:k.label?`${N}-label`:void 0,"aria-label":k.label?void 0:k["aria-label"],renderOption:B,scrollAreaProps:F})]})});wn.classes={...Je.classes,...Ie.classes};wn.displayName="@mantine/core/Autocomplete";const[Na,La]=Qt("Card component was not found in tree");var Sn={root:"m_e615b15f",section:"m_599a2148"};const ws=cn((e,t)=>{const s=ne("CardSection",null,e),{classNames:r,className:o,style:i,styles:l,vars:a,withBorder:u,inheritPadding:d,mod:c,...p}=s,f=La();return n.jsx(de,{ref:t,mod:[{"with-border":u,"inherit-padding":d},c],...f.getStyles("section",{className:o,style:i,styles:l,classNames:r}),...p})});ws.classes=Sn;ws.displayName="@mantine/core/CardSection";const Ia=Me((e,{padding:t})=>({root:{"--card-padding":Ge(t)}})),Ss=cn((e,t)=>{const s=ne("Card",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,children:d,padding:c,attributes:p,...f}=s,h=ye({name:"Card",props:s,classes:Sn,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:p,vars:u,varsResolver:Ia}),m=P.Children.toArray(d),w=m.map((g,S)=>typeof g=="object"&&g&&"type"in g&&g.type===ws?P.cloneElement(g,{"data-first-section":S===0||void 0,"data-last-section":S===m.length-1||void 0}):g);return n.jsx(Na,{value:{getStyles:h},children:n.jsx(Yo,{ref:t,unstyled:a,...h("root"),...f,children:w})})});Ss.classes=Sn;Ss.displayName="@mantine/core/Card";Ss.Section=ws;var Vr={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const rr={withShadow:!0},Ra=Me((e,{radius:t,size:s})=>({root:{"--cs-radius":t===void 0?void 0:Xt(t),"--cs-size":He(s)}})),Jt=cn((e,t)=>{const s=ne("ColorSwatch",rr,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,color:d,size:c,radius:p,withShadow:f,children:h,variant:m,attributes:w,...g}=ne("ColorSwatch",rr,s),S=ye({name:"ColorSwatch",props:s,classes:Vr,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:w,vars:u,varsResolver:Ra});return n.jsxs(de,{ref:t,variant:m,size:c,...S("root",{focusable:!0}),...g,children:[n.jsx("span",{...S("alphaOverlay")}),f&&n.jsx("span",{...S("shadowOverlay")}),n.jsx("span",{...S("colorOverlay",{style:{backgroundColor:d}})}),n.jsx("span",{...S("childrenOverlay"),children:h})]})});Jt.classes=Vr;Jt.displayName="@mantine/core/ColorSwatch";const[Ta,jn]=un(null),Pn=P.forwardRef(({position:e,...t},s)=>n.jsx(de,{ref:s,__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...t}));Pn.displayName="@mantine/core/ColorPickerThumb";var Dn={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const _n=oe((e,t)=>{const s=ne("ColorSlider",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,onChange:d,onChangeEnd:c,maxValue:p,round:f,size:h="md",focusable:m=!0,value:w,overlays:g,thumbColor:S="transparent",onScrubStart:y,onScrubEnd:v,__staticSelector:b="ColorPicker",attributes:x,...D}=s,M=ye({name:b,classes:Dn,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:x}),O=jn()?.getStyles||M,z=ys(),[A,Y]=P.useState({y:0,x:w/p}),B=P.useRef(A),I=T=>f?Math.round(T*p):T*p,{ref:F}=Cn(({x:T,y:j})=>{B.current={x:T,y:j},d?.(I(T))},{onScrubEnd:()=>{const{x:T}=B.current;c?.(I(T)),v?.()},onScrubStart:y});St(()=>{Y({y:0,x:w/p})},[w]);const E=(T,j)=>{T.preventDefault();const C=Ar(j);d?.(I(C.x)),c?.(I(C.x))},H=T=>{switch(T.key){case"ArrowRight":{E(T,{x:A.x+.05,y:A.y});break}case"ArrowLeft":{E(T,{x:A.x-.05,y:A.y});break}}},R=g.map((T,j)=>P.createElement("div",{...O("sliderOverlay"),style:T,key:j}));return n.jsxs(de,{...D,ref:nt(F,t),...O("slider"),role:"slider","aria-valuenow":w,"aria-valuemax":p,"aria-valuemin":0,tabIndex:m?0:-1,onKeyDown:H,"data-focus-ring":z.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${h})`},children:[R,n.jsx(Pn,{position:A,...O("thumb",{style:{top:He(1),background:S}})})]})});_n.displayName="@mantine/core/ColorSlider";function Qe(e,t=0,s=10**t){return Math.round(s*e)/s}function $a({h:e,s:t,l:s,a:r}){const o=t*((s<50?s:100-s)/100);return{h:e,s:o>0?2*o/(s+o)*100:0,v:s+o,a:r}}const Oa={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Aa(e,t="deg"){return Number(e)*(Oa[t]||1)}const Va=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function or(e){const t=Va.exec(e);return t?$a({h:Aa(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function rn({r:e,g:t,b:s,a:r}){const o=Math.max(e,t,s),i=o-Math.min(e,t,s),l=i?o===e?(t-s)/i:o===t?2+(s-e)/i:4+(e-t)/i:0;return{h:Qe(60*(l<0?l+6:l),3),s:Qe(o?i/o*100:0,3),v:Qe(o/255*100,3),a:r}}function on(e){const t=e[0]==="#"?e.slice(1):e;return t.length===3?rn({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):rn({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function Fa(e){const t=e[0]==="#"?e.slice(1):e,s=l=>Qe(parseInt(l,16)/255,3);if(t.length===4){const l=t.slice(0,3),a=s(t[3]+t[3]);return{...on(l),a}}const r=t.slice(0,6),o=s(t.slice(6,8));return{...on(r),a:o}}const Ea=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function ar(e){const t=Ea.exec(e);return t?rn({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}const Fr={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},Ya={hex:on,hexa:Fa,rgb:ar,rgba:ar,hsl:or,hsla:or};function Gt(e){for(const[,t]of Object.entries(Fr))if(t.test(e))return!0;return!1}function Lt(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const t=e.trim();for(const[s,r]of Object.entries(Fr))if(r.test(t))return Ya[s](t);return{h:0,s:0,v:0,a:1}}const Er=P.forwardRef((e,t)=>{const{value:s,onChange:r,onChangeEnd:o,color:i,...l}=ne("AlphaSlider",null,e);return n.jsx(_n,{...l,ref:t,value:s,onChange:a=>r?.(Qe(a,2)),onChangeEnd:a=>o?.(Qe(a,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${He(8)} ${He(8)}`,backgroundPosition:`0 0, 0 ${He(4)}, ${He(4)} ${He(-4)}, ${He(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${i})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${He(1)} inset, rgb(0, 0, 0, .15) 0 0 ${He(4)} inset`}]})});Er.displayName="@mantine/core/AlphaSlider";function Yr({h:e,s:t,v:s,a:r}){const o=e/360*6,i=t/100,l=s/100,a=Math.floor(o),u=l*(1-i),d=l*(1-(o-a)*i),c=l*(1-(1-o+a)*i),p=a%6;return{r:Qe([l,d,u,u,c,l][p]*255),g:Qe([c,l,l,d,u,u][p]*255),b:Qe([u,u,c,l,l,d][p]*255),a:Qe(r,2)}}function ir(e,t){const{r:s,g:r,b:o,a:i}=Yr(e);return t?`rgba(${s}, ${r}, ${o}, ${Qe(i,2)})`:`rgb(${s}, ${r}, ${o})`}function lr({h:e,s:t,v:s,a:r},o){const i=(200-t)*s/100,l={h:Math.round(e),s:Math.round(i>0&&i<200?t*s/100/(i<=100?i:200-i)*100:0),l:Math.round(i/2)};return o?`hsla(${l.h}, ${l.s}%, ${l.l}%, ${Qe(r,2)})`:`hsl(${l.h}, ${l.s}%, ${l.l}%)`}function ls(e){const t=e.toString(16);return t.length<2?`0${t}`:t}function zr(e){const{r:t,g:s,b:r}=Yr(e);return`#${ls(t)}${ls(s)}${ls(r)}`}function za(e){const t=Math.round(e.a*255);return`${zr(e)}${ls(t)}`}const Ks={hex:zr,hexa:e=>za(e),rgb:e=>ir(e,!1),rgba:e=>ir(e,!0),hsl:e=>lr(e,!1),hsla:e=>lr(e,!0)};function st(e,t){return t?e in Ks?Ks[e](t):Ks.hex(t):"#000000"}const Br=P.forwardRef((e,t)=>{const{value:s,onChange:r,onChangeEnd:o,color:i,...l}=ne("HueSlider",{},e);return n.jsx(_n,{...l,ref:t,value:s,onChange:r,onChangeEnd:o,maxValue:360,thumbColor:`hsl(${s}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${He(1)} inset, rgb(0, 0, 0, .15) 0 0 ${He(4)} inset`}]})});Br.displayName="@mantine/core/HueSlider";function Hr({className:e,onChange:t,onChangeEnd:s,value:r,saturationLabel:o,focusable:i=!0,size:l,color:a,onScrubStart:u,onScrubEnd:d,...c}){const{getStyles:p}=jn(),[f,h]=P.useState({x:r.s/100,y:1-r.v/100}),m=P.useRef(f),{ref:w}=Cn(({x:y,y:v})=>{m.current={x:y,y:v},t({s:Math.round(y*100),v:Math.round((1-v)*100)})},{onScrubEnd:()=>{const{x:y,y:v}=m.current;s({s:Math.round(y*100),v:Math.round((1-v)*100)}),d?.()},onScrubStart:u});P.useEffect(()=>{h({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);const g=(y,v)=>{y.preventDefault();const b=Ar(v);t({s:Math.round(b.x*100),v:Math.round((1-b.y)*100)}),s({s:Math.round(b.x*100),v:Math.round((1-b.y)*100)})},S=y=>{switch(y.key){case"ArrowUp":{g(y,{y:f.y-.05,x:f.x});break}case"ArrowDown":{g(y,{y:f.y+.05,x:f.x});break}case"ArrowRight":{g(y,{x:f.x+.05,y:f.y});break}case"ArrowLeft":{g(y,{x:f.x-.05,y:f.y});break}}};return n.jsxs(de,{...p("saturation"),ref:w,...c,role:"slider","aria-label":o,"aria-valuenow":f.x,"aria-valuetext":st("rgba",r),tabIndex:i?0:-1,onKeyDown:S,children:[n.jsx("div",{...p("saturationOverlay",{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),n.jsx("div",{...p("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),n.jsx("div",{...p("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),n.jsx(Pn,{position:f,...p("thumb",{style:{backgroundColor:a}})})]})}Hr.displayName="@mantine/core/Saturation";const Wr=P.forwardRef(({className:e,datatype:t,setValue:s,onChangeEnd:r,size:o,focusable:i,data:l,swatchesPerRow:a,value:u,...d},c)=>{const p=jn(),f=l.map((h,m)=>P.createElement(Jt,{...p.getStyles("swatch"),unstyled:p.unstyled,component:"button",type:"button",color:h,key:m,radius:"sm",onClick:()=>{s(h),r?.(h)},"aria-label":h,tabIndex:i?0:-1,"data-swatch":!0},u===h&&n.jsx(Tr,{size:"35%",color:zo(h)<.5?"white":"black"})));return n.jsx(de,{...p.getStyles("swatches"),ref:c,...d,children:f})});Wr.displayName="@mantine/core/Swatches";const Ba={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},Ha=Me((e,{size:t,swatchesPerRow:s})=>({wrapper:{"--cp-preview-size":De(t,"cp-preview-size"),"--cp-width":De(t,"cp-width"),"--cp-body-spacing":Ge(t),"--cp-swatch-size":`${100/s}%`,"--cp-thumb-size":De(t,"cp-thumb-size"),"--cp-saturation-height":De(t,"cp-saturation-height")}})),kn=oe((e,t)=>{const s=ne("ColorPicker",Ba,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,format:d="hex",value:c,defaultValue:p,onChange:f,onChangeEnd:h,withPicker:m,size:w,saturationLabel:g,hueLabel:S,alphaLabel:y,focusable:v,swatches:b,swatchesPerRow:x,fullWidth:D,onColorSwatchClick:M,__staticSelector:$,mod:O,attributes:z,...A}=s,Y=ye({name:$,props:s,classes:Dn,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:z,rootSelector:"wrapper",vars:u,varsResolver:Ha}),B=P.useRef(d||"hex"),I=P.useRef(""),F=P.useRef(-1),E=P.useRef(!1),H=d==="hexa"||d==="rgba"||d==="hsla",[R,T,j]=Ke({value:c,defaultValue:p,finalValue:"#FFFFFF",onChange:f}),[C,_]=P.useState(Lt(R)),k=()=>{window.clearTimeout(F.current),E.current=!0},N=()=>{window.clearTimeout(F.current),F.current=window.setTimeout(()=>{E.current=!1},200)},W=G=>{_(ee=>{const ae={...ee,...G};return I.current=st(B.current,ae),ae}),T(I.current)};return St(()=>{typeof c=="string"&&Gt(c)&&!E.current&&_(Lt(c))},[c]),St(()=>{B.current=d||"hex",T(st(B.current,C))},[d]),n.jsx(Ta,{value:{getStyles:Y,unstyled:a},children:n.jsxs(de,{ref:t,...Y("wrapper"),size:w,mod:[{"full-width":D},O],...A,children:[m&&n.jsxs(n.Fragment,{children:[n.jsx(Hr,{value:C,onChange:W,onChangeEnd:({s:G,v:ee})=>h?.(st(B.current,{...C,s:G,v:ee})),color:R,size:w,focusable:v,saturationLabel:g,onScrubStart:k,onScrubEnd:N}),n.jsxs("div",{...Y("body"),children:[n.jsxs("div",{...Y("sliders"),children:[n.jsx(Br,{value:C.h,onChange:G=>W({h:G}),onChangeEnd:G=>h?.(st(B.current,{...C,h:G})),size:w,focusable:v,"aria-label":S,onScrubStart:k,onScrubEnd:N}),H&&n.jsx(Er,{value:C.a,onChange:G=>W({a:G}),onChangeEnd:G=>{h?.(st(B.current,{...C,a:G}))},size:w,color:st("hex",C),focusable:v,"aria-label":y,onScrubStart:k,onScrubEnd:N})]}),H&&n.jsx(Jt,{color:R,radius:"sm",size:"var(--cp-preview-size)",...Y("preview")})]})]}),Array.isArray(b)&&n.jsx(Wr,{data:b,swatchesPerRow:x,focusable:v,setValue:T,value:R,onChangeEnd:G=>{const ee=st(d,Lt(G));M?.(ee),h?.(ee),j||_(Lt(G))}})]})})});kn.classes=Dn;kn.displayName="@mantine/core/ColorPicker";function Wa({style:e,...t}){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--ci-eye-dropper-icon-size)",height:"var(--ci-eye-dropper-icon-size)",...e},viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...t,children:[n.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),n.jsx("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),n.jsx("path",{d:"M12 3l0 4"}),n.jsx("path",{d:"M12 21l0 -3"}),n.jsx("path",{d:"M3 12l4 0"}),n.jsx("path",{d:"M21 12l-3 0"}),n.jsx("path",{d:"M12 12l0 .01"})]})}var cr={eyeDropperIcon:"m_b077c2bc",eyeDropperButton:"m_66a028b5",colorPreview:"m_c5ccdcab",dropdown:"m_5ece2cd7"};const ur={format:"hex",fixOnBlur:!0,withPreview:!0,swatchesPerRow:7,withPicker:!0,popoverProps:{transitionProps:{transition:"fade",duration:0}},withEyeDropper:!0,size:"sm"},Ga=Me((e,{size:t})=>({eyeDropperIcon:{"--ci-eye-dropper-icon-size":De(t,"ci-eye-dropper-icon-size")},eyeDropperButton:{"--ci-button-size":De(t,"ci-button-size")},colorPreview:{"--ci-preview-size":De(t,"ci-preview-size")}})),Mn=oe((e,t)=>{const s=ne("ColorInput",ur,e),{classNames:r,styles:o,unstyled:i,disallowInput:l,fixOnBlur:a,popoverProps:u,withPreview:d,withEyeDropper:c,eyeDropperIcon:p,closeOnColorSwatchClick:f,eyeDropperButtonProps:h,value:m,defaultValue:w,onChange:g,onChangeEnd:S,onClick:y,onFocus:v,onBlur:b,inputProps:x,format:D="hex",wrapperProps:M,readOnly:$,withPicker:O,swatches:z,disabled:A,leftSection:Y,rightSection:B,swatchesPerRow:I,...F}=dn("ColorInput",ur,e),E=ye({name:"ColorInput",props:s,classes:cr,classNames:r,styles:o,unstyled:i,rootSelector:"wrapper",vars:s.vars,varsResolver:Ga}),{resolvedClassNames:H,resolvedStyles:R}=Xe({classNames:r,styles:o,props:s}),[T,j]=P.useState(!1),[C,_]=P.useState(""),[k,N]=Ke({value:m,defaultValue:w,finalValue:"",onChange:g}),{supported:W,open:G}=ka(),ee=n.jsx(Ft,{...h,...E("eyeDropperButton",{className:h?.className,style:h?.style}),variant:"subtle",color:"gray",unstyled:i,onClick:()=>G().then(te=>{if(te?.sRGBHex){const X=st(D,Lt(te.sRGBHex));N(X),S?.(X)}}).catch(()=>{}),children:p||n.jsx(Wa,{...E("eyeDropperIcon")})}),ae=te=>{v?.(te),j(!0)},re=te=>{a&&N(C),b?.(te),j(!1)},K=te=>{y?.(te),j(!0)};return P.useEffect(()=>{(Gt(k)||k.trim()==="")&&_(k)},[k]),St(()=>{Gt(k)&&N(st(D,Lt(k)))},[D]),n.jsx(Fe.Wrapper,{...M,classNames:H,styles:R,__staticSelector:"ColorInput",children:n.jsxs(Pe,{__staticSelector:"ColorInput",position:"bottom-start",offset:5,opened:T,...u,classNames:H,styles:R,unstyled:i,withRoles:!1,disabled:$||O===!1&&(!Array.isArray(z)||z.length===0),children:[n.jsx(Pe.Target,{children:n.jsx(Fe,{autoComplete:"off",...F,...x,classNames:H,styles:R,disabled:A,ref:t,__staticSelector:"ColorInput",onFocus:ae,onBlur:re,onClick:K,spellCheck:!1,value:k,onChange:te=>{const X=te.currentTarget.value;N(X),Gt(X)&&S?.(st(D,Lt(X)))},leftSection:Y||(d?n.jsx(Jt,{color:Gt(k)?k:"#fff",size:"var(--ci-preview-size)",...E("colorPreview")}):null),readOnly:l||$,pointer:l,unstyled:i,rightSection:B||(c&&!A&&!$&&W?ee:null)})}),n.jsx(Pe.Dropdown,{onMouseDown:te=>te.preventDefault(),className:cr.dropdown,children:n.jsx(kn,{__staticSelector:"ColorInput",value:k,onChange:N,onChangeEnd:S,format:D,swatches:z,swatchesPerRow:I,withPicker:O,size:x.size,focusable:!1,unstyled:i,styles:R,classNames:H,onColorSwatchClick:()=>f&&j(!1),attributes:M.attributes})})]})})});Mn.classes=Je.classes;Mn.displayName="@mantine/core/ColorInput";var Gr={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};const qa={variant:"default"},Ka=Me((e,{radius:t})=>({root:{"--fieldset-radius":t===void 0?void 0:Xt(t)}})),js=oe((e,t)=>{const s=ne("Fieldset",qa,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,legend:d,variant:c,children:p,attributes:f,...h}=s,m=ye({name:"Fieldset",classes:Gr,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:f,vars:u,varsResolver:Ka});return n.jsxs(de,{component:"fieldset",ref:t,variant:c,...m("root",{variant:c}),...h,children:[d&&n.jsx("legend",{...m("legend",{variant:c}),children:d}),p]})});js.classes=Gr;js.displayName="@mantine/core/Fieldset";const Ua={multiple:!1},qr=P.forwardRef((e,t)=>{const{onChange:s,children:r,multiple:o,accept:i,name:l,form:a,resetRef:u,disabled:d,capture:c,inputProps:p,...f}=ne("FileButton",Ua,e),h=P.useRef(null),m=()=>{!d&&h.current?.click()},w=S=>{if(S.currentTarget.files===null)return s(o?[]:null);s(o?Array.from(S.currentTarget.files):S.currentTarget.files[0]||null)};return Bo(u,()=>{h.current&&(h.current.value="")}),n.jsxs(n.Fragment,{children:[n.jsx("input",{style:{display:"none"},type:"file",accept:i,multiple:o,onChange:w,ref:nt(t,h),name:l,form:a,capture:c,...p}),r({onClick:m,...f})]})});qr.displayName="@mantine/core/FileButton";const Za=({value:e})=>n.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Array.isArray(e)?e.map(t=>t.name).join(", "):e?.name}),Qa={valueComponent:Za,size:"sm"},Nn=oe((e,t)=>{const s=ne("FileInput",Qa,e),{unstyled:r,vars:o,onChange:i,value:l,defaultValue:a,multiple:u,accept:d,name:c,form:p,valueComponent:f,clearable:h,clearButtonProps:m,readOnly:w,capture:g,fileInputProps:S,rightSection:y,size:v,placeholder:b,component:x,resetRef:D,classNames:M,styles:$,attributes:O,...z}=s,A=P.useRef(null),{resolvedClassNames:Y,resolvedStyles:B}=Xe({classNames:M,styles:$,props:s}),[I,F]=Ke({value:l,defaultValue:a,onChange:i,finalValue:u?[]:null}),E=Array.isArray(I)?I.length!==0:I!==null,H=y||(h&&E&&!w?n.jsx(pn,{...m,variant:"subtle",onClick:()=>F(u?[]:null),size:v,unstyled:r}):null);return P.useEffect(()=>{(Array.isArray(I)&&I.length===0||I===null)&&A.current?.()},[I]),n.jsx(qr,{onChange:F,multiple:u,accept:d,name:c,form:p,resetRef:nt(A,D),disabled:w,capture:g,inputProps:S,children:R=>n.jsx(Je,{component:x||"button",ref:t,rightSection:H,...R,...z,__staticSelector:"FileInput",multiline:!0,type:"button",pointer:!0,__stylesApiProps:s,unstyled:r,size:v,classNames:M,styles:$,attributes:O,children:E?n.jsx(f,{value:I}):n.jsx(Fe.Placeholder,{__staticSelector:"FileInput",classNames:Y,styles:B,attributes:O,children:b})})})});Nn.classes=Je.classes;Nn.displayName="@mantine/core/FileInput";const Xa=Nn,[dr,Kr]=Qt("Grid component was not found in tree"),an=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,pr=(e,t,s)=>s||e==="auto"?"100%":e==="content"?"unset":an(e,t),mr=(e,t)=>{if(e)return e==="auto"||t?"1":"auto"},hr=(e,t)=>e===0?"0":e?`${100/(t/e)}%`:void 0;function Ja({span:e,order:t,offset:s,selector:r}){const o=ys(),i=Kr(),l=i.breakpoints||o.breakpoints,u=rt(e)===void 0?12:rt(e),d=vs({"--col-order":rt(t)?.toString(),"--col-flex-grow":mr(u,i.grow),"--col-flex-basis":an(u,i.columns),"--col-width":u==="content"?"auto":void 0,"--col-max-width":pr(u,i.columns,i.grow),"--col-offset":hr(rt(s),i.columns)}),c=dt(l).reduce((h,m)=>(h[m]||(h[m]={}),typeof t=="object"&&t[m]!==void 0&&(h[m]["--col-order"]=t[m]?.toString()),typeof e=="object"&&e[m]!==void 0&&(h[m]["--col-flex-grow"]=mr(e[m],i.grow),h[m]["--col-flex-basis"]=an(e[m],i.columns),h[m]["--col-width"]=e[m]==="content"?"auto":void 0,h[m]["--col-max-width"]=pr(e[m],i.columns,i.grow)),typeof s=="object"&&s[m]!==void 0&&(h[m]["--col-offset"]=hr(s[m],i.columns)),h),{}),f=gn(dt(c),l).filter(h=>dt(c[h.value]).length>0).map(h=>({query:i.type==="container"?`mantine-grid (min-width: ${l[h.value]})`:`(min-width: ${l[h.value]})`,styles:c[h.value]}));return n.jsx(xs,{styles:d,media:i.type==="container"?void 0:f,container:i.type==="container"?f:void 0,selector:r})}var Ln={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const ei={span:12},In=oe((e,t)=>{const s=ne("GridCol",ei,e),{classNames:r,className:o,style:i,styles:l,vars:a,span:u,order:d,offset:c,...p}=s,f=Kr(),h=mn();return n.jsxs(n.Fragment,{children:[n.jsx(Ja,{selector:`.${h}`,span:u,order:d,offset:c}),n.jsx(de,{ref:t,...f.getStyles("col",{className:bs(o,h),style:i,classNames:r,styles:l}),...p})]})});In.classes=Ln;In.displayName="@mantine/core/GridCol";function fr({gutter:e,selector:t,breakpoints:s,type:r}){const o=ys(),i=s||o.breakpoints,l=vs({"--grid-gutter":Ge(rt(e))}),a=dt(i).reduce((c,p)=>(c[p]||(c[p]={}),typeof e=="object"&&e[p]!==void 0&&(c[p]["--grid-gutter"]=Ge(e[p])),c),{}),d=gn(dt(a),i).filter(c=>dt(a[c.value]).length>0).map(c=>({query:r==="container"?`mantine-grid (min-width: ${i[c.value]})`:`(min-width: ${i[c.value]})`,styles:a[c.value]}));return n.jsx(xs,{styles:l,media:r==="container"?void 0:d,container:r==="container"?d:void 0,selector:t})}const ti={gutter:"md",grow:!1,columns:12},si=Me((e,{justify:t,align:s,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":s,"--grid-overflow":r}})),ht=oe((e,t)=>{const s=ne("Grid",ti,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,grow:d,gutter:c,columns:p,align:f,justify:h,children:m,breakpoints:w,type:g,attributes:S,...y}=s,v=ye({name:"Grid",classes:Ln,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:S,vars:u,varsResolver:si}),b=mn();return g==="container"&&w?n.jsxs(dr,{value:{getStyles:v,grow:d,columns:p,breakpoints:w,type:g},children:[n.jsx(fr,{selector:`.${b}`,...s}),n.jsx("div",{...v("container"),children:n.jsx(de,{ref:t,...v("root",{className:b}),...y,children:n.jsx("div",{...v("inner"),children:m})})})]}):n.jsxs(dr,{value:{getStyles:v,grow:d,columns:p,breakpoints:w,type:g},children:[n.jsx(fr,{selector:`.${b}`,...s}),n.jsx(de,{ref:t,...v("root",{className:b}),...y,children:n.jsx("div",{...v("inner"),children:m})})]})});ht.classes=Ln;ht.displayName="@mantine/core/Grid";ht.Col=In;const[ni,Rn]=un(),[ri,oi]=un();var Ps={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const ai=Me((e,{gap:t},{size:s})=>({group:{"--pg-gap":t!==void 0?De(t):De(s,"pg-gap")}})),Tn=oe((e,t)=>{const s=ne("PillGroup",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,size:d,disabled:c,attributes:p,...f}=s,m=Rn()?.size||d||void 0,w=ye({name:"PillGroup",classes:Ps,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:p,vars:u,varsResolver:ai,stylesCtx:{size:m},rootSelector:"group"});return n.jsx(ri,{value:{size:m,disabled:c},children:n.jsx(de,{ref:t,size:m,...w("group"),...f})})});Tn.classes=Ps;Tn.displayName="@mantine/core/PillGroup";const ii={variant:"default"},li=Me((e,{radius:t},{size:s})=>({root:{"--pill-fz":De(s,"pill-fz"),"--pill-height":De(s,"pill-height"),"--pill-radius":t===void 0?void 0:Xt(t)}})),It=oe((e,t)=>{const s=ne("Pill",ii,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,variant:d,children:c,withRemoveButton:p,onRemove:f,removeButtonProps:h,radius:m,size:w,disabled:g,mod:S,attributes:y,...v}=s,b=oi(),x=Rn(),D=w||b?.size||void 0,M=x?.variant==="filled"?"contrast":d||"default",$=ye({name:"Pill",classes:Ps,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:y,vars:u,varsResolver:li,stylesCtx:{size:D}});return n.jsxs(de,{component:"span",ref:t,variant:M,size:D,...$("root",{variant:M}),mod:[{"with-remove":p&&!g,disabled:g||b?.disabled},S],...v,children:[n.jsx("span",{...$("label"),children:c}),p&&n.jsx(pn,{variant:"transparent",radius:m,tabIndex:-1,"aria-hidden":!0,unstyled:a,...h,...$("remove",{className:h?.className,style:h?.style}),onMouseDown:O=>{O.preventDefault(),O.stopPropagation(),h?.onMouseDown?.(O)},onClick:O=>{O.stopPropagation(),f?.(),h?.onClick?.(O)}})]})});It.classes=Ps;It.displayName="@mantine/core/Pill";It.Group=Tn;var Ur={field:"m_45c4369d"};const ci={type:"visible"},$n=oe((e,t)=>{const s=ne("PillsInputField",ci,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,type:d,disabled:c,id:p,pointer:f,mod:h,attributes:m,...w}=s,g=Rn(),S=Ho(),y=ye({name:"PillsInputField",classes:Ur,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:m,rootSelector:"field"}),v=c||g?.disabled;return n.jsx(de,{component:"input",ref:nt(t,g?.fieldRef),"data-type":d,disabled:v,mod:[{disabled:v,pointer:f},h],...y("field"),...w,id:S?.inputId||p,"aria-invalid":g?.hasError,"aria-describedby":S?.describedBy,type:"text",onMouseDown:b=>!f&&b.stopPropagation()})});$n.classes=Ur;$n.displayName="@mantine/core/PillsInputField";const ui={size:"sm"},Et=oe((e,t)=>{const s=ne("PillsInput",ui,e),{children:r,onMouseDown:o,onClick:i,size:l,disabled:a,__staticSelector:u,error:d,variant:c,...p}=s,f=P.useRef(null);return n.jsx(ni,{value:{fieldRef:f,size:l,disabled:a,hasError:!!d,variant:c},children:n.jsx(Je,{size:l,error:d,variant:c,component:"div",ref:t,"data-no-overflow":!0,onMouseDown:h=>{h.preventDefault(),o?.(h),f.current?.focus()},onClick:h=>{h.preventDefault(),h.currentTarget.closest("fieldset")?.disabled||(f.current?.focus(),i?.(h))},...p,multiline:!0,disabled:a,__staticSelector:u||"PillsInput",withAria:!1,children:r})})});Et.displayName="@mantine/core/PillsInput";Et.Field=$n;function di({data:e,value:t}){const s=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>($r(i)?o.push({group:i.group,items:i.items.filter(l=>s.indexOf(l.value.toLowerCase().trim())===-1)}):s.indexOf(i.value.toLowerCase().trim())===-1&&o.push(i),o),[])}const pi={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,size:"sm"},On=oe((e,t)=>{const s=ne("MultiSelect",pi,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,size:d,value:c,defaultValue:p,onChange:f,onKeyDown:h,variant:m,data:w,dropdownOpened:g,defaultDropdownOpened:S,onDropdownOpen:y,onDropdownClose:v,selectFirstOptionOnChange:b,onOptionSubmit:x,comboboxProps:D,filter:M,limit:$,withScrollArea:O,maxDropdownHeight:z,searchValue:A,defaultSearchValue:Y,onSearchChange:B,readOnly:I,disabled:F,onFocus:E,onBlur:H,radius:R,rightSection:T,rightSectionWidth:j,rightSectionPointerEvents:C,rightSectionProps:_,leftSection:k,leftSectionWidth:N,leftSectionPointerEvents:W,leftSectionProps:G,inputContainer:ee,inputWrapperOrder:ae,withAsterisk:re,labelProps:K,descriptionProps:te,errorProps:X,wrapperProps:le,description:J,label:pe,error:se,maxValues:we,searchable:Z,nothingFoundMessage:me,withCheckIcon:Ye,withAlignedLabels:he,checkIconPosition:ue,hidePickedOptions:xe,withErrorStyles:et,name:pt,form:Re,id:V,clearable:Te,clearButtonProps:_e,hiddenInputProps:gt,placeholder:yt,hiddenInputValuesDivider:vt,required:it,mod:Dt,renderOption:Ue,onRemove:Le,onClear:xt,scrollAreaProps:Q,chevronColor:Be,attributes:Se,clearSearchOnChange:lt,...$t}=s,$e=Zt(V),_t=yn(w),je=vn(_t),bt=P.useRef({}),ke=xn({opened:g,defaultOpened:S,onDropdownOpen:y,onDropdownClose:()=>{v?.(),ke.resetSelectedOption()}}),{styleProps:kt,rest:{type:Ot,autoComplete:be,...tt}}=hn($t),[U,Ce]=Ke({value:c,defaultValue:p,finalValue:[],onChange:f}),[Oe,Ct]=Ke({value:A,defaultValue:Y,finalValue:"",onChange:B}),Mt=ie=>{Ct(ie),ke.resetSelectedOption()},At=ye({name:"MultiSelect",classes:{},props:s,classNames:r,styles:l,unstyled:a,attributes:Se}),{resolvedClassNames:Bt,resolvedStyles:ns}=Xe({props:s,styles:l,classNames:r}),Ws=ie=>{h?.(ie),ie.key===" "&&!Z&&(ie.preventDefault(),ke.toggleDropdown()),ie.key==="Backspace"&&Oe.length===0&&U.length>0&&(Le?.(U[U.length-1]),Ce(U.slice(0,U.length-1)))},Gs=U.map((ie,rs)=>{const $o=je[ie]||bt.current[ie];return n.jsx(It,{withRemoveButton:!I&&!je[ie]?.disabled,onRemove:()=>{Ce(U.filter(Oo=>ie!==Oo)),Le?.(ie)},unstyled:a,disabled:F,...At("pill"),children:$o?.label||ie},`${ie}-${rs}`)});P.useEffect(()=>{b&&ke.selectFirstOption()},[b,Oe]),P.useEffect(()=>{U.forEach(ie=>{ie in je&&(bt.current[ie]=je[ie])})},[je,U]);const qs=n.jsx(Ie.ClearButton,{..._e,onClear:()=>{xt?.(),Ce([]),Mt("")}}),ce=di({data:_t,value:U}),ze=Te&&U.length>0&&!F&&!I;return n.jsxs(n.Fragment,{children:[n.jsxs(Ie,{store:ke,classNames:Bt,styles:ns,unstyled:a,size:d,readOnly:I,__staticSelector:"MultiSelect",attributes:Se,onOptionSubmit:ie=>{x?.(ie),lt&&Mt(""),ke.updateSelectedOptionIndex("selected"),U.includes(je[ie].value)?(Ce(U.filter(rs=>rs!==je[ie].value)),Le?.(je[ie].value)):U.length<we&&Ce([...U,je[ie].value])},...D,children:[n.jsx(Ie.DropdownTarget,{children:n.jsx(Et,{...kt,__staticSelector:"MultiSelect",classNames:Bt,styles:ns,unstyled:a,size:d,className:o,style:i,variant:m,disabled:F,radius:R,__defaultRightSection:n.jsx(Ie.Chevron,{size:d,error:se,unstyled:a,color:Be}),__clearSection:qs,__clearable:ze,rightSection:T,rightSectionPointerEvents:C||"none",rightSectionWidth:j,rightSectionProps:_,leftSection:k,leftSectionWidth:N,leftSectionPointerEvents:W,leftSectionProps:G,inputContainer:ee,inputWrapperOrder:ae,withAsterisk:re,labelProps:K,descriptionProps:te,errorProps:X,wrapperProps:le,description:J,label:pe,error:se,withErrorStyles:et,__stylesApiProps:{...s,rightSectionPointerEvents:C||(ze?"all":"none"),multiline:!0},pointer:!Z,onClick:()=>Z?ke.openDropdown():ke.toggleDropdown(),"data-expanded":ke.dropdownOpened||void 0,id:$e,required:it,mod:Dt,attributes:Se,children:n.jsxs(It.Group,{attributes:Se,disabled:F,unstyled:a,...At("pillsList"),children:[Gs,n.jsx(Ie.EventsTarget,{autoComplete:be,children:n.jsx(Et.Field,{...tt,ref:t,id:$e,placeholder:yt,type:!Z&&!yt?"hidden":"visible",...At("inputField"),unstyled:a,onFocus:ie=>{E?.(ie),Z&&ke.openDropdown()},onBlur:ie=>{H?.(ie),ke.closeDropdown(),Mt("")},onKeyDown:Ws,value:Oe,onChange:ie=>{Mt(ie.currentTarget.value),Z&&ke.openDropdown(),b&&ke.selectFirstOption()},disabled:F,readOnly:I||!Z,pointer:!Z})})]})})}),n.jsx(bn,{data:xe?ce:_t,hidden:I||F,filter:M,search:Oe,limit:$,hiddenWhenEmpty:!me,withScrollArea:O,maxDropdownHeight:z,filterOptions:Z,value:U,checkIconPosition:ue,withCheckIcon:Ye,withAlignedLabels:he,nothingFoundMessage:me,unstyled:a,labelId:pe?`${$e}-label`:void 0,"aria-label":pe?void 0:$t["aria-label"],renderOption:Ue,scrollAreaProps:Q})]}),n.jsx(Ie.HiddenInput,{name:pt,valuesDivider:vt,value:U,form:Re,disabled:F,...gt})]})});On.classes={...Je.classes,...Ie.classes};On.displayName="@mantine/core/MultiSelect";const[mi,Ds]=Qt("Pagination.Root component was not found in tree");var es={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const hi={withPadding:!0},ts=oe((e,t)=>{const s=ne("PaginationControl",hi,e),{classNames:r,className:o,style:i,styles:l,vars:a,active:u,disabled:d,withPadding:c,mod:p,...f}=s,h=Ds(),m=d||h.disabled;return n.jsx(ot,{ref:t,disabled:m,mod:[{active:u,disabled:m,"with-padding":c},p],...h.getStyles("control",{className:o,style:i,classNames:r,styles:l,active:!m}),...f})});ts.classes=es;ts.displayName="@mantine/core/PaginationControl";function ss({style:e,children:t,path:s,...r}){return n.jsx("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...e},...r,children:n.jsx("path",{d:s,fill:"currentColor"})})}const fi=e=>n.jsx(ss,{...e,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),gi=e=>n.jsx(ss,{...e,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),yi=e=>n.jsx(ss,{...e,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),vi=e=>n.jsx(ss,{...e,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),xi=e=>n.jsx(ss,{...e,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}),bi={icon:xi},_s=oe((e,t)=>{const s=ne("PaginationDots",bi,e),{classNames:r,className:o,style:i,styles:l,vars:a,icon:u,...d}=s,c=Ds();return n.jsx(de,{ref:t,...c.getStyles("dots",{className:o,style:i,styles:l,classNames:r}),...d,children:n.jsx(u,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});_s.classes=es;_s.displayName="@mantine/core/PaginationDots";function ks({icon:e,name:t,action:s,type:r}){const o={icon:e},i=P.forwardRef((l,a)=>{const{icon:u,...d}=ne(t,o,l),c=Ds(),p=r==="next"?c.active===c.total:c.active===1;return n.jsx(ts,{disabled:c.disabled||p,ref:a,onClick:c[s],withPadding:!1,...d,children:n.jsx(u,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});return i.displayName=`@mantine/core/${t}`,Wo(i)}const Zr=ks({icon:fi,name:"PaginationNext",action:"onNext",type:"next"}),Qr=ks({icon:gi,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),Xr=ks({icon:yi,name:"PaginationFirst",action:"onFirst",type:"previous"}),Jr=ks({icon:vi,name:"PaginationLast",action:"onLast",type:"next"});function An({dotsIcon:e}){const t=Ds(),s=t.range.map((r,o)=>r==="dots"?n.jsx(_s,{icon:e},o):n.jsx(ts,{active:r===t.active,"aria-current":r===t.active?"page":void 0,onClick:()=>t.onChange(r),disabled:t.disabled,...t.getItemProps?.(r),children:t.getItemProps?.(r)?.children??r},o));return n.jsx(n.Fragment,{children:s})}An.displayName="@mantine/core/PaginationItems";const Ci={siblings:1,boundaries:1},wi=Me((e,{size:t,radius:s,color:r,autoContrast:o})=>({root:{"--pagination-control-radius":s===void 0?void 0:Xt(s),"--pagination-control-size":De(t,"pagination-control-size"),"--pagination-control-fz":Rt(t),"--pagination-active-bg":r?Mr(r,e):void 0,"--pagination-active-color":qo(o,e)?Go({color:r,theme:e,autoContrast:o}):void 0}})),Ms=oe((e,t)=>{const s=ne("PaginationRoot",Ci,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,total:d,value:c,defaultValue:p,onChange:f,disabled:h,siblings:m,boundaries:w,color:g,radius:S,onNextPage:y,onPreviousPage:v,onFirstPage:b,onLastPage:x,getItemProps:D,autoContrast:M,attributes:$,...O}=s,z=ye({name:"Pagination",classes:es,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:$,vars:u,varsResolver:wi}),{range:A,setPage:Y,next:B,previous:I,active:F,first:E,last:H}=_a({page:c,initialPage:p,onChange:f,total:d,siblings:m,boundaries:w}),R=os(y,B),T=os(v,I),j=os(b,E),C=os(x,H);return n.jsx(mi,{value:{total:d,range:A,active:F,disabled:h,getItemProps:D,onChange:Y,onNext:R,onPrevious:T,onFirst:j,onLast:C,getStyles:z},children:n.jsx(de,{ref:t,...z("root"),...O})})});Ms.classes=es;Ms.displayName="@mantine/core/PaginationRoot";const Si={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8},at=oe((e,t)=>{const s=ne("Pagination",Si,e),{withEdges:r,withControls:o,getControlProps:i,nextIcon:l,previousIcon:a,lastIcon:u,firstIcon:d,dotsIcon:c,total:p,gap:f,hideWithOnePage:h,withPages:m,...w}=s;return p<=0||h&&p===1?null:n.jsx(Ms,{ref:t,total:p,...w,children:n.jsxs(ut,{gap:f,children:[r&&n.jsx(Xr,{icon:d,...i?.("first")}),o&&n.jsx(Qr,{icon:a,...i?.("previous")}),m&&n.jsx(An,{dotsIcon:c}),o&&n.jsx(Zr,{icon:l,...i?.("next")}),r&&n.jsx(Jr,{icon:u,...i?.("last")})]})})});at.classes=es;at.displayName="@mantine/core/Pagination";at.Root=Ms;at.Control=ts;at.Dots=_s;at.First=Xr;at.Last=Jr;at.Next=Zr;at.Previous=Qr;at.Items=An;const ji=({reveal:e})=>n.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:n.jsx("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var ln={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Pi={visibilityToggleIcon:ji},Di=Me((e,{size:t})=>({root:{"--psi-icon-size":De(t,"psi-icon-size"),"--psi-button-size":De(t,"psi-button-size")}})),Vn=oe((e,t)=>{const s=ne("PasswordInput",Pi,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,required:d,error:c,leftSection:p,disabled:f,id:h,variant:m,inputContainer:w,description:g,label:S,size:y,errorProps:v,descriptionProps:b,labelProps:x,withAsterisk:D,inputWrapperOrder:M,wrapperProps:$,radius:O,rightSection:z,rightSectionWidth:A,rightSectionPointerEvents:Y,leftSectionWidth:B,visible:I,defaultVisible:F,onVisibilityChange:E,visibilityToggleIcon:H,visibilityToggleButtonProps:R,rightSectionProps:T,leftSectionProps:j,leftSectionPointerEvents:C,withErrorStyles:_,mod:k,attributes:N,...W}=s,G=Zt(h),[ee,ae]=Ke({value:I,defaultValue:F,finalValue:!1,onChange:E}),re=()=>ae(!ee),K=ye({name:"PasswordInput",classes:ln,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:N,vars:u,varsResolver:Di}),{resolvedClassNames:te,resolvedStyles:X}=Xe({classNames:r,styles:l,props:s}),{styleProps:le,rest:J}=hn(W),pe=v?.id||`${G}-error`,se=b?.id||`${G}-description`,me=`${!!c&&typeof c!="boolean"?pe:""} ${!!g?se:""}`,Ye=me.trim().length>0?me.trim():void 0,he=n.jsx(Ft,{...K("visibilityToggle"),disabled:f,radius:O,"aria-hidden":!R,"aria-pressed":ee,tabIndex:-1,...R,variant:R?.variant??"subtle",color:"gray",unstyled:a,onTouchEnd:ue=>{ue.preventDefault(),R?.onTouchEnd?.(ue),re()},onMouseDown:ue=>{ue.preventDefault(),R?.onMouseDown?.(ue),re()},onKeyDown:ue=>{R?.onKeyDown?.(ue),ue.key===" "&&(ue.preventDefault(),re())},children:n.jsx(H,{reveal:ee})});return n.jsx(Fe.Wrapper,{required:d,id:G,label:S,error:c,description:g,size:y,classNames:te,styles:X,__staticSelector:"PasswordInput",unstyled:a,withAsterisk:D,inputWrapperOrder:M,inputContainer:w,variant:m,labelProps:{...x,htmlFor:G},descriptionProps:{...b,id:se},errorProps:{...v,id:pe},mod:k,attributes:N,...K("root"),...le,...$,children:n.jsx(Fe,{component:"div",error:c,leftSection:p,size:y,classNames:{...te,input:bs(ln.input,te.input)},styles:X,radius:O,disabled:f,__staticSelector:"PasswordInput",rightSectionWidth:A,rightSection:z??he,variant:m,unstyled:a,leftSectionWidth:B,rightSectionPointerEvents:Y||"all",rightSectionProps:T,leftSectionProps:j,leftSectionPointerEvents:C,withAria:!1,withErrorStyles:_,attributes:N,children:n.jsx("input",{required:d,"data-invalid":!!c||void 0,"data-with-left-section":!!p||void 0,...K("innerInput"),disabled:f,id:G,ref:t,...J,"aria-describedby":Ye,autoComplete:J.autoComplete||"off",type:ee?"text":"password"})})})});Vn.classes={...Je.classes,...ln};Vn.displayName="@mantine/core/PasswordInput";function _i({spacing:e,verticalSpacing:t,cols:s,selector:r}){const o=ys(),i=t===void 0?e:t,l=vs({"--sg-spacing-x":Ge(rt(e)),"--sg-spacing-y":Ge(rt(i)),"--sg-cols":rt(s)?.toString()}),a=dt(o.breakpoints).reduce((c,p)=>(c[p]||(c[p]={}),typeof e=="object"&&e[p]!==void 0&&(c[p]["--sg-spacing-x"]=Ge(e[p])),typeof i=="object"&&i[p]!==void 0&&(c[p]["--sg-spacing-y"]=Ge(i[p])),typeof s=="object"&&s[p]!==void 0&&(c[p]["--sg-cols"]=s[p]),c),{}),d=gn(dt(a),o.breakpoints).filter(c=>dt(a[c.value]).length>0).map(c=>({query:`(min-width: ${o.breakpoints[c.value]})`,styles:a[c.value]}));return n.jsx(xs,{styles:l,media:d,selector:r})}function Us(e){return typeof e=="object"&&e!==null?dt(e):[]}function ki(e){return e.sort((t,s)=>Xn(t)-Xn(s))}function Mi({spacing:e,verticalSpacing:t,cols:s}){const r=Array.from(new Set([...Us(e),...Us(t),...Us(s)]));return ki(r)}function Ni({spacing:e,verticalSpacing:t,cols:s,selector:r}){const o=t===void 0?e:t,i=vs({"--sg-spacing-x":Ge(rt(e)),"--sg-spacing-y":Ge(rt(o)),"--sg-cols":rt(s)?.toString()}),l=Mi({spacing:e,verticalSpacing:t,cols:s}),a=l.reduce((d,c)=>(d[c]||(d[c]={}),typeof e=="object"&&e[c]!==void 0&&(d[c]["--sg-spacing-x"]=Ge(e[c])),typeof o=="object"&&o[c]!==void 0&&(d[c]["--sg-spacing-y"]=Ge(o[c])),typeof s=="object"&&s[c]!==void 0&&(d[c]["--sg-cols"]=s[c]),d),{}),u=l.map(d=>({query:`simple-grid (min-width: ${d})`,styles:a[d]}));return n.jsx(xs,{styles:i,container:u,selector:r})}var eo={container:"m_925c2d2c",root:"m_2415a157"};const Li={cols:1,spacing:"md",type:"media"},Ns=oe((e,t)=>{const s=ne("SimpleGrid",Li,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,cols:d,verticalSpacing:c,spacing:p,type:f,attributes:h,...m}=s,w=ye({name:"SimpleGrid",classes:eo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:h,vars:u}),g=mn();return f==="container"?n.jsxs(n.Fragment,{children:[n.jsx(Ni,{...s,selector:`.${g}`}),n.jsx("div",{...w("container"),children:n.jsx(de,{ref:t,...w("root",{className:g}),...m})})]}):n.jsxs(n.Fragment,{children:[n.jsx(_i,{...s,selector:`.${g}`}),n.jsx(de,{ref:t,...w("root",{className:g}),...m})]})});Ns.classes=eo;Ns.displayName="@mantine/core/SimpleGrid";const[Ii,Ls]=Qt("SliderProvider was not found in tree"),to=P.forwardRef(({size:e,disabled:t,variant:s,color:r,thumbSize:o,radius:i,...l},a)=>{const{getStyles:u}=Ls();return n.jsx(de,{tabIndex:-1,variant:s,size:e,ref:a,...u("root"),...l})});to.displayName="@mantine/core/SliderRoot";const so=P.forwardRef(({max:e,min:t,value:s,position:r,label:o,dragging:i,onMouseDown:l,onKeyDownCapture:a,labelTransitionProps:u,labelAlwaysOn:d,thumbLabel:c,onFocus:p,onBlur:f,showLabelOnHover:h,isHovered:m,children:w=null,disabled:g},S)=>{const{getStyles:y}=Ls(),[v,b]=P.useState(!1),x=d||i||v||h&&m;return n.jsxs(de,{tabIndex:0,role:"slider","aria-label":c,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":s,ref:S,__vars:{"--slider-thumb-offset":`${r}%`},...y("thumb",{focusable:!0}),mod:{dragging:i,disabled:g},onFocus:D=>{b(!0),typeof p=="function"&&p(D)},onBlur:D=>{b(!1),typeof f=="function"&&f(D)},onTouchStart:l,onMouseDown:l,onKeyDownCapture:a,onClick:D=>D.stopPropagation(),children:[w,n.jsx(Ko,{mounted:o!=null&&!!x,transition:"fade",duration:0,...u,children:D=>n.jsx("div",{...y("label",{style:D}),children:o})})]})});so.displayName="@mantine/core/SliderThumb";function no({value:e,min:t,max:s}){const r=(e-t)/(s-t)*100;return Math.min(Math.max(r,0),100)}function Ri({mark:e,offset:t,value:s,inverted:r=!1}){return r?typeof t=="number"&&e.value<=t||e.value>=s:typeof t=="number"?e.value>=t&&e.value<=s:e.value<=s}function ro({marks:e,min:t,max:s,disabled:r,value:o,offset:i,inverted:l}){const{getStyles:a}=Ls();if(!e)return null;const u=e.map((d,c)=>P.createElement(de,{...a("markWrapper"),__vars:{"--mark-offset":`${no({value:d.value,min:t,max:s})}%`},key:c},n.jsx(de,{...a("mark"),mod:{filled:Ri({mark:d,value:o,offset:i,inverted:l}),disabled:r}}),d.label&&n.jsx("div",{...a("markLabel"),children:d.label})));return n.jsx("div",{children:u})}ro.displayName="@mantine/core/SliderMarks";function oo({filled:e,children:t,offset:s,disabled:r,marksOffset:o,inverted:i,containerProps:l,...a}){const{getStyles:u}=Ls();return n.jsx(de,{...u("trackContainer"),mod:{disabled:r},...l,children:n.jsxs(de,{...u("track"),mod:{inverted:i,disabled:r},children:[n.jsx(de,{mod:{inverted:i,disabled:r},__vars:{"--slider-bar-width":`calc(${e}% + 2 * var(--slider-size))`,"--slider-bar-offset":`calc(${s}% - var(--slider-size))`},...u("bar")}),t,n.jsx(ro,{...a,offset:o,disabled:r,inverted:i})]})})}oo.displayName="@mantine/core/SliderTrack";function Ti({value:e,containerWidth:t,min:s,max:r,step:o,precision:i}){const a=(t?Math.min(Math.max(e,0),t)/t:e)*(r-s),u=(a!==0?Math.round(a/o)*o:0)+s,d=Math.max(u,s);return i!==void 0?Number(d.toFixed(i)):d}function is(e,t){return parseFloat(e.toFixed(t))}function $i(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}function Zs(e,t){const r=[...t].sort((o,i)=>o.value-i.value).find(o=>o.value>e);return r?r.value:e}function Qs(e,t){const r=[...t].sort((o,i)=>i.value-o.value).find(o=>o.value<e);return r?r.value:e}function gr(e){const t=[...e].sort((s,r)=>s.value-r.value);return t.length>0?t[0].value:0}function yr(e){const t=[...e].sort((s,r)=>s.value-r.value);return t.length>0?t[t.length-1].value:100}var ao={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};const Oi={radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:"fade",duration:0},thumbLabel:"",showLabelOnHover:!0,scale:e=>e,size:"md"},Ai=Me((e,{size:t,color:s,thumbSize:r,radius:o})=>({root:{"--slider-size":De(t,"slider-size"),"--slider-color":s?Mr(s,e):void 0,"--slider-radius":o===void 0?void 0:Xt(o),"--slider-thumb-size":r!==void 0?He(r):"calc(var(--slider-size) * 2)"}})),Fn=oe((e,t)=>{const s=ne("Slider",Oi,e),{classNames:r,styles:o,value:i,onChange:l,onChangeEnd:a,size:u,min:d,max:c,domain:p,step:f,precision:h,defaultValue:m,name:w,marks:g,label:S,labelTransitionProps:y,labelAlwaysOn:v,thumbLabel:b,showLabelOnHover:x,thumbChildren:D,disabled:M,unstyled:$,scale:O,inverted:z,className:A,style:Y,vars:B,hiddenInputProps:I,restrictToMarks:F,thumbProps:E,attributes:H,...R}=s,T=ye({name:"Slider",props:s,classes:ao,classNames:r,className:A,styles:o,style:Y,attributes:H,vars:B,varsResolver:Ai,unstyled:$}),{dir:j}=Uo(),[C,_]=P.useState(!1),[k,N]=Ke({value:typeof i=="number"?Ze(i,d,c):i,defaultValue:typeof m=="number"?Ze(m,d,c):m,finalValue:Ze(0,d,c),onChange:l}),W=P.useRef(k),G=P.useRef(a);P.useEffect(()=>{G.current=a},[a]);const ee=P.useRef(null),ae=P.useRef(null),[re,K]=p||[d,c],te=no({value:k,min:re,max:K}),X=O(k),le=typeof S=="function"?S(X):S,J=h??$i(f),pe=P.useCallback(({x:he})=>{if(!M){const ue=Ti({value:he,min:re,max:K,step:f,precision:J}),xe=Ze(ue,d,c);N(F&&g?.length?nr(xe,g.map(et=>et.value)):xe),W.current=xe}},[M,d,c,re,K,f,J,N,g,F]),se=P.useCallback(()=>{if(!M&&G.current){const he=F&&g?.length?nr(W.current,g.map(ue=>ue.value)):W.current;G.current(he)}},[M,g,F]),{ref:we,active:Z}=Cn(pe,{onScrubEnd:se},j),me=P.useCallback(he=>{!M&&G.current&&G.current(he)},[M]),Ye=he=>{if(!M)switch(he.key){case"ArrowUp":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=Zs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(k+f,d),c),J);N(ue),me(ue);break}case"ArrowRight":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=j==="rtl"?Qs(k,g):Zs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(j==="rtl"?k-f:k+f,d),c),J);N(ue),me(ue);break}case"ArrowDown":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=Qs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(k-f,d),c),J);N(ue),me(ue);break}case"ArrowLeft":{if(he.preventDefault(),ae.current?.focus(),F&&g){const xe=j==="rtl"?Zs(k,g):Qs(k,g);N(xe),me(xe);break}const ue=is(Math.min(Math.max(j==="rtl"?k+f:k-f,d),c),J);N(ue),me(ue);break}case"Home":{if(he.preventDefault(),ae.current?.focus(),F&&g){N(gr(g)),me(gr(g));break}N(d),me(d);break}case"End":{if(he.preventDefault(),ae.current?.focus(),F&&g){N(yr(g)),me(yr(g));break}N(c),me(c);break}}};return n.jsx(Ii,{value:{getStyles:T},children:n.jsxs(to,{...R,ref:nt(t,ee),onKeyDownCapture:Ye,onMouseDownCapture:()=>ee.current?.focus(),size:u,disabled:M,children:[n.jsx(oo,{inverted:z,offset:0,filled:te,marks:g,min:re,max:K,value:X,disabled:M,containerProps:{ref:we,onMouseEnter:x?()=>_(!0):void 0,onMouseLeave:x?()=>_(!1):void 0},children:n.jsx(so,{max:K,min:re,value:X,position:te,dragging:Z,label:le,ref:ae,labelTransitionProps:y,labelAlwaysOn:v,thumbLabel:b,showLabelOnHover:x,isHovered:C,disabled:M,...E,children:D})}),n.jsx("input",{type:"hidden",name:w,value:X,...I})]})})});Fn.classes=ao;Fn.displayName="@mantine/core/Slider";function Vi({data:e,value:t}){const s=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>($r(i)?o.push({group:i.group,items:i.items.filter(l=>s.indexOf(l.label.toLowerCase().trim())===-1)}):s.indexOf(i.label.toLowerCase().trim())===-1&&o.push(i),o),[])}function Fi(e,t){return e?t.split(new RegExp(`[${e.join("")}]`)).map(s=>s.trim()).filter(s=>s!==""):[t]}function vr({splitChars:e,allowDuplicates:t,maxTags:s,value:r,currentTags:o}){const i=Fi(e,r),l=t?[...o,...i]:[...new Set([...o,...i])];return s?l.slice(0,s):l}const Ei={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",size:"sm"},En=oe((e,t)=>{const s=ne("TagsInput",Ei,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,size:d,value:c,defaultValue:p,onChange:f,onKeyDown:h,maxTags:m,allowDuplicates:w,onDuplicate:g,variant:S,data:y,dropdownOpened:v,defaultDropdownOpened:b,onDropdownOpen:x,onDropdownClose:D,selectFirstOptionOnChange:M,onOptionSubmit:$,comboboxProps:O,filter:z,limit:A,withScrollArea:Y,maxDropdownHeight:B,searchValue:I,defaultSearchValue:F,onSearchChange:E,readOnly:H,disabled:R,splitChars:T,onFocus:j,onBlur:C,onPaste:_,radius:k,rightSection:N,rightSectionWidth:W,rightSectionPointerEvents:G,rightSectionProps:ee,leftSection:ae,leftSectionWidth:re,leftSectionPointerEvents:K,leftSectionProps:te,inputContainer:X,inputWrapperOrder:le,withAsterisk:J,required:pe,labelProps:se,descriptionProps:we,errorProps:Z,wrapperProps:me,description:Ye,label:he,error:ue,withErrorStyles:xe,name:et,form:pt,id:Re,clearable:V,clearButtonProps:Te,hiddenInputProps:_e,hiddenInputValuesDivider:gt,mod:yt,renderOption:vt,onRemove:it,onClear:Dt,scrollAreaProps:Ue,acceptValueOnBlur:Le,isDuplicate:xt,attributes:Q,...Be}=s,Se=Zt(Re),lt=yn(y),$t=vn(lt),$e=P.useRef(null),_t=nt($e,t),je=xn({opened:v,defaultOpened:b,onDropdownOpen:x,onDropdownClose:()=>{D?.(),je.resetSelectedOption()}}),{styleProps:bt,rest:{type:ke,autoComplete:kt,...Ot}}=hn(Be),[be,tt]=Ke({value:c,defaultValue:p,finalValue:[],onChange:f}),[U,Ce]=Ke({value:I,defaultValue:F,finalValue:"",onChange:E}),Oe=ce=>{Ce(ce),je.resetSelectedOption()},Ct=ye({name:"TagsInput",classes:{},props:s,classNames:r,styles:l,unstyled:a}),{resolvedClassNames:Mt,resolvedStyles:At}=Xe({props:s,styles:l,classNames:r}),Bt=ce=>{const ze=xt?xt(ce,be):be.some(ie=>ie.toLowerCase()===ce.toLowerCase());ze&&g?.(ce),(!ze||ze&&w)&&be.length<m&&($?.(ce),Oe(""),ce.length>0&&tt([...be,ce]))},ns=ce=>{if(h?.(ce),ce.isPropagationStopped())return;const ze=U.trim(),{length:ie}=ze;if(T.includes(ce.key)&&ie>0&&(tt(vr({splitChars:T,allowDuplicates:w,maxTags:m,value:U,currentTags:be})),Oe(""),ce.preventDefault()),ce.key==="Enter"&&ie>0&&!ce.nativeEvent.isComposing){if(ce.preventDefault(),!!document.querySelector(`#${je.listId} [data-combobox-option][data-combobox-selected]`))return;Bt(ze)}ce.key==="Backspace"&&ie===0&&be.length>0&&!ce.nativeEvent.isComposing&&!H&&(it?.(be[be.length-1]),tt(be.slice(0,be.length-1)))},Ws=ce=>{if(_?.(ce),ce.preventDefault(),ce.clipboardData){const ze=ce.clipboardData.getData("text/plain");tt(vr({splitChars:T,allowDuplicates:w,maxTags:m,value:`${U}${ze}`,currentTags:be})),Oe("")}},Gs=be.map((ce,ze)=>n.jsx(It,{withRemoveButton:!H,onRemove:()=>{const ie=be.slice();ie.splice(ze,1),tt(ie),it?.(ce)},unstyled:a,disabled:R,attributes:Q,...Ct("pill"),children:ce},`${ce}-${ze}`));P.useEffect(()=>{M&&je.selectFirstOption()},[M,be,U]);const qs=n.jsx(Ie.ClearButton,{...Te,onClear:()=>{tt([]),Oe(""),$e.current?.focus(),je.openDropdown(),Dt?.()}});return n.jsxs(n.Fragment,{children:[n.jsxs(Ie,{store:je,classNames:Mt,styles:At,unstyled:a,size:d,readOnly:H,__staticSelector:"TagsInput",attributes:Q,onOptionSubmit:ce=>{$?.(ce),Oe(""),be.length<m&&tt([...be,$t[ce].label]),je.resetSelectedOption()},...O,children:[n.jsx(Ie.DropdownTarget,{children:n.jsx(Et,{...bt,__staticSelector:"TagsInput",classNames:Mt,styles:At,unstyled:a,size:d,className:o,style:i,variant:S,disabled:R,radius:k,rightSection:N,__clearSection:qs,__clearable:V&&be.length>0&&!R&&!H,rightSectionWidth:W,rightSectionPointerEvents:G,rightSectionProps:ee,leftSection:ae,leftSectionWidth:re,leftSectionPointerEvents:K,leftSectionProps:te,inputContainer:X,inputWrapperOrder:le,withAsterisk:J,required:pe,labelProps:se,descriptionProps:we,errorProps:Z,wrapperProps:me,description:Ye,label:he,error:ue,withErrorStyles:xe,__stylesApiProps:{...s,multiline:!0},id:Se,mod:yt,attributes:Q,children:n.jsxs(It.Group,{disabled:R,unstyled:a,...Ct("pillsList"),children:[Gs,n.jsx(Ie.EventsTarget,{autoComplete:kt,children:n.jsx(Et.Field,{...Ot,ref:_t,...Ct("inputField"),unstyled:a,onKeyDown:ns,onFocus:ce=>{j?.(ce),je.openDropdown()},onBlur:ce=>{C?.(ce),Le&&Bt(U),je.closeDropdown()},onPaste:Ws,value:U,onChange:ce=>Oe(ce.currentTarget.value),required:pe&&be.length===0,disabled:R,readOnly:H,id:Se})})]})})}),n.jsx(bn,{data:Vi({data:lt,value:be}),hidden:H||R,filter:z,search:U,limit:A,hiddenWhenEmpty:!0,withScrollArea:Y,maxDropdownHeight:B,unstyled:a,labelId:he?`${Se}-label`:void 0,"aria-label":he?void 0:Be["aria-label"],renderOption:vt,scrollAreaProps:Ue})]}),n.jsx(Ie.HiddenInput,{name:et,form:pt,value:be,valuesDivider:gt,disabled:R,..._e})]})});En.classes={...Je.classes,...Ie.classes};En.displayName="@mantine/core/TagsInput";const Yi=[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]],zi=Ne("outline","arrows-sort","ArrowsSort",Yi);const Bi=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]],Hi=Ne("outline","at","At",Bi);const Wi=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Xs=Ne("outline","calendar","Calendar",Wi);const Gi=[["path",{d:"M11 7l6 6",key:"svg-0"}],["path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4",key:"svg-1"}]],qi=Ne("outline","color-picker","ColorPicker",Gi);const Ki=[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]],Ui=Ne("outline","columns","Columns",Ki);const Zi=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}]],Qi=Ne("outline","file","File",Zi);const Xi=[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}]],io=Ne("outline","filter","Filter",Xi);const Ji=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],el=Ne("outline","grip-vertical","GripVertical",Ji);const tl=[["path",{d:"M5 9l14 0",key:"svg-0"}],["path",{d:"M5 15l14 0",key:"svg-1"}],["path",{d:"M11 4l-4 16",key:"svg-2"}],["path",{d:"M17 4l-4 16",key:"svg-3"}]],sl=Ne("outline","hash","Hash",tl);const nl=[["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],rl=Ne("outline","info-triangle","InfoTriangle",nl);const ol=[["path",{d:"M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0",key:"svg-0"}],["path",{d:"M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5",key:"svg-1"}],["path",{d:"M3 13h7",key:"svg-2"}],["path",{d:"M21 12v7",key:"svg-3"}]],al=Ne("outline","letter-case","LetterCase",ol);const il=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],xr=Ne("outline","link","Link",il);const ll=[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]],cl=Ne("outline","list","List",ll);const ul=[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]],br=Ne("outline","mail","Mail",ul);const dl=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],pl=Ne("outline","palette","Palette",dl);const ml=[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}]],Cr=Ne("outline","phone","Phone",ml);const hl=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],fl=Ne("outline","selector","Selector",hl);const gl=[["path",{d:"M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6",key:"svg-1"}]],yl=Ne("outline","toggle-left","ToggleLeft",gl),vl=e=>{const{type:t,format:s,name:r,isEnum:o,isArray:i,size:l="sm"}=e,a=qe.sizes.icon[l];if(s)switch(s){case"email":return n.jsx(br,{size:a});case"url":case"uri":return n.jsx(xr,{size:a});case"tel":case"phone":return n.jsx(Cr,{size:a});case"date":return n.jsx(Xs,{size:a});case"date-time":return n.jsx(Xs,{size:a});case"time":return n.jsx(tr,{size:a});case"color":return n.jsx(qi,{size:a});case"uuid":return n.jsx(er,{size:a})}if(r){const u=r.toLowerCase();if(u.includes("password")||u.includes("secret"))return n.jsx(er,{size:a});if(u.includes("email")||u.includes("mail"))return n.jsx(br,{size:a});if(u.includes("url")||u.includes("link"))return n.jsx(xr,{size:a});if(u.includes("phone")||u.includes("tel"))return n.jsx(Cr,{size:a});if(u.includes("color"))return n.jsx(pl,{size:a});if(u.includes("file")||u.includes("upload"))return n.jsx(Qi,{size:a});if(u.includes("date"))return n.jsx(Xs,{size:a});if(u.includes("time"))return n.jsx(tr,{size:a})}if(o||i)return n.jsx(fl,{size:a});if(t)switch(t){case"boolean":return n.jsx(yl,{size:a});case"number":case"integer":return n.jsx(sl,{size:a});case"array":return n.jsx(cl,{size:a});case"string":return n.jsx(al,{size:a})}return n.jsx(Hi,{size:a})},xl=e=>e.charAt(0).toUpperCase()+e.slice(1),bl=e=>xl(e.replaceAll("/","")),Yt=(e,t)=>{const r=e.input.props.id,o=e.title??("title"in e.input.schema&&typeof e.input.schema.title=="string"?e.input.schema.title:void 0)??bl(e.input.path),i=e.description??("description"in e.input.schema&&typeof e.input.schema.description=="string"?e.input.schema.description:void 0),l=t.error&&t.error instanceof Zo?t.error.value.message:void 0,a=e.icon?P.isValidElement(e.icon)?e.icon:P.createElement(e.icon,{size:qe.sizes.icon.md}):vl({type:e.input.schema&&"type"in e.input.schema?String(e.input.schema.type):void 0,format:e.input.schema&&"format"in e.input.schema&&typeof e.input.schema.format=="string"?e.input.schema.format:void 0,name:e.input.props.name,isEnum:e.input.schema&&"enum"in e.input.schema&&!!e.input.schema.enum,isArray:e.input.schema&&"type"in e.input.schema&&e.input.schema.type==="array"}),u=e.input.schema&&"format"in e.input.schema&&typeof e.input.schema.format=="string"?e.input.schema.format:void 0,d=e.input.required,c=e.input.schema,p={label:o,description:i,error:l,required:d,disabled:!1};return"minLength"in c&&typeof c.minLength=="number"&&(p.minLength=c.minLength),"maxLength"in c&&typeof c.maxLength=="number"&&(p.maxLength=c.maxLength),"minimum"in c&&typeof c.minimum=="number"&&(p.minimum=c.minimum),"maximum"in c&&typeof c.maximum=="number"&&(p.maximum=c.maximum),{id:r,icon:a,format:u,schema:e.input.schema,inputProps:p}},Cl=e=>{const{inputProps:t}=Yt(e,{}),s=P.useRef(0),[r,o]=P.useState(()=>{const v=e.input?.props?.defaultValue;return Array.isArray(v)?v.map(b=>({key:s.current++,value:b})):[]});if(fn({"form:reset":v=>{if(v.id===e.input?.form?.id){const b=e.input?.props?.defaultValue;Array.isArray(b)?(s.current=0,o(b.map(x=>({key:s.current++,value:x})))):o([])}}},[e.input]),!e.input?.props)return null;const i=e.input.schema;if(!i||!("items"in i))return null;const l=i.items,a=l&&"properties"in l,{min:u=0,max:d=Number.POSITIVE_INFINITY,columns:c=1}=e,p=v=>{e.input.set(v.map(b=>b.value))},f=()=>{if(r.length>=d)return;let v;if(a){v={};const x=l;for(const[D,M]of Object.entries(x.properties))"default"in M&&(v[D]=M.default)}else v="";const b=[...r,{key:s.current++,value:v}];o(b),p(b)},h=v=>{if(r.length<=u)return;const b=r.filter((x,D)=>D!==v);o(b),p(b)},m=(v,b)=>{const x=[...r];x[v]={...x[v],value:b},o(x),p(x)},w=(v,b,x)=>{const D=[...r];D[v]={...D[v],value:{...D[v].value,[b]:x}},o(D),p(D)},g=12/c,S=a?Object.keys(l.properties):[],y=()=>n.jsxs(We,{gap:"sm",children:[r.map((v,b)=>n.jsxs(fe,{gap:"sm",align:"flex-start",p:"xs",bg:qe.colors.surface,style:{borderRadius:"var(--mantine-radius-sm)"},children:[e.sortable&&n.jsx(Ft,{variant:"subtle",color:"gray",style:{cursor:"grab"},children:n.jsx(el,{size:16})}),a?n.jsx(ht,{style:{flex:1},gutter:"sm",children:S.map(x=>{const D=l.properties[x],M=e.controlProps?.[x]??{},$={schema:D,props:{id:`${e.input.props.id}-${v.key}-${x}`,name:`${e.input.props.name}[${b}].${x}`,defaultValue:v.value?.[x]},path:`${e.input.path}/${b}/${x}`,required:l.required?.includes(x)??!1,form:e.input.form,set:O=>w(b,x,O)};return n.jsx(ht.Col,{span:g,children:n.jsx(gs,{input:$,...M})},x)})}):n.jsx(fe,{style:{flex:1},children:n.jsx(gs,{input:{schema:l,props:{id:`${e.input.props.id}-${v.key}`,name:`${e.input.props.name}[${b}]`,defaultValue:v.value},path:`${e.input.path}/${b}`,required:!1,form:e.input.form,set:x=>m(b,x)},...e.itemControlProps})}),n.jsx(Ft,{variant:"subtle",color:"red",onClick:()=>h(b),disabled:r.length<=u,children:n.jsx(fa,{size:16})})]},v.key)),n.jsxs(ot,{onClick:f,disabled:r.length>=d,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 12px",borderRadius:"var(--mantine-radius-sm)",border:"1px dashed var(--mantine-color-dimmed)",color:"var(--mantine-color-dimmed)",fontSize:"var(--mantine-font-size-sm)",cursor:r.length>=d?"not-allowed":"pointer",opacity:r.length>=d?.5:1,transition:"all 150ms ease"},onMouseEnter:v=>{r.length<d&&(v.currentTarget.style.borderColor="var(--mantine-color-blue-filled)",v.currentTarget.style.color="var(--mantine-color-blue-filled)",v.currentTarget.style.background="var(--mantine-color-blue-light)")},onMouseLeave:v=>{v.currentTarget.style.borderColor="var(--mantine-color-dimmed)",v.currentTarget.style.color="var(--mantine-color-dimmed)",v.currentTarget.style.background="transparent"},children:[n.jsx(ga,{size:14}),e.addLabel??"Add"]})]});return e.variant==="plain"?n.jsxs(We,{gap:"xs",children:[t.label&&n.jsx(ve,{size:"sm",fw:500,children:t.label}),t.description&&n.jsx(ve,{size:"sm",c:"dimmed",children:t.description}),y(),t.error&&n.jsx(ve,{size:"sm",c:"red",children:t.error})]}):n.jsx(js,{legend:t.label,children:n.jsxs(We,{gap:"xs",children:[t.description&&n.jsx(ve,{size:"sm",c:"dimmed",children:t.description}),y(),t.error&&n.jsx(ve,{size:"sm",c:"red",children:t.error})]})})};function wl({direction:e,levelIndex:t,rowIndex:s,cellIndex:r,size:o}){switch(e){case"up":return t===0&&s===0?null:s===0?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:s-1,cellIndex:r};case"down":return s===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:r}:s===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:s+1,cellIndex:r};case"left":return t===0&&s===0&&r===0?null:s===0&&r===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:s-1,cellIndex:o[t][s-1]-1}:{levelIndex:t,rowIndex:s,cellIndex:r-1};case"right":return s===o[t].length-1&&r===o[t][s]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][s]-1?{levelIndex:t,rowIndex:s+1,cellIndex:0}:{levelIndex:t,rowIndex:s,cellIndex:r+1};default:return{levelIndex:t,rowIndex:s,cellIndex:r}}}function lo({controlsRef:e,direction:t,levelIndex:s,rowIndex:r,cellIndex:o,size:i}){const l=wl({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:s});if(!l)return;const a=e.current?.[l.levelIndex]?.[l.rowIndex]?.[l.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?lo({controlsRef:e,direction:t,levelIndex:l.levelIndex,cellIndex:l.cellIndex,rowIndex:l.rowIndex,size:i}):a.focus())}function Sl(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function jl(e){return e.current?.map(t=>t.map(s=>s.length))}function Yn({controlsRef:e,levelIndex:t,rowIndex:s,cellIndex:r,event:o}){const i=Sl(o.key);if(i){o.preventDefault();const l=jl(e);lo({controlsRef:e,direction:i,levelIndex:t,rowIndex:s,cellIndex:r,size:l})}}function wr(e,t){let s=e?L(e):L();if(t==="")return s.format("YYYY-MM-DD HH:mm:ss");const[r,o,i=0]=t.split(":").map(Number);return s=s.set("hour",r),s=s.set("minute",o),s=s.set("second",i),s=s.set("millisecond",0),s.format("YYYY-MM-DD HH:mm:ss")}function Ee(e){return e==null||e===""?e:L(e).format("YYYY-MM-DD")}function Vt(e){return e==null||e===""?e:L(e).format("YYYY-MM-DD HH:mm:ss")}function Pl({minDate:e,maxDate:t}){const s=L();return!e&&!t?Ee(s):e&&L(s).isBefore(e)?Ee(e):t&&L(s).isAfter(t)?Ee(t):Ee(s)}function Js(e,t,s){return!e&&!t?Vt(s):e&&L(s).isBefore(e)?Vt(e):t&&L(s).isAfter(t)?Vt(t):Vt(s)}const Dl={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},_l=P.createContext(Dl);function ft(){const e=P.useContext(_l),t=P.useCallback(i=>i||e.locale,[e.locale]),s=P.useCallback(i=>typeof i=="number"?i:e.firstDayOfWeek,[e.firstDayOfWeek]),r=P.useCallback(i=>Array.isArray(i)?i:e.weekendDays,[e.weekendDays]),o=P.useCallback(i=>typeof i=="string"?i:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:s,getWeekendDays:r,getLabelSeparator:o}}function kl({value:e,type:t,withTime:s}){const r=s?Vt:Ee;if(t==="range"&&Array.isArray(e)){const o=r(e[0]),i=r(e[1]);return o?i?`${o} – ${i}`:`${o} –`:""}return t==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?r(e):""}function zn({value:e,type:t,name:s,form:r,withTime:o=!1}){return n.jsx("input",{type:"hidden",value:kl({value:e,type:t,withTime:o}),name:s,form:r})}zn.displayName="@mantine/dates/HiddenDatesInput";var Ml={input:"m_468e7eda"};const Bn=oe((e,t)=>{const s=ne("TimeInput",null,e),{classNames:r,styles:o,unstyled:i,vars:l,withSeconds:a,minTime:u,maxTime:d,value:c,onChange:p,step:f,...h}=s,{resolvedClassNames:m,resolvedStyles:w}=Xe({classNames:r,styles:o,props:s}),g=y=>{if(u!==void 0||d!==void 0){const[v,b,x]=y.split(":").map(Number);if(u){const[D,M,$]=u.split(":").map(Number);if(v<D||v===D&&b<M||a&&v===D&&b===M&&x<$)return-1}if(d){const[D,M,$]=d.split(":").map(Number);if(v>D||v===D&&b>M||a&&v===D&&b===M&&x>$)return 1}}return 0},S=y=>{if(s.onBlur?.(y),u!==void 0||d!==void 0){const v=y.currentTarget.value;if(v){const b=g(v);b===1?(d&&(y.currentTarget.value=d),s.onChange?.(y)):b===-1&&(u&&(y.currentTarget.value=u),s.onChange?.(y))}}};return n.jsx(Je,{classNames:{...m,input:bs(Ml.input,m?.input)},styles:w,unstyled:i,ref:t,value:c,step:f??(a?1:60),...h,onChange:p,onBlur:S,type:"time",__staticSelector:"TimeInput"})});Bn.classes=Je.classes;Bn.displayName="@mantine/dates/TimeInput";function Ve(e){return e<10?`0${e}`:`${e}`}const Nl=e=>Number(e.toFixed(0)[0]),cs=P.forwardRef(({value:e,min:t,max:s,onChange:r,focusable:o,step:i,onNextInput:l,onPreviousInput:a,onFocus:u,readOnly:d,allowTemporaryZero:c=!1,placeholder:p="--",...f},h)=>{const m=Nl(s),w=s+1-i,g=y=>{if(d)return;const v=y.replace(/\D/g,"");if(v!==""){const b=parseInt(v,10),x=c&&b===0&&t>0?0:Ze(b,t,s);r(x),(x>m||y.startsWith("00"))&&l?.()}},S=y=>{if(!d){if((y.key==="0"||y.key==="Num0")&&e===0&&(y.preventDefault(),l?.()),y.key==="Home"&&(y.preventDefault(),r(t)),y.key==="End"&&(y.preventDefault(),r(s)),(y.key==="Backspace"||y.key==="Delete")&&(y.preventDefault(),e!==null?r(null):a?.()),y.key==="ArrowRight"&&(y.preventDefault(),l?.()),y.key==="ArrowLeft"&&(y.preventDefault(),a?.()),y.key==="ArrowUp"){y.preventDefault();const v=e===null?t:Ze(e+i,t,w);r(v)}if(y.key==="ArrowDown"){y.preventDefault();const v=e===null?w:Ze(e-i,t,w);r(v)}}};return n.jsx("input",{ref:h,type:"text",role:"spinbutton","aria-valuemin":t,"aria-valuemax":s,"aria-valuenow":e===null?0:e,"data-empty":e===null||void 0,inputMode:"numeric",placeholder:p,value:e===null?"":Ve(e),onChange:y=>g(y.currentTarget.value),onKeyDown:S,onFocus:y=>{y.currentTarget.select(),u?.(y)},onClick:y=>{y.stopPropagation(),y.currentTarget.select()},onMouseDown:y=>y.stopPropagation(),...f})});cs.displayName="@mantine/dates/SpinInput";const[Ll,Tt]=Qt("TimeInput component was not found in the component tree"),co=P.forwardRef(({labels:e,value:t,onChange:s,className:r,style:o,onPreviousInput:i,readOnly:l,onMouseDown:a,onTouchStart:u,inputType:d,...c},p)=>{const f=Tt(),h=m=>{l||(m.key==="Home"&&(m.preventDefault(),s(e.am)),m.key==="End"&&(m.preventDefault(),s(e.pm)),(m.key==="Backspace"||m.key==="Delete")&&(m.preventDefault(),t===null?i?.():s(null)),m.key==="ArrowLeft"&&(m.preventDefault(),i?.()),(m.key==="ArrowUp"||m.key==="ArrowDown")&&(m.preventDefault(),s(t===e.am?e.pm:e.am)),m.code==="KeyA"&&(m.preventDefault(),s(e.am)),m.code==="KeyP"&&(m.preventDefault(),s(e.pm)))};if(d==="input"){const m=t||"--",w=m.length+1;return n.jsx("input",{...f.getStyles("field",{className:r,style:o}),ref:p,value:m,size:w,readOnly:!0,onChange:()=>{},onClick:(g=>g.stopPropagation()),onKeyDown:h,onMouseDown:g=>{g.stopPropagation(),a?.(g)},"data-am-pm":!0,...c})}return n.jsxs("select",{...f.getStyles("field",{className:r,style:o}),ref:p,value:t||"",onChange:m=>!l&&s(m.target.value||null),onClick:m=>m.stopPropagation(),onKeyDown:h,onMouseDown:m=>{m.stopPropagation(),a?.(m)},"data-am-pm":!0,...c,children:[n.jsx("option",{value:"",children:"--"}),n.jsx("option",{value:e.am,children:e.am}),n.jsx("option",{value:e.pm,children:e.pm})]})});co.displayName="@mantine/dates/AmPmInput";function Hn({value:e,active:t,onSelect:s}){const r=Tt();return n.jsx(ot,{mod:{active:t},onClick:()=>s(e),onMouseDown:o=>o.preventDefault(),"data-value":e,tabIndex:-1,...r.getStyles("control"),children:typeof e=="number"?Ve(e):e})}Hn.displayName="@mantine/dates/TimeControl";function uo({labels:e,value:t,onSelect:s}){const r=Tt(),o=[e.am,e.pm].map(i=>n.jsx(Hn,{value:i,active:t===i,onSelect:s},i));return n.jsx("div",{...r.getStyles("controlsList"),children:o})}uo.displayName="@mantine/dates/AmPmControlsList";function Il(e,t){if(!e||!t)return!1;const s=e.getBoundingClientRect(),r=t.getBoundingClientRect();return s.top>=r.top&&s.bottom<=r.bottom&&s.left>=r.left&&s.right<=r.right}function Rl(e,t,s){const r=[];for(let o=e;o<=t;o+=s)r.push(o);return r}function us({min:e,max:t,step:s,value:r,onSelect:o,reversed:i}){const l=Tt(),a=P.useRef(null),u=Rl(e,t,s),d=(i?u.reverse():u).map(c=>n.jsx(Hn,{value:c,active:r===c,onSelect:o},c));return P.useEffect(()=>{r!==null&&requestAnimationFrame(()=>{const p=a.current?.querySelector(`[data-value="${r}"]`);Il(p,a.current)||p?.scrollIntoView({block:"nearest"})})},[r]),n.jsx(Kt,{h:l.maxDropdownContentHeight,type:"never",viewportRef:a,...l.getStyles("scrollarea"),...l.scrollAreaProps,children:n.jsx("div",{...l.getStyles("controlsList"),children:d})})}us.displayName="@mantine/dates/TimeControlsList";function fs(e){const[t=null,s=null,r=null]=e.split(":").map(Number);return{hours:t,minutes:s,seconds:r}}function po({time:e,compare:t,withSeconds:s}){const r=fs(e),o=fs(t);return s?r.hours===o.hours&&r.minutes===o.minutes&&r.seconds===o.seconds:r.hours===o.hours&&r.minutes===o.minutes}function Tl(e,t){return`${e.getHours()}:${e.getMinutes()}${t?`:${e.getSeconds()}`:""}`}function $l({value:e,format:t,amPmLabels:s,withSeconds:r}){const o=fs(typeof e=="string"?e:Tl(e,r));if(o.hours===null||o.minutes===null)return null;if(t==="24h")return`${Ve(o.hours)}:${Ve(o.minutes)}${r?`:${Ve(o.seconds||0)}`:""}`;const i=o.hours>=12;return`${o.hours%12===0?12:o.hours%12}:${Ve(o.minutes)}${r?`:${Ve(o.seconds||0)}`:""} ${i?s.pm:s.am}`}function mo({value:e,format:t="24h",amPmLabels:s={am:"AM",pm:"PM"},withSeconds:r=!1}){return n.jsx(n.Fragment,{children:$l({value:e,format:t,amPmLabels:s,withSeconds:r})})}mo.displayName="@mantine/dates/TimeValue";function Wn({value:e,active:t,onChange:s,format:r,amPmLabels:o,withSeconds:i}){const l=Tt();return n.jsx(ot,{mod:{active:t},onClick:()=>s(e),...l.getStyles("presetControl"),children:n.jsx(mo,{withSeconds:i,value:e,format:r,amPmLabels:o})})}Wn.displayName="@mantine/dates/TimePresetControl";function ho({value:e,data:t,onChange:s,format:r,amPmLabels:o,withSeconds:i}){const l=Tt(),a=t.values.map(u=>n.jsx(Wn,{value:u,format:r,amPmLabels:o,withSeconds:i,active:po({time:u,compare:e,withSeconds:i}),onChange:s},u));return n.jsxs("div",{...l.getStyles("presetsGroup"),children:[n.jsx("div",{...l.getStyles("presetsGroupLabel"),children:t.label}),n.jsx(Ns,{cols:i?2:3,spacing:4,children:a})]})}ho.displayName="@mantine/dates/TimePresetGroup";function fo({presets:e,format:t,amPmLabels:s,withSeconds:r,value:o,onChange:i}){const l=Tt();if(e.length===0)return null;if(typeof e[0]=="string"){const u=e.map(d=>n.jsx(Wn,{value:d,format:t,amPmLabels:s,withSeconds:r,active:po({time:d,compare:o,withSeconds:r}),onChange:i},d));return n.jsx(Kt.Autosize,{mah:l.maxDropdownContentHeight,type:"never",...l.getStyles("scrollarea"),...l.scrollAreaProps,children:n.jsx("div",{...l.getStyles("presetsRoot"),children:n.jsx(Ns,{cols:r?2:3,spacing:4,children:u})})})}const a=e.map((u,d)=>n.jsx(ho,{data:u,value:o,format:t,amPmLabels:s,withSeconds:r,onChange:i},d));return n.jsx(Kt.Autosize,{mah:l.maxDropdownContentHeight,type:"never",...l.getStyles("scrollarea"),...l.scrollAreaProps,children:n.jsx("div",{...l.getStyles("presetsRoot"),children:a})})}fo.displayName="@mantine/dates/TimePresets";function en(e){const[t=0,s=0,r=0]=e.split(":").map(Number);return t*3600+s*60+r}function Ol(e){const t=Math.floor(e/3600),s=Math.floor(e%3600/60),r=e%60;return{timeString:`${Ve(t)}:${Ve(s)}:${Ve(r)}`,hours:t,minutes:s,seconds:r}}function go(e,t,s){const r=en(e),o=t?en(t):-1/0,i=s?en(s):1/0,l=Math.max(o,Math.min(r,i));return Ol(l)}function Al({hours:e,minutes:t,seconds:s,amPmLabels:r}){if(e===null)return{hours:null,minutes:null,seconds:null,amPm:null};const o=e>=12?r.pm:r.am;return{hours:e%12===0?12:e%12,minutes:typeof t=="number"?t:null,seconds:typeof s=="number"?s:null,amPm:o}}function qt({time:e,format:t,amPmLabels:s}){if(e==="")return{hours:null,minutes:null,seconds:null,amPm:null};const{hours:r,minutes:o,seconds:i}=fs(e),l={hours:r,minutes:o,seconds:i};return t==="12h"?Al({...l,amPmLabels:s}):{...l,amPm:null}}function Vl({hours:e,minutes:t,seconds:s,amPm:r,amPmLabels:o,withSeconds:i}){let l=e;return r===o.pm&&e!==12?l+=12:r===o.am&&e===12&&(l=0),`${Ve(l)}:${Ve(t)}${i?`:${Ve(s||0)}`:""}`}function ds({hours:e,minutes:t,seconds:s,format:r,withSeconds:o,amPm:i,amPmLabels:l}){return e===null||t===null?{valid:!1,value:""}:o&&s===null?{valid:!1,value:""}:r==="24h"?{valid:!0,value:`${Ve(e)}:${Ve(t)}${o?`:${Ve(s)}`:""}`}:i===null?{valid:!1,value:""}:{valid:!0,value:Vl({hours:e,minutes:t,seconds:s,amPm:i,amPmLabels:l,withSeconds:o})}}function Fl({value:e,defaultValue:t,onChange:s,format:r,amPmLabels:o,withSeconds:i=!1,min:l,max:a,clearable:u,readOnly:d,disabled:c,pasteSplit:p}){const f=qt({time:e||t||"",amPmLabels:o,format:r}),h=P.useRef(!0),[m,w]=P.useState(f.hours),[g,S]=P.useState(f.minutes),[y,v]=P.useState(f.seconds),[b,x]=P.useState(f.amPm),D=u&&!d&&!c&&(m!==null||g!==null||y!==null||b!==null),M=P.useRef(null),$=P.useRef(null),O=P.useRef(null),z=P.useRef(null),A=C=>{C==="hours"&&M.current?.focus(),C==="minutes"&&$.current?.focus(),C==="seconds"&&O.current?.focus(),C==="amPm"&&z.current?.focus()},Y=(C,_)=>{const k={hours:m,minutes:g,seconds:y,amPm:b,[C]:_},N=ds({...k,format:r,withSeconds:i,amPmLabels:o});N.valid?(h.current=!1,C==="hours"&&w(_),C==="minutes"&&S(_),C==="seconds"&&v(_),C==="amPm"&&x(_),s?.(N.value)):(h.current=!1,typeof e=="string"&&e!==""&&s?.(""))},B=C=>{h.current=!1;const _=qt({time:C,amPmLabels:o,format:r});w(_.hours),S(_.minutes),v(_.seconds),x(_.amPm),s?.(C)},I=C=>{let _=C;r==="12h"&&typeof C=="number"&&C>12&&(_=(C-1)%12+1),w(_),Y("hours",_),A("hours")},F=C=>{S(C),Y("minutes",C),A("minutes")},E=C=>{v(C),Y("seconds",C),A("seconds")},H=C=>{x(C),Y("amPm",C),A("amPm")},R=()=>{h.current=!1,w(null),S(null),v(null),x(null),s?.(""),A("hours")},T=C=>{C.preventDefault();const _=C.clipboardData.getData("text"),k=(p||qt)({time:_,format:r,amPmLabels:o}),N=ds({...k,format:r,withSeconds:i,amPmLabels:o});if(N.valid){h.current=!1;const W=go(N.value,l||"00:00:00",a||"23:59:59");s?.(W.timeString),w(k.hours),S(k.minutes),v(k.seconds),x(k.amPm)}},j=ds({hours:m,minutes:g,seconds:y,format:r,withSeconds:i,amPm:b,amPmLabels:o});return St(()=>{if(e===""){h.current=!1,w(null),S(null),v(null),x(null),h.current=!0;return}if(h.current&&typeof e=="string"){const C=qt({time:e||"",amPmLabels:o,format:r});w(C.hours),S(C.minutes),v(C.seconds),x(C.amPm)}h.current=!0},[e]),{refs:{hours:M,minutes:$,seconds:O,amPm:z},values:{hours:m,minutes:g,seconds:y,amPm:b},setHours:I,setMinutes:F,setSeconds:E,setAmPm:H,focus:A,clear:R,onPaste:T,setTimeString:B,isClearable:D,hiddenInputValue:j.value}}var yo={fieldsRoot:"m_7a8f1e6d",fieldsGroup:"m_d6bb0a54",controlsList:"m_b97ecb26",controlsListGroup:"m_31fe42f9",dropdown:"m_9c4817c3",control:"m_154c536b",presetControl:"m_7be09d0c",presetsGroup:"m_7d00001d",presetsGroupLabel:"m_d8d918d7",field:"m_6b43ba88"};const El={hoursStep:1,minutesStep:1,secondsStep:1,format:"24h",amPmLabels:{am:"AM",pm:"PM"},pasteSplit:qt,maxDropdownContentHeight:200,hoursPlaceholder:"--",minutesPlaceholder:"--",secondsPlaceholder:"--"},Yl=Me((e,{size:t})=>({dropdown:{"--control-font-size":Rt(t)}})),Gn=oe((e,t)=>{const s=ne("TimePicker",El,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,onClick:d,format:c,value:p,defaultValue:f,onChange:h,hoursStep:m,minutesStep:w,secondsStep:g,withSeconds:S,hoursInputLabel:y,minutesInputLabel:v,secondsInputLabel:b,amPmInputLabel:x,amPmLabels:D,clearable:M,onMouseDown:$,onFocusCapture:O,onBlurCapture:z,min:A,max:Y,popoverProps:B,withDropdown:I,rightSection:F,onFocus:E,onBlur:H,clearButtonProps:R,hoursInputProps:T,minutesInputProps:j,secondsInputProps:C,amPmSelectProps:_,readOnly:k,disabled:N,size:W,name:G,form:ee,hiddenInputProps:ae,labelProps:re,pasteSplit:K,hoursRef:te,minutesRef:X,secondsRef:le,amPmRef:J,presets:pe,maxDropdownContentHeight:se,scrollAreaProps:we,attributes:Z,reverseTimeControlsList:me,hoursPlaceholder:Ye,minutesPlaceholder:he,secondsPlaceholder:ue,...xe}=s,{resolvedClassNames:et,resolvedStyles:pt}=Xe({classNames:r,styles:l,props:s}),Re=ye({name:"TimePicker",classes:yo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:Z,vars:u,varsResolver:Yl}),V=Fl({value:p,defaultValue:f,onChange:h,format:c,amPmLabels:D,withSeconds:S,min:A,max:Y,clearable:M,disabled:N,readOnly:k,pasteSplit:K}),Te=nt(V.refs.hours,te),_e=nt(V.refs.minutes,X),gt=nt(V.refs.seconds,le),yt=nt(V.refs.amPm,J),vt=Zt(),it=P.useRef(!1),[Dt,Ue]=P.useState(!1),Le=Q=>{it.current||(it.current=!0,E?.(Q))},xt=Q=>{if(!Q.currentTarget.contains(Q.relatedTarget)){const Be=V.values,Se=ds({...Be,format:c,amPmLabels:D,withSeconds:!!S});if(Se.valid&&(A||Y)){const lt=go(Se.value,A,Y);lt.timeString!==Se.value&&V.setTimeString(lt.timeString)}it.current=!1,H?.(Q)}};return n.jsx(Ll,{value:{getStyles:Re,scrollAreaProps:we,maxDropdownContentHeight:se},children:n.jsxs(Pe,{opened:Dt,transitionProps:{duration:0},position:"bottom-start",withRoles:!1,disabled:N||k||!I,...B,children:[n.jsx(Pe.Target,{children:n.jsxs(Je,{component:"div",size:W,disabled:N,ref:t,onClick:Q=>{d?.(Q),V.focus("hours")},onMouseDown:Q=>{Q.preventDefault(),$?.(Q)},onFocusCapture:Q=>{Ue(!0),O?.(Q)},onBlurCapture:Q=>{Ue(!1),z?.(Q)},rightSection:F||V.isClearable&&n.jsx(pn,{...R,size:W,onClick:Q=>{V.clear(),R?.onClick?.(Q)},onMouseDown:Q=>{Q.preventDefault(),R?.onMouseDown?.(Q)}}),labelProps:{htmlFor:vt,...re},style:i,className:o,classNames:et,styles:pt,__staticSelector:"TimePicker",...xe,children:[n.jsx("div",{...Re("fieldsRoot"),dir:"ltr",children:n.jsxs("div",{...Re("fieldsGroup"),onBlur:xt,children:[n.jsx(cs,{id:vt,...T,...Re("field",{className:T?.className,style:T?.style}),value:V.values.hours,onChange:V.setHours,onNextInput:()=>V.focus("minutes"),min:c==="12h"?1:0,max:c==="12h"?12:23,allowTemporaryZero:c==="12h",focusable:!0,step:m,ref:Te,"aria-label":y,readOnly:k,disabled:N,onPaste:V.onPaste,onFocus:Q=>{Le(Q),T?.onFocus?.(Q)},onBlur:Q=>{const Be=Q.currentTarget.value,Se=Be?parseInt(Be,10):null;c==="12h"&&Se===0&&V.setHours(12),T?.onBlur?.(Q)},placeholder:Ye}),n.jsx("span",{children:":"}),n.jsx(cs,{...j,...Re("field",{className:j?.className,style:j?.style}),value:V.values.minutes,onChange:V.setMinutes,min:0,max:59,focusable:!0,step:w,ref:_e,onPreviousInput:()=>V.focus("hours"),onNextInput:()=>S?V.focus("seconds"):V.focus("amPm"),"aria-label":v,tabIndex:-1,readOnly:k,disabled:N,onPaste:V.onPaste,onFocus:Q=>{Le(Q),j?.onFocus?.(Q)},placeholder:he}),S&&n.jsxs(n.Fragment,{children:[n.jsx("span",{children:":"}),n.jsx(cs,{...C,...Re("field",{className:C?.className,style:C?.style}),value:V.values.seconds,onChange:V.setSeconds,min:0,max:59,focusable:!0,step:g,ref:gt,onPreviousInput:()=>V.focus("minutes"),onNextInput:()=>V.focus("amPm"),"aria-label":b,tabIndex:-1,readOnly:k,disabled:N,onPaste:V.onPaste,onFocus:Q=>{Le(Q),C?.onFocus?.(Q)},placeholder:ue})]}),c==="12h"&&n.jsx(co,{..._,inputType:I?"input":"select",labels:D,value:V.values.amPm,onChange:V.setAmPm,ref:yt,"aria-label":x,onPreviousInput:()=>S?V.focus("seconds"):V.focus("minutes"),readOnly:k,disabled:N,tabIndex:-1,onPaste:V.onPaste,onFocus:Q=>{Le(Q),_?.onFocus?.(Q)}})]})}),n.jsx("input",{type:"hidden",name:G,form:ee,value:V.hiddenInputValue,...ae})]})}),n.jsx(Pe.Dropdown,{...Re("dropdown"),onMouseDown:Q=>Q.preventDefault(),children:pe?n.jsx(fo,{value:V.hiddenInputValue,onChange:V.setTimeString,format:c,presets:pe,amPmLabels:D,withSeconds:S||!1}):n.jsxs("div",{...Re("controlsListGroup"),children:[n.jsx(us,{min:c==="12h"?1:0,max:c==="12h"?12:23,step:m,value:V.values.hours,onSelect:V.setHours,reversed:me}),n.jsx(us,{min:0,max:59,step:w,value:V.values.minutes,onSelect:V.setMinutes,reversed:me}),S&&n.jsx(us,{min:0,max:59,step:g,value:V.values.seconds,onSelect:V.setSeconds,reversed:me}),c==="12h"&&n.jsx(uo,{labels:D,value:V.values.amPm,onSelect:V.setAmPm})]})})]})})});Gn.displayName="@mantine/dates/TimePicker";Gn.classes=yo;var vo={day:"m_396ce5cb"};const zl=Me((e,{size:t})=>({day:{"--day-size":De(t,"day-size")}})),qn=oe((e,t)=>{const s=ne("Day",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,date:d,disabled:c,__staticSelector:p,weekend:f,outside:h,selected:m,renderDay:w,inRange:g,firstInRange:S,lastInRange:y,hidden:v,static:b,highlightToday:x,attributes:D,...M}=s,$=ye({name:p||"Day",classes:vo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:D,vars:u,varsResolver:zl,rootSelector:"day"});return n.jsx(ot,{...$("day",{style:v?{display:"none"}:void 0}),component:b?"div":"button",ref:t,disabled:c,"data-today":L(d).isSame(new Date,"day")||void 0,"data-hidden":v||void 0,"data-highlight-today":x||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!h&&f||void 0,"data-outside":!c&&h||void 0,"data-selected":!c&&m||void 0,"data-in-range":g&&!c||void 0,"data-first-in-range":S&&!c||void 0,"data-last-in-range":y&&!c||void 0,"data-static":b||void 0,unstyled:a,...M,children:w?.(d)||L(d).date()})});qn.classes=vo;qn.displayName="@mantine/dates/Day";function Bl({locale:e,format:t="dd",firstDayOfWeek:s=1}){const r=L().day(s),o=[];for(let i=0;i<7;i+=1)typeof t=="string"?o.push(L(r).add(i,"days").locale(e).format(t)):o.push(t(L(r).add(i,"days").format("YYYY-MM-DD")));return o}var xo={weekday:"m_18a3eca"};const Hl=Me((e,{size:t})=>({weekdaysRow:{"--wr-fz":Rt(t),"--wr-spacing":Ge(t)}})),Kn=oe((e,t)=>{const s=ne("WeekdaysRow",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,locale:d,firstDayOfWeek:c,weekdayFormat:p,cellComponent:f="th",__staticSelector:h,withWeekNumbers:m,attributes:w,...g}=s,S=ye({name:h||"WeekdaysRow",classes:xo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:w,vars:u,varsResolver:Hl,rootSelector:"weekdaysRow"}),y=ft(),v=Bl({locale:y.getLocale(d),format:p,firstDayOfWeek:y.getFirstDayOfWeek(c)}).map((b,x)=>n.jsx(f,{...S("weekday"),children:b},x));return n.jsxs(de,{component:"tr",ref:t,...S("weekdaysRow"),...g,children:[m&&n.jsx(f,{...S("weekday"),children:"#"}),v]})});Kn.classes=xo;Kn.displayName="@mantine/dates/WeekdaysRow";function Wl(e,t=1){let s=L(e);if(!s.isValid())return s;const r=t===0?6:t-1;for(;s.day()!==r;)s=s.add(1,"day");return s.format("YYYY-MM-DD")}function Gl(e,t=1){let s=L(e);for(;s.day()!==t;)s=s.subtract(1,"day");return s.format("YYYY-MM-DD")}function ql({month:e,firstDayOfWeek:t=1,consistentWeeks:s}){const r=L(e).subtract(L(e).date()-1,"day"),o=L(r.format("YYYY-M-D")),i=o.format("YYYY-MM-DD"),l=o.add(+o.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=Wl(l,t),u=[];let d=L(Gl(i,t));for(;L(d).isBefore(a,"day");){const c=[];for(let p=0;p<7;p+=1)c.push(d.format("YYYY-MM-DD")),d=d.add(1,"day");u.push(c)}if(s&&u.length<6){const c=u[u.length-1],p=c[c.length-1];let f=L(p).add(1,"day");for(;u.length<6;){const h=[];for(let m=0;m<7;m+=1)h.push(f.format("YYYY-MM-DD")),f=f.add(1,"day");u.push(h)}}return u}function Is(e,t){return L(e).format("YYYY-MM")===L(t).format("YYYY-MM")}function bo(e,t){return t?L(e).isAfter(L(t).subtract(1,"day"),"day"):!0}function Co(e,t){return t?L(e).isBefore(L(t).add(1,"day"),"day"):!0}function Kl({dates:e,minDate:t,maxDate:s,getDayProps:r,excludeDate:o,hideOutsideDates:i,month:l}){const a=e.flat().filter(c=>Co(c,s)&&bo(c,t)&&!o?.(c)&&!r?.(c)?.disabled&&(!i||Is(c,l))),u=a.find(c=>r?.(c)?.selected);if(u)return u;const d=a.find(c=>L().isSame(c,"date"));return d||a[0]}var ps={exports:{}},Ul=ps.exports,Sr;function Zl(){return Sr||(Sr=1,(function(e,t){(function(s,r){e.exports=r()})(Ul,(function(){var s="day";return function(r,o,i){var l=function(d){return d.add(4-d.isoWeekday(),s)},a=o.prototype;a.isoWeekYear=function(){return l(this).year()},a.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),s);var c,p,f,h,m=l(this),w=(c=this.isoWeekYear(),p=this.$u,f=(p?i.utc:i)().year(c).startOf("year"),h=4-f.isoWeekday(),f.isoWeekday()>4&&(h+=7),f.add(h,s));return m.diff(w,"week")+1},a.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var u=a.startOf;a.startOf=function(d,c){var p=this.$utils(),f=!!p.u(c)||c;return p.p(d)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(d,c)}}}))})(ps)),ps.exports}var Ql=Zl();const Xl=Qo(Ql);L.extend(Xl);function Jl(e){const t=e.find(s=>L(s).day()===1);return L(t).isoWeek()}var wo={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const ec={withCellSpacing:!0},tc=Me((e,{size:t})=>({weekNumber:{"--wn-fz":Rt(t),"--wn-size":De(t,"wn-size")}})),Rs=oe((e,t)=>{const s=ne("Month",ec,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,__staticSelector:d,locale:c,firstDayOfWeek:p,weekdayFormat:f,month:h,weekendDays:m,getDayProps:w,excludeDate:g,minDate:S,maxDate:y,renderDay:v,hideOutsideDates:b,hideWeekdays:x,getDayAriaLabel:D,static:M,__getDayRef:$,__onDayKeyDown:O,__onDayClick:z,__onDayMouseEnter:A,__preventFocus:Y,__stopPropagation:B,withCellSpacing:I,size:F,highlightToday:E,withWeekNumbers:H,attributes:R,...T}=s,j=ye({name:d||"Month",classes:wo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:R,vars:u,varsResolver:tc,rootSelector:"month"}),C=ft(),_=ql({month:h,firstDayOfWeek:C.getFirstDayOfWeek(p),consistentWeeks:C.consistentWeeks}),k=Kl({dates:_,minDate:Ee(S),maxDate:Ee(y),getDayProps:w,excludeDate:g,hideOutsideDates:b,month:h}),{resolvedClassNames:N,resolvedStyles:W}=Xe({classNames:r,styles:l,props:s}),G=_.map((ee,ae)=>{const re=ee.map((K,te)=>{const X=!Is(K,h),le=D?.(K)||L(K).locale(c||C.locale).format("D MMMM YYYY"),J=w?.(K),pe=L(K).isSame(k,"date");return n.jsx("td",{...j("monthCell"),"data-with-spacing":I||void 0,children:n.jsx(qn,{__staticSelector:d||"Month",classNames:N,styles:W,unstyled:a,"data-mantine-stop-propagation":B||void 0,highlightToday:E,renderDay:v,date:K,size:F,weekend:C.getWeekendDays(m).includes(L(K).get("day")),outside:X,hidden:b?X:!1,"aria-label":le,static:M,disabled:g?.(K)||!Co(K,Ee(y))||!bo(K,Ee(S)),ref:se=>{se&&$?.(ae,te,se)},...J,onKeyDown:se=>{J?.onKeyDown?.(se),O?.(se,{rowIndex:ae,cellIndex:te,date:K})},onMouseEnter:se=>{J?.onMouseEnter?.(se),A?.(se,K)},onClick:se=>{J?.onClick?.(se),z?.(se,K)},onMouseDown:se=>{J?.onMouseDown?.(se),Y&&se.preventDefault()},tabIndex:Y||!pe?-1:0})},K.toString())});return n.jsxs("tr",{...j("monthRow"),children:[H&&n.jsx("td",{...j("weekNumber"),children:Jl(ee)}),re]},ae)});return n.jsxs(de,{component:"table",...j("month"),size:F,ref:t,...T,children:[!x&&n.jsx("thead",{...j("monthThead"),children:n.jsx(Kn,{__staticSelector:d||"Month",locale:c,firstDayOfWeek:p,weekdayFormat:f,size:F,classNames:N,styles:W,unstyled:a,withWeekNumbers:H})}),n.jsx("tbody",{...j("monthTbody"),children:G})]})});Rs.classes=wo;Rs.displayName="@mantine/dates/Month";var So={pickerControl:"m_dc6a3c71"};const sc=Me((e,{size:t})=>({pickerControl:{"--dpc-fz":Rt(t),"--dpc-size":De(t,"dpc-size")}})),Ts=oe((e,t)=>{const s=ne("PickerControl",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,firstInRange:d,lastInRange:c,inRange:p,__staticSelector:f,selected:h,disabled:m,attributes:w,...g}=s,S=ye({name:f||"PickerControl",classes:So,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:w,vars:u,varsResolver:sc,rootSelector:"pickerControl"});return n.jsx(ot,{...S("pickerControl"),ref:t,unstyled:a,"data-picker-control":!0,"data-selected":h&&!m||void 0,"data-disabled":m||void 0,"data-in-range":p&&!m&&!h||void 0,"data-first-in-range":d&&!m||void 0,"data-last-in-range":c&&!m||void 0,disabled:m,...g})});Ts.classes=So;Ts.displayName="@mantine/dates/PickerControl";function jo({year:e,minDate:t,maxDate:s}){return!t&&!s?!1:!!(t&&L(e).isBefore(t,"year")||s&&L(e).isAfter(s,"year"))}function nc({years:e,minDate:t,maxDate:s,getYearControlProps:r}){const o=e.flat().filter(a=>!jo({year:a,minDate:t,maxDate:s})&&!r?.(a)?.disabled),i=o.find(a=>r?.(a)?.selected);if(i)return i;const l=o.find(a=>L().isSame(a,"year"));return l||o[0]}function Po(e){const t=L(e).year(),s=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const l=i===3?1:3;for(let a=0;a<l;a+=1)o[i].push(L(new Date(s+r,0)).format("YYYY-MM-DD")),r+=1}return o}var Do={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const rc={yearsListFormat:"YYYY",withCellSpacing:!0},$s=oe((e,t)=>{const s=ne("YearsList",rc,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,decade:d,yearsListFormat:c,locale:p,minDate:f,maxDate:h,getYearControlProps:m,__staticSelector:w,__getControlRef:g,__onControlKeyDown:S,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:D,size:M,attributes:$,...O}=s,z=ye({name:w||"YearsList",classes:Do,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:$,vars:u,rootSelector:"yearsList"}),A=ft(),Y=Po(d),B=nc({years:Y,minDate:f,maxDate:h,getYearControlProps:m}),I=Y.map((F,E)=>{const H=F.map((R,T)=>{const j=m?.(R),C=L(R).isSame(B,"year");return n.jsx("td",{...z("yearsListCell"),"data-with-spacing":D||void 0,children:n.jsx(Ts,{...z("yearsListControl"),size:M,unstyled:a,"data-mantine-stop-propagation":x||void 0,disabled:jo({year:R,minDate:f,maxDate:h}),ref:_=>{_&&g?.(E,T,_)},...j,onKeyDown:_=>{j?.onKeyDown?.(_),S?.(_,{rowIndex:E,cellIndex:T,date:R})},onClick:_=>{j?.onClick?.(_),y?.(_,R)},onMouseEnter:_=>{j?.onMouseEnter?.(_),v?.(_,R)},onMouseDown:_=>{j?.onMouseDown?.(_),b&&_.preventDefault()},tabIndex:b||!C?-1:0,children:j?.children??L(R).locale(A.getLocale(p)).format(c)})},T)});return n.jsx("tr",{...z("yearsListRow"),children:H},E)});return n.jsx(de,{component:"table",ref:t,size:M,...z("yearsList"),...O,children:n.jsx("tbody",{children:I})})});$s.classes=Do;$s.displayName="@mantine/dates/YearsList";function _o({month:e,minDate:t,maxDate:s}){return!t&&!s?!1:!!(t&&L(e).isBefore(t,"month")||s&&L(e).isAfter(s,"month"))}function oc({months:e,minDate:t,maxDate:s,getMonthControlProps:r}){const o=e.flat().filter(a=>!_o({month:a,minDate:t,maxDate:s})&&!r?.(a)?.disabled),i=o.find(a=>r?.(a)?.selected);if(i)return i;const l=o.find(a=>L().isSame(a,"month"));return l||o[0]}function ac(e){const t=L(e).startOf("year").toDate(),s=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let i=0;i<3;i+=1)s[o].push(L(t).add(r,"months").format("YYYY-MM-DD")),r+=1;return s}var ko={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const ic={monthsListFormat:"MMM",withCellSpacing:!0},Os=oe((e,t)=>{const s=ne("MonthsList",ic,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,__staticSelector:d,year:c,monthsListFormat:p,locale:f,minDate:h,maxDate:m,getMonthControlProps:w,__getControlRef:g,__onControlKeyDown:S,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:D,size:M,attributes:$,...O}=s,z=ye({name:d||"MonthsList",classes:ko,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:$,vars:u,rootSelector:"monthsList"}),A=ft(),Y=ac(c),B=oc({months:Y,minDate:Ee(h),maxDate:Ee(m),getMonthControlProps:w}),I=Y.map((F,E)=>{const H=F.map((R,T)=>{const j=w?.(R),C=L(R).isSame(B,"month");return n.jsx("td",{...z("monthsListCell"),"data-with-spacing":D||void 0,children:n.jsx(Ts,{...z("monthsListControl"),size:M,unstyled:a,__staticSelector:d||"MonthsList","data-mantine-stop-propagation":x||void 0,disabled:_o({month:R,minDate:Ee(h),maxDate:Ee(m)}),ref:_=>{_&&g?.(E,T,_)},...j,onKeyDown:_=>{j?.onKeyDown?.(_),S?.(_,{rowIndex:E,cellIndex:T,date:R})},onClick:_=>{j?.onClick?.(_),y?.(_,R)},onMouseEnter:_=>{j?.onMouseEnter?.(_),v?.(_,R)},onMouseDown:_=>{j?.onMouseDown?.(_),b&&_.preventDefault()},tabIndex:b||!C?-1:0,children:j?.children??L(R).locale(A.getLocale(f)).format(p)})},T)});return n.jsx("tr",{...z("monthsListRow"),children:H},E)});return n.jsx(de,{component:"table",ref:t,size:M,...z("monthsList"),...O,children:n.jsx("tbody",{children:I})})});Os.classes=ko;Os.displayName="@mantine/dates/MonthsList";var Mo={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const lc={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},cc=Me((e,{size:t})=>({calendarHeader:{"--dch-control-size":De(t,"dch-control-size"),"--dch-fz":Rt(t)}})),jt=oe((e,t)=>{const s=ne("CalendarHeader",lc,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,nextIcon:d,previousIcon:c,nextLabel:p,previousLabel:f,onNext:h,onPrevious:m,onLevelClick:w,label:g,nextDisabled:S,previousDisabled:y,hasNextLevel:v,levelControlAriaLabel:b,withNext:x,withPrevious:D,headerControlsOrder:M,__staticSelector:$,__preventFocus:O,__stopPropagation:z,attributes:A,...Y}=s,B=ye({name:$||"CalendarHeader",classes:Mo,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:A,vars:u,varsResolver:cc,rootSelector:"calendarHeader"}),I=O?T=>T.preventDefault():void 0,F=D&&P.createElement(ot,{...B("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":f,onClick:m,unstyled:a,onMouseDown:I,disabled:y,"data-disabled":y||void 0,tabIndex:O||y?-1:0,"data-mantine-stop-propagation":z||void 0},c||n.jsx(sr,{...B("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),E=P.createElement(ot,{component:v?"button":"div",...B("calendarHeaderLevel"),key:"level",onClick:v?w:void 0,unstyled:a,onMouseDown:v?I:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":b,tabIndex:O||!v?-1:0,"data-mantine-stop-propagation":z||void 0},g),H=x&&P.createElement(ot,{...B("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":p,onClick:h,unstyled:a,onMouseDown:I,disabled:S,"data-disabled":S||void 0,tabIndex:O||S?-1:0,"data-mantine-stop-propagation":z||void 0},d||n.jsx(sr,{...B("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),R=M.map(T=>T==="previous"?F:T==="level"?E:T==="next"?H:null);return n.jsx(de,{...B("calendarHeader"),ref:t,...Y,children:R})});jt.classes=Mo;jt.displayName="@mantine/dates/CalendarHeader";function uc(e){const t=Po(e);return[t[0][0],t[3][0]]}const dc={decadeLabelFormat:"YYYY"},As=oe((e,t)=>{const s=ne("DecadeLevel",dc,e),{decade:r,locale:o,minDate:i,maxDate:l,yearsListFormat:a,getYearControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:m,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:x,previousDisabled:D,levelControlAriaLabel:M,withNext:$,withPrevious:O,headerControlsOrder:z,decadeLabelFormat:A,classNames:Y,styles:B,unstyled:I,__staticSelector:F,__stopPropagation:E,size:H,attributes:R,...T}=s,j=ft(),[C,_]=uc(r),k={__staticSelector:F||"DecadeLevel",classNames:Y,styles:B,unstyled:I,size:H,attributes:R},N=typeof x=="boolean"?x:l?!L(_).endOf("year").isBefore(l):!1,W=typeof D=="boolean"?D:i?!L(C).startOf("year").isAfter(i):!1,G=(ee,ae)=>L(ee).locale(o||j.locale).format(ae);return n.jsxs(de,{"data-decade-level":!0,size:H,ref:t,...T,children:[n.jsx(jt,{label:typeof A=="function"?A(C,_):`${G(C,A)} – ${G(_,A)}`,__preventFocus:m,__stopPropagation:E,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:N,previousDisabled:W,hasNextLevel:!1,levelControlAriaLabel:M,withNext:$,withPrevious:O,headerControlsOrder:z,...k}),n.jsx($s,{decade:r,locale:o,minDate:i,maxDate:l,yearsListFormat:a,getYearControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,__preventFocus:m,__stopPropagation:E,withCellSpacing:h,...k})]})});As.classes={...$s.classes,...jt.classes};As.displayName="@mantine/dates/DecadeLevel";const pc={yearLabelFormat:"YYYY"},Vs=oe((e,t)=>{const s=ne("YearLevel",pc,e),{year:r,locale:o,minDate:i,maxDate:l,monthsListFormat:a,getMonthControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:m,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:D,previousDisabled:M,hasNextLevel:$,levelControlAriaLabel:O,withNext:z,withPrevious:A,headerControlsOrder:Y,yearLabelFormat:B,__staticSelector:I,__stopPropagation:F,size:E,classNames:H,styles:R,unstyled:T,attributes:j,...C}=s,_=ft(),k={__staticSelector:I||"YearLevel",classNames:H,styles:R,unstyled:T,size:E,attributes:j},N=typeof D=="boolean"?D:l?!L(r).endOf("year").isBefore(l):!1,W=typeof M=="boolean"?M:i?!L(r).startOf("year").isAfter(i):!1;return n.jsxs(de,{"data-year-level":!0,size:E,ref:t,...C,children:[n.jsx(jt,{label:typeof B=="function"?B(r):L(r).locale(o||_.locale).format(B),__preventFocus:m,__stopPropagation:F,nextIcon:w,previousIcon:g,nextLabel:S,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:N,previousDisabled:W,hasNextLevel:$,levelControlAriaLabel:O,withNext:z,withPrevious:A,headerControlsOrder:Y,...k}),n.jsx(Os,{year:r,locale:o,minDate:i,maxDate:l,monthsListFormat:a,getMonthControlProps:u,__getControlRef:d,__onControlKeyDown:c,__onControlClick:p,__onControlMouseEnter:f,__preventFocus:m,__stopPropagation:F,withCellSpacing:h,...k})]})});Vs.classes={...jt.classes,...Os.classes};Vs.displayName="@mantine/dates/YearLevel";const mc={monthLabelFormat:"MMMM YYYY"},Fs=oe((e,t)=>{const s=ne("MonthLevel",mc,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__getDayRef:g,__onDayKeyDown:S,__onDayClick:y,__onDayMouseEnter:v,withCellSpacing:b,highlightToday:x,withWeekNumbers:D,__preventFocus:M,__stopPropagation:$,nextIcon:O,previousIcon:z,nextLabel:A,previousLabel:Y,onNext:B,onPrevious:I,onLevelClick:F,nextDisabled:E,previousDisabled:H,hasNextLevel:R,levelControlAriaLabel:T,withNext:j,withPrevious:C,headerControlsOrder:_,monthLabelFormat:k,classNames:N,styles:W,unstyled:G,__staticSelector:ee,size:ae,static:re,attributes:K,...te}=s,X=ft(),le={__staticSelector:ee||"MonthLevel",classNames:N,styles:W,unstyled:G,size:ae,attributes:K},J=typeof E=="boolean"?E:p?!L(r).endOf("month").isBefore(p):!1,pe=typeof H=="boolean"?H:c?!L(r).startOf("month").isAfter(c):!1;return n.jsxs(de,{"data-month-level":!0,size:ae,ref:t,...te,children:[n.jsx(jt,{label:typeof k=="function"?k(r):L(r).locale(o||X.locale).format(k),__preventFocus:M,__stopPropagation:$,nextIcon:O,previousIcon:z,nextLabel:A,previousLabel:Y,onNext:B,onPrevious:I,onLevelClick:F,nextDisabled:J,previousDisabled:pe,hasNextLevel:R,levelControlAriaLabel:T,withNext:j,withPrevious:C,headerControlsOrder:_,...le}),n.jsx(Rs,{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__getDayRef:g,__onDayKeyDown:S,__onDayClick:y,__onDayMouseEnter:v,__preventFocus:M,__stopPropagation:$,static:re,withCellSpacing:b,highlightToday:x,withWeekNumbers:D,...le})]})});Fs.classes={...Rs.classes,...jt.classes};Fs.displayName="@mantine/dates/MonthLevel";var No={levelsGroup:"m_30b26e33"};const Pt=oe((e,t)=>{const s=ne("LevelsGroup",null,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:u,__staticSelector:d,attributes:c,...p}=s,f=ye({name:d||"LevelsGroup",classes:No,props:s,className:o,style:i,classNames:r,styles:l,unstyled:a,attributes:c,vars:u,rootSelector:"levelsGroup"});return n.jsx(de,{ref:t,...f("levelsGroup"),...p})});Pt.classes=No;Pt.displayName="@mantine/dates/LevelsGroup";const hc={numberOfColumns:1},Es=oe((e,t)=>{const s=ne("DecadeLevelGroup",hc,e),{decade:r,locale:o,minDate:i,maxDate:l,yearsListFormat:a,getYearControlProps:u,__onControlClick:d,__onControlMouseEnter:c,withCellSpacing:p,__preventFocus:f,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,nextDisabled:v,previousDisabled:b,headerControlsOrder:x,classNames:D,styles:M,unstyled:$,__staticSelector:O,__stopPropagation:z,numberOfColumns:A,levelControlAriaLabel:Y,decadeLabelFormat:B,size:I,vars:F,attributes:E,...H}=s,R=P.useRef([]),T=Array(A).fill(0).map((j,C)=>{const _=L(r).add(C*10,"years").format("YYYY-MM-DD");return n.jsx(As,{size:I,yearsListFormat:a,decade:_,withNext:C===A-1,withPrevious:C===0,decadeLabelFormat:B,__onControlClick:d,__onControlMouseEnter:c,__onControlKeyDown:(k,N)=>Yn({levelIndex:C,rowIndex:N.rowIndex,cellIndex:N.cellIndex,event:k,controlsRef:R}),__getControlRef:(k,N,W)=>{Array.isArray(R.current[C])||(R.current[C]=[]),Array.isArray(R.current[C][k])||(R.current[C][k]=[]),R.current[C][k][N]=W},levelControlAriaLabel:typeof Y=="function"?Y(_):Y,locale:o,minDate:i,maxDate:l,__preventFocus:f,__stopPropagation:z,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,nextDisabled:v,previousDisabled:b,getYearControlProps:u,__staticSelector:O||"DecadeLevelGroup",classNames:D,styles:M,unstyled:$,withCellSpacing:p,headerControlsOrder:x,attributes:E},C)});return n.jsx(Pt,{classNames:D,styles:M,__staticSelector:O||"DecadeLevelGroup",ref:t,size:I,unstyled:$,attributes:E,...H,children:T})});Es.classes={...Pt.classes,...As.classes};Es.displayName="@mantine/dates/DecadeLevelGroup";const fc={numberOfColumns:1},Ys=oe((e,t)=>{const s=ne("YearLevelGroup",fc,e),{year:r,locale:o,minDate:i,maxDate:l,monthsListFormat:a,getMonthControlProps:u,__onControlClick:d,__onControlMouseEnter:c,withCellSpacing:p,__preventFocus:f,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:D,headerControlsOrder:M,classNames:$,styles:O,unstyled:z,__staticSelector:A,__stopPropagation:Y,numberOfColumns:B,levelControlAriaLabel:I,yearLabelFormat:F,size:E,vars:H,attributes:R,...T}=s,j=P.useRef([]),C=Array(B).fill(0).map((_,k)=>{const N=L(r).add(k,"years").format("YYYY-MM-DD");return n.jsx(Vs,{size:E,monthsListFormat:a,year:N,withNext:k===B-1,withPrevious:k===0,yearLabelFormat:F,__stopPropagation:Y,__onControlClick:d,__onControlMouseEnter:c,__onControlKeyDown:(W,G)=>Yn({levelIndex:k,rowIndex:G.rowIndex,cellIndex:G.cellIndex,event:W,controlsRef:j}),__getControlRef:(W,G,ee)=>{Array.isArray(j.current[k])||(j.current[k]=[]),Array.isArray(j.current[k][W])||(j.current[k][W]=[]),j.current[k][W][G]=ee},levelControlAriaLabel:typeof I=="function"?I(N):I,locale:o,minDate:i,maxDate:l,__preventFocus:f,nextIcon:h,previousIcon:m,nextLabel:w,previousLabel:g,onNext:S,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:D,getMonthControlProps:u,classNames:$,styles:O,unstyled:z,__staticSelector:A||"YearLevelGroup",withCellSpacing:p,headerControlsOrder:M,attributes:R},k)});return n.jsx(Pt,{classNames:$,styles:O,__staticSelector:A||"YearLevelGroup",ref:t,size:E,unstyled:z,attributes:R,...T,children:C})});Ys.classes={...Vs.classes,...Pt.classes};Ys.displayName="@mantine/dates/YearLevelGroup";const gc={numberOfColumns:1},zs=oe((e,t)=>{const s=ne("MonthLevelGroup",gc,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__onDayClick:g,__onDayMouseEnter:S,withCellSpacing:y,highlightToday:v,withWeekNumbers:b,__preventFocus:x,nextIcon:D,previousIcon:M,nextLabel:$,previousLabel:O,onNext:z,onPrevious:A,onLevelClick:Y,nextDisabled:B,previousDisabled:I,hasNextLevel:F,headerControlsOrder:E,classNames:H,styles:R,unstyled:T,numberOfColumns:j,levelControlAriaLabel:C,monthLabelFormat:_,__staticSelector:k,__stopPropagation:N,size:W,static:G,vars:ee,attributes:ae,...re}=s,K=P.useRef([]),te=Array(j).fill(0).map((X,le)=>{const J=L(r).add(le,"months").format("YYYY-MM-DD");return n.jsx(Fs,{month:J,withNext:le===j-1,withPrevious:le===0,monthLabelFormat:_,__stopPropagation:N,__onDayClick:g,__onDayMouseEnter:S,__onDayKeyDown:(pe,se)=>Yn({levelIndex:le,rowIndex:se.rowIndex,cellIndex:se.cellIndex,event:pe,controlsRef:K}),__getDayRef:(pe,se,we)=>{Array.isArray(K.current[le])||(K.current[le]=[]),Array.isArray(K.current[le][pe])||(K.current[le][pe]=[]),K.current[le][pe][se]=we},levelControlAriaLabel:typeof C=="function"?C(J):C,locale:o,firstDayOfWeek:i,weekdayFormat:l,weekendDays:a,getDayProps:u,excludeDate:d,minDate:c,maxDate:p,renderDay:f,hideOutsideDates:h,hideWeekdays:m,getDayAriaLabel:w,__preventFocus:x,nextIcon:D,previousIcon:M,nextLabel:$,previousLabel:O,onNext:z,onPrevious:A,onLevelClick:Y,nextDisabled:B,previousDisabled:I,hasNextLevel:F,classNames:H,styles:R,unstyled:T,__staticSelector:k||"MonthLevelGroup",size:W,static:G,withCellSpacing:y,highlightToday:v,withWeekNumbers:b,headerControlsOrder:E,attributes:ae},le)});return n.jsx(Pt,{classNames:H,styles:R,__staticSelector:k||"MonthLevelGroup",ref:t,size:W,attributes:ae,...re,children:te})});zs.classes={...Pt.classes,...Fs.classes};zs.displayName="@mantine/dates/MonthLevelGroup";var Lo={input:"m_6fa5e2aa"};const Bs=oe((e,t)=>{const{inputProps:s,wrapperProps:r,placeholder:o,classNames:i,styles:l,unstyled:a,popoverProps:u,modalProps:d,dropdownType:c,children:p,formattedValue:f,dropdownHandlers:h,dropdownOpened:m,onClick:w,clearable:g,onClear:S,clearButtonProps:y,rightSection:v,shouldClear:b,readOnly:x,disabled:D,value:M,name:$,form:O,type:z,onDropdownClose:A,withTime:Y,...B}=dn("PickerInputBase",{size:"sm"},e),I=n.jsx(Fe.ClearButton,{onClick:S,unstyled:a,...y}),F=()=>{z==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&S(),h.close()};return n.jsxs(n.Fragment,{children:[c==="modal"&&!x&&n.jsx(Xo,{opened:m,onClose:F,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:a,...d,children:p}),n.jsx(Fe.Wrapper,{...r,children:n.jsxs(Pe,{position:"bottom-start",opened:m,trapFocus:!0,returnFocus:!1,unstyled:a,onClose:A,...u,disabled:u?.disabled||c==="modal"||x,onChange:E=>{E||(u?.onClose?.(),F())},children:[n.jsx(Pe.Target,{children:n.jsx(Fe,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:D,component:"button",type:"button",multiline:!0,onClick:E=>{w?.(E),h.toggle()},__clearSection:I,__clearable:g&&b&&!x&&!D,rightSection:v,...s,ref:t,classNames:{...i,input:bs(Lo.input,i?.input)},...B,children:f||n.jsx(Fe.Placeholder,{error:s.error,unstyled:a,classNames:i,styles:l,__staticSelector:s.__staticSelector,children:o})})}),n.jsx(Pe.Dropdown,{"data-dates-dropdown":!0,children:p})]})}),n.jsx(zn,{value:M,name:$,form:O,type:z,withTime:Y})]})});Bs.classes=Lo;Bs.displayName="@mantine/dates/PickerInputBase";const jr=e=>e==="range"?[null,null]:e==="multiple"?[]:null,Pr=(e,t)=>{const s=t?Vt:Ee;return Array.isArray(e)?e.map(s):s(e)};function Ut({type:e,value:t,defaultValue:s,onChange:r,withTime:o=!1}){const i=P.useRef(e),[l,a,u]=Ke({value:Pr(t,o),defaultValue:Pr(s,o),finalValue:jr(e),onChange:r});let d=l;return i.current!==e&&(i.current=e,t===void 0&&(d=s!==void 0?s:jr(e),a(d))),[d,a,u]}function tn(e,t){return e?e==="month"?0:e==="year"?1:2:t||0}function yc(e){return e===0?"month":e===1?"year":"decade"}function Wt(e,t,s){return yc(Ze(tn(e,0),tn(t,0),tn(s,2)))}const vc={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},zt=oe((e,t)=>{const s=ne("Calendar",vc,e),{vars:r,maxLevel:o,minLevel:i,defaultLevel:l,level:a,onLevelChange:u,date:d,defaultDate:c,onDateChange:p,numberOfColumns:f,columnsToScroll:h,ariaLabels:m,nextLabel:w,previousLabel:g,onYearSelect:S,onMonthSelect:y,onYearMouseEnter:v,onMonthMouseEnter:b,headerControlsOrder:x,__updateDateOnYearSelect:D,__updateDateOnMonthSelect:M,__setDateRef:$,__setLevelRef:O,firstDayOfWeek:z,weekdayFormat:A,weekendDays:Y,getDayProps:B,excludeDate:I,renderDay:F,hideOutsideDates:E,hideWeekdays:H,getDayAriaLabel:R,monthLabelFormat:T,nextIcon:j,previousIcon:C,__onDayClick:_,__onDayMouseEnter:k,withCellSpacing:N,highlightToday:W,withWeekNumbers:G,monthsListFormat:ee,getMonthControlProps:ae,yearLabelFormat:re,yearsListFormat:K,getYearControlProps:te,decadeLabelFormat:X,classNames:le,styles:J,unstyled:pe,minDate:se,maxDate:we,locale:Z,__staticSelector:me,size:Ye,__preventFocus:he,__stopPropagation:ue,onNextDecade:xe,onPreviousDecade:et,onNextYear:pt,onPreviousYear:Re,onNextMonth:V,onPreviousMonth:Te,static:_e,enableKeyboardNavigation:gt,attributes:yt,...vt}=s,{resolvedClassNames:it,resolvedStyles:Dt}=Xe({classNames:le,styles:J,props:s}),[Ue,Le]=Ke({value:a?Wt(a,i,o):void 0,defaultValue:l?Wt(l,i,o):void 0,finalValue:Wt(void 0,i,o),onChange:u}),[xt,Q]=Ut({type:"default",value:Ee(d),defaultValue:Ee(c),onChange:p});P.useImperativeHandle($,()=>U=>{Q(U)}),P.useImperativeHandle(O,()=>U=>{Le(U)});const Be={__staticSelector:me||"Calendar",styles:Dt,classNames:it,unstyled:pe,size:Ye,attributes:yt},Se=h||f||1,lt=new Date,$t=se&&L(lt).isAfter(se)?se:L(lt).format("YYYY-MM-DD"),$e=xt||$t,_t=()=>{const U=L($e).add(Se,"month").format("YYYY-MM-DD");V?.(U),Q(U)},je=()=>{const U=L($e).subtract(Se,"month").format("YYYY-MM-DD");Te?.(U),Q(U)},bt=()=>{const U=L($e).add(Se,"year").format("YYYY-MM-DD");pt?.(U),Q(U)},ke=()=>{const U=L($e).subtract(Se,"year").format("YYYY-MM-DD");Re?.(U),Q(U)},kt=()=>{const U=L($e).add(10*Se,"year").format("YYYY-MM-DD");xe?.(U),Q(U)},Ot=()=>{const U=L($e).subtract(10*Se,"year").format("YYYY-MM-DD");et?.(U),Q(U)},be=P.useRef(null);P.useEffect(()=>{if(!gt||_e)return;const U=Ce=>{if(!be.current?.contains(document.activeElement))return;const Oe=Ce.ctrlKey||Ce.metaKey,Ct=Ce.shiftKey;switch(Ce.key){case"ArrowUp":Oe&&Ct?(Ce.preventDefault(),Ot()):Oe&&(Ce.preventDefault(),ke());break;case"ArrowDown":Oe&&Ct?(Ce.preventDefault(),kt()):Oe&&(Ce.preventDefault(),bt());break;case"y":case"Y":Ue==="month"&&(Ce.preventDefault(),Le("year"));break}};return document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}},[gt,_e,Ue,bt,ke,kt,Ot]);const tt=U=>{be.current=U,typeof t=="function"?t(U):t&&(t.current=U)};return n.jsxs(de,{ref:tt,size:Ye,"data-calendar":!0,...vt,children:[Ue==="month"&&n.jsx(zs,{month:$e,minDate:se,maxDate:we,firstDayOfWeek:z,weekdayFormat:A,weekendDays:Y,getDayProps:B,excludeDate:I,renderDay:F,hideOutsideDates:E,hideWeekdays:H,getDayAriaLabel:R,onNext:_t,onPrevious:je,hasNextLevel:o!=="month",onLevelClick:()=>Le("year"),numberOfColumns:f,locale:Z,levelControlAriaLabel:m?.monthLevelControl,nextLabel:m?.nextMonth??w,nextIcon:j,previousLabel:m?.previousMonth??g,previousIcon:C,monthLabelFormat:T,__onDayClick:_,__onDayMouseEnter:k,__preventFocus:he,__stopPropagation:ue,static:_e,withCellSpacing:N,highlightToday:W,withWeekNumbers:G,headerControlsOrder:x,...Be}),Ue==="year"&&n.jsx(Ys,{year:$e,numberOfColumns:f,minDate:se,maxDate:we,monthsListFormat:ee,getMonthControlProps:ae,locale:Z,onNext:bt,onPrevious:ke,hasNextLevel:o!=="month"&&o!=="year",onLevelClick:()=>Le("decade"),levelControlAriaLabel:m?.yearLevelControl,nextLabel:m?.nextYear??w,nextIcon:j,previousLabel:m?.previousYear??g,previousIcon:C,yearLabelFormat:re,__onControlMouseEnter:b,__onControlClick:(U,Ce)=>{M&&Q(Ce),Le(Wt("month",i,o)),y?.(Ce)},__preventFocus:he,__stopPropagation:ue,withCellSpacing:N,headerControlsOrder:x,...Be}),Ue==="decade"&&n.jsx(Es,{decade:$e,minDate:se,maxDate:we,yearsListFormat:K,getYearControlProps:te,locale:Z,onNext:kt,onPrevious:Ot,numberOfColumns:f,nextLabel:m?.nextDecade??w,nextIcon:j,previousLabel:m?.previousDecade??g,previousIcon:C,decadeLabelFormat:X,__onControlMouseEnter:v,__onControlClick:(U,Ce)=>{D&&Q(Ce),Le(Wt("year",i,o)),S?.(Ce)},__preventFocus:he,__stopPropagation:ue,withCellSpacing:N,headerControlsOrder:x,...Be})]})});zt.classes={...Es.classes,...Ys.classes,...zs.classes};zt.displayName="@mantine/dates/Calendar";function Un(e){const{maxLevel:t,minLevel:s,defaultLevel:r,level:o,onLevelChange:i,nextIcon:l,previousIcon:a,date:u,defaultDate:d,onDateChange:c,numberOfColumns:p,columnsToScroll:f,ariaLabels:h,nextLabel:m,previousLabel:w,onYearSelect:g,onMonthSelect:S,onYearMouseEnter:y,onMonthMouseEnter:v,onNextMonth:b,onPreviousMonth:x,onNextYear:D,onPreviousYear:M,onNextDecade:$,onPreviousDecade:O,withCellSpacing:z,highlightToday:A,__updateDateOnYearSelect:Y,__updateDateOnMonthSelect:B,__setDateRef:I,__setLevelRef:F,withWeekNumbers:E,headerControlsOrder:H,firstDayOfWeek:R,weekdayFormat:T,weekendDays:j,getDayProps:C,excludeDate:_,renderDay:k,hideOutsideDates:N,hideWeekdays:W,getDayAriaLabel:G,monthLabelFormat:ee,monthsListFormat:ae,getMonthControlProps:re,yearLabelFormat:K,yearsListFormat:te,getYearControlProps:X,decadeLabelFormat:le,allowSingleDateInRange:J,allowDeselect:pe,minDate:se,maxDate:we,locale:Z,...me}=e;return{calendarProps:{maxLevel:t,minLevel:s,defaultLevel:r,level:o,onLevelChange:i,nextIcon:l,previousIcon:a,date:u,defaultDate:d,onDateChange:c,numberOfColumns:p,columnsToScroll:f,ariaLabels:h,nextLabel:m,previousLabel:w,onYearSelect:g,onMonthSelect:S,onYearMouseEnter:y,onMonthMouseEnter:v,onNextMonth:b,onPreviousMonth:x,onNextYear:D,onPreviousYear:M,onNextDecade:$,onPreviousDecade:O,withCellSpacing:z,highlightToday:A,__updateDateOnYearSelect:Y,__updateDateOnMonthSelect:B,__setDateRef:I,withWeekNumbers:E,headerControlsOrder:H,firstDayOfWeek:R,weekdayFormat:T,weekendDays:j,getDayProps:C,excludeDate:_,renderDay:k,hideOutsideDates:N,hideWeekdays:W,getDayAriaLabel:G,monthLabelFormat:ee,monthsListFormat:ae,getMonthControlProps:re,yearLabelFormat:K,yearsListFormat:te,getYearControlProps:X,decadeLabelFormat:le,allowSingleDateInRange:J,allowDeselect:pe,minDate:se,maxDate:we,locale:Z},others:me}}function Dr(e,t){const s=[...t].sort((r,o)=>L(r).isAfter(L(o))?1:-1);return L(s[0]).startOf("day").subtract(1,"ms").isBefore(e)&&L(s[1]).endOf("day").add(1,"ms").isAfter(e)}function xc({type:e,level:t,value:s,defaultValue:r,onChange:o,allowSingleDateInRange:i,allowDeselect:l,onMouseLeave:a}){const[u,d]=Ut({type:e,value:s,defaultValue:r,onChange:o}),[c,p]=P.useState(e==="range"&&u[0]&&!u[1]?u[0]:null),[f,h]=P.useState(null),m=x=>{if(e==="range"){if(c&&!u[1]){if(L(x).isSame(c,t)&&!i){p(null),h(null),d([null,null]);return}const D=[x,c];D.sort((M,$)=>L(M).isAfter(L($))?1:-1),d(D),h(null),p(null);return}if(u[0]&&!u[1]&&L(x).isSame(u[0],t)&&!i){p(null),h(null),d([null,null]);return}d([x,null]),h(null),p(x);return}if(e==="multiple"){u.some(D=>L(D).isSame(x,t))?d(u.filter(D=>!L(D).isSame(x,t))):d([...u,x]);return}u&&l&&L(x).isSame(u,t)?d(null):d(x)},w=x=>c&&f?Dr(x,[f,c]):u[0]&&u[1]?Dr(x,u):!1,g=e==="range"?x=>{a?.(x),h(null)}:a,S=x=>u[0]&&L(x).isSame(u[0],t)?!(f&&L(f).isBefore(u[0])):!1,y=x=>u[1]?L(x).isSame(u[1],t):!u[0]||!f?!1:L(f).isBefore(u[0])&&L(x).isSame(u[0],t),v=x=>{if(e==="range")return{selected:u.some(M=>M&&L(M).isSame(x,t)),inRange:w(x),firstInRange:S(x),lastInRange:y(x),"data-autofocus":!!u[0]&&L(u[0]).isSame(x,t)||void 0};if(e==="multiple")return{selected:u.some(M=>M&&L(M).isSame(x,t)),"data-autofocus":!!u[0]&&L(u[0]).isSame(x,t)||void 0};const D=L(u).isSame(x,t);return{selected:D,"data-autofocus":D||void 0}},b=e==="range"&&c?h:()=>{};return P.useEffect(()=>{if(e==="range")if(u[0]&&!u[1])p(u[0]);else{const x=u[0]==null&&u[1]==null,D=u[0]!=null&&u[1]!=null;(x||D)&&(p(null),h(null))}},[u]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:v,_value:u,setValue:d}}var bc={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const Cc=Me((e,{size:t})=>({datePickerRoot:{"--preset-font-size":Rt(t)}})),wc={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Hs=oe((e,t)=>{const s=ne("DatePicker",wc,e),{allowDeselect:r,allowSingleDateInRange:o,value:i,defaultValue:l,onChange:a,onMouseLeave:u,classNames:d,styles:c,__staticSelector:p,__onDayClick:f,__onDayMouseEnter:h,__onPresetSelect:m,__stopPropagation:w,presets:g,className:S,style:y,unstyled:v,size:b,vars:x,attributes:D,...M}=s,{calendarProps:$,others:O}=Un(M),z=P.useRef(null),A=P.useRef(null),Y=ye({name:p||"DatePicker",classes:bc,props:s,className:S,style:y,classNames:d,styles:c,unstyled:v,attributes:D,rootSelector:g?"datePickerRoot":void 0,varsResolver:Cc,vars:x}),{onDateChange:B,onRootMouseLeave:I,onHoveredDateChange:F,getControlProps:E,_value:H,setValue:R}=xc({type:O.type,level:"day",allowDeselect:r,allowSingleDateInRange:o,value:i,defaultValue:l,onChange:a,onMouseLeave:u}),{resolvedClassNames:T,resolvedStyles:j}=Xe({classNames:d,styles:c,props:s}),C=n.jsx(zt,{ref:t,classNames:T,styles:j,__staticSelector:p||"DatePicker",onMouseLeave:I,size:b,...$,...g?{}:O,__stopPropagation:w,__setDateRef:z,__setLevelRef:A,minLevel:$.minLevel||"month",__onDayMouseEnter:(N,W)=>{F(W),h?.(N,W)},__onDayClick:(N,W)=>{B(W),f?.(N,W)},getDayProps:N=>({...E(N),...$.getDayProps?.(N)}),getMonthControlProps:N=>({selected:typeof H=="string"?Is(N,H):!1,...$.getMonthControlProps?.(N)}),getYearControlProps:N=>({selected:typeof H=="string"?L(N).isSame(H,"year"):!1,...$.getYearControlProps?.(N)}),hideOutsideDates:$.hideOutsideDates??$.numberOfColumns!==1,...g?{}:{className:S,style:y,attributes:D}});if(!g)return C;const _=N=>{const W=Array.isArray(N)?N[0]:N;W!==void 0&&(z.current?.(W),A.current?.("month"),m?m(W):R(N))},k=g.map((N,W)=>n.jsx(ot,{...Y("presetButton"),onClick:()=>_(N.value),onMouseDown:G=>G.preventDefault(),"data-mantine-stop-propagation":w||void 0,children:N.label},W));return n.jsxs(de,{...Y("datePickerRoot"),size:b,...O,children:[n.jsx("div",{...Y("presetsList"),children:k}),C]})});Hs.classes=zt.classes;Hs.displayName="@mantine/dates/DatePicker";function Sc(e){if(e===null)return null;const t=new Date(e);return Number.isNaN(t.getTime())||!e?null:L(t).format("YYYY-MM-DD")}function jc({date:e,maxDate:t,minDate:s}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&L(e).isAfter(t,"date")||s&&L(e).isBefore(s,"date"))}const Pc={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,size:"sm"},Zn=oe((e,t)=>{const s=dn("DateInput",Pc,e),{inputProps:r,wrapperProps:o,value:i,defaultValue:l,onChange:a,clearable:u,clearButtonProps:d,popoverProps:c,getDayProps:p,locale:f,valueFormat:h,dateParser:m,minDate:w,maxDate:g,fixOnBlur:S,onFocus:y,onBlur:v,onClick:b,onKeyDown:x,readOnly:D,name:M,form:$,rightSection:O,unstyled:z,classNames:A,styles:Y,allowDeselect:B,date:I,defaultDate:F,onDateChange:E,getMonthControlProps:H,getYearControlProps:R,disabled:T,...j}=s,C=P.useRef(null),_=P.useRef(null),[k,N]=P.useState(!1),{calendarProps:W,others:G}=Un(j),ee=ft(),re=m||(V=>{const Te=L(V,h,ee.getLocale(f)).toDate();return Number.isNaN(Te.getTime())?Sc(V):L(Te).format("YYYY-MM-DD")}),K=B!==void 0?B:u,te=V=>V?L(V).locale(ee.getLocale(f)).format(h):"",[X,le,J]=Ut({type:"default",value:i,defaultValue:l,onChange:a}),[pe,se]=Ut({type:"default",value:I,defaultValue:l||F,onChange:E});P.useEffect(()=>{J&&i!==null&&se(i)},[J,i]);const[we,Z]=P.useState(te(X));P.useEffect(()=>{Z(te(X))},[ee.getLocale(f)]);const me=V=>{const Te=V.currentTarget.value;if(Z(Te),N(!0),Te.trim()===""&&(B||u))le(null);else{const _e=re(Te);_e&&jc({date:_e,minDate:w,maxDate:g})&&(le(_e),se(_e))}},Ye=V=>{v?.(V),N(!1),S&&Z(te(X))},he=V=>{y?.(V),N(!0)},ue=V=>{b?.(V),N(!0)},xe=V=>{V.key==="Escape"&&N(!1),x?.(V)},et=V=>({...p?.(V),selected:L(X).isSame(V,"day"),onClick:Te=>{p?.(V).onClick?.(Te);const _e=K&&L(X).isSame(V,"day")?null:V;le(_e),!J&&_e&&Z(te(_e)),N(!1)}}),pt=n.jsx(Fe.ClearButton,{onClick:()=>{le(null),!J&&Z(""),N(!1)},unstyled:z,...d}),Re=u&&!!X&&!D&&!T;return St(()=>{X!==void 0&&!k&&Z(te(X))},[X]),xa(()=>N(!1),void 0,[C.current,_.current]),n.jsxs(n.Fragment,{children:[n.jsx(Fe.Wrapper,{...o,__staticSelector:"DateInput",ref:C,children:n.jsxs(Pe,{opened:k,trapFocus:!1,position:"bottom-start",disabled:D||T,withRoles:!1,unstyled:z,...c,children:[n.jsx(Pe.Target,{children:n.jsx(Fe,{"data-dates-input":!0,"data-read-only":D||void 0,autoComplete:"off",ref:t,value:we,onChange:me,onBlur:Ye,onFocus:he,onClick:ue,onKeyDown:xe,readOnly:D,rightSection:O,__clearSection:pt,__clearable:Re,...r,...G,disabled:T,__staticSelector:"DateInput"})}),n.jsx(Pe.Dropdown,{onMouseDown:V=>V.preventDefault(),"data-dates-dropdown":!0,ref:_,children:n.jsx(zt,{__staticSelector:"DateInput",...W,classNames:A,styles:Y,unstyled:z,__preventFocus:!0,minDate:w,maxDate:g,locale:f,getDayProps:et,size:r.size,date:pe,onDateChange:se,getMonthControlProps:V=>({selected:typeof X=="string"?Is(V,X):!1,...H?.(V)}),getYearControlProps:V=>({selected:typeof X=="string"?L(V).isSame(X,"year"):!1,...R?.(V)}),attributes:o.attributes})})]})}),n.jsx(zn,{name:M,form:$,value:X,type:"default"})]})});Zn.classes={...Fe.classes,...zt.classes};Zn.displayName="@mantine/dates/DateInput";function Dc({minDate:e,value:t}){const s=e?L(e).format("HH:mm:ss"):null;return t&&e&&t===e?s??void 0:void 0}function _c({maxDate:e,value:t}){const s=e?L(e).format("HH:mm:ss"):null;return t&&e&&t===e?s??void 0:void 0}var Io={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const kc={dropdownType:"popover",size:"sm"},Qn=oe((e,t)=>{const s=ne("DateTimePicker",kc,e),{value:r,defaultValue:o,onChange:i,valueFormat:l,locale:a,classNames:u,styles:d,unstyled:c,timePickerProps:p,submitButtonProps:f,withSeconds:h,level:m,defaultLevel:w,size:g,variant:S,dropdownType:y,vars:v,minDate:b,maxDate:x,defaultDate:D,defaultTimeValue:M,presets:$,attributes:O,onDropdownClose:z,...A}=s,Y=ye({name:"DateTimePicker",classes:Io,props:s,classNames:u,styles:d,unstyled:c,attributes:O,vars:v}),{resolvedClassNames:B,resolvedStyles:I}=Xe({classNames:u,styles:d,props:s}),F=l||(h?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),E=P.useRef(null),H=nt(E,p?.hoursRef),{calendarProps:{allowSingleDateInRange:R,...T},others:j}=Un(A),C=ft(),[_,k]=Ut({type:"default",value:r,defaultValue:o,onChange:i,withTime:!0}),N=D||_,W=Z=>Z?L(Z).format(h?"HH:mm:ss":"HH:mm"):"",[G,ee]=P.useState(M||W(_)),[ae,re]=P.useState(m||w||"month"),[K,te]=ma(!1),X=_?L(_).locale(C.getLocale(a)).format(F):"",le=Z=>{p?.onChange?.(Z),ee(Z),Z&&k(wr(_,Z))},J=Z=>{Z&&k(wr(Js(b,x,Z),G||M||"")),E.current?.focus()},pe=Z=>{Z.key==="Enter"&&(Z.preventDefault(),te.close())};St(()=>{K||ee(W(_))},[_,K]),St(()=>{K&&re("month")},[K]);const se=y==="popover",we=()=>{const Z=Js(b,x,_);_&&_!==Z&&k(Js(b,x,_)),z?.()};return n.jsxs(Bs,{formattedValue:X,dropdownOpened:A.disabled?!1:K,dropdownHandlers:te,classNames:B,styles:I,unstyled:c,ref:t,onClear:()=>k(null),shouldClear:!!_,value:_,size:g,variant:S,dropdownType:y,...j,type:"default",__staticSelector:"DateTimePicker",onDropdownClose:we,withTime:!0,attributes:O,children:[n.jsx(Hs,{...T,maxDate:x,minDate:b,size:g,variant:S,type:"default",value:_,defaultDate:N||Pl({maxDate:x,minDate:b}),onChange:J,locale:a,classNames:B,styles:I,unstyled:c,__staticSelector:"DateTimePicker",__stopPropagation:se,level:m,defaultLevel:w,onLevelChange:Z=>{re(Z),T.onLevelChange?.(Z)},presets:$,__onPresetSelect:Z=>{k(Z),Z&&ee(W(Z))},attributes:O}),ae==="month"&&n.jsxs("div",{...Y("timeWrapper"),children:[n.jsx(Gn,{value:G,withSeconds:h,unstyled:c,min:Dc({minDate:b,value:_}),max:_c({maxDate:x,value:_}),...p,...Y("timeInput",{className:p?.className,style:p?.style}),onChange:le,onKeyDown:pe,size:g,"data-mantine-stop-propagation":se||void 0,hoursRef:H,attributes:O}),n.jsx(Ft,{variant:"default",size:`input-${g||"sm"}`,...Y("submitButton",{className:f?.className,style:f?.style}),unstyled:c,"data-mantine-stop-propagation":se||void 0,children:n.jsx(Tr,{size:"30%"}),...f,onClick:Z=>{f?.onClick?.(Z),te.close(),we()}})]})]})});Qn.classes={...Io,...Bs.classes,...Hs.classes};Qn.displayName="@mantine/dates/DateTimePicker";const Mc=e=>{const t=Cs(e.input),{inputProps:s,id:r,icon:o,format:i}=Yt(e,t);if(!e.input?.props)return null;if(e.datetime||i==="date-time"){const l=typeof e.datetime=="object"?e.datetime:{};return n.jsx(Qn,{...s,id:r,leftSection:o,defaultValue:e.input.props.defaultValue?new Date(e.input.props.defaultValue):void 0,onChange:a=>{e.input.set(a?new Date(a).toISOString():void 0)},...l})}if(e.date||i==="date"){const l=typeof e.date=="object"?e.date:{};return n.jsx(Zn,{...s,id:r,leftSection:o,defaultValue:e.input.props.defaultValue?new Date(e.input.props.defaultValue):void 0,onChange:a=>{e.input.set(a?new Date(a).toISOString().slice(0,10):void 0)},...l})}if(e.time||i==="time"){const l=typeof e.time=="object"?e.time:{};return n.jsx(Bn,{...s,id:r,leftSection:o,defaultValue:e.input.props.defaultValue,onChange:a=>{e.input.set(a.currentTarget.value)},...l})}return null},Nc=e=>{const t=Cs(e.input),{inputProps:s,id:r,icon:o}=Yt(e,t),i=P.useRef(null),[l,a]=P.useState(e.input.props.defaultValue);if(fn({"form:reset":c=>{c.id===e.input?.form.id&&i.current&&a(e.input.props.defaultValue)}},[e.input]),!e.input?.props)return null;const{type:u,...d}=e.input.props;if(e.sliderProps){const c=e.sliderProps.min??s.minimum??0,p=e.sliderProps.max??s.maximum??100;return n.jsx(Fe.Wrapper,{...s,children:n.jsx("div",{style:{height:32,padding:8},children:n.jsx(Fn,{...s,ref:i,id:r,...d,...e.sliderProps,value:l,min:c,max:p,label:()=>l,onChange:f=>{a(f),e.input.set(f)}})})})}return n.jsx(ba,{...s,ref:i,id:r,leftSection:o,...d,...e.numberInputProps,value:l??"",onChange:c=>{const p=c!==null?Number(c):void 0;a(p),e.input.set(p)}})},Lc=e=>{const{inputProps:t}=Yt(e,{});if(!e.input?.props)return null;const s=e.input.schema;if(!s?.properties)return null;const r=Object.keys(s.properties),i=12/(e.columns??1),a=e.input.items,u=()=>n.jsx(ht,{children:r.map(d=>{const c=e.controlProps?.[d]??{},p=a?.[d];return p?n.jsx(ht.Col,{span:i,children:n.jsx(gs,{input:p,...c})},d):null})});return e.variant==="plain"?u():n.jsx(js,{legend:t.label,children:n.jsxs(We,{gap:"xs",children:[t.description&&n.jsx(ve,{size:"sm",c:"dimmed",children:t.description}),u(),t.error&&n.jsx(ve,{size:"sm",c:"red",children:t.error})]})})};function Ic(e){return!e||e.trim()===""?{}:new Rc(e).parse()}class Rc{pos=0;query;constructor(t){this.query=t.trim()}parse(){return this.parseExpression()}parseExpression(){return this.parseOr()}parseOr(){const t=this.parseAnd();if(this.peek()==="|"){const s=[t];for(;this.peek()==="|";)this.consume("|"),s.push(this.parseAnd());return{or:s}}return t}parseAnd(){const t=this.parsePrimary();if(this.peek()==="&"){const s=[t];for(;this.peek()==="&";)this.consume("&"),s.push(this.parsePrimary());return{and:s}}return t}parsePrimary(){if(this.skipWhitespace(),this.peek()==="("){this.consume("(");const t=this.parseExpression();return this.consume(")"),t}return this.parseCondition()}parseCondition(){const t=this.parseFieldPath();this.skipWhitespace();const s=this.parseOperator();this.skipWhitespace();const r=this.parseValue();if(r==="")throw new Nr(`Expected value for field '${t.join(".")}'`);return this.buildCondition(t,s,r)}parseFieldPath(){const t=[];let s="";for(;this.pos<this.query.length;){const r=this.query[this.pos];if(r==="."&&s){t.push(s),s="",this.pos++;continue}if(r==="="||r==="!"||r===">"||r==="<"||r===" ")break;s+=r,this.pos++}return s&&t.push(s),t}parseOperator(){this.skipWhitespace();const t=this.query.slice(this.pos);if(t.startsWith(">="))return this.pos+=2,">=";if(t.startsWith("<="))return this.pos+=2,"<=";if(t.startsWith("!="))return this.pos+=2,"!=";const s=this.query[this.pos];if(s==="="||s===">"||s==="<")return this.pos++,s;throw new Error(`Expected operator at position ${this.pos}`)}parseValue(){if(this.skipWhitespace(),this.query.slice(this.pos,this.pos+4).toLowerCase()==="null")return this.pos+=4,null;if(this.query[this.pos]==="[")return this.parseArray();if(this.query[this.pos]==='"'||this.query[this.pos]==="'")return this.parseQuotedString();let t="";for(;this.pos<this.query.length;){const s=this.query[this.pos];if(s==="&"||s==="|"||s===")")break;t+=s,this.pos++}return this.coerceValue(t.trim())}parseArray(){this.consume("[");const t=[];for(;this.pos<this.query.length&&this.query[this.pos]!=="]";){if(this.skipWhitespace(),this.query[this.pos]==='"'||this.query[this.pos]==="'")t.push(this.parseQuotedString());else{let s="";for(;this.pos<this.query.length&&this.query[this.pos]!==","&&this.query[this.pos]!=="]";)s+=this.query[this.pos],this.pos++;t.push(this.coerceValue(s.trim()))}this.skipWhitespace(),this.query[this.pos]===","&&this.pos++}return this.consume("]"),t}parseQuotedString(){const t=this.query[this.pos];this.pos++;let s="",r=!1;for(;this.pos<this.query.length;){const o=this.query[this.pos];if(r){s+=o,r=!1,this.pos++;continue}if(o==="\\"){r=!0,this.pos++;continue}if(o===t){this.pos++;break}s+=o,this.pos++}return s}coerceValue(t){return/^-?\d+$/.test(t)?parseInt(t,10):/^-?\d+\.\d+$/.test(t)?parseFloat(t):t.toLowerCase()==="true"?!0:t.toLowerCase()==="false"?!1:t}buildCondition(t,s,r){let o;if(s==="=")if(r===null)o={isNull:!0};else if(Array.isArray(r))o={inArray:r};else if(typeof r=="string"&&r.includes("*")){const l=r.startsWith("*"),a=r.endsWith("*"),u=r.replace(/^\*|\*$/g,"");l&&a?o={contains:u}:l?o={endsWith:u}:a?o={startsWith:u}:o={eq:r}}else o={eq:r};else if(s==="!=")r===null?o={isNotNull:!0}:o={ne:r};else if(s===">")o={gt:r};else if(s===">=")o={gte:r};else if(s==="<")o={lt:r};else if(s==="<=")o={lte:r};else throw new Error(`Unsupported operator: ${s}`);if(t.length===1)return{[t[0]]:o};let i=o;for(let l=t.length-1;l>=0;l--)i={[t[l]]:i};return i}peek(){return this.skipWhitespace(),this.query[this.pos]||""}consume(t){if(this.skipWhitespace(),this.query[this.pos]!==t)throw new Error(`Expected '${t}' at position ${this.pos}, got '${this.query[this.pos]}'`);this.pos++}skipWhitespace(){for(;this.pos<this.query.length&&/\s/.test(this.query[this.pos]);)this.pos++}}class Tc{attr=ge;identityPrimaryKey=(t,s)=>ge(ge(ge(q.integer(s),Nt),Ht,t),ct);bigIdentityPrimaryKey=(t,s)=>ge(ge(ge(q.int64(s),Nt),Ht,t),ct);uuidPrimaryKey=()=>ge(ge(q.uuid(),Nt),ct);primaryKey(t,s,r){if(!t||q.schema.isInteger(t))return ge(ge(ge(q.integer(s),Nt),Ht,r),ct);if(q.schema.isString(t)&&t.format==="uuid")return ge(ge(q.uuid(),Nt),ct);if(q.schema.isNumber(t)&&t.format==="int64")return ge(ge(ge(q.number(s),Nt),Ht,r),ct);if(q.schema.isBigInt(t))return ge(ge(ge(q.bigint(s),Nt),Ht,r),ct);throw new Nr(`Unsupported type for primary key: ${t}`)}default=(t,s)=>(s!=null&&Object.assign(t,{default:s}),this.attr(t,ct));version=(t={})=>this.default(ge(q.integer(t),Jo),0);createdAt=t=>ge(ge(q.datetime(t),ea),ct);updatedAt=t=>ge(ge(q.datetime(t),ta),ct);deletedAt=t=>ge(q.optional(q.datetime(t)),sa);enum=(t,s,r)=>ge(q.enum(t,{description:s?.description,...r}),na,s);ref=(t,s,r)=>{const o=r??{onDelete:q.schema.isOptional(t)?"set null":"cascade"};return this.attr(t,ra,{ref:s,actions:o})};page=(t,s)=>oa(t,s)}const $c=new Tc,Oc=$c;function Ro(e,t=""){const s=[];if(!e||typeof e!="object")return s;const r="properties"in e?e.properties:e;if(!r||typeof r!="object")return s;for(const[o,i]of Object.entries(r)){if(typeof i!="object"||i===null)continue;const l=i,a=t?`${t}.${o}`:o,u="format"in l?l.format:void 0;let c="type"in l?l.type:"object";u==="date-time"?c="datetime":u==="date"?c="date":u==="time"?c="time":u==="duration"&&(c="duration");const p={name:o,path:a,type:c,format:u,description:"description"in l?l.description:void 0};"enum"in l&&l.enum&&(p.enum=l.enum,p.type="enum"),"type"in l&&l.type==="object"&&"properties"in l&&typeof l.properties=="object"&&(p.nested=Ro(l.properties,a)),s.push(p),p.nested&&s.push(...p.nested)}return s}const Ac={eq:{symbol:"=",label:"equals",example:"name=John"},ne:{symbol:"!=",label:"not equals",example:"status!=archived"},gt:{symbol:">",label:"greater than",example:"age>18"},gte:{symbol:">=",label:"greater or equal",example:"age>=18"},lt:{symbol:"<",label:"less than",example:"age<65"},lte:{symbol:"<=",label:"less or equal",example:"age<=65"},null:{symbol:"=null",label:"is null",example:"deletedAt=null"},notNull:{symbol:"!=null",label:"is not null",example:"email!=null"},in:{symbol:"[...]",label:"in array",example:"status=[active,pending]"}},Vc=({schema:e,value:t="",onChange:s,placeholder:r="Enter query or click for assistance...",...o})=>{const[i,l]=P.useState(!1),[a,u]=P.useState(t),d=P.useRef(null),c=e?Ro(e):[],[p,f]=P.useState(null),h=S=>{try{Ic(S.trim())}catch(y){return f(y.message),!1}return f(null),!0},m=S=>{u(S),h(S)&&s?.(S)},w=()=>{u(""),s?.(""),h("")},g=S=>{const y=a?`${a}${S} `:`${S} `;u(y),h(y)&&s?.(y),setTimeout(()=>{d.current?.focus();const v=d.current?.value.length||0;d.current?.setSelectionRange(v,v)},0)};return fn({"form:change":S=>{S.id===d.current?.form?.id&&S.path===o["data-path"]&&u(S.value??"")}},[]),n.jsxs(Pe,{width:800,position:"bottom-start",shadow:"md",opened:i,onChange:l,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:"fade-up",duration:200,timingFunction:"ease"},children:[n.jsx(Pe.Target,{children:n.jsx(Lr,{ref:d,placeholder:r,value:a,onChange:S=>m(S.currentTarget.value),onFocus:()=>l(!0),leftSection:p?n.jsx(rl,{size:16}):n.jsx(io,{size:16}),rightSection:a&&n.jsx(Ft,{size:"sm",variant:"subtle",color:"gray",onClick:w,children:n.jsx(Ir,{size:14})}),...o})}),n.jsx(Pe.Dropdown,{bg:"transparent",p:"xs",bd:`1px solid ${qe.colors.border}`,style:{backdropFilter:"blur(20px)"},children:n.jsx(Fc,{fields:c,onInsert:g})})]})};function Fc({fields:e,onInsert:t}){return n.jsxs(ut,{gap:"md",align:"flex-start",wrap:"nowrap",bg:qe.colors.surface,p:"sm",bdrs:"sm",children:[n.jsxs(We,{gap:"md",style:{flex:1},children:[n.jsxs(We,{gap:"xs",children:[n.jsx(ve,{size:"sm",fw:600,children:"Operators"}),n.jsx(We,{gap:4,children:Object.entries(Ac).map(([s,r])=>n.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"center",miw:48,onClick:()=>t(r.symbol),children:r.symbol}),n.jsx(ve,{size:"xs",c:"dimmed",style:{flex:1},children:r.label})]},s))})]}),n.jsx(nn,{}),n.jsxs(We,{gap:"xs",children:[n.jsx(ve,{size:"sm",fw:600,children:"Logic"}),n.jsxs(We,{gap:4,children:[n.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"center",miw:48,onClick:()=>t("&"),children:"&"}),n.jsx(ve,{size:"xs",c:"dimmed",children:"AND"})]}),n.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"center",miw:48,onClick:()=>t("|"),children:"|"}),n.jsx(ve,{size:"xs",c:"dimmed",children:"OR"})]})]})]})]}),e.length>0&&n.jsx(nn,{orientation:"vertical"}),e.length>0&&n.jsxs(fe,{direction:"column",gap:"xs",style:{flex:2},children:[n.jsx(ve,{size:"sm",fw:600,children:"Fields"}),n.jsx(fe,{direction:"column",gap:4,style:{maxHeight:300,overflowY:"auto"},children:e.map(s=>n.jsxs(fe,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[n.jsx(Ae,{px:"xs",size:"xs",h:24,variant:"default",justify:"end",miw:120,onClick:()=>t(s.path),children:s.path}),n.jsxs(fe,{mt:3,direction:"column",gap:2,style:{flex:1,minWidth:0},children:[n.jsx(ve,{size:"xs",c:"dimmed",lineClamp:1,children:s.description||s.type}),s.enum&&n.jsx(ut,{gap:0,wrap:"wrap",children:s.enum.map(r=>n.jsx(Ae,{px:"xs",size:"xs",h:24,onClick:()=>t(r),children:r},r))})]}),n.jsx(Rr,{size:"xs",variant:"light",style:{flexShrink:0},children:s.type})]},s.path))})]})]})}const _r=e=>{const t=Cs(e.input),{inputProps:s,id:r,icon:o}=Yt(e,t),i=e.input.schema&&"type"in e.input.schema&&e.input.schema.type==="array";let l;if(i&&"items"in e.input.schema&&e.input.schema.items){const p=e.input.schema.items;"enum"in p&&Array.isArray(p.enum)&&(l=p.enum)}const a=e.input.schema&&"enum"in e.input.schema&&Array.isArray(e.input.schema.enum)?e.input.schema.enum:[],[u,d]=P.useState([]);if(P.useEffect(()=>{e.input?.props&&(e.loader?e.loader().then(d):d(a))},[e.input,e.loader]),!e.input?.props)return null;if(e.segmented){const p=typeof e.segmented=="object"?e.segmented:{};return n.jsx(Fe.Wrapper,{...s,children:n.jsx(fe,{children:n.jsx(Sa,{disabled:s.disabled,defaultValue:String(e.input.props.defaultValue),...p,onChange:f=>{e.input.set(f)},data:u.slice(0,10)})})})}if(e.autocomplete){const p=typeof e.autocomplete=="object"?e.autocomplete:{};return n.jsx(wn,{...s,id:r,leftSection:o,data:u,...e.input.props,...p})}if(i&&!l||e.tags){const p=typeof e.tags=="object"?e.tags:{};return n.jsx(En,{...s,id:r,leftSection:o,defaultValue:Array.isArray(e.input.props.defaultValue)?e.input.props.defaultValue:[],onChange:f=>{e.input.set(f)},...p})}if(i&&l||e.multi){const p=l?.map(h=>({value:h,label:h}))||[],f=typeof e.multi=="object"?e.multi:{};return n.jsx(On,{...s,id:r,leftSection:o,data:p,defaultValue:Array.isArray(e.input.props.defaultValue)?e.input.props.defaultValue:[],onChange:h=>{e.input.set(h)},...f})}const c=typeof e.select=="object"?e.select:{};return n.jsx(Or,{...s,id:r,leftSection:o,data:u,...e.input.props,...c})},gs=e=>{const t=Cs(e.input,["error"]);if(!e.input?.props)return null;const{inputProps:s,id:r,icon:o,format:i,schema:l}=Yt(e,t),a={...e,...l.$control};if(a.query)return n.jsx(Vc,{...a.input.props,...s,schema:a.query,value:a.input.props.value,onChange:m=>{a.input.set(m)}});if(a.custom){const m=a.custom;return n.jsx(Fe.Wrapper,{...s,children:n.jsx(fe,{flex:1,mt:"calc(var(--mantine-spacing-xs) / 2)",children:n.jsx(m,{defaultValue:a.input.props.defaultValue,onChange:w=>{a.input.set(w)}})})})}const u=a.input.schema&&"type"in a.input.schema&&a.input.schema.type==="object"&&"properties"in a.input.schema;if(a.object||u){const m=typeof a.object=="object"?a.object:{};return n.jsx(Lc,{input:a.input,title:a.title,description:a.description,...m})}const d=a.input.schema&&"type"in a.input.schema&&a.input.schema.type==="array",c=d&&"items"in a.input.schema&&a.input.schema.items&&typeof a.input.schema.items=="object"&&"properties"in a.input.schema.items;if(a.array||c){const m=typeof a.array=="object"?a.array:{};return n.jsx(Cl,{input:a.input,title:a.title,description:a.description,...m})}if(a.number||a.input.schema&&"type"in a.input.schema&&(a.input.schema.type==="number"||a.input.schema.type==="integer")){const m=typeof a.number=="object"?a.number:{};return a.slider&&(m.sliderProps??={}),n.jsx(Nc,{input:a.input,title:a.title,description:a.description,icon:o,...m})}if(a.file){const m=typeof a.file=="object"?a.file:{};return n.jsx(Xa,{...s,id:r,leftSection:o,onChange:w=>{a.input.set(w)},...m})}if(a.color||i==="color"){const m=typeof a.color=="object"?a.color:{};return n.jsx(Mn,{...s,id:r,leftSection:o,...a.input.props,...m})}if(a.input.schema&&"enum"in a.input.schema&&a.input.schema.enum||d&&!c||a.select){const m=typeof a.select=="object"?a.select:{};return a.segmented&&(m.segmented??={}),n.jsx(_r,{input:a.input,title:a.title,description:a.description,icon:o,...m})}if(a.input.schema&&"type"in a.input.schema&&a.input.schema.type==="boolean"){if(a.switch){const w=typeof a.switch=="object"?a.switch:{};return n.jsx(Ca,{...s,id:r,color:"blue",defaultChecked:a.input.props.defaultValue,onChange:g=>{a.input.set(g.currentTarget.checked)},...w})}const m={loader:async()=>[{value:"true",label:"Yes"},{value:"false",label:"No"},{value:"",label:""}],...a.input.props};return n.jsx(_r,{input:a.input,title:a.title,description:a.description,icon:o,...m})}if(a.password||a.input.props.name?.includes("password")){const m=typeof a.password=="object"?a.password:{};return n.jsx(Vn,{...s,id:r,leftSection:o,...a.input.props,...m})}if(a.area){const m=typeof a.area=="object"?a.area:{};return n.jsx(ja,{...s,id:r,leftSection:o,...a.input.props,...m})}if(a.date||a.datetime||a.time||i==="date"||i==="date-time"||i==="time")return n.jsx(Mc,{input:a.input,title:a.title,description:a.description,icon:o,date:a.date,datetime:a.datetime,time:a.time});const f=typeof a.text=="object"?a.text:{},h=()=>{switch(i){case"email":return"email";case"url":case"uri":return"url";case"tel":case"phone":return"tel";default:return}};return n.jsx(Lr,{...s,id:r,leftSection:o,type:h(),...a.input.props,...f,inputWrapperOrder:["label","input","description","error"]})},Ec=e=>{const{form:t,columns:s=3,children:r,controlProps:o,fieldControlProps:i,skipFormElement:l=!1,skipSubmitButton:a=!1,submitButtonProps:u,fill:d=!0}=e,c=e.schema||t.options.schema;if(!c?.properties)return null;const f=Object.keys(c.properties),h=typeof s=="number"?{xs:12,sm:6,lg:12/s}:{base:s.base?12/s.base:void 0,xs:s.xs?12/s.xs:12,sm:s.sm?12/s.sm:6,md:s.md?12/s.md:void 0,lg:s.lg?12/s.lg:4,xl:s.xl?12/s.xl:void 0},m=()=>r?n.jsx(n.Fragment,{children:r(t.input)}):n.jsx(ht,{children:f.map(g=>{const S=t.input[g],y=c.properties[g];if(!S||!y)return null;const v=y&&"type"in y&&y.type==="object",b=y&&"type"in y&&y.type==="array"&&"items"in y&&y.items&&"properties"in y.items,x=v||b?12:h,D={...o,...i?.[g]};return n.jsx(ht.Col,{span:x,children:n.jsx(gs,{input:S,...D})},g)})}),w=n.jsxs(fe,{direction:"column",gap:"sm",flex:d?1:void 0,...e.flexProps,children:[n.jsx(fe,{direction:"column",gap:"sm",flex:1,children:m()}),!a&&n.jsx(Ss,{w:"100%",withBorder:!0,children:n.jsxs(fe,{gap:"sm",flex:1,children:[n.jsx(fe,{}),n.jsx(fe,{flex:1}),n.jsxs(fe,{gap:"sm",children:[n.jsx(Ae,{variant:"subtle",type:"reset",children:"Reset"}),n.jsx(Ae,{intent:"primary",form:t,...u,children:u?.children??"Submit"})]})]})})]});return l?w:n.jsx(fe,{component:"form",flex:d?1:void 0,...t.props,...e.flexProps,children:w})},Yc=({schema:e,form:t,typeFormProps:s,filterVisibility:r})=>{const o=P.useMemo(()=>{const i=Object.keys(e.properties).filter(a=>r[a]!==!1);if(i.length===0)return null;const l=i.reduce((a,u)=>(a[u]=e.properties[u],a),{});return q.object(l)},[e,r]);return o?n.jsx(fe,{w:"100%",p:"xs",bg:qe.colors.surface,style:{borderBottom:"1px solid var(--alepha-border)"},children:n.jsx(Ec,{...s,skipSubmitButton:!0,fill:!0,form:t,schema:o})}):null},zc=({page:e,size:t,totalPages:s,onPageChange:r,onSizeChange:o})=>n.jsxs(fe,{align:"center",justify:"end",gap:"md",p:"xs",style:{borderTop:"1px solid var(--alepha-border)"},children:[n.jsx(fe,{children:n.jsx(Or,{w:96,variant:"default",value:t,onChange:i=>{i&&o(Number(i))},data:[{value:"5",label:"5"},{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"},{value:"100",label:"100"}]})}),n.jsx(fe,{children:n.jsx(at,{withEdges:!0,total:s,value:e,onChange:r})})]}),Bc=({columns:e,visibility:t,onVisibilityChange:s})=>{const[r,o]=P.useState(!1),i=Object.entries(e),l=()=>{const c=i.reduce((p,[f])=>({...p,[f]:!0}),{});s(c)},a=()=>{const c=i.reduce((p,[f])=>({...p,[f]:!1}),{});s(c)},u=(c,p)=>{s({...t,[c]:p})},d=i.filter(([c])=>t[c]!==!1).length;return n.jsxs(Pe,{width:280,position:"bottom-start",shadow:"md",opened:r,onChange:o,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:"fade-up",duration:200,timingFunction:"ease"},children:[n.jsx(Pe.Target,{children:n.jsx(Ae,{variant:"subtle",icon:Ui})}),n.jsx(Pe.Dropdown,{bg:"transparent",p:"xs",bd:`1px solid ${qe.colors.border}`,style:{backdropFilter:"blur(20px)"},children:n.jsxs(We,{gap:"xs",bg:qe.colors.surface,p:"sm",bdrs:"sm",children:[n.jsxs(ut,{justify:"space-between",children:[n.jsxs(ve,{size:"sm",fw:500,children:["Columns (",d,"/",i.length,")"]}),n.jsxs(ut,{gap:4,children:[n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:l,children:"All"}),n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:a,children:"None"})]})]}),n.jsx(Kt.Autosize,{mah:300,children:n.jsx(We,{gap:4,children:i.map(([c,p])=>n.jsx(hs,{label:p.label,checked:t[c]!==!1,onChange:f=>u(c,f.currentTarget.checked),size:"sm"},c))})})]})})]})},Hc=(e,t)=>{const s=e.properties[t];return s&&typeof s=="object"&&"title"in s&&s.title?s.title:t.replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim()},Wc=({schema:e,visibility:t,onVisibilityChange:s})=>{const[r,o]=P.useState(!1),i=Object.keys(e.properties),l=()=>{const c=i.reduce((p,f)=>({...p,[f]:!0}),{});s(c)},a=()=>{const c=i.reduce((p,f)=>({...p,[f]:!1}),{});s(c)},u=(c,p)=>{s({...t,[c]:p})},d=i.filter(c=>t[c]!==!1).length;return n.jsxs(Pe,{width:280,position:"bottom-start",shadow:"md",opened:r,onChange:o,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:"fade-up",duration:200,timingFunction:"ease"},children:[n.jsx(Pe.Target,{children:n.jsx(Ae,{variant:"subtle",icon:io})}),n.jsx(Pe.Dropdown,{bg:"transparent",p:"xs",bd:`1px solid ${qe.colors.border}`,style:{backdropFilter:"blur(20px)"},children:n.jsxs(We,{gap:"xs",bg:qe.colors.surface,p:"sm",bdrs:"sm",children:[n.jsxs(ut,{justify:"space-between",children:[n.jsxs(ve,{size:"sm",fw:500,children:["Filters (",d,"/",i.length,")"]}),n.jsxs(ut,{gap:4,children:[n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:l,children:"All"}),n.jsx(ms,{size:"compact-xs",variant:"subtle",onClick:a,children:"None"})]})]}),n.jsx(Kt.Autosize,{mah:300,children:n.jsx(We,{gap:4,children:i.map(c=>n.jsx(hs,{label:Hc(e,c),checked:t[c]!==!1,onChange:p=>u(c,p.currentTarget.checked),size:"sm"},c))})})]})})]})},Gc=({columns:e,filters:t,columnVisibility:s,filterVisibility:r,onColumnVisibilityChange:o,onFilterVisibilityChange:i,actions:l,onRefresh:a,selectedItems:u=[],checkboxActions:d,onClearSelection:c})=>{const p=u.length>0,f=async h=>{const m={selectedItems:u,clearSelection:c||(()=>{})};await h.onClick(m)};return n.jsxs(fe,{p:"xs",style:{borderBottom:"1px solid var(--alepha-border)"},children:[n.jsxs(fe,{gap:4,align:"center",children:[t&&n.jsx(Wc,{schema:t,visibility:r,onVisibilityChange:i}),n.jsx(Bc,{columns:e,visibility:s,onVisibilityChange:o}),p&&n.jsxs(n.Fragment,{children:[n.jsx(nn,{orientation:"vertical",mx:"xs"}),n.jsxs(Rr,{variant:"light",size:"lg",children:[u.length," selected"]}),n.jsx(Ae,{variant:"subtle",size:"compact-sm",icon:Ir,onClick:c,children:"Clear"}),d?.map((h,m)=>n.jsx(Ae,{variant:"light",size:"compact-sm",intent:h.intent,icon:h.icon&&aa(h.icon)?h.icon:void 0,onClick:()=>f(h),children:h.label},m))]})]}),n.jsx(fe,{flex:1}),n.jsxs(fe,{gap:"xs",children:[l?.map((h,m)=>P.isValidElement(h)?h:n.jsx(Ae,{...h,children:h.label},m)),n.jsx(Ae,{icon:wa,onClick:a,children:"Refresh"})]})]})},qc=10,To=(e,t)=>{if(!e)return null;const s=e.split(",").map(r=>r.trim());for(const r of s){if(r===t)return"asc";if(r===`-${t}`)return"desc"}return null},Kc=(e,t)=>{const s=To(e,t),r=(e||"").split(",").map(o=>o.trim()).filter(o=>o&&o!==t&&o!==`-${t}`);return s===null?r.unshift(t):s==="asc"&&r.unshift(`-${t}`),r.length>0?r.join(","):void 0},Uc=e=>{const[t,s]=P.useState(typeof e.items=="function"?{content:[]}:e.items),r=e.infinityScroll?100:e.defaultSize||10,[o,i]=P.useState(1),[l,a]=P.useState(String(r)),[u,d]=P.useState(0),c=sn(kr),[p,f]=P.useState(()=>{if(e.defaultColumnVisibility)return e.defaultColumnVisibility;const j=Object.keys(e.columns),C=e.defaultVisibleColumnCount??qc;return j.reduce((_,k,N)=>({..._,[k]:N<C}),{})}),[h,m]=P.useState(()=>e.defaultFilterVisibility?e.defaultFilterVisibility:e.filters?.properties?Object.keys(e.filters.properties).reduce((j,C)=>({...j,[C]:!0}),{}):{}),w=j=>{f(j),e.onColumnVisibilityChange?.(j)},g=j=>{m(j),e.onFilterVisibilityChange?.(j)},S=P.useMemo(()=>Object.entries(e.columns).filter(([j])=>p[j]!==!1),[e.columns,p]),[y,v]=P.useState(void 0),b=(j,C)=>{const k=Kc(y,C||j);v(k),I.input.sort.set(k),I.input.page.set(0)},[x,D]=P.useState(new Set),M=P.useCallback(j=>e.getItemKey?e.getItemKey(j):JSON.stringify(j),[e.getItemKey]),$=P.useMemo(()=>e.withCheckbox?t.content.filter(j=>x.has(M(j))):[],[t.content,x,M,e.withCheckbox]),O=P.useMemo(()=>t.content.length===0?!1:t.content.every(j=>x.has(M(j))),[t.content,x,M]),z=P.useMemo(()=>{if(t.content.length===0)return!1;const j=t.content.filter(C=>x.has(M(C))).length;return j>0&&j<t.content.length},[t.content,x,M]),A=P.useCallback(j=>{const C=M(j);D(_=>{const k=new Set(_);return k.has(C)?k.delete(C):k.add(C),k})},[M]),Y=P.useCallback(()=>{D(O?j=>{const C=new Set(j);for(const _ of t.content)C.delete(M(_));return C}:j=>{const C=new Set(j);for(const _ of t.content)C.add(M(_));return C})},[O,t.content,M]),B=P.useCallback(()=>{D(new Set)},[]),I=Da({schema:q.object({...e.filters?e.filters.properties:{},page:q.number({default:0}),size:q.number({default:r}),sort:q.optional(q.string())}),handler:async j=>{if(typeof e.items=="function"){const C=await e.items(j,{items:t.content});e.infinityScroll&&j.page>0?s(_=>({...C,content:[..._.content,...C.content]})):s(C),d(j.page)}},onReset:async()=>{i(1),a("10"),await I.submit()},onChange:async(j,C)=>{if(j==="page"){i(C+1),await I.submit();return}if(j==="size"){a(String(C)),I.input.page.set(0);return}e.onFilterChange?.(j,C,I)}},[t]);ia(()=>I.submit(),{delay:800});const F=sn(la);P.useEffect(()=>{if(e.submitOnInit&&I.submit(),e.submitEvery){const j=F.createInterval(()=>{I.submit()},e.submitEvery);return()=>F.clearInterval(j)}},[]),P.useEffect(()=>{typeof e.items!="function"&&s(e.items)},[e.items]),P.useEffect(()=>{if(!e.infinityScroll||typeof e.items!="function")return;const j=()=>{if(I.submitting)return;const C=window.scrollY,_=window.innerHeight,k=document.documentElement.scrollHeight;if(C+_>=k-300){const W=t.page?.totalPages??1;u+1<W&&I.input.page.set(u+1)}};return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[e.infinityScroll,I.submitting,t.page?.totalPages,u,I]);const E=e.withCheckbox?n.jsx(mt.Th,{style:{width:40},children:n.jsx(hs,{checked:O,indeterminate:z,onChange:Y,"aria-label":"Select all"})}):null,H=S.map(([j,C])=>{const _=C.sortKey||j,k=C.sortable?To(y,_):null,N=n.jsxs(fe,{align:"center",gap:4,children:[n.jsx(ve,{size:"xs",children:C.label}),C.sortable&&n.jsxs(fe,{c:"dimmed",children:[k==="asc"&&n.jsx(ya,{size:qe.sizes.icon.sm}),k==="desc"&&n.jsx(va,{size:qe.sizes.icon.sm}),k===null&&n.jsx(zi,{size:qe.sizes.icon.sm})]})]});return n.jsx(mt.Th,{style:{...C.fit?{}:{},...C.sortable?{cursor:"pointer"}:{}},children:C.sortable?n.jsx(ot,{onClick:()=>b(j,C.sortKey),children:N}):N},j)}),R=t.content.map((j,C)=>{const _=e.tableTrProps?e.tableTrProps(j):{},k=M(j),N=x.has(k);return n.jsxs(mt.Tr,{..._,children:[e.withCheckbox&&n.jsx(mt.Td,{style:{width:40},children:n.jsx(hs,{checked:N,onChange:()=>A(j),"aria-label":"Select row"})}),S.map(([W,G])=>n.jsx(mt.Td,{children:G.value(j,{index:C,form:I,alepha:c})},W))]},k)}),T=P.useMemo(()=>e.filters?q.omit(I.options.schema,["page","size","sort"]):null,[e.filters,I.options.schema]);return n.jsxs(fe,{flex:1,p:0,bg:"var(--alepha-elevated)",bdrs:"sm",bd:"1px solid var(--alepha-border)",direction:"column",children:[n.jsx(Gc,{columns:e.columns,filters:e.filters,columnVisibility:p,filterVisibility:h,onColumnVisibilityChange:w,onFilterVisibilityChange:g,actions:e.actions,onRefresh:()=>I.submit(),selectedItems:$,checkboxActions:e.checkboxActions,onClearSelection:B}),T&&e.filters&&n.jsx(Yc,{schema:T,form:I,typeFormProps:e.typeFormProps,filterVisibility:h}),n.jsx(fe,{className:"overflow-auto",children:n.jsxs(mt,{withColumnBorders:!0,withRowBorders:!0,...e.tableProps,children:[n.jsx(mt.Thead,{children:n.jsxs(mt.Tr,{children:[E,H]})}),n.jsx(mt.Tbody,{children:R})]})}),!e.infinityScroll&&n.jsx(zc,{page:o,size:l,totalPages:t.page?.totalPages??1,onPageChange:j=>{I.input.page.set(j-1)},onSizeChange:j=>{I.input.size.set(j)}})]})},Zc=ca({name:"logs",schema:q.object({id:Oc.primaryKey(),level:q.enum(["TRACE","DEBUG","INFO","WARN","ERROR"]),message:q.text({size:"rich"}),service:q.text(),module:q.text(),context:q.optional(q.text()),app:q.optional(q.text()),data:q.optional(q.json()),timestamp:q.integer()})}),fu=()=>{const e=sn(ua),{l:t}=ha(),s=o=>{switch(o.toLowerCase()){case"error":return n.jsx(ve,{ff:"monospace",c:"red",children:o.slice(0,5)});case"warn":return n.jsx(ve,{ff:"monospace",c:"orange",children:o.slice(0,5)});case"info":return n.jsx(ve,{ff:"monospace",c:"green",children:o.slice(0,5)});case"debug":return n.jsx(ve,{ff:"monospace",c:"grape",children:o.slice(0,5)});case"trace":return n.jsx(ve,{ff:"monospace",c:"dimmed",children:o.slice(0,5)});default:return n.jsx(ve,{children:o})}},r=q.object({search:q.optional(q.string({$control:{query:q.omit(Zc.schema,["id"])}})),level:q.optional(q.array(q.enum(["TRACE","DEBUG","INFO","WARN","ERROR"],{$control:{}})))});return n.jsx(Uc,{submitOnInit:!0,infinityScroll:!0,submitEvery:[10,"seconds"],defaultSize:20,typeFormProps:{skipSubmitButton:!0,columns:2},tableProps:{horizontalSpacing:"xs",verticalSpacing:0},onFilterChange:(o,i,l)=>{if(o==="search"||o==="level")return l.submit()},filters:r,tableTrProps:o=>o.level.toLowerCase()==="error"?{bg:"rgba(255,0,0,0.1)"}:o.level.toLowerCase()==="warn"?{bg:"rgba(255,153,0,0.1)"}:{},items:async(o,i)=>{if(o.search&&(o.search=o.search.replace("now()",new Date().toISOString())),o.page&&o.page>0){const u=`timestamp < ${i.items[0].timestamp}`;o.search?o.search+=`& ${u}`:o.search=u}if(o.level){const u=o.level.map(d=>`level = ${d}`).join(" | ");o.search?o.search+=`& (${u})`:o.search=u}const l=new URLSearchParams(o).toString();return(await e.fetch(`/devtools/api/logs?${l}`,{schema:{response:q.page(pa)}})).data},columns:{timestamp:{label:"timestamp",value:(o,{form:i})=>n.jsx(Ae,{intent:"none",variant:"transparent",h:20,size:"xs",tooltip:t(o.timestamp,{date:"DD MMM YYYY HH:mm:ss.SSS"}),onClick:()=>{const l=Jn(o.timestamp).subtract(1,"minute"),a=Jn(o.timestamp).add(1,"minute");i.input.search.set(`timestamp >= ${l.toISOString()} & timestamp <= ${a.toISOString()}`)},children:t(o.timestamp,{date:"HH:mm:ss.SSS"})})},level:{label:"level",value:o=>s(o.level)},app:{label:"app",value:o=>o.app},context:{fit:!0,label:"context",value:(o,{form:i})=>o.context&&n.jsx(Ae,{intent:"none",variant:"transparent",h:20,size:"xs",onClick:()=>{i.input.search.set(`context = ${o.context}`)},children:n.jsx(ve,{ff:"monospace",size:"xs",children:o.context.replaceAll("-","").slice(0,10)})})},service:{fit:!0,label:"service",value:o=>n.jsxs(fe,{align:"center",justify:"end",children:[o.module&&n.jsxs(ve,{c:"dimmed",size:"xs",children:[o.module,"."]}),n.jsx(ve,{size:"sm",children:o.service})]})},message:{label:"message",value:o=>o.data?.ms&&o.data.status?`${o.message} - ${o.data.status} [${o.data.ms}ms]`:o.data?.path&&o.data.method?`${o.message} - ${o.data.method} ${o.data.path}`:o.message},data:{label:"more",value:(o,{alepha:i})=>{if(o.data&&Object.keys(o.data).length!==0)return n.jsx(Ae,{opacity:.5,h:20,px:4,size:"xs",fw:"bold",onClick:()=>i.inject(da).json(o.data),children:"{ ... }"})}}}})};export{fu as default};
|