react-beauty-calendar 1.0.8 → 1.1.0

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.
@@ -1,108 +1,108 @@
1
- "use strict";require('./assets/main.css');var Vu=Object.defineProperty;var Yu=(e,t,n)=>t in e?Vu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var st=(e,t,n)=>Yu(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),R=require("react"),Ge=require("react-dom");function ma(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=ma(R),xr=ma(Ge);class nn extends ReferenceError{constructor(t="Reference error"){super(t),this.name="ReferenceErrorCustom"}}const Uu=R.createContext(null),Us=e=>{let t;const n=new Set,r=(l,d)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const b=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(y=>y(t,b))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},Sr=e=>e?Us(e):Us,Ku=e=>e;function Uo(e,t=Ku){const n=R.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return R.useDebugValue(n),n}const Ks=e=>{const t=Sr(e),n=r=>Uo(t,r);return Object.assign(n,t),n},Ko=e=>e?Ks(e):Ks,va={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},Gu=e=>Sr(t=>({...va,...e,clearDraggingBookings:()=>t(n=>({...n,draggingBooking:null})),changeNewBookingStateModal:()=>t({bookingModalState:!0}),openNewBookingModal:(n,r)=>{n&&t({selectedDate:n}),r&&t({selectedHour:r})},setIsBookingLoading:()=>t({isBookingLoading:!0}),setSelectedDate:n=>t(r=>({...r,selectedDate:n})),setSelectedHour:n=>t(r=>({...r,selectedHour:n})),setCardRef:(n,r)=>t(o=>({...o,cardsRef:o.cardsRef.set(n,r)}))})),qu=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Gu(t)),p.jsx(Uu,{value:n.current,children:e})},ya=R.createContext(void 0),Xu=({children:e,...t})=>p.jsx(ya,{value:{...t},children:e}),ba=R.createContext(null),ne={DAY:"day",WEEK:"week",TABLE:"table",MONTH:"month"},It=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],wa={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},Zu=e=>Sr((t,n)=>({...e,...wa,updateMonthMessage:r=>{t(o=>({...o,...r}))},updateHeaderDateLabel:r=>{n().updateMonthMessage({month:r.getMonth(),fullYear:r.getFullYear(),monthMessage:It[r.getMonth()]})}})),Ju=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Zu(t)),p.jsx(ba,{value:n.current,children:e})},ar=e=>{const t=new Date(e.key),n=t.getDate().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0");return`${`${t.getFullYear()}-${r}-${n}`};${e.time}`},Ht=Ko((e,t)=>({emptySlotNodes:new Map,selectedNode:"",setEmptySlotNode:(n,r)=>{e(o=>{const s=new Map(o.emptySlotNodes);s.size>447&&s.clear();const c=ar(r);return s.set(c,n),{...o,emptySlotNodes:s}})},setSelectedNode:n=>{const r=new Map(t().emptySlotNodes),o=t().selectedNode;e(s=>{if(o.length){const i=r.get(o);i&&i.closeEvent()}return{...s,selectedNode:n}})},resetNodes:()=>{e(n=>{const r=new Map(n.emptySlotNodes);return r.clear(),{...n,emptySlotNodes:r}})},resetSelectedNode:()=>e(n=>({...n,selectedNode:""}))})),xa=6e4,Gs=Symbol.for("constructDateFrom");function Qu(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Gs in e?e[Gs](t):e instanceof Date?new e.constructor(t):new Date(t)}function So(e,t){return Qu(e,e)}function ed(e,t,n){const r=So(e);return r.setTime(r.getTime()+t*xa),r}function td(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function nd(e,t){return+So(e)-+So(t)}function rd(e,t,n){const r=nd(e,t)/xa;return td(n==null?void 0:n.roundingMethod)(r)}function od(e,t,n){return ed(e,-t)}function sd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function id(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var nr={exports:{}},ad=nr.exports,qs;function cd(){return qs||(qs=1,function(e,t){(function(n,r){e.exports=r()})(ad,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",d="week",u="month",b="quarter",y="year",C="date",h="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var z=["th","st","nd","rd"],P=I%100;return"["+I+(z[(P-20)%10]||z[P]||z[0])+"]"}},v=function(I,z,P){var j=String(I);return!j||j.length>=z?I:""+Array(z+1-j.length).join(P)+I},E={s:v,z:function(I){var z=-I.utcOffset(),P=Math.abs(z),j=Math.floor(P/60),M=P%60;return(z<=0?"+":"-")+v(j,2,"0")+":"+v(M,2,"0")},m:function I(z,P){if(z.date()<P.date())return-I(P,z);var j=12*(P.year()-z.year())+(P.month()-z.month()),M=z.clone().add(j,u),A=P-M<0,O=z.clone().add(j+(A?-1:1),u);return+(-(j+(P-M)/(A?M-O:O-M))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:u,y,w:d,d:l,D:C,h:c,m:a,s:i,ms:s,Q:b}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},g="en",T={};T[g]=f;var x="$isDayjsObject",D=function(I){return I instanceof B||!(!I||!I[x])},k=function I(z,P,j){var M;if(!z)return g;if(typeof z=="string"){var A=z.toLowerCase();T[A]&&(M=A),P&&(T[A]=P,M=A);var O=z.split("-");if(!M&&O.length>1)return I(O[0])}else{var $=z.name;T[$]=z,M=$}return!j&&M&&(g=M),M||!j&&g},_=function(I,z){if(D(I))return I.clone();var P=typeof z=="object"?z:{};return P.date=I,P.args=arguments,new B(P)},N=E;N.l=k,N.i=D,N.w=function(I,z){return _(I,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var B=function(){function I(P){this.$L=k(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[x]=!0}var z=I.prototype;return z.parse=function(P){this.$d=function(j){var M=j.date,A=j.utc;if(M===null)return new Date(NaN);if(N.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var O=M.match(w);if(O){var $=O[2]-1||0,Y=(O[7]||"0").substring(0,3);return A?new Date(Date.UTC(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,Y)):new Date(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,Y)}}return new Date(M)}(P),this.init()},z.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},z.$utils=function(){return N},z.isValid=function(){return this.$d.toString()!==h},z.isSame=function(P,j){var M=_(P);return this.startOf(j)<=M&&M<=this.endOf(j)},z.isAfter=function(P,j){return _(P)<this.startOf(j)},z.isBefore=function(P,j){return this.endOf(j)<_(P)},z.$g=function(P,j,M){return N.u(P)?this[j]:this.set(M,P)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(P,j){var M=this,A=!!N.u(j)||j,O=N.p(P),$=function(K,L){var X=N.w(M.$u?Date.UTC(M.$y,L,K):new Date(M.$y,L,K),M);return A?X:X.endOf(l)},Y=function(K,L){return N.w(M.toDate()[K].apply(M.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(L)),M)},V=this.$W,H=this.$M,Z=this.$D,G="set"+(this.$u?"UTC":"");switch(O){case y:return A?$(1,0):$(31,11);case u:return A?$(1,H):$(0,H+1);case d:var W=this.$locale().weekStart||0,q=(V<W?V+7:V)-W;return $(A?Z-q:Z+(6-q),H);case l:case C:return Y(G+"Hours",0);case c:return Y(G+"Minutes",1);case a:return Y(G+"Seconds",2);case i:return Y(G+"Milliseconds",3);default:return this.clone()}},z.endOf=function(P){return this.startOf(P,!1)},z.$set=function(P,j){var M,A=N.p(P),O="set"+(this.$u?"UTC":""),$=(M={},M[l]=O+"Date",M[C]=O+"Date",M[u]=O+"Month",M[y]=O+"FullYear",M[c]=O+"Hours",M[a]=O+"Minutes",M[i]=O+"Seconds",M[s]=O+"Milliseconds",M)[A],Y=A===l?this.$D+(j-this.$W):j;if(A===u||A===y){var V=this.clone().set(C,1);V.$d[$](Y),V.init(),this.$d=V.set(C,Math.min(this.$D,V.daysInMonth())).$d}else $&&this.$d[$](Y);return this.init(),this},z.set=function(P,j){return this.clone().$set(P,j)},z.get=function(P){return this[N.p(P)]()},z.add=function(P,j){var M,A=this;P=Number(P);var O=N.p(j),$=function(H){var Z=_(A);return N.w(Z.date(Z.date()+Math.round(H*P)),A)};if(O===u)return this.set(u,this.$M+P);if(O===y)return this.set(y,this.$y+P);if(O===l)return $(1);if(O===d)return $(7);var Y=(M={},M[a]=r,M[c]=o,M[i]=n,M)[O]||1,V=this.$d.getTime()+P*Y;return N.w(V,this)},z.subtract=function(P,j){return this.add(-1*P,j)},z.format=function(P){var j=this,M=this.$locale();if(!this.isValid())return M.invalidDate||h;var A=P||"YYYY-MM-DDTHH:mm:ssZ",O=N.z(this),$=this.$H,Y=this.$m,V=this.$M,H=M.weekdays,Z=M.months,G=M.meridiem,W=function(L,X,F,oe){return L&&(L[X]||L(j,A))||F[X].slice(0,oe)},q=function(L){return N.s($%12||12,L,"0")},K=G||function(L,X,F){var oe=L<12?"AM":"PM";return F?oe.toLowerCase():oe};return A.replace(m,function(L,X){return X||function(F){switch(F){case"YY":return String(j.$y).slice(-2);case"YYYY":return N.s(j.$y,4,"0");case"M":return V+1;case"MM":return N.s(V+1,2,"0");case"MMM":return W(M.monthsShort,V,Z,3);case"MMMM":return W(Z,V);case"D":return j.$D;case"DD":return N.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return W(M.weekdaysMin,j.$W,H,2);case"ddd":return W(M.weekdaysShort,j.$W,H,3);case"dddd":return H[j.$W];case"H":return String($);case"HH":return N.s($,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return K($,Y,!0);case"A":return K($,Y,!1);case"m":return String(Y);case"mm":return N.s(Y,2,"0");case"s":return String(j.$s);case"ss":return N.s(j.$s,2,"0");case"SSS":return N.s(j.$ms,3,"0");case"Z":return O}return null}(L)||O.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(P,j,M){var A,O=this,$=N.p(j),Y=_(P),V=(Y.utcOffset()-this.utcOffset())*r,H=this-Y,Z=function(){return N.m(O,Y)};switch($){case y:A=Z()/12;break;case u:A=Z();break;case b:A=Z()/3;break;case d:A=(H-V)/6048e5;break;case l:A=(H-V)/864e5;break;case c:A=H/o;break;case a:A=H/r;break;case i:A=H/n;break;default:A=H}return M?A:N.a(A)},z.daysInMonth=function(){return this.endOf(u).$D},z.$locale=function(){return T[this.$L]},z.locale=function(P,j){if(!P)return this.$L;var M=this.clone(),A=k(P,j,!0);return A&&(M.$L=A),M},z.clone=function(){return N.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},I}(),U=B.prototype;return _.prototype=U,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",y],["$D",C]].forEach(function(I){U[I[1]]=function(z){return this.$g(z,I[0],I[1])}}),_.extend=function(I,z){return I.$i||(I(z,B,_),I.$i=!0),_},_.locale=k,_.isDayjs=D,_.unix=function(I){return _(1e3*I)},_.en=T[g],_.Ls=T,_.p={},_})}(nr)),nr.exports}var ld=cd();const Xs=sd(ld),Co=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ud=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],te={findIndexToStart(e=new Date){const t=Co[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return Co.indexOf(e)},generateWeekDays(e){const t=this.findIndexToStart(e);return{week:new Array(7).fill(0).map((o,s)=>{const i=e||new Date,a=s-t;return new Date(i.getFullYear(),i.getMonth(),i.getDate()+a)})}},generateDays(e,t){const n=[],r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t);return n.push(r),n},addDay(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},formatDate(e){return e.split(" ").slice(2,3).join(",").replace(","," | ")},dateTimeAsString(e){const t=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0");return`${t}:${n}`},minuteDifference(e,t){return rd(e,t)},dateAndHourDateToString(e){const t=new Date(e);return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`},shortMonthDescription(...e){return`${It[e[0].getMonth()].slice(0,3)} - ${It[e[1].getMonth()].slice(0,3)}`},timeDiffInSeconds(e,t){const n=Xs(e),r=Xs(t);return n.diff(r)/6e4},subtractMinutes(e,t){return od(e,t)},addMinuteToHour(e,t){return`${e.split(":")[0]}:${t}`},dateToString(e){return new Date(e).toTimeString()},dateToStringSelected(e){return new Date(e).toDateString()},roundMinutes(e){return e>=15&&e<30?15:e>=30&&e<45?30:e>=45&&e<60?45:0},hourMinutesStringToDate(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r)),t},addMinutesToDate(e,t){const n=new Date(e);return n.setHours(n.getHours(),n.getMinutes()+t,n.getMinutes()),n},newDateKey(e,t){const n=new Date(e);return n.setHours(Number(t.split(":")[0])),n.setMinutes(Number(t.split(":")[1])),n.toISOString()},addMinutesToHour(e,t){const n=te.hourMinutesStringToDate(e),r=te.addMinutesToDate(n,t);return te.dateAndHourDateToString(r)},convertStringTimeToDateFormat(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r),0,0),t},isTodayDate(e){const t=new Date,n=e.getDate()===t.getDate(),r=e.getMonth()===t.getMonth(),o=e.getFullYear()===t.getFullYear();return n&&r&&o},firstAndLastWeekDays(e){return{firstDayOfWeek:e[0],lastDayOfWeek:e[e.length-1]}},generateWeekMonthLabel(e){const{firstDayOfWeek:t,lastDayOfWeek:n}=te.firstAndLastWeekDays(e),r=t.getMonth();return r!==n.getMonth()?te.shortMonthDescription(t,n):It[r]}},Eo={date:"",startAt:"",finishAt:""},dd=e=>Sr((t,n)=>({...Eo,...e,updateForm:r=>t(o=>({...o,...r})),updateDynamicForm:(r,o)=>t(s=>({...s,[r]:o})),updateStartAt:r=>t(o=>({...o,startAt:r})),updateFinishAt:r=>t(o=>({...o,finishAt:r})),updateFinishAtWithOffset:(r,o=15)=>{const s=te.addMinutesToHour(r,o);return n().updateFinishAt(s),s},updateClient:(r,o)=>t(s=>({...s,client:{id:r,name:o}})),updateDate:r=>t(o=>({...o,date:r})),resetForm:()=>t(Eo)})),Sa=R.createContext(null),fd=({children:e,ref:t,...n})=>{const r=R.useRef(null);r.current||(r.current=dd(n));const o=s=>{var i;(i=r.current)==null||i.getState().updateFinishAt(s)};return R.useImperativeHandle(t,()=>({updateFinishAt:o})),p.jsx(Sa,{value:r.current,children:e})},pd=(e,t)=>({users:[],bookingViewType:"week",bookingBulkData:{user:{id:"",profile:{id:"",name:""}},booking:[]},updateUsers:n=>e(r=>({...r,users:n})),setBookingBulkData:n=>e(r=>({...r,bookingBulkData:{...n}})),updatingBookingBulkData:(n,r)=>{e(o=>{const s=o.bookingBulkData.booking.map(i=>new Date(i.startAt).getDate()===r&&n.id===i.id?n:i);return{...o,bookingBulkData:{...o.bookingBulkData,booking:s}}})},resetBookingResponse:()=>e(n=>({...n,bookingResponse:null})),setBookingViewType:n=>e(r=>({...r,bookingViewType:n})),optimisticCardUpdate:(n,r,o,s)=>{const i={...n,startAt:r,finishAt:o},a=new Date(s.day).getDate();t().updatingBookingBulkData(i,a)}}),hd=(e,t,n)=>{const r=[],o=new Date(`1970/01/01 ${e}`),s=new Date(`1970/01/01 ${t}`);for(;o<s;){const i=te.dateTimeAsString(o);o.setMinutes(o.getMinutes()+n),r.push(i)}return r},gd="08:00",md="23:30",vd=60,yd=te.generateWeekDays(),bd=(e,t)=>({hours:hd(gd,md,vd),daysOfWeek:yd.week,timesRendered:new Map,setTodayDay:n=>{const r=te.generateDays(n,0);return e(o=>({...o,daysOfWeek:r,lastDayOfWeek:r[0]||new Date})),r[0]},todayWeek:n=>{let r=[];return e(o=>{const{week:s}=te.generateWeekDays(n);return r=s,{...o,daysOfWeek:s}}),r},nextWeek:()=>{const n=te.addDay(t().getWeek().lastDayOfWeek,1);let r=[];const{week:o}=te.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},previousWeek:()=>{const n=te.addDay(t().getWeek().firstDayOfWeek,-1);let r=[];const{week:o}=te.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},setDays:n=>{const r=t().daysOfWeek[0];if(!r)return[];const o=te.generateDays(r,n);return e(s=>({...s,daysOfWeek:o})),o},getWeek:()=>{const n=t().daysOfWeek[0],r=t().daysOfWeek[t().daysOfWeek.length-1];return{firstDayOfWeek:n,lastDayOfWeek:r}},addTimesRendered:(n,r)=>{e(o=>{const s=o.timesRendered;return s.get(r)?{...o}:(s.set(r,n),{...o,timeRenderedPrev:s})})}}),wd=(e,t)=>({setWeekAndViewType:n=>{const r=t().todayWeek(n);return t().setBookingViewType(ne.WEEK),te.firstAndLastWeekDays(r)},setTodayDayAndViewType:n=>{const r=t().setTodayDay(n);return t().setBookingViewType(ne.DAY),r}}),Oe=Ko()((...e)=>({...bd(...e),...pd(...e),...wd(...e)})),Ca=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o}=Oe();return{onViewTypeChange:i=>{switch(i){case ne.DAY:{e(ne.DAY),n(r[0]);break}case ne.WEEK:{e(ne.WEEK),t(o().firstDayOfWeek);break}case ne.TABLE:{e(ne.TABLE),n(o().firstDayOfWeek);break}}}}},Ea=e=>{const t=R.use(ba);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Uo(t,e)},Go=e=>{const t=R.use(Sa);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Uo(t,e)},Cr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function qo(e){return"nodeType"in e}function be(e){var t,n;return e?Vt(e)?e:qo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Xo(e){const{Document:t}=be(e);return e instanceof t}function Cn(e){return Vt(e)?!1:e instanceof be(e).HTMLElement}function Da(e){return e instanceof be(e).SVGElement}function Yt(e){return e?Vt(e)?e.document:qo(e)?Xo(e)?e:Cn(e)||Da(e)?e.ownerDocument:document:document:document}const qe=Cr?R.useLayoutEffect:R.useEffect;function Er(e){const t=R.useRef(e);return qe(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function xd(){const e=R.useRef(null),t=R.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function mn(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return qe(()=>{n.current!==e&&(n.current=e)},t),n}function En(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function cr(e){const t=Er(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function lr(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let Zr={};function Dr(e,t){return R.useMemo(()=>{if(t)return t;const n=Zr[e]==null?0:Zr[e]+1;return Zr[e]=n,e+"-"+n},[e,t])}function Ta(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,l]of a){const d=s[c];d!=null&&(s[c]=d+e*l)}return s},{...t})}}const jt=Ta(1),ur=Ta(-1);function Sd(e){return"clientX"in e&&"clientY"in e}function Zo(e){if(!e)return!1;const{KeyboardEvent:t}=be(e.target);return t&&e instanceof t}function Cd(e){if(!e)return!1;const{TouchEvent:t}=be(e.target);return t&&e instanceof t}function dr(e){if(Cd(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Sd(e)?{x:e.clientX,y:e.clientY}:null}const vn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[vn.Translate.toString(e),vn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Zs="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ed(e){return e.matches(Zs)?e:e.querySelector(Zs)}const Dd={display:"none"};function Td(e){let{id:t,value:n}=e;return R.createElement("div",{id:t,style:Dd},n)}function Rd(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return R.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Md(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ra=R.createContext(null);function Dn(e){const t=R.useContext(Ra);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Od(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const Pd={draggable:`
1
+ "use strict";require('./assets/main.css');var Uu=Object.defineProperty;var Ku=(e,t,n)=>t in e?Uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var wt=(e,t,n)=>Ku(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),R=require("react"),Ke=require("react-dom");function ya(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=ya(R),Sr=ya(Ke);class nn extends ReferenceError{constructor(t="Reference error"){super(t),this.name="ReferenceErrorCustom"}}const Gu=R.createContext(null),Ks=e=>{let t;const n=new Set,r=(l,f)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const b=t;t=f??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(y=>y(t,b))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},Cr=e=>e?Ks(e):Ks,qu=e=>e;function Uo(e,t=qu){const n=R.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return R.useDebugValue(n),n}const Gs=e=>{const t=Cr(e),n=r=>Uo(t,r);return Object.assign(n,t),n},Ko=e=>e?Gs(e):Gs,ba={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},Xu=e=>Cr(t=>({...ba,...e,clearDraggingBookings:()=>t(n=>({...n,draggingBooking:null})),changeNewBookingStateModal:()=>t({bookingModalState:!0}),openNewBookingModal:(n,r)=>{n&&t({selectedDate:n}),r&&t({selectedHour:r})},setIsBookingLoading:()=>t({isBookingLoading:!0}),setSelectedDate:n=>t(r=>({...r,selectedDate:n})),setSelectedHour:n=>t(r=>({...r,selectedHour:n})),setCardRef:(n,r)=>t(o=>({...o,cardsRef:o.cardsRef.set(n,r)}))})),Zu=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Xu(t)),h.jsx(Gu,{value:n.current,children:e})},wa=R.createContext(void 0),Ju=({children:e,...t})=>h.jsx(wa,{value:{...t},children:e}),xa=R.createContext(null),ne={DAY:"day",WEEK:"week",TABLE:"table",MONTH:"month"},jt=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Sa={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},Qu=e=>Cr((t,n)=>({...e,...Sa,updateMonthMessage:r=>{t(o=>({...o,...r}))},updateHeaderDateLabel:r=>{n().updateMonthMessage({month:r.getMonth(),fullYear:r.getFullYear(),monthMessage:jt[r.getMonth()]})}})),ed=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Qu(t)),h.jsx(xa,{value:n.current,children:e})},cr=e=>{const t=new Date(e.key),n=t.getDate().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0");return`${`${t.getFullYear()}-${r}-${n}`};${e.time}`},Ht=Ko((e,t)=>({emptySlotNodes:new Map,selectedNode:"",setEmptySlotNode:(n,r)=>{e(o=>{const s=new Map(o.emptySlotNodes);s.size>447&&s.clear();const c=cr(r);return s.set(c,n),{...o,emptySlotNodes:s}})},setSelectedNode:n=>{const r=new Map(t().emptySlotNodes),o=t().selectedNode;e(s=>{if(o.length){const i=r.get(o);i&&i.closeEvent()}return{...s,selectedNode:n}})},resetNodes:()=>{e(n=>{const r=new Map(n.emptySlotNodes);return r.clear(),{...n,emptySlotNodes:r}})},resetSelectedNode:()=>e(n=>({...n,selectedNode:""}))})),Ca=6e4,qs=Symbol.for("constructDateFrom");function td(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qs in e?e[qs](t):e instanceof Date?new e.constructor(t):new Date(t)}function So(e,t){return td(e,e)}function nd(e,t,n){const r=So(e);return r.setTime(r.getTime()+t*Ca),r}function rd(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function od(e,t){return+So(e)-+So(t)}function sd(e,t,n){const r=od(e,t)/Ca;return rd(n==null?void 0:n.roundingMethod)(r)}function id(e,t,n){return nd(e,-t)}function ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var rr={exports:{}},ld=rr.exports,Xs;function ud(){return Xs||(Xs=1,function(e,t){(function(n,r){e.exports=r()})(ld,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",f="week",u="month",b="quarter",y="year",C="date",p="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var F=["th","st","nd","rd"],k=j%100;return"["+j+(F[(k-20)%10]||F[k]||F[0])+"]"}},m=function(j,F,k){var N=String(j);return!N||N.length>=F?j:""+Array(F+1-N.length).join(k)+j},E={s:m,z:function(j){var F=-j.utcOffset(),k=Math.abs(F),N=Math.floor(k/60),M=k%60;return(F<=0?"+":"-")+m(N,2,"0")+":"+m(M,2,"0")},m:function j(F,k){if(F.date()<k.date())return-j(k,F);var N=12*(k.year()-F.year())+(k.month()-F.month()),M=F.clone().add(N,u),A=k-M<0,O=F.clone().add(N+(A?-1:1),u);return+(-(N+(k-M)/(A?M-O:O-M))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:u,y,w:f,d:l,D:C,h:c,m:a,s:i,ms:s,Q:b}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},v="en",T={};T[v]=d;var w="$isDayjsObject",D=function(j){return j instanceof H||!(!j||!j[w])},P=function j(F,k,N){var M;if(!F)return v;if(typeof F=="string"){var A=F.toLowerCase();T[A]&&(M=A),k&&(T[A]=k,M=A);var O=F.split("-");if(!M&&O.length>1)return j(O[0])}else{var L=F.name;T[L]=F,M=L}return!N&&M&&(v=M),M||!N&&v},_=function(j,F){if(D(j))return j.clone();var k=typeof F=="object"?F:{};return k.date=j,k.args=arguments,new H(k)},I=E;I.l=P,I.i=D,I.w=function(j,F){return _(j,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var H=function(){function j(k){this.$L=P(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[w]=!0}var F=j.prototype;return F.parse=function(k){this.$d=function(N){var M=N.date,A=N.utc;if(M===null)return new Date(NaN);if(I.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var O=M.match(x);if(O){var L=O[2]-1||0,U=(O[7]||"0").substring(0,3);return A?new Date(Date.UTC(O[1],L,O[3]||1,O[4]||0,O[5]||0,O[6]||0,U)):new Date(O[1],L,O[3]||1,O[4]||0,O[5]||0,O[6]||0,U)}}return new Date(M)}(k),this.init()},F.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},F.$utils=function(){return I},F.isValid=function(){return this.$d.toString()!==p},F.isSame=function(k,N){var M=_(k);return this.startOf(N)<=M&&M<=this.endOf(N)},F.isAfter=function(k,N){return _(k)<this.startOf(N)},F.isBefore=function(k,N){return this.endOf(N)<_(k)},F.$g=function(k,N,M){return I.u(k)?this[N]:this.set(M,k)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(k,N){var M=this,A=!!I.u(N)||N,O=I.p(k),L=function(W,B){var Z=I.w(M.$u?Date.UTC(M.$y,B,W):new Date(M.$y,B,W),M);return A?Z:Z.endOf(l)},U=function(W,B){return I.w(M.toDate()[W].apply(M.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(B)),M)},Y=this.$W,V=this.$M,X=this.$D,G="set"+(this.$u?"UTC":"");switch(O){case y:return A?L(1,0):L(31,11);case u:return A?L(1,V):L(0,V+1);case f:var $=this.$locale().weekStart||0,q=(Y<$?Y+7:Y)-$;return L(A?X-q:X+(6-q),V);case l:case C:return U(G+"Hours",0);case c:return U(G+"Minutes",1);case a:return U(G+"Seconds",2);case i:return U(G+"Milliseconds",3);default:return this.clone()}},F.endOf=function(k){return this.startOf(k,!1)},F.$set=function(k,N){var M,A=I.p(k),O="set"+(this.$u?"UTC":""),L=(M={},M[l]=O+"Date",M[C]=O+"Date",M[u]=O+"Month",M[y]=O+"FullYear",M[c]=O+"Hours",M[a]=O+"Minutes",M[i]=O+"Seconds",M[s]=O+"Milliseconds",M)[A],U=A===l?this.$D+(N-this.$W):N;if(A===u||A===y){var Y=this.clone().set(C,1);Y.$d[L](U),Y.init(),this.$d=Y.set(C,Math.min(this.$D,Y.daysInMonth())).$d}else L&&this.$d[L](U);return this.init(),this},F.set=function(k,N){return this.clone().$set(k,N)},F.get=function(k){return this[I.p(k)]()},F.add=function(k,N){var M,A=this;k=Number(k);var O=I.p(N),L=function(V){var X=_(A);return I.w(X.date(X.date()+Math.round(V*k)),A)};if(O===u)return this.set(u,this.$M+k);if(O===y)return this.set(y,this.$y+k);if(O===l)return L(1);if(O===f)return L(7);var U=(M={},M[a]=r,M[c]=o,M[i]=n,M)[O]||1,Y=this.$d.getTime()+k*U;return I.w(Y,this)},F.subtract=function(k,N){return this.add(-1*k,N)},F.format=function(k){var N=this,M=this.$locale();if(!this.isValid())return M.invalidDate||p;var A=k||"YYYY-MM-DDTHH:mm:ssZ",O=I.z(this),L=this.$H,U=this.$m,Y=this.$M,V=M.weekdays,X=M.months,G=M.meridiem,$=function(B,Z,z,oe){return B&&(B[Z]||B(N,A))||z[Z].slice(0,oe)},q=function(B){return I.s(L%12||12,B,"0")},W=G||function(B,Z,z){var oe=B<12?"AM":"PM";return z?oe.toLowerCase():oe};return A.replace(g,function(B,Z){return Z||function(z){switch(z){case"YY":return String(N.$y).slice(-2);case"YYYY":return I.s(N.$y,4,"0");case"M":return Y+1;case"MM":return I.s(Y+1,2,"0");case"MMM":return $(M.monthsShort,Y,X,3);case"MMMM":return $(X,Y);case"D":return N.$D;case"DD":return I.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return $(M.weekdaysMin,N.$W,V,2);case"ddd":return $(M.weekdaysShort,N.$W,V,3);case"dddd":return V[N.$W];case"H":return String(L);case"HH":return I.s(L,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return W(L,U,!0);case"A":return W(L,U,!1);case"m":return String(U);case"mm":return I.s(U,2,"0");case"s":return String(N.$s);case"ss":return I.s(N.$s,2,"0");case"SSS":return I.s(N.$ms,3,"0");case"Z":return O}return null}(B)||O.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(k,N,M){var A,O=this,L=I.p(N),U=_(k),Y=(U.utcOffset()-this.utcOffset())*r,V=this-U,X=function(){return I.m(O,U)};switch(L){case y:A=X()/12;break;case u:A=X();break;case b:A=X()/3;break;case f:A=(V-Y)/6048e5;break;case l:A=(V-Y)/864e5;break;case c:A=V/o;break;case a:A=V/r;break;case i:A=V/n;break;default:A=V}return M?A:I.a(A)},F.daysInMonth=function(){return this.endOf(u).$D},F.$locale=function(){return T[this.$L]},F.locale=function(k,N){if(!k)return this.$L;var M=this.clone(),A=P(k,N,!0);return A&&(M.$L=A),M},F.clone=function(){return I.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},j}(),K=H.prototype;return _.prototype=K,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",y],["$D",C]].forEach(function(j){K[j[1]]=function(F){return this.$g(F,j[0],j[1])}}),_.extend=function(j,F){return j.$i||(j(F,H,_),j.$i=!0),_},_.locale=P,_.isDayjs=D,_.unix=function(j){return _(1e3*j)},_.en=T[v],_.Ls=T,_.p={},_})}(rr)),rr.exports}var dd=ud();const Zs=ad(dd),Co=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],fd=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],te={findIndexToStart(e=new Date){const t=Co[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return Co.indexOf(e)},generateWeekDays(e){const t=this.findIndexToStart(e);return{week:new Array(7).fill(0).map((o,s)=>{const i=e||new Date,a=s-t;return new Date(i.getFullYear(),i.getMonth(),i.getDate()+a)})}},generateDays(e,t){const n=[],r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t);return n.push(r),n},addDay(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},formatDate(e){return e.split(" ").slice(2,3).join(",").replace(","," | ")},dateTimeAsString(e){const t=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0");return`${t}:${n}`},minuteDifference(e,t){return sd(e,t)},dateAndHourDateToString(e){const t=new Date(e);return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`},shortMonthDescription(...e){return`${jt[e[0].getMonth()].slice(0,3)} - ${jt[e[1].getMonth()].slice(0,3)}`},timeDiffInSeconds(e,t){const n=Zs(e),r=Zs(t);return n.diff(r)/6e4},subtractMinutes(e,t){return id(e,t)},addMinuteToHour(e,t){return`${e.split(":")[0]}:${t}`},dateToString(e){return new Date(e).toTimeString()},dateToStringSelected(e){return new Date(e).toDateString()},roundMinutes(e){return e>=15&&e<30?15:e>=30&&e<45?30:e>=45&&e<60?45:0},hourMinutesStringToDate(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r)),t},addMinutesToDate(e,t){const n=new Date(e);return n.setHours(n.getHours(),n.getMinutes()+t,n.getMinutes()),n},newDateKey(e,t){const n=new Date(e);return n.setHours(Number(t.split(":")[0])),n.setMinutes(Number(t.split(":")[1])),n.toISOString()},addMinutesToHour(e,t){const n=te.hourMinutesStringToDate(e),r=te.addMinutesToDate(n,t);return te.dateAndHourDateToString(r)},convertStringTimeToDateFormat(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r),0,0),t},isTodayDate(e){const t=new Date,n=e.getDate()===t.getDate(),r=e.getMonth()===t.getMonth(),o=e.getFullYear()===t.getFullYear();return n&&r&&o},firstAndLastWeekDays(e){return{firstDayOfWeek:e[0],lastDayOfWeek:e[e.length-1]}},generateWeekMonthLabel(e){const{firstDayOfWeek:t,lastDayOfWeek:n}=te.firstAndLastWeekDays(e),r=t.getMonth();return r!==n.getMonth()?te.shortMonthDescription(t,n):jt[r]}},Eo={date:"",startAt:"",finishAt:""},pd=e=>Cr((t,n)=>({...Eo,...e,updateForm:r=>t(o=>({...o,...r})),updateDynamicForm:(r,o)=>t(s=>({...s,[r]:o})),updateStartAt:r=>t(o=>({...o,startAt:r})),updateFinishAt:r=>t(o=>({...o,finishAt:r})),updateFinishAtWithOffset:(r,o=15)=>{const s=te.addMinutesToHour(r,o);return n().updateFinishAt(s),s},updateClient:(r,o)=>t(s=>({...s,client:{id:r,name:o}})),updateDate:r=>t(o=>({...o,date:r})),resetForm:()=>t(Eo)})),Ea=R.createContext(null),hd=({children:e,ref:t,...n})=>{const r=R.useRef(null);r.current||(r.current=pd(n));const o=s=>{var i;(i=r.current)==null||i.getState().updateFinishAt(s)};return R.useImperativeHandle(t,()=>({updateFinishAt:o})),h.jsx(Ea,{value:r.current,children:e})},gd=(e,t)=>({users:[],bookingViewType:"week",bookingBulkData:{user:{id:"",profile:{id:"",name:""}},booking:[]},updateUsers:n=>e(r=>({...r,users:n})),setBookingBulkData:n=>e(r=>({...r,bookingBulkData:{...n}})),updatingBookingBulkData:(n,r)=>{e(o=>{const s=o.bookingBulkData.booking.map(i=>new Date(i.startAt).getDate()===r&&n.id===i.id?n:i);return{...o,bookingBulkData:{...o.bookingBulkData,booking:s}}})},resetBookingResponse:()=>e(n=>({...n,bookingResponse:null})),setBookingViewType:n=>e(r=>({...r,bookingViewType:n})),optimisticCardUpdate:(n,r,o,s)=>{const i={...n,startAt:r,finishAt:o},a=new Date(s.day).getDate();t().updatingBookingBulkData(i,a)}}),md=(e,t,n)=>{const r=[],o=new Date(`1970/01/01 ${e}`),s=new Date(`1970/01/01 ${t}`);for(;o<s;){const i=te.dateTimeAsString(o);o.setMinutes(o.getMinutes()+n),r.push(i)}return r},vd="08:00",yd="23:30",bd=60,wd=te.generateWeekDays(),xd=(e,t)=>({hours:md(vd,yd,bd),daysOfWeek:wd.week,timesRendered:new Map,setTodayDay:n=>{const r=te.generateDays(n,0);return e(o=>({...o,daysOfWeek:r,lastDayOfWeek:r[0]||new Date})),r[0]},todayWeek:n=>{let r=[];return e(o=>{const{week:s}=te.generateWeekDays(n);return r=s,{...o,daysOfWeek:s}}),r},nextWeek:()=>{const n=te.addDay(t().getWeek().lastDayOfWeek,1);let r=[];const{week:o}=te.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},previousWeek:()=>{const n=te.addDay(t().getWeek().firstDayOfWeek,-1);let r=[];const{week:o}=te.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},setDays:n=>{const r=t().daysOfWeek[0];if(!r)return[];const o=te.generateDays(r,n);return e(s=>({...s,daysOfWeek:o})),o},getWeek:()=>{const n=t().daysOfWeek[0],r=t().daysOfWeek[t().daysOfWeek.length-1];return{firstDayOfWeek:n,lastDayOfWeek:r}},addTimesRendered:(n,r)=>{e(o=>{const s=o.timesRendered;return s.get(r)?{...o}:(s.set(r,n),{...o,timeRenderedPrev:s})})}}),Sd=(e,t)=>({setWeekAndViewType:n=>{const r=t().todayWeek(n);return t().setBookingViewType(ne.WEEK),te.firstAndLastWeekDays(r)},setTodayDayAndViewType:n=>{const r=t().setTodayDay(n);return t().setBookingViewType(ne.DAY),r}}),Oe=Ko()((...e)=>({...xd(...e),...gd(...e),...Sd(...e)})),Da=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o}=Oe();return{onViewTypeChange:i=>{switch(i){case ne.DAY:{e(ne.DAY),n(r[0]);break}case ne.WEEK:{e(ne.WEEK),t(o().firstDayOfWeek);break}case ne.TABLE:{e(ne.TABLE),n(o().firstDayOfWeek);break}}}}},Ta=e=>{const t=R.use(xa);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Uo(t,e)},Go=e=>{const t=R.use(Ea);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Uo(t,e)},Er=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function qo(e){return"nodeType"in e}function be(e){var t,n;return e?Vt(e)?e:qo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Xo(e){const{Document:t}=be(e);return e instanceof t}function Cn(e){return Vt(e)?!1:e instanceof be(e).HTMLElement}function Ra(e){return e instanceof be(e).SVGElement}function Yt(e){return e?Vt(e)?e.document:qo(e)?Xo(e)?e:Cn(e)||Ra(e)?e.ownerDocument:document:document:document}const Ge=Er?R.useLayoutEffect:R.useEffect;function Dr(e){const t=R.useRef(e);return Ge(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Cd(){const e=R.useRef(null),t=R.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function mn(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return Ge(()=>{n.current!==e&&(n.current=e)},t),n}function En(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function lr(e){const t=Dr(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function ur(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let Jr={};function Tr(e,t){return R.useMemo(()=>{if(t)return t;const n=Jr[e]==null?0:Jr[e]+1;return Jr[e]=n,e+"-"+n},[e,t])}function Ma(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,l]of a){const f=s[c];f!=null&&(s[c]=f+e*l)}return s},{...t})}}const Lt=Ma(1),dr=Ma(-1);function Ed(e){return"clientX"in e&&"clientY"in e}function Zo(e){if(!e)return!1;const{KeyboardEvent:t}=be(e.target);return t&&e instanceof t}function Dd(e){if(!e)return!1;const{TouchEvent:t}=be(e.target);return t&&e instanceof t}function fr(e){if(Dd(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Ed(e)?{x:e.clientX,y:e.clientY}:null}const vn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[vn.Translate.toString(e),vn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Js="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Td(e){return e.matches(Js)?e:e.querySelector(Js)}const Rd={display:"none"};function Md(e){let{id:t,value:n}=e;return R.createElement("div",{id:t,style:Rd},n)}function Od(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return R.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Pd(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Oa=R.createContext(null);function Dn(e){const t=R.useContext(Oa);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function kd(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const Ad={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
5
- `},kd={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Ad(e){let{announcements:t=kd,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Pd}=e;const{announce:s,announcement:i}=Md(),a=Dr("DndLiveRegion"),[c,l]=R.useState(!1);if(R.useEffect(()=>{l(!0)},[]),Dn(R.useMemo(()=>({onDragStart(u){let{active:b}=u;s(t.onDragStart({active:b}))},onDragMove(u){let{active:b,over:y}=u;t.onDragMove&&s(t.onDragMove({active:b,over:y}))},onDragOver(u){let{active:b,over:y}=u;s(t.onDragOver({active:b,over:y}))},onDragEnd(u){let{active:b,over:y}=u;s(t.onDragEnd({active:b,over:y}))},onDragCancel(u){let{active:b,over:y}=u;s(t.onDragCancel({active:b,over:y}))}}),[s,t])),!c)return null;const d=R.createElement(R.Fragment,null,R.createElement(Td,{id:r,value:o.draggable}),R.createElement(Rd,{id:a,announcement:i}));return n?Ge.createPortal(d,n):d}var he;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(he||(he={}));function fr(){}function Js(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function _d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Ie=Object.freeze({x:0,y:0});function Nd(e,t){const n=dr(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Id(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function jd(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Ld(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,l=e.width*e.height,d=i*a,u=d/(c+l-d);return Number(u.toFixed(4))}return 0}const $d=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=Ld(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(Id)};function Fd(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ma(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ie}function zd(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const Wd=zd(1);function Oa(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Bd(e,t,n){const r=Oa(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),l=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=s?e.height/s:e.height;return{width:d,height:u,top:l,right:c+d,bottom:l+u,left:c}}const Hd={ignoreTransform:!1};function Tn(e,t){t===void 0&&(t=Hd);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:d}=be(e).getComputedStyle(e);l&&(n=Bd(n,l,d))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function Qs(e){return Tn(e,{ignoreTransform:!0})}function Vd(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Yd(e,t){return t===void 0&&(t=be(e).getComputedStyle(e)),t.position==="fixed"}function Ud(e,t){t===void 0&&(t=be(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function Jo(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Xo(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Cn(o)||Da(o)||n.includes(o))return n;const s=be(e).getComputedStyle(o);return o!==e&&Ud(o,s)&&n.push(o),Yd(o,s)?n:r(o.parentNode)}return e?r(e):n}function Pa(e){const[t]=Jo(e,1);return t??null}function Jr(e){return!Cr||!e?null:Vt(e)?e:qo(e)?Xo(e)||e===Yt(e).scrollingElement?window:Cn(e)?e:null:null}function ka(e){return Vt(e)?e.scrollX:e.scrollLeft}function Aa(e){return Vt(e)?e.scrollY:e.scrollTop}function Do(e){return{x:ka(e),y:Aa(e)}}var ge;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ge||(ge={}));function _a(e){return!Cr||!e?!1:e===document.scrollingElement}function Na(e){const t={x:0,y:0},n=_a(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const Kd={x:.2,y:.2};function Gd(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=Kd);const{isTop:l,isBottom:d,isLeft:u,isRight:b}=Na(e),y={x:0,y:0},C={x:0,y:0},h={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+h.height?(y.y=ge.Backward,C.y=r*Math.abs((t.top+h.height-s)/h.height)):!d&&c>=t.bottom-h.height&&(y.y=ge.Forward,C.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!b&&a>=t.right-h.width?(y.x=ge.Forward,C.x=r*Math.abs((t.right-h.width-a)/h.width)):!u&&i<=t.left+h.width&&(y.x=ge.Backward,C.x=r*Math.abs((t.left+h.width-i)/h.width)),{direction:y,speed:C}}function qd(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Ia(e){return e.reduce((t,n)=>jt(t,Do(n)),Ie)}function Xd(e){return e.reduce((t,n)=>t+ka(n),0)}function Zd(e){return e.reduce((t,n)=>t+Aa(n),0)}function ja(e,t){if(t===void 0&&(t=Tn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Pa(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Jd=[["x",["left","right"],Xd],["y",["top","bottom"],Zd]];class Qo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Jo(n),o=Ia(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of Jd)for(const c of i)Object.defineProperty(this,c,{get:()=>{const l=a(r),d=o[s]-l;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class pn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Qd(e){const{EventTarget:t}=be(e);return e instanceof t?e:Yt(e)}function Qr(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ke;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ke||(ke={}));function ei(e){e.preventDefault()}function ef(e){e.stopPropagation()}var ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ue||(ue={}));const La={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter,ue.Tab]},tf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ue.Right:return{...n,x:n.x+25};case ue.Left:return{...n,x:n.x-25};case ue.Down:return{...n,y:n.y+25};case ue.Up:return{...n,y:n.y-25}}};class $a{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new pn(Yt(n)),this.windowListeners=new pn(be(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ke.Resize,this.handleCancel),this.windowListeners.add(ke.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ke.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&ja(r),n(Ie)}handleKeyDown(t){if(Zo(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=La,coordinateGetter:i=tf,scrollBehavior:a="smooth"}=o,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:l}=r.current,d=l?{x:l.left,y:l.top}:Ie;this.referenceCoordinates||(this.referenceCoordinates=d);const u=i(t,{active:n,context:r.current,currentCoordinates:d});if(u){const b=ur(u,d),y={x:0,y:0},{scrollableAncestors:C}=r.current;for(const h of C){const w=t.code,{isTop:m,isRight:f,isLeft:v,isBottom:E,maxScroll:g,minScroll:T}=Na(h),x=qd(h),D={x:Math.min(w===ue.Right?x.right-x.width/2:x.right,Math.max(w===ue.Right?x.left:x.left+x.width/2,u.x)),y:Math.min(w===ue.Down?x.bottom-x.height/2:x.bottom,Math.max(w===ue.Down?x.top:x.top+x.height/2,u.y))},k=w===ue.Right&&!f||w===ue.Left&&!v,_=w===ue.Down&&!E||w===ue.Up&&!m;if(k&&D.x!==u.x){const N=h.scrollLeft+b.x,B=w===ue.Right&&N<=g.x||w===ue.Left&&N>=T.x;if(B&&!b.y){h.scrollTo({left:N,behavior:a});return}B?y.x=h.scrollLeft-N:y.x=w===ue.Right?h.scrollLeft-g.x:h.scrollLeft-T.x,y.x&&h.scrollBy({left:-y.x,behavior:a});break}else if(_&&D.y!==u.y){const N=h.scrollTop+b.y,B=w===ue.Down&&N<=g.y||w===ue.Up&&N>=T.y;if(B&&!b.x){h.scrollTo({top:N,behavior:a});return}B?y.y=h.scrollTop-N:y.y=w===ue.Down?h.scrollTop-g.y:h.scrollTop-T.y,y.y&&h.scrollBy({top:-y.y,behavior:a});break}}this.handleMove(t,jt(ur(u,this.referenceCoordinates),y))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}$a.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=La,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function ti(e){return!!(e&&"distance"in e)}function ni(e){return!!(e&&"delay"in e)}class es{constructor(t,n,r){var o;r===void 0&&(r=Qd(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=Yt(i),this.documentListeners=new pn(this.document),this.listeners=new pn(r),this.windowListeners=new pn(be(i)),this.initialCoordinates=(o=dr(s))!=null?o:Ie,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ke.Resize,this.handleCancel),this.windowListeners.add(ke.DragStart,ei),this.windowListeners.add(ke.VisibilityChange,this.handleCancel),this.windowListeners.add(ke.ContextMenu,ei),this.documentListeners.add(ke.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ni(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(ti(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ke.Click,ef,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ke.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const c=(n=dr(t))!=null?n:Ie,l=ur(o,c);if(!r&&a){if(ti(a)){if(a.tolerance!=null&&Qr(l,a.tolerance))return this.handleCancel();if(Qr(l,a.distance))return this.handleStart()}if(ni(a)&&Qr(l,a.tolerance))return this.handleCancel();this.handlePending(a,l);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const nf={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Fa extends es{constructor(t){const{event:n}=t,r=Yt(n.target);super(t,nf,r)}}Fa.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const rf={move:{name:"mousemove"},end:{name:"mouseup"}};var To;(function(e){e[e.RightClick=2]="RightClick"})(To||(To={}));class za extends es{constructor(t){super(t,rf,Yt(t.event.target))}}za.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===To.RightClick?!1:(r==null||r({event:n}),!0)}}];const eo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Wa extends es{constructor(t){super(t,eo)}static setup(){return window.addEventListener(eo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(eo.move.name,t)};function t(){}}}Wa.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var hn;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hn||(hn={}));var pr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(pr||(pr={}));function of(e){let{acceleration:t,activator:n=hn.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=pr.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:u,threshold:b}=e;const y=af({delta:u,disabled:!s}),[C,h]=xd(),w=R.useRef({x:0,y:0}),m=R.useRef({x:0,y:0}),f=R.useMemo(()=>{switch(n){case hn.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case hn.DraggableRect:return o}},[n,o,c]),v=R.useRef(null),E=R.useCallback(()=>{const T=v.current;if(!T)return;const x=w.current.x*m.current.x,D=w.current.y*m.current.y;T.scrollBy(x,D)},[]),g=R.useMemo(()=>a===pr.TreeOrder?[...l].reverse():l,[a,l]);R.useEffect(()=>{if(!s||!l.length||!f){h();return}for(const T of g){if((r==null?void 0:r(T))===!1)continue;const x=l.indexOf(T),D=d[x];if(!D)continue;const{direction:k,speed:_}=Gd(T,D,f,t,b);for(const N of["x","y"])y[N][k[N]]||(_[N]=0,k[N]=0);if(_.x>0||_.y>0){h(),v.current=T,C(E,i),w.current=_,m.current=k;return}}w.current={x:0,y:0},m.current={x:0,y:0},h()},[t,E,r,h,s,i,JSON.stringify(f),JSON.stringify(y),C,l,g,d,JSON.stringify(b)])}const sf={x:{[ge.Backward]:!1,[ge.Forward]:!1},y:{[ge.Backward]:!1,[ge.Forward]:!1}};function af(e){let{delta:t,disabled:n}=e;const r=lr(t);return En(o=>{if(n||!r||!o)return sf;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ge.Backward]:o.x[ge.Backward]||s.x===-1,[ge.Forward]:o.x[ge.Forward]||s.x===1},y:{[ge.Backward]:o.y[ge.Backward]||s.y===-1,[ge.Forward]:o.y[ge.Forward]||s.y===1}}},[n,t,r])}function cf(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return En(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function lf(e,t){return R.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var yn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(yn||(yn={}));var Ro;(function(e){e.Optimized="optimized"})(Ro||(Ro={}));const ri=new Map;function uf(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=R.useState(null),{frequency:a,measure:c,strategy:l}=o,d=R.useRef(e),u=w(),b=mn(u),y=R.useCallback(function(m){m===void 0&&(m=[]),!b.current&&i(f=>f===null?m:f.concat(m.filter(v=>!f.includes(v))))},[b]),C=R.useRef(null),h=En(m=>{if(u&&!n)return ri;if(!m||m===ri||d.current!==e||s!=null){const f=new Map;for(let v of e){if(!v)continue;if(s&&s.length>0&&!s.includes(v.id)&&v.rect.current){f.set(v.id,v.rect.current);continue}const E=v.node.current,g=E?new Qo(c(E),E):null;v.rect.current=g,g&&f.set(v.id,g)}return f}return m},[e,s,n,u,c]);return R.useEffect(()=>{d.current=e},[e]),R.useEffect(()=>{u||y()},[n,u]),R.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),R.useEffect(()=>{u||typeof a!="number"||C.current!==null||(C.current=setTimeout(()=>{y(),C.current=null},a))},[a,u,y,...r]),{droppableRects:h,measureDroppableContainers:y,measuringScheduled:s!=null};function w(){switch(l){case yn.Always:return!1;case yn.BeforeDragging:return n;default:return!n}}}function ts(e,t){return En(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function df(e,t){return ts(e,t)}function ff(e){let{callback:t,disabled:n}=e;const r=Er(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Tr(e){let{callback:t,disabled:n}=e;const r=Er(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function pf(e){return new Qo(Tn(e),e)}function oi(e,t,n){t===void 0&&(t=pf);const[r,o]=R.useState(null);function s(){o(c=>{if(!e)return null;if(e.isConnected===!1){var l;return(l=c??n)!=null?l:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const i=ff({callback(c){if(e)for(const l of c){const{type:d,target:u}=l;if(d==="childList"&&u instanceof HTMLElement&&u.contains(e)){s();break}}}}),a=Tr({callback:s});return qe(()=>{s(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r}function hf(e){const t=ts(e);return Ma(e,t)}const si=[];function gf(e){const t=R.useRef(e),n=En(r=>e?r&&r!==si&&e&&t.current&&e.parentNode===t.current.parentNode?r:Jo(e):si,[e]);return R.useEffect(()=>{t.current=e},[e]),n}function mf(e){const[t,n]=R.useState(null),r=R.useRef(e),o=R.useCallback(s=>{const i=Jr(s.target);i&&n(a=>a?(a.set(i,Do(i)),new Map(a)):null)},[]);return R.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=Jr(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,Do(l)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const l=Jr(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>jt(s,i),Ie):Ia(e):Ie,[e,t])}function ii(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==Ie;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?ur(e,n.current):Ie}function vf(e){R.useEffect(()=>{if(!Cr)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function yf(e,t){return R.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function Ba(e){return R.useMemo(()=>e?Vd(e):null,[e])}const ai=[];function bf(e,t){t===void 0&&(t=Tn);const[n]=e,r=Ba(n?be(n):null),[o,s]=R.useState(ai);function i(){s(()=>e.length?e.map(c=>_a(c)?r:new Qo(t(c),c)):ai)}const a=Tr({callback:i});return qe(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function Ha(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Cn(t)?t:e}function wf(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(l=>{for(const{target:d}of l)if(Cn(d)){r(u=>{const b=t(d);return u?{...u,width:b.width,height:b.height}:b});break}},[t]),s=Tr({callback:o}),i=R.useCallback(l=>{const d=Ha(l);s==null||s.disconnect(),d&&(s==null||s.observe(d)),r(d?t(d):null)},[t,s]),[a,c]=cr(i);return R.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const xf=[{sensor:Fa,options:{}},{sensor:$a,options:{}}],Sf={current:{}},rr={draggable:{measure:Qs},droppable:{measure:Qs,strategy:yn.WhileDragging,frequency:Ro.Optimized},dragOverlay:{measure:Tn}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Cf={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:fr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:rr,measureDroppableContainers:fr,windowRect:null,measuringScheduled:!1},Va={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:fr,draggableNodes:new Map,over:null,measureDroppableContainers:fr},Rn=R.createContext(Va),Ya=R.createContext(Cf);function Ef(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function Df(e,t){switch(t.type){case he.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case he.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case he.DragEnd:case he.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case he.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new gn(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case he.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new gn(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case he.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new gn(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Tf(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(Rn),s=lr(r),i=lr(n==null?void 0:n.id);return R.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!Zo(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:c,node:l}=a;if(!c.current&&!l.current)return;requestAnimationFrame(()=>{for(const d of[c.current,l.current]){if(!d)continue;const u=Ed(d);if(u){u.focus();break}}})}},[r,t,o,i,s]),null}function Ua(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function Rf(e){return R.useMemo(()=>({draggable:{...rr.draggable,...e==null?void 0:e.draggable},droppable:{...rr.droppable,...e==null?void 0:e.droppable},dragOverlay:{...rr.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Mf(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=R.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;qe(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const d=n(l),u=Ma(d,r);if(i||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const b=Pa(l);b&&b.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Rr=R.createContext({...Ie,scaleX:1,scaleY:1});var ut;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ut||(ut={}));const ns=R.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:d=xf,collisionDetection:u=$d,measuring:b,modifiers:y,...C}=t;const h=R.useReducer(Df,void 0,Ef),[w,m]=h,[f,v]=Od(),[E,g]=R.useState(ut.Uninitialized),T=E===ut.Initialized,{draggable:{active:x,nodes:D,translate:k},droppable:{containers:_}}=w,N=x!=null?D.get(x):null,B=R.useRef({initial:null,translated:null}),U=R.useMemo(()=>{var ve;return x!=null?{id:x,data:(ve=N==null?void 0:N.data)!=null?ve:Sf,rect:B}:null},[x,N]),I=R.useRef(null),[z,P]=R.useState(null),[j,M]=R.useState(null),A=mn(C,Object.values(C)),O=Dr("DndDescribedBy",i),$=R.useMemo(()=>_.getEnabled(),[_]),Y=Rf(b),{droppableRects:V,measureDroppableContainers:H,measuringScheduled:Z}=uf($,{dragging:T,dependencies:[k.x,k.y],config:Y.droppable}),G=cf(D,x),W=R.useMemo(()=>j?dr(j):null,[j]),q=Hu(),K=df(G,Y.draggable.measure);Mf({activeNode:x!=null?D.get(x):null,config:q.layoutShiftCompensation,initialRect:K,measure:Y.draggable.measure});const L=oi(G,Y.draggable.measure,K),X=oi(G?G.parentElement:null),F=R.useRef({activatorEvent:null,active:null,activeNode:G,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:_,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=_.getNodeFor((n=F.current.over)==null?void 0:n.id),de=wf({measure:Y.dragOverlay.measure}),Se=(r=de.nodeRef.current)!=null?r:G,Ce=T?(o=de.rect)!=null?o:L:null,$e=!!(de.nodeRef.current&&de.rect),Ln=hf($e?null:L),Qe=Ba(Se?be(Se):null),et=gf(T?oe??G:null),$n=bf(et),Fn=Ua(y,{transform:{x:k.x-Ln.x,y:k.y-Ln.y,scaleX:1,scaleY:1},activatorEvent:j,active:U,activeNodeRect:L,containerNodeRect:X,draggingNodeRect:Ce,over:F.current.over,overlayNodeRect:de.rect,scrollableAncestors:et,scrollableAncestorRects:$n,windowRect:Qe}),zs=W?jt(W,k):null,Ws=mf(et),ju=ii(Ws),Lu=ii(Ws,[L]),Mt=jt(Fn,ju),Ot=Ce?Wd(Ce,Fn):null,Jt=U&&Ot?u({active:U,collisionRect:Ot,droppableRects:V,droppableContainers:$,pointerCoordinates:zs}):null,Bs=jd(Jt,"id"),[tt,Hs]=R.useState(null),$u=$e?Fn:jt(Fn,Lu),Fu=Fd($u,(s=tt==null?void 0:tt.rect)!=null?s:null,L),qr=R.useRef(null),Vs=R.useCallback((ve,Ee)=>{let{sensor:De,options:nt}=Ee;if(I.current==null)return;const Pe=D.get(I.current);if(!Pe)return;const Te=ve.nativeEvent,Fe=new De({active:I.current,activeNode:Pe,event:Te,options:nt,context:F,onAbort(me){if(!D.get(me))return;const{onDragAbort:ze}=A.current,Ue={id:me};ze==null||ze(Ue),f({type:"onDragAbort",event:Ue})},onPending(me,rt,ze,Ue){if(!D.get(me))return;const{onDragPending:en}=A.current,ot={id:me,constraint:rt,initialCoordinates:ze,offset:Ue};en==null||en(ot),f({type:"onDragPending",event:ot})},onStart(me){const rt=I.current;if(rt==null)return;const ze=D.get(rt);if(!ze)return;const{onDragStart:Ue}=A.current,Qt={activatorEvent:Te,active:{id:rt,data:ze.data,rect:B}};Ge.unstable_batchedUpdates(()=>{Ue==null||Ue(Qt),g(ut.Initializing),m({type:he.DragStart,initialCoordinates:me,active:rt}),f({type:"onDragStart",event:Qt}),P(qr.current),M(Te)})},onMove(me){m({type:he.DragMove,coordinates:me})},onEnd:Pt(he.DragEnd),onCancel:Pt(he.DragCancel)});qr.current=Fe;function Pt(me){return async function(){const{active:ze,collisions:Ue,over:Qt,scrollAdjustedTranslate:en}=F.current;let ot=null;if(ze&&en){const{cancelDrop:tn}=A.current;ot={activatorEvent:Te,active:ze,collisions:Ue,delta:en,over:Qt},me===he.DragEnd&&typeof tn=="function"&&await Promise.resolve(tn(ot))&&(me=he.DragCancel)}I.current=null,Ge.unstable_batchedUpdates(()=>{m({type:me}),g(ut.Uninitialized),Hs(null),P(null),M(null),qr.current=null;const tn=me===he.DragEnd?"onDragEnd":"onDragCancel";if(ot){const Xr=A.current[tn];Xr==null||Xr(ot),f({type:tn,event:ot})}})}}},[D]),zu=R.useCallback((ve,Ee)=>(De,nt)=>{const Pe=De.nativeEvent,Te=D.get(nt);if(I.current!==null||!Te||Pe.dndKit||Pe.defaultPrevented)return;const Fe={active:Te};ve(De,Ee.options,Fe)===!0&&(Pe.dndKit={capturedBy:Ee.sensor},I.current=nt,Vs(De,Ee))},[D,Vs]),Ys=lf(d,zu);vf(d),qe(()=>{L&&E===ut.Initializing&&g(ut.Initialized)},[L,E]),R.useEffect(()=>{const{onDragMove:ve}=A.current,{active:Ee,activatorEvent:De,collisions:nt,over:Pe}=F.current;if(!Ee||!De)return;const Te={active:Ee,activatorEvent:De,collisions:nt,delta:{x:Mt.x,y:Mt.y},over:Pe};Ge.unstable_batchedUpdates(()=>{ve==null||ve(Te),f({type:"onDragMove",event:Te})})},[Mt.x,Mt.y]),R.useEffect(()=>{const{active:ve,activatorEvent:Ee,collisions:De,droppableContainers:nt,scrollAdjustedTranslate:Pe}=F.current;if(!ve||I.current==null||!Ee||!Pe)return;const{onDragOver:Te}=A.current,Fe=nt.get(Bs),Pt=Fe&&Fe.rect.current?{id:Fe.id,rect:Fe.rect.current,data:Fe.data,disabled:Fe.disabled}:null,me={active:ve,activatorEvent:Ee,collisions:De,delta:{x:Pe.x,y:Pe.y},over:Pt};Ge.unstable_batchedUpdates(()=>{Hs(Pt),Te==null||Te(me),f({type:"onDragOver",event:me})})},[Bs]),qe(()=>{F.current={activatorEvent:j,active:U,activeNode:G,collisionRect:Ot,collisions:Jt,droppableRects:V,draggableNodes:D,draggingNode:Se,draggingNodeRect:Ce,droppableContainers:_,over:tt,scrollableAncestors:et,scrollAdjustedTranslate:Mt},B.current={initial:Ce,translated:Ot}},[U,G,Jt,Ot,D,Se,Ce,V,_,tt,et,Mt]),of({...q,delta:k,draggingRect:Ot,pointerCoordinates:zs,scrollableAncestors:et,scrollableAncestorRects:$n});const Wu=R.useMemo(()=>({active:U,activeNode:G,activeNodeRect:L,activatorEvent:j,collisions:Jt,containerNodeRect:X,dragOverlay:de,draggableNodes:D,droppableContainers:_,droppableRects:V,over:tt,measureDroppableContainers:H,scrollableAncestors:et,scrollableAncestorRects:$n,measuringConfiguration:Y,measuringScheduled:Z,windowRect:Qe}),[U,G,L,j,Jt,X,de,D,_,V,tt,H,et,$n,Y,Z,Qe]),Bu=R.useMemo(()=>({activatorEvent:j,activators:Ys,active:U,activeNodeRect:L,ariaDescribedById:{draggable:O},dispatch:m,draggableNodes:D,over:tt,measureDroppableContainers:H}),[j,Ys,U,L,m,O,D,tt,H]);return R.createElement(Ra.Provider,{value:v},R.createElement(Rn.Provider,{value:Bu},R.createElement(Ya.Provider,{value:Wu},R.createElement(Rr.Provider,{value:Fu},l)),R.createElement(Tf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),R.createElement(Ad,{...a,hiddenTextDescribedById:O}));function Hu(){const ve=(z==null?void 0:z.autoScrollEnabled)===!1,Ee=typeof c=="object"?c.enabled===!1:c===!1,De=T&&!ve&&!Ee;return typeof c=="object"?{...c,enabled:De}:{enabled:De}}}),Of=R.createContext(null),ci="button",Pf="Draggable";function rs(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Dr(Pf),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:u,over:b}=R.useContext(Rn),{role:y=ci,roleDescription:C="draggable",tabIndex:h=0}=o??{},w=(c==null?void 0:c.id)===t,m=R.useContext(w?Rr:Of),[f,v]=cr(),[E,g]=cr(),T=yf(i,t),x=mn(n);qe(()=>(u.set(t,{id:t,key:s,node:f,activatorNode:E,data:x}),()=>{const k=u.get(t);k&&k.key===s&&u.delete(t)}),[u,t]);const D=R.useMemo(()=>({role:y,tabIndex:h,"aria-disabled":r,"aria-pressed":w&&y===ci?!0:void 0,"aria-roledescription":C,"aria-describedby":d.draggable}),[r,y,h,w,C,d.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:D,isDragging:w,listeners:r?void 0:T,node:f,over:b,setNodeRef:v,setActivatorNodeRef:g,transform:m}}function kf(){return R.useContext(Ya)}const Af="Droppable",_f={timeout:25};function zn(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Dr(Af),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=R.useContext(Rn),d=R.useRef({disabled:n}),u=R.useRef(!1),b=R.useRef(null),y=R.useRef(null),{disabled:C,updateMeasurementsFor:h,timeout:w}={..._f,...o},m=mn(h??r),f=R.useCallback(()=>{if(!u.current){u.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{l(Array.isArray(m.current)?m.current:[m.current]),y.current=null},w)},[w]),v=Tr({callback:f,disabled:C||!i}),E=R.useCallback((D,k)=>{v&&(k&&(v.unobserve(k),u.current=!1),D&&v.observe(D))},[v]),[g,T]=cr(E),x=mn(t);return R.useEffect(()=>{!v||!g.current||(v.disconnect(),u.current=!1,v.observe(g.current))},[g,v]),R.useEffect(()=>(a({type:he.RegisterDroppable,element:{id:r,key:s,disabled:n,node:g,rect:b,data:x}}),()=>a({type:he.UnregisterDroppable,key:s,id:r})),[r]),R.useEffect(()=>{n!==d.current.disabled&&(a({type:he.SetDroppableDisabled,id:r,key:s,disabled:n}),d.current.disabled=n)},[r,s,n,a]),{active:i,rect:b,isOver:(c==null?void 0:c.id)===r,node:g,over:c,setNodeRef:T}}function Nf(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[s,i]=R.useState(null),a=lr(n);return!n&&!r&&a&&o(a),qe(()=>{if(!s)return;const c=r==null?void 0:r.key,l=r==null?void 0:r.props.id;if(c==null||l==null){o(null);return}Promise.resolve(t(l,s)).then(()=>{o(null)})},[t,r,s]),R.createElement(R.Fragment,null,n,r?R.cloneElement(r,{ref:i}):null)}const If={x:0,y:0,scaleX:1,scaleY:1};function jf(e){let{children:t}=e;return R.createElement(Rn.Provider,{value:Va},R.createElement(Rr.Provider,{value:If},t))}const Lf={position:"fixed",touchAction:"none"},$f=e=>Zo(e)?"transform 250ms ease":void 0,Ff=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:d=$f}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},b={...Lf,width:a.width,height:a.height,top:a.top,left:a.left,transform:vn.Transform.toString(u),transformOrigin:o&&r?Nd(r,a):void 0,transition:typeof d=="function"?d(r):d,...c};return R.createElement(n,{className:i,style:b,ref:t},s)}),zf=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:s,className:i}=e;if(s!=null&&s.active)for(const[a,c]of Object.entries(s.active))c!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,c));if(s!=null&&s.dragOverlay)for(const[a,c]of Object.entries(s.dragOverlay))c!==void 0&&r.node.style.setProperty(a,c);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[c,l]of Object.entries(o))n.node.style.setProperty(c,l);i!=null&&i.active&&n.node.classList.remove(i.active)}},Wf=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:vn.Transform.toString(t)},{transform:vn.Transform.toString(n)}]},Bf={duration:250,easing:"ease",keyframes:Wf,sideEffects:zf({styles:{active:{opacity:"0"}}})};function Hf(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Er((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=Ha(i);if(!l)return;const{transform:d}=be(i).getComputedStyle(i),u=Oa(d);if(!u)return;const b=typeof t=="function"?t:Vf(t);return ja(c,o.draggable.measure),b({active:{id:s,data:a.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:o,transform:u})})}function Vf(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...Bf,...e};return s=>{let{active:i,dragOverlay:a,transform:c,...l}=s;if(!t)return;const d={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:c.scaleX!==1?i.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?i.rect.height*c.scaleY/a.rect.height:1},b={x:c.x-d.x,y:c.y-d.y,...u},y=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:b}}),[C]=y,h=y[y.length-1];if(JSON.stringify(C)===JSON.stringify(h))return;const w=r==null?void 0:r({active:i,dragOverlay:a,...l}),m=a.node.animate(y,{duration:t,easing:n,fill:"forwards"});return new Promise(f=>{m.onfinish=()=>{w==null||w(),f()}})}}let li=0;function Yf(e){return R.useMemo(()=>{if(e!=null)return li++,li},[e])}const Uf=R.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:c,zIndex:l=999}=e;const{activatorEvent:d,active:u,activeNodeRect:b,containerNodeRect:y,draggableNodes:C,droppableContainers:h,dragOverlay:w,over:m,measuringConfiguration:f,scrollableAncestors:v,scrollableAncestorRects:E,windowRect:g}=kf(),T=R.useContext(Rr),x=Yf(u==null?void 0:u.id),D=Ua(i,{activatorEvent:d,active:u,activeNodeRect:b,containerNodeRect:y,draggingNodeRect:w.rect,over:m,overlayNodeRect:w.rect,scrollableAncestors:v,scrollableAncestorRects:E,transform:T,windowRect:g}),k=ts(b),_=Hf({config:r,draggableNodes:C,droppableContainers:h,measuringConfiguration:f}),N=k?w.setRef:void 0;return R.createElement(jf,null,R.createElement(Nf,{animation:_},u&&x?R.createElement(Ff,{key:x,id:u.id,ref:N,as:a,activatorEvent:d,adjustScale:t,className:c,transition:s,rect:k,style:{zIndex:l,...o},transform:D},n):null))}),dt=()=>{const e=R.use(ya);if(!e)throw new Error("useBookingModal must be used within a BookingModalProvider");return e};function Ka(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ka(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ga(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ka(e))&&(r&&(r+=" "),r+=t);return r}const os="-",Kf=e=>{const t=qf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(os);return a[0]===""&&a.length!==1&&a.shift(),qa(a,t)||Gf(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},qa=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?qa(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(os);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},ui=/^\[(.+)\]$/,Gf=e=>{if(ui.test(e)){const t=ui.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},qf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Mo(n[o],r,o,t);return r},Mo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:di(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Xf(o)){Mo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Mo(i,di(t,s),n,r)})})},di=(e,t)=>{let n=e;return t.split(os).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Xf=e=>e.isThemeGetter,Zf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Oo="!",Po=":",Jf=Po.length,Qf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,l;for(let C=0;C<o.length;C++){let h=o[C];if(i===0&&a===0){if(h===Po){s.push(o.slice(c,C)),c=C+Jf;continue}if(h==="/"){l=C;continue}}h==="["?i++:h==="]"?i--:h==="("?a++:h===")"&&a--}const d=s.length===0?o:o.substring(c),u=ep(d),b=u!==d,y=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:u,maybePostfixModifierPosition:y}};if(t){const o=t+Po,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},ep=e=>e.endsWith(Oo)?e.substring(0,e.length-1):e.startsWith(Oo)?e.substring(1):e,tp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},np=e=>({cache:Zf(e.cacheSize),parseClassName:Qf(e),sortModifiers:tp(e),...Kf(e)}),rp=/\s+/,op=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(rp);let c="";for(let l=a.length-1;l>=0;l-=1){const d=a[l],{isExternal:u,modifiers:b,hasImportantModifier:y,baseClassName:C,maybePostfixModifierPosition:h}=n(d);if(u){c=d+(c.length>0?" "+c:c);continue}let w=!!h,m=r(w?C.substring(0,h):C);if(!m){if(!w){c=d+(c.length>0?" "+c:c);continue}if(m=r(C),!m){c=d+(c.length>0?" "+c:c);continue}w=!1}const f=s(b).join(":"),v=y?f+Oo:f,E=v+m;if(i.includes(E))continue;i.push(E);const g=o(m,w);for(let T=0;T<g.length;++T){const x=g[T];i.push(v+x)}c=d+(c.length>0?" "+c:c)}return c};function sp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Xa(t))&&(r&&(r+=" "),r+=n);return r}const Xa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Xa(e[r]))&&(n&&(n+=" "),n+=t);return n};function ip(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((d,u)=>u(d),e());return n=np(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const d=op(c,n);return o(c,d),d}return function(){return s(sp.apply(null,arguments))}}const pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Za=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ja=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ap=/^\d+\/\d+$/,cp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,up=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,dp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kt=e=>ap.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),it=e=>!!e&&Number.isInteger(Number(e)),to=e=>e.endsWith("%")&&re(e.slice(0,-1)),Ke=e=>cp.test(e),pp=()=>!0,hp=e=>lp.test(e)&&!up.test(e),Qa=()=>!1,gp=e=>dp.test(e),mp=e=>fp.test(e),vp=e=>!J(e)&&!Q(e),yp=e=>Ut(e,nc,Qa),J=e=>Za.test(e),xt=e=>Ut(e,rc,hp),no=e=>Ut(e,Cp,re),fi=e=>Ut(e,ec,Qa),bp=e=>Ut(e,tc,mp),Wn=e=>Ut(e,oc,gp),Q=e=>Ja.test(e),rn=e=>Kt(e,rc),wp=e=>Kt(e,Ep),pi=e=>Kt(e,ec),xp=e=>Kt(e,nc),Sp=e=>Kt(e,tc),Bn=e=>Kt(e,oc,!0),Ut=(e,t,n)=>{const r=Za.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kt=(e,t,n=!1)=>{const r=Ja.exec(e);return r?r[1]?t(r[1]):n:!1},ec=e=>e==="position"||e==="percentage",tc=e=>e==="image"||e==="url",nc=e=>e==="length"||e==="size"||e==="bg-size",rc=e=>e==="length",Cp=e=>e==="number",Ep=e=>e==="family-name",oc=e=>e==="shadow",Dp=()=>{const e=pe("color"),t=pe("font"),n=pe("text"),r=pe("font-weight"),o=pe("tracking"),s=pe("leading"),i=pe("breakpoint"),a=pe("container"),c=pe("spacing"),l=pe("radius"),d=pe("shadow"),u=pe("inset-shadow"),b=pe("text-shadow"),y=pe("drop-shadow"),C=pe("blur"),h=pe("perspective"),w=pe("aspect"),m=pe("ease"),f=pe("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],g=()=>[...E(),Q,J],T=()=>["auto","hidden","clip","visible","scroll"],x=()=>["auto","contain","none"],D=()=>[Q,J,c],k=()=>[kt,"full","auto",...D()],_=()=>[it,"none","subgrid",Q,J],N=()=>["auto",{span:["full",it,Q,J]},it,Q,J],B=()=>[it,"auto",Q,J],U=()=>["auto","min","max","fr",Q,J],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...D()],j=()=>[kt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],M=()=>[e,Q,J],A=()=>[...E(),pi,fi,{position:[Q,J]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",xp,yp,{size:[Q,J]}],Y=()=>[to,rn,xt],V=()=>["","none","full",l,Q,J],H=()=>["",re,rn,xt],Z=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[re,to,pi,fi],q=()=>["","none",C,Q,J],K=()=>["none",re,Q,J],L=()=>["none",re,Q,J],X=()=>[re,Q,J],F=()=>[kt,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ke],breakpoint:[Ke],color:[pp],container:[Ke],"drop-shadow":[Ke],ease:["in","out","in-out"],font:[vp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ke],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ke],shadow:[Ke],spacing:["px",re],text:[Ke],"text-shadow":[Ke],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kt,J,Q,w]}],container:["container"],columns:[{columns:[re,J,Q,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:g()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[it,"auto",Q,J]}],basis:[{basis:[kt,"full","auto",a,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,kt,"auto","initial","none",J]}],grow:[{grow:["",re,Q,J]}],shrink:[{shrink:["",re,Q,J]}],order:[{order:[it,"first","last","none",Q,J]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...j()]}],h:[{h:["screen",...j()]}],"min-h":[{"min-h":["screen","none",...j()]}],"max-h":[{"max-h":["screen",...j()]}],"font-size":[{text:["base",n,rn,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Q,no]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",to,J]}],"font-family":[{font:[wp,J,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,J]}],"line-clamp":[{"line-clamp":[re,"none",Q,no]}],leading:[{leading:[s,...D()]}],"list-image":[{"list-image":["none",Q,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Q,xt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[re,"auto",Q,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},it,Q,J],radial:["",Q,J],conic:[it,Q,J]},Sp,bp]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,Q,J]}],"outline-w":[{outline:["",re,rn,xt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,Bn,Wn]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",u,Bn,Wn]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[re,xt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",b,Bn,Wn]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[re,Q,J]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Q,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Q,J]}],filter:[{filter:["","none",Q,J]}],blur:[{blur:q()}],brightness:[{brightness:[re,Q,J]}],contrast:[{contrast:[re,Q,J]}],"drop-shadow":[{"drop-shadow":["","none",y,Bn,Wn]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",re,Q,J]}],"hue-rotate":[{"hue-rotate":[re,Q,J]}],invert:[{invert:["",re,Q,J]}],saturate:[{saturate:[re,Q,J]}],sepia:[{sepia:["",re,Q,J]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,J]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[re,Q,J]}],"backdrop-contrast":[{"backdrop-contrast":[re,Q,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,Q,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,Q,J]}],"backdrop-invert":[{"backdrop-invert":["",re,Q,J]}],"backdrop-opacity":[{"backdrop-opacity":[re,Q,J]}],"backdrop-saturate":[{"backdrop-saturate":[re,Q,J]}],"backdrop-sepia":[{"backdrop-sepia":["",re,Q,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",Q,J]}],ease:[{ease:["linear","initial",m,Q,J]}],delay:[{delay:[re,Q,J]}],animate:[{animate:["none",f,Q,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,Q,J]}],"perspective-origin":[{"perspective-origin":g()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[Q,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:g()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q,J]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,J]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[re,rn,xt,no]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Tp=ip(Dp);function ie(...e){return Tp(Ga(e))}const Rp=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=Oe(),{updateMonthMessage:o,updateHeaderDateLabel:s}=Ea(b=>b),{onViewTypeChange:i}=Ca(),{onHeaderDayClick:a}=dt(),c=R.useCallback(b=>{const y=()=>{r(ne.WEEK),i(ne.WEEK)},C=()=>t===ne.DAY;if(a==null||a(b,t),C())return y();const h=n(b);if(!h)return;const w={month:h.getMonth(),fullYear:h.getFullYear(),monthMessage:It[h.getMonth()]};o(w),r(ne.DAY)},[t,n,o,r]),l=t===ne.TABLE?{justifySelf:"start"}:{},d=R.useMemo(()=>{const b=y=>new Date(y).toDateString()===new Date().toDateString();return e.map(y=>{const C=Co[new Date(y).getDay()];return p.jsx("th",{className:ie("daysOfWeek",t!==ne.DAY&&"daysOfWeek_day"),children:p.jsxs("div",{style:l,className:"daysOfWeek_parent",children:[p.jsx("span",{className:ie(b(y)&&"daysOfWeek_day_today_title"),children:C}),p.jsx("div",{style:{width:"100%"},children:p.jsx("button",{type:"button",className:ie("daysOfWeek_day",b(y)?"daysOfWeek_day_today":"daysOfWeek_day_rest"),onClick:()=>c(y),children:te.formatDate(y.toDateString())})})]})},C)})},[e,c,t]),u=p.jsx("th",{style:l,className:"calendarHeader",children:p.jsx("div",{className:"daysOfWeek_emptySlot"})},"emptyBlocks");return R.useEffect(()=>{switch(t){case ne.DAY:{s(e[0]);break}case ne.WEEK:{const b=te.generateWeekMonthLabel(e);o({monthMessage:b})}}},[e]),p.jsx("table",{className:"daysOfWeek_emptySlot_table",children:p.jsx("tbody",{children:p.jsxs("tr",{children:[u,d]})})})};/**
5
+ `},_d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Nd(e){let{announcements:t=_d,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Ad}=e;const{announce:s,announcement:i}=Pd(),a=Tr("DndLiveRegion"),[c,l]=R.useState(!1);if(R.useEffect(()=>{l(!0)},[]),Dn(R.useMemo(()=>({onDragStart(u){let{active:b}=u;s(t.onDragStart({active:b}))},onDragMove(u){let{active:b,over:y}=u;t.onDragMove&&s(t.onDragMove({active:b,over:y}))},onDragOver(u){let{active:b,over:y}=u;s(t.onDragOver({active:b,over:y}))},onDragEnd(u){let{active:b,over:y}=u;s(t.onDragEnd({active:b,over:y}))},onDragCancel(u){let{active:b,over:y}=u;s(t.onDragCancel({active:b,over:y}))}}),[s,t])),!c)return null;const f=R.createElement(R.Fragment,null,R.createElement(Md,{id:r,value:o.draggable}),R.createElement(Od,{id:a,announcement:i}));return n?Ke.createPortal(f,n):f}var he;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(he||(he={}));function pr(){}function Qs(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Id(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Ie=Object.freeze({x:0,y:0});function jd(e,t){const n=fr(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Ld(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function $d(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Fd(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,l=e.width*e.height,f=i*a,u=f/(c+l-f);return Number(u.toFixed(4))}return 0}const zd=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=Fd(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(Ld)};function Wd(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Pa(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ie}function Bd(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const Hd=Bd(1);function ka(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Vd(e,t,n){const r=ka(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),l=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,u=s?e.height/s:e.height;return{width:f,height:u,top:l,right:c+f,bottom:l+u,left:c}}const Yd={ignoreTransform:!1};function Tn(e,t){t===void 0&&(t=Yd);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:f}=be(e).getComputedStyle(e);l&&(n=Vd(n,l,f))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function ei(e){return Tn(e,{ignoreTransform:!0})}function Ud(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Kd(e,t){return t===void 0&&(t=be(e).getComputedStyle(e)),t.position==="fixed"}function Gd(e,t){t===void 0&&(t=be(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function Jo(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Xo(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Cn(o)||Ra(o)||n.includes(o))return n;const s=be(e).getComputedStyle(o);return o!==e&&Gd(o,s)&&n.push(o),Kd(o,s)?n:r(o.parentNode)}return e?r(e):n}function Aa(e){const[t]=Jo(e,1);return t??null}function Qr(e){return!Er||!e?null:Vt(e)?e:qo(e)?Xo(e)||e===Yt(e).scrollingElement?window:Cn(e)?e:null:null}function _a(e){return Vt(e)?e.scrollX:e.scrollLeft}function Na(e){return Vt(e)?e.scrollY:e.scrollTop}function Do(e){return{x:_a(e),y:Na(e)}}var ge;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ge||(ge={}));function Ia(e){return!Er||!e?!1:e===document.scrollingElement}function ja(e){const t={x:0,y:0},n=Ia(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const qd={x:.2,y:.2};function Xd(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=qd);const{isTop:l,isBottom:f,isLeft:u,isRight:b}=ja(e),y={x:0,y:0},C={x:0,y:0},p={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+p.height?(y.y=ge.Backward,C.y=r*Math.abs((t.top+p.height-s)/p.height)):!f&&c>=t.bottom-p.height&&(y.y=ge.Forward,C.y=r*Math.abs((t.bottom-p.height-c)/p.height)),!b&&a>=t.right-p.width?(y.x=ge.Forward,C.x=r*Math.abs((t.right-p.width-a)/p.width)):!u&&i<=t.left+p.width&&(y.x=ge.Backward,C.x=r*Math.abs((t.left+p.width-i)/p.width)),{direction:y,speed:C}}function Zd(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function La(e){return e.reduce((t,n)=>Lt(t,Do(n)),Ie)}function Jd(e){return e.reduce((t,n)=>t+_a(n),0)}function Qd(e){return e.reduce((t,n)=>t+Na(n),0)}function $a(e,t){if(t===void 0&&(t=Tn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Aa(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ef=[["x",["left","right"],Jd],["y",["top","bottom"],Qd]];class Qo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Jo(n),o=La(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of ef)for(const c of i)Object.defineProperty(this,c,{get:()=>{const l=a(r),f=o[s]-l;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class pn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function tf(e){const{EventTarget:t}=be(e);return e instanceof t?e:Yt(e)}function eo(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ke;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ke||(ke={}));function ti(e){e.preventDefault()}function nf(e){e.stopPropagation()}var ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ue||(ue={}));const Fa={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter,ue.Tab]},rf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ue.Right:return{...n,x:n.x+25};case ue.Left:return{...n,x:n.x-25};case ue.Down:return{...n,y:n.y+25};case ue.Up:return{...n,y:n.y-25}}};class za{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new pn(Yt(n)),this.windowListeners=new pn(be(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ke.Resize,this.handleCancel),this.windowListeners.add(ke.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ke.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&$a(r),n(Ie)}handleKeyDown(t){if(Zo(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Fa,coordinateGetter:i=rf,scrollBehavior:a="smooth"}=o,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:l}=r.current,f=l?{x:l.left,y:l.top}:Ie;this.referenceCoordinates||(this.referenceCoordinates=f);const u=i(t,{active:n,context:r.current,currentCoordinates:f});if(u){const b=dr(u,f),y={x:0,y:0},{scrollableAncestors:C}=r.current;for(const p of C){const x=t.code,{isTop:g,isRight:d,isLeft:m,isBottom:E,maxScroll:v,minScroll:T}=ja(p),w=Zd(p),D={x:Math.min(x===ue.Right?w.right-w.width/2:w.right,Math.max(x===ue.Right?w.left:w.left+w.width/2,u.x)),y:Math.min(x===ue.Down?w.bottom-w.height/2:w.bottom,Math.max(x===ue.Down?w.top:w.top+w.height/2,u.y))},P=x===ue.Right&&!d||x===ue.Left&&!m,_=x===ue.Down&&!E||x===ue.Up&&!g;if(P&&D.x!==u.x){const I=p.scrollLeft+b.x,H=x===ue.Right&&I<=v.x||x===ue.Left&&I>=T.x;if(H&&!b.y){p.scrollTo({left:I,behavior:a});return}H?y.x=p.scrollLeft-I:y.x=x===ue.Right?p.scrollLeft-v.x:p.scrollLeft-T.x,y.x&&p.scrollBy({left:-y.x,behavior:a});break}else if(_&&D.y!==u.y){const I=p.scrollTop+b.y,H=x===ue.Down&&I<=v.y||x===ue.Up&&I>=T.y;if(H&&!b.x){p.scrollTo({top:I,behavior:a});return}H?y.y=p.scrollTop-I:y.y=x===ue.Down?p.scrollTop-v.y:p.scrollTop-T.y,y.y&&p.scrollBy({top:-y.y,behavior:a});break}}this.handleMove(t,Lt(dr(u,this.referenceCoordinates),y))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}za.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Fa,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function ni(e){return!!(e&&"distance"in e)}function ri(e){return!!(e&&"delay"in e)}class es{constructor(t,n,r){var o;r===void 0&&(r=tf(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=Yt(i),this.documentListeners=new pn(this.document),this.listeners=new pn(r),this.windowListeners=new pn(be(i)),this.initialCoordinates=(o=fr(s))!=null?o:Ie,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ke.Resize,this.handleCancel),this.windowListeners.add(ke.DragStart,ti),this.windowListeners.add(ke.VisibilityChange,this.handleCancel),this.windowListeners.add(ke.ContextMenu,ti),this.documentListeners.add(ke.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ri(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(ni(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ke.Click,nf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ke.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const c=(n=fr(t))!=null?n:Ie,l=dr(o,c);if(!r&&a){if(ni(a)){if(a.tolerance!=null&&eo(l,a.tolerance))return this.handleCancel();if(eo(l,a.distance))return this.handleStart()}if(ri(a)&&eo(l,a.tolerance))return this.handleCancel();this.handlePending(a,l);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const of={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wa extends es{constructor(t){const{event:n}=t,r=Yt(n.target);super(t,of,r)}}Wa.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const sf={move:{name:"mousemove"},end:{name:"mouseup"}};var To;(function(e){e[e.RightClick=2]="RightClick"})(To||(To={}));class Ba extends es{constructor(t){super(t,sf,Yt(t.event.target))}}Ba.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===To.RightClick?!1:(r==null||r({event:n}),!0)}}];const to={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ha extends es{constructor(t){super(t,to)}static setup(){return window.addEventListener(to.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(to.move.name,t)};function t(){}}}Ha.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var hn;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hn||(hn={}));var hr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(hr||(hr={}));function af(e){let{acceleration:t,activator:n=hn.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=hr.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:f,delta:u,threshold:b}=e;const y=lf({delta:u,disabled:!s}),[C,p]=Cd(),x=R.useRef({x:0,y:0}),g=R.useRef({x:0,y:0}),d=R.useMemo(()=>{switch(n){case hn.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case hn.DraggableRect:return o}},[n,o,c]),m=R.useRef(null),E=R.useCallback(()=>{const T=m.current;if(!T)return;const w=x.current.x*g.current.x,D=x.current.y*g.current.y;T.scrollBy(w,D)},[]),v=R.useMemo(()=>a===hr.TreeOrder?[...l].reverse():l,[a,l]);R.useEffect(()=>{if(!s||!l.length||!d){p();return}for(const T of v){if((r==null?void 0:r(T))===!1)continue;const w=l.indexOf(T),D=f[w];if(!D)continue;const{direction:P,speed:_}=Xd(T,D,d,t,b);for(const I of["x","y"])y[I][P[I]]||(_[I]=0,P[I]=0);if(_.x>0||_.y>0){p(),m.current=T,C(E,i),x.current=_,g.current=P;return}}x.current={x:0,y:0},g.current={x:0,y:0},p()},[t,E,r,p,s,i,JSON.stringify(d),JSON.stringify(y),C,l,v,f,JSON.stringify(b)])}const cf={x:{[ge.Backward]:!1,[ge.Forward]:!1},y:{[ge.Backward]:!1,[ge.Forward]:!1}};function lf(e){let{delta:t,disabled:n}=e;const r=ur(t);return En(o=>{if(n||!r||!o)return cf;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ge.Backward]:o.x[ge.Backward]||s.x===-1,[ge.Forward]:o.x[ge.Forward]||s.x===1},y:{[ge.Backward]:o.y[ge.Backward]||s.y===-1,[ge.Forward]:o.y[ge.Forward]||s.y===1}}},[n,t,r])}function uf(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return En(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function df(e,t){return R.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var yn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(yn||(yn={}));var Ro;(function(e){e.Optimized="optimized"})(Ro||(Ro={}));const oi=new Map;function ff(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=R.useState(null),{frequency:a,measure:c,strategy:l}=o,f=R.useRef(e),u=x(),b=mn(u),y=R.useCallback(function(g){g===void 0&&(g=[]),!b.current&&i(d=>d===null?g:d.concat(g.filter(m=>!d.includes(m))))},[b]),C=R.useRef(null),p=En(g=>{if(u&&!n)return oi;if(!g||g===oi||f.current!==e||s!=null){const d=new Map;for(let m of e){if(!m)continue;if(s&&s.length>0&&!s.includes(m.id)&&m.rect.current){d.set(m.id,m.rect.current);continue}const E=m.node.current,v=E?new Qo(c(E),E):null;m.rect.current=v,v&&d.set(m.id,v)}return d}return g},[e,s,n,u,c]);return R.useEffect(()=>{f.current=e},[e]),R.useEffect(()=>{u||y()},[n,u]),R.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),R.useEffect(()=>{u||typeof a!="number"||C.current!==null||(C.current=setTimeout(()=>{y(),C.current=null},a))},[a,u,y,...r]),{droppableRects:p,measureDroppableContainers:y,measuringScheduled:s!=null};function x(){switch(l){case yn.Always:return!1;case yn.BeforeDragging:return n;default:return!n}}}function ts(e,t){return En(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function pf(e,t){return ts(e,t)}function hf(e){let{callback:t,disabled:n}=e;const r=Dr(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Rr(e){let{callback:t,disabled:n}=e;const r=Dr(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function gf(e){return new Qo(Tn(e),e)}function si(e,t,n){t===void 0&&(t=gf);const[r,o]=R.useState(null);function s(){o(c=>{if(!e)return null;if(e.isConnected===!1){var l;return(l=c??n)!=null?l:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const i=hf({callback(c){if(e)for(const l of c){const{type:f,target:u}=l;if(f==="childList"&&u instanceof HTMLElement&&u.contains(e)){s();break}}}}),a=Rr({callback:s});return Ge(()=>{s(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r}function mf(e){const t=ts(e);return Pa(e,t)}const ii=[];function vf(e){const t=R.useRef(e),n=En(r=>e?r&&r!==ii&&e&&t.current&&e.parentNode===t.current.parentNode?r:Jo(e):ii,[e]);return R.useEffect(()=>{t.current=e},[e]),n}function yf(e){const[t,n]=R.useState(null),r=R.useRef(e),o=R.useCallback(s=>{const i=Qr(s.target);i&&n(a=>a?(a.set(i,Do(i)),new Map(a)):null)},[]);return R.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=Qr(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,Do(l)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const l=Qr(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>Lt(s,i),Ie):La(e):Ie,[e,t])}function ai(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==Ie;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?dr(e,n.current):Ie}function bf(e){R.useEffect(()=>{if(!Er)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function wf(e,t){return R.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function Va(e){return R.useMemo(()=>e?Ud(e):null,[e])}const ci=[];function xf(e,t){t===void 0&&(t=Tn);const[n]=e,r=Va(n?be(n):null),[o,s]=R.useState(ci);function i(){s(()=>e.length?e.map(c=>Ia(c)?r:new Qo(t(c),c)):ci)}const a=Rr({callback:i});return Ge(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function Ya(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Cn(t)?t:e}function Sf(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(l=>{for(const{target:f}of l)if(Cn(f)){r(u=>{const b=t(f);return u?{...u,width:b.width,height:b.height}:b});break}},[t]),s=Rr({callback:o}),i=R.useCallback(l=>{const f=Ya(l);s==null||s.disconnect(),f&&(s==null||s.observe(f)),r(f?t(f):null)},[t,s]),[a,c]=lr(i);return R.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Cf=[{sensor:Wa,options:{}},{sensor:za,options:{}}],Ef={current:{}},or={draggable:{measure:ei},droppable:{measure:ei,strategy:yn.WhileDragging,frequency:Ro.Optimized},dragOverlay:{measure:Tn}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Df={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:or,measureDroppableContainers:pr,windowRect:null,measuringScheduled:!1},Ua={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pr,draggableNodes:new Map,over:null,measureDroppableContainers:pr},Rn=R.createContext(Ua),Ka=R.createContext(Df);function Tf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function Rf(e,t){switch(t.type){case he.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case he.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case he.DragEnd:case he.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case he.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new gn(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case he.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new gn(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case he.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new gn(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Mf(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(Rn),s=ur(r),i=ur(n==null?void 0:n.id);return R.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!Zo(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:c,node:l}=a;if(!c.current&&!l.current)return;requestAnimationFrame(()=>{for(const f of[c.current,l.current]){if(!f)continue;const u=Td(f);if(u){u.focus();break}}})}},[r,t,o,i,s]),null}function Ga(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function Of(e){return R.useMemo(()=>({draggable:{...or.draggable,...e==null?void 0:e.draggable},droppable:{...or.droppable,...e==null?void 0:e.droppable},dragOverlay:{...or.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Pf(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=R.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ge(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const f=n(l),u=Pa(f,r);if(i||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const b=Aa(l);b&&b.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Mr=R.createContext({...Ie,scaleX:1,scaleY:1});var ut;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ut||(ut={}));const ns=R.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:f=Cf,collisionDetection:u=zd,measuring:b,modifiers:y,...C}=t;const p=R.useReducer(Rf,void 0,Tf),[x,g]=p,[d,m]=kd(),[E,v]=R.useState(ut.Uninitialized),T=E===ut.Initialized,{draggable:{active:w,nodes:D,translate:P},droppable:{containers:_}}=x,I=w!=null?D.get(w):null,H=R.useRef({initial:null,translated:null}),K=R.useMemo(()=>{var ve;return w!=null?{id:w,data:(ve=I==null?void 0:I.data)!=null?ve:Ef,rect:H}:null},[w,I]),j=R.useRef(null),[F,k]=R.useState(null),[N,M]=R.useState(null),A=mn(C,Object.values(C)),O=Tr("DndDescribedBy",i),L=R.useMemo(()=>_.getEnabled(),[_]),U=Of(b),{droppableRects:Y,measureDroppableContainers:V,measuringScheduled:X}=ff(L,{dragging:T,dependencies:[P.x,P.y],config:U.droppable}),G=uf(D,w),$=R.useMemo(()=>N?fr(N):null,[N]),q=Yu(),W=pf(G,U.draggable.measure);Pf({activeNode:w!=null?D.get(w):null,config:q.layoutShiftCompensation,initialRect:W,measure:U.draggable.measure});const B=si(G,U.draggable.measure,W),Z=si(G?G.parentElement:null),z=R.useRef({activatorEvent:null,active:null,activeNode:G,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:_,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=_.getNodeFor((n=z.current.over)==null?void 0:n.id),de=Sf({measure:U.dragOverlay.measure}),Se=(r=de.nodeRef.current)!=null?r:G,Ce=T?(o=de.rect)!=null?o:B:null,Qe=!!(de.nodeRef.current&&de.rect),Ln=mf(Qe?null:B),et=Va(Se?be(Se):null),tt=vf(T?oe??G:null),$n=xf(tt),Fn=Ga(y,{transform:{x:P.x-Ln.x,y:P.y-Ln.y,scaleX:1,scaleY:1},activatorEvent:N,active:K,activeNodeRect:B,containerNodeRect:Z,draggingNodeRect:Ce,over:z.current.over,overlayNodeRect:de.rect,scrollableAncestors:tt,scrollableAncestorRects:$n,windowRect:et}),Ws=$?Lt($,P):null,Bs=yf(tt),$u=ai(Bs),Fu=ai(Bs,[B]),Ot=Lt(Fn,$u),Pt=Ce?Hd(Ce,Fn):null,Jt=K&&Pt?u({active:K,collisionRect:Pt,droppableRects:Y,droppableContainers:L,pointerCoordinates:Ws}):null,Hs=$d(Jt,"id"),[nt,Vs]=R.useState(null),zu=Qe?Fn:Lt(Fn,Fu),Wu=Wd(zu,(s=nt==null?void 0:nt.rect)!=null?s:null,B),Xr=R.useRef(null),Ys=R.useCallback((ve,Ee)=>{let{sensor:De,options:rt}=Ee;if(j.current==null)return;const Pe=D.get(j.current);if(!Pe)return;const Te=ve.nativeEvent,$e=new De({active:j.current,activeNode:Pe,event:Te,options:rt,context:z,onAbort(me){if(!D.get(me))return;const{onDragAbort:Fe}=A.current,Ye={id:me};Fe==null||Fe(Ye),d({type:"onDragAbort",event:Ye})},onPending(me,ot,Fe,Ye){if(!D.get(me))return;const{onDragPending:en}=A.current,st={id:me,constraint:ot,initialCoordinates:Fe,offset:Ye};en==null||en(st),d({type:"onDragPending",event:st})},onStart(me){const ot=j.current;if(ot==null)return;const Fe=D.get(ot);if(!Fe)return;const{onDragStart:Ye}=A.current,Qt={activatorEvent:Te,active:{id:ot,data:Fe.data,rect:H}};Ke.unstable_batchedUpdates(()=>{Ye==null||Ye(Qt),v(ut.Initializing),g({type:he.DragStart,initialCoordinates:me,active:ot}),d({type:"onDragStart",event:Qt}),k(Xr.current),M(Te)})},onMove(me){g({type:he.DragMove,coordinates:me})},onEnd:kt(he.DragEnd),onCancel:kt(he.DragCancel)});Xr.current=$e;function kt(me){return async function(){const{active:Fe,collisions:Ye,over:Qt,scrollAdjustedTranslate:en}=z.current;let st=null;if(Fe&&en){const{cancelDrop:tn}=A.current;st={activatorEvent:Te,active:Fe,collisions:Ye,delta:en,over:Qt},me===he.DragEnd&&typeof tn=="function"&&await Promise.resolve(tn(st))&&(me=he.DragCancel)}j.current=null,Ke.unstable_batchedUpdates(()=>{g({type:me}),v(ut.Uninitialized),Vs(null),k(null),M(null),Xr.current=null;const tn=me===he.DragEnd?"onDragEnd":"onDragCancel";if(st){const Zr=A.current[tn];Zr==null||Zr(st),d({type:tn,event:st})}})}}},[D]),Bu=R.useCallback((ve,Ee)=>(De,rt)=>{const Pe=De.nativeEvent,Te=D.get(rt);if(j.current!==null||!Te||Pe.dndKit||Pe.defaultPrevented)return;const $e={active:Te};ve(De,Ee.options,$e)===!0&&(Pe.dndKit={capturedBy:Ee.sensor},j.current=rt,Ys(De,Ee))},[D,Ys]),Us=df(f,Bu);bf(f),Ge(()=>{B&&E===ut.Initializing&&v(ut.Initialized)},[B,E]),R.useEffect(()=>{const{onDragMove:ve}=A.current,{active:Ee,activatorEvent:De,collisions:rt,over:Pe}=z.current;if(!Ee||!De)return;const Te={active:Ee,activatorEvent:De,collisions:rt,delta:{x:Ot.x,y:Ot.y},over:Pe};Ke.unstable_batchedUpdates(()=>{ve==null||ve(Te),d({type:"onDragMove",event:Te})})},[Ot.x,Ot.y]),R.useEffect(()=>{const{active:ve,activatorEvent:Ee,collisions:De,droppableContainers:rt,scrollAdjustedTranslate:Pe}=z.current;if(!ve||j.current==null||!Ee||!Pe)return;const{onDragOver:Te}=A.current,$e=rt.get(Hs),kt=$e&&$e.rect.current?{id:$e.id,rect:$e.rect.current,data:$e.data,disabled:$e.disabled}:null,me={active:ve,activatorEvent:Ee,collisions:De,delta:{x:Pe.x,y:Pe.y},over:kt};Ke.unstable_batchedUpdates(()=>{Vs(kt),Te==null||Te(me),d({type:"onDragOver",event:me})})},[Hs]),Ge(()=>{z.current={activatorEvent:N,active:K,activeNode:G,collisionRect:Pt,collisions:Jt,droppableRects:Y,draggableNodes:D,draggingNode:Se,draggingNodeRect:Ce,droppableContainers:_,over:nt,scrollableAncestors:tt,scrollAdjustedTranslate:Ot},H.current={initial:Ce,translated:Pt}},[K,G,Jt,Pt,D,Se,Ce,Y,_,nt,tt,Ot]),af({...q,delta:P,draggingRect:Pt,pointerCoordinates:Ws,scrollableAncestors:tt,scrollableAncestorRects:$n});const Hu=R.useMemo(()=>({active:K,activeNode:G,activeNodeRect:B,activatorEvent:N,collisions:Jt,containerNodeRect:Z,dragOverlay:de,draggableNodes:D,droppableContainers:_,droppableRects:Y,over:nt,measureDroppableContainers:V,scrollableAncestors:tt,scrollableAncestorRects:$n,measuringConfiguration:U,measuringScheduled:X,windowRect:et}),[K,G,B,N,Jt,Z,de,D,_,Y,nt,V,tt,$n,U,X,et]),Vu=R.useMemo(()=>({activatorEvent:N,activators:Us,active:K,activeNodeRect:B,ariaDescribedById:{draggable:O},dispatch:g,draggableNodes:D,over:nt,measureDroppableContainers:V}),[N,Us,K,B,g,O,D,nt,V]);return R.createElement(Oa.Provider,{value:m},R.createElement(Rn.Provider,{value:Vu},R.createElement(Ka.Provider,{value:Hu},R.createElement(Mr.Provider,{value:Wu},l)),R.createElement(Mf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),R.createElement(Nd,{...a,hiddenTextDescribedById:O}));function Yu(){const ve=(F==null?void 0:F.autoScrollEnabled)===!1,Ee=typeof c=="object"?c.enabled===!1:c===!1,De=T&&!ve&&!Ee;return typeof c=="object"?{...c,enabled:De}:{enabled:De}}}),kf=R.createContext(null),li="button",Af="Draggable";function rs(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Tr(Af),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:f,draggableNodes:u,over:b}=R.useContext(Rn),{role:y=li,roleDescription:C="draggable",tabIndex:p=0}=o??{},x=(c==null?void 0:c.id)===t,g=R.useContext(x?Mr:kf),[d,m]=lr(),[E,v]=lr(),T=wf(i,t),w=mn(n);Ge(()=>(u.set(t,{id:t,key:s,node:d,activatorNode:E,data:w}),()=>{const P=u.get(t);P&&P.key===s&&u.delete(t)}),[u,t]);const D=R.useMemo(()=>({role:y,tabIndex:p,"aria-disabled":r,"aria-pressed":x&&y===li?!0:void 0,"aria-roledescription":C,"aria-describedby":f.draggable}),[r,y,p,x,C,f.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:D,isDragging:x,listeners:r?void 0:T,node:d,over:b,setNodeRef:m,setActivatorNodeRef:v,transform:g}}function _f(){return R.useContext(Ka)}const Nf="Droppable",If={timeout:25};function zn(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Tr(Nf),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=R.useContext(Rn),f=R.useRef({disabled:n}),u=R.useRef(!1),b=R.useRef(null),y=R.useRef(null),{disabled:C,updateMeasurementsFor:p,timeout:x}={...If,...o},g=mn(p??r),d=R.useCallback(()=>{if(!u.current){u.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{l(Array.isArray(g.current)?g.current:[g.current]),y.current=null},x)},[x]),m=Rr({callback:d,disabled:C||!i}),E=R.useCallback((D,P)=>{m&&(P&&(m.unobserve(P),u.current=!1),D&&m.observe(D))},[m]),[v,T]=lr(E),w=mn(t);return R.useEffect(()=>{!m||!v.current||(m.disconnect(),u.current=!1,m.observe(v.current))},[v,m]),R.useEffect(()=>(a({type:he.RegisterDroppable,element:{id:r,key:s,disabled:n,node:v,rect:b,data:w}}),()=>a({type:he.UnregisterDroppable,key:s,id:r})),[r]),R.useEffect(()=>{n!==f.current.disabled&&(a({type:he.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,a]),{active:i,rect:b,isOver:(c==null?void 0:c.id)===r,node:v,over:c,setNodeRef:T}}function jf(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[s,i]=R.useState(null),a=ur(n);return!n&&!r&&a&&o(a),Ge(()=>{if(!s)return;const c=r==null?void 0:r.key,l=r==null?void 0:r.props.id;if(c==null||l==null){o(null);return}Promise.resolve(t(l,s)).then(()=>{o(null)})},[t,r,s]),R.createElement(R.Fragment,null,n,r?R.cloneElement(r,{ref:i}):null)}const Lf={x:0,y:0,scaleX:1,scaleY:1};function $f(e){let{children:t}=e;return R.createElement(Rn.Provider,{value:Ua},R.createElement(Mr.Provider,{value:Lf},t))}const Ff={position:"fixed",touchAction:"none"},zf=e=>Zo(e)?"transform 250ms ease":void 0,Wf=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:f=zf}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},b={...Ff,width:a.width,height:a.height,top:a.top,left:a.left,transform:vn.Transform.toString(u),transformOrigin:o&&r?jd(r,a):void 0,transition:typeof f=="function"?f(r):f,...c};return R.createElement(n,{className:i,style:b,ref:t},s)}),Bf=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:s,className:i}=e;if(s!=null&&s.active)for(const[a,c]of Object.entries(s.active))c!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,c));if(s!=null&&s.dragOverlay)for(const[a,c]of Object.entries(s.dragOverlay))c!==void 0&&r.node.style.setProperty(a,c);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[c,l]of Object.entries(o))n.node.style.setProperty(c,l);i!=null&&i.active&&n.node.classList.remove(i.active)}},Hf=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:vn.Transform.toString(t)},{transform:vn.Transform.toString(n)}]},Vf={duration:250,easing:"ease",keyframes:Hf,sideEffects:Bf({styles:{active:{opacity:"0"}}})};function Yf(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Dr((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=Ya(i);if(!l)return;const{transform:f}=be(i).getComputedStyle(i),u=ka(f);if(!u)return;const b=typeof t=="function"?t:Uf(t);return $a(c,o.draggable.measure),b({active:{id:s,data:a.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:o,transform:u})})}function Uf(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...Vf,...e};return s=>{let{active:i,dragOverlay:a,transform:c,...l}=s;if(!t)return;const f={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:c.scaleX!==1?i.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?i.rect.height*c.scaleY/a.rect.height:1},b={x:c.x-f.x,y:c.y-f.y,...u},y=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:b}}),[C]=y,p=y[y.length-1];if(JSON.stringify(C)===JSON.stringify(p))return;const x=r==null?void 0:r({active:i,dragOverlay:a,...l}),g=a.node.animate(y,{duration:t,easing:n,fill:"forwards"});return new Promise(d=>{g.onfinish=()=>{x==null||x(),d()}})}}let ui=0;function Kf(e){return R.useMemo(()=>{if(e!=null)return ui++,ui},[e])}const Gf=R.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:c,zIndex:l=999}=e;const{activatorEvent:f,active:u,activeNodeRect:b,containerNodeRect:y,draggableNodes:C,droppableContainers:p,dragOverlay:x,over:g,measuringConfiguration:d,scrollableAncestors:m,scrollableAncestorRects:E,windowRect:v}=_f(),T=R.useContext(Mr),w=Kf(u==null?void 0:u.id),D=Ga(i,{activatorEvent:f,active:u,activeNodeRect:b,containerNodeRect:y,draggingNodeRect:x.rect,over:g,overlayNodeRect:x.rect,scrollableAncestors:m,scrollableAncestorRects:E,transform:T,windowRect:v}),P=ts(b),_=Yf({config:r,draggableNodes:C,droppableContainers:p,measuringConfiguration:d}),I=P?x.setRef:void 0;return R.createElement($f,null,R.createElement(jf,{animation:_},u&&w?R.createElement(Wf,{key:w,id:u.id,ref:I,as:a,activatorEvent:f,adjustScale:t,className:c,transition:s,rect:P,style:{zIndex:l,...o},transform:D},n):null))}),qe=()=>{const e=R.use(wa);if(!e)throw new Error("useBookingModal must be used within a BookingModalProvider");return e};function qa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qa(e))&&(r&&(r+=" "),r+=t);return r}const os="-",qf=e=>{const t=Zf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(os);return a[0]===""&&a.length!==1&&a.shift(),Za(a,t)||Xf(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Za=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Za(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(os);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},di=/^\[(.+)\]$/,Xf=e=>{if(di.test(e)){const t=di.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Zf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Mo(n[o],r,o,t);return r},Mo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:fi(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Jf(o)){Mo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Mo(i,fi(t,s),n,r)})})},fi=(e,t)=>{let n=e;return t.split(os).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Jf=e=>e.isThemeGetter,Qf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Oo="!",Po=":",ep=Po.length,tp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,l;for(let C=0;C<o.length;C++){let p=o[C];if(i===0&&a===0){if(p===Po){s.push(o.slice(c,C)),c=C+ep;continue}if(p==="/"){l=C;continue}}p==="["?i++:p==="]"?i--:p==="("?a++:p===")"&&a--}const f=s.length===0?o:o.substring(c),u=np(f),b=u!==f,y=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:u,maybePostfixModifierPosition:y}};if(t){const o=t+Po,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},np=e=>e.endsWith(Oo)?e.substring(0,e.length-1):e.startsWith(Oo)?e.substring(1):e,rp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},op=e=>({cache:Qf(e.cacheSize),parseClassName:tp(e),sortModifiers:rp(e),...qf(e)}),sp=/\s+/,ip=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(sp);let c="";for(let l=a.length-1;l>=0;l-=1){const f=a[l],{isExternal:u,modifiers:b,hasImportantModifier:y,baseClassName:C,maybePostfixModifierPosition:p}=n(f);if(u){c=f+(c.length>0?" "+c:c);continue}let x=!!p,g=r(x?C.substring(0,p):C);if(!g){if(!x){c=f+(c.length>0?" "+c:c);continue}if(g=r(C),!g){c=f+(c.length>0?" "+c:c);continue}x=!1}const d=s(b).join(":"),m=y?d+Oo:d,E=m+g;if(i.includes(E))continue;i.push(E);const v=o(g,x);for(let T=0;T<v.length;++T){const w=v[T];i.push(m+w)}c=f+(c.length>0?" "+c:c)}return c};function ap(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ja(t))&&(r&&(r+=" "),r+=n);return r}const Ja=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ja(e[r]))&&(n&&(n+=" "),n+=t);return n};function cp(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((f,u)=>u(f),e());return n=op(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const f=ip(c,n);return o(c,f),f}return function(){return s(ap.apply(null,arguments))}}const pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Qa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ec=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lp=/^\d+\/\d+$/,up=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,pp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,At=e=>lp.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),it=e=>!!e&&Number.isInteger(Number(e)),no=e=>e.endsWith("%")&&re(e.slice(0,-1)),Ue=e=>up.test(e),gp=()=>!0,mp=e=>dp.test(e)&&!fp.test(e),tc=()=>!1,vp=e=>pp.test(e),yp=e=>hp.test(e),bp=e=>!J(e)&&!Q(e),wp=e=>Ut(e,oc,tc),J=e=>Qa.test(e),xt=e=>Ut(e,sc,mp),ro=e=>Ut(e,Dp,re),pi=e=>Ut(e,nc,tc),xp=e=>Ut(e,rc,yp),Wn=e=>Ut(e,ic,vp),Q=e=>ec.test(e),rn=e=>Kt(e,sc),Sp=e=>Kt(e,Tp),hi=e=>Kt(e,nc),Cp=e=>Kt(e,oc),Ep=e=>Kt(e,rc),Bn=e=>Kt(e,ic,!0),Ut=(e,t,n)=>{const r=Qa.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kt=(e,t,n=!1)=>{const r=ec.exec(e);return r?r[1]?t(r[1]):n:!1},nc=e=>e==="position"||e==="percentage",rc=e=>e==="image"||e==="url",oc=e=>e==="length"||e==="size"||e==="bg-size",sc=e=>e==="length",Dp=e=>e==="number",Tp=e=>e==="family-name",ic=e=>e==="shadow",Rp=()=>{const e=pe("color"),t=pe("font"),n=pe("text"),r=pe("font-weight"),o=pe("tracking"),s=pe("leading"),i=pe("breakpoint"),a=pe("container"),c=pe("spacing"),l=pe("radius"),f=pe("shadow"),u=pe("inset-shadow"),b=pe("text-shadow"),y=pe("drop-shadow"),C=pe("blur"),p=pe("perspective"),x=pe("aspect"),g=pe("ease"),d=pe("animate"),m=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...E(),Q,J],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],D=()=>[Q,J,c],P=()=>[At,"full","auto",...D()],_=()=>[it,"none","subgrid",Q,J],I=()=>["auto",{span:["full",it,Q,J]},it,Q,J],H=()=>[it,"auto",Q,J],K=()=>["auto","min","max","fr",Q,J],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...D()],N=()=>[At,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],M=()=>[e,Q,J],A=()=>[...E(),hi,pi,{position:[Q,J]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",Cp,wp,{size:[Q,J]}],U=()=>[no,rn,xt],Y=()=>["","none","full",l,Q,J],V=()=>["",re,rn,xt],X=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[re,no,hi,pi],q=()=>["","none",C,Q,J],W=()=>["none",re,Q,J],B=()=>["none",re,Q,J],Z=()=>[re,Q,J],z=()=>[At,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ue],breakpoint:[Ue],color:[gp],container:[Ue],"drop-shadow":[Ue],ease:["in","out","in-out"],font:[bp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ue],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ue],shadow:[Ue],spacing:["px",re],text:[Ue],"text-shadow":[Ue],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",At,J,Q,x]}],container:["container"],columns:[{columns:[re,J,Q,a]}],"break-after":[{"break-after":m()}],"break-before":[{"break-before":m()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[it,"auto",Q,J]}],basis:[{basis:[At,"full","auto",a,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,At,"auto","initial","none",J]}],grow:[{grow:["",re,Q,J]}],shrink:[{shrink:["",re,Q,J]}],order:[{order:[it,"first","last","none",Q,J]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen",...N()]}],"min-h":[{"min-h":["screen","none",...N()]}],"max-h":[{"max-h":["screen",...N()]}],"font-size":[{text:["base",n,rn,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Q,ro]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",no,J]}],"font-family":[{font:[Sp,J,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,J]}],"line-clamp":[{"line-clamp":[re,"none",Q,ro]}],leading:[{leading:[s,...D()]}],"list-image":[{"list-image":["none",Q,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Q,xt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[re,"auto",Q,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},it,Q,J],radial:["",Q,J],conic:[it,Q,J]},Ep,xp]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,Q,J]}],"outline-w":[{outline:["",re,rn,xt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",f,Bn,Wn]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",u,Bn,Wn]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[re,xt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",b,Bn,Wn]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[re,Q,J]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Q,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Q,J]}],filter:[{filter:["","none",Q,J]}],blur:[{blur:q()}],brightness:[{brightness:[re,Q,J]}],contrast:[{contrast:[re,Q,J]}],"drop-shadow":[{"drop-shadow":["","none",y,Bn,Wn]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",re,Q,J]}],"hue-rotate":[{"hue-rotate":[re,Q,J]}],invert:[{invert:["",re,Q,J]}],saturate:[{saturate:[re,Q,J]}],sepia:[{sepia:["",re,Q,J]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,J]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[re,Q,J]}],"backdrop-contrast":[{"backdrop-contrast":[re,Q,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,Q,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,Q,J]}],"backdrop-invert":[{"backdrop-invert":["",re,Q,J]}],"backdrop-opacity":[{"backdrop-opacity":[re,Q,J]}],"backdrop-saturate":[{"backdrop-saturate":[re,Q,J]}],"backdrop-sepia":[{"backdrop-sepia":["",re,Q,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",Q,J]}],ease:[{ease:["linear","initial",g,Q,J]}],delay:[{delay:[re,Q,J]}],animate:[{animate:["none",d,Q,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,Q,J]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[Q,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q,J]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,J]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[re,rn,xt,ro]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Mp=cp(Rp);function ie(...e){return Mp(Xa(e))}const Op=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=Oe(),{updateMonthMessage:o,updateHeaderDateLabel:s}=Ta(b=>b),{onViewTypeChange:i}=Da(),{onHeaderDayClick:a}=qe(),c=R.useCallback(b=>{const y=()=>{r(ne.WEEK),i(ne.WEEK)},C=()=>t===ne.DAY;if(a==null||a(b,t),C())return y();const p=n(b);if(!p)return;const x={month:p.getMonth(),fullYear:p.getFullYear(),monthMessage:jt[p.getMonth()]};o(x),r(ne.DAY)},[t,n,o,r]),l=t===ne.TABLE?{justifySelf:"start"}:{},f=R.useMemo(()=>{const b=y=>new Date(y).toDateString()===new Date().toDateString();return e.map(y=>{const C=Co[new Date(y).getDay()];return h.jsx("th",{className:ie("daysOfWeek",t!==ne.DAY&&"daysOfWeek_day"),children:h.jsxs("div",{style:l,className:"daysOfWeek_parent",children:[h.jsx("span",{className:ie(b(y)&&"daysOfWeek_day_today_title"),children:C}),h.jsx("div",{style:{width:"100%"},children:h.jsx("button",{type:"button",className:ie("daysOfWeek_day",b(y)?"daysOfWeek_day_today":"daysOfWeek_day_rest"),onClick:()=>c(y),children:te.formatDate(y.toDateString())})})]})},C)})},[e,c,t]),u=h.jsx("th",{style:l,className:"calendarHeader",children:h.jsx("div",{className:"daysOfWeek_emptySlot"})},"emptyBlocks");return R.useEffect(()=>{switch(t){case ne.DAY:{s(e[0]);break}case ne.WEEK:{const b=te.generateWeekMonthLabel(e);o({monthMessage:b})}}},[e]),h.jsx("table",{className:"daysOfWeek_emptySlot_table",children:h.jsx("tbody",{children:h.jsxs("tr",{children:[u,f]})})})};/**
6
6
  * @license lucide-react v0.483.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
- */const Mp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
10
+ */const Pp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ac=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
11
11
  * @license lucide-react v0.483.0 - ISC
12
12
  *
13
13
  * This source code is licensed under the ISC license.
14
14
  * See the LICENSE file in the root directory of this source tree.
15
- */var Op={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
15
+ */var kp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
16
16
  * @license lucide-react v0.483.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
- */const Pp=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>R.createElement("svg",{ref:c,...Op,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:sc("lucide",o),...a},[...i.map(([l,d])=>R.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
20
+ */const Ap=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>R.createElement("svg",{ref:c,...kp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ac("lucide",o),...a},[...i.map(([l,f])=>R.createElement(l,f)),...Array.isArray(s)?s:[s]]));/**
21
21
  * @license lucide-react v0.483.0 - ISC
22
22
  *
23
23
  * This source code is licensed under the ISC license.
24
24
  * See the LICENSE file in the root directory of this source tree.
25
- */const we=(e,t)=>{const n=R.forwardRef(({className:r,...o},s)=>R.createElement(Pp,{ref:s,iconNode:t,className:sc(`lucide-${Mp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
25
+ */const we=(e,t)=>{const n=R.forwardRef(({className:r,...o},s)=>R.createElement(Ap,{ref:s,iconNode:t,className:ac(`lucide-${Pp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
26
26
  * @license lucide-react v0.483.0 - ISC
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
- */const kp=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],Ap=we("Bookmark",kp);/**
30
+ */const _p=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],Np=we("Bookmark",_p);/**
31
31
  * @license lucide-react v0.483.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */const _p=[["path",{d:"m15.2 16.9-.9-.4",key:"1r0w5f"}],["path",{d:"m15.2 19.1-.9.4",key:"j188fs"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"m16.9 15.2-.4-.9",key:"699xu"}],["path",{d:"m16.9 20.8-.4.9",key:"dfjc4z"}],["path",{d:"m19.5 14.3-.4.9",key:"1eb35c"}],["path",{d:"m19.5 21.7-.4-.9",key:"1tonu5"}],["path",{d:"M21 10.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"11kmuh"}],["path",{d:"m21.7 16.5-.9.4",key:"1knoei"}],["path",{d:"m21.7 19.5-.9-.4",key:"q4dx6b"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]],Np=we("CalendarCog",_p);/**
35
+ */const Ip=[["path",{d:"m15.2 16.9-.9-.4",key:"1r0w5f"}],["path",{d:"m15.2 19.1-.9.4",key:"j188fs"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"m16.9 15.2-.4-.9",key:"699xu"}],["path",{d:"m16.9 20.8-.4.9",key:"dfjc4z"}],["path",{d:"m19.5 14.3-.4.9",key:"1eb35c"}],["path",{d:"m19.5 21.7-.4-.9",key:"1tonu5"}],["path",{d:"M21 10.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"11kmuh"}],["path",{d:"m21.7 16.5-.9.4",key:"1knoei"}],["path",{d:"m21.7 19.5-.9-.4",key:"q4dx6b"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]],jp=we("CalendarCog",Ip);/**
36
36
  * @license lucide-react v0.483.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const Ip=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],jp=we("CalendarDays",Ip);/**
40
+ */const Lp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],$p=we("CalendarDays",Lp);/**
41
41
  * @license lucide-react v0.483.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const Lp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ic=we("Check",Lp);/**
45
+ */const Fp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cc=we("Check",Fp);/**
46
46
  * @license lucide-react v0.483.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const $p=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ac=we("ChevronDown",$p);/**
50
+ */const zp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],lc=we("ChevronDown",zp);/**
51
51
  * @license lucide-react v0.483.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const Fp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],zp=we("ChevronLeft",Fp);/**
55
+ */const Wp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bp=we("ChevronLeft",Wp);/**
56
56
  * @license lucide-react v0.483.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const Wp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bp=we("ChevronRight",Wp);/**
60
+ */const Hp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vp=we("ChevronRight",Hp);/**
61
61
  * @license lucide-react v0.483.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const Hp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Vp=we("ChevronUp",Hp);/**
65
+ */const Yp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Up=we("ChevronUp",Yp);/**
66
66
  * @license lucide-react v0.483.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const Yp=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7.5 3v18",key:"w0wo6v"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M16.5 3v18",key:"10tjh1"}]],Up=we("Columns4",Yp);/**
70
+ */const Kp=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7.5 3v18",key:"w0wo6v"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M16.5 3v18",key:"10tjh1"}]],Gp=we("Columns4",Kp);/**
71
71
  * @license lucide-react v0.483.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const Kp=[["path",{d:"M3 2h18",key:"15qxfx"}],["rect",{width:"18",height:"12",x:"3",y:"6",rx:"2",key:"1439r6"}],["path",{d:"M3 22h18",key:"8prr45"}]],Gp=we("GalleryVertical",Kp);/**
75
+ */const qp=[["path",{d:"M3 2h18",key:"15qxfx"}],["rect",{width:"18",height:"12",x:"3",y:"6",rx:"2",key:"1439r6"}],["path",{d:"M3 22h18",key:"8prr45"}]],Xp=we("GalleryVertical",qp);/**
76
76
  * @license lucide-react v0.483.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const qp=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Xp=we("Grid3x3",qp);/**
80
+ */const Zp=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Jp=we("Grid3x3",Zp);/**
81
81
  * @license lucide-react v0.483.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const Zp=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Jp=we("Pencil",Zp);/**
85
+ */const Qp=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],eh=we("Pencil",Qp);/**
86
86
  * @license lucide-react v0.483.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
89
89
  * See the LICENSE file in the root directory of this source tree.
90
- */const Qp=[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]],eh=we("SquareMousePointer",Qp);/**
90
+ */const th=[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]],nh=we("SquareMousePointer",th);/**
91
91
  * @license lucide-react v0.483.0 - ISC
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const th=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],nh=we("Trash2",th);/**
95
+ */const rh=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],oh=we("Trash2",rh);/**
96
96
  * @license lucide-react v0.483.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
- */const rh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oh=we("X",rh);function hi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=hi(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():hi(e[o],null)}}}}function le(...e){return S.useCallback(Mr(...e),e)}function St(e){const t=ih(e),n=S.forwardRef((r,o)=>{const{children:s,...i}=r,a=S.Children.toArray(s),c=a.find(ch);if(c){const l=c.props.children,d=a.map(u=>u===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:u);return p.jsx(t,{...i,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var sh=St("Slot");function ih(e){const t=S.forwardRef((n,r)=>{const{children:o,...s}=n;if(S.isValidElement(o)){const i=uh(o),a=lh(s,o.props);return o.type!==S.Fragment&&(a.ref=r?Mr(r,i):i),S.cloneElement(o,a)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cc=Symbol("radix.slottable");function ah(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=cc,t}function ch(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cc}function lh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function uh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const gi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,mi=Ga,lc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return mi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const d=n==null?void 0:n[l],u=s==null?void 0:s[l];if(d===null)return null;const b=gi(d)||gi(u);return o[l][b]}),a=n&&Object.entries(n).reduce((l,d)=>{let[u,b]=d;return b===void 0||(l[u]=b),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,d)=>{let{class:u,className:b,...y}=d;return Object.entries(y).every(C=>{let[h,w]=C;return Array.isArray(w)?w.includes({...s,...a}[h]):{...s,...a}[h]===w})?[...l,u,b]:l},[]);return mi(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},dh=lc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary cursor-pointer text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 hover:bg-accent",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ft({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?sh:"button";return p.jsx(s,{"data-slot":"button",className:ie(dh({variant:t,size:n,className:e})),...o})}const fh=({handleWeekChange:e})=>p.jsxs("div",{className:"header_day_actions",children:[p.jsx(Ft,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("previous"),children:p.jsx(zp,{className:"header_day_actions_button_icon"})}),p.jsx(Ft,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("next"),children:p.jsx(Bp,{className:"header_day_actions_button_icon"})})]}),ph=({mobileLayout:e,onClick:t})=>p.jsxs(Ft,{variant:e?"ghost":"outline",onClick:t,children:[p.jsx(eh,{style:{paddingTop:"0.8px"}}),!e&&"Today"]});function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function mt(e,t=[]){let n=[];function r(s,i){const a=S.createContext(i),c=n.length;n=[...n,i];const l=u=>{var m;const{scope:b,children:y,...C}=u,h=((m=b==null?void 0:b[e])==null?void 0:m[c])||a,w=S.useMemo(()=>C,Object.values(C));return p.jsx(h.Provider,{value:w,children:y})};l.displayName=s+"Provider";function d(u,b){var h;const y=((h=b==null?void 0:b[e])==null?void 0:h[c])||a,C=S.useContext(y);if(C)return C;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[l,d]}const o=()=>{const s=n.map(i=>S.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,hh(o,...t)]}function hh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const u=c(s)[`__scope${l}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var gh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=gh.reduce((e,t)=>{const n=St(`Primitive.${t}`),r=S.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function uc(e,t){e&&xr.flushSync(()=>e.dispatchEvent(t))}function _e(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function mh(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e);S.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var vh="DismissableLayer",ko="dismissableLayer.update",yh="dismissableLayer.pointerDownOutside",bh="dismissableLayer.focusOutside",vi,dc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=S.useContext(dc),[d,u]=S.useState(null),b=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=S.useState({}),C=le(t,x=>u(x)),h=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(w),f=d?h.indexOf(d):-1,v=l.layersWithOutsidePointerEventsDisabled.size>0,E=f>=m,g=Sh(x=>{const D=x.target,k=[...l.branches].some(_=>_.contains(D));!E||k||(o==null||o(x),i==null||i(x),x.defaultPrevented||a==null||a())},b),T=Ch(x=>{const D=x.target;[...l.branches].some(_=>_.contains(D))||(s==null||s(x),i==null||i(x),x.defaultPrevented||a==null||a())},b);return mh(x=>{f===l.layers.size-1&&(r==null||r(x),!x.defaultPrevented&&a&&(x.preventDefault(),a()))},b),S.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(vi=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),yi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=vi)}},[d,b,n,l]),S.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),yi())},[d,l]),S.useEffect(()=>{const x=()=>y({});return document.addEventListener(ko,x),()=>document.removeEventListener(ko,x)},[]),p.jsx(se.div,{...c,ref:C,style:{pointerEvents:v?E?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,g.onPointerDownCapture)})});Mn.displayName=vh;var wh="DismissableLayerBranch",xh=S.forwardRef((e,t)=>{const n=S.useContext(dc),r=S.useRef(null),o=le(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(se.div,{...e,ref:o})});xh.displayName=wh;function Sh(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){fc(yh,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ch(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!r.current&&fc(bh,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yi(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function fc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?uc(o,s):o.dispatchEvent(s)}var ye=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Eh=S[" useId ".trim().toString()]||(()=>{}),Dh=0;function ft(e){const[t,n]=S.useState(Eh());return ye(()=>{n(r=>r??String(Dh++))},[e]),e||(t?`radix-${t}`:"")}const Th=["top","right","bottom","left"],pt=Math.min,Re=Math.max,hr=Math.round,Hn=Math.floor,He=e=>({x:e,y:e}),Rh={left:"right",right:"left",bottom:"top",top:"bottom"},Mh={start:"end",end:"start"};function Ao(e,t,n){return Re(e,pt(t,n))}function Xe(e,t){return typeof e=="function"?e(t):e}function Ze(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function ss(e){return e==="x"?"y":"x"}function is(e){return e==="y"?"height":"width"}function ht(e){return["top","bottom"].includes(Ze(e))?"y":"x"}function as(e){return ss(ht(e))}function Oh(e,t,n){n===void 0&&(n=!1);const r=Gt(e),o=as(e),s=is(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=gr(i)),[i,gr(i)]}function Ph(e){const t=gr(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>Mh[t])}function kh(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Ah(e,t,n,r){const o=Gt(e);let s=kh(Ze(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(_o)))),s}function gr(e){return e.replace(/left|right|bottom|top/g,t=>Rh[t])}function _h(e){return{top:0,right:0,bottom:0,left:0,...e}}function pc(e){return typeof e!="number"?_h(e):{top:e,right:e,bottom:e,left:e}}function mr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function bi(e,t,n){let{reference:r,floating:o}=e;const s=ht(t),i=as(t),a=is(i),c=Ze(t),l=s==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,b=r[a]/2-o[a]/2;let y;switch(c){case"top":y={x:d,y:r.y-o.height};break;case"bottom":y={x:d,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:u};break;case"left":y={x:r.x-o.width,y:u};break;default:y={x:r.x,y:r.y}}switch(Gt(t)){case"start":y[i]-=b*(n&&l?-1:1);break;case"end":y[i]+=b*(n&&l?-1:1);break}return y}const Nh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=bi(l,r,c),b=r,y={},C=0;for(let h=0;h<a.length;h++){const{name:w,fn:m}=a[h],{x:f,y:v,data:E,reset:g}=await m({x:d,y:u,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:l,platform:i,elements:{reference:e,floating:t}});d=f??d,u=v??u,y={...y,[w]:{...y[w],...E}},g&&C<=50&&(C++,typeof g=="object"&&(g.placement&&(b=g.placement),g.rects&&(l=g.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:d,y:u}=bi(l,b,c)),h=-1)}return{x:d,y:u,placement:b,strategy:o,middlewareData:y}};async function bn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:b=!1,padding:y=0}=Xe(t,e),C=pc(y),w=a[b?u==="floating"?"reference":"floating":u],m=mr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),f=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},g=mr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:v,strategy:c}):f);return{top:(m.top-g.top+C.top)/E.y,bottom:(g.bottom-m.bottom+C.bottom)/E.y,left:(m.left-g.left+C.left)/E.x,right:(g.right-m.right+C.right)/E.x}}const Ih=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=Xe(e,t)||{};if(l==null)return{};const u=pc(d),b={x:n,y:r},y=as(o),C=is(y),h=await i.getDimensions(l),w=y==="y",m=w?"top":"left",f=w?"bottom":"right",v=w?"clientHeight":"clientWidth",E=s.reference[C]+s.reference[y]-b[y]-s.floating[C],g=b[y]-s.reference[y],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let x=T?T[v]:0;(!x||!await(i.isElement==null?void 0:i.isElement(T)))&&(x=a.floating[v]||s.floating[C]);const D=E/2-g/2,k=x/2-h[C]/2-1,_=pt(u[m],k),N=pt(u[f],k),B=_,U=x-h[C]-N,I=x/2-h[C]/2+D,z=Ao(B,I,U),P=!c.arrow&&Gt(o)!=null&&I!==z&&s.reference[C]/2-(I<B?_:N)-h[C]/2<0,j=P?I<B?I-B:I-U:0;return{[y]:b[y]+j,data:{[y]:z,centerOffset:I-z-j,...P&&{alignmentOffset:j}},reset:P}}}),jh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:h=!0,...w}=Xe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=Ze(o),f=ht(a),v=Ze(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=b||(v||!h?[gr(a)]:Ph(a)),T=C!=="none";!b&&T&&g.push(...Ah(a,h,C,E));const x=[a,...g],D=await bn(t,w),k=[];let _=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&k.push(D[m]),u){const I=Oh(o,i,E);k.push(D[I[0]],D[I[1]])}if(_=[..._,{placement:o,overflows:k}],!k.every(I=>I<=0)){var N,B;const I=(((N=s.flip)==null?void 0:N.index)||0)+1,z=x[I];if(z)return{data:{index:I,overflows:_},reset:{placement:z}};let P=(B=_.filter(j=>j.overflows[0]<=0).sort((j,M)=>j.overflows[1]-M.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(y){case"bestFit":{var U;const j=(U=_.filter(M=>{if(T){const A=ht(M.placement);return A===f||A==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(A=>A>0).reduce((A,O)=>A+O,0)]).sort((M,A)=>M[1]-A[1])[0])==null?void 0:U[0];j&&(P=j);break}case"initialPlacement":P=a;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function wi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xi(e){return Th.some(t=>e[t]>=0)}const Lh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Xe(e,t);switch(r){case"referenceHidden":{const s=await bn(t,{...o,elementContext:"reference"}),i=wi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:xi(i)}}}case"escaped":{const s=await bn(t,{...o,altBoundary:!0}),i=wi(s,n.floating);return{data:{escapedOffsets:i,escaped:xi(i)}}}default:return{}}}}};async function $h(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ze(n),a=Gt(n),c=ht(n)==="y",l=["left","top"].includes(i)?-1:1,d=s&&c?-1:1,u=Xe(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:C}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof C=="number"&&(y=a==="end"?C*-1:C),c?{x:y*d,y:b*l}:{x:b*l,y:y*d}}const Fh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await $h(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},zh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:m,y:f}=w;return{x:m,y:f}}},...c}=Xe(e,t),l={x:n,y:r},d=await bn(t,c),u=ht(Ze(o)),b=ss(u);let y=l[b],C=l[u];if(s){const w=b==="y"?"top":"left",m=b==="y"?"bottom":"right",f=y+d[w],v=y-d[m];y=Ao(f,y,v)}if(i){const w=u==="y"?"top":"left",m=u==="y"?"bottom":"right",f=C+d[w],v=C-d[m];C=Ao(f,C,v)}const h=a.fn({...t,[b]:y,[u]:C});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[b]:s,[u]:i}}}}}},Wh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Xe(e,t),d={x:n,y:r},u=ht(o),b=ss(u);let y=d[b],C=d[u];const h=Xe(a,t),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const v=b==="y"?"height":"width",E=s.reference[b]-s.floating[v]+w.mainAxis,g=s.reference[b]+s.reference[v]-w.mainAxis;y<E?y=E:y>g&&(y=g)}if(l){var m,f;const v=b==="y"?"width":"height",E=["top","left"].includes(Ze(o)),g=s.reference[u]-s.floating[v]+(E&&((m=i.offset)==null?void 0:m[u])||0)+(E?0:w.crossAxis),T=s.reference[u]+s.reference[v]+(E?0:((f=i.offset)==null?void 0:f[u])||0)-(E?w.crossAxis:0);C<g?C=g:C>T&&(C=T)}return{[b]:y,[u]:C}}}},Bh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Xe(e,t),d=await bn(t,l),u=Ze(o),b=Gt(o),y=ht(o)==="y",{width:C,height:h}=s.floating;let w,m;u==="top"||u==="bottom"?(w=u,m=b===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(m=u,w=b==="end"?"top":"bottom");const f=h-d.top-d.bottom,v=C-d.left-d.right,E=pt(h-d[w],f),g=pt(C-d[m],v),T=!t.middlewareData.shift;let x=E,D=g;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(x=f),T&&!b){const _=Re(d.left,0),N=Re(d.right,0),B=Re(d.top,0),U=Re(d.bottom,0);y?D=C-2*(_!==0||N!==0?_+N:Re(d.left,d.right)):x=h-2*(B!==0||U!==0?B+U:Re(d.top,d.bottom))}await c({...t,availableWidth:D,availableHeight:x});const k=await i.getDimensions(a.floating);return C!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Or(){return typeof window<"u"}function qt(e){return hc(e)?(e.nodeName||"").toLowerCase():"#document"}function Me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(hc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hc(e){return Or()?e instanceof Node||e instanceof Me(e).Node:!1}function je(e){return Or()?e instanceof Element||e instanceof Me(e).Element:!1}function Ve(e){return Or()?e instanceof HTMLElement||e instanceof Me(e).HTMLElement:!1}function Si(e){return!Or()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Me(e).ShadowRoot}function On(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Hh(e){return["table","td","th"].includes(qt(e))}function Pr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function cs(e){const t=ls(),n=je(e)?Le(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Vh(e){let t=gt(e);for(;Ve(t)&&!zt(t);){if(cs(t))return t;if(Pr(t))return null;t=gt(t)}return null}function ls(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zt(e){return["html","body","#document"].includes(qt(e))}function Le(e){return Me(e).getComputedStyle(e)}function kr(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gt(e){if(qt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Si(e)&&e.host||Ye(e);return Si(t)?t.host:t}function gc(e){const t=gt(e);return zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ve(t)&&On(t)?t:gc(t)}function wn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Me(o);if(s){const a=No(i);return t.concat(i,i.visualViewport||[],On(o)?o:[],a&&n?wn(a):[])}return t.concat(o,wn(o,[],n))}function No(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ve(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=hr(n)!==s||hr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function us(e){return je(e)?e:e.contextElement}function Lt(e){const t=us(e);if(!Ve(t))return He(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=mc(t);let i=(s?hr(n.width):n.width)/r,a=(s?hr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Yh=He(0);function vc(e){const t=Me(e);return!ls()||!t.visualViewport?Yh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Me(e)?!1:t}function Ct(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=us(e);let i=He(1);t&&(r?je(r)&&(i=Lt(r)):i=Lt(e));const a=Uh(s,n,r)?vc(s):He(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(s){const b=Me(s),y=r&&je(r)?Me(r):r;let C=b,h=No(C);for(;h&&r&&y!==C;){const w=Lt(h),m=h.getBoundingClientRect(),f=Le(h),v=m.left+(h.clientLeft+parseFloat(f.paddingLeft))*w.x,E=m.top+(h.clientTop+parseFloat(f.paddingTop))*w.y;c*=w.x,l*=w.y,d*=w.x,u*=w.y,c+=v,l+=E,C=Me(h),h=No(C)}}return mr({width:d,height:u,x:c,y:l})}function ds(e,t){const n=kr(e).scrollLeft;return t?t.left+n:Ct(Ye(e)).left+n}function yc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ds(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Kh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ye(r),a=t?Pr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=He(1);const d=He(0),u=Ve(r);if((u||!u&&!s)&&((qt(r)!=="body"||On(i))&&(c=kr(r)),Ve(r))){const y=Ct(r);l=Lt(r),d.x=y.x+r.clientLeft,d.y=y.y+r.clientTop}const b=i&&!u&&!s?yc(i,c,!0):He(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+b.x,y:n.y*l.y-c.scrollTop*l.y+d.y+b.y}}function Gh(e){return Array.from(e.getClientRects())}function qh(e){const t=Ye(e),n=kr(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ds(e);const a=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function Xh(e,t){const n=Me(e),r=Ye(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=ls();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function Zh(e,t){const n=Ct(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ve(e)?Lt(e):He(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Ci(e,t,n){let r;if(t==="viewport")r=Xh(e,n);else if(t==="document")r=qh(Ye(e));else if(je(t))r=Zh(t,n);else{const o=vc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return mr(r)}function bc(e,t){const n=gt(e);return n===t||!je(n)||zt(n)?!1:Le(n).position==="fixed"||bc(n,t)}function Jh(e,t){const n=t.get(e);if(n)return n;let r=wn(e,[],!1).filter(a=>je(a)&&qt(a)!=="body"),o=null;const s=Le(e).position==="fixed";let i=s?gt(e):e;for(;je(i)&&!zt(i);){const a=Le(i),c=cs(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||On(i)&&!c&&bc(e,i))?r=r.filter(d=>d!==i):o=a,i=gt(i)}return t.set(e,r),r}function Qh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Pr(t)?[]:Jh(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const u=Ci(t,d,o);return l.top=Re(u.top,l.top),l.right=pt(u.right,l.right),l.bottom=pt(u.bottom,l.bottom),l.left=Re(u.left,l.left),l},Ci(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function eg(e){const{width:t,height:n}=mc(e);return{width:t,height:n}}function tg(e,t,n){const r=Ve(t),o=Ye(t),s=n==="fixed",i=Ct(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=He(0);if(r||!r&&!s)if((qt(t)!=="body"||On(o))&&(a=kr(t)),r){const b=Ct(t,!0,s,t);c.x=b.x+t.clientLeft,c.y=b.y+t.clientTop}else o&&(c.x=ds(o));const l=o&&!r&&!s?yc(o,a):He(0),d=i.left+a.scrollLeft-c.x-l.x,u=i.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:i.width,height:i.height}}function ro(e){return Le(e).position==="static"}function Ei(e,t){if(!Ve(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ye(e)===n&&(n=n.ownerDocument.body),n}function wc(e,t){const n=Me(e);if(Pr(e))return n;if(!Ve(e)){let o=gt(e);for(;o&&!zt(o);){if(je(o)&&!ro(o))return o;o=gt(o)}return n}let r=Ei(e,t);for(;r&&Hh(r)&&ro(r);)r=Ei(r,t);return r&&zt(r)&&ro(r)&&!cs(r)?n:r||Vh(e)||n}const ng=async function(e){const t=this.getOffsetParent||wc,n=this.getDimensions,r=await n(e.floating);return{reference:tg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rg(e){return Le(e).direction==="rtl"}const og={convertOffsetParentRelativeRectToViewportRelativeRect:Kh,getDocumentElement:Ye,getClippingRect:Qh,getOffsetParent:wc,getElementRects:ng,getClientRects:Gh,getDimensions:eg,getScale:Lt,isElement:je,isRTL:rg};function xc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sg(e,t){let n=null,r;const o=Ye(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:b,height:y}=l;if(a||t(),!b||!y)return;const C=Hn(u),h=Hn(o.clientWidth-(d+b)),w=Hn(o.clientHeight-(u+y)),m=Hn(d),v={rootMargin:-C+"px "+-h+"px "+-w+"px "+-m+"px",threshold:Re(0,pt(1,c))||1};let E=!0;function g(T){const x=T[0].intersectionRatio;if(x!==c){if(!E)return i();x?i(!1,x):r=setTimeout(()=>{i(!1,1e-7)},1e3)}x===1&&!xc(l,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(g,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(g,v)}n.observe(e)}return i(!0),s}function ig(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=us(e),d=o||s?[...l?wn(l):[],...wn(t)]:[];d.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const u=l&&a?sg(l,n):null;let b=-1,y=null;i&&(y=new ResizeObserver(m=>{let[f]=m;f&&f.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var v;(v=y)==null||v.observe(t)})),n()}),l&&!c&&y.observe(l),y.observe(t));let C,h=c?Ct(e):null;c&&w();function w(){const m=Ct(e);h&&!xc(h,m)&&n(),h=m,C=requestAnimationFrame(w)}return n(),()=>{var m;d.forEach(f=>{o&&f.removeEventListener("scroll",n),s&&f.removeEventListener("resize",n)}),u==null||u(),(m=y)==null||m.disconnect(),y=null,c&&cancelAnimationFrame(C)}}const ag=Fh,cg=zh,lg=jh,ug=Bh,dg=Lh,Di=Ih,fg=Wh,pg=(e,t,n)=>{const r=new Map,o={platform:og,...n},s={...o.platform,_c:r};return Nh(e,t,{...o,platform:s})};var or=typeof document<"u"?R.useLayoutEffect:R.useEffect;function vr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!vr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!vr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Sc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ti(e,t){const n=Sc(e);return Math.round(t*n)/n}function oo(e){const t=S.useRef(e);return or(()=>{t.current=e}),t}function hg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=S.useState(r);vr(b,r)||y(r);const[C,h]=S.useState(null),[w,m]=S.useState(null),f=S.useCallback(M=>{M!==T.current&&(T.current=M,h(M))},[]),v=S.useCallback(M=>{M!==x.current&&(x.current=M,m(M))},[]),E=s||C,g=i||w,T=S.useRef(null),x=S.useRef(null),D=S.useRef(d),k=c!=null,_=oo(c),N=oo(o),B=oo(l),U=S.useCallback(()=>{if(!T.current||!x.current)return;const M={placement:t,strategy:n,middleware:b};N.current&&(M.platform=N.current),pg(T.current,x.current,M).then(A=>{const O={...A,isPositioned:B.current!==!1};I.current&&!vr(D.current,O)&&(D.current=O,xr.flushSync(()=>{u(O)}))})},[b,t,n,N,B]);or(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(M=>({...M,isPositioned:!1})))},[l]);const I=S.useRef(!1);or(()=>(I.current=!0,()=>{I.current=!1}),[]),or(()=>{if(E&&(T.current=E),g&&(x.current=g),E&&g){if(_.current)return _.current(E,g,U);U()}},[E,g,U,_,k]);const z=S.useMemo(()=>({reference:T,floating:x,setReference:f,setFloating:v}),[f,v]),P=S.useMemo(()=>({reference:E,floating:g}),[E,g]),j=S.useMemo(()=>{const M={position:n,left:0,top:0};if(!P.floating)return M;const A=Ti(P.floating,d.x),O=Ti(P.floating,d.y);return a?{...M,transform:"translate("+A+"px, "+O+"px)",...Sc(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:O}},[n,a,P.floating,d.x,d.y]);return S.useMemo(()=>({...d,update:U,refs:z,elements:P,floatingStyles:j}),[d,U,z,P,j])}const gg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Di({element:r.current,padding:o}).fn(n):{}:r?Di({element:r,padding:o}).fn(n):{}}}},mg=(e,t)=>({...ag(e),options:[e,t]}),vg=(e,t)=>({...cg(e),options:[e,t]}),yg=(e,t)=>({...fg(e),options:[e,t]}),bg=(e,t)=>({...lg(e),options:[e,t]}),wg=(e,t)=>({...ug(e),options:[e,t]}),xg=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...gg(e),options:[e,t]});var Cg="Arrow",Cc=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(se.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cc.displayName=Cg;var Eg=Cc;function Dg(e){const[t,n]=S.useState(void 0);return ye(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var fs="Popper",[Ec,vt]=mt(fs),[Tg,Dc]=Ec(fs),Tc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=S.useState(null);return p.jsx(Tg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Tc.displayName=fs;var Rc="PopperAnchor",Mc=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Dc(Rc,n),i=S.useRef(null),a=le(t,i);return S.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:p.jsx(se.div,{...o,ref:a})});Mc.displayName=Rc;var ps="PopperContent",[Rg,Mg]=Ec(ps),Oc=S.forwardRef((e,t)=>{var W,q,K,L,X,F;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:b=!1,updatePositionStrategy:y="optimized",onPlaced:C,...h}=e,w=Dc(ps,n),[m,f]=S.useState(null),v=le(t,oe=>f(oe)),[E,g]=S.useState(null),T=Dg(E),x=(T==null?void 0:T.width)??0,D=(T==null?void 0:T.height)??0,k=r+(s!=="center"?"-"+s:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(l)?l:[l],B=N.length>0,U={padding:_,boundary:N.filter(Pg),altBoundary:B},{refs:I,floatingStyles:z,placement:P,isPositioned:j,middlewareData:M}=hg({strategy:"fixed",placement:k,whileElementsMounted:(...oe)=>ig(...oe,{animationFrame:y==="always"}),elements:{reference:w.anchor},middleware:[mg({mainAxis:o+D,alignmentAxis:i}),c&&vg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?yg():void 0,...U}),c&&bg({...U}),wg({...U,apply:({elements:oe,rects:de,availableWidth:Se,availableHeight:Ce})=>{const{width:$e,height:Ln}=de.reference,Qe=oe.floating.style;Qe.setProperty("--radix-popper-available-width",`${Se}px`),Qe.setProperty("--radix-popper-available-height",`${Ce}px`),Qe.setProperty("--radix-popper-anchor-width",`${$e}px`),Qe.setProperty("--radix-popper-anchor-height",`${Ln}px`)}}),E&&Sg({element:E,padding:a}),kg({arrowWidth:x,arrowHeight:D}),b&&xg({strategy:"referenceHidden",...U})]}),[A,O]=Ac(P),$=_e(C);ye(()=>{j&&($==null||$())},[j,$]);const Y=(W=M.arrow)==null?void 0:W.x,V=(q=M.arrow)==null?void 0:q.y,H=((K=M.arrow)==null?void 0:K.centerOffset)!==0,[Z,G]=S.useState();return ye(()=>{m&&G(window.getComputedStyle(m).zIndex)},[m]),p.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:j?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(L=M.transformOrigin)==null?void 0:L.x,(X=M.transformOrigin)==null?void 0:X.y].join(" "),...((F=M.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Rg,{scope:n,placedSide:A,onArrowChange:g,arrowX:Y,arrowY:V,shouldHideArrow:H,children:p.jsx(se.div,{"data-side":A,"data-align":O,...h,ref:v,style:{...h.style,animation:j?void 0:"none"}})})})});Oc.displayName=ps;var Pc="PopperArrow",Og={top:"bottom",right:"left",bottom:"top",left:"right"},kc=S.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Mg(Pc,r),i=Og[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Eg,{...o,ref:n,style:{...o.style,display:"block"}})})});kc.displayName=Pc;function Pg(e){return e!==null}var kg=e=>({name:"transformOrigin",options:e,fn(t){var w,m,f;const{placement:n,rects:r,middlewareData:o}=t,i=((w=o.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,d]=Ac(n),u={start:"0%",center:"50%",end:"100%"}[d],b=(((m=o.arrow)==null?void 0:m.x)??0)+a/2,y=(((f=o.arrow)==null?void 0:f.y)??0)+c/2;let C="",h="";return l==="bottom"?(C=i?u:`${b}px`,h=`${-c}px`):l==="top"?(C=i?u:`${b}px`,h=`${r.floating.height+c}px`):l==="right"?(C=`${-c}px`,h=i?u:`${y}px`):l==="left"&&(C=`${r.floating.width+c}px`,h=i?u:`${y}px`),{data:{x:C,y:h}}}});function Ac(e){const[t,n="center"]=e.split("-");return[t,n]}var Ar=Tc,Pn=Mc,_r=Oc,Nr=kc,Ag="Portal",kn=S.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=S.useState(!1);ye(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ge.createPortal(p.jsx(se.div,{...r,ref:t}),i):null});kn.displayName=Ag;function _g(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=Ng(t),o=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=le(r.ref,Ig(o));return typeof n=="function"||r.isPresent?S.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function Ng(e){const[t,n]=S.useState(),r=S.useRef({}),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[a,c]=_g(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Vn(r.current);s.current=a==="mounted"?l:"none"},[a]),ye(()=>{const l=r.current,d=o.current;if(d!==e){const b=s.current,y=Vn(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&b!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ye(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=y=>{const h=Vn(r.current).includes(y.animationName);if(y.target===t&&h&&(c("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},b=y=>{y.target===t&&(s.current=Vn(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vn(e){return(e==null?void 0:e.animationName)||"none"}function Ig(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Et({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=jg({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=_e(n),c=S.useCallback(l=>{if(s){const u=typeof l=="function"?l(e):l;u!==e&&a(u)}else o(l)},[s,e,o,a]);return[i,c]}function jg({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,o=S.useRef(r),s=_e(t);return S.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Lg="VisuallyHidden",hs=S.forwardRef((e,t)=>p.jsx(se.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));hs.displayName=Lg;var $g=hs,[Ir,Bw]=mt("Tooltip",[vt]),jr=vt(),_c="TooltipProvider",Fg=700,Io="tooltip.open",[zg,gs]=Ir(_c),Nc=e=>{const{__scopeTooltip:t,delayDuration:n=Fg,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=S.useRef(!0),a=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),p.jsx(zg,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:S.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};Nc.displayName=_c;var Lr="Tooltip",[Wg,An]=Ir(Lr),Ic=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=gs(Lr,e.__scopeTooltip),l=jr(t),[d,u]=S.useState(null),b=ft(),y=S.useRef(0),C=i??c.disableHoverableContent,h=a??c.delayDuration,w=S.useRef(!1),[m=!1,f]=Et({prop:r,defaultProp:o,onChange:x=>{x?(c.onOpen(),document.dispatchEvent(new CustomEvent(Io))):c.onClose(),s==null||s(x)}}),v=S.useMemo(()=>m?w.current?"delayed-open":"instant-open":"closed",[m]),E=S.useCallback(()=>{window.clearTimeout(y.current),y.current=0,w.current=!1,f(!0)},[f]),g=S.useCallback(()=>{window.clearTimeout(y.current),y.current=0,f(!1)},[f]),T=S.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{w.current=!0,f(!0),y.current=0},h)},[h,f]);return S.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),p.jsx(Ar,{...l,children:p.jsx(Wg,{scope:t,contentId:b,open:m,stateAttribute:v,trigger:d,onTriggerChange:u,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?T():E()},[c.isOpenDelayedRef,T,E]),onTriggerLeave:S.useCallback(()=>{C?g():(window.clearTimeout(y.current),y.current=0)},[g,C]),onOpen:E,onClose:g,disableHoverableContent:C,children:n})})};Ic.displayName=Lr;var jo="TooltipTrigger",jc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=An(jo,n),s=gs(jo,n),i=jr(n),a=S.useRef(null),c=le(t,a,o.onTriggerChange),l=S.useRef(!1),d=S.useRef(!1),u=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(Pn,{asChild:!0,...i,children:p.jsx(se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ee(e.onPointerMove,b=>{b.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:ee(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:ee(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:ee(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:ee(e.onBlur,o.onClose),onClick:ee(e.onClick,o.onClose)})})});jc.displayName=jo;var ms="TooltipPortal",[Bg,Hg]=Ir(ms,{forceMount:void 0}),Lc=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=An(ms,t);return p.jsx(Bg,{scope:t,forceMount:n,children:p.jsx(Je,{present:n||s.open,children:p.jsx(kn,{asChild:!0,container:o,children:r})})})};Lc.displayName=ms;var Wt="TooltipContent",$c=S.forwardRef((e,t)=>{const n=Hg(Wt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=An(Wt,e.__scopeTooltip);return p.jsx(Je,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Fc,{side:o,...s,ref:t}):p.jsx(Vg,{side:o,...s,ref:t})})}),Vg=S.forwardRef((e,t)=>{const n=An(Wt,e.__scopeTooltip),r=gs(Wt,e.__scopeTooltip),o=S.useRef(null),s=le(t,o),[i,a]=S.useState(null),{trigger:c,onClose:l}=n,d=o.current,{onPointerInTransitChange:u}=r,b=S.useCallback(()=>{a(null),u(!1)},[u]),y=S.useCallback((C,h)=>{const w=C.currentTarget,m={x:C.clientX,y:C.clientY},f=qg(m,w.getBoundingClientRect()),v=Xg(m,f),E=Zg(h.getBoundingClientRect()),g=Qg([...v,...E]);a(g),u(!0)},[u]);return S.useEffect(()=>()=>b(),[b]),S.useEffect(()=>{if(c&&d){const C=w=>y(w,d),h=w=>y(w,c);return c.addEventListener("pointerleave",C),d.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",C),d.removeEventListener("pointerleave",h)}}},[c,d,y,b]),S.useEffect(()=>{if(i){const C=h=>{const w=h.target,m={x:h.clientX,y:h.clientY},f=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),v=!Jg(m,i);f?b():v&&(b(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,d,i,l,b]),p.jsx(Fc,{...e,ref:s})}),[Yg,Ug]=Ir(Lr,{isInside:!1}),Kg=ah("TooltipContent"),Fc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=An(Wt,n),l=jr(n),{onClose:d}=c;return S.useEffect(()=>(document.addEventListener(Io,d),()=>document.removeEventListener(Io,d)),[d]),S.useEffect(()=>{if(c.trigger){const u=b=>{const y=b.target;y!=null&&y.contains(c.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,d]),p.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:p.jsxs(_r,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Kg,{children:r}),p.jsx(Yg,{scope:n,isInside:!0,children:p.jsx($g,{id:c.contentId,role:"tooltip",children:o||r})})]})})});$c.displayName=Wt;var zc="TooltipArrow",Gg=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jr(n);return Ug(zc,n).isInside?null:p.jsx(Nr,{...o,...r,ref:t})});Gg.displayName=zc;function qg(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Xg(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Zg(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Jg(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,d=t[i].y;c>r!=d>r&&n<(l-a)*(r-c)/(d-c)+a&&(o=!o)}return o}function Qg(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),em(t)}function em(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var tm=Nc,nm=Ic,rm=jc,om=Lc,sm=$c;function vs({delayDuration:e=0,...t}){return p.jsx(tm,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Wc({...e}){return p.jsx(vs,{children:p.jsx(nm,{"data-slot":"tooltip",...e})})}function Bc({...e}){return p.jsx(rm,{"data-slot":"tooltip-trigger",...e})}function Hc({className:e,sideOffset:t=0,children:n,...r}){return p.jsx(om,{children:p.jsx(sm,{"data-slot":"tooltip-content",sideOffset:t,className:ie("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:n})})}const im=({children:e,content:t})=>p.jsx(vs,{children:p.jsxs(Wc,{children:[p.jsx(Bc,{asChild:!0,children:e}),p.jsx(Hc,{sideOffset:9,side:"bottom",className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:p.jsx("p",{children:t})})]})});function ys(e){const t=e+"CollectionProvider",[n,r]=mt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:w,children:m}=h,f=R.useRef(null),v=R.useRef(new Map).current;return p.jsx(o,{scope:w,itemMap:v,collectionRef:f,children:m})};i.displayName=t;const a=e+"CollectionSlot",c=St(a),l=R.forwardRef((h,w)=>{const{scope:m,children:f}=h,v=s(a,m),E=le(w,v.collectionRef);return p.jsx(c,{ref:E,children:f})});l.displayName=a;const d=e+"CollectionItemSlot",u="data-radix-collection-item",b=St(d),y=R.forwardRef((h,w)=>{const{scope:m,children:f,...v}=h,E=R.useRef(null),g=le(w,E),T=s(d,m);return R.useEffect(()=>(T.itemMap.set(E,{ref:E,...v}),()=>void T.itemMap.delete(E))),p.jsx(b,{[u]:"",ref:g,children:f})});y.displayName=d;function C(h){const w=s(e+"CollectionConsumer",h);return R.useCallback(()=>{const f=w.collectionRef.current;if(!f)return[];const v=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(w.itemMap.values()).sort((T,x)=>v.indexOf(T.ref.current)-v.indexOf(x.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:l,ItemSlot:y},C,r]}var am=S.createContext(void 0);function bs(e){const t=S.useContext(am);return e||t||"ltr"}var so=0;function ws(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ri()),document.body.insertAdjacentElement("beforeend",e[1]??Ri()),so++,()=>{so===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),so--}},[])}function Ri(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var io="focusScope.autoFocusOnMount",ao="focusScope.autoFocusOnUnmount",Mi={bubbles:!1,cancelable:!0},cm="FocusScope",$r=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=S.useState(null),l=_e(o),d=_e(s),u=S.useRef(null),b=le(t,h=>c(h)),y=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let h=function(v){if(y.paused||!a)return;const E=v.target;a.contains(E)?u.current=E:lt(u.current,{select:!0})},w=function(v){if(y.paused||!a)return;const E=v.relatedTarget;E!==null&&(a.contains(E)||lt(u.current,{select:!0}))},m=function(v){if(document.activeElement===document.body)for(const g of v)g.removedNodes.length>0&&lt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",w);const f=new MutationObserver(m);return a&&f.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",w),f.disconnect()}}},[r,a,y.paused]),S.useEffect(()=>{if(a){Pi.add(y);const h=document.activeElement;if(!a.contains(h)){const m=new CustomEvent(io,Mi);a.addEventListener(io,l),a.dispatchEvent(m),m.defaultPrevented||(lm(hm(Vc(a)),{select:!0}),document.activeElement===h&&lt(a))}return()=>{a.removeEventListener(io,l),setTimeout(()=>{const m=new CustomEvent(ao,Mi);a.addEventListener(ao,d),a.dispatchEvent(m),m.defaultPrevented||lt(h??document.body,{select:!0}),a.removeEventListener(ao,d),Pi.remove(y)},0)}}},[a,l,d,y]);const C=S.useCallback(h=>{if(!n&&!r||y.paused)return;const w=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,m=document.activeElement;if(w&&m){const f=h.currentTarget,[v,E]=um(f);v&&E?!h.shiftKey&&m===E?(h.preventDefault(),n&&lt(v,{select:!0})):h.shiftKey&&m===v&&(h.preventDefault(),n&&lt(E,{select:!0})):m===f&&h.preventDefault()}},[n,r,y.paused]);return p.jsx(se.div,{tabIndex:-1,...i,ref:b,onKeyDown:C})});$r.displayName=cm;function lm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lt(r,{select:t}),document.activeElement!==n)return}function um(e){const t=Vc(e),n=Oi(t,e),r=Oi(t.reverse(),e);return[n,r]}function Vc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Oi(e,t){for(const n of e)if(!dm(n,{upTo:t}))return n}function dm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fm(e){return e instanceof HTMLInputElement&&"select"in e}function lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fm(e)&&t&&e.select()}}var Pi=pm();function pm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ki(e,t),e.unshift(t)},remove(t){var n;e=ki(e,t),(n=e[0])==null||n.resume()}}}function ki(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hm(e){return e.filter(t=>t.tagName!=="A")}var co="rovingFocusGroup.onEntryFocus",gm={bubbles:!1,cancelable:!0},Fr="RovingFocusGroup",[Lo,Yc,mm]=ys(Fr),[vm,Uc]=mt(Fr,[mm]),[ym,bm]=vm(Fr),Kc=S.forwardRef((e,t)=>p.jsx(Lo.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Lo.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(wm,{...e,ref:t})})}));Kc.displayName=Fr;var wm=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...u}=e,b=S.useRef(null),y=le(t,b),C=bs(s),[h=null,w]=Et({prop:i,defaultProp:a,onChange:c}),[m,f]=S.useState(!1),v=_e(l),E=Yc(n),g=S.useRef(!1),[T,x]=S.useState(0);return S.useEffect(()=>{const D=b.current;if(D)return D.addEventListener(co,v),()=>D.removeEventListener(co,v)},[v]),p.jsx(ym,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:h,onItemFocus:S.useCallback(D=>w(D),[w]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>x(D=>D+1),[]),onFocusableItemRemove:S.useCallback(()=>x(D=>D-1),[]),children:p.jsx(se.div,{tabIndex:m||T===0?-1:0,"data-orientation":r,...u,ref:y,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{g.current=!0}),onFocus:ee(e.onFocus,D=>{const k=!g.current;if(D.target===D.currentTarget&&k&&!m){const _=new CustomEvent(co,gm);if(D.currentTarget.dispatchEvent(_),!_.defaultPrevented){const N=E().filter(P=>P.focusable),B=N.find(P=>P.active),U=N.find(P=>P.id===h),z=[B,U,...N].filter(Boolean).map(P=>P.ref.current);Xc(z,d)}}g.current=!1}),onBlur:ee(e.onBlur,()=>f(!1))})})}),Gc="RovingFocusGroupItem",qc=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=ft(),c=s||a,l=bm(Gc,n),d=l.currentTabStopId===c,u=Yc(n),{onFocusableItemAdd:b,onFocusableItemRemove:y}=l;return S.useEffect(()=>{if(r)return b(),()=>y()},[r,b,y]),p.jsx(Lo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(se.span,{tabIndex:d?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:ee(e.onMouseDown,C=>{r?l.onItemFocus(c):C.preventDefault()}),onFocus:ee(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:ee(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){l.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const h=Cm(C,l.orientation,l.dir);if(h!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let m=u().filter(f=>f.focusable).map(f=>f.ref.current);if(h==="last")m.reverse();else if(h==="prev"||h==="next"){h==="prev"&&m.reverse();const f=m.indexOf(C.currentTarget);m=l.loop?Em(m,f+1):m.slice(f+1)}setTimeout(()=>Xc(m))}})})})});qc.displayName=Gc;var xm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Sm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Cm(e,t,n){const r=Sm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xm[r]}function Xc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Em(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Dm=Kc,Tm=qc,Rm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},At=new WeakMap,Yn=new WeakMap,Un={},lo=0,Zc=function(e){return e&&(e.host||Zc(e.parentNode))},Mm=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Om=function(e,t,n,r){var o=Mm(t,Array.isArray(e)?e:[e]);Un[n]||(Un[n]=new WeakMap);var s=Un[n],i=[],a=new Set,c=new Set(o),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};o.forEach(l);var d=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(b){if(a.has(b))d(b);else try{var y=b.getAttribute(r),C=y!==null&&y!=="false",h=(At.get(b)||0)+1,w=(s.get(b)||0)+1;At.set(b,h),s.set(b,w),i.push(b),h===1&&C&&Yn.set(b,!0),w===1&&b.setAttribute(n,"true"),C||b.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",b,m)}})};return d(t),a.clear(),lo++,function(){i.forEach(function(u){var b=At.get(u)-1,y=s.get(u)-1;At.set(u,b),s.set(u,y),b||(Yn.has(u)||u.removeAttribute(r),Yn.delete(u)),y||u.removeAttribute(n)}),lo--,lo||(At=new WeakMap,At=new WeakMap,Yn=new WeakMap,Un={})}},xs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Rm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Om(r,o,n,"aria-hidden")):function(){return null}},Be=function(){return Be=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Be.apply(this,arguments)};function Jc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Pm(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var sr="right-scroll-bar-position",ir="width-before-scroll-bar",km="with-scroll-bars-hidden",Am="--removed-body-scroll-bar-size";function uo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _m(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Nm=typeof window<"u"?S.useLayoutEffect:S.useEffect,Ai=new WeakMap;function Im(e,t){var n=_m(null,function(r){return e.forEach(function(o){return uo(o,r)})});return Nm(function(){var r=Ai.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||uo(a,null)}),s.forEach(function(a){o.has(a)||uo(a,i)})}Ai.set(n,e)},[e]),n}function jm(e){return e}function Lm(e,t){t===void 0&&(t=jm);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(d){i.push(d),l()},filter:function(d){return i=i.filter(d),n}}}};return o}function $m(e){e===void 0&&(e={});var t=Lm(null);return t.options=Be({async:!0,ssr:!1},e),t}var Qc=function(e){var t=e.sideCar,n=Jc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,Be({},n))};Qc.isSideCarExport=!0;function Fm(e,t){return e.useMedium(t),Qc}var el=$m(),fo=function(){},zr=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:fo,onWheelCapture:fo,onTouchMoveCapture:fo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,u=e.shards,b=e.sideCar,y=e.noIsolation,C=e.inert,h=e.allowPinchZoom,w=e.as,m=w===void 0?"div":w,f=e.gapMode,v=Jc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=b,g=Im([n,t]),T=Be(Be({},v),o);return S.createElement(S.Fragment,null,d&&S.createElement(E,{sideCar:el,removeScrollBar:l,shards:u,noIsolation:y,inert:C,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:f}),i?S.cloneElement(S.Children.only(a),Be(Be({},T),{ref:g})):S.createElement(m,Be({},T,{className:c,ref:g}),a))});zr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zr.classNames={fullWidth:ir,zeroRight:sr};var zm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zm();return t&&e.setAttribute("nonce",t),e}function Bm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wm())&&(Bm(t,n),Hm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ym=function(){var e=Vm();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tl=function(){var e=Ym(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Um={left:0,top:0,right:0,gap:0},po=function(e){return parseInt(e||"",10)||0},Km=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[po(n),po(r),po(o)]},Gm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Um;var t=Km(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qm=tl(),$t="data-scroll-locked",Xm=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
101
- .`.concat(km,` {
100
+ */const sh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ih=we("X",sh);function gi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Or(...e){return t=>{let n=!1;const r=e.map(o=>{const s=gi(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():gi(e[o],null)}}}}function le(...e){return S.useCallback(Or(...e),e)}function St(e){const t=ch(e),n=S.forwardRef((r,o)=>{const{children:s,...i}=r,a=S.Children.toArray(s),c=a.find(uh);if(c){const l=c.props.children,f=a.map(u=>u===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:u);return h.jsx(t,{...i,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,f):null})}return h.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ah=St("Slot");function ch(e){const t=S.forwardRef((n,r)=>{const{children:o,...s}=n;if(S.isValidElement(o)){const i=fh(o),a=dh(s,o.props);return o.type!==S.Fragment&&(a.ref=r?Or(r,i):i),S.cloneElement(o,a)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uc=Symbol("radix.slottable");function lh(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=uc,t}function uh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uc}function dh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function fh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const mi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vi=Xa,ss=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return vi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],u=s==null?void 0:s[l];if(f===null)return null;const b=mi(f)||mi(u);return o[l][b]}),a=n&&Object.entries(n).reduce((l,f)=>{let[u,b]=f;return b===void 0||(l[u]=b),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:u,className:b,...y}=f;return Object.entries(y).every(C=>{let[p,x]=C;return Array.isArray(x)?x.includes({...s,...a}[p]):{...s,...a}[p]===x})?[...l,u,b]:l},[]);return vi(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},ph=ss("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary cursor-pointer text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 hover:bg-accent",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ct({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?ah:"button";return h.jsx(s,{"data-slot":"button",className:ie(ph({variant:t,size:n,className:e})),...o})}const hh=({handleWeekChange:e})=>h.jsxs("div",{className:"header_day_actions",children:[h.jsx(Ct,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("previous"),children:h.jsx(Bp,{className:"header_day_actions_button_icon"})}),h.jsx(Ct,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("next"),children:h.jsx(Vp,{className:"header_day_actions_button_icon"})})]});function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function gt(e,t=[]){let n=[];function r(s,i){const a=S.createContext(i),c=n.length;n=[...n,i];const l=u=>{var g;const{scope:b,children:y,...C}=u,p=((g=b==null?void 0:b[e])==null?void 0:g[c])||a,x=S.useMemo(()=>C,Object.values(C));return h.jsx(p.Provider,{value:x,children:y})};l.displayName=s+"Provider";function f(u,b){var p;const y=((p=b==null?void 0:b[e])==null?void 0:p[c])||a,C=S.useContext(y);if(C)return C;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(i=>S.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,gh(o,...t)]}function gh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const u=c(s)[`__scope${l}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var mh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=mh.reduce((e,t)=>{const n=St(`Primitive.${t}`),r=S.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dc(e,t){e&&Sr.flushSync(()=>e.dispatchEvent(t))}function _e(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function vh(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e);S.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yh="DismissableLayer",ko="dismissableLayer.update",bh="dismissableLayer.pointerDownOutside",wh="dismissableLayer.focusOutside",yi,fc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=S.useContext(fc),[f,u]=S.useState(null),b=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=S.useState({}),C=le(t,w=>u(w)),p=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(x),d=f?p.indexOf(f):-1,m=l.layersWithOutsidePointerEventsDisabled.size>0,E=d>=g,v=Ch(w=>{const D=w.target,P=[...l.branches].some(_=>_.contains(D));!E||P||(o==null||o(w),i==null||i(w),w.defaultPrevented||a==null||a())},b),T=Eh(w=>{const D=w.target;[...l.branches].some(_=>_.contains(D))||(s==null||s(w),i==null||i(w),w.defaultPrevented||a==null||a())},b);return vh(w=>{d===l.layers.size-1&&(r==null||r(w),!w.defaultPrevented&&a&&(w.preventDefault(),a()))},b),S.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(yi=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),bi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=yi)}},[f,b,n,l]),S.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),bi())},[f,l]),S.useEffect(()=>{const w=()=>y({});return document.addEventListener(ko,w),()=>document.removeEventListener(ko,w)},[]),h.jsx(se.div,{...c,ref:C,style:{pointerEvents:m?E?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,v.onPointerDownCapture)})});Mn.displayName=yh;var xh="DismissableLayerBranch",Sh=S.forwardRef((e,t)=>{const n=S.useContext(fc),r=S.useRef(null),o=le(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(se.div,{...e,ref:o})});Sh.displayName=xh;function Ch(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){pc(bh,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Eh(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!r.current&&pc(wh,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bi(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function pc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?dc(o,s):o.dispatchEvent(s)}var ye=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Dh=S[" useId ".trim().toString()]||(()=>{}),Th=0;function dt(e){const[t,n]=S.useState(Dh());return ye(()=>{n(r=>r??String(Th++))},[e]),e||(t?`radix-${t}`:"")}const Rh=["top","right","bottom","left"],ft=Math.min,Re=Math.max,gr=Math.round,Hn=Math.floor,Be=e=>({x:e,y:e}),Mh={left:"right",right:"left",bottom:"top",top:"bottom"},Oh={start:"end",end:"start"};function Ao(e,t,n){return Re(e,ft(t,n))}function Xe(e,t){return typeof e=="function"?e(t):e}function Ze(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function is(e){return e==="x"?"y":"x"}function as(e){return e==="y"?"height":"width"}function pt(e){return["top","bottom"].includes(Ze(e))?"y":"x"}function cs(e){return is(pt(e))}function Ph(e,t,n){n===void 0&&(n=!1);const r=Gt(e),o=cs(e),s=as(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=mr(i)),[i,mr(i)]}function kh(e){const t=mr(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>Oh[t])}function Ah(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function _h(e,t,n,r){const o=Gt(e);let s=Ah(Ze(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(_o)))),s}function mr(e){return e.replace(/left|right|bottom|top/g,t=>Mh[t])}function Nh(e){return{top:0,right:0,bottom:0,left:0,...e}}function hc(e){return typeof e!="number"?Nh(e):{top:e,right:e,bottom:e,left:e}}function vr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function wi(e,t,n){let{reference:r,floating:o}=e;const s=pt(t),i=cs(t),a=as(i),c=Ze(t),l=s==="y",f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,b=r[a]/2-o[a]/2;let y;switch(c){case"top":y={x:f,y:r.y-o.height};break;case"bottom":y={x:f,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:u};break;case"left":y={x:r.x-o.width,y:u};break;default:y={x:r.x,y:r.y}}switch(Gt(t)){case"start":y[i]-=b*(n&&l?-1:1);break;case"end":y[i]+=b*(n&&l?-1:1);break}return y}const Ih=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:u}=wi(l,r,c),b=r,y={},C=0;for(let p=0;p<a.length;p++){const{name:x,fn:g}=a[p],{x:d,y:m,data:E,reset:v}=await g({x:f,y:u,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:l,platform:i,elements:{reference:e,floating:t}});f=d??f,u=m??u,y={...y,[x]:{...y[x],...E}},v&&C<=50&&(C++,typeof v=="object"&&(v.placement&&(b=v.placement),v.rects&&(l=v.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:f,y:u}=wi(l,b,c)),p=-1)}return{x:f,y:u,placement:b,strategy:o,middlewareData:y}};async function bn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:b=!1,padding:y=0}=Xe(t,e),C=hc(y),x=a[b?u==="floating"?"reference":"floating":u],g=vr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:c})),d=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,m=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(m))?await(s.getScale==null?void 0:s.getScale(m))||{x:1,y:1}:{x:1,y:1},v=vr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:d,offsetParent:m,strategy:c}):d);return{top:(g.top-v.top+C.top)/E.y,bottom:(v.bottom-g.bottom+C.bottom)/E.y,left:(g.left-v.left+C.left)/E.x,right:(v.right-g.right+C.right)/E.x}}const jh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:f=0}=Xe(e,t)||{};if(l==null)return{};const u=hc(f),b={x:n,y:r},y=cs(o),C=as(y),p=await i.getDimensions(l),x=y==="y",g=x?"top":"left",d=x?"bottom":"right",m=x?"clientHeight":"clientWidth",E=s.reference[C]+s.reference[y]-b[y]-s.floating[C],v=b[y]-s.reference[y],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let w=T?T[m]:0;(!w||!await(i.isElement==null?void 0:i.isElement(T)))&&(w=a.floating[m]||s.floating[C]);const D=E/2-v/2,P=w/2-p[C]/2-1,_=ft(u[g],P),I=ft(u[d],P),H=_,K=w-p[C]-I,j=w/2-p[C]/2+D,F=Ao(H,j,K),k=!c.arrow&&Gt(o)!=null&&j!==F&&s.reference[C]/2-(j<H?_:I)-p[C]/2<0,N=k?j<H?j-H:j-K:0;return{[y]:b[y]+N,data:{[y]:F,centerOffset:j-F-N,...k&&{alignmentOffset:N}},reset:k}}}),Lh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:p=!0,...x}=Xe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Ze(o),d=pt(a),m=Ze(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(l.floating)),v=b||(m||!p?[mr(a)]:kh(a)),T=C!=="none";!b&&T&&v.push(..._h(a,p,C,E));const w=[a,...v],D=await bn(t,x),P=[];let _=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&P.push(D[g]),u){const j=Ph(o,i,E);P.push(D[j[0]],D[j[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(j=>j<=0)){var I,H;const j=(((I=s.flip)==null?void 0:I.index)||0)+1,F=w[j];if(F)return{data:{index:j,overflows:_},reset:{placement:F}};let k=(H=_.filter(N=>N.overflows[0]<=0).sort((N,M)=>N.overflows[1]-M.overflows[1])[0])==null?void 0:H.placement;if(!k)switch(y){case"bestFit":{var K;const N=(K=_.filter(M=>{if(T){const A=pt(M.placement);return A===d||A==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(A=>A>0).reduce((A,O)=>A+O,0)]).sort((M,A)=>M[1]-A[1])[0])==null?void 0:K[0];N&&(k=N);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function xi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Si(e){return Rh.some(t=>e[t]>=0)}const $h=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Xe(e,t);switch(r){case"referenceHidden":{const s=await bn(t,{...o,elementContext:"reference"}),i=xi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Si(i)}}}case"escaped":{const s=await bn(t,{...o,altBoundary:!0}),i=xi(s,n.floating);return{data:{escapedOffsets:i,escaped:Si(i)}}}default:return{}}}}};async function Fh(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ze(n),a=Gt(n),c=pt(n)==="y",l=["left","top"].includes(i)?-1:1,f=s&&c?-1:1,u=Xe(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:C}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof C=="number"&&(y=a==="end"?C*-1:C),c?{x:y*f,y:b*l}:{x:b*l,y:y*f}}const zh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Fh(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Wh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:g,y:d}=x;return{x:g,y:d}}},...c}=Xe(e,t),l={x:n,y:r},f=await bn(t,c),u=pt(Ze(o)),b=is(u);let y=l[b],C=l[u];if(s){const x=b==="y"?"top":"left",g=b==="y"?"bottom":"right",d=y+f[x],m=y-f[g];y=Ao(d,y,m)}if(i){const x=u==="y"?"top":"left",g=u==="y"?"bottom":"right",d=C+f[x],m=C-f[g];C=Ao(d,C,m)}const p=a.fn({...t,[b]:y,[u]:C});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[b]:s,[u]:i}}}}}},Bh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Xe(e,t),f={x:n,y:r},u=pt(o),b=is(u);let y=f[b],C=f[u];const p=Xe(a,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const m=b==="y"?"height":"width",E=s.reference[b]-s.floating[m]+x.mainAxis,v=s.reference[b]+s.reference[m]-x.mainAxis;y<E?y=E:y>v&&(y=v)}if(l){var g,d;const m=b==="y"?"width":"height",E=["top","left"].includes(Ze(o)),v=s.reference[u]-s.floating[m]+(E&&((g=i.offset)==null?void 0:g[u])||0)+(E?0:x.crossAxis),T=s.reference[u]+s.reference[m]+(E?0:((d=i.offset)==null?void 0:d[u])||0)-(E?x.crossAxis:0);C<v?C=v:C>T&&(C=T)}return{[b]:y,[u]:C}}}},Hh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Xe(e,t),f=await bn(t,l),u=Ze(o),b=Gt(o),y=pt(o)==="y",{width:C,height:p}=s.floating;let x,g;u==="top"||u==="bottom"?(x=u,g=b===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=u,x=b==="end"?"top":"bottom");const d=p-f.top-f.bottom,m=C-f.left-f.right,E=ft(p-f[x],d),v=ft(C-f[g],m),T=!t.middlewareData.shift;let w=E,D=v;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=m),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=d),T&&!b){const _=Re(f.left,0),I=Re(f.right,0),H=Re(f.top,0),K=Re(f.bottom,0);y?D=C-2*(_!==0||I!==0?_+I:Re(f.left,f.right)):w=p-2*(H!==0||K!==0?H+K:Re(f.top,f.bottom))}await c({...t,availableWidth:D,availableHeight:w});const P=await i.getDimensions(a.floating);return C!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function Pr(){return typeof window<"u"}function qt(e){return gc(e)?(e.nodeName||"").toLowerCase():"#document"}function Me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(gc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gc(e){return Pr()?e instanceof Node||e instanceof Me(e).Node:!1}function je(e){return Pr()?e instanceof Element||e instanceof Me(e).Element:!1}function He(e){return Pr()?e instanceof HTMLElement||e instanceof Me(e).HTMLElement:!1}function Ci(e){return!Pr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Me(e).ShadowRoot}function On(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Vh(e){return["table","td","th"].includes(qt(e))}function kr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ls(e){const t=us(),n=je(e)?Le(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Yh(e){let t=ht(e);for(;He(t)&&!zt(t);){if(ls(t))return t;if(kr(t))return null;t=ht(t)}return null}function us(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zt(e){return["html","body","#document"].includes(qt(e))}function Le(e){return Me(e).getComputedStyle(e)}function Ar(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(qt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ci(e)&&e.host||Ve(e);return Ci(t)?t.host:t}function mc(e){const t=ht(e);return zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&On(t)?t:mc(t)}function wn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Me(o);if(s){const a=No(i);return t.concat(i,i.visualViewport||[],On(o)?o:[],a&&n?wn(a):[])}return t.concat(o,wn(o,[],n))}function No(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=He(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=gr(n)!==s||gr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ds(e){return je(e)?e:e.contextElement}function $t(e){const t=ds(e);if(!He(t))return Be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=vc(t);let i=(s?gr(n.width):n.width)/r,a=(s?gr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Uh=Be(0);function yc(e){const t=Me(e);return!us()||!t.visualViewport?Uh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Me(e)?!1:t}function Et(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ds(e);let i=Be(1);t&&(r?je(r)&&(i=$t(r)):i=$t(e));const a=Kh(s,n,r)?yc(s):Be(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,f=o.width/i.x,u=o.height/i.y;if(s){const b=Me(s),y=r&&je(r)?Me(r):r;let C=b,p=No(C);for(;p&&r&&y!==C;){const x=$t(p),g=p.getBoundingClientRect(),d=Le(p),m=g.left+(p.clientLeft+parseFloat(d.paddingLeft))*x.x,E=g.top+(p.clientTop+parseFloat(d.paddingTop))*x.y;c*=x.x,l*=x.y,f*=x.x,u*=x.y,c+=m,l+=E,C=Me(p),p=No(C)}}return vr({width:f,height:u,x:c,y:l})}function fs(e,t){const n=Ar(e).scrollLeft;return t?t.left+n:Et(Ve(e)).left+n}function bc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:fs(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Gh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ve(r),a=t?kr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Be(1);const f=Be(0),u=He(r);if((u||!u&&!s)&&((qt(r)!=="body"||On(i))&&(c=Ar(r)),He(r))){const y=Et(r);l=$t(r),f.x=y.x+r.clientLeft,f.y=y.y+r.clientTop}const b=i&&!u&&!s?bc(i,c,!0):Be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+f.x+b.x,y:n.y*l.y-c.scrollTop*l.y+f.y+b.y}}function qh(e){return Array.from(e.getClientRects())}function Xh(e){const t=Ve(e),n=Ar(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fs(e);const a=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function Zh(e,t){const n=Me(e),r=Ve(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=us();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function Jh(e,t){const n=Et(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=He(e)?$t(e):Be(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Ei(e,t,n){let r;if(t==="viewport")r=Zh(e,n);else if(t==="document")r=Xh(Ve(e));else if(je(t))r=Jh(t,n);else{const o=yc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vr(r)}function wc(e,t){const n=ht(e);return n===t||!je(n)||zt(n)?!1:Le(n).position==="fixed"||wc(n,t)}function Qh(e,t){const n=t.get(e);if(n)return n;let r=wn(e,[],!1).filter(a=>je(a)&&qt(a)!=="body"),o=null;const s=Le(e).position==="fixed";let i=s?ht(e):e;for(;je(i)&&!zt(i);){const a=Le(i),c=ls(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||On(i)&&!c&&wc(e,i))?r=r.filter(f=>f!==i):o=a,i=ht(i)}return t.set(e,r),r}function eg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?kr(t)?[]:Qh(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,f)=>{const u=Ei(t,f,o);return l.top=Re(u.top,l.top),l.right=ft(u.right,l.right),l.bottom=ft(u.bottom,l.bottom),l.left=Re(u.left,l.left),l},Ei(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function tg(e){const{width:t,height:n}=vc(e);return{width:t,height:n}}function ng(e,t,n){const r=He(t),o=Ve(t),s=n==="fixed",i=Et(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Be(0);if(r||!r&&!s)if((qt(t)!=="body"||On(o))&&(a=Ar(t)),r){const b=Et(t,!0,s,t);c.x=b.x+t.clientLeft,c.y=b.y+t.clientTop}else o&&(c.x=fs(o));const l=o&&!r&&!s?bc(o,a):Be(0),f=i.left+a.scrollLeft-c.x-l.x,u=i.top+a.scrollTop-c.y-l.y;return{x:f,y:u,width:i.width,height:i.height}}function oo(e){return Le(e).position==="static"}function Di(e,t){if(!He(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function xc(e,t){const n=Me(e);if(kr(e))return n;if(!He(e)){let o=ht(e);for(;o&&!zt(o);){if(je(o)&&!oo(o))return o;o=ht(o)}return n}let r=Di(e,t);for(;r&&Vh(r)&&oo(r);)r=Di(r,t);return r&&zt(r)&&oo(r)&&!ls(r)?n:r||Yh(e)||n}const rg=async function(e){const t=this.getOffsetParent||xc,n=this.getDimensions,r=await n(e.floating);return{reference:ng(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function og(e){return Le(e).direction==="rtl"}const sg={convertOffsetParentRelativeRectToViewportRelativeRect:Gh,getDocumentElement:Ve,getClippingRect:eg,getOffsetParent:xc,getElementRects:rg,getClientRects:qh,getDimensions:tg,getScale:$t,isElement:je,isRTL:og};function Sc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ig(e,t){let n=null,r;const o=Ve(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:f,top:u,width:b,height:y}=l;if(a||t(),!b||!y)return;const C=Hn(u),p=Hn(o.clientWidth-(f+b)),x=Hn(o.clientHeight-(u+y)),g=Hn(f),m={rootMargin:-C+"px "+-p+"px "+-x+"px "+-g+"px",threshold:Re(0,ft(1,c))||1};let E=!0;function v(T){const w=T[0].intersectionRatio;if(w!==c){if(!E)return i();w?i(!1,w):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w===1&&!Sc(l,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,m)}n.observe(e)}return i(!0),s}function ag(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ds(e),f=o||s?[...l?wn(l):[],...wn(t)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=l&&a?ig(l,n):null;let b=-1,y=null;i&&(y=new ResizeObserver(g=>{let[d]=g;d&&d.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var m;(m=y)==null||m.observe(t)})),n()}),l&&!c&&y.observe(l),y.observe(t));let C,p=c?Et(e):null;c&&x();function x(){const g=Et(e);p&&!Sc(p,g)&&n(),p=g,C=requestAnimationFrame(x)}return n(),()=>{var g;f.forEach(d=>{o&&d.removeEventListener("scroll",n),s&&d.removeEventListener("resize",n)}),u==null||u(),(g=y)==null||g.disconnect(),y=null,c&&cancelAnimationFrame(C)}}const cg=zh,lg=Wh,ug=Lh,dg=Hh,fg=$h,Ti=jh,pg=Bh,hg=(e,t,n)=>{const r=new Map,o={platform:sg,...n},s={...o.platform,_c:r};return Ih(e,t,{...o,platform:s})};var sr=typeof document<"u"?R.useLayoutEffect:R.useEffect;function yr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!yr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Cc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ri(e,t){const n=Cc(e);return Math.round(t*n)/n}function so(e){const t=S.useRef(e);return sr(()=>{t.current=e}),t}function gg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[f,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=S.useState(r);yr(b,r)||y(r);const[C,p]=S.useState(null),[x,g]=S.useState(null),d=S.useCallback(M=>{M!==T.current&&(T.current=M,p(M))},[]),m=S.useCallback(M=>{M!==w.current&&(w.current=M,g(M))},[]),E=s||C,v=i||x,T=S.useRef(null),w=S.useRef(null),D=S.useRef(f),P=c!=null,_=so(c),I=so(o),H=so(l),K=S.useCallback(()=>{if(!T.current||!w.current)return;const M={placement:t,strategy:n,middleware:b};I.current&&(M.platform=I.current),hg(T.current,w.current,M).then(A=>{const O={...A,isPositioned:H.current!==!1};j.current&&!yr(D.current,O)&&(D.current=O,Sr.flushSync(()=>{u(O)}))})},[b,t,n,I,H]);sr(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(M=>({...M,isPositioned:!1})))},[l]);const j=S.useRef(!1);sr(()=>(j.current=!0,()=>{j.current=!1}),[]),sr(()=>{if(E&&(T.current=E),v&&(w.current=v),E&&v){if(_.current)return _.current(E,v,K);K()}},[E,v,K,_,P]);const F=S.useMemo(()=>({reference:T,floating:w,setReference:d,setFloating:m}),[d,m]),k=S.useMemo(()=>({reference:E,floating:v}),[E,v]),N=S.useMemo(()=>{const M={position:n,left:0,top:0};if(!k.floating)return M;const A=Ri(k.floating,f.x),O=Ri(k.floating,f.y);return a?{...M,transform:"translate("+A+"px, "+O+"px)",...Cc(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:O}},[n,a,k.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:K,refs:F,elements:k,floatingStyles:N}),[f,K,F,k,N])}const mg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ti({element:r.current,padding:o}).fn(n):{}:r?Ti({element:r,padding:o}).fn(n):{}}}},vg=(e,t)=>({...cg(e),options:[e,t]}),yg=(e,t)=>({...lg(e),options:[e,t]}),bg=(e,t)=>({...pg(e),options:[e,t]}),wg=(e,t)=>({...ug(e),options:[e,t]}),xg=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...fg(e),options:[e,t]}),Cg=(e,t)=>({...mg(e),options:[e,t]});var Eg="Arrow",Ec=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(se.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ec.displayName=Eg;var Dg=Ec;function Tg(e){const[t,n]=S.useState(void 0);return ye(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ps="Popper",[Dc,mt]=gt(ps),[Rg,Tc]=Dc(ps),Rc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=S.useState(null);return h.jsx(Rg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Rc.displayName=ps;var Mc="PopperAnchor",Oc=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Tc(Mc,n),i=S.useRef(null),a=le(t,i);return S.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:h.jsx(se.div,{...o,ref:a})});Oc.displayName=Mc;var hs="PopperContent",[Mg,Og]=Dc(hs),Pc=S.forwardRef((e,t)=>{var $,q,W,B,Z,z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:b=!1,updatePositionStrategy:y="optimized",onPlaced:C,...p}=e,x=Tc(hs,n),[g,d]=S.useState(null),m=le(t,oe=>d(oe)),[E,v]=S.useState(null),T=Tg(E),w=(T==null?void 0:T.width)??0,D=(T==null?void 0:T.height)??0,P=r+(s!=="center"?"-"+s:""),_=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(l)?l:[l],H=I.length>0,K={padding:_,boundary:I.filter(kg),altBoundary:H},{refs:j,floatingStyles:F,placement:k,isPositioned:N,middlewareData:M}=gg({strategy:"fixed",placement:P,whileElementsMounted:(...oe)=>ag(...oe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[vg({mainAxis:o+D,alignmentAxis:i}),c&&yg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?bg():void 0,...K}),c&&wg({...K}),xg({...K,apply:({elements:oe,rects:de,availableWidth:Se,availableHeight:Ce})=>{const{width:Qe,height:Ln}=de.reference,et=oe.floating.style;et.setProperty("--radix-popper-available-width",`${Se}px`),et.setProperty("--radix-popper-available-height",`${Ce}px`),et.setProperty("--radix-popper-anchor-width",`${Qe}px`),et.setProperty("--radix-popper-anchor-height",`${Ln}px`)}}),E&&Cg({element:E,padding:a}),Ag({arrowWidth:w,arrowHeight:D}),b&&Sg({strategy:"referenceHidden",...K})]}),[A,O]=_c(k),L=_e(C);ye(()=>{N&&(L==null||L())},[N,L]);const U=($=M.arrow)==null?void 0:$.x,Y=(q=M.arrow)==null?void 0:q.y,V=((W=M.arrow)==null?void 0:W.centerOffset)!==0,[X,G]=S.useState();return ye(()=>{g&&G(window.getComputedStyle(g).zIndex)},[g]),h.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:N?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(B=M.transformOrigin)==null?void 0:B.x,(Z=M.transformOrigin)==null?void 0:Z.y].join(" "),...((z=M.hide)==null?void 0:z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(Mg,{scope:n,placedSide:A,onArrowChange:v,arrowX:U,arrowY:Y,shouldHideArrow:V,children:h.jsx(se.div,{"data-side":A,"data-align":O,...p,ref:m,style:{...p.style,animation:N?void 0:"none"}})})})});Pc.displayName=hs;var kc="PopperArrow",Pg={top:"bottom",right:"left",bottom:"top",left:"right"},Ac=S.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Og(kc,r),i=Pg[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(Dg,{...o,ref:n,style:{...o.style,display:"block"}})})});Ac.displayName=kc;function kg(e){return e!==null}var Ag=e=>({name:"transformOrigin",options:e,fn(t){var x,g,d;const{placement:n,rects:r,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,f]=_c(n),u={start:"0%",center:"50%",end:"100%"}[f],b=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,y=(((d=o.arrow)==null?void 0:d.y)??0)+c/2;let C="",p="";return l==="bottom"?(C=i?u:`${b}px`,p=`${-c}px`):l==="top"?(C=i?u:`${b}px`,p=`${r.floating.height+c}px`):l==="right"?(C=`${-c}px`,p=i?u:`${y}px`):l==="left"&&(C=`${r.floating.width+c}px`,p=i?u:`${y}px`),{data:{x:C,y:p}}}});function _c(e){const[t,n="center"]=e.split("-");return[t,n]}var _r=Rc,Pn=Oc,Nr=Pc,Ir=Ac,_g="Portal",kn=S.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=S.useState(!1);ye(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ke.createPortal(h.jsx(se.div,{...r,ref:t}),i):null});kn.displayName=_g;function Ng(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=Ig(t),o=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=le(r.ref,jg(o));return typeof n=="function"||r.isPresent?S.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function Ig(e){const[t,n]=S.useState(),r=S.useRef({}),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Ng(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Vn(r.current);s.current=a==="mounted"?l:"none"},[a]),ye(()=>{const l=r.current,f=o.current;if(f!==e){const b=s.current,y=Vn(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&b!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ye(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,u=y=>{const p=Vn(r.current).includes(y.animationName);if(y.target===t&&p&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},b=y=>{y.target===t&&(s.current=Vn(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vn(e){return(e==null?void 0:e.animationName)||"none"}function jg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Dt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Lg({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=_e(n),c=S.useCallback(l=>{if(s){const u=typeof l=="function"?l(e):l;u!==e&&a(u)}else o(l)},[s,e,o,a]);return[i,c]}function Lg({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,o=S.useRef(r),s=_e(t);return S.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var $g="VisuallyHidden",gs=S.forwardRef((e,t)=>h.jsx(se.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));gs.displayName=$g;var Fg=gs,[jr,qw]=gt("Tooltip",[mt]),Lr=mt(),Nc="TooltipProvider",zg=700,Io="tooltip.open",[Wg,ms]=jr(Nc),Ic=e=>{const{__scopeTooltip:t,delayDuration:n=zg,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=S.useRef(!0),a=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),h.jsx(Wg,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:S.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};Ic.displayName=Nc;var $r="Tooltip",[Bg,An]=jr($r),jc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=ms($r,e.__scopeTooltip),l=Lr(t),[f,u]=S.useState(null),b=dt(),y=S.useRef(0),C=i??c.disableHoverableContent,p=a??c.delayDuration,x=S.useRef(!1),[g=!1,d]=Dt({prop:r,defaultProp:o,onChange:w=>{w?(c.onOpen(),document.dispatchEvent(new CustomEvent(Io))):c.onClose(),s==null||s(w)}}),m=S.useMemo(()=>g?x.current?"delayed-open":"instant-open":"closed",[g]),E=S.useCallback(()=>{window.clearTimeout(y.current),y.current=0,x.current=!1,d(!0)},[d]),v=S.useCallback(()=>{window.clearTimeout(y.current),y.current=0,d(!1)},[d]),T=S.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{x.current=!0,d(!0),y.current=0},p)},[p,d]);return S.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),h.jsx(_r,{...l,children:h.jsx(Bg,{scope:t,contentId:b,open:g,stateAttribute:m,trigger:f,onTriggerChange:u,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?T():E()},[c.isOpenDelayedRef,T,E]),onTriggerLeave:S.useCallback(()=>{C?v():(window.clearTimeout(y.current),y.current=0)},[v,C]),onOpen:E,onClose:v,disableHoverableContent:C,children:n})})};jc.displayName=$r;var jo="TooltipTrigger",Lc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=An(jo,n),s=ms(jo,n),i=Lr(n),a=S.useRef(null),c=le(t,a,o.onTriggerChange),l=S.useRef(!1),f=S.useRef(!1),u=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),h.jsx(Pn,{asChild:!0,...i,children:h.jsx(se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ee(e.onPointerMove,b=>{b.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:ee(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:ee(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:ee(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:ee(e.onBlur,o.onClose),onClick:ee(e.onClick,o.onClose)})})});Lc.displayName=jo;var vs="TooltipPortal",[Hg,Vg]=jr(vs,{forceMount:void 0}),$c=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=An(vs,t);return h.jsx(Hg,{scope:t,forceMount:n,children:h.jsx(Je,{present:n||s.open,children:h.jsx(kn,{asChild:!0,container:o,children:r})})})};$c.displayName=vs;var Wt="TooltipContent",Fc=S.forwardRef((e,t)=>{const n=Vg(Wt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=An(Wt,e.__scopeTooltip);return h.jsx(Je,{present:r||i.open,children:i.disableHoverableContent?h.jsx(zc,{side:o,...s,ref:t}):h.jsx(Yg,{side:o,...s,ref:t})})}),Yg=S.forwardRef((e,t)=>{const n=An(Wt,e.__scopeTooltip),r=ms(Wt,e.__scopeTooltip),o=S.useRef(null),s=le(t,o),[i,a]=S.useState(null),{trigger:c,onClose:l}=n,f=o.current,{onPointerInTransitChange:u}=r,b=S.useCallback(()=>{a(null),u(!1)},[u]),y=S.useCallback((C,p)=>{const x=C.currentTarget,g={x:C.clientX,y:C.clientY},d=Xg(g,x.getBoundingClientRect()),m=Zg(g,d),E=Jg(p.getBoundingClientRect()),v=em([...m,...E]);a(v),u(!0)},[u]);return S.useEffect(()=>()=>b(),[b]),S.useEffect(()=>{if(c&&f){const C=x=>y(x,f),p=x=>y(x,c);return c.addEventListener("pointerleave",C),f.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",C),f.removeEventListener("pointerleave",p)}}},[c,f,y,b]),S.useEffect(()=>{if(i){const C=p=>{const x=p.target,g={x:p.clientX,y:p.clientY},d=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),m=!Qg(g,i);d?b():m&&(b(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,f,i,l,b]),h.jsx(zc,{...e,ref:s})}),[Ug,Kg]=jr($r,{isInside:!1}),Gg=lh("TooltipContent"),zc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=An(Wt,n),l=Lr(n),{onClose:f}=c;return S.useEffect(()=>(document.addEventListener(Io,f),()=>document.removeEventListener(Io,f)),[f]),S.useEffect(()=>{if(c.trigger){const u=b=>{const y=b.target;y!=null&&y.contains(c.trigger)&&f()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,f]),h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:f,children:h.jsxs(Nr,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(Gg,{children:r}),h.jsx(Ug,{scope:n,isInside:!0,children:h.jsx(Fg,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Fc.displayName=Wt;var Wc="TooltipArrow",qg=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Lr(n);return Kg(Wc,n).isInside?null:h.jsx(Ir,{...o,...r,ref:t})});qg.displayName=Wc;function Xg(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Zg(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Jg(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Qg(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,f=t[i].y;c>r!=f>r&&n<(l-a)*(r-c)/(f-c)+a&&(o=!o)}return o}function em(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),tm(t)}function tm(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var nm=Ic,rm=jc,om=Lc,sm=$c,im=Fc;function ys({delayDuration:e=0,...t}){return h.jsx(nm,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Bc({...e}){return h.jsx(ys,{children:h.jsx(rm,{"data-slot":"tooltip",...e})})}function Hc({...e}){return h.jsx(om,{"data-slot":"tooltip-trigger",...e})}function Vc({className:e,sideOffset:t=0,children:n,...r}){return h.jsx(sm,{children:h.jsx(im,{"data-slot":"tooltip-content",sideOffset:t,className:ie("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:n})})}const Yc=({children:e,content:t})=>h.jsx(ys,{children:h.jsxs(Bc,{children:[h.jsx(Hc,{asChild:!0,children:e}),h.jsx(Vc,{sideOffset:3,side:"bottom",className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:t})]})}),am=({onClick:e})=>h.jsx(Yc,{content:"Today",children:h.jsx(Ct,{variant:"ghost",onClick:e,children:h.jsx(nh,{style:{paddingTop:"0.8px"}})})});function bs(e){const t=e+"CollectionProvider",[n,r]=gt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:x,children:g}=p,d=R.useRef(null),m=R.useRef(new Map).current;return h.jsx(o,{scope:x,itemMap:m,collectionRef:d,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=St(a),l=R.forwardRef((p,x)=>{const{scope:g,children:d}=p,m=s(a,g),E=le(x,m.collectionRef);return h.jsx(c,{ref:E,children:d})});l.displayName=a;const f=e+"CollectionItemSlot",u="data-radix-collection-item",b=St(f),y=R.forwardRef((p,x)=>{const{scope:g,children:d,...m}=p,E=R.useRef(null),v=le(x,E),T=s(f,g);return R.useEffect(()=>(T.itemMap.set(E,{ref:E,...m}),()=>void T.itemMap.delete(E))),h.jsx(b,{[u]:"",ref:v,children:d})});y.displayName=f;function C(p){const x=s(e+"CollectionConsumer",p);return R.useCallback(()=>{const d=x.collectionRef.current;if(!d)return[];const m=Array.from(d.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((T,w)=>m.indexOf(T.ref.current)-m.indexOf(w.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:y},C,r]}var cm=S.createContext(void 0);function ws(e){const t=S.useContext(cm);return e||t||"ltr"}var io=0;function xs(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mi()),document.body.insertAdjacentElement("beforeend",e[1]??Mi()),io++,()=>{io===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),io--}},[])}function Mi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ao="focusScope.autoFocusOnMount",co="focusScope.autoFocusOnUnmount",Oi={bubbles:!1,cancelable:!0},lm="FocusScope",Fr=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=S.useState(null),l=_e(o),f=_e(s),u=S.useRef(null),b=le(t,p=>c(p)),y=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let p=function(m){if(y.paused||!a)return;const E=m.target;a.contains(E)?u.current=E:lt(u.current,{select:!0})},x=function(m){if(y.paused||!a)return;const E=m.relatedTarget;E!==null&&(a.contains(E)||lt(u.current,{select:!0}))},g=function(m){if(document.activeElement===document.body)for(const v of m)v.removedNodes.length>0&&lt(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const d=new MutationObserver(g);return a&&d.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),d.disconnect()}}},[r,a,y.paused]),S.useEffect(()=>{if(a){ki.add(y);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(ao,Oi);a.addEventListener(ao,l),a.dispatchEvent(g),g.defaultPrevented||(um(gm(Uc(a)),{select:!0}),document.activeElement===p&&lt(a))}return()=>{a.removeEventListener(ao,l),setTimeout(()=>{const g=new CustomEvent(co,Oi);a.addEventListener(co,f),a.dispatchEvent(g),g.defaultPrevented||lt(p??document.body,{select:!0}),a.removeEventListener(co,f),ki.remove(y)},0)}}},[a,l,f,y]);const C=S.useCallback(p=>{if(!n&&!r||y.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(x&&g){const d=p.currentTarget,[m,E]=dm(d);m&&E?!p.shiftKey&&g===E?(p.preventDefault(),n&&lt(m,{select:!0})):p.shiftKey&&g===m&&(p.preventDefault(),n&&lt(E,{select:!0})):g===d&&p.preventDefault()}},[n,r,y.paused]);return h.jsx(se.div,{tabIndex:-1,...i,ref:b,onKeyDown:C})});Fr.displayName=lm;function um(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lt(r,{select:t}),document.activeElement!==n)return}function dm(e){const t=Uc(e),n=Pi(t,e),r=Pi(t.reverse(),e);return[n,r]}function Uc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pi(e,t){for(const n of e)if(!fm(n,{upTo:t}))return n}function fm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function pm(e){return e instanceof HTMLInputElement&&"select"in e}function lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&pm(e)&&t&&e.select()}}var ki=hm();function hm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ai(e,t),e.unshift(t)},remove(t){var n;e=Ai(e,t),(n=e[0])==null||n.resume()}}}function Ai(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gm(e){return e.filter(t=>t.tagName!=="A")}var lo="rovingFocusGroup.onEntryFocus",mm={bubbles:!1,cancelable:!0},zr="RovingFocusGroup",[Lo,Kc,vm]=bs(zr),[ym,Gc]=gt(zr,[vm]),[bm,wm]=ym(zr),qc=S.forwardRef((e,t)=>h.jsx(Lo.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Lo.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(xm,{...e,ref:t})})}));qc.displayName=zr;var xm=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...u}=e,b=S.useRef(null),y=le(t,b),C=ws(s),[p=null,x]=Dt({prop:i,defaultProp:a,onChange:c}),[g,d]=S.useState(!1),m=_e(l),E=Kc(n),v=S.useRef(!1),[T,w]=S.useState(0);return S.useEffect(()=>{const D=b.current;if(D)return D.addEventListener(lo,m),()=>D.removeEventListener(lo,m)},[m]),h.jsx(bm,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:p,onItemFocus:S.useCallback(D=>x(D),[x]),onItemShiftTab:S.useCallback(()=>d(!0),[]),onFocusableItemAdd:S.useCallback(()=>w(D=>D+1),[]),onFocusableItemRemove:S.useCallback(()=>w(D=>D-1),[]),children:h.jsx(se.div,{tabIndex:g||T===0?-1:0,"data-orientation":r,...u,ref:y,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{v.current=!0}),onFocus:ee(e.onFocus,D=>{const P=!v.current;if(D.target===D.currentTarget&&P&&!g){const _=new CustomEvent(lo,mm);if(D.currentTarget.dispatchEvent(_),!_.defaultPrevented){const I=E().filter(k=>k.focusable),H=I.find(k=>k.active),K=I.find(k=>k.id===p),F=[H,K,...I].filter(Boolean).map(k=>k.ref.current);Jc(F,f)}}v.current=!1}),onBlur:ee(e.onBlur,()=>d(!1))})})}),Xc="RovingFocusGroupItem",Zc=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=dt(),c=s||a,l=wm(Xc,n),f=l.currentTabStopId===c,u=Kc(n),{onFocusableItemAdd:b,onFocusableItemRemove:y}=l;return S.useEffect(()=>{if(r)return b(),()=>y()},[r,b,y]),h.jsx(Lo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:h.jsx(se.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:ee(e.onMouseDown,C=>{r?l.onItemFocus(c):C.preventDefault()}),onFocus:ee(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:ee(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){l.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const p=Em(C,l.orientation,l.dir);if(p!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let g=u().filter(d=>d.focusable).map(d=>d.ref.current);if(p==="last")g.reverse();else if(p==="prev"||p==="next"){p==="prev"&&g.reverse();const d=g.indexOf(C.currentTarget);g=l.loop?Dm(g,d+1):g.slice(d+1)}setTimeout(()=>Jc(g))}})})})});Zc.displayName=Xc;var Sm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Em(e,t,n){const r=Cm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Sm[r]}function Jc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Dm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Tm=qc,Rm=Zc,Mm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,Yn=new WeakMap,Un={},uo=0,Qc=function(e){return e&&(e.host||Qc(e.parentNode))},Om=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pm=function(e,t,n,r){var o=Om(t,Array.isArray(e)?e:[e]);Un[n]||(Un[n]=new WeakMap);var s=Un[n],i=[],a=new Set,c=new Set(o),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};o.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(b){if(a.has(b))f(b);else try{var y=b.getAttribute(r),C=y!==null&&y!=="false",p=(_t.get(b)||0)+1,x=(s.get(b)||0)+1;_t.set(b,p),s.set(b,x),i.push(b),p===1&&C&&Yn.set(b,!0),x===1&&b.setAttribute(n,"true"),C||b.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",b,g)}})};return f(t),a.clear(),uo++,function(){i.forEach(function(u){var b=_t.get(u)-1,y=s.get(u)-1;_t.set(u,b),s.set(u,y),b||(Yn.has(u)||u.removeAttribute(r),Yn.delete(u)),y||u.removeAttribute(n)}),uo--,uo||(_t=new WeakMap,_t=new WeakMap,Yn=new WeakMap,Un={})}},Ss=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Mm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Pm(r,o,n,"aria-hidden")):function(){return null}},We=function(){return We=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},We.apply(this,arguments)};function el(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function km(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ir="right-scroll-bar-position",ar="width-before-scroll-bar",Am="with-scroll-bars-hidden",_m="--removed-body-scroll-bar-size";function fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Nm(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Im=typeof window<"u"?S.useLayoutEffect:S.useEffect,_i=new WeakMap;function jm(e,t){var n=Nm(null,function(r){return e.forEach(function(o){return fo(o,r)})});return Im(function(){var r=_i.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||fo(a,null)}),s.forEach(function(a){o.has(a)||fo(a,i)})}_i.set(n,e)},[e]),n}function Lm(e){return e}function $m(e,t){t===void 0&&(t=Lm);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(f){i.push(f),l()},filter:function(f){return i=i.filter(f),n}}}};return o}function Fm(e){e===void 0&&(e={});var t=$m(null);return t.options=We({async:!0,ssr:!1},e),t}var tl=function(e){var t=e.sideCar,n=el(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,We({},n))};tl.isSideCarExport=!0;function zm(e,t){return e.useMedium(t),tl}var nl=Fm(),po=function(){},Wr=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:po,onWheelCapture:po,onTouchMoveCapture:po}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,f=e.enabled,u=e.shards,b=e.sideCar,y=e.noIsolation,C=e.inert,p=e.allowPinchZoom,x=e.as,g=x===void 0?"div":x,d=e.gapMode,m=el(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=b,v=jm([n,t]),T=We(We({},m),o);return S.createElement(S.Fragment,null,f&&S.createElement(E,{sideCar:nl,removeScrollBar:l,shards:u,noIsolation:y,inert:C,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:d}),i?S.cloneElement(S.Children.only(a),We(We({},T),{ref:v})):S.createElement(g,We({},T,{className:c,ref:v}),a))});Wr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wr.classNames={fullWidth:ar,zeroRight:ir};var Wm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wm();return t&&e.setAttribute("nonce",t),e}function Hm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ym=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bm())&&(Hm(t,n),Vm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Um=function(){var e=Ym();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rl=function(){var e=Um(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Km={left:0,top:0,right:0,gap:0},ho=function(e){return parseInt(e||"",10)||0},Gm=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ho(n),ho(r),ho(o)]},qm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Km;var t=Gm(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Xm=rl(),Ft="data-scroll-locked",Zm=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
101
+ .`.concat(Am,` {
102
102
  overflow: hidden `).concat(r,`;
103
103
  padding-right: `).concat(a,"px ").concat(r,`;
104
104
  }
105
- body[`).concat($t,`] {
105
+ body[`).concat(Ft,`] {
106
106
  overflow: hidden `).concat(r,`;
107
107
  overscroll-behavior: contain;
108
108
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -115,47 +115,47 @@
115
115
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
116
116
  }
117
117
 
118
- .`).concat(sr,` {
118
+ .`).concat(ir,` {
119
119
  right: `).concat(a,"px ").concat(r,`;
120
120
  }
121
121
 
122
- .`).concat(ir,` {
122
+ .`).concat(ar,` {
123
123
  margin-right: `).concat(a,"px ").concat(r,`;
124
124
  }
125
125
 
126
- .`).concat(sr," .").concat(sr,` {
126
+ .`).concat(ir," .").concat(ir,` {
127
127
  right: 0 `).concat(r,`;
128
128
  }
129
129
 
130
- .`).concat(ir," .").concat(ir,` {
130
+ .`).concat(ar," .").concat(ar,` {
131
131
  margin-right: 0 `).concat(r,`;
132
132
  }
133
133
 
134
- body[`).concat($t,`] {
135
- `).concat(Am,": ").concat(a,`px;
134
+ body[`).concat(Ft,`] {
135
+ `).concat(_m,": ").concat(a,`px;
136
136
  }
137
- `)},_i=function(){var e=parseInt(document.body.getAttribute($t)||"0",10);return isFinite(e)?e:0},Zm=function(){S.useEffect(function(){return document.body.setAttribute($t,(_i()+1).toString()),function(){var e=_i()-1;e<=0?document.body.removeAttribute($t):document.body.setAttribute($t,e.toString())}},[])},Jm=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Zm();var s=S.useMemo(function(){return Gm(o)},[o]);return S.createElement(qm,{styles:Xm(s,!t,o,n?"":"!important")})},$o=!1;if(typeof window<"u")try{var Kn=Object.defineProperty({},"passive",{get:function(){return $o=!0,!0}});window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{$o=!1}var _t=$o?{passive:!1}:!1,Qm=function(e){return e.tagName==="TEXTAREA"},nl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qm(e)&&n[t]==="visible")},ev=function(e){return nl(e,"overflowY")},tv=function(e){return nl(e,"overflowX")},Ni=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=rl(e,r);if(o){var s=ol(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rl=function(e,t){return e==="v"?ev(t):tv(t)},ol=function(e,t){return e==="v"?nv(t):rv(t)},ov=function(e,t){return e==="h"&&t==="rtl"?-1:1},sv=function(e,t,n,r,o){var s=ov(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,d=i>0,u=0,b=0;do{var y=ol(e,a),C=y[0],h=y[1],w=y[2],m=h-w-s*C;(C||m)&&rl(e,a)&&(u+=m,b+=C),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&Math.abs(u)<1||!d&&Math.abs(b)<1)&&(l=!0),l},Gn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ii=function(e){return[e.deltaX,e.deltaY]},ji=function(e){return e&&"current"in e?e.current:e},iv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},av=function(e){return`
137
+ `)},Ni=function(){var e=parseInt(document.body.getAttribute(Ft)||"0",10);return isFinite(e)?e:0},Jm=function(){S.useEffect(function(){return document.body.setAttribute(Ft,(Ni()+1).toString()),function(){var e=Ni()-1;e<=0?document.body.removeAttribute(Ft):document.body.setAttribute(Ft,e.toString())}},[])},Qm=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Jm();var s=S.useMemo(function(){return qm(o)},[o]);return S.createElement(Xm,{styles:Zm(s,!t,o,n?"":"!important")})},$o=!1;if(typeof window<"u")try{var Kn=Object.defineProperty({},"passive",{get:function(){return $o=!0,!0}});window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{$o=!1}var Nt=$o?{passive:!1}:!1,ev=function(e){return e.tagName==="TEXTAREA"},ol=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ev(e)&&n[t]==="visible")},tv=function(e){return ol(e,"overflowY")},nv=function(e){return ol(e,"overflowX")},Ii=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=sl(e,r);if(o){var s=il(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ov=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sl=function(e,t){return e==="v"?tv(t):nv(t)},il=function(e,t){return e==="v"?rv(t):ov(t)},sv=function(e,t){return e==="h"&&t==="rtl"?-1:1},iv=function(e,t,n,r,o){var s=sv(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,f=i>0,u=0,b=0;do{var y=il(e,a),C=y[0],p=y[1],x=y[2],g=p-x-s*C;(C||g)&&sl(e,a)&&(u+=g,b+=C),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(u)<1||!f&&Math.abs(b)<1)&&(l=!0),l},Gn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ji=function(e){return[e.deltaX,e.deltaY]},Li=function(e){return e&&"current"in e?e.current:e},av=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cv=function(e){return`
138
138
  .block-interactivity-`.concat(e,` {pointer-events: none;}
139
139
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
140
- `)},cv=0,Nt=[];function lv(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),o=S.useState(cv++)[0],s=S.useState(tl)[0],i=S.useRef(e);S.useEffect(function(){i.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Pm([e.lockRef.current],(e.shards||[]).map(ji),!0).filter(Boolean);return h.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(h,w){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var m=Gn(h),f=n.current,v="deltaX"in h?h.deltaX:f[0]-m[0],E="deltaY"in h?h.deltaY:f[1]-m[1],g,T=h.target,x=Math.abs(v)>Math.abs(E)?"h":"v";if("touches"in h&&x==="h"&&T.type==="range")return!1;var D=Ni(x,T);if(!D)return!0;if(D?g=x:(g=x==="v"?"h":"v",D=Ni(x,T)),!D)return!1;if(!r.current&&"changedTouches"in h&&(v||E)&&(r.current=g),!g)return!0;var k=r.current||g;return sv(k,w,h,k==="h"?v:E)},[]),c=S.useCallback(function(h){var w=h;if(!(!Nt.length||Nt[Nt.length-1]!==s)){var m="deltaY"in w?Ii(w):Gn(w),f=t.current.filter(function(g){return g.name===w.type&&(g.target===w.target||w.target===g.shadowParent)&&iv(g.delta,m)})[0];if(f&&f.should){w.cancelable&&w.preventDefault();return}if(!f){var v=(i.current.shards||[]).map(ji).filter(Boolean).filter(function(g){return g.contains(w.target)}),E=v.length>0?a(w,v[0]):!i.current.noIsolation;E&&w.cancelable&&w.preventDefault()}}},[]),l=S.useCallback(function(h,w,m,f){var v={name:h,delta:w,target:m,should:f,shadowParent:uv(m)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(E){return E!==v})},1)},[]),d=S.useCallback(function(h){n.current=Gn(h),r.current=void 0},[]),u=S.useCallback(function(h){l(h.type,Ii(h),h.target,a(h,e.lockRef.current))},[]),b=S.useCallback(function(h){l(h.type,Gn(h),h.target,a(h,e.lockRef.current))},[]);S.useEffect(function(){return Nt.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:b}),document.addEventListener("wheel",c,_t),document.addEventListener("touchmove",c,_t),document.addEventListener("touchstart",d,_t),function(){Nt=Nt.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,_t),document.removeEventListener("touchmove",c,_t),document.removeEventListener("touchstart",d,_t)}},[]);var y=e.removeScrollBar,C=e.inert;return S.createElement(S.Fragment,null,C?S.createElement(s,{styles:av(o)}):null,y?S.createElement(Jm,{gapMode:e.gapMode}):null)}function uv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dv=Fm(el,lv);var Wr=S.forwardRef(function(e,t){return S.createElement(zr,Be({},e,{ref:t,sideCar:dv}))});Wr.classNames=zr.classNames;var Fo=["Enter"," "],fv=["ArrowDown","PageUp","Home"],sl=["ArrowUp","PageDown","End"],pv=[...fv,...sl],hv={ltr:[...Fo,"ArrowRight"],rtl:[...Fo,"ArrowLeft"]},gv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_n="Menu",[xn,mv,vv]=ys(_n),[Tt,il]=mt(_n,[vv,vt,Uc]),Br=vt(),al=Uc(),[yv,Rt]=Tt(_n),[bv,Nn]=Tt(_n),cl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Br(t),[c,l]=S.useState(null),d=S.useRef(!1),u=_e(s),b=bs(o);return S.useEffect(()=>{const y=()=>{d.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>d.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),p.jsx(Ar,{...a,children:p.jsx(yv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:p.jsx(bv,{scope:t,onClose:S.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:b,modal:i,children:r})})})};cl.displayName=_n;var wv="MenuAnchor",Ss=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Br(n);return p.jsx(Pn,{...o,...r,ref:t})});Ss.displayName=wv;var Cs="MenuPortal",[xv,ll]=Tt(Cs,{forceMount:void 0}),ul=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Rt(Cs,t);return p.jsx(xv,{scope:t,forceMount:n,children:p.jsx(Je,{present:n||s.open,children:p.jsx(kn,{asChild:!0,container:o,children:r})})})};ul.displayName=Cs;var Ae="MenuContent",[Sv,Es]=Tt(Ae),dl=S.forwardRef((e,t)=>{const n=ll(Ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Rt(Ae,e.__scopeMenu),i=Nn(Ae,e.__scopeMenu);return p.jsx(xn.Provider,{scope:e.__scopeMenu,children:p.jsx(Je,{present:r||s.open,children:p.jsx(xn.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(Cv,{...o,ref:t}):p.jsx(Ev,{...o,ref:t})})})})}),Cv=S.forwardRef((e,t)=>{const n=Rt(Ae,e.__scopeMenu),r=S.useRef(null),o=le(t,r);return S.useEffect(()=>{const s=r.current;if(s)return xs(s)},[]),p.jsx(Ds,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ev=S.forwardRef((e,t)=>{const n=Rt(Ae,e.__scopeMenu);return p.jsx(Ds,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Dv=St("MenuContent.ScrollLock"),Ds=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:b,onDismiss:y,disableOutsideScroll:C,...h}=e,w=Rt(Ae,n),m=Nn(Ae,n),f=Br(n),v=al(n),E=mv(n),[g,T]=S.useState(null),x=S.useRef(null),D=le(t,x,w.onContentChange),k=S.useRef(0),_=S.useRef(""),N=S.useRef(0),B=S.useRef(null),U=S.useRef("right"),I=S.useRef(0),z=C?Wr:S.Fragment,P=C?{as:Dv,allowPinchZoom:!0}:void 0,j=A=>{var W,q;const O=_.current+A,$=E().filter(K=>!K.disabled),Y=document.activeElement,V=(W=$.find(K=>K.ref.current===Y))==null?void 0:W.textValue,H=$.map(K=>K.textValue),Z=Lv(H,O,V),G=(q=$.find(K=>K.textValue===Z))==null?void 0:q.ref.current;(function K(L){_.current=L,window.clearTimeout(k.current),L!==""&&(k.current=window.setTimeout(()=>K(""),1e3))})(O),G&&setTimeout(()=>G.focus())};S.useEffect(()=>()=>window.clearTimeout(k.current),[]),ws();const M=S.useCallback(A=>{var $,Y;return U.current===(($=B.current)==null?void 0:$.side)&&Fv(A,(Y=B.current)==null?void 0:Y.area)},[]);return p.jsx(Sv,{scope:n,searchRef:_,onItemEnter:S.useCallback(A=>{M(A)&&A.preventDefault()},[M]),onItemLeave:S.useCallback(A=>{var O;M(A)||((O=x.current)==null||O.focus(),T(null))},[M]),onTriggerLeave:S.useCallback(A=>{M(A)&&A.preventDefault()},[M]),pointerGraceTimerRef:N,onPointerGraceIntentChange:S.useCallback(A=>{B.current=A},[]),children:p.jsx(z,{...P,children:p.jsx($r,{asChild:!0,trapped:o,onMountAutoFocus:ee(s,A=>{var O;A.preventDefault(),(O=x.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:b,onDismiss:y,children:p.jsx(Dm,{asChild:!0,...v,dir:m.dir,orientation:"vertical",loop:r,currentTabStopId:g,onCurrentTabStopIdChange:T,onEntryFocus:ee(c,A=>{m.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(_r,{role:"menu","aria-orientation":"vertical","data-state":Rl(w.open),"data-radix-menu-content":"",dir:m.dir,...f,...h,ref:D,style:{outline:"none",...h.style},onKeyDown:ee(h.onKeyDown,A=>{const $=A.target.closest("[data-radix-menu-content]")===A.currentTarget,Y=A.ctrlKey||A.altKey||A.metaKey,V=A.key.length===1;$&&(A.key==="Tab"&&A.preventDefault(),!Y&&V&&j(A.key));const H=x.current;if(A.target!==H||!pv.includes(A.key))return;A.preventDefault();const G=E().filter(W=>!W.disabled).map(W=>W.ref.current);sl.includes(A.key)&&G.reverse(),Iv(G)}),onBlur:ee(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(k.current),_.current="")}),onPointerMove:ee(e.onPointerMove,Sn(A=>{const O=A.target,$=I.current!==A.clientX;if(A.currentTarget.contains(O)&&$){const Y=A.clientX>I.current?"right":"left";U.current=Y,I.current=A.clientX}}))})})})})})})});dl.displayName=Ae;var Tv="MenuGroup",Ts=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{role:"group",...r,ref:t})});Ts.displayName=Tv;var Rv="MenuLabel",fl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{...r,ref:t})});fl.displayName=Rv;var yr="MenuItem",Li="menu.itemSelect",Hr=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=S.useRef(null),i=Nn(yr,e.__scopeMenu),a=Es(yr,e.__scopeMenu),c=le(t,s),l=S.useRef(!1),d=()=>{const u=s.current;if(!n&&u){const b=new CustomEvent(Li,{bubbles:!0,cancelable:!0});u.addEventListener(Li,y=>r==null?void 0:r(y),{once:!0}),uc(u,b),b.defaultPrevented?l.current=!1:i.onClose()}};return p.jsx(pl,{...o,ref:c,disabled:n,onClick:ee(e.onClick,d),onPointerDown:u=>{var b;(b=e.onPointerDown)==null||b.call(e,u),l.current=!0},onPointerUp:ee(e.onPointerUp,u=>{var b;l.current||(b=u.currentTarget)==null||b.click()}),onKeyDown:ee(e.onKeyDown,u=>{const b=a.searchRef.current!=="";n||b&&u.key===" "||Fo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Hr.displayName=yr;var pl=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Es(yr,n),a=al(n),c=S.useRef(null),l=le(t,c),[d,u]=S.useState(!1),[b,y]=S.useState("");return S.useEffect(()=>{const C=c.current;C&&y((C.textContent??"").trim())},[s.children]),p.jsx(xn.ItemSlot,{scope:n,disabled:r,textValue:o??b,children:p.jsx(Tm,{asChild:!0,...a,focusable:!r,children:p.jsx(se.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:ee(e.onPointerMove,Sn(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,Sn(C=>i.onItemLeave(C))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),Mv="MenuCheckboxItem",hl=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(bl,{scope:e.__scopeMenu,checked:n,children:p.jsx(Hr,{role:"menuitemcheckbox","aria-checked":br(n)?"mixed":n,...o,ref:t,"data-state":Ms(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(br(n)?!0:!n),{checkForDefaultPrevented:!1})})})});hl.displayName=Mv;var gl="MenuRadioGroup",[Ov,Pv]=Tt(gl,{value:void 0,onValueChange:()=>{}}),ml=S.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=_e(r);return p.jsx(Ov,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Ts,{...o,ref:t})})});ml.displayName=gl;var vl="MenuRadioItem",yl=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=Pv(vl,e.__scopeMenu),s=n===o.value;return p.jsx(bl,{scope:e.__scopeMenu,checked:s,children:p.jsx(Hr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ms(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});yl.displayName=vl;var Rs="MenuItemIndicator",[bl,kv]=Tt(Rs,{checked:!1}),wl=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=kv(Rs,n);return p.jsx(Je,{present:r||br(s.checked)||s.checked===!0,children:p.jsx(se.span,{...o,ref:t,"data-state":Ms(s.checked)})})});wl.displayName=Rs;var Av="MenuSeparator",xl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});xl.displayName=Av;var _v="MenuArrow",Sl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Br(n);return p.jsx(Nr,{...o,...r,ref:t})});Sl.displayName=_v;var Nv="MenuSub",[Hw,Cl]=Tt(Nv),dn="MenuSubTrigger",El=S.forwardRef((e,t)=>{const n=Rt(dn,e.__scopeMenu),r=Nn(dn,e.__scopeMenu),o=Cl(dn,e.__scopeMenu),s=Es(dn,e.__scopeMenu),i=S.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},d=S.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return S.useEffect(()=>d,[d]),S.useEffect(()=>{const u=a.current;return()=>{window.clearTimeout(u),c(null)}},[a,c]),p.jsx(Ss,{asChild:!0,...l,children:p.jsx(pl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Rl(n.open),...e,ref:Mr(t,o.onTriggerChange),onClick:u=>{var b;(b=e.onClick)==null||b.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,Sn(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ee(e.onPointerLeave,Sn(u=>{var y,C;d();const b=(y=n.content)==null?void 0:y.getBoundingClientRect();if(b){const h=(C=n.content)==null?void 0:C.dataset.side,w=h==="right",m=w?-5:5,f=b[w?"left":"right"],v=b[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+m,y:u.clientY},{x:f,y:b.top},{x:v,y:b.top},{x:v,y:b.bottom},{x:f,y:b.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ee(e.onKeyDown,u=>{var y;const b=s.searchRef.current!=="";e.disabled||b&&u.key===" "||hv[r.dir].includes(u.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),u.preventDefault())})})})});El.displayName=dn;var Dl="MenuSubContent",Tl=S.forwardRef((e,t)=>{const n=ll(Ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Rt(Ae,e.__scopeMenu),i=Nn(Ae,e.__scopeMenu),a=Cl(Dl,e.__scopeMenu),c=S.useRef(null),l=le(t,c);return p.jsx(xn.Provider,{scope:e.__scopeMenu,children:p.jsx(Je,{present:r||s.open,children:p.jsx(xn.Slot,{scope:e.__scopeMenu,children:p.jsx(Ds,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var u;i.isUsingKeyboardRef.current&&((u=c.current)==null||u.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ee(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ee(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ee(e.onKeyDown,d=>{var y;const u=d.currentTarget.contains(d.target),b=gv[i.dir].includes(d.key);u&&b&&(s.onOpenChange(!1),(y=a.trigger)==null||y.focus(),d.preventDefault())})})})})})});Tl.displayName=Dl;function Rl(e){return e?"open":"closed"}function br(e){return e==="indeterminate"}function Ms(e){return br(e)?"indeterminate":e?"checked":"unchecked"}function Iv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Lv(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=jv(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function $v(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,d=t[i].y;c>r!=d>r&&n<(l-a)*(r-c)/(d-c)+a&&(o=!o)}return o}function Fv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return $v(n,t)}function Sn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var zv=cl,Wv=Ss,Bv=ul,Hv=dl,Vv=Ts,Yv=fl,Uv=Hr,Kv=hl,Gv=ml,qv=yl,Xv=wl,Zv=xl,Jv=Sl,Qv=El,ey=Tl,Os="DropdownMenu",[ty,Vw]=mt(Os,[il]),xe=il(),[ny,Ml]=ty(Os),Ol=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=xe(t),l=S.useRef(null),[d=!1,u]=Et({prop:o,defaultProp:s,onChange:i});return p.jsx(ny,{scope:t,triggerId:ft(),triggerRef:l,contentId:ft(),open:d,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(b=>!b),[u]),modal:a,children:p.jsx(zv,{...c,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Ol.displayName=Os;var Pl="DropdownMenuTrigger",kl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Ml(Pl,n),i=xe(n);return p.jsx(Wv,{asChild:!0,...i,children:p.jsx(se.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Mr(t,s.triggerRef),onPointerDown:ee(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:ee(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});kl.displayName=Pl;var ry="DropdownMenuPortal",Al=e=>{const{__scopeDropdownMenu:t,...n}=e,r=xe(t);return p.jsx(Bv,{...r,...n})};Al.displayName=ry;var _l="DropdownMenuContent",Nl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ml(_l,n),s=xe(n),i=S.useRef(!1);return p.jsx(Hv,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,d=c.button===2||l;(!o.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Nl.displayName=_l;var oy="DropdownMenuGroup",sy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Vv,{...o,...r,ref:t})});sy.displayName=oy;var iy="DropdownMenuLabel",Il=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Yv,{...o,...r,ref:t})});Il.displayName=iy;var ay="DropdownMenuItem",jl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Uv,{...o,...r,ref:t})});jl.displayName=ay;var cy="DropdownMenuCheckboxItem",Ll=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Kv,{...o,...r,ref:t})});Ll.displayName=cy;var ly="DropdownMenuRadioGroup",uy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Gv,{...o,...r,ref:t})});uy.displayName=ly;var dy="DropdownMenuRadioItem",fy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(qv,{...o,...r,ref:t})});fy.displayName=dy;var py="DropdownMenuItemIndicator",$l=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Xv,{...o,...r,ref:t})});$l.displayName=py;var hy="DropdownMenuSeparator",Fl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Zv,{...o,...r,ref:t})});Fl.displayName=hy;var gy="DropdownMenuArrow",my=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Jv,{...o,...r,ref:t})});my.displayName=gy;var vy="DropdownMenuSubTrigger",yy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Qv,{...o,...r,ref:t})});yy.displayName=vy;var by="DropdownMenuSubContent",wy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(ey,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wy.displayName=by;var xy=Ol,Sy=kl,Cy=Al,Ey=Nl,Dy=Il,Ty=jl,Ry=Ll,My=$l,Oy=Fl;function Ps({...e}){return p.jsx(xy,{"data-slot":"dropdown-menu",...e})}function ks({...e}){return p.jsx(Sy,{"data-slot":"dropdown-menu-trigger",...e})}function As({className:e,sideOffset:t=4,...n}){return p.jsx(Cy,{children:p.jsx(Ey,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function $i({className:e,inset:t,variant:n="default",...r}){return p.jsx(Ty,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function Py({className:e,children:t,checked:n,...r}){return p.jsxs(Ry,{"data-slot":"dropdown-menu-checkbox-item",className:ie("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(My,{children:p.jsx(ic,{className:"size-4"})})}),t]})}function ky({className:e,inset:t,...n}){return p.jsx(Dy,{"data-slot":"dropdown-menu-label","data-inset":t,className:ie("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Ay({className:e,...t}){return p.jsx(Oy,{"data-slot":"dropdown-menu-separator",className:ie("bg-border -mx-1 my-1 h-px",e),...t})}const _y={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},Ny=({code:e})=>p.jsx("p",{className:"text-sm text-muted-foreground",children:p.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[p.jsx("span",{className:"text-xs",children:"⌘"}),e]})}),Iy={[ne.DAY]:p.jsx(Gp,{size:"20px"}),[ne.WEEK]:p.jsx(Up,{size:"20px"}),[ne.TABLE]:p.jsx(jp,{size:"20px"}),[ne.MONTH]:p.jsx(Xp,{size:"20px"})},Fi=()=>{const{bookingViewType:e}=Oe(),{onViewTypeChange:t}=Ca(),{viewModes:n}=dt(),r=R.useCallback(a=>a===e?"custom":"outline",[e]),o=R.useCallback(a=>{a!==e&&t(a)},[t]),s=R.useMemo(()=>n.map(a=>({variant:r(a),icon:Iy[a],events:c=>o(c),label:a})),[n,o,r]),i=R.useMemo(()=>{const a=s.find(c=>c.label===e);if(a)return a.icon},[e,s]);return p.jsxs(Ps,{children:[p.jsx(ks,{children:p.jsx(Ft,{variant:"ghost",className:"w-8 h-8",asChild:!0,children:p.jsx(im,{content:"Calendar Modes",children:i||p.jsx(Np,{color:"gray",className:"w-full h-full"})})})}),p.jsx(As,{className:"z-100",children:s.map(a=>p.jsxs(Py,{checked:a.label===e,onCheckedChange:()=>a.events(a.label),className:"flex flex-row justify-between gap-6",children:[p.jsxs("div",{className:"flex flex-row gap-4",children:[a.icon,p.jsx("div",{children:_y.capitalize(a.label)})]}),p.jsx(Ny,{code:"o"})]},a.label))})]})},jy=566,Ly=()=>{const{todayWeek:e,bookingViewType:t,setTodayDay:n,nextWeek:r,previousWeek:o,setDays:s}=Oe(),{resetSelectedNode:i,resetNodes:a}=Ht(g=>g),{onTodayClick:c}=dt(),{fullYear:l,monthMessage:d}=Ea(g=>g),{onDayChange:u}=dt(),[b,y]=R.useState(!1),C=()=>{const g=new Date;switch(c(g),t){case ne.TABLE:case ne.DAY:{n(g);break}default:{e();break}}},h=()=>s(1),w=()=>s(-1),m=g=>g==="next"?r():o(),f=g=>g==="next"?h():w(),v=g=>{switch(a(),i(),t){case ne.TABLE:case ne.DAY:{const T=f(g);u(T,g);break}case ne.WEEK:{const T=m(g),{firstDayOfWeek:x,lastDayOfWeek:D}=te.firstAndLastWeekDays(T);u([x,D],g);break}}};R.useEffect(()=>{e()},[e]),R.useEffect(()=>{const g=()=>{if(typeof window>"u")return!1;window.innerWidth<=jy?y(!0):y(!1)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]);const E=p.jsxs("div",{className:"header_actions",children:[p.jsx(fh,{handleWeekChange:v}),p.jsx(ph,{mobileLayout:b,onClick:C})]});return p.jsx(p.Fragment,{children:b?p.jsxs("div",{className:"headerCalendar_mobile",children:[p.jsx("div",{className:"headerCalendar_mobile_month",children:p.jsxs("span",{className:"headerCalendar_mobile_month_span",children:[d," ",l]})}),p.jsxs("div",{className:"headerCalendar_mobile_actions",children:[E,p.jsx(Fi,{})]})]}):p.jsxs("div",{className:"headerCalendar",children:[p.jsx("div",{className:"headerCalendar_actions",children:E}),p.jsx("div",{className:"headerCalendar_month",children:p.jsxs("span",{className:"headerCalendar_month_span",children:[d," ",l]})}),p.jsx(Fi,{})]})})},Xt=Ko(e=>({isDragging:!1,updateIsDragging:t=>e(n=>({...n,isDragging:t}))}));function $y(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const Fy=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:$y(t,n,r)},zy=({bookingInit:e,slotData:t,heightStyle:n})=>p.jsx(Uf,{modifiers:[Fy],dropAnimation:{duration:2e3,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:"Draggable dragging",children:p.jsx("div",{className:"cardOverlay_content",style:{height:n},children:p.jsx(zo,{booking:e,slotData:t,heightStyleTransformer:n})})}),zo=({booking:e,slotData:t,onClick:n,heightStyleTransformer:r,customClasses:o})=>{const{day:s,hour:i}=t,{bookingViewType:a}=Oe(),c=Xt(E=>E.updateIsDragging),{attributes:l,listeners:d,setNodeRef:u,isDragging:b,transform:y}=rs({id:e.id,data:{type:"booking-slots",booking:e,slotData:t}}),C=y?{transform:`translate3d(${y.x}px, ${y.y}px, 0)`}:void 0;Dn({onDragStart:()=>c(!0),onDragAbort:()=>h(),onDragCancel:()=>h(),onDragEnd:()=>h()});const h=R.useCallback(()=>{c(!1)},[]),w=E=>E<="11:30",m=a===ne.DAY?{width:"99%"}:{width:"100%"},f={height:r,position:"relative",zIndex:50,...C,...m},v=(E,g)=>{const T=te.dateAndHourDateToString(new Date(E.finishAt));return te.isTodayDate(g)&&w(T)?{backgroundColor:"#000000c0"}:{backgroundColor:"#000456c0"}};return p.jsxs(p.Fragment,{children:[!b&&p.jsx("div",{ref:u,className:ie("cardContent_render",o),style:{...C,...f},...d,...l,children:p.jsx("div",{className:"relative w-full h-full",style:v(e,new Date(s.split(":")[1])),onPointerUp:n,children:p.jsxs("div",{className:ie("flex flex-col h-full text-white pl-2 lg:pl-2 justify-start items-start"),children:[p.jsx("p",{className:"text-[0.8rem] h-[0.8rem]",children:`${te.dateAndHourDateToString(e.startAt)} - ${te.dateAndHourDateToString(e.finishAt)}`}),p.jsx("span",{className:"flex flex-row items-center justify-center"})]})},`${s}-${i}`)},e.id),b&&p.jsx(zy,{bookingInit:e,slotData:t,heightStyle:String(r)})]})};var on={exports:{}},sn={},an={exports:{}},ho={},qn={exports:{}},Xn={exports:{}},ae={};/** @license React v16.13.1
140
+ `)},lv=0,It=[];function uv(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),o=S.useState(lv++)[0],s=S.useState(rl)[0],i=S.useRef(e);S.useEffect(function(){i.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=km([e.lockRef.current],(e.shards||[]).map(Li),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var g=Gn(p),d=n.current,m="deltaX"in p?p.deltaX:d[0]-g[0],E="deltaY"in p?p.deltaY:d[1]-g[1],v,T=p.target,w=Math.abs(m)>Math.abs(E)?"h":"v";if("touches"in p&&w==="h"&&T.type==="range")return!1;var D=Ii(w,T);if(!D)return!0;if(D?v=w:(v=w==="v"?"h":"v",D=Ii(w,T)),!D)return!1;if(!r.current&&"changedTouches"in p&&(m||E)&&(r.current=v),!v)return!0;var P=r.current||v;return iv(P,x,p,P==="h"?m:E)},[]),c=S.useCallback(function(p){var x=p;if(!(!It.length||It[It.length-1]!==s)){var g="deltaY"in x?ji(x):Gn(x),d=t.current.filter(function(v){return v.name===x.type&&(v.target===x.target||x.target===v.shadowParent)&&av(v.delta,g)})[0];if(d&&d.should){x.cancelable&&x.preventDefault();return}if(!d){var m=(i.current.shards||[]).map(Li).filter(Boolean).filter(function(v){return v.contains(x.target)}),E=m.length>0?a(x,m[0]):!i.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),l=S.useCallback(function(p,x,g,d){var m={name:p,delta:x,target:g,should:d,shadowParent:dv(g)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(E){return E!==m})},1)},[]),f=S.useCallback(function(p){n.current=Gn(p),r.current=void 0},[]),u=S.useCallback(function(p){l(p.type,ji(p),p.target,a(p,e.lockRef.current))},[]),b=S.useCallback(function(p){l(p.type,Gn(p),p.target,a(p,e.lockRef.current))},[]);S.useEffect(function(){return It.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:b}),document.addEventListener("wheel",c,Nt),document.addEventListener("touchmove",c,Nt),document.addEventListener("touchstart",f,Nt),function(){It=It.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,Nt),document.removeEventListener("touchmove",c,Nt),document.removeEventListener("touchstart",f,Nt)}},[]);var y=e.removeScrollBar,C=e.inert;return S.createElement(S.Fragment,null,C?S.createElement(s,{styles:cv(o)}):null,y?S.createElement(Qm,{gapMode:e.gapMode}):null)}function dv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fv=zm(nl,uv);var Br=S.forwardRef(function(e,t){return S.createElement(Wr,We({},e,{ref:t,sideCar:fv}))});Br.classNames=Wr.classNames;var Fo=["Enter"," "],pv=["ArrowDown","PageUp","Home"],al=["ArrowUp","PageDown","End"],hv=[...pv,...al],gv={ltr:[...Fo,"ArrowRight"],rtl:[...Fo,"ArrowLeft"]},mv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_n="Menu",[xn,vv,yv]=bs(_n),[Rt,cl]=gt(_n,[yv,mt,Gc]),Hr=mt(),ll=Gc(),[bv,Mt]=Rt(_n),[wv,Nn]=Rt(_n),ul=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Hr(t),[c,l]=S.useState(null),f=S.useRef(!1),u=_e(s),b=ws(o);return S.useEffect(()=>{const y=()=>{f.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>f.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),h.jsx(_r,{...a,children:h.jsx(bv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:h.jsx(wv,{scope:t,onClose:S.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:b,modal:i,children:r})})})};ul.displayName=_n;var xv="MenuAnchor",Cs=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hr(n);return h.jsx(Pn,{...o,...r,ref:t})});Cs.displayName=xv;var Es="MenuPortal",[Sv,dl]=Rt(Es,{forceMount:void 0}),fl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Mt(Es,t);return h.jsx(Sv,{scope:t,forceMount:n,children:h.jsx(Je,{present:n||s.open,children:h.jsx(kn,{asChild:!0,container:o,children:r})})})};fl.displayName=Es;var Ae="MenuContent",[Cv,Ds]=Rt(Ae),pl=S.forwardRef((e,t)=>{const n=dl(Ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Mt(Ae,e.__scopeMenu),i=Nn(Ae,e.__scopeMenu);return h.jsx(xn.Provider,{scope:e.__scopeMenu,children:h.jsx(Je,{present:r||s.open,children:h.jsx(xn.Slot,{scope:e.__scopeMenu,children:i.modal?h.jsx(Ev,{...o,ref:t}):h.jsx(Dv,{...o,ref:t})})})})}),Ev=S.forwardRef((e,t)=>{const n=Mt(Ae,e.__scopeMenu),r=S.useRef(null),o=le(t,r);return S.useEffect(()=>{const s=r.current;if(s)return Ss(s)},[]),h.jsx(Ts,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Dv=S.forwardRef((e,t)=>{const n=Mt(Ae,e.__scopeMenu);return h.jsx(Ts,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Tv=St("MenuContent.ScrollLock"),Ts=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:b,onDismiss:y,disableOutsideScroll:C,...p}=e,x=Mt(Ae,n),g=Nn(Ae,n),d=Hr(n),m=ll(n),E=vv(n),[v,T]=S.useState(null),w=S.useRef(null),D=le(t,w,x.onContentChange),P=S.useRef(0),_=S.useRef(""),I=S.useRef(0),H=S.useRef(null),K=S.useRef("right"),j=S.useRef(0),F=C?Br:S.Fragment,k=C?{as:Tv,allowPinchZoom:!0}:void 0,N=A=>{var $,q;const O=_.current+A,L=E().filter(W=>!W.disabled),U=document.activeElement,Y=($=L.find(W=>W.ref.current===U))==null?void 0:$.textValue,V=L.map(W=>W.textValue),X=$v(V,O,Y),G=(q=L.find(W=>W.textValue===X))==null?void 0:q.ref.current;(function W(B){_.current=B,window.clearTimeout(P.current),B!==""&&(P.current=window.setTimeout(()=>W(""),1e3))})(O),G&&setTimeout(()=>G.focus())};S.useEffect(()=>()=>window.clearTimeout(P.current),[]),xs();const M=S.useCallback(A=>{var L,U;return K.current===((L=H.current)==null?void 0:L.side)&&zv(A,(U=H.current)==null?void 0:U.area)},[]);return h.jsx(Cv,{scope:n,searchRef:_,onItemEnter:S.useCallback(A=>{M(A)&&A.preventDefault()},[M]),onItemLeave:S.useCallback(A=>{var O;M(A)||((O=w.current)==null||O.focus(),T(null))},[M]),onTriggerLeave:S.useCallback(A=>{M(A)&&A.preventDefault()},[M]),pointerGraceTimerRef:I,onPointerGraceIntentChange:S.useCallback(A=>{H.current=A},[]),children:h.jsx(F,{...k,children:h.jsx(Fr,{asChild:!0,trapped:o,onMountAutoFocus:ee(s,A=>{var O;A.preventDefault(),(O=w.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:b,onDismiss:y,children:h.jsx(Tm,{asChild:!0,...m,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:v,onCurrentTabStopIdChange:T,onEntryFocus:ee(c,A=>{g.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(Nr,{role:"menu","aria-orientation":"vertical","data-state":Ol(x.open),"data-radix-menu-content":"",dir:g.dir,...d,...p,ref:D,style:{outline:"none",...p.style},onKeyDown:ee(p.onKeyDown,A=>{const L=A.target.closest("[data-radix-menu-content]")===A.currentTarget,U=A.ctrlKey||A.altKey||A.metaKey,Y=A.key.length===1;L&&(A.key==="Tab"&&A.preventDefault(),!U&&Y&&N(A.key));const V=w.current;if(A.target!==V||!hv.includes(A.key))return;A.preventDefault();const G=E().filter($=>!$.disabled).map($=>$.ref.current);al.includes(A.key)&&G.reverse(),jv(G)}),onBlur:ee(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(P.current),_.current="")}),onPointerMove:ee(e.onPointerMove,Sn(A=>{const O=A.target,L=j.current!==A.clientX;if(A.currentTarget.contains(O)&&L){const U=A.clientX>j.current?"right":"left";K.current=U,j.current=A.clientX}}))})})})})})})});pl.displayName=Ae;var Rv="MenuGroup",Rs=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"group",...r,ref:t})});Rs.displayName=Rv;var Mv="MenuLabel",hl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{...r,ref:t})});hl.displayName=Mv;var br="MenuItem",$i="menu.itemSelect",Vr=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=S.useRef(null),i=Nn(br,e.__scopeMenu),a=Ds(br,e.__scopeMenu),c=le(t,s),l=S.useRef(!1),f=()=>{const u=s.current;if(!n&&u){const b=new CustomEvent($i,{bubbles:!0,cancelable:!0});u.addEventListener($i,y=>r==null?void 0:r(y),{once:!0}),dc(u,b),b.defaultPrevented?l.current=!1:i.onClose()}};return h.jsx(gl,{...o,ref:c,disabled:n,onClick:ee(e.onClick,f),onPointerDown:u=>{var b;(b=e.onPointerDown)==null||b.call(e,u),l.current=!0},onPointerUp:ee(e.onPointerUp,u=>{var b;l.current||(b=u.currentTarget)==null||b.click()}),onKeyDown:ee(e.onKeyDown,u=>{const b=a.searchRef.current!=="";n||b&&u.key===" "||Fo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Vr.displayName=br;var gl=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Ds(br,n),a=ll(n),c=S.useRef(null),l=le(t,c),[f,u]=S.useState(!1),[b,y]=S.useState("");return S.useEffect(()=>{const C=c.current;C&&y((C.textContent??"").trim())},[s.children]),h.jsx(xn.ItemSlot,{scope:n,disabled:r,textValue:o??b,children:h.jsx(Rm,{asChild:!0,...a,focusable:!r,children:h.jsx(se.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:ee(e.onPointerMove,Sn(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,Sn(C=>i.onItemLeave(C))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),Ov="MenuCheckboxItem",ml=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(xl,{scope:e.__scopeMenu,checked:n,children:h.jsx(Vr,{role:"menuitemcheckbox","aria-checked":wr(n)?"mixed":n,...o,ref:t,"data-state":Os(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(wr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ml.displayName=Ov;var vl="MenuRadioGroup",[Pv,kv]=Rt(vl,{value:void 0,onValueChange:()=>{}}),yl=S.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=_e(r);return h.jsx(Pv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(Rs,{...o,ref:t})})});yl.displayName=vl;var bl="MenuRadioItem",wl=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=kv(bl,e.__scopeMenu),s=n===o.value;return h.jsx(xl,{scope:e.__scopeMenu,checked:s,children:h.jsx(Vr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Os(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});wl.displayName=bl;var Ms="MenuItemIndicator",[xl,Av]=Rt(Ms,{checked:!1}),Sl=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Av(Ms,n);return h.jsx(Je,{present:r||wr(s.checked)||s.checked===!0,children:h.jsx(se.span,{...o,ref:t,"data-state":Os(s.checked)})})});Sl.displayName=Ms;var _v="MenuSeparator",Cl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Cl.displayName=_v;var Nv="MenuArrow",El=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hr(n);return h.jsx(Ir,{...o,...r,ref:t})});El.displayName=Nv;var Iv="MenuSub",[Xw,Dl]=Rt(Iv),dn="MenuSubTrigger",Tl=S.forwardRef((e,t)=>{const n=Mt(dn,e.__scopeMenu),r=Nn(dn,e.__scopeMenu),o=Dl(dn,e.__scopeMenu),s=Ds(dn,e.__scopeMenu),i=S.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},f=S.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return S.useEffect(()=>f,[f]),S.useEffect(()=>{const u=a.current;return()=>{window.clearTimeout(u),c(null)}},[a,c]),h.jsx(Cs,{asChild:!0,...l,children:h.jsx(gl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ol(n.open),...e,ref:Or(t,o.onTriggerChange),onClick:u=>{var b;(b=e.onClick)==null||b.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,Sn(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:ee(e.onPointerLeave,Sn(u=>{var y,C;f();const b=(y=n.content)==null?void 0:y.getBoundingClientRect();if(b){const p=(C=n.content)==null?void 0:C.dataset.side,x=p==="right",g=x?-5:5,d=b[x?"left":"right"],m=b[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+g,y:u.clientY},{x:d,y:b.top},{x:m,y:b.top},{x:m,y:b.bottom},{x:d,y:b.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ee(e.onKeyDown,u=>{var y;const b=s.searchRef.current!=="";e.disabled||b&&u.key===" "||gv[r.dir].includes(u.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),u.preventDefault())})})})});Tl.displayName=dn;var Rl="MenuSubContent",Ml=S.forwardRef((e,t)=>{const n=dl(Ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Mt(Ae,e.__scopeMenu),i=Nn(Ae,e.__scopeMenu),a=Dl(Rl,e.__scopeMenu),c=S.useRef(null),l=le(t,c);return h.jsx(xn.Provider,{scope:e.__scopeMenu,children:h.jsx(Je,{present:r||s.open,children:h.jsx(xn.Slot,{scope:e.__scopeMenu,children:h.jsx(Ts,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var u;i.isUsingKeyboardRef.current&&((u=c.current)==null||u.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ee(e.onFocusOutside,f=>{f.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ee(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:ee(e.onKeyDown,f=>{var y;const u=f.currentTarget.contains(f.target),b=mv[i.dir].includes(f.key);u&&b&&(s.onOpenChange(!1),(y=a.trigger)==null||y.focus(),f.preventDefault())})})})})})});Ml.displayName=Rl;function Ol(e){return e?"open":"closed"}function wr(e){return e==="indeterminate"}function Os(e){return wr(e)?"indeterminate":e?"checked":"unchecked"}function jv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Lv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $v(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Lv(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Fv(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,f=t[i].y;c>r!=f>r&&n<(l-a)*(r-c)/(f-c)+a&&(o=!o)}return o}function zv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fv(n,t)}function Sn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Wv=ul,Bv=Cs,Hv=fl,Vv=pl,Yv=Rs,Uv=hl,Kv=Vr,Gv=ml,qv=yl,Xv=wl,Zv=Sl,Jv=Cl,Qv=El,ey=Tl,ty=Ml,Ps="DropdownMenu",[ny,Zw]=gt(Ps,[cl]),xe=cl(),[ry,Pl]=ny(Ps),kl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=xe(t),l=S.useRef(null),[f=!1,u]=Dt({prop:o,defaultProp:s,onChange:i});return h.jsx(ry,{scope:t,triggerId:dt(),triggerRef:l,contentId:dt(),open:f,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(b=>!b),[u]),modal:a,children:h.jsx(Wv,{...c,open:f,onOpenChange:u,dir:r,modal:a,children:n})})};kl.displayName=Ps;var Al="DropdownMenuTrigger",_l=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Pl(Al,n),i=xe(n);return h.jsx(Bv,{asChild:!0,...i,children:h.jsx(se.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Or(t,s.triggerRef),onPointerDown:ee(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:ee(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});_l.displayName=Al;var oy="DropdownMenuPortal",Nl=e=>{const{__scopeDropdownMenu:t,...n}=e,r=xe(t);return h.jsx(Hv,{...r,...n})};Nl.displayName=oy;var Il="DropdownMenuContent",jl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pl(Il,n),s=xe(n),i=S.useRef(!1);return h.jsx(Vv,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,f=c.button===2||l;(!o.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jl.displayName=Il;var sy="DropdownMenuGroup",iy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Yv,{...o,...r,ref:t})});iy.displayName=sy;var ay="DropdownMenuLabel",Ll=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Uv,{...o,...r,ref:t})});Ll.displayName=ay;var cy="DropdownMenuItem",$l=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Kv,{...o,...r,ref:t})});$l.displayName=cy;var ly="DropdownMenuCheckboxItem",Fl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Gv,{...o,...r,ref:t})});Fl.displayName=ly;var uy="DropdownMenuRadioGroup",dy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(qv,{...o,...r,ref:t})});dy.displayName=uy;var fy="DropdownMenuRadioItem",py=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Xv,{...o,...r,ref:t})});py.displayName=fy;var hy="DropdownMenuItemIndicator",zl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Zv,{...o,...r,ref:t})});zl.displayName=hy;var gy="DropdownMenuSeparator",Wl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Jv,{...o,...r,ref:t})});Wl.displayName=gy;var my="DropdownMenuArrow",vy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Qv,{...o,...r,ref:t})});vy.displayName=my;var yy="DropdownMenuSubTrigger",by=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(ey,{...o,...r,ref:t})});by.displayName=yy;var wy="DropdownMenuSubContent",xy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(ty,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xy.displayName=wy;var Sy=kl,Cy=_l,Ey=Nl,Dy=jl,Ty=Ll,Ry=$l,My=Fl,Oy=zl,Py=Wl;function ks({...e}){return h.jsx(Sy,{"data-slot":"dropdown-menu",...e})}function As({...e}){return h.jsx(Cy,{"data-slot":"dropdown-menu-trigger",...e})}function _s({className:e,sideOffset:t=4,...n}){return h.jsx(Ey,{children:h.jsx(Dy,{"data-slot":"dropdown-menu-content",sideOffset:t,style:{zIndex:100},className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function Fi({className:e,inset:t,variant:n="default",...r}){return h.jsx(Ry,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function ky({className:e,children:t,checked:n,...r}){return h.jsxs(My,{"data-slot":"dropdown-menu-checkbox-item",className:ie("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[h.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:h.jsx(Oy,{children:h.jsx(cc,{className:"size-4"})})}),t]})}function Ay({className:e,inset:t,...n}){return h.jsx(Ty,{"data-slot":"dropdown-menu-label","data-inset":t,className:ie("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function _y({className:e,...t}){return h.jsx(Py,{"data-slot":"dropdown-menu-separator",className:ie("bg-border -mx-1 my-1 h-px",e),...t})}const Ny={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},Iy=({code:e})=>h.jsx("p",{className:"text-sm text-muted-foreground",children:h.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[h.jsx("span",{className:"text-xs",children:"⌘"}),e]})}),jy={[ne.DAY]:h.jsx(Xp,{size:"20px"}),[ne.WEEK]:h.jsx(Gp,{size:"20px"}),[ne.TABLE]:h.jsx($p,{size:"20px"}),[ne.MONTH]:h.jsx(Jp,{size:"20px"})},zi=()=>{const{bookingViewType:e}=Oe(),{onViewTypeChange:t}=Da(),{viewModes:n}=qe(),r=R.useCallback(a=>a===e?"custom":"outline",[e]),o=R.useCallback(a=>{a!==e&&t(a)},[t]),s=R.useMemo(()=>n.map(a=>({variant:r(a),icon:jy[a],events:c=>o(c),label:a})),[n,o,r]),i=R.useMemo(()=>{const a=s.find(c=>c.label===e);if(a)return a.icon},[e,s]);return h.jsxs(ks,{children:[h.jsx(As,{children:h.jsx(Ct,{variant:"ghost",className:"w-8 h-8",asChild:!0,children:h.jsx(Yc,{content:"Calendar Modes",children:h.jsx(Ct,{variant:"ghost",children:i||h.jsx(jp,{className:"w-full h-full"})})})})}),h.jsx(_s,{children:s.map(a=>h.jsxs(ky,{checked:a.label===e,onCheckedChange:()=>a.events(a.label),className:"flex flex-row justify-between gap-6",children:[h.jsxs("div",{className:"flex flex-row gap-4",children:[a.icon,h.jsx("div",{children:Ny.capitalize(a.label)})]}),h.jsx(Iy,{code:"o"})]},a.label))})]})},Ly=566,$y=()=>{const{todayWeek:e,bookingViewType:t,setTodayDay:n,nextWeek:r,previousWeek:o,setDays:s}=Oe(),{resetSelectedNode:i,resetNodes:a}=Ht(v=>v),{onTodayClick:c}=qe(),{fullYear:l,monthMessage:f}=Ta(v=>v),{onDayChange:u}=qe(),[b,y]=R.useState(!1),C=()=>{const v=new Date;switch(c(v),t){case ne.TABLE:case ne.DAY:{n(v);break}default:{e();break}}},p=()=>s(1),x=()=>s(-1),g=v=>v==="next"?r():o(),d=v=>v==="next"?p():x(),m=v=>{switch(a(),i(),t){case ne.TABLE:case ne.DAY:{const T=d(v);u(T,v);break}case ne.WEEK:{const T=g(v),{firstDayOfWeek:w,lastDayOfWeek:D}=te.firstAndLastWeekDays(T);u([w,D],v);break}}};R.useEffect(()=>{e()},[e]),R.useEffect(()=>{const v=()=>{if(typeof window>"u")return!1;window.innerWidth<=Ly?y(!0):y(!1)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const E=h.jsxs("div",{className:"header_actions",children:[h.jsx(hh,{handleWeekChange:m}),h.jsx(am,{onClick:C})]});return h.jsx(h.Fragment,{children:b?h.jsxs("div",{className:"headerCalendar_mobile",children:[h.jsx("div",{className:"headerCalendar_mobile_month",children:h.jsxs("span",{className:"headerCalendar_mobile_month_span",children:[f," ",l]})}),h.jsxs("div",{className:"headerCalendar_mobile_actions",children:[E,h.jsx(zi,{})]})]}):h.jsxs("div",{className:"headerCalendar",children:[h.jsx("div",{className:"headerCalendar_actions",children:E}),h.jsx("div",{className:"headerCalendar_month",children:h.jsxs("span",{className:"headerCalendar_month_span",children:[f," ",l]})}),h.jsx(zi,{})]})})},Xt=Ko(e=>({isDragging:!1,updateIsDragging:t=>e(n=>({...n,isDragging:t}))}));function Fy(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const zy=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:Fy(t,n,r)},Wy=({bookingInit:e,slotData:t,heightStyle:n})=>h.jsx(Gf,{modifiers:[zy],dropAnimation:{duration:2e3,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:"Draggable dragging",children:h.jsx("div",{className:"cardOverlay_content",style:{height:n},children:h.jsx(zo,{booking:e,slotData:t,heightStyleTransformer:n})})}),By=4,Wi=100,zo=({booking:e,slotData:t,layerCount:n,onClick:r,heightStyleTransformer:o,customClasses:s})=>{const{day:i,hour:a}=t,{bookingViewType:c}=Oe(),{updateIsDragging:l,isDragging:f}=Xt(w=>w),{attributes:u,listeners:b,setNodeRef:y,isDragging:C,transform:p}=rs({id:e.id,data:{type:"booking-slots",booking:e,slotData:t}}),x=p?{transform:`translate3d(${p.x}px, ${p.y}px, 0)`}:void 0;Dn({onDragStart:()=>l(!0),onDragAbort:()=>g(),onDragCancel:()=>g(),onDragEnd:()=>g()});const g=R.useCallback(()=>{l(!1)},[]),d=w=>w<="11:30",m=c===ne.DAY?{width:"99%"}:{width:"100%"},E={height:o,position:"relative",zIndex:50,cursor:f?"ns-resize":"pointer",...x,...m},v=(w,D)=>{const P=te.dateAndHourDateToString(new Date(w.finishAt));return te.isTodayDate(D)&&d(P)?{backgroundColor:"#000000c0"}:{backgroundColor:"#000456c0"}},T=R.useMemo(()=>{if(!n)return`${Wi}%`;const w=n*By;return`${Wi-w}%`},[n]);return C?h.jsx(Wy,{bookingInit:e,slotData:t,heightStyle:String(o)}):h.jsx("div",{ref:y,className:ie("cardContent_render",s),style:{...x,...E,width:T},...b,...u,children:h.jsx("div",{className:"relative w-full h-full",style:v(e,new Date(i.split(":")[1])),onPointerUp:r,children:h.jsxs("div",{className:ie("flex flex-col h-full text-white pl-2 lg:pl-2 justify-start items-start"),children:[h.jsx("p",{className:"text-[0.8rem] h-[0.8rem]",children:`${te.dateAndHourDateToString(e.startAt)} - ${te.dateAndHourDateToString(e.finishAt)}`}),h.jsx("span",{className:"flex flex-row items-center justify-center"})]})},`${i}-${a}`)},e.id)};var on={exports:{}},sn={},an={exports:{}},go={},qn={exports:{}},Xn={exports:{}},ae={};/** @license React v16.13.1
141
141
  * react-is.production.min.js
142
142
  *
143
143
  * Copyright (c) Facebook, Inc. and its affiliates.
144
144
  *
145
145
  * This source code is licensed under the MIT license found in the
146
146
  * LICENSE file in the root directory of this source tree.
147
- */var zi;function Wy(){if(zi)return ae;zi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function v(g){if(typeof g=="object"&&g!==null){var T=g.$$typeof;switch(T){case t:switch(g=g.type,g){case c:case l:case r:case s:case o:case u:return g;default:switch(g=g&&g.$$typeof,g){case a:case d:case C:case y:case i:return g;default:return T}}case n:return T}}}function E(g){return v(g)===l}return ae.AsyncMode=c,ae.ConcurrentMode=l,ae.ContextConsumer=a,ae.ContextProvider=i,ae.Element=t,ae.ForwardRef=d,ae.Fragment=r,ae.Lazy=C,ae.Memo=y,ae.Portal=n,ae.Profiler=s,ae.StrictMode=o,ae.Suspense=u,ae.isAsyncMode=function(g){return E(g)||v(g)===c},ae.isConcurrentMode=E,ae.isContextConsumer=function(g){return v(g)===a},ae.isContextProvider=function(g){return v(g)===i},ae.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},ae.isForwardRef=function(g){return v(g)===d},ae.isFragment=function(g){return v(g)===r},ae.isLazy=function(g){return v(g)===C},ae.isMemo=function(g){return v(g)===y},ae.isPortal=function(g){return v(g)===n},ae.isProfiler=function(g){return v(g)===s},ae.isStrictMode=function(g){return v(g)===o},ae.isSuspense=function(g){return v(g)===u},ae.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===l||g===s||g===o||g===u||g===b||typeof g=="object"&&g!==null&&(g.$$typeof===C||g.$$typeof===y||g.$$typeof===i||g.$$typeof===a||g.$$typeof===d||g.$$typeof===w||g.$$typeof===m||g.$$typeof===f||g.$$typeof===h)},ae.typeOf=v,ae}var ce={};/** @license React v16.13.1
147
+ */var Bi;function Hy(){if(Bi)return ae;Bi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function m(v){if(typeof v=="object"&&v!==null){var T=v.$$typeof;switch(T){case t:switch(v=v.type,v){case c:case l:case r:case s:case o:case u:return v;default:switch(v=v&&v.$$typeof,v){case a:case f:case C:case y:case i:return v;default:return T}}case n:return T}}}function E(v){return m(v)===l}return ae.AsyncMode=c,ae.ConcurrentMode=l,ae.ContextConsumer=a,ae.ContextProvider=i,ae.Element=t,ae.ForwardRef=f,ae.Fragment=r,ae.Lazy=C,ae.Memo=y,ae.Portal=n,ae.Profiler=s,ae.StrictMode=o,ae.Suspense=u,ae.isAsyncMode=function(v){return E(v)||m(v)===c},ae.isConcurrentMode=E,ae.isContextConsumer=function(v){return m(v)===a},ae.isContextProvider=function(v){return m(v)===i},ae.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},ae.isForwardRef=function(v){return m(v)===f},ae.isFragment=function(v){return m(v)===r},ae.isLazy=function(v){return m(v)===C},ae.isMemo=function(v){return m(v)===y},ae.isPortal=function(v){return m(v)===n},ae.isProfiler=function(v){return m(v)===s},ae.isStrictMode=function(v){return m(v)===o},ae.isSuspense=function(v){return m(v)===u},ae.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===l||v===s||v===o||v===u||v===b||typeof v=="object"&&v!==null&&(v.$$typeof===C||v.$$typeof===y||v.$$typeof===i||v.$$typeof===a||v.$$typeof===f||v.$$typeof===x||v.$$typeof===g||v.$$typeof===d||v.$$typeof===p)},ae.typeOf=m,ae}var ce={};/** @license React v16.13.1
148
148
  * react-is.development.js
149
149
  *
150
150
  * Copyright (c) Facebook, Inc. and its affiliates.
151
151
  *
152
152
  * This source code is licensed under the MIT license found in the
153
153
  * LICENSE file in the root directory of this source tree.
154
- */var Wi;function By(){return Wi||(Wi=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function v(F){return typeof F=="string"||typeof F=="function"||F===r||F===l||F===s||F===o||F===u||F===b||typeof F=="object"&&F!==null&&(F.$$typeof===C||F.$$typeof===y||F.$$typeof===i||F.$$typeof===a||F.$$typeof===d||F.$$typeof===w||F.$$typeof===m||F.$$typeof===f||F.$$typeof===h)}function E(F){if(typeof F=="object"&&F!==null){var oe=F.$$typeof;switch(oe){case t:var de=F.type;switch(de){case c:case l:case r:case s:case o:case u:return de;default:var Se=de&&de.$$typeof;switch(Se){case a:case d:case C:case y:case i:return Se;default:return oe}}case n:return oe}}}var g=c,T=l,x=a,D=i,k=t,_=d,N=r,B=C,U=y,I=n,z=s,P=o,j=u,M=!1;function A(F){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(F)||E(F)===c}function O(F){return E(F)===l}function $(F){return E(F)===a}function Y(F){return E(F)===i}function V(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function H(F){return E(F)===d}function Z(F){return E(F)===r}function G(F){return E(F)===C}function W(F){return E(F)===y}function q(F){return E(F)===n}function K(F){return E(F)===s}function L(F){return E(F)===o}function X(F){return E(F)===u}ce.AsyncMode=g,ce.ConcurrentMode=T,ce.ContextConsumer=x,ce.ContextProvider=D,ce.Element=k,ce.ForwardRef=_,ce.Fragment=N,ce.Lazy=B,ce.Memo=U,ce.Portal=I,ce.Profiler=z,ce.StrictMode=P,ce.Suspense=j,ce.isAsyncMode=A,ce.isConcurrentMode=O,ce.isContextConsumer=$,ce.isContextProvider=Y,ce.isElement=V,ce.isForwardRef=H,ce.isFragment=Z,ce.isLazy=G,ce.isMemo=W,ce.isPortal=q,ce.isProfiler=K,ce.isStrictMode=L,ce.isSuspense=X,ce.isValidElementType=v,ce.typeOf=E}()),ce}var Bi;function zl(){return Bi||(Bi=1,process.env.NODE_ENV==="production"?Xn.exports=Wy():Xn.exports=By()),Xn.exports}/*
154
+ */var Hi;function Vy(){return Hi||(Hi=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function m(z){return typeof z=="string"||typeof z=="function"||z===r||z===l||z===s||z===o||z===u||z===b||typeof z=="object"&&z!==null&&(z.$$typeof===C||z.$$typeof===y||z.$$typeof===i||z.$$typeof===a||z.$$typeof===f||z.$$typeof===x||z.$$typeof===g||z.$$typeof===d||z.$$typeof===p)}function E(z){if(typeof z=="object"&&z!==null){var oe=z.$$typeof;switch(oe){case t:var de=z.type;switch(de){case c:case l:case r:case s:case o:case u:return de;default:var Se=de&&de.$$typeof;switch(Se){case a:case f:case C:case y:case i:return Se;default:return oe}}case n:return oe}}}var v=c,T=l,w=a,D=i,P=t,_=f,I=r,H=C,K=y,j=n,F=s,k=o,N=u,M=!1;function A(z){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(z)||E(z)===c}function O(z){return E(z)===l}function L(z){return E(z)===a}function U(z){return E(z)===i}function Y(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function V(z){return E(z)===f}function X(z){return E(z)===r}function G(z){return E(z)===C}function $(z){return E(z)===y}function q(z){return E(z)===n}function W(z){return E(z)===s}function B(z){return E(z)===o}function Z(z){return E(z)===u}ce.AsyncMode=v,ce.ConcurrentMode=T,ce.ContextConsumer=w,ce.ContextProvider=D,ce.Element=P,ce.ForwardRef=_,ce.Fragment=I,ce.Lazy=H,ce.Memo=K,ce.Portal=j,ce.Profiler=F,ce.StrictMode=k,ce.Suspense=N,ce.isAsyncMode=A,ce.isConcurrentMode=O,ce.isContextConsumer=L,ce.isContextProvider=U,ce.isElement=Y,ce.isForwardRef=V,ce.isFragment=X,ce.isLazy=G,ce.isMemo=$,ce.isPortal=q,ce.isProfiler=W,ce.isStrictMode=B,ce.isSuspense=Z,ce.isValidElementType=m,ce.typeOf=E}()),ce}var Vi;function Bl(){return Vi||(Vi=1,process.env.NODE_ENV==="production"?Xn.exports=Hy():Xn.exports=Vy()),Xn.exports}/*
155
155
  object-assign
156
156
  (c) Sindre Sorhus
157
157
  @license MIT
158
- */var go,Hi;function Hy(){if(Hi)return go;Hi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return go=o()?Object.assign:function(s,i){for(var a,c=r(s),l,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var u in a)t.call(a,u)&&(c[u]=a[u]);if(e){l=e(a);for(var b=0;b<l.length;b++)n.call(a,l[b])&&(c[l[b]]=a[l[b]])}}return c},go}var mo,Vi;function _s(){if(Vi)return mo;Vi=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mo=e,mo}var vo,Yi;function Wl(){return Yi||(Yi=1,vo=Function.call.bind(Object.prototype.hasOwnProperty)),vo}var yo,Ui;function Vy(){if(Ui)return yo;Ui=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=_s(),n={},r=Wl();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var d in s)if(r(s,d)){var u;try{if(typeof s[d]!="function"){var b=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}u=s[d](i,d,c,a,null,t)}catch(C){u=C}if(u&&!(u instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var y=l?l():"";e("Failed "+a+" type: "+u.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},yo=o,yo}var bo,Ki;function Yy(){if(Ki)return bo;Ki=1;var e=zl(),t=Hy(),n=_s(),r=Wl(),o=Vy(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return bo=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(O){var $=O&&(l&&O[l]||O[d]);if(typeof $=="function")return $}var b="<<anonymous>>",y={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(),arrayOf:v,element:E(),elementType:g(),instanceOf:T,node:_(),objectOf:D,oneOf:x,oneOfType:k,shape:B,exact:U};function C(O,$){return O===$?O!==0||1/O===1/$:O!==O&&$!==$}function h(O,$){this.message=O,this.data=$&&typeof $=="object"?$:{},this.stack=""}h.prototype=Error.prototype;function w(O){if(process.env.NODE_ENV!=="production")var $={},Y=0;function V(Z,G,W,q,K,L,X){if(q=q||b,L=L||W,X!==n){if(c){var F=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=q+":"+W;!$[oe]&&Y<3&&(s("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),$[oe]=!0,Y++)}}return G[W]==null?Z?G[W]===null?new h("The "+K+" `"+L+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new h("The "+K+" `"+L+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:O(G,W,q,K,L)}var H=V.bind(null,!1);return H.isRequired=V.bind(null,!0),H}function m(O){function $(Y,V,H,Z,G,W){var q=Y[V],K=P(q);if(K!==O){var L=j(q);return new h("Invalid "+Z+" `"+G+"` of type "+("`"+L+"` supplied to `"+H+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return w($)}function f(){return w(i)}function v(O){function $(Y,V,H,Z,G){if(typeof O!="function")return new h("Property `"+G+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var W=Y[V];if(!Array.isArray(W)){var q=P(W);return new h("Invalid "+Z+" `"+G+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an array."))}for(var K=0;K<W.length;K++){var L=O(W,K,H,Z,G+"["+K+"]",n);if(L instanceof Error)return L}return null}return w($)}function E(){function O($,Y,V,H,Z){var G=$[Y];if(!a(G)){var W=P(G);return new h("Invalid "+H+" `"+Z+"` of type "+("`"+W+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return w(O)}function g(){function O($,Y,V,H,Z){var G=$[Y];if(!e.isValidElementType(G)){var W=P(G);return new h("Invalid "+H+" `"+Z+"` of type "+("`"+W+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return w(O)}function T(O){function $(Y,V,H,Z,G){if(!(Y[V]instanceof O)){var W=O.name||b,q=A(Y[V]);return new h("Invalid "+Z+" `"+G+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("instance of `"+W+"`."))}return null}return w($)}function x(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function $(Y,V,H,Z,G){for(var W=Y[V],q=0;q<O.length;q++)if(C(W,O[q]))return null;var K=JSON.stringify(O,function(X,F){var oe=j(F);return oe==="symbol"?String(F):F});return new h("Invalid "+Z+" `"+G+"` of value `"+String(W)+"` "+("supplied to `"+H+"`, expected one of "+K+"."))}return w($)}function D(O){function $(Y,V,H,Z,G){if(typeof O!="function")return new h("Property `"+G+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var W=Y[V],q=P(W);if(q!=="object")return new h("Invalid "+Z+" `"+G+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an object."));for(var K in W)if(r(W,K)){var L=O(W,K,H,Z,G+"."+K,n);if(L instanceof Error)return L}return null}return w($)}function k(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var $=0;$<O.length;$++){var Y=O[$];if(typeof Y!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(Y)+" at index "+$+"."),i}function V(H,Z,G,W,q){for(var K=[],L=0;L<O.length;L++){var X=O[L],F=X(H,Z,G,W,q,n);if(F==null)return null;F.data&&r(F.data,"expectedType")&&K.push(F.data.expectedType)}var oe=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new h("Invalid "+W+" `"+q+"` supplied to "+("`"+G+"`"+oe+"."))}return w(V)}function _(){function O($,Y,V,H,Z){return I($[Y])?null:new h("Invalid "+H+" `"+Z+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return w(O)}function N(O,$,Y,V,H){return new h((O||"React class")+": "+$+" type `"+Y+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function B(O){function $(Y,V,H,Z,G){var W=Y[V],q=P(W);if(q!=="object")return new h("Invalid "+Z+" `"+G+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));for(var K in O){var L=O[K];if(typeof L!="function")return N(H,Z,G,K,j(L));var X=L(W,K,H,Z,G+"."+K,n);if(X)return X}return null}return w($)}function U(O){function $(Y,V,H,Z,G){var W=Y[V],q=P(W);if(q!=="object")return new h("Invalid "+Z+" `"+G+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));var K=t({},Y[V],O);for(var L in K){var X=O[L];if(r(O,L)&&typeof X!="function")return N(H,Z,G,L,j(X));if(!X)return new h("Invalid "+Z+" `"+G+"` key `"+L+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(Y[V],null," ")+`
159
- Valid keys: `+JSON.stringify(Object.keys(O),null," "));var F=X(W,L,H,Z,G+"."+L,n);if(F)return F}return null}return w($)}function I(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(I);if(O===null||a(O))return!0;var $=u(O);if($){var Y=$.call(O),V;if($!==O.entries){for(;!(V=Y.next()).done;)if(!I(V.value))return!1}else for(;!(V=Y.next()).done;){var H=V.value;if(H&&!I(H[1]))return!1}}else return!1;return!0;default:return!1}}function z(O,$){return O==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function P(O){var $=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":z($,O)?"symbol":$}function j(O){if(typeof O>"u"||O===null)return""+O;var $=P(O);if($==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return $}function M(O){var $=j(O);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function A(O){return!O.constructor||!O.constructor.name?b:O.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},bo}var wo,Gi;function Uy(){if(Gi)return wo;Gi=1;var e=_s();function t(){}function n(){}return n.resetWarningCache=t,wo=function(){function r(i,a,c,l,d,u){if(u!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},wo}var qi;function Vr(){if(qi)return qn.exports;if(qi=1,process.env.NODE_ENV!=="production"){var e=zl(),t=!0;qn.exports=Yy()(e.isElement,t)}else qn.exports=Uy()();return qn.exports}function Bl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Bl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Xi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Bl(e))&&(r&&(r+=" "),r+=t);return r}const Ky=Object.freeze(Object.defineProperty({__proto__:null,clsx:Xi,default:Xi},Symbol.toStringTag,{value:"Module"})),Gy=id(Ky);var fe={},at={},Zi;function Yr(){if(Zi)return at;Zi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.dontSetMe=o,at.findInArray=e,at.int=r,at.isFunction=t,at.isNum=n;function e(s,i){for(let a=0,c=s.length;a<c;a++)if(i.apply(i,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function n(s){return typeof s=="number"&&!isNaN(s)}function r(s){return parseInt(s,10)}function o(s,i,a){if(s[i])return new Error("Invalid prop ".concat(i," passed to ").concat(a," - do not set this, set it on the child."))}return at}var ct={},Ji;function qy(){if(Ji)return ct;Ji=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.browserPrefixToKey=n,ct.browserPrefixToStyle=r,ct.default=void 0,ct.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var s;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const a=(s=window.document)===null||s===void 0||(s=s.documentElement)===null||s===void 0?void 0:s.style;if(!a||i in a)return"";for(let c=0;c<e.length;c++)if(n(i,e[c])in a)return e[c];return""}function n(s,i){return i?"".concat(i).concat(o(s)):s}function r(s,i){return i?"-".concat(i.toLowerCase(),"-").concat(s):s}function o(s){let i="",a=!0;for(let c=0;c<s.length;c++)a?(i+=s[c].toUpperCase(),a=!1):s[c]==="-"?a=!0:i+=s[c];return i}return ct.default=t(),ct}var Qi;function Ns(){if(Qi)return fe;Qi=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=g,fe.addEvent=a,fe.addUserSelectStyles=v,fe.createCSSTransform=C,fe.createSVGTransform=h,fe.getTouch=m,fe.getTouchIdentifier=f,fe.getTranslation=w,fe.innerHeight=u,fe.innerWidth=b,fe.matchesSelector=s,fe.matchesSelectorAndParentsTo=i,fe.offsetXYFromParent=y,fe.outerHeight=l,fe.outerWidth=d,fe.removeClassName=T,fe.removeEvent=c,fe.removeUserSelectStyles=E;var e=Yr(),t=r(qy());function n(x){if(typeof WeakMap!="function")return null;var D=new WeakMap,k=new WeakMap;return(n=function(_){return _?k:D})(x)}function r(x,D){if(x&&x.__esModule)return x;if(x===null||typeof x!="object"&&typeof x!="function")return{default:x};var k=n(D);if(k&&k.has(x))return k.get(x);var _={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var B in x)if(B!=="default"&&Object.prototype.hasOwnProperty.call(x,B)){var U=N?Object.getOwnPropertyDescriptor(x,B):null;U&&(U.get||U.set)?Object.defineProperty(_,B,U):_[B]=x[B]}return _.default=x,k&&k.set(x,_),_}let o="";function s(x,D){return o||(o=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(k){return(0,e.isFunction)(x[k])})),(0,e.isFunction)(x[o])?x[o](D):!1}function i(x,D,k){let _=x;do{if(s(_,D))return!0;if(_===k)return!1;_=_.parentNode}while(_);return!1}function a(x,D,k,_){if(!x)return;const N={capture:!0,..._};x.addEventListener?x.addEventListener(D,k,N):x.attachEvent?x.attachEvent("on"+D,k):x["on"+D]=k}function c(x,D,k,_){if(!x)return;const N={capture:!0,..._};x.removeEventListener?x.removeEventListener(D,k,N):x.detachEvent?x.detachEvent("on"+D,k):x["on"+D]=null}function l(x){let D=x.clientHeight;const k=x.ownerDocument.defaultView.getComputedStyle(x);return D+=(0,e.int)(k.borderTopWidth),D+=(0,e.int)(k.borderBottomWidth),D}function d(x){let D=x.clientWidth;const k=x.ownerDocument.defaultView.getComputedStyle(x);return D+=(0,e.int)(k.borderLeftWidth),D+=(0,e.int)(k.borderRightWidth),D}function u(x){let D=x.clientHeight;const k=x.ownerDocument.defaultView.getComputedStyle(x);return D-=(0,e.int)(k.paddingTop),D-=(0,e.int)(k.paddingBottom),D}function b(x){let D=x.clientWidth;const k=x.ownerDocument.defaultView.getComputedStyle(x);return D-=(0,e.int)(k.paddingLeft),D-=(0,e.int)(k.paddingRight),D}function y(x,D,k){const N=D===D.ownerDocument.body?{left:0,top:0}:D.getBoundingClientRect(),B=(x.clientX+D.scrollLeft-N.left)/k,U=(x.clientY+D.scrollTop-N.top)/k;return{x:B,y:U}}function C(x,D){const k=w(x,D,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:k}}function h(x,D){return w(x,D,"")}function w(x,D,k){let{x:_,y:N}=x,B="translate(".concat(_).concat(k,",").concat(N).concat(k,")");if(D){const U="".concat(typeof D.x=="string"?D.x:D.x+k),I="".concat(typeof D.y=="string"?D.y:D.y+k);B="translate(".concat(U,", ").concat(I,")")+B}return B}function m(x,D){return x.targetTouches&&(0,e.findInArray)(x.targetTouches,k=>D===k.identifier)||x.changedTouches&&(0,e.findInArray)(x.changedTouches,k=>D===k.identifier)}function f(x){if(x.targetTouches&&x.targetTouches[0])return x.targetTouches[0].identifier;if(x.changedTouches&&x.changedTouches[0])return x.changedTouches[0].identifier}function v(x){if(!x)return;let D=x.getElementById("react-draggable-style-el");D||(D=x.createElement("style"),D.type="text/css",D.id="react-draggable-style-el",D.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
158
+ */var mo,Yi;function Yy(){if(Yi)return mo;Yi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mo=o()?Object.assign:function(s,i){for(var a,c=r(s),l,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var u in a)t.call(a,u)&&(c[u]=a[u]);if(e){l=e(a);for(var b=0;b<l.length;b++)n.call(a,l[b])&&(c[l[b]]=a[l[b]])}}return c},mo}var vo,Ui;function Ns(){if(Ui)return vo;Ui=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vo=e,vo}var yo,Ki;function Hl(){return Ki||(Ki=1,yo=Function.call.bind(Object.prototype.hasOwnProperty)),yo}var bo,Gi;function Uy(){if(Gi)return bo;Gi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ns(),n={},r=Hl();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var f in s)if(r(s,f)){var u;try{if(typeof s[f]!="function"){var b=Error((c||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}u=s[f](i,f,c,a,null,t)}catch(C){u=C}if(u&&!(u instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var y=l?l():"";e("Failed "+a+" type: "+u.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bo=o,bo}var wo,qi;function Ky(){if(qi)return wo;qi=1;var e=Bl(),t=Yy(),n=Ns(),r=Hl(),o=Uy(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return wo=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(O){var L=O&&(l&&O[l]||O[f]);if(typeof L=="function")return L}var b="<<anonymous>>",y={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:d(),arrayOf:m,element:E(),elementType:v(),instanceOf:T,node:_(),objectOf:D,oneOf:w,oneOfType:P,shape:H,exact:K};function C(O,L){return O===L?O!==0||1/O===1/L:O!==O&&L!==L}function p(O,L){this.message=O,this.data=L&&typeof L=="object"?L:{},this.stack=""}p.prototype=Error.prototype;function x(O){if(process.env.NODE_ENV!=="production")var L={},U=0;function Y(X,G,$,q,W,B,Z){if(q=q||b,B=B||$,Z!==n){if(c){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=q+":"+$;!L[oe]&&U<3&&(s("You are manually calling a React.PropTypes validation function for the `"+B+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[oe]=!0,U++)}}return G[$]==null?X?G[$]===null?new p("The "+W+" `"+B+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new p("The "+W+" `"+B+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:O(G,$,q,W,B)}var V=Y.bind(null,!1);return V.isRequired=Y.bind(null,!0),V}function g(O){function L(U,Y,V,X,G,$){var q=U[Y],W=k(q);if(W!==O){var B=N(q);return new p("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+V+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return x(L)}function d(){return x(i)}function m(O){function L(U,Y,V,X,G){if(typeof O!="function")return new p("Property `"+G+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var $=U[Y];if(!Array.isArray($)){var q=k($);return new p("Invalid "+X+" `"+G+"` of type "+("`"+q+"` supplied to `"+V+"`, expected an array."))}for(var W=0;W<$.length;W++){var B=O($,W,V,X,G+"["+W+"]",n);if(B instanceof Error)return B}return null}return x(L)}function E(){function O(L,U,Y,V,X){var G=L[U];if(!a(G)){var $=k(G);return new p("Invalid "+V+" `"+X+"` of type "+("`"+$+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return x(O)}function v(){function O(L,U,Y,V,X){var G=L[U];if(!e.isValidElementType(G)){var $=k(G);return new p("Invalid "+V+" `"+X+"` of type "+("`"+$+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return x(O)}function T(O){function L(U,Y,V,X,G){if(!(U[Y]instanceof O)){var $=O.name||b,q=A(U[Y]);return new p("Invalid "+X+" `"+G+"` of type "+("`"+q+"` supplied to `"+V+"`, expected ")+("instance of `"+$+"`."))}return null}return x(L)}function w(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function L(U,Y,V,X,G){for(var $=U[Y],q=0;q<O.length;q++)if(C($,O[q]))return null;var W=JSON.stringify(O,function(Z,z){var oe=N(z);return oe==="symbol"?String(z):z});return new p("Invalid "+X+" `"+G+"` of value `"+String($)+"` "+("supplied to `"+V+"`, expected one of "+W+"."))}return x(L)}function D(O){function L(U,Y,V,X,G){if(typeof O!="function")return new p("Property `"+G+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var $=U[Y],q=k($);if(q!=="object")return new p("Invalid "+X+" `"+G+"` of type "+("`"+q+"` supplied to `"+V+"`, expected an object."));for(var W in $)if(r($,W)){var B=O($,W,V,X,G+"."+W,n);if(B instanceof Error)return B}return null}return x(L)}function P(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var L=0;L<O.length;L++){var U=O[L];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(U)+" at index "+L+"."),i}function Y(V,X,G,$,q){for(var W=[],B=0;B<O.length;B++){var Z=O[B],z=Z(V,X,G,$,q,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&W.push(z.data.expectedType)}var oe=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new p("Invalid "+$+" `"+q+"` supplied to "+("`"+G+"`"+oe+"."))}return x(Y)}function _(){function O(L,U,Y,V,X){return j(L[U])?null:new p("Invalid "+V+" `"+X+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return x(O)}function I(O,L,U,Y,V){return new p((O||"React class")+": "+L+" type `"+U+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function H(O){function L(U,Y,V,X,G){var $=U[Y],q=k($);if(q!=="object")return new p("Invalid "+X+" `"+G+"` of type `"+q+"` "+("supplied to `"+V+"`, expected `object`."));for(var W in O){var B=O[W];if(typeof B!="function")return I(V,X,G,W,N(B));var Z=B($,W,V,X,G+"."+W,n);if(Z)return Z}return null}return x(L)}function K(O){function L(U,Y,V,X,G){var $=U[Y],q=k($);if(q!=="object")return new p("Invalid "+X+" `"+G+"` of type `"+q+"` "+("supplied to `"+V+"`, expected `object`."));var W=t({},U[Y],O);for(var B in W){var Z=O[B];if(r(O,B)&&typeof Z!="function")return I(V,X,G,B,N(Z));if(!Z)return new p("Invalid "+X+" `"+G+"` key `"+B+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(U[Y],null," ")+`
159
+ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var z=Z($,B,V,X,G+"."+B,n);if(z)return z}return null}return x(L)}function j(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(j);if(O===null||a(O))return!0;var L=u(O);if(L){var U=L.call(O),Y;if(L!==O.entries){for(;!(Y=U.next()).done;)if(!j(Y.value))return!1}else for(;!(Y=U.next()).done;){var V=Y.value;if(V&&!j(V[1]))return!1}}else return!1;return!0;default:return!1}}function F(O,L){return O==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function k(O){var L=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":F(L,O)?"symbol":L}function N(O){if(typeof O>"u"||O===null)return""+O;var L=k(O);if(L==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return L}function M(O){var L=N(O);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function A(O){return!O.constructor||!O.constructor.name?b:O.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},wo}var xo,Xi;function Gy(){if(Xi)return xo;Xi=1;var e=Ns();function t(){}function n(){}return n.resetWarningCache=t,xo=function(){function r(i,a,c,l,f,u){if(u!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xo}var Zi;function Yr(){if(Zi)return qn.exports;if(Zi=1,process.env.NODE_ENV!=="production"){var e=Bl(),t=!0;qn.exports=Ky()(e.isElement,t)}else qn.exports=Gy()();return qn.exports}function Vl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Vl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ji(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Vl(e))&&(r&&(r+=" "),r+=t);return r}const qy=Object.freeze(Object.defineProperty({__proto__:null,clsx:Ji,default:Ji},Symbol.toStringTag,{value:"Module"})),Xy=cd(qy);var fe={},at={},Qi;function Ur(){if(Qi)return at;Qi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.dontSetMe=o,at.findInArray=e,at.int=r,at.isFunction=t,at.isNum=n;function e(s,i){for(let a=0,c=s.length;a<c;a++)if(i.apply(i,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function n(s){return typeof s=="number"&&!isNaN(s)}function r(s){return parseInt(s,10)}function o(s,i,a){if(s[i])return new Error("Invalid prop ".concat(i," passed to ").concat(a," - do not set this, set it on the child."))}return at}var ct={},ea;function Zy(){if(ea)return ct;ea=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.browserPrefixToKey=n,ct.browserPrefixToStyle=r,ct.default=void 0,ct.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var s;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const a=(s=window.document)===null||s===void 0||(s=s.documentElement)===null||s===void 0?void 0:s.style;if(!a||i in a)return"";for(let c=0;c<e.length;c++)if(n(i,e[c])in a)return e[c];return""}function n(s,i){return i?"".concat(i).concat(o(s)):s}function r(s,i){return i?"-".concat(i.toLowerCase(),"-").concat(s):s}function o(s){let i="",a=!0;for(let c=0;c<s.length;c++)a?(i+=s[c].toUpperCase(),a=!1):s[c]==="-"?a=!0:i+=s[c];return i}return ct.default=t(),ct}var ta;function Is(){if(ta)return fe;ta=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=v,fe.addEvent=a,fe.addUserSelectStyles=m,fe.createCSSTransform=C,fe.createSVGTransform=p,fe.getTouch=g,fe.getTouchIdentifier=d,fe.getTranslation=x,fe.innerHeight=u,fe.innerWidth=b,fe.matchesSelector=s,fe.matchesSelectorAndParentsTo=i,fe.offsetXYFromParent=y,fe.outerHeight=l,fe.outerWidth=f,fe.removeClassName=T,fe.removeEvent=c,fe.removeUserSelectStyles=E;var e=Ur(),t=r(Zy());function n(w){if(typeof WeakMap!="function")return null;var D=new WeakMap,P=new WeakMap;return(n=function(_){return _?P:D})(w)}function r(w,D){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var P=n(D);if(P&&P.has(w))return P.get(w);var _={},I=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var H in w)if(H!=="default"&&Object.prototype.hasOwnProperty.call(w,H)){var K=I?Object.getOwnPropertyDescriptor(w,H):null;K&&(K.get||K.set)?Object.defineProperty(_,H,K):_[H]=w[H]}return _.default=w,P&&P.set(w,_),_}let o="";function s(w,D){return o||(o=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(P){return(0,e.isFunction)(w[P])})),(0,e.isFunction)(w[o])?w[o](D):!1}function i(w,D,P){let _=w;do{if(s(_,D))return!0;if(_===P)return!1;_=_.parentNode}while(_);return!1}function a(w,D,P,_){if(!w)return;const I={capture:!0,..._};w.addEventListener?w.addEventListener(D,P,I):w.attachEvent?w.attachEvent("on"+D,P):w["on"+D]=P}function c(w,D,P,_){if(!w)return;const I={capture:!0,..._};w.removeEventListener?w.removeEventListener(D,P,I):w.detachEvent?w.detachEvent("on"+D,P):w["on"+D]=null}function l(w){let D=w.clientHeight;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D+=(0,e.int)(P.borderTopWidth),D+=(0,e.int)(P.borderBottomWidth),D}function f(w){let D=w.clientWidth;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D+=(0,e.int)(P.borderLeftWidth),D+=(0,e.int)(P.borderRightWidth),D}function u(w){let D=w.clientHeight;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D-=(0,e.int)(P.paddingTop),D-=(0,e.int)(P.paddingBottom),D}function b(w){let D=w.clientWidth;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D-=(0,e.int)(P.paddingLeft),D-=(0,e.int)(P.paddingRight),D}function y(w,D,P){const I=D===D.ownerDocument.body?{left:0,top:0}:D.getBoundingClientRect(),H=(w.clientX+D.scrollLeft-I.left)/P,K=(w.clientY+D.scrollTop-I.top)/P;return{x:H,y:K}}function C(w,D){const P=x(w,D,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:P}}function p(w,D){return x(w,D,"")}function x(w,D,P){let{x:_,y:I}=w,H="translate(".concat(_).concat(P,",").concat(I).concat(P,")");if(D){const K="".concat(typeof D.x=="string"?D.x:D.x+P),j="".concat(typeof D.y=="string"?D.y:D.y+P);H="translate(".concat(K,", ").concat(j,")")+H}return H}function g(w,D){return w.targetTouches&&(0,e.findInArray)(w.targetTouches,P=>D===P.identifier)||w.changedTouches&&(0,e.findInArray)(w.changedTouches,P=>D===P.identifier)}function d(w){if(w.targetTouches&&w.targetTouches[0])return w.targetTouches[0].identifier;if(w.changedTouches&&w.changedTouches[0])return w.changedTouches[0].identifier}function m(w){if(!w)return;let D=w.getElementById("react-draggable-style-el");D||(D=w.createElement("style"),D.type="text/css",D.id="react-draggable-style-el",D.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
160
160
  `,D.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
161
- `,x.getElementsByTagName("head")[0].appendChild(D)),x.body&&g(x.body,"react-draggable-transparent-selection")}function E(x){if(x)try{if(x.body&&T(x.body,"react-draggable-transparent-selection"),x.selection)x.selection.empty();else{const D=(x.defaultView||window).getSelection();D&&D.type!=="Caret"&&D.removeAllRanges()}}catch{}}function g(x,D){x.classList?x.classList.add(D):x.className.match(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)")))||(x.className+=" ".concat(D))}function T(x,D){x.classList?x.classList.remove(D):x.className=x.className.replace(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)"),"g"),"")}return fe}var We={},ea;function Hl(){if(ea)return We;ea=1,Object.defineProperty(We,"__esModule",{value:!0}),We.canDragX=o,We.canDragY=s,We.createCoreData=a,We.createDraggableData=c,We.getBoundPosition=n,We.getControlPosition=i,We.snapToGrid=r;var e=Yr(),t=Ns();function n(u,b,y){if(!u.props.bounds)return[b,y];let{bounds:C}=u.props;C=typeof C=="string"?C:l(C);const h=d(u);if(typeof C=="string"){const{ownerDocument:w}=h,m=w.defaultView;let f;if(C==="parent"?f=h.parentNode:f=w.querySelector(C),!(f instanceof m.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const v=f,E=m.getComputedStyle(h),g=m.getComputedStyle(v);C={left:-h.offsetLeft+(0,e.int)(g.paddingLeft)+(0,e.int)(E.marginLeft),top:-h.offsetTop+(0,e.int)(g.paddingTop)+(0,e.int)(E.marginTop),right:(0,t.innerWidth)(v)-(0,t.outerWidth)(h)-h.offsetLeft+(0,e.int)(g.paddingRight)-(0,e.int)(E.marginRight),bottom:(0,t.innerHeight)(v)-(0,t.outerHeight)(h)-h.offsetTop+(0,e.int)(g.paddingBottom)-(0,e.int)(E.marginBottom)}}return(0,e.isNum)(C.right)&&(b=Math.min(b,C.right)),(0,e.isNum)(C.bottom)&&(y=Math.min(y,C.bottom)),(0,e.isNum)(C.left)&&(b=Math.max(b,C.left)),(0,e.isNum)(C.top)&&(y=Math.max(y,C.top)),[b,y]}function r(u,b,y){const C=Math.round(b/u[0])*u[0],h=Math.round(y/u[1])*u[1];return[C,h]}function o(u){return u.props.axis==="both"||u.props.axis==="x"}function s(u){return u.props.axis==="both"||u.props.axis==="y"}function i(u,b,y){const C=typeof b=="number"?(0,t.getTouch)(u,b):null;if(typeof b=="number"&&!C)return null;const h=d(y),w=y.props.offsetParent||h.offsetParent||h.ownerDocument.body;return(0,t.offsetXYFromParent)(C||u,w,y.props.scale)}function a(u,b,y){const C=!(0,e.isNum)(u.lastX),h=d(u);return C?{node:h,deltaX:0,deltaY:0,lastX:b,lastY:y,x:b,y}:{node:h,deltaX:b-u.lastX,deltaY:y-u.lastY,lastX:u.lastX,lastY:u.lastY,x:b,y}}function c(u,b){const y=u.props.scale;return{node:b.node,x:u.state.x+b.deltaX/y,y:u.state.y+b.deltaY/y,deltaX:b.deltaX/y,deltaY:b.deltaY/y,lastX:u.state.x,lastY:u.state.y}}function l(u){return{left:u.left,top:u.top,right:u.right,bottom:u.bottom}}function d(u){const b=u.findDOMNode();if(!b)throw new Error("<DraggableCore>: Unmounted during event!");return b}return We}var cn={},Zn={},ta;function Vl(){if(ta)return Zn;ta=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.default=e;function e(){}return Zn}var na;function Xy(){if(na)return cn;na=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=void 0;var e=l(R),t=a(Vr()),n=a(Ge),r=Ns(),o=Hl(),s=Yr(),i=a(Vl());function a(w){return w&&w.__esModule?w:{default:w}}function c(w){if(typeof WeakMap!="function")return null;var m=new WeakMap,f=new WeakMap;return(c=function(v){return v?f:m})(w)}function l(w,m){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var f=c(m);if(f&&f.has(w))return f.get(w);var v={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in w)if(g!=="default"&&Object.prototype.hasOwnProperty.call(w,g)){var T=E?Object.getOwnPropertyDescriptor(w,g):null;T&&(T.get||T.set)?Object.defineProperty(v,g,T):v[g]=w[g]}return v.default=w,f&&f.set(w,v),v}function d(w,m,f){return m=u(m),m in w?Object.defineProperty(w,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):w[m]=f,w}function u(w){var m=b(w,"string");return typeof m=="symbol"?m:String(m)}function b(w,m){if(typeof w!="object"||w===null)return w;var f=w[Symbol.toPrimitive];if(f!==void 0){var v=f.call(w,m);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(w)}const y={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=y.mouse,h=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",m=>{if(this.props.onMouseDown(m),!this.props.allowAnyClick&&typeof m.button=="number"&&m.button!==0)return!1;const f=this.findDOMNode();if(!f||!f.ownerDocument||!f.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:v}=f;if(this.props.disabled||!(m.target instanceof v.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(m.target,this.props.handle,f)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(m.target,this.props.cancel,f))return;m.type==="touchstart"&&m.preventDefault();const E=(0,r.getTouchIdentifier)(m);this.touchIdentifier=E;const g=(0,o.getControlPosition)(m,E,this);if(g==null)return;const{x:T,y:x}=g,D=(0,o.createCoreData)(this,T,x);(0,i.default)("DraggableCore: handleDragStart: %j",D),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(m,D)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(v),this.dragging=!0,this.lastX=T,this.lastY=x,(0,r.addEvent)(v,C.move,this.handleDrag),(0,r.addEvent)(v,C.stop,this.handleDragStop))}),d(this,"handleDrag",m=>{const f=(0,o.getControlPosition)(m,this.touchIdentifier,this);if(f==null)return;let{x:v,y:E}=f;if(Array.isArray(this.props.grid)){let x=v-this.lastX,D=E-this.lastY;if([x,D]=(0,o.snapToGrid)(this.props.grid,x,D),!x&&!D)return;v=this.lastX+x,E=this.lastY+D}const g=(0,o.createCoreData)(this,v,E);if((0,i.default)("DraggableCore: handleDrag: %j",g),this.props.onDrag(m,g)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const D=document.createEvent("MouseEvents");D.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(D)}return}this.lastX=v,this.lastY=E}),d(this,"handleDragStop",m=>{if(!this.dragging)return;const f=(0,o.getControlPosition)(m,this.touchIdentifier,this);if(f==null)return;let{x:v,y:E}=f;if(Array.isArray(this.props.grid)){let D=v-this.lastX||0,k=E-this.lastY||0;[D,k]=(0,o.snapToGrid)(this.props.grid,D,k),v=this.lastX+D,E=this.lastY+k}const g=(0,o.createCoreData)(this,v,E);if(this.props.onStop(m,g)===!1||this.mounted===!1)return!1;const x=this.findDOMNode();x&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(x.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",g),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,x&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(x.ownerDocument,C.move,this.handleDrag),(0,r.removeEvent)(x.ownerDocument,C.stop,this.handleDragStop))}),d(this,"onMouseDown",m=>(C=y.mouse,this.handleDragStart(m))),d(this,"onMouseUp",m=>(C=y.mouse,this.handleDragStop(m))),d(this,"onTouchStart",m=>(C=y.touch,this.handleDragStart(m))),d(this,"onTouchEnd",m=>(C=y.touch,this.handleDragStop(m)))}componentDidMount(){this.mounted=!0;const m=this.findDOMNode();m&&(0,r.addEvent)(m,y.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const m=this.findDOMNode();if(m){const{ownerDocument:f}=m;(0,r.removeEvent)(f,y.mouse.move,this.handleDrag),(0,r.removeEvent)(f,y.touch.move,this.handleDrag),(0,r.removeEvent)(f,y.mouse.stop,this.handleDragStop),(0,r.removeEvent)(f,y.touch.stop,this.handleDragStop),(0,r.removeEvent)(m,y.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(f)}}findDOMNode(){var m,f;return(m=this.props)!==null&&m!==void 0&&m.nodeRef?(f=this.props)===null||f===void 0||(f=f.nodeRef)===null||f===void 0?void 0:f.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return cn.default=h,d(h,"displayName","DraggableCore"),d(h,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(w,m){if(w[m]&&w[m].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),d(h,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),cn}var ra;function Zy(){return ra||(ra=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=b(R),n=d(Vr()),r=d(Ge),o=d(Gy),s=Ns(),i=Hl(),a=Yr(),c=d(Xy()),l=d(Vl());function d(f){return f&&f.__esModule?f:{default:f}}function u(f){if(typeof WeakMap!="function")return null;var v=new WeakMap,E=new WeakMap;return(u=function(g){return g?E:v})(f)}function b(f,v){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var E=u(v);if(E&&E.has(f))return E.get(f);var g={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in f)if(x!=="default"&&Object.prototype.hasOwnProperty.call(f,x)){var D=T?Object.getOwnPropertyDescriptor(f,x):null;D&&(D.get||D.set)?Object.defineProperty(g,x,D):g[x]=f[x]}return g.default=f,E&&E.set(f,g),g}function y(){return y=Object.assign?Object.assign.bind():function(f){for(var v=1;v<arguments.length;v++){var E=arguments[v];for(var g in E)Object.prototype.hasOwnProperty.call(E,g)&&(f[g]=E[g])}return f},y.apply(this,arguments)}function C(f,v,E){return v=h(v),v in f?Object.defineProperty(f,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):f[v]=E,f}function h(f){var v=w(f,"string");return typeof v=="symbol"?v:String(v)}function w(f,v){if(typeof f!="object"||f===null)return f;var E=f[Symbol.toPrimitive];if(E!==void 0){var g=E.call(f,v);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(f)}class m extends t.Component{static getDerivedStateFromProps(v,E){let{position:g}=v,{prevPropsPosition:T}=E;return g&&(!T||g.x!==T.x||g.y!==T.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:g,prevPropsPosition:T}),{x:g.x,y:g.y,prevPropsPosition:{...g}}):null}constructor(v){super(v),C(this,"onDragStart",(E,g)=>{if((0,l.default)("Draggable: onDragStart: %j",g),this.props.onStart(E,(0,i.createDraggableData)(this,g))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(E,g)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",g);const T=(0,i.createDraggableData)(this,g),x={x:T.x,y:T.y,slackX:0,slackY:0};if(this.props.bounds){const{x:k,y:_}=x;x.x+=this.state.slackX,x.y+=this.state.slackY;const[N,B]=(0,i.getBoundPosition)(this,x.x,x.y);x.x=N,x.y=B,x.slackX=this.state.slackX+(k-x.x),x.slackY=this.state.slackY+(_-x.y),T.x=x.x,T.y=x.y,T.deltaX=x.x-this.state.x,T.deltaY=x.y-this.state.y}if(this.props.onDrag(E,T)===!1)return!1;this.setState(x)}),C(this,"onDragStop",(E,g)=>{if(!this.state.dragging||this.props.onStop(E,(0,i.createDraggableData)(this,g))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",g);const x={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:k,y:_}=this.props.position;x.x=k,x.y=_}this.setState(x)}),this.state={dragging:!1,dragged:!1,x:v.position?v.position.x:v.defaultPosition.x,y:v.position?v.position.y:v.defaultPosition.y,prevPropsPosition:{...v.position},slackX:0,slackY:0,isElementSVG:!1},v.position&&!(v.onDrag||v.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var v,E;return(v=(E=this.props)===null||E===void 0||(E=E.nodeRef)===null||E===void 0?void 0:E.current)!==null&&v!==void 0?v:r.default.findDOMNode(this)}render(){const{axis:v,bounds:E,children:g,defaultPosition:T,defaultClassName:x,defaultClassNameDragging:D,defaultClassNameDragged:k,position:_,positionOffset:N,scale:B,...U}=this.props;let I={},z=null;const j=!!!_||this.state.dragging,M=_||T,A={x:(0,i.canDragX)(this)&&j?this.state.x:M.x,y:(0,i.canDragY)(this)&&j?this.state.y:M.y};this.state.isElementSVG?z=(0,s.createSVGTransform)(A,N):I=(0,s.createCSSTransform)(A,N);const O=(0,o.default)(g.props.className||"",x,{[D]:this.state.dragging,[k]:this.state.dragged});return t.createElement(c.default,y({},U,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(g),{className:O,style:{...g.props.style,...I},transform:z}))}}e.default=m,C(m,"displayName","Draggable"),C(m,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),C(m,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(ho)),ho}var oa;function Yl(){if(oa)return an.exports;oa=1;const{default:e,DraggableCore:t}=Zy();return an.exports=e,an.exports.default=e,an.exports.DraggableCore=t,an.exports}var Jn={},sa;function Jy(){if(sa)return Jn;sa=1,Jn.__esModule=!0,Jn.cloneElement=a;var e=t(R);function t(c){return c&&c.__esModule?c:{default:c}}function n(c,l){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(c);l&&(u=u.filter(function(b){return Object.getOwnPropertyDescriptor(c,b).enumerable})),d.push.apply(d,u)}return d}function r(c){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?n(Object(d),!0).forEach(function(u){o(c,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):n(Object(d)).forEach(function(u){Object.defineProperty(c,u,Object.getOwnPropertyDescriptor(d,u))})}return c}function o(c,l,d){return l=s(l),l in c?Object.defineProperty(c,l,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[l]=d,c}function s(c){var l=i(c,"string");return typeof l=="symbol"?l:String(l)}function i(c,l){if(typeof c!="object"||c===null)return c;var d=c[Symbol.toPrimitive];if(d!==void 0){var u=d.call(c,l);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(c)}function a(c,l){return l.style&&c.props.style&&(l.style=r(r({},c.props.style),l.style)),l.className&&c.props.className&&(l.className=c.props.className+" "+l.className),e.default.cloneElement(c,l)}return Jn}var ln={},ia;function Ul(){if(ia)return ln;ia=1,ln.__esModule=!0,ln.resizableProps=void 0;var e=t(Vr());Yl();function t(r){return r&&r.__esModule?r:{default:r}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="y"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="x"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)}};return ln.resizableProps=n,ln}var aa;function Kl(){if(aa)return sn;aa=1,sn.__esModule=!0,sn.default=void 0;var e=i(R),t=Yl(),n=Jy(),r=Ul(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(m){if(typeof WeakMap!="function")return null;var f=new WeakMap,v=new WeakMap;return(s=function(g){return g?v:f})(m)}function i(m,f){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var v=s(f);if(v&&v.has(m))return v.get(m);var E={},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in m)if(T!=="default"&&Object.prototype.hasOwnProperty.call(m,T)){var x=g?Object.getOwnPropertyDescriptor(m,T):null;x&&(x.get||x.set)?Object.defineProperty(E,T,x):E[T]=m[T]}return E.default=m,v&&v.set(m,E),E}function a(){return a=Object.assign?Object.assign.bind():function(m){for(var f=1;f<arguments.length;f++){var v=arguments[f];for(var E in v)Object.prototype.hasOwnProperty.call(v,E)&&(m[E]=v[E])}return m},a.apply(this,arguments)}function c(m,f){if(m==null)return{};var v={},E=Object.keys(m),g,T;for(T=0;T<E.length;T++)g=E[T],!(f.indexOf(g)>=0)&&(v[g]=m[g]);return v}function l(m,f){var v=Object.keys(m);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(m);f&&(E=E.filter(function(g){return Object.getOwnPropertyDescriptor(m,g).enumerable})),v.push.apply(v,E)}return v}function d(m){for(var f=1;f<arguments.length;f++){var v=arguments[f]!=null?arguments[f]:{};f%2?l(Object(v),!0).forEach(function(E){u(m,E,v[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(v)):l(Object(v)).forEach(function(E){Object.defineProperty(m,E,Object.getOwnPropertyDescriptor(v,E))})}return m}function u(m,f,v){return f=b(f),f in m?Object.defineProperty(m,f,{value:v,enumerable:!0,configurable:!0,writable:!0}):m[f]=v,m}function b(m){var f=y(m,"string");return typeof f=="symbol"?f:String(f)}function y(m,f){if(typeof m!="object"||m===null)return m;var v=m[Symbol.toPrimitive];if(v!==void 0){var E=v.call(m,f);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(m)}function C(m,f){m.prototype=Object.create(f.prototype),m.prototype.constructor=m,h(m,f)}function h(m,f){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,g){return E.__proto__=g,E},h(m,f)}var w=function(m){C(f,m);function f(){for(var E,g=arguments.length,T=new Array(g),x=0;x<g;x++)T[x]=arguments[x];return E=m.call.apply(m,[this].concat(T))||this,E.handleRefs={},E.lastHandleRect=null,E.slack=null,E}var v=f.prototype;return v.componentWillUnmount=function(){this.resetData()},v.resetData=function(){this.lastHandleRect=this.slack=null},v.runConstraints=function(g,T){var x=this.props,D=x.minConstraints,k=x.maxConstraints,_=x.lockAspectRatio;if(!D&&!k&&!_)return[g,T];if(_){var N=this.props.width/this.props.height,B=g-this.props.width,U=T-this.props.height;Math.abs(B)>Math.abs(U*N)?T=g/N:g=T*N}var I=g,z=T,P=this.slack||[0,0],j=P[0],M=P[1];return g+=j,T+=M,D&&(g=Math.max(D[0],g),T=Math.max(D[1],T)),k&&(g=Math.min(k[0],g),T=Math.min(k[1],T)),this.slack=[j+(I-g),M+(z-T)],[g,T]},v.resizeHandler=function(g,T){var x=this;return function(D,k){var _=k.node,N=k.deltaX,B=k.deltaY;g==="onResizeStart"&&x.resetData();var U=(x.props.axis==="both"||x.props.axis==="x")&&T!=="n"&&T!=="s",I=(x.props.axis==="both"||x.props.axis==="y")&&T!=="e"&&T!=="w";if(!(!U&&!I)){var z=T[0],P=T[T.length-1],j=_.getBoundingClientRect();if(x.lastHandleRect!=null){if(P==="w"){var M=j.left-x.lastHandleRect.left;N+=M}if(z==="n"){var A=j.top-x.lastHandleRect.top;B+=A}}x.lastHandleRect=j,P==="w"&&(N=-N),z==="n"&&(B=-B);var O=x.props.width+(U?N/x.props.transformScale:0),$=x.props.height+(I?B/x.props.transformScale:0),Y=x.runConstraints(O,$);O=Y[0],$=Y[1];var V=O!==x.props.width||$!==x.props.height,H=typeof x.props[g]=="function"?x.props[g]:null,Z=g==="onResize"&&!V;H&&!Z&&(D.persist==null||D.persist(),H(D,{node:_,size:{width:O,height:$},handle:T})),g==="onResizeStop"&&x.resetData()}}},v.renderResizeHandle=function(g,T){var x=this.props.handle;if(!x)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+g,ref:T});if(typeof x=="function")return x(g,T);var D=typeof x.type=="string",k=d({ref:T},D?{}:{handleAxis:g});return e.cloneElement(x,k)},v.render=function(){var g=this,T=this.props,x=T.children,D=T.className,k=T.draggableOpts;T.width,T.height,T.handle,T.handleSize,T.lockAspectRatio,T.axis,T.minConstraints,T.maxConstraints,T.onResize,T.onResizeStop,T.onResizeStart;var _=T.resizeHandles;T.transformScale;var N=c(T,o);return(0,n.cloneElement)(x,d(d({},N),{},{className:(D?D+" ":"")+"react-resizable",children:[].concat(x.props.children,_.map(function(B){var U,I=(U=g.handleRefs[B])!=null?U:g.handleRefs[B]=e.createRef();return e.createElement(t.DraggableCore,a({},k,{nodeRef:I,key:"resizableHandle-"+B,onStop:g.resizeHandler("onResizeStop",B),onStart:g.resizeHandler("onResizeStart",B),onDrag:g.resizeHandler("onResize",B)}),g.renderResizeHandle(B,I))}))}))},f}(e.Component);return sn.default=w,w.propTypes=r.resizableProps,w.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},sn}var un={},ca;function Qy(){if(ca)return un;ca=1,un.__esModule=!0,un.default=void 0;var e=a(R),t=s(Vr()),n=s(Kl()),r=Ul(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function s(f){return f&&f.__esModule?f:{default:f}}function i(f){if(typeof WeakMap!="function")return null;var v=new WeakMap,E=new WeakMap;return(i=function(T){return T?E:v})(f)}function a(f,v){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var E=i(v);if(E&&E.has(f))return E.get(f);var g={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in f)if(x!=="default"&&Object.prototype.hasOwnProperty.call(f,x)){var D=T?Object.getOwnPropertyDescriptor(f,x):null;D&&(D.get||D.set)?Object.defineProperty(g,x,D):g[x]=f[x]}return g.default=f,E&&E.set(f,g),g}function c(){return c=Object.assign?Object.assign.bind():function(f){for(var v=1;v<arguments.length;v++){var E=arguments[v];for(var g in E)Object.prototype.hasOwnProperty.call(E,g)&&(f[g]=E[g])}return f},c.apply(this,arguments)}function l(f,v){var E=Object.keys(f);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(f);v&&(g=g.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),E.push.apply(E,g)}return E}function d(f){for(var v=1;v<arguments.length;v++){var E=arguments[v]!=null?arguments[v]:{};v%2?l(Object(E),!0).forEach(function(g){u(f,g,E[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(E)):l(Object(E)).forEach(function(g){Object.defineProperty(f,g,Object.getOwnPropertyDescriptor(E,g))})}return f}function u(f,v,E){return v=b(v),v in f?Object.defineProperty(f,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):f[v]=E,f}function b(f){var v=y(f,"string");return typeof v=="symbol"?v:String(v)}function y(f,v){if(typeof f!="object"||f===null)return f;var E=f[Symbol.toPrimitive];if(E!==void 0){var g=E.call(f,v);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(f)}function C(f,v){if(f==null)return{};var E={},g=Object.keys(f),T,x;for(x=0;x<g.length;x++)T=g[x],!(v.indexOf(T)>=0)&&(E[T]=f[T]);return E}function h(f,v){f.prototype=Object.create(v.prototype),f.prototype.constructor=f,w(f,v)}function w(f,v){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},w(f,v)}var m=function(f){h(v,f);function v(){for(var g,T=arguments.length,x=new Array(T),D=0;D<T;D++)x[D]=arguments[D];return g=f.call.apply(f,[this].concat(x))||this,g.state={width:g.props.width,height:g.props.height,propsWidth:g.props.width,propsHeight:g.props.height},g.onResize=function(k,_){var N=_.size;g.props.onResize?(k.persist==null||k.persist(),g.setState(N,function(){return g.props.onResize&&g.props.onResize(k,_)})):g.setState(N)},g}v.getDerivedStateFromProps=function(T,x){return x.propsWidth!==T.width||x.propsHeight!==T.height?{width:T.width,height:T.height,propsWidth:T.width,propsHeight:T.height}:null};var E=v.prototype;return E.render=function(){var T=this.props,x=T.handle,D=T.handleSize;T.onResize;var k=T.onResizeStart,_=T.onResizeStop,N=T.draggableOpts,B=T.minConstraints,U=T.maxConstraints,I=T.lockAspectRatio,z=T.axis;T.width,T.height;var P=T.resizeHandles,j=T.style,M=T.transformScale,A=C(T,o);return e.createElement(n.default,{axis:z,draggableOpts:N,handle:x,handleSize:D,height:this.state.height,lockAspectRatio:I,maxConstraints:U,minConstraints:B,onResizeStart:k,onResize:this.onResize,onResizeStop:_,resizeHandles:P,transformScale:M,width:this.state.width},e.createElement("div",c({},A,{style:d(d({},j),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},v}(e.Component);return un.default=m,m.propTypes=d(d({},r.resizableProps),{},{children:t.default.element}),un}var la;function eb(){return la||(la=1,on.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},on.exports.Resizable=Kl().default,on.exports.ResizableBox=Qy().default),on.exports}var Gl=eb();const Is=({bookingInit:e,slotData:t,heightStyleTransformer:n,onClick:r,customClasses:o,bookingViewType:s,resizableParam:i,events:a,open:c=!0,ref:l})=>{var w;const[d,u]=R.useState(""),b=Xt(m=>m.updateIsDragging),y=s===ne.DAY?{width:"99%"}:{width:"100%"};R.useEffect(()=>()=>{a!=null&&a.onUnmount&&(a==null||a.onUnmount())},[]);const C=(m,f)=>{u("show-handle"),b(!0),i!=null&&i.onResizeStart&&i.onResizeStart(m,f)},h=(m,f)=>{u(""),b(!1),i!=null&&i.onResizeStop&&i.onResizeStop(m,f)};if(!c&&!e.finishAt)return null;if((w=i==null?void 0:i.state)!=null&&w.height){const{state:m,onResize:f}=i;return p.jsx(Gl.Resizable,{className:ie("cardContent_resizable",i.customClass,d),height:m==null?void 0:m.height,width:m==null?void 0:m.width,onResize:f,onResizeStart:C,onResizeStop:h,resizeHandles:["s"],draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:p.jsx("div",{style:{display:"flex",height:n,zIndex:99},children:p.jsx(zo,{heightStyleTransformer:n,booking:e,slotData:t,onClick:r},e.id)})})}return p.jsx("div",{ref:l,style:{height:n,display:"flex",zIndex:100,...y},children:p.jsx(zo,{heightStyleTransformer:n,customClasses:o,booking:e,slotData:t,onClick:r})})};var tb="Label",ql=S.forwardRef((e,t)=>p.jsx(se.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ql.displayName=tb;var nb=ql;function rb({className:e,...t}){return p.jsx(nb,{"data-slot":"label",className:ie("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const ob=({onClose:e,side:t,onOpenChange:n,buttonTrigger:r,children:o})=>{const[s,i]=R.useState({x:0,y:0}),a=Xt(C=>C.updateIsDragging),{attributes:c,listeners:l,setNodeRef:d,transform:u,setActivatorNodeRef:b}=rs({id:"booking_info",data:{type:"another"}}),y={transform:`translate3d(${s.x+((u==null?void 0:u.x)||0)}px, ${s.y+((u==null?void 0:u.y)||0)}px, 0)`};return Dn({onDragStart(){a(!0)},onDragEnd(C){if(C.active.id){const{y:h,x:w}=s;i({x:w+((u==null?void 0:u.x)||0),y:h+((u==null?void 0:u.y)||0)}),a(!1)}}}),p.jsxs(Ps,{dir:"ltr",modal:!1,open:!0,onOpenChange:n,children:[p.jsx(ks,{asChild:!0,children:r}),p.jsxs(As,{ref:d,style:{...y,zIndex:50,width:"25rem"},forceMount:!0,avoidCollisions:!0,side:t,sticky:"always",updatePositionStrategy:"always",...c,children:[p.jsxs("div",{className:"dropdownLabelContent",children:[p.jsx(rb,{ref:b,className:"dropdownLabelContent_dropdownLabel",...l,children:"Appointment"}),p.jsx(oh,{className:"dropdownLabelContent_close",onClick:e})]}),o]})]})};var js="Popover",[Xl,Uw]=mt(js,[vt]),In=vt(),[sb,yt]=Xl(js),Zl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=In(t),c=S.useRef(null),[l,d]=S.useState(!1),[u=!1,b]=Et({prop:r,defaultProp:o,onChange:s});return p.jsx(Ar,{...a,children:p.jsx(sb,{scope:t,contentId:ft(),triggerRef:c,open:u,onOpenChange:b,onOpenToggle:S.useCallback(()=>b(y=>!y),[b]),hasCustomAnchor:l,onCustomAnchorAdd:S.useCallback(()=>d(!0),[]),onCustomAnchorRemove:S.useCallback(()=>d(!1),[]),modal:i,children:n})})};Zl.displayName=js;var Jl="PopoverAnchor",Ql=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(Jl,n),s=In(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return S.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(Pn,{...s,...r,ref:t})});Ql.displayName=Jl;var eu="PopoverTrigger",tu=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(eu,n),s=In(n),i=le(t,o.triggerRef),a=p.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":iu(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(Pn,{asChild:!0,...s,children:a})});tu.displayName=eu;var Ls="PopoverPortal",[ib,ab]=Xl(Ls,{forceMount:void 0}),nu=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=yt(Ls,t);return p.jsx(ib,{scope:t,forceMount:n,children:p.jsx(Je,{present:n||s.open,children:p.jsx(kn,{asChild:!0,container:o,children:r})})})};nu.displayName=Ls;var Bt="PopoverContent",ru=S.forwardRef((e,t)=>{const n=ab(Bt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=yt(Bt,e.__scopePopover);return p.jsx(Je,{present:r||s.open,children:s.modal?p.jsx(lb,{...o,ref:t}):p.jsx(ub,{...o,ref:t})})});ru.displayName=Bt;var cb=St("PopoverContent.RemoveScroll"),lb=S.forwardRef((e,t)=>{const n=yt(Bt,e.__scopePopover),r=S.useRef(null),o=le(t,r),s=S.useRef(!1);return S.useEffect(()=>{const i=r.current;if(i)return xs(i)},[]),p.jsx(Wr,{as:cb,allowPinchZoom:!0,children:p.jsx(ou,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ee(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),ub=S.forwardRef((e,t)=>{const n=yt(Bt,e.__scopePopover),r=S.useRef(!1),o=S.useRef(!1);return p.jsx(ou,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ou=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:d,...u}=e,b=yt(Bt,n),y=In(n);return ws(),p.jsx($r,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>b.onOpenChange(!1),children:p.jsx(_r,{"data-state":iu(b.open),role:"dialog",id:b.contentId,...y,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),su="PopoverClose",db=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(su,n);return p.jsx(se.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});db.displayName=su;var fb="PopoverArrow",pb=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=In(n);return p.jsx(Nr,{...o,...r,ref:t})});pb.displayName=fb;function iu(e){return e?"open":"closed"}var hb=Zl,gb=Ql,mb=tu,vb=nu,yb=ru;function bb({...e}){return p.jsx(hb,{"data-slot":"popover",...e})}function wb({...e}){return p.jsx(mb,{"data-slot":"popover-trigger",...e})}function xb({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(vb,{children:p.jsx(yb,{"data-slot":"popover-content",align:t,sideOffset:n,className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function Sb({...e}){return p.jsx(gb,{"data-slot":"popover-anchor",...e})}var Cb="Toggle",au=S.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...s}=e,[i=!1,a]=Et({prop:n,onChange:o,defaultProp:r});return p.jsx(se.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:ee(e.onClick,()=>{e.disabled||a(!i)})})});au.displayName=Cb;var Eb=au;const Db=lc("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Tb({className:e,variant:t,size:n,...r}){return p.jsx(Eb,{"data-slot":"toggle",className:ie(Db({variant:t,size:n,className:e})),...r})}const Rb=()=>{const[e,t]=R.useState(!1);return p.jsx(vs,{children:p.jsxs(Wc,{children:[p.jsx(Bc,{asChild:!0,children:p.jsx("div",{children:p.jsx(Tb,{className:"group size-10 p-0 hover:bg-indigo-50 hover:text-indigo-500 data-[state=on]:bg-indigo-50 data-[state=on]:text-indigo-500","aria-label":"Bookmark this",variant:e?"default":"outline",pressed:e,onPressedChange:t,children:p.jsx(Ap,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),p.jsx(Hc,{className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:p.jsx("p",{children:e?"Remove bookmark":"Bookmark this"})})]})})};function ua(e,[t,n]){return Math.min(n,Math.max(t,e))}function Mb(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ob=[" ","Enter","ArrowUp","ArrowDown"],Pb=[" ","Enter"],jn="Select",[Ur,Kr,kb]=ys(jn),[Zt,Kw]=mt(jn,[kb,vt]),Gr=vt(),[Ab,bt]=Zt(jn),[_b,Nb]=Zt(jn),cu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:d,autoComplete:u,disabled:b,required:y,form:C}=e,h=Gr(t),[w,m]=S.useState(null),[f,v]=S.useState(null),[E,g]=S.useState(!1),T=bs(l),[x=!1,D]=Et({prop:r,defaultProp:o,onChange:s}),[k,_]=Et({prop:i,defaultProp:a,onChange:c}),N=S.useRef(null),B=w?C||!!w.closest("form"):!0,[U,I]=S.useState(new Set),z=Array.from(U).map(P=>P.props.value).join(";");return p.jsx(Ar,{...h,children:p.jsxs(Ab,{required:y,scope:t,trigger:w,onTriggerChange:m,valueNode:f,onValueNodeChange:v,valueNodeHasChildren:E,onValueNodeHasChildrenChange:g,contentId:ft(),value:k,onValueChange:_,open:x,onOpenChange:D,dir:T,triggerPointerDownPosRef:N,disabled:b,children:[p.jsx(Ur.Provider,{scope:t,children:p.jsx(_b,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(P=>{I(j=>new Set(j).add(P))},[]),onNativeOptionRemove:S.useCallback(P=>{I(j=>{const M=new Set(j);return M.delete(P),M})},[]),children:n})}),B?p.jsxs(ku,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:u,value:k,onChange:P=>_(P.target.value),disabled:b,form:C,children:[k===void 0?p.jsx("option",{value:""}):null,Array.from(U)]},z):null]})})};cu.displayName=jn;var lu="SelectTrigger",uu=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Gr(n),i=bt(lu,n),a=i.disabled||r,c=le(t,i.onTriggerChange),l=Kr(n),d=S.useRef("touch"),[u,b,y]=Au(h=>{const w=l().filter(v=>!v.disabled),m=w.find(v=>v.value===i.value),f=_u(w,h,m);f!==void 0&&i.onValueChange(f.value)}),C=h=>{a||(i.onOpenChange(!0),y()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return p.jsx(Pn,{asChild:!0,...s,children:p.jsx(se.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Pu(i.value)?"":void 0,...o,ref:c,onClick:ee(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&C(h)}),onPointerDown:ee(o.onPointerDown,h=>{d.current=h.pointerType;const w=h.target;w.hasPointerCapture(h.pointerId)&&w.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(C(h),h.preventDefault())}),onKeyDown:ee(o.onKeyDown,h=>{const w=u.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&b(h.key),!(w&&h.key===" ")&&Ob.includes(h.key)&&(C(),h.preventDefault())})})})});uu.displayName=lu;var du="SelectValue",fu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=bt(du,n),{onValueNodeHasChildrenChange:l}=c,d=s!==void 0,u=le(t,c.onValueNodeChange);return ye(()=>{l(d)},[l,d]),p.jsx(se.span,{...a,ref:u,style:{pointerEvents:"none"},children:Pu(c.value)?p.jsx(p.Fragment,{children:i}):s})});fu.displayName=du;var Ib="SelectIcon",pu=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(se.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});pu.displayName=Ib;var jb="SelectPortal",hu=e=>p.jsx(kn,{asChild:!0,...e});hu.displayName=jb;var Dt="SelectContent",gu=S.forwardRef((e,t)=>{const n=bt(Dt,e.__scopeSelect),[r,o]=S.useState();if(ye(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?xr.createPortal(p.jsx(mu,{scope:e.__scopeSelect,children:p.jsx(Ur.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(vu,{...e,ref:t})});gu.displayName=Dt;var Ne=10,[mu,wt]=Zt(Dt),Lb="SelectContentImpl",$b=St("SelectContent.RemoveScroll"),vu=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:b,collisionPadding:y,sticky:C,hideWhenDetached:h,avoidCollisions:w,...m}=e,f=bt(Dt,n),[v,E]=S.useState(null),[g,T]=S.useState(null),x=le(t,W=>E(W)),[D,k]=S.useState(null),[_,N]=S.useState(null),B=Kr(n),[U,I]=S.useState(!1),z=S.useRef(!1);S.useEffect(()=>{if(v)return xs(v)},[v]),ws();const P=S.useCallback(W=>{const[q,...K]=B().map(F=>F.ref.current),[L]=K.slice(-1),X=document.activeElement;for(const F of W)if(F===X||(F==null||F.scrollIntoView({block:"nearest"}),F===q&&g&&(g.scrollTop=0),F===L&&g&&(g.scrollTop=g.scrollHeight),F==null||F.focus(),document.activeElement!==X))return},[B,g]),j=S.useCallback(()=>P([D,v]),[P,D,v]);S.useEffect(()=>{U&&j()},[U,j]);const{onOpenChange:M,triggerPointerDownPosRef:A}=f;S.useEffect(()=>{if(v){let W={x:0,y:0};const q=L=>{var X,F;W={x:Math.abs(Math.round(L.pageX)-(((X=A.current)==null?void 0:X.x)??0)),y:Math.abs(Math.round(L.pageY)-(((F=A.current)==null?void 0:F.y)??0))}},K=L=>{W.x<=10&&W.y<=10?L.preventDefault():v.contains(L.target)||M(!1),document.removeEventListener("pointermove",q),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",K,{capture:!0})}}},[v,M,A]),S.useEffect(()=>{const W=()=>M(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[M]);const[O,$]=Au(W=>{const q=B().filter(X=>!X.disabled),K=q.find(X=>X.ref.current===document.activeElement),L=_u(q,W,K);L&&setTimeout(()=>L.ref.current.focus())}),Y=S.useCallback((W,q,K)=>{const L=!z.current&&!K;(f.value!==void 0&&f.value===q||L)&&(k(W),L&&(z.current=!0))},[f.value]),V=S.useCallback(()=>v==null?void 0:v.focus(),[v]),H=S.useCallback((W,q,K)=>{const L=!z.current&&!K;(f.value!==void 0&&f.value===q||L)&&N(W)},[f.value]),Z=r==="popper"?Wo:yu,G=Z===Wo?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:b,collisionPadding:y,sticky:C,hideWhenDetached:h,avoidCollisions:w}:{};return p.jsx(mu,{scope:n,content:v,viewport:g,onViewportChange:T,itemRefCallback:Y,selectedItem:D,onItemLeave:V,itemTextRefCallback:H,focusSelectedItem:j,selectedItemText:_,position:r,isPositioned:U,searchRef:O,children:p.jsx(Wr,{as:$b,allowPinchZoom:!0,children:p.jsx($r,{asChild:!0,trapped:f.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:ee(o,W=>{var q;(q=f.trigger)==null||q.focus({preventScroll:!0}),W.preventDefault()}),children:p.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:p.jsx(Z,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:W=>W.preventDefault(),...m,...G,onPlaced:()=>I(!0),ref:x,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ee(m.onKeyDown,W=>{const q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!q&&W.key.length===1&&$(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let L=B().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(W.key)&&(L=L.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const X=W.target,F=L.indexOf(X);L=L.slice(F+1)}setTimeout(()=>P(L)),W.preventDefault()}})})})})})})});vu.displayName=Lb;var Fb="SelectItemAlignedPosition",yu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=bt(Dt,n),i=wt(Dt,n),[a,c]=S.useState(null),[l,d]=S.useState(null),u=le(t,x=>d(x)),b=Kr(n),y=S.useRef(!1),C=S.useRef(!0),{viewport:h,selectedItem:w,selectedItemText:m,focusSelectedItem:f}=i,v=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&h&&w&&m){const x=s.trigger.getBoundingClientRect(),D=l.getBoundingClientRect(),k=s.valueNode.getBoundingClientRect(),_=m.getBoundingClientRect();if(s.dir!=="rtl"){const X=_.left-D.left,F=k.left-X,oe=x.left-F,de=x.width+oe,Se=Math.max(de,D.width),Ce=window.innerWidth-Ne,$e=ua(F,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.left=$e+"px"}else{const X=D.right-_.right,F=window.innerWidth-k.right-X,oe=window.innerWidth-x.right-F,de=x.width+oe,Se=Math.max(de,D.width),Ce=window.innerWidth-Ne,$e=ua(F,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.right=$e+"px"}const N=b(),B=window.innerHeight-Ne*2,U=h.scrollHeight,I=window.getComputedStyle(l),z=parseInt(I.borderTopWidth,10),P=parseInt(I.paddingTop,10),j=parseInt(I.borderBottomWidth,10),M=parseInt(I.paddingBottom,10),A=z+P+U+M+j,O=Math.min(w.offsetHeight*5,A),$=window.getComputedStyle(h),Y=parseInt($.paddingTop,10),V=parseInt($.paddingBottom,10),H=x.top+x.height/2-Ne,Z=B-H,G=w.offsetHeight/2,W=w.offsetTop+G,q=z+P+W,K=A-q;if(q<=H){const X=N.length>0&&w===N[N.length-1].ref.current;a.style.bottom="0px";const F=l.clientHeight-h.offsetTop-h.offsetHeight,oe=Math.max(Z,G+(X?V:0)+F+j),de=q+oe;a.style.height=de+"px"}else{const X=N.length>0&&w===N[0].ref.current;a.style.top="0px";const oe=Math.max(H,z+h.offsetTop+(X?Y:0)+G)+K;a.style.height=oe+"px",h.scrollTop=q-H+h.offsetTop}a.style.margin=`${Ne}px 0`,a.style.minHeight=O+"px",a.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[b,s.trigger,s.valueNode,a,l,h,w,m,s.dir,r]);ye(()=>v(),[v]);const[E,g]=S.useState();ye(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const T=S.useCallback(x=>{x&&C.current===!0&&(v(),f==null||f(),C.current=!1)},[v,f]);return p.jsx(Wb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:p.jsx(se.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});yu.displayName=Fb;var zb="SelectPopperPosition",Wo=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ne,...s}=e,i=Gr(n);return p.jsx(_r,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Wo.displayName=zb;var[Wb,$s]=Zt(Dt,{}),Bo="SelectViewport",bu=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=wt(Bo,n),i=$s(Bo,n),a=le(t,s.onViewportChange),c=S.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Ur.Slot,{scope:n,children:p.jsx(se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ee(o.onScroll,l=>{const d=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:b}=i;if(b!=null&&b.current&&u){const y=Math.abs(c.current-d.scrollTop);if(y>0){const C=window.innerHeight-Ne*2,h=parseFloat(u.style.minHeight),w=parseFloat(u.style.height),m=Math.max(h,w);if(m<C){const f=m+y,v=Math.min(C,f),E=f-v;u.style.height=v+"px",u.style.bottom==="0px"&&(d.scrollTop=E>0?E:0,u.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});bu.displayName=Bo;var wu="SelectGroup",[Bb,Hb]=Zt(wu),Vb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ft();return p.jsx(Bb,{scope:n,id:o,children:p.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Vb.displayName=wu;var xu="SelectLabel",Yb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hb(xu,n);return p.jsx(se.div,{id:o.id,...r,ref:t})});Yb.displayName=xu;var wr="SelectItem",[Ub,Su]=Zt(wr),Cu=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=bt(wr,n),c=wt(wr,n),l=a.value===r,[d,u]=S.useState(s??""),[b,y]=S.useState(!1),C=le(t,f=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,f,r,o)}),h=ft(),w=S.useRef("touch"),m=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Ub,{scope:n,value:r,disabled:o,textId:h,isSelected:l,onItemTextChange:S.useCallback(f=>{u(v=>v||((f==null?void 0:f.textContent)??"").trim())},[]),children:p.jsx(Ur.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:p.jsx(se.div,{role:"option","aria-labelledby":h,"data-highlighted":b?"":void 0,"aria-selected":l&&b,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:C,onFocus:ee(i.onFocus,()=>y(!0)),onBlur:ee(i.onBlur,()=>y(!1)),onClick:ee(i.onClick,()=>{w.current!=="mouse"&&m()}),onPointerUp:ee(i.onPointerUp,()=>{w.current==="mouse"&&m()}),onPointerDown:ee(i.onPointerDown,f=>{w.current=f.pointerType}),onPointerMove:ee(i.onPointerMove,f=>{var v;w.current=f.pointerType,o?(v=c.onItemLeave)==null||v.call(c):w.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,f=>{var v;f.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ee(i.onKeyDown,f=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&f.key===" "||(Pb.includes(f.key)&&m(),f.key===" "&&f.preventDefault())})})})})});Cu.displayName=wr;var fn="SelectItemText",Eu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=bt(fn,n),a=wt(fn,n),c=Su(fn,n),l=Nb(fn,n),[d,u]=S.useState(null),b=le(t,m=>u(m),c.onItemTextChange,m=>{var f;return(f=a.itemTextRefCallback)==null?void 0:f.call(a,m,c.value,c.disabled)}),y=d==null?void 0:d.textContent,C=S.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:h,onNativeOptionRemove:w}=l;return ye(()=>(h(C),()=>w(C)),[h,w,C]),p.jsxs(p.Fragment,{children:[p.jsx(se.span,{id:c.textId,...s,ref:b}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?xr.createPortal(s.children,i.valueNode):null]})});Eu.displayName=fn;var Du="SelectItemIndicator",Tu=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Su(Du,n).isSelected?p.jsx(se.span,{"aria-hidden":!0,...r,ref:t}):null});Tu.displayName=Du;var Ho="SelectScrollUpButton",Ru=S.forwardRef((e,t)=>{const n=wt(Ho,e.__scopeSelect),r=$s(Ho,e.__scopeSelect),[o,s]=S.useState(!1),i=le(t,r.onScrollButtonChange);return ye(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Ou,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Ru.displayName=Ho;var Vo="SelectScrollDownButton",Mu=S.forwardRef((e,t)=>{const n=wt(Vo,e.__scopeSelect),r=$s(Vo,e.__scopeSelect),[o,s]=S.useState(!1),i=le(t,r.onScrollButtonChange);return ye(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<l;s(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Ou,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Mu.displayName=Vo;var Ou=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=wt("SelectScrollButton",n),i=S.useRef(null),a=Kr(n),c=S.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),ye(()=>{var d;const l=a().find(u=>u.ref.current===document.activeElement);(d=l==null?void 0:l.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),p.jsx(se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ee(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ee(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ee(o.onPointerLeave,()=>{c()})})}),Kb="SelectSeparator",Gb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});Gb.displayName=Kb;var Yo="SelectArrow",qb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Gr(n),s=bt(Yo,n),i=wt(Yo,n);return s.open&&i.position==="popper"?p.jsx(Nr,{...o,...r,ref:t}):null});qb.displayName=Yo;function Pu(e){return e===""||e===void 0}var ku=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=S.useRef(null),s=le(t,o),i=Mb(n);return S.useEffect(()=>{const a=o.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&d){const u=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(u)}},[i,n]),p.jsx(hs,{asChild:!0,children:p.jsx("select",{...r,ref:s,defaultValue:n})})});ku.displayName="BubbleSelect";function Au(e){const t=_e(e),n=S.useRef(""),r=S.useRef(0),o=S.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function _u(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Xb(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Xb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Zb=cu,Jb=uu,Qb=fu,ew=pu,tw=hu,nw=gu,rw=bu,ow=Cu,sw=Eu,iw=Tu,aw=Ru,cw=Mu;function lw({...e}){return p.jsx(Zb,{"data-slot":"select",...e})}function uw({...e}){return p.jsx(Qb,{"data-slot":"select-value",...e})}function dw({className:e,size:t="default",children:n,...r}){return p.jsxs(Jb,{"data-slot":"select-trigger","data-size":t,className:ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,p.jsx(ew,{asChild:!0,children:p.jsx(ac,{className:"size-4 opacity-50"})})]})}function fw({className:e,children:t,position:n="popper",...r}){return p.jsx(tw,{children:p.jsxs(nw,{"data-slot":"select-content",className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(hw,{}),p.jsx(rw,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(gw,{})]})})}function pw({className:e,children:t,...n}){return p.jsxs(ow,{"data-slot":"select-item",className:ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(iw,{children:p.jsx(ic,{className:"size-4"})})}),p.jsx(sw,{children:t})]})}function hw({className:e,...t}){return p.jsx(aw,{"data-slot":"select-scroll-up-button",className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Vp,{className:"size-4"})})}function gw({className:e,...t}){return p.jsx(cw,{"data-slot":"select-scroll-down-button",className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(ac,{className:"size-4"})})}const mw=({options:e,onChange:t})=>p.jsxs(lw,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[p.jsx(dw,{className:"w-[180px]",children:p.jsx(uw,{placeholder:"view"})}),p.jsx(fw,{children:e.map(n=>p.jsx(pw,{value:n.text,children:n.text},n.text))})]}),vw=[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],yw=5,bw=0,ww=({side:e,xAxis:t,yAxis:n,updatePosition:r,children:o})=>{const{attributes:s,listeners:i,setNodeRef:a,transform:c,setActivatorNodeRef:l}=rs({id:"booking-info-id",data:{type:"booking-info-options"}}),d=Xt(b=>b.updateIsDragging),u={transform:`translate3d(${t+((c==null?void 0:c.x)||0)}px, ${n+((c==null?void 0:c.y)||0)}px, 0)`};return Dn({onDragStart(){d(!0)},onDragEnd(b){b.active.id&&r(c)}}),p.jsx(xb,{ref:a,updatePositionStrategy:"optimized",side:e,align:"start",sticky:"always",sideOffset:yw,alignOffset:bw,style:{...u,width:"25rem"},children:p.jsxs("div",{className:"grid gap-3",children:[p.jsx("input",{type:"text",style:{position:"absolute",opacity:0,height:0,width:0}}),p.jsxs("div",{className:"flex justify-end gap-1",children:[p.jsx("div",{ref:l,className:"w-full cursor-move",...s,...i}),p.jsx(Rb,{}),p.jsx(Ft,{type:"button",variant:"outline",size:"icon",children:p.jsx(Jp,{className:"h-3 w-3"})}),p.jsx(Ft,{type:"button",variant:"outline",size:"icon",onClick:()=>{},children:p.jsx(nh,{className:"h-3 w-3"})}),p.jsx(mw,{options:vw,onChange:()=>{}})]}),o]})})},da={xAxis:0,yAxis:0},Nu=({isEditingOpen:e,side:t,booking:n,onOpenChange:r,children:o})=>{const[s,i]=R.useState({...da}),a=Xt(y=>y.updateIsDragging),c=R.useMemo(()=>`${te.dateAndHourDateToString(n.startAt)} - ${te.dateAndHourDateToString(n.finishAt)}`,[n.startAt,n.finishAt]),l=R.useMemo(()=>{const y=new Date(n.startAt),C=y.getDate(),h=y.getDay(),w=It[y.getMonth()];return p.jsx("span",{children:`${ud[h]}, ${C} ${w}`})},[n.startAt]),d=()=>({backgroundColor:""}),u=y=>{y||console.info("No transform info to show "),i({xAxis:s.xAxis+((y==null?void 0:y.x)||0),yAxis:s.yAxis+((y==null?void 0:y.y)||0)})};Dn({onDragStart(y){const C=y.active.data.current,h=y.active.id,w=C.type==="booking-info-options";h&&w&&a(!0)}});const b=y=>{y===!1&&i({...da}),r(y)};return p.jsxs(bb,{open:e,onOpenChange:b,defaultOpen:!1,children:[p.jsx(Sb,{style:{width:"100%"},children:p.jsx(wb,{asChild:!0,children:o})}),p.jsx(ns,{children:p.jsx(ww,{side:t,xAxis:s.xAxis,yAxis:s.yAxis,updatePosition:u,children:p.jsxs("div",{className:"bookingCard_content",children:[p.jsx("span",{style:d(),className:"flex h-4 w-4 translate-y-0 rounded-sm"}),p.jsx("div",{className:"space-y-1",children:p.jsxs("p",{className:"text-sm text-muted-foreground",children:[l," | ",c]})})]})})})]})};Nu.displayName="BookingInfoOptions";const fa=600,xw=15,Sw=({booking:e,slotData:t,ref:n})=>{const{bookingViewType:r,optimisticCardUpdate:o}=Oe(),[s,i]=R.useState({...e}),[a,c]=R.useState(!1),l=R.useRef("left"),d=()=>{const m=t.day.split(":")[0].trim();if(r===ne.DAY)l.current="top";else switch(m){case"Mon":case"Sun":l.current="right";break;default:l.current="left";break}c(!0)},u=async m=>{try{i(f=>({...f,finishAt:m}))}catch(f){console.log(f)}},b=async m=>{o(s,m,s.finishAt,t),i(f=>({...f,startAt:m}))},y=async m=>{try{i(f=>({...f,finishAt:m}))}catch(f){console.log(f)}},{state:C,heightStyle:h,onResize:w}=Fs({booking:s,onAddTime:u,onAddStartTime:b,onSubTime:y,starter:!0});return R.useImperativeHandle(n,()=>({bookingId:e.id}),[e.id]),p.jsx(Nu,{booking:s,onOpenChange:c,side:r===ne.DAY?"top":"left",isEditingOpen:a,children:p.jsx(Is,{resizableParam:{state:C,onResize:w,resizeHandle:["s"]},customClasses:"Draggable",bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${h}rem`,onClick:d})})},Cw=.2,Fs=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=R.useState({height:fa,width:600}),[a,c]=R.useState(o?Math.round(te.timeDiffInSeconds(e.finishAt,e.startAt)/7.5):2),l=v=>v%8===0,d=v=>v>=18,u=v=>{const E=v>=8&&v<=10,g=v%2===0;return E&&l(v)&&g},b=async(v=["se","s"])=>{if(v.includes("n")){const E=C(e.startAt,"remove");n&&n(E)}else{const E=C(e.finishAt,"add");c(g=>{const T=Math.round(g)+2;return u(T)||d(T)?T+Cw:T}),t&&t(E)}},y=async()=>{const v=C(e.finishAt,"remove");te.timeDiffInSeconds(e.finishAt,e.startAt)!==xw&&(c(g=>(g>10,g-2)),r&&r(v))},C=(v,E)=>{const g=new Date(v),T=g.getMinutes();return E==="add"&&g.setMinutes(T+15),E==="remove"&&g.setMinutes(T-15),g};return{state:s,setState:i,resetState:()=>{i({height:fa,width:600})},resetHeightStyle:()=>{c(2)},heightStyle:a,onResize:(v,{size:E,handle:g})=>{switch(v.stopPropagation(),v.preventDefault(),g){case"se":case"s":{i(T=>(Number(T.height)<Number(E.height)&&b(),Number(T.height)>Number(E.height)&&y(),{...T,height:E.height,width:E.width}));break}case"n":{i(T=>(Number(E.height)>Number(T.height)&&b(["n"]),{...T,height:E.height,width:E.width}));break}}},updateHeightStyle:(v,E)=>{c(te.timeDiffInSeconds(v,E)/7.3)}}},Ew=({isDragging:e,slotData:t,events:{onClick:n,renderPreviewCard:r,resetPrevView:o}})=>{const{startAt:s}=Go(P=>P),[i,a]=R.useState(0),[c,l]=R.useState(te.addMinutesToHour(t.time,15)),[d,u]=R.useState(!1),b=R.useRef(null);R.useEffect(()=>{i!==0&&i>20&&(u(!0),r())},[i,r]);const y=R.useMemo(()=>te.convertStringTimeToDateFormat(s),[s]),C=R.useMemo(()=>te.convertStringTimeToDateFormat(c),[c]),h=R.useMemo(()=>({id:"",client:{id:"",profile:{id:"",name:""},createdAt:new Date,updatedAt:new Date},user:{id:"",profile:{id:"",name:""},roles:[],proLaborePercent:0,updatedAt:new Date,createdAt:new Date},procedures:[],payment:{type:"CREDIT_CARD",status:"PENDING",total:0},observation:"",startAt:y,finishAt:C,createdAt:new Date,updatedAt:new Date}),[C,y]),w=()=>{b.current||(b.current=setInterval(()=>{a(P=>P+1)},10))},m=R.useCallback(()=>{b.current&&(a(0),clearInterval(b.current),b.current=null)},[]),f=()=>{i<20?(n(),m(),U()):(m(),n(c),U())},v=async P=>{l(te.dateTimeAsString(P))},E=async P=>{l(te.dateTimeAsString(P))},{state:g,resetState:T,resetHeightStyle:x,heightStyle:D,onResize:k,updateHeightStyle:_}=Fs({booking:h,onAddTime:v,onSubTime:E});R.useEffect(()=>{_(C,y)},[C,y,_]);const N=()=>{U()},B=R.useCallback(()=>{l(te.addMinutesToHour(t.time,15))},[t.time]),U=R.useCallback(()=>{u(!1),T(),B(),x(),o()},[B,x,o,T]);R.useEffect(()=>()=>{m(),U()},[]);const I=Oe(P=>P.bookingViewType),z=d?{backgroundColor:"white",border:"none"}:{};return p.jsx("div",{style:{...z},className:ie("timeInfo_core",z),children:p.jsx(Gl.Resizable,{className:"slot-resizable",height:g.height,width:g.width,onResizeStart:w,onResizeStop:f,onResize:k,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:d?p.jsx("div",{className:"timeInfo_core_dragging",children:p.jsx(Is,{bookingInit:h,bookingViewType:I,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${D}rem`,resizableParam:{state:g,onResize:k,customClass:"show-handle"},events:{onUnmount:N}})}):p.jsx("div",{className:"timeInfo_core_timeParent",children:!e&&p.jsx("span",{className:"timeInfo_core_timeParent_time",children:t.time})})})})},Qn=({slotData:e,slotPosition:t,disabledCss:n,events:r,border:o,actualTimerIndicatorChildren:s,children:i,ref:a})=>{const{isDragging:c,updateIsDragging:l}=Xt(L=>L),d=dt(),{emptySlotNodes:u,setSelectedNode:b}=Ht(),{onModalClose:y,onSlotClick:C}=dt(),{startAt:h,finishAt:w,updateDate:m,updateStartAt:f,updateFinishAtWithOffset:v,resetForm:E}=Go(L=>L),g=Oe(L=>L.bookingViewType),T=R.useMemo(()=>te.convertStringTimeToDateFormat(h),[h]),x=R.useMemo(()=>te.convertStringTimeToDateFormat(w),[w]),D=R.useMemo(()=>{const L=te.convertStringTimeToDateFormat(w);return{id:"3",startAt:te.convertStringTimeToDateFormat(h),finishAt:L}},[w,h]),{updateHeightStyle:k,heightStyle:_}=Fs({booking:D}),[N,B]=R.useState(!1),[U,I]=R.useState(!1),[z,P]=R.useState(!1),[j,M]=R.useState(!1),A=R.useRef(null),O=R.useCallback(()=>{if(c||U)return;r.onMouseEnterEvent()===t&&P(!0)},[t,r,c,U]),$=L=>{E(),l(!1);const X=ar(e),F=u==null?void 0:u.get(X);F&&F.closeEvent(),y==null||y(),L==null||L.stopPropagation(),L==null||L.preventDefault(),I(!1)},Y=L=>{L||$(),B(L),P(L),I(L)},V=R.useCallback(L=>{if(c&&!L)return;l(!1);const{time:X,key:F}=e,oe=ar({key:F,time:X}),de=u==null?void 0:u.get(oe);b(oe),de&&de.showEvent(X),m(F);const $e=v(L||X,L?0:15);C({slotData:e,finishTime:$e}),I(!0)},[e,u,c,b,C,m,f,l,v]),H=()=>{c||U||P(!1)},Z=n.length||j?n:"hovering_slotTrigger_core",G=o?"slotTrigger_core_border":"",W=R.useCallback(()=>{const{time:L,key:X}=e;l(!0),M(!0),m(X),f(L),v(L)},[v,e,m,l,f]),q=()=>{I(!0)},K=R.useCallback(()=>{M(!1)},[]);return R.useEffect(()=>{k(x,T)},[x,T,k]),R.useEffect(()=>{N&&A!=null&&A.current&&A.current.scrollIntoView({behavior:"smooth",block:"center"})},[N]),R.useEffect(()=>{i||P(!1)},[i]),R.useImperativeHandle(a,()=>({showEvent:L=>{f(L),P(!1),I(!0),B(!0)},closeEvent:()=>{I(!1),B(!1),P(!1),K()},onOpenCloseChange:L=>{P(L),B(L),K()}})),p.jsxs(p.Fragment,{children:[p.jsxs("div",{ref:e.ref,style:e.style,className:ie("slotTrigger_core",g===ne.DAY&&"slotTrigger_core_day",G,Z),onMouseOver:O,onMouseLeave:H,onFocus:()=>{},children:[s,(!i&&z&&!N||j)&&p.jsx(Ew,{isDragging:c,slotData:e,events:{onClick:V,openOptions:q,renderPreviewCard:W,resetPrevView:K}}),N&&p.jsx("div",{style:{width:"100%"},children:p.jsx(Is,{ref:A,bookingInit:D,bookingViewType:g,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${_}rem`})}),i]},e.key),U&&p.jsx(ns,{children:p.jsx(ob,{onClose:$,onOpenChange:Y,buttonTrigger:p.jsx("div",{},e.key),side:g===ne.DAY?"top":"right",children:d.createBookingModal})})]})};var Dw="Separator",pa="horizontal",Tw=["horizontal","vertical"],Iu=S.forwardRef((e,t)=>{const{decorative:n,orientation:r=pa,...o}=e,s=Rw(r)?r:pa,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(se.div,{"data-orientation":s,...a,...o,ref:t})});Iu.displayName=Dw;function Rw(e){return Tw.includes(e)}var Mw=Iu;function xo({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(Mw,{"data-slot":"separator-root",decorative:n,orientation:t,className:ie("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}class Ow{constructor(){st(this,"positionBasedOnSeconds",(t,n,r)=>{const[o,s]=n.split(":");if(!n.length)return-3;const i=Number(s);return this.toggleTimeVisibility(t,o,i,r),this.normalizingMinutes(i)});st(this,"toggleTimeVisibility",(t,n,r,o)=>{const s=o.get(t);s&&this.isSameHour(n,t)&&(this.isInitialMinute(r)?s.setDisabledHour():s.setActivateHour())});st(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);st(this,"isInitialMinute",t=>t>=0&&t<=8);st(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class Pw{constructor(){st(this,"is15MinLess",t=>{const n=new Date,[r,o]=t.split(":"),s=new Date(n.getFullYear(),n.getMonth(),n.getDate(),Number(r),Number(o),0),i=new Date(n),a=te.roundMinutes(n.getMinutes());i.setHours(n.getHours(),a,0,0);const c=te.minuteDifference(s,i);return c>30||c<-30});st(this,"normalizeDateNow",t=>{const n=t.getHours(),r=te.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const er=({tailwindColor:e,isFirstDay:t,slotData:n})=>{const{timesRendered:r,bookingViewType:o}=Oe(),[s,i]=R.useState(!1),[a,c]=R.useState(""),l=R.useMemo(()=>{const w=new Date().getDay();return new Date(n.key).getDay()===w},[n.key]);R.useEffect(()=>{const h=n.time,w=new Pw,m=()=>{const v=new Date,E=w.normalizeDateNow(v),g=te.dateAndHourDateToString(v);c(g),i(E===h)};let f;return w.is15MinLess(h)||(f=setInterval(()=>m(),1e3)),()=>clearInterval(f)},[n.time]);const d=R.useMemo(()=>new Ow().positionBasedOnSeconds(n.time,a,r),[n.time,a,r]),u=R.useMemo(()=>t?o===ne.DAY?"w-[101%]":"w-[100vw]":o===ne.DAY?"w-[102%]":"w-[104%]",[t,o]);return s?p.jsx(p.Fragment,{children:l?p.jsx("div",{style:{top:`${d-2}px`},className:ie("absolute right-0 z-100",t?"left-[-18px] w-[102%]":"w-[104%] left-[-3px]",u),children:p.jsxs("div",{className:"relative",children:[p.jsx(xo,{style:{height:"4px"},className:e}),t&&p.jsx("div",{className:"absolute left-0 top-[-3px] cursor-pointer",children:p.jsx(xo,{orientation:"vertical",style:{height:"11px"},className:e})}),p.jsx(ha,{isRendered:t,dateToRender:a})]})}):p.jsxs("div",{style:{top:`${d-1}px`},className:ie("absolute right-0 z-100",t?"left-[-18px]":"left-[-9px]",u),children:[p.jsx(xo,{style:{height:"2px"},className:e}),p.jsx(ha,{isRendered:t,dateToRender:a})]})}):void 0},ha=({isRendered:e,dateToRender:t})=>{const n=e&&t;return p.jsx(p.Fragment,{children:n&&p.jsx("div",{className:"absolute left-[-42px] top-[-8px] z-50",children:p.jsx("span",{children:p.jsx("strong",{children:t})})})})},ga=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=Ht(),d=tr({bookings:e,blockTimeString:"00",slotData:a}),u=tr({bookings:e,blockTimeString:"15",slotData:a}),b=tr({bookings:e,blockTimeString:"30",slotData:a}),y=tr({bookings:e,blockTimeString:"45",slotData:a}),C=R.useCallback((h,w)=>{if(!h)return;const m=ar(w);l.get(m)||c(h,w)},[c,l]);return p.jsxs(p.Fragment,{children:[p.jsx(Qn,{ref:h=>C(h,{key:t.key,time:t.time}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",actualTimerIndicatorChildren:p.jsx(er,{tailwindColor:"bg-black",isFirstDay:i,slotData:t}),children:d}),p.jsx(Qn,{ref:h=>C(h,{key:n.key,time:n.time}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},border:!0,slotPosition:"second",actualTimerIndicatorChildren:p.jsx(er,{tailwindColor:"bg-black",isFirstDay:i,slotData:n}),children:u}),p.jsx(Qn,{ref:h=>C(h,{key:r.key,time:r.time}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",actualTimerIndicatorChildren:p.jsx(er,{tailwindColor:"bg-black",isFirstDay:i,slotData:r}),children:b}),p.jsx(Qn,{ref:h=>C(h,{key:o.key,time:o.time}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",actualTimerIndicatorChildren:p.jsx(er,{tailwindColor:"bg-black",isFirstDay:i,slotData:o}),children:y})]})},tr=({bookings:e,blockTimeString:t,slotData:n})=>R.useMemo(()=>{if(e!=null&&e.length&&(n!=null&&n.day)&&(n!=null&&n.hour)){const r=e.find(o=>te.dateAndHourDateToString(new Date(o.startAt)).split(":")[1]===t);if(r)return p.jsx(Sw,{booking:r,slotData:n})}return null},[t,e,n]),kw=({dayHour:e,lunchTimeBlock:t,firstDay:n,bookingBulk:r,bookingViewType:o})=>{const s=R.useRef(""),i=x=>x===t.startAt||x===t.finishAt?(s.current="slot_disabled",!0):!1,a=te.addMinuteToHour(e.hour,15),c=te.addMinuteToHour(e.hour,30),l=te.addMinuteToHour(e.hour,45),{isOver:d,setNodeRef:u}=zn({id:`${te.newDateKey(e.day,e.hour)}`,data:{accepts:["booking-slots"]},disabled:i(e.hour)}),{isOver:b,setNodeRef:y}=zn({id:`${te.newDateKey(e.day,a)}`,data:{accepts:["booking-slots"]},disabled:i(a)}),{isOver:C,setNodeRef:h}=zn({id:`${te.newDateKey(e.day,c)}`,data:{accepts:["booking-slots"]},disabled:i(c)}),{isOver:w,setNodeRef:m}=zn({id:`${te.newDateKey(e.day,l)}`,data:{accepts:["booking-slots"]},disabled:i(l)}),f=R.useMemo(()=>({ref:u,style:{backgroundColor:d?"#0066ff":""},key:te.newDateKey(e.day,e.hour),time:e.hour}),[e.day,e.hour,d,u]),v=R.useMemo(()=>({ref:y,style:{backgroundColor:b?"#0066ff":""},key:te.newDateKey(e.day,a),time:a}),[e.day,b,a,y]),E=R.useMemo(()=>({ref:h,style:{backgroundColor:C?"#0066ff":""},key:te.newDateKey(e.day,c),time:c}),[e.day,C,h,c]),g=R.useMemo(()=>({ref:m,style:{backgroundColor:w?"#0066ff":""},key:te.newDateKey(e.day,l),time:l}),[e.day,l,w,m]),T=R.useMemo(()=>{const{day:x,hour:D}=e,k=r.filter(_=>{const N=te.dateAndHourDateToString(_.startAt),B=new Date(_.startAt).getDate(),U=new Date(x).getDate(),I=D.split(":")[0];return N.split(":")[0]===I&&B===U});return k.length?p.jsx(ga,{dayHour:e,bookings:k,first:f,second:v,third:E,fourth:g,disabledCss:s.current,firstDay:n}):p.jsx(ga,{first:f,second:v,third:E,fourth:g,disabledCss:s.current,firstDay:n})},[r,e,n,f,g,v,E]);return p.jsx("td",{className:ie("slot",o===ne.WEEK&&"slotWeek"),children:T},`${e.day}-${e.hour}-slot`)};function Aw({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full z-10 overflow-hidden",children:p.jsx("table",{"data-slot":"table",className:ie("w-full caption-bottom text-sm",e),...t})})}function _w({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:ie("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const Nw=({hour:e,ref:t})=>{const n="Set lunch interval",r="Remove lunch interval",o="Hour options",s=R.useRef(null),i=()=>{s!=null&&s.current&&s.current.setAttribute("class","disableVisibilityTime")},a="border-solid hover:border-b-2 hover:border-b-purple-600 border-b-white",c=()=>{s!=null&&s.current&&s.current.setAttribute("class",ie("activateVisibilityTime",a))};return R.useImperativeHandle(t,()=>({setDisabledHour:i,setActivateHour:c})),p.jsxs(Ps,{children:[p.jsx(ks,{children:p.jsx("span",{ref:s,className:ie(a),children:e})}),p.jsxs(As,{children:[p.jsx(ky,{children:o}),p.jsx(Ay,{}),p.jsx($i,{children:n}),p.jsx($i,{children:r})]})]})},Iw=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=Oe(),{selectedNode:s,emptySlotNodes:i}=Ht(),{finishAt:a,updateFinishAtWithOffset:c}=Go(h=>h),[l]=R.useState({startAt:"12:00",finishAt:"12:30"}),d=R.useCallback((h,w)=>{h&&o(h,w)},[o]),u=R.useMemo(()=>n===ne.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),b=R.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]),y=()=>s.split(";")[1];return R.useEffect(()=>{if(s){const h=i.get(s);h==null||h.showEvent(y())}},[s,i]),R.useEffect(()=>{y()===a&&c(y())},[s,a]),R.useMemo(()=>{const h=w=>w===0;return p.jsx("div",{className:ie("calendarCore",n===ne.WEEK&&"calendarCore_max"),children:p.jsx(Aw,{children:p.jsx("tbody",{children:e.map(w=>p.jsxs("tr",{children:[p.jsx(_w,{style:{...b,...u,padding:0,position:"relative"},className:"calendarCore_cell",children:p.jsx("div",{className:"calendarCore_actions",children:p.jsx(Nw,{ref:m=>d(m,w),hour:w})})},`${w}-hour`),t.map((m,f)=>p.jsx(kw,{dayHour:{day:String(m),hour:w},lunchTimeBlock:l,firstDay:h(f),bookingBulk:r.booking,bookingViewType:n},`${m}-${w}-slot-content`))]},`${w}-content`))})})})},[u,e,l,b,r,d,n,t])},jw=({bookingViewType:e})=>{const{resetSelectedNode:t,resetNodes:n}=Ht(o=>o);return R.useEffect(()=>{(e===ne.DAY||e===ne.WEEK)&&(t(),n())},[e,n,t]),R.useMemo(()=>{switch(e){case ne.DAY:case ne.WEEK:return p.jsx(Iw,{});default:return null}},[e])},Lw={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},$w=()=>{const{bookings:e}=dt(),t={distance:10},{setBookingBulkData:n,optimisticCardUpdate:r}=Oe(),{onCardDropCallback:o}=dt(),s=_d(Js(za,{activationConstraint:t}),Js(Wa,{activationConstraint:t})),{bookingViewType:i,daysOfWeek:a}=Oe(),c=R.useCallback(C=>{const{active:h}=C;h.id},[]),l=(C,h)=>{const w=Number(new Date(h))-Number(new Date(C)),m=Math.floor(w/1e3/60),f=Math.floor(m/60),v=m%60;return`${f}:${v.toString().padStart(2,"0")}`},d=(C,h)=>{const w=new Date(C),m=h.split(":"),f=Number(m[0]),v=Number(m[1]);return w.setHours(w.getHours()+f),w.setMinutes(w.getMinutes()+v),w},u=(C,h)=>{const w=new Date(h),m=l(C.startAt,C.finishAt),f=d(h,m);return{newStartAt:w,newFinishDate:f}},b=async(C,h,w)=>{try{const{newStartAt:m,newFinishDate:f}=u(C,h);r(C,m,f,w),await o(C,h,w)}catch(m){console.warn(m)}},y=C=>{const{over:h,active:w}=C;if(h&&w){const m=h.data.current,f=w.data.current;f&&m&&m.accepts.includes(f.type)&&f.booking.id&&h.id&&b(f.booking,String(h.id),f.slotData)}};return R.useEffect(()=>{n({user:Lw,booking:e})},[e,n]),p.jsx("div",{className:"calendarHolder",children:p.jsx(Ju,{...wa,children:p.jsxs("div",{className:"calendarHolder_parent",children:[p.jsx(Ly,{}),p.jsxs("div",{className:"calendarHolder_parent_content",children:[p.jsx(Rp,{daysOfWeek:a,bookingViewType:i}),p.jsx(ns,{onDragEnd:y,onDragStart:c,sensors:s,children:p.jsx(jw,{bookingViewType:i})})]})]})})})},Fw=({viewModes:e,createBookingModal:t,onChangeViewType:n,onCardDropCallback:r,onDayChange:o,onHeaderDayClick:s,onTodayClick:i,onSlotClick:a,onModalClose:c,bookings:l,ref:d})=>{const u=R.useRef(null),{setBookingViewType:b,setWeekAndViewType:y,setTodayDayAndViewType:C,bookingViewType:h}=Oe(),{setSelectedNode:w}=Ht(f=>f),m=f=>{var v;(v=u==null?void 0:u.current)==null||v.updateFinishAt(f)};return R.useImperativeHandle(d,()=>({updateViewType:f=>b(f),updateWeekAndViewType:f=>y(f),updateTodayDayAndViewType:f=>C(f),updateSelectedNode:f=>w(f),updateFinishAt:f=>m(f)})),R.useEffect(()=>{n(h)},[h]),p.jsx(qu,{...va,children:p.jsx(Xu,{createBookingModal:t,viewModes:e,onHeaderDayClick:s,onTodayClick:i,onCardDropCallback:r,onDayChange:o,onSlotClick:a,onModalClose:c,bookings:l,children:p.jsx(fd,{ref:u,...Eo,children:p.jsx($w,{})})})})},zw=e=>{const t=R.useRef(null);return{getCalendar:()=>p.jsx(Fw,{ref:t,...e}),updateViewType:c=>{if(!(t!=null&&t.current))throw new nn;t.current.updateViewType(c)},updateWeekAndViewType:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateWeekAndViewType(c)},updateTodayDayAndViewType:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateTodayDayAndViewType(c)},updateSelectedNode:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateSelectedNode(c)},updateFinishAt:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateFinishAt(c)}}};exports.useCalendarInstance=zw;
161
+ `,w.getElementsByTagName("head")[0].appendChild(D)),w.body&&v(w.body,"react-draggable-transparent-selection")}function E(w){if(w)try{if(w.body&&T(w.body,"react-draggable-transparent-selection"),w.selection)w.selection.empty();else{const D=(w.defaultView||window).getSelection();D&&D.type!=="Caret"&&D.removeAllRanges()}}catch{}}function v(w,D){w.classList?w.classList.add(D):w.className.match(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)")))||(w.className+=" ".concat(D))}function T(w,D){w.classList?w.classList.remove(D):w.className=w.className.replace(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)"),"g"),"")}return fe}var ze={},na;function Yl(){if(na)return ze;na=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.canDragX=o,ze.canDragY=s,ze.createCoreData=a,ze.createDraggableData=c,ze.getBoundPosition=n,ze.getControlPosition=i,ze.snapToGrid=r;var e=Ur(),t=Is();function n(u,b,y){if(!u.props.bounds)return[b,y];let{bounds:C}=u.props;C=typeof C=="string"?C:l(C);const p=f(u);if(typeof C=="string"){const{ownerDocument:x}=p,g=x.defaultView;let d;if(C==="parent"?d=p.parentNode:d=x.querySelector(C),!(d instanceof g.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const m=d,E=g.getComputedStyle(p),v=g.getComputedStyle(m);C={left:-p.offsetLeft+(0,e.int)(v.paddingLeft)+(0,e.int)(E.marginLeft),top:-p.offsetTop+(0,e.int)(v.paddingTop)+(0,e.int)(E.marginTop),right:(0,t.innerWidth)(m)-(0,t.outerWidth)(p)-p.offsetLeft+(0,e.int)(v.paddingRight)-(0,e.int)(E.marginRight),bottom:(0,t.innerHeight)(m)-(0,t.outerHeight)(p)-p.offsetTop+(0,e.int)(v.paddingBottom)-(0,e.int)(E.marginBottom)}}return(0,e.isNum)(C.right)&&(b=Math.min(b,C.right)),(0,e.isNum)(C.bottom)&&(y=Math.min(y,C.bottom)),(0,e.isNum)(C.left)&&(b=Math.max(b,C.left)),(0,e.isNum)(C.top)&&(y=Math.max(y,C.top)),[b,y]}function r(u,b,y){const C=Math.round(b/u[0])*u[0],p=Math.round(y/u[1])*u[1];return[C,p]}function o(u){return u.props.axis==="both"||u.props.axis==="x"}function s(u){return u.props.axis==="both"||u.props.axis==="y"}function i(u,b,y){const C=typeof b=="number"?(0,t.getTouch)(u,b):null;if(typeof b=="number"&&!C)return null;const p=f(y),x=y.props.offsetParent||p.offsetParent||p.ownerDocument.body;return(0,t.offsetXYFromParent)(C||u,x,y.props.scale)}function a(u,b,y){const C=!(0,e.isNum)(u.lastX),p=f(u);return C?{node:p,deltaX:0,deltaY:0,lastX:b,lastY:y,x:b,y}:{node:p,deltaX:b-u.lastX,deltaY:y-u.lastY,lastX:u.lastX,lastY:u.lastY,x:b,y}}function c(u,b){const y=u.props.scale;return{node:b.node,x:u.state.x+b.deltaX/y,y:u.state.y+b.deltaY/y,deltaX:b.deltaX/y,deltaY:b.deltaY/y,lastX:u.state.x,lastY:u.state.y}}function l(u){return{left:u.left,top:u.top,right:u.right,bottom:u.bottom}}function f(u){const b=u.findDOMNode();if(!b)throw new Error("<DraggableCore>: Unmounted during event!");return b}return ze}var cn={},Zn={},ra;function Ul(){if(ra)return Zn;ra=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.default=e;function e(){}return Zn}var oa;function Jy(){if(oa)return cn;oa=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=void 0;var e=l(R),t=a(Yr()),n=a(Ke),r=Is(),o=Yl(),s=Ur(),i=a(Ul());function a(x){return x&&x.__esModule?x:{default:x}}function c(x){if(typeof WeakMap!="function")return null;var g=new WeakMap,d=new WeakMap;return(c=function(m){return m?d:g})(x)}function l(x,g){if(x&&x.__esModule)return x;if(x===null||typeof x!="object"&&typeof x!="function")return{default:x};var d=c(g);if(d&&d.has(x))return d.get(x);var m={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in x)if(v!=="default"&&Object.prototype.hasOwnProperty.call(x,v)){var T=E?Object.getOwnPropertyDescriptor(x,v):null;T&&(T.get||T.set)?Object.defineProperty(m,v,T):m[v]=x[v]}return m.default=x,d&&d.set(x,m),m}function f(x,g,d){return g=u(g),g in x?Object.defineProperty(x,g,{value:d,enumerable:!0,configurable:!0,writable:!0}):x[g]=d,x}function u(x){var g=b(x,"string");return typeof g=="symbol"?g:String(g)}function b(x,g){if(typeof x!="object"||x===null)return x;var d=x[Symbol.toPrimitive];if(d!==void 0){var m=d.call(x,g);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(x)}const y={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=y.mouse,p=class extends e.Component{constructor(){super(...arguments),f(this,"dragging",!1),f(this,"lastX",NaN),f(this,"lastY",NaN),f(this,"touchIdentifier",null),f(this,"mounted",!1),f(this,"handleDragStart",g=>{if(this.props.onMouseDown(g),!this.props.allowAnyClick&&typeof g.button=="number"&&g.button!==0)return!1;const d=this.findDOMNode();if(!d||!d.ownerDocument||!d.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:m}=d;if(this.props.disabled||!(g.target instanceof m.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(g.target,this.props.handle,d)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(g.target,this.props.cancel,d))return;g.type==="touchstart"&&g.preventDefault();const E=(0,r.getTouchIdentifier)(g);this.touchIdentifier=E;const v=(0,o.getControlPosition)(g,E,this);if(v==null)return;const{x:T,y:w}=v,D=(0,o.createCoreData)(this,T,w);(0,i.default)("DraggableCore: handleDragStart: %j",D),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(g,D)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(m),this.dragging=!0,this.lastX=T,this.lastY=w,(0,r.addEvent)(m,C.move,this.handleDrag),(0,r.addEvent)(m,C.stop,this.handleDragStop))}),f(this,"handleDrag",g=>{const d=(0,o.getControlPosition)(g,this.touchIdentifier,this);if(d==null)return;let{x:m,y:E}=d;if(Array.isArray(this.props.grid)){let w=m-this.lastX,D=E-this.lastY;if([w,D]=(0,o.snapToGrid)(this.props.grid,w,D),!w&&!D)return;m=this.lastX+w,E=this.lastY+D}const v=(0,o.createCoreData)(this,m,E);if((0,i.default)("DraggableCore: handleDrag: %j",v),this.props.onDrag(g,v)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const D=document.createEvent("MouseEvents");D.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(D)}return}this.lastX=m,this.lastY=E}),f(this,"handleDragStop",g=>{if(!this.dragging)return;const d=(0,o.getControlPosition)(g,this.touchIdentifier,this);if(d==null)return;let{x:m,y:E}=d;if(Array.isArray(this.props.grid)){let D=m-this.lastX||0,P=E-this.lastY||0;[D,P]=(0,o.snapToGrid)(this.props.grid,D,P),m=this.lastX+D,E=this.lastY+P}const v=(0,o.createCoreData)(this,m,E);if(this.props.onStop(g,v)===!1||this.mounted===!1)return!1;const w=this.findDOMNode();w&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(w.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",v),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,w&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(w.ownerDocument,C.move,this.handleDrag),(0,r.removeEvent)(w.ownerDocument,C.stop,this.handleDragStop))}),f(this,"onMouseDown",g=>(C=y.mouse,this.handleDragStart(g))),f(this,"onMouseUp",g=>(C=y.mouse,this.handleDragStop(g))),f(this,"onTouchStart",g=>(C=y.touch,this.handleDragStart(g))),f(this,"onTouchEnd",g=>(C=y.touch,this.handleDragStop(g)))}componentDidMount(){this.mounted=!0;const g=this.findDOMNode();g&&(0,r.addEvent)(g,y.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const g=this.findDOMNode();if(g){const{ownerDocument:d}=g;(0,r.removeEvent)(d,y.mouse.move,this.handleDrag),(0,r.removeEvent)(d,y.touch.move,this.handleDrag),(0,r.removeEvent)(d,y.mouse.stop,this.handleDragStop),(0,r.removeEvent)(d,y.touch.stop,this.handleDragStop),(0,r.removeEvent)(g,y.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(d)}}findDOMNode(){var g,d;return(g=this.props)!==null&&g!==void 0&&g.nodeRef?(d=this.props)===null||d===void 0||(d=d.nodeRef)===null||d===void 0?void 0:d.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return cn.default=p,f(p,"displayName","DraggableCore"),f(p,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(x,g){if(x[g]&&x[g].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),f(p,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),cn}var sa;function Qy(){return sa||(sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=b(R),n=f(Yr()),r=f(Ke),o=f(Xy),s=Is(),i=Yl(),a=Ur(),c=f(Jy()),l=f(Ul());function f(d){return d&&d.__esModule?d:{default:d}}function u(d){if(typeof WeakMap!="function")return null;var m=new WeakMap,E=new WeakMap;return(u=function(v){return v?E:m})(d)}function b(d,m){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var E=u(m);if(E&&E.has(d))return E.get(d);var v={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in d)if(w!=="default"&&Object.prototype.hasOwnProperty.call(d,w)){var D=T?Object.getOwnPropertyDescriptor(d,w):null;D&&(D.get||D.set)?Object.defineProperty(v,w,D):v[w]=d[w]}return v.default=d,E&&E.set(d,v),v}function y(){return y=Object.assign?Object.assign.bind():function(d){for(var m=1;m<arguments.length;m++){var E=arguments[m];for(var v in E)Object.prototype.hasOwnProperty.call(E,v)&&(d[v]=E[v])}return d},y.apply(this,arguments)}function C(d,m,E){return m=p(m),m in d?Object.defineProperty(d,m,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[m]=E,d}function p(d){var m=x(d,"string");return typeof m=="symbol"?m:String(m)}function x(d,m){if(typeof d!="object"||d===null)return d;var E=d[Symbol.toPrimitive];if(E!==void 0){var v=E.call(d,m);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(d)}class g extends t.Component{static getDerivedStateFromProps(m,E){let{position:v}=m,{prevPropsPosition:T}=E;return v&&(!T||v.x!==T.x||v.y!==T.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:v,prevPropsPosition:T}),{x:v.x,y:v.y,prevPropsPosition:{...v}}):null}constructor(m){super(m),C(this,"onDragStart",(E,v)=>{if((0,l.default)("Draggable: onDragStart: %j",v),this.props.onStart(E,(0,i.createDraggableData)(this,v))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(E,v)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",v);const T=(0,i.createDraggableData)(this,v),w={x:T.x,y:T.y,slackX:0,slackY:0};if(this.props.bounds){const{x:P,y:_}=w;w.x+=this.state.slackX,w.y+=this.state.slackY;const[I,H]=(0,i.getBoundPosition)(this,w.x,w.y);w.x=I,w.y=H,w.slackX=this.state.slackX+(P-w.x),w.slackY=this.state.slackY+(_-w.y),T.x=w.x,T.y=w.y,T.deltaX=w.x-this.state.x,T.deltaY=w.y-this.state.y}if(this.props.onDrag(E,T)===!1)return!1;this.setState(w)}),C(this,"onDragStop",(E,v)=>{if(!this.state.dragging||this.props.onStop(E,(0,i.createDraggableData)(this,v))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",v);const w={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:P,y:_}=this.props.position;w.x=P,w.y=_}this.setState(w)}),this.state={dragging:!1,dragged:!1,x:m.position?m.position.x:m.defaultPosition.x,y:m.position?m.position.y:m.defaultPosition.y,prevPropsPosition:{...m.position},slackX:0,slackY:0,isElementSVG:!1},m.position&&!(m.onDrag||m.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var m,E;return(m=(E=this.props)===null||E===void 0||(E=E.nodeRef)===null||E===void 0?void 0:E.current)!==null&&m!==void 0?m:r.default.findDOMNode(this)}render(){const{axis:m,bounds:E,children:v,defaultPosition:T,defaultClassName:w,defaultClassNameDragging:D,defaultClassNameDragged:P,position:_,positionOffset:I,scale:H,...K}=this.props;let j={},F=null;const N=!!!_||this.state.dragging,M=_||T,A={x:(0,i.canDragX)(this)&&N?this.state.x:M.x,y:(0,i.canDragY)(this)&&N?this.state.y:M.y};this.state.isElementSVG?F=(0,s.createSVGTransform)(A,I):j=(0,s.createCSSTransform)(A,I);const O=(0,o.default)(v.props.className||"",w,{[D]:this.state.dragging,[P]:this.state.dragged});return t.createElement(c.default,y({},K,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(v),{className:O,style:{...v.props.style,...j},transform:F}))}}e.default=g,C(g,"displayName","Draggable"),C(g,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),C(g,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(go)),go}var ia;function Kl(){if(ia)return an.exports;ia=1;const{default:e,DraggableCore:t}=Qy();return an.exports=e,an.exports.default=e,an.exports.DraggableCore=t,an.exports}var Jn={},aa;function eb(){if(aa)return Jn;aa=1,Jn.__esModule=!0,Jn.cloneElement=a;var e=t(R);function t(c){return c&&c.__esModule?c:{default:c}}function n(c,l){var f=Object.keys(c);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(c);l&&(u=u.filter(function(b){return Object.getOwnPropertyDescriptor(c,b).enumerable})),f.push.apply(f,u)}return f}function r(c){for(var l=1;l<arguments.length;l++){var f=arguments[l]!=null?arguments[l]:{};l%2?n(Object(f),!0).forEach(function(u){o(c,u,f[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(u){Object.defineProperty(c,u,Object.getOwnPropertyDescriptor(f,u))})}return c}function o(c,l,f){return l=s(l),l in c?Object.defineProperty(c,l,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[l]=f,c}function s(c){var l=i(c,"string");return typeof l=="symbol"?l:String(l)}function i(c,l){if(typeof c!="object"||c===null)return c;var f=c[Symbol.toPrimitive];if(f!==void 0){var u=f.call(c,l);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(c)}function a(c,l){return l.style&&c.props.style&&(l.style=r(r({},c.props.style),l.style)),l.className&&c.props.className&&(l.className=c.props.className+" "+l.className),e.default.cloneElement(c,l)}return Jn}var ln={},ca;function Gl(){if(ca)return ln;ca=1,ln.__esModule=!0,ln.resizableProps=void 0;var e=t(Yr());Kl();function t(r){return r&&r.__esModule?r:{default:r}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="y"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="x"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)}};return ln.resizableProps=n,ln}var la;function ql(){if(la)return sn;la=1,sn.__esModule=!0,sn.default=void 0;var e=i(R),t=Kl(),n=eb(),r=Gl(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(g){if(typeof WeakMap!="function")return null;var d=new WeakMap,m=new WeakMap;return(s=function(v){return v?m:d})(g)}function i(g,d){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var m=s(d);if(m&&m.has(g))return m.get(g);var E={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in g)if(T!=="default"&&Object.prototype.hasOwnProperty.call(g,T)){var w=v?Object.getOwnPropertyDescriptor(g,T):null;w&&(w.get||w.set)?Object.defineProperty(E,T,w):E[T]=g[T]}return E.default=g,m&&m.set(g,E),E}function a(){return a=Object.assign?Object.assign.bind():function(g){for(var d=1;d<arguments.length;d++){var m=arguments[d];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(g[E]=m[E])}return g},a.apply(this,arguments)}function c(g,d){if(g==null)return{};var m={},E=Object.keys(g),v,T;for(T=0;T<E.length;T++)v=E[T],!(d.indexOf(v)>=0)&&(m[v]=g[v]);return m}function l(g,d){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);d&&(E=E.filter(function(v){return Object.getOwnPropertyDescriptor(g,v).enumerable})),m.push.apply(m,E)}return m}function f(g){for(var d=1;d<arguments.length;d++){var m=arguments[d]!=null?arguments[d]:{};d%2?l(Object(m),!0).forEach(function(E){u(g,E,m[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):l(Object(m)).forEach(function(E){Object.defineProperty(g,E,Object.getOwnPropertyDescriptor(m,E))})}return g}function u(g,d,m){return d=b(d),d in g?Object.defineProperty(g,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[d]=m,g}function b(g){var d=y(g,"string");return typeof d=="symbol"?d:String(d)}function y(g,d){if(typeof g!="object"||g===null)return g;var m=g[Symbol.toPrimitive];if(m!==void 0){var E=m.call(g,d);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(g)}function C(g,d){g.prototype=Object.create(d.prototype),g.prototype.constructor=g,p(g,d)}function p(g,d){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,v){return E.__proto__=v,E},p(g,d)}var x=function(g){C(d,g);function d(){for(var E,v=arguments.length,T=new Array(v),w=0;w<v;w++)T[w]=arguments[w];return E=g.call.apply(g,[this].concat(T))||this,E.handleRefs={},E.lastHandleRect=null,E.slack=null,E}var m=d.prototype;return m.componentWillUnmount=function(){this.resetData()},m.resetData=function(){this.lastHandleRect=this.slack=null},m.runConstraints=function(v,T){var w=this.props,D=w.minConstraints,P=w.maxConstraints,_=w.lockAspectRatio;if(!D&&!P&&!_)return[v,T];if(_){var I=this.props.width/this.props.height,H=v-this.props.width,K=T-this.props.height;Math.abs(H)>Math.abs(K*I)?T=v/I:v=T*I}var j=v,F=T,k=this.slack||[0,0],N=k[0],M=k[1];return v+=N,T+=M,D&&(v=Math.max(D[0],v),T=Math.max(D[1],T)),P&&(v=Math.min(P[0],v),T=Math.min(P[1],T)),this.slack=[N+(j-v),M+(F-T)],[v,T]},m.resizeHandler=function(v,T){var w=this;return function(D,P){var _=P.node,I=P.deltaX,H=P.deltaY;v==="onResizeStart"&&w.resetData();var K=(w.props.axis==="both"||w.props.axis==="x")&&T!=="n"&&T!=="s",j=(w.props.axis==="both"||w.props.axis==="y")&&T!=="e"&&T!=="w";if(!(!K&&!j)){var F=T[0],k=T[T.length-1],N=_.getBoundingClientRect();if(w.lastHandleRect!=null){if(k==="w"){var M=N.left-w.lastHandleRect.left;I+=M}if(F==="n"){var A=N.top-w.lastHandleRect.top;H+=A}}w.lastHandleRect=N,k==="w"&&(I=-I),F==="n"&&(H=-H);var O=w.props.width+(K?I/w.props.transformScale:0),L=w.props.height+(j?H/w.props.transformScale:0),U=w.runConstraints(O,L);O=U[0],L=U[1];var Y=O!==w.props.width||L!==w.props.height,V=typeof w.props[v]=="function"?w.props[v]:null,X=v==="onResize"&&!Y;V&&!X&&(D.persist==null||D.persist(),V(D,{node:_,size:{width:O,height:L},handle:T})),v==="onResizeStop"&&w.resetData()}}},m.renderResizeHandle=function(v,T){var w=this.props.handle;if(!w)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+v,ref:T});if(typeof w=="function")return w(v,T);var D=typeof w.type=="string",P=f({ref:T},D?{}:{handleAxis:v});return e.cloneElement(w,P)},m.render=function(){var v=this,T=this.props,w=T.children,D=T.className,P=T.draggableOpts;T.width,T.height,T.handle,T.handleSize,T.lockAspectRatio,T.axis,T.minConstraints,T.maxConstraints,T.onResize,T.onResizeStop,T.onResizeStart;var _=T.resizeHandles;T.transformScale;var I=c(T,o);return(0,n.cloneElement)(w,f(f({},I),{},{className:(D?D+" ":"")+"react-resizable",children:[].concat(w.props.children,_.map(function(H){var K,j=(K=v.handleRefs[H])!=null?K:v.handleRefs[H]=e.createRef();return e.createElement(t.DraggableCore,a({},P,{nodeRef:j,key:"resizableHandle-"+H,onStop:v.resizeHandler("onResizeStop",H),onStart:v.resizeHandler("onResizeStart",H),onDrag:v.resizeHandler("onResize",H)}),v.renderResizeHandle(H,j))}))}))},d}(e.Component);return sn.default=x,x.propTypes=r.resizableProps,x.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},sn}var un={},ua;function tb(){if(ua)return un;ua=1,un.__esModule=!0,un.default=void 0;var e=a(R),t=s(Yr()),n=s(ql()),r=Gl(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function s(d){return d&&d.__esModule?d:{default:d}}function i(d){if(typeof WeakMap!="function")return null;var m=new WeakMap,E=new WeakMap;return(i=function(T){return T?E:m})(d)}function a(d,m){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var E=i(m);if(E&&E.has(d))return E.get(d);var v={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in d)if(w!=="default"&&Object.prototype.hasOwnProperty.call(d,w)){var D=T?Object.getOwnPropertyDescriptor(d,w):null;D&&(D.get||D.set)?Object.defineProperty(v,w,D):v[w]=d[w]}return v.default=d,E&&E.set(d,v),v}function c(){return c=Object.assign?Object.assign.bind():function(d){for(var m=1;m<arguments.length;m++){var E=arguments[m];for(var v in E)Object.prototype.hasOwnProperty.call(E,v)&&(d[v]=E[v])}return d},c.apply(this,arguments)}function l(d,m){var E=Object.keys(d);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(d);m&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(d,T).enumerable})),E.push.apply(E,v)}return E}function f(d){for(var m=1;m<arguments.length;m++){var E=arguments[m]!=null?arguments[m]:{};m%2?l(Object(E),!0).forEach(function(v){u(d,v,E[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(E)):l(Object(E)).forEach(function(v){Object.defineProperty(d,v,Object.getOwnPropertyDescriptor(E,v))})}return d}function u(d,m,E){return m=b(m),m in d?Object.defineProperty(d,m,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[m]=E,d}function b(d){var m=y(d,"string");return typeof m=="symbol"?m:String(m)}function y(d,m){if(typeof d!="object"||d===null)return d;var E=d[Symbol.toPrimitive];if(E!==void 0){var v=E.call(d,m);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(d)}function C(d,m){if(d==null)return{};var E={},v=Object.keys(d),T,w;for(w=0;w<v.length;w++)T=v[w],!(m.indexOf(T)>=0)&&(E[T]=d[T]);return E}function p(d,m){d.prototype=Object.create(m.prototype),d.prototype.constructor=d,x(d,m)}function x(d,m){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,T){return v.__proto__=T,v},x(d,m)}var g=function(d){p(m,d);function m(){for(var v,T=arguments.length,w=new Array(T),D=0;D<T;D++)w[D]=arguments[D];return v=d.call.apply(d,[this].concat(w))||this,v.state={width:v.props.width,height:v.props.height,propsWidth:v.props.width,propsHeight:v.props.height},v.onResize=function(P,_){var I=_.size;v.props.onResize?(P.persist==null||P.persist(),v.setState(I,function(){return v.props.onResize&&v.props.onResize(P,_)})):v.setState(I)},v}m.getDerivedStateFromProps=function(T,w){return w.propsWidth!==T.width||w.propsHeight!==T.height?{width:T.width,height:T.height,propsWidth:T.width,propsHeight:T.height}:null};var E=m.prototype;return E.render=function(){var T=this.props,w=T.handle,D=T.handleSize;T.onResize;var P=T.onResizeStart,_=T.onResizeStop,I=T.draggableOpts,H=T.minConstraints,K=T.maxConstraints,j=T.lockAspectRatio,F=T.axis;T.width,T.height;var k=T.resizeHandles,N=T.style,M=T.transformScale,A=C(T,o);return e.createElement(n.default,{axis:F,draggableOpts:I,handle:w,handleSize:D,height:this.state.height,lockAspectRatio:j,maxConstraints:K,minConstraints:H,onResizeStart:P,onResize:this.onResize,onResizeStop:_,resizeHandles:k,transformScale:M,width:this.state.width},e.createElement("div",c({},A,{style:f(f({},N),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},m}(e.Component);return un.default=g,g.propTypes=f(f({},r.resizableProps),{},{children:t.default.element}),un}var da;function nb(){return da||(da=1,on.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},on.exports.Resizable=ql().default,on.exports.ResizableBox=tb().default),on.exports}var Xl=nb();function rb(e,t){const n=e>new Date(t.startAt),r=e<new Date(t.finishAt);return n&&r}const ob={calculateOverlappingBookings:(e,t)=>{const n=t.filter(o=>{const s=new Date(o.startAt).getDate(),i=e.startAt.getDate();return s===i&&o.id!==e.id});let r=0;for(const o of n)rb(e.startAt,o)&&r++;return r}},js=({bookingInit:e,slotData:t,heightStyleTransformer:n,onClick:r,customClasses:o,bookingViewType:s,resizableParam:i,events:a,open:c=!0,ref:l})=>{var d;const[f,u]=R.useState(""),b=Xt(m=>m.updateIsDragging),{bookings:y}=qe(),C=s===ne.DAY?{width:"99%"}:{width:"100%"};R.useEffect(()=>()=>{a!=null&&a.onUnmount&&(a==null||a.onUnmount())},[]);const p=(m,E)=>{u("show-handle"),b(!0),i!=null&&i.onResizeStart&&i.onResizeStart(m,E)},x=(m,E)=>{u(""),b(!1),i!=null&&i.onResizeStop&&i.onResizeStop(m,E)},g=R.useMemo(()=>ob.calculateOverlappingBookings(e,y),[e,y]);if(!c&&!e.finishAt)return null;if((d=i==null?void 0:i.state)!=null&&d.height){const{state:m,onResize:E}=i;return h.jsx(Xl.Resizable,{className:ie("cardContent_resizable",i.customClass,f,g>0&&"inner_cards_parent"),height:m==null?void 0:m.height,width:m==null?void 0:m.width,onResize:E,onResizeStart:p,onResizeStop:x,resizeHandles:["s"],draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:h.jsx("div",{style:{display:"flex",height:n,zIndex:99},children:h.jsx(zo,{heightStyleTransformer:n,booking:e,slotData:t,onClick:r,layerCount:g},e.id)})})}return h.jsx("div",{ref:l,style:{height:n,display:"flex",zIndex:100,...C},children:h.jsx(zo,{heightStyleTransformer:n,customClasses:o,booking:e,slotData:t,onClick:r})})};var sb="Label",Zl=S.forwardRef((e,t)=>h.jsx(se.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Zl.displayName=sb;var ib=Zl;function ab({className:e,...t}){return h.jsx(ib,{"data-slot":"label",className:ie("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const cb=({onClose:e,side:t,onOpenChange:n,buttonTrigger:r,children:o})=>{const[s,i]=R.useState({x:0,y:0}),a=Xt(C=>C.updateIsDragging),{attributes:c,listeners:l,setNodeRef:f,transform:u,setActivatorNodeRef:b}=rs({id:"booking_info",data:{type:"another"}}),y={transform:`translate3d(${s.x+((u==null?void 0:u.x)||0)}px, ${s.y+((u==null?void 0:u.y)||0)}px, 0)`};return Dn({onDragStart(){a(!0)},onDragEnd(C){if(C.active.id){const{y:p,x}=s;i({x:x+((u==null?void 0:u.x)||0),y:p+((u==null?void 0:u.y)||0)}),a(!1)}}}),h.jsxs(ks,{dir:"ltr",modal:!1,open:!0,onOpenChange:n,children:[h.jsx(As,{asChild:!0,children:r}),h.jsxs(_s,{ref:f,style:{...y,zIndex:50,width:"25rem"},forceMount:!0,avoidCollisions:!0,side:t,sticky:"always",updatePositionStrategy:"always",...c,children:[h.jsxs("div",{className:"dropdownLabelContent",children:[h.jsx(ab,{ref:b,className:"dropdownLabelContent_dropdownLabel",...l,children:"Appointment"}),h.jsx(ih,{className:"dropdownLabelContent_close",onClick:e})]}),o]})]})};function fa(e,[t,n]){return Math.min(n,Math.max(t,e))}function lb(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ub=[" ","Enter","ArrowUp","ArrowDown"],db=[" ","Enter"],In="Select",[Kr,Gr,fb]=bs(In),[Zt,Qw]=gt(In,[fb,mt]),qr=mt(),[pb,vt]=Zt(In),[hb,gb]=Zt(In),Jl=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:f,autoComplete:u,disabled:b,required:y,form:C}=e,p=qr(t),[x,g]=S.useState(null),[d,m]=S.useState(null),[E,v]=S.useState(!1),T=ws(l),[w=!1,D]=Dt({prop:r,defaultProp:o,onChange:s}),[P,_]=Dt({prop:i,defaultProp:a,onChange:c}),I=S.useRef(null),H=x?C||!!x.closest("form"):!0,[K,j]=S.useState(new Set),F=Array.from(K).map(k=>k.props.value).join(";");return h.jsx(_r,{...p,children:h.jsxs(pb,{required:y,scope:t,trigger:x,onTriggerChange:g,valueNode:d,onValueNodeChange:m,valueNodeHasChildren:E,onValueNodeHasChildrenChange:v,contentId:dt(),value:P,onValueChange:_,open:w,onOpenChange:D,dir:T,triggerPointerDownPosRef:I,disabled:b,children:[h.jsx(Kr.Provider,{scope:t,children:h.jsx(hb,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(k=>{j(N=>new Set(N).add(k))},[]),onNativeOptionRemove:S.useCallback(k=>{j(N=>{const M=new Set(N);return M.delete(k),M})},[]),children:n})}),H?h.jsxs(xu,{"aria-hidden":!0,required:y,tabIndex:-1,name:f,autoComplete:u,value:P,onChange:k=>_(k.target.value),disabled:b,form:C,children:[P===void 0?h.jsx("option",{value:""}):null,Array.from(K)]},F):null]})})};Jl.displayName=In;var Ql="SelectTrigger",eu=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=qr(n),i=vt(Ql,n),a=i.disabled||r,c=le(t,i.onTriggerChange),l=Gr(n),f=S.useRef("touch"),[u,b,y]=Su(p=>{const x=l().filter(m=>!m.disabled),g=x.find(m=>m.value===i.value),d=Cu(x,p,g);d!==void 0&&i.onValueChange(d.value)}),C=p=>{a||(i.onOpenChange(!0),y()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return h.jsx(Pn,{asChild:!0,...s,children:h.jsx(se.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":wu(i.value)?"":void 0,...o,ref:c,onClick:ee(o.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&C(p)}),onPointerDown:ee(o.onPointerDown,p=>{f.current=p.pointerType;const x=p.target;x.hasPointerCapture(p.pointerId)&&x.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(C(p),p.preventDefault())}),onKeyDown:ee(o.onKeyDown,p=>{const x=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(x&&p.key===" ")&&ub.includes(p.key)&&(C(),p.preventDefault())})})})});eu.displayName=Ql;var tu="SelectValue",nu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=vt(tu,n),{onValueNodeHasChildrenChange:l}=c,f=s!==void 0,u=le(t,c.onValueNodeChange);return ye(()=>{l(f)},[l,f]),h.jsx(se.span,{...a,ref:u,style:{pointerEvents:"none"},children:wu(c.value)?h.jsx(h.Fragment,{children:i}):s})});nu.displayName=tu;var mb="SelectIcon",ru=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(se.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});ru.displayName=mb;var vb="SelectPortal",ou=e=>h.jsx(kn,{asChild:!0,...e});ou.displayName=vb;var Tt="SelectContent",su=S.forwardRef((e,t)=>{const n=vt(Tt,e.__scopeSelect),[r,o]=S.useState();if(ye(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Sr.createPortal(h.jsx(iu,{scope:e.__scopeSelect,children:h.jsx(Kr.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),s):null}return h.jsx(au,{...e,ref:t})});su.displayName=Tt;var Ne=10,[iu,yt]=Zt(Tt),yb="SelectContentImpl",bb=St("SelectContent.RemoveScroll"),au=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:b,collisionPadding:y,sticky:C,hideWhenDetached:p,avoidCollisions:x,...g}=e,d=vt(Tt,n),[m,E]=S.useState(null),[v,T]=S.useState(null),w=le(t,$=>E($)),[D,P]=S.useState(null),[_,I]=S.useState(null),H=Gr(n),[K,j]=S.useState(!1),F=S.useRef(!1);S.useEffect(()=>{if(m)return Ss(m)},[m]),xs();const k=S.useCallback($=>{const[q,...W]=H().map(z=>z.ref.current),[B]=W.slice(-1),Z=document.activeElement;for(const z of $)if(z===Z||(z==null||z.scrollIntoView({block:"nearest"}),z===q&&v&&(v.scrollTop=0),z===B&&v&&(v.scrollTop=v.scrollHeight),z==null||z.focus(),document.activeElement!==Z))return},[H,v]),N=S.useCallback(()=>k([D,m]),[k,D,m]);S.useEffect(()=>{K&&N()},[K,N]);const{onOpenChange:M,triggerPointerDownPosRef:A}=d;S.useEffect(()=>{if(m){let $={x:0,y:0};const q=B=>{var Z,z;$={x:Math.abs(Math.round(B.pageX)-(((Z=A.current)==null?void 0:Z.x)??0)),y:Math.abs(Math.round(B.pageY)-(((z=A.current)==null?void 0:z.y)??0))}},W=B=>{$.x<=10&&$.y<=10?B.preventDefault():m.contains(B.target)||M(!1),document.removeEventListener("pointermove",q),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",W,{capture:!0})}}},[m,M,A]),S.useEffect(()=>{const $=()=>M(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[M]);const[O,L]=Su($=>{const q=H().filter(Z=>!Z.disabled),W=q.find(Z=>Z.ref.current===document.activeElement),B=Cu(q,$,W);B&&setTimeout(()=>B.ref.current.focus())}),U=S.useCallback(($,q,W)=>{const B=!F.current&&!W;(d.value!==void 0&&d.value===q||B)&&(P($),B&&(F.current=!0))},[d.value]),Y=S.useCallback(()=>m==null?void 0:m.focus(),[m]),V=S.useCallback(($,q,W)=>{const B=!F.current&&!W;(d.value!==void 0&&d.value===q||B)&&I($)},[d.value]),X=r==="popper"?Wo:cu,G=X===Wo?{side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:b,collisionPadding:y,sticky:C,hideWhenDetached:p,avoidCollisions:x}:{};return h.jsx(iu,{scope:n,content:m,viewport:v,onViewportChange:T,itemRefCallback:U,selectedItem:D,onItemLeave:Y,itemTextRefCallback:V,focusSelectedItem:N,selectedItemText:_,position:r,isPositioned:K,searchRef:O,children:h.jsx(Br,{as:bb,allowPinchZoom:!0,children:h.jsx(Fr,{asChild:!0,trapped:d.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:ee(o,$=>{var q;(q=d.trigger)==null||q.focus({preventScroll:!0}),$.preventDefault()}),children:h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>d.onOpenChange(!1),children:h.jsx(X,{role:"listbox",id:d.contentId,"data-state":d.open?"open":"closed",dir:d.dir,onContextMenu:$=>$.preventDefault(),...g,...G,onPlaced:()=>j(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ee(g.onKeyDown,$=>{const q=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!q&&$.key.length===1&&L($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let B=H().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);if(["ArrowUp","End"].includes($.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const Z=$.target,z=B.indexOf(Z);B=B.slice(z+1)}setTimeout(()=>k(B)),$.preventDefault()}})})})})})})});au.displayName=yb;var wb="SelectItemAlignedPosition",cu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=vt(Tt,n),i=yt(Tt,n),[a,c]=S.useState(null),[l,f]=S.useState(null),u=le(t,w=>f(w)),b=Gr(n),y=S.useRef(!1),C=S.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:g,focusSelectedItem:d}=i,m=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&p&&x&&g){const w=s.trigger.getBoundingClientRect(),D=l.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),_=g.getBoundingClientRect();if(s.dir!=="rtl"){const Z=_.left-D.left,z=P.left-Z,oe=w.left-z,de=w.width+oe,Se=Math.max(de,D.width),Ce=window.innerWidth-Ne,Qe=fa(z,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.left=Qe+"px"}else{const Z=D.right-_.right,z=window.innerWidth-P.right-Z,oe=window.innerWidth-w.right-z,de=w.width+oe,Se=Math.max(de,D.width),Ce=window.innerWidth-Ne,Qe=fa(z,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.right=Qe+"px"}const I=b(),H=window.innerHeight-Ne*2,K=p.scrollHeight,j=window.getComputedStyle(l),F=parseInt(j.borderTopWidth,10),k=parseInt(j.paddingTop,10),N=parseInt(j.borderBottomWidth,10),M=parseInt(j.paddingBottom,10),A=F+k+K+M+N,O=Math.min(x.offsetHeight*5,A),L=window.getComputedStyle(p),U=parseInt(L.paddingTop,10),Y=parseInt(L.paddingBottom,10),V=w.top+w.height/2-Ne,X=H-V,G=x.offsetHeight/2,$=x.offsetTop+G,q=F+k+$,W=A-q;if(q<=V){const Z=I.length>0&&x===I[I.length-1].ref.current;a.style.bottom="0px";const z=l.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(X,G+(Z?Y:0)+z+N),de=q+oe;a.style.height=de+"px"}else{const Z=I.length>0&&x===I[0].ref.current;a.style.top="0px";const oe=Math.max(V,F+p.offsetTop+(Z?U:0)+G)+W;a.style.height=oe+"px",p.scrollTop=q-V+p.offsetTop}a.style.margin=`${Ne}px 0`,a.style.minHeight=O+"px",a.style.maxHeight=H+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[b,s.trigger,s.valueNode,a,l,p,x,g,s.dir,r]);ye(()=>m(),[m]);const[E,v]=S.useState();ye(()=>{l&&v(window.getComputedStyle(l).zIndex)},[l]);const T=S.useCallback(w=>{w&&C.current===!0&&(m(),d==null||d(),C.current=!1)},[m,d]);return h.jsx(Sb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:h.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:h.jsx(se.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});cu.displayName=wb;var xb="SelectPopperPosition",Wo=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ne,...s}=e,i=qr(n);return h.jsx(Nr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Wo.displayName=xb;var[Sb,Ls]=Zt(Tt,{}),Bo="SelectViewport",lu=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=yt(Bo,n),i=Ls(Bo,n),a=le(t,s.onViewportChange),c=S.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(Kr.Slot,{scope:n,children:h.jsx(se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ee(o.onScroll,l=>{const f=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:b}=i;if(b!=null&&b.current&&u){const y=Math.abs(c.current-f.scrollTop);if(y>0){const C=window.innerHeight-Ne*2,p=parseFloat(u.style.minHeight),x=parseFloat(u.style.height),g=Math.max(p,x);if(g<C){const d=g+y,m=Math.min(C,d),E=d-m;u.style.height=m+"px",u.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,u.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});lu.displayName=Bo;var uu="SelectGroup",[Cb,Eb]=Zt(uu),Db=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dt();return h.jsx(Cb,{scope:n,id:o,children:h.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Db.displayName=uu;var du="SelectLabel",Tb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Eb(du,n);return h.jsx(se.div,{id:o.id,...r,ref:t})});Tb.displayName=du;var xr="SelectItem",[Rb,fu]=Zt(xr),pu=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=vt(xr,n),c=yt(xr,n),l=a.value===r,[f,u]=S.useState(s??""),[b,y]=S.useState(!1),C=le(t,d=>{var m;return(m=c.itemRefCallback)==null?void 0:m.call(c,d,r,o)}),p=dt(),x=S.useRef("touch"),g=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(Rb,{scope:n,value:r,disabled:o,textId:p,isSelected:l,onItemTextChange:S.useCallback(d=>{u(m=>m||((d==null?void 0:d.textContent)??"").trim())},[]),children:h.jsx(Kr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:h.jsx(se.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":l&&b,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:C,onFocus:ee(i.onFocus,()=>y(!0)),onBlur:ee(i.onBlur,()=>y(!1)),onClick:ee(i.onClick,()=>{x.current!=="mouse"&&g()}),onPointerUp:ee(i.onPointerUp,()=>{x.current==="mouse"&&g()}),onPointerDown:ee(i.onPointerDown,d=>{x.current=d.pointerType}),onPointerMove:ee(i.onPointerMove,d=>{var m;x.current=d.pointerType,o?(m=c.onItemLeave)==null||m.call(c):x.current==="mouse"&&d.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,d=>{var m;d.currentTarget===document.activeElement&&((m=c.onItemLeave)==null||m.call(c))}),onKeyDown:ee(i.onKeyDown,d=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&d.key===" "||(db.includes(d.key)&&g(),d.key===" "&&d.preventDefault())})})})})});pu.displayName=xr;var fn="SelectItemText",hu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=vt(fn,n),a=yt(fn,n),c=fu(fn,n),l=gb(fn,n),[f,u]=S.useState(null),b=le(t,g=>u(g),c.onItemTextChange,g=>{var d;return(d=a.itemTextRefCallback)==null?void 0:d.call(a,g,c.value,c.disabled)}),y=f==null?void 0:f.textContent,C=S.useMemo(()=>h.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=l;return ye(()=>(p(C),()=>x(C)),[p,x,C]),h.jsxs(h.Fragment,{children:[h.jsx(se.span,{id:c.textId,...s,ref:b}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Sr.createPortal(s.children,i.valueNode):null]})});hu.displayName=fn;var gu="SelectItemIndicator",mu=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return fu(gu,n).isSelected?h.jsx(se.span,{"aria-hidden":!0,...r,ref:t}):null});mu.displayName=gu;var Ho="SelectScrollUpButton",vu=S.forwardRef((e,t)=>{const n=yt(Ho,e.__scopeSelect),r=Ls(Ho,e.__scopeSelect),[o,s]=S.useState(!1),i=le(t,r.onScrollButtonChange);return ye(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?h.jsx(bu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});vu.displayName=Ho;var Vo="SelectScrollDownButton",yu=S.forwardRef((e,t)=>{const n=yt(Vo,e.__scopeSelect),r=Ls(Vo,e.__scopeSelect),[o,s]=S.useState(!1),i=le(t,r.onScrollButtonChange);return ye(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<l;s(f)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?h.jsx(bu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});yu.displayName=Vo;var bu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=yt("SelectScrollButton",n),i=S.useRef(null),a=Gr(n),c=S.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),ye(()=>{var f;const l=a().find(u=>u.ref.current===document.activeElement);(f=l==null?void 0:l.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),h.jsx(se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ee(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ee(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ee(o.onPointerLeave,()=>{c()})})}),Mb="SelectSeparator",Ob=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});Ob.displayName=Mb;var Yo="SelectArrow",Pb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qr(n),s=vt(Yo,n),i=yt(Yo,n);return s.open&&i.position==="popper"?h.jsx(Ir,{...o,...r,ref:t}):null});Pb.displayName=Yo;function wu(e){return e===""||e===void 0}var xu=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=S.useRef(null),s=le(t,o),i=lb(n);return S.useEffect(()=>{const a=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&f){const u=new Event("change",{bubbles:!0});f.call(a,n),a.dispatchEvent(u)}},[i,n]),h.jsx(gs,{asChild:!0,children:h.jsx("select",{...r,ref:s,defaultValue:n})})});xu.displayName="BubbleSelect";function Su(e){const t=_e(e),n=S.useRef(""),r=S.useRef(0),o=S.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Cu(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=kb(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function kb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ab=Jl,_b=eu,Nb=nu,Ib=ru,jb=ou,Lb=su,$b=lu,Fb=pu,zb=hu,Wb=mu,Bb=vu,Hb=yu;function Vb({...e}){return h.jsx(Ab,{"data-slot":"select",...e})}function Yb({...e}){return h.jsx(Nb,{"data-slot":"select-value",...e})}function Ub({className:e,size:t="default",children:n,...r}){return h.jsxs(_b,{"data-slot":"select-trigger","data-size":t,className:ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,h.jsx(Ib,{asChild:!0,children:h.jsx(lc,{className:"size-4 opacity-50"})})]})}function Kb({className:e,children:t,position:n="popper",...r}){return h.jsx(jb,{children:h.jsxs(Lb,{"data-slot":"select-content",className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[h.jsx(qb,{}),h.jsx($b,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),h.jsx(Xb,{})]})})}function Gb({className:e,children:t,...n}){return h.jsxs(Fb,{"data-slot":"select-item",className:ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[h.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:h.jsx(Wb,{children:h.jsx(cc,{className:"size-4"})})}),h.jsx(zb,{children:t})]})}function qb({className:e,...t}){return h.jsx(Bb,{"data-slot":"select-scroll-up-button",className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(Up,{className:"size-4"})})}function Xb({className:e,...t}){return h.jsx(Hb,{"data-slot":"select-scroll-down-button",className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(lc,{className:"size-4"})})}const Zb=15,pa=600,Jb=15,Qn=1.98,$s=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=R.useState({height:pa,width:600}),a=(g,d)=>{const m=te.timeDiffInSeconds(g,d),E=2,v=Math.ceil(m/Zb);return Qn+(v-1)*E},[c,l]=R.useState(o?a(e.finishAt,e.startAt):Qn),f=async(g=["se","s"])=>{if(g.includes("n")){const d=b(e.startAt,"remove");n&&n(d)}else{const d=b(e.finishAt,"add");l(m=>Math.round(m)+Qn),t&&t(d)}},u=async()=>{const g=b(e.finishAt,"remove");te.timeDiffInSeconds(e.finishAt,e.startAt)!==Jb&&(l(m=>m-Qn),r&&r(g))},b=(g,d)=>{const m=new Date(g),E=m.getMinutes();return d==="add"&&m.setMinutes(E+15),d==="remove"&&m.setMinutes(E-15),m};return{state:s,setState:i,resetState:()=>{i({height:pa,width:600})},resetHeightStyle:()=>{l(2)},heightStyle:c,onResize:(g,{size:d,handle:m})=>{switch(g.stopPropagation(),g.preventDefault(),m){case"se":case"s":{i(E=>(Number(E.height)<Number(d.height)&&f(),Number(E.height)>Number(d.height)&&u(),{...E,height:d.height,width:d.width}));break}case"n":{i(E=>(Number(d.height)>Number(E.height)&&f(["n"]),{...E,height:d.height,width:d.width}));break}}},updateHeightStyle:(g,d)=>{l(a(g,d))}}},Qb=({isDragging:e,slotData:t,events:{onClick:n,renderPreviewCard:r,resetPrevView:o}})=>{const s=Go(D=>D.startAt),i=Oe(D=>D.bookingViewType),[a,c]=R.useState(te.addMinutesToHour(t.time,15)),[l,f]=R.useState(!1),u=l?{backgroundColor:"white",border:"none"}:{},b=R.useMemo(()=>({id:"dragging_booking_preview",startAt:te.convertStringTimeToDateFormat(s),finishAt:te.convertStringTimeToDateFormat(a)}),[a,s]),y=()=>{f(!0),r()},C=()=>{n(a),w()},{state:p,resetState:x,resetHeightStyle:g,heightStyle:d,onResize:m,updateHeightStyle:E}=$s({booking:b,onAddTime:D=>{c(te.dateTimeAsString(D))},onSubTime:D=>{c(te.dateTimeAsString(D))}}),v=()=>{w()},T=R.useCallback(()=>{c(te.addMinutesToHour(t.time,15))},[t.time]),w=R.useCallback(()=>{f(!1),x(),T(),g(),o()},[T,g,o,x]);return R.useEffect(()=>{if(!a||!s)return;const D=te.convertStringTimeToDateFormat(a),P=te.convertStringTimeToDateFormat(s);Number.isNaN(D)||Number.isNaN(P)||!(D instanceof Date)||!(P instanceof Date)||E(D,P)},[a,s]),R.useEffect(()=>()=>{w()},[]),h.jsx("div",{style:{...u},className:ie("timeInfo_core",u),children:h.jsx(Xl.Resizable,{className:"slot-resizable",height:p.height,width:p.width,onResizeStart:y,onResizeStop:C,onResize:m,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:l?h.jsx("div",{className:"timeInfo_core_dragging",children:h.jsx(js,{bookingInit:b,bookingViewType:i,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${d}rem`,resizableParam:{state:p,onResize:m,customClass:"show-handle"},events:{onUnmount:v}})}):h.jsx("div",{className:"timeInfo_core_timeParent",children:!e&&h.jsx("span",{className:"timeInfo_core_timeParent_time",children:t.time})})})})},er=({slotData:e,slotPosition:t,disabledCss:n,events:r,actualTimerIndicatorChildren:o,children:s,ref:i})=>{const{isDragging:a,updateIsDragging:c}=Xt(W=>W),l=qe(),{emptySlotNodes:f,setSelectedNode:u,resetSelectedNode:b}=Ht(),{onModalClose:y,onSlotClick:C}=qe(),{startAt:p,finishAt:x,updateDate:g,updateStartAt:d,updateFinishAtWithOffset:m,resetForm:E}=Go(W=>W),v=Oe(W=>W.bookingViewType),T=R.useMemo(()=>({id:"dragging_booking_preview",startAt:te.convertStringTimeToDateFormat(p),finishAt:te.convertStringTimeToDateFormat(x)}),[x,p]),{updateHeightStyle:w,heightStyle:D}=$s({booking:T}),[P,_]=R.useState(!1),[I,H]=R.useState(!1),[K,j]=R.useState(!1),[F,k]=R.useState(!1),N=R.useRef(null),M=R.useCallback(()=>{if(a||I)return;r.onMouseEnterEvent()===t&&j(!0)},[t,r,a,I]),A=()=>{E(),c(!1),b()},O=W=>{A();const B=cr(e),Z=f==null?void 0:f.get(B);Z&&Z.closeEvent(),y==null||y(),W==null||W.stopPropagation(),W==null||W.preventDefault(),H(!1)},L=W=>{W||O(),_(W),j(W),H(W)},U=R.useCallback(W=>{if(a&&!W)return;c(!1);const{time:B,key:Z}=e,z=cr({key:Z,time:B}),oe=f==null?void 0:f.get(z);u(z),oe&&oe.showEvent(B),g(Z);const Ce=m(W||B,W?0:15);C({slotData:e,finishTime:Ce}),H(!0)},[e,f,a,u,C,g,d,c,m]),Y=()=>{a||I||j(!1)},V=n.length||F?n:"hovering_slotTrigger_core",X=R.useCallback(()=>{const{time:W,key:B}=e;c(!0),k(!0),g(B),d(W),m(W)},[m,e,g,c,d]),G=()=>{H(!0)},$=R.useCallback(()=>{k(!1)},[]),q=()=>{j(!1),H(!0),_(!0)};return R.useEffect(()=>{a?document.body.style.cursor="ns-resize":document.body.style.cursor="default"},[a]),R.useEffect(()=>{if(!x||!p)return;const W=te.convertStringTimeToDateFormat(x),B=te.convertStringTimeToDateFormat(p);Number.isNaN(W)||Number.isNaN(B)||!(W instanceof Date)||!(B instanceof Date)||w(W,B)},[x,p]),R.useEffect(()=>{P&&N!=null&&N.current&&N.current.scrollIntoView({behavior:"smooth",block:"center"})},[P]),R.useEffect(()=>{s||j(!1)},[s]),R.useImperativeHandle(i,()=>({showEvent:W=>{d(W),q()},closeEvent:()=>{H(!1),_(!1),j(!1),$()},onOpenCloseChange:W=>{j(W),_(W),$()}})),h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:e.ref,style:{borderBottom:t==="fourth"?"1px solid #8080807a":"",...e.style},className:ie("slotTrigger_core",v===ne.DAY&&"slotTrigger_core_day",V),onMouseOver:M,onMouseLeave:Y,onFocus:()=>{},children:[(!s&&K&&!P||F)&&h.jsx(Qb,{isDragging:a,slotData:e,events:{onClick:U,openOptions:G,renderPreviewCard:X,resetPrevView:$}}),o,P&&h.jsx("div",{style:{width:"100%"},children:h.jsx(js,{ref:N,bookingInit:T,bookingViewType:v,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${D}rem`})}),s]},e.key),I&&h.jsx(ns,{children:h.jsx(cb,{onClose:O,onOpenChange:L,buttonTrigger:h.jsx("div",{},e.key),side:v===ne.DAY?"top":"right",children:l.createBookingModal})})]})};var Fs="Popover",[Eu,ex]=gt(Fs,[mt]),jn=mt(),[ew,bt]=Eu(Fs),Du=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=jn(t),c=S.useRef(null),[l,f]=S.useState(!1),[u=!1,b]=Dt({prop:r,defaultProp:o,onChange:s});return h.jsx(_r,{...a,children:h.jsx(ew,{scope:t,contentId:dt(),triggerRef:c,open:u,onOpenChange:b,onOpenToggle:S.useCallback(()=>b(y=>!y),[b]),hasCustomAnchor:l,onCustomAnchorAdd:S.useCallback(()=>f(!0),[]),onCustomAnchorRemove:S.useCallback(()=>f(!1),[]),modal:i,children:n})})};Du.displayName=Fs;var Tu="PopoverAnchor",Ru=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(Tu,n),s=jn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return S.useEffect(()=>(i(),()=>a()),[i,a]),h.jsx(Pn,{...s,...r,ref:t})});Ru.displayName=Tu;var Mu="PopoverTrigger",Ou=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(Mu,n),s=jn(n),i=le(t,o.triggerRef),a=h.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Nu(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:h.jsx(Pn,{asChild:!0,...s,children:a})});Ou.displayName=Mu;var zs="PopoverPortal",[tw,nw]=Eu(zs,{forceMount:void 0}),Pu=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=bt(zs,t);return h.jsx(tw,{scope:t,forceMount:n,children:h.jsx(Je,{present:n||s.open,children:h.jsx(kn,{asChild:!0,container:o,children:r})})})};Pu.displayName=zs;var Bt="PopoverContent",ku=S.forwardRef((e,t)=>{const n=nw(Bt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=bt(Bt,e.__scopePopover);return h.jsx(Je,{present:r||s.open,children:s.modal?h.jsx(ow,{...o,ref:t}):h.jsx(sw,{...o,ref:t})})});ku.displayName=Bt;var rw=St("PopoverContent.RemoveScroll"),ow=S.forwardRef((e,t)=>{const n=bt(Bt,e.__scopePopover),r=S.useRef(null),o=le(t,r),s=S.useRef(!1);return S.useEffect(()=>{const i=r.current;if(i)return Ss(i)},[]),h.jsx(Br,{as:rw,allowPinchZoom:!0,children:h.jsx(Au,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ee(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),sw=S.forwardRef((e,t)=>{const n=bt(Bt,e.__scopePopover),r=S.useRef(!1),o=S.useRef(!1);return h.jsx(Au,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Au=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...u}=e,b=bt(Bt,n),y=jn(n);return xs(),h.jsx(Fr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>b.onOpenChange(!1),children:h.jsx(Nr,{"data-state":Nu(b.open),role:"dialog",id:b.contentId,...y,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),_u="PopoverClose",iw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(_u,n);return h.jsx(se.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});iw.displayName=_u;var aw="PopoverArrow",cw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jn(n);return h.jsx(Ir,{...o,...r,ref:t})});cw.displayName=aw;function Nu(e){return e?"open":"closed"}var lw=Du,uw=Ru,dw=Ou,fw=Pu,pw=ku;function hw({...e}){return h.jsx(lw,{"data-slot":"popover",...e})}function gw({...e}){return h.jsx(dw,{"data-slot":"popover-trigger",...e})}function mw({className:e,align:t="center",sideOffset:n=4,...r}){return h.jsx(fw,{children:h.jsx(pw,{"data-slot":"popover-content",align:t,sideOffset:n,className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function vw({...e}){return h.jsx(uw,{"data-slot":"popover-anchor",...e})}var yw="Toggle",Iu=S.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...s}=e,[i=!1,a]=Dt({prop:n,onChange:o,defaultProp:r});return h.jsx(se.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:ee(e.onClick,()=>{e.disabled||a(!i)})})});Iu.displayName=yw;var bw=Iu;const ww=ss("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function xw({className:e,variant:t,size:n,...r}){return h.jsx(bw,{"data-slot":"toggle",className:ie(ww({variant:t,size:n,className:e})),...r})}const Sw=()=>{const[e,t]=R.useState(!1);return h.jsx(ys,{children:h.jsxs(Bc,{children:[h.jsx(Hc,{asChild:!0,children:h.jsx("div",{children:h.jsx(xw,{className:"group size-10 p-0 hover:bg-indigo-50 hover:text-indigo-500 data-[state=on]:bg-indigo-50 data-[state=on]:text-indigo-500","aria-label":"Bookmark this",variant:e?"default":"outline",pressed:e,onPressedChange:t,children:h.jsx(Np,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),h.jsx(Vc,{className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:h.jsx("p",{children:e?"Remove bookmark":"Bookmark this"})})]})})},Cw=({options:e,onChange:t})=>h.jsxs(Vb,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[h.jsx(Ub,{className:"w-[180px]",children:h.jsx(Yb,{placeholder:"view"})}),h.jsx(Kb,{children:e.map(n=>h.jsx(Gb,{value:n.text,children:n.text},n.text))})]}),Ew=[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],Dw=5,Tw=0,Rw=({side:e,xAxis:t,yAxis:n,updatePosition:r,children:o})=>{const{attributes:s,listeners:i,setNodeRef:a,transform:c,setActivatorNodeRef:l}=rs({id:"booking-info-id",data:{type:"booking-info-options"}}),f=Xt(b=>b.updateIsDragging),u={transform:`translate3d(${t+((c==null?void 0:c.x)||0)}px, ${n+((c==null?void 0:c.y)||0)}px, 0)`};return Dn({onDragStart(){f(!0)},onDragEnd(b){b.active.id&&r(c)}}),h.jsx(mw,{ref:a,updatePositionStrategy:"optimized",side:e,align:"start",sticky:"always",sideOffset:Dw,alignOffset:Tw,style:{...u,width:"25rem"},children:h.jsxs("div",{className:"grid gap-3",children:[h.jsx("input",{type:"text",style:{position:"absolute",opacity:0,height:0,width:0}}),h.jsxs("div",{className:"flex justify-end gap-1",children:[h.jsx("div",{ref:l,className:"w-full cursor-move",...s,...i}),h.jsx(Sw,{}),h.jsx(Ct,{type:"button",variant:"outline",size:"icon",children:h.jsx(eh,{className:"h-3 w-3"})}),h.jsx(Ct,{type:"button",variant:"outline",size:"icon",onClick:()=>{},children:h.jsx(oh,{className:"h-3 w-3"})}),h.jsx(Cw,{options:Ew,onChange:()=>{}})]}),o]})})},ha={xAxis:0,yAxis:0},ju=({isEditingOpen:e,side:t,booking:n,onOpenChange:r,children:o})=>{const[s,i]=R.useState({...ha}),a=Xt(y=>y.updateIsDragging),c=R.useMemo(()=>`${te.dateAndHourDateToString(n.startAt)} - ${te.dateAndHourDateToString(n.finishAt)}`,[n.startAt,n.finishAt]),l=R.useMemo(()=>{const y=new Date(n.startAt),C=y.getDate(),p=y.getDay(),x=jt[y.getMonth()];return h.jsx("span",{children:`${fd[p]}, ${C} ${x}`})},[n.startAt]),f=()=>({backgroundColor:""}),u=y=>{y||console.info("No transform info to show "),i({xAxis:s.xAxis+((y==null?void 0:y.x)||0),yAxis:s.yAxis+((y==null?void 0:y.y)||0)})};Dn({onDragStart(y){const C=y.active.data.current,p=y.active.id,x=C.type==="booking-info-options";p&&x&&a(!0)}});const b=y=>{y===!1&&i({...ha}),r(y)};return h.jsxs(hw,{open:e,onOpenChange:b,defaultOpen:!1,children:[h.jsx(vw,{style:{width:"100%"},children:h.jsx(gw,{asChild:!0,children:o})}),h.jsx(ns,{children:h.jsx(Rw,{side:t,xAxis:s.xAxis,yAxis:s.yAxis,updatePosition:u,children:h.jsxs("div",{className:"bookingCard_content",children:[h.jsx("span",{style:f(),className:"flex h-4 w-4 translate-y-0 rounded-sm"}),h.jsx("div",{className:"space-y-1",children:h.jsxs("p",{className:"text-sm text-muted-foreground",children:[l," | ",c]})})]})})})]})};ju.displayName="BookingInfoOptions";const Mw=({booking:e,slotData:t,ref:n})=>{const{bookingViewType:r,optimisticCardUpdate:o}=Oe(),[s,i]=R.useState({...e}),[a,c]=R.useState(!1),l=R.useRef("left"),f=()=>{const g=t.day.split(":")[0].trim();if(r===ne.DAY)l.current="top";else switch(g){case"Mon":case"Sun":l.current="right";break;default:l.current="left";break}c(!0)},u=async g=>{try{i(d=>({...d,finishAt:g}))}catch(d){console.log(d)}},b=async g=>{o(s,g,s.finishAt,t),i(d=>({...d,startAt:g}))},y=async g=>{try{i(d=>({...d,finishAt:g}))}catch(d){console.log(d)}},{state:C,heightStyle:p,onResize:x}=$s({booking:s,onAddTime:u,onAddStartTime:b,onSubTime:y,starter:!0});return R.useImperativeHandle(n,()=>({bookingId:e.id}),[e.id]),h.jsx(ju,{booking:s,onOpenChange:c,side:r===ne.DAY?"top":"left",isEditingOpen:a,children:h.jsx(js,{resizableParam:{state:C,onResize:x,resizeHandle:["s"]},customClasses:"Draggable",bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${p}rem`,onClick:f})})};var Ow="Separator",ga="horizontal",Pw=["horizontal","vertical"],Lu=S.forwardRef((e,t)=>{const{decorative:n,orientation:r=ga,...o}=e,s=kw(r)?r:ga,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return h.jsx(se.div,{"data-orientation":s,...a,...o,ref:t})});Lu.displayName=Ow;function kw(e){return Pw.includes(e)}var Aw=Lu;function ma({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return h.jsx(Aw,{"data-slot":"separator-root",decorative:n,orientation:t,className:ie("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const _w=ss("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Nw({className:e,variant:t,...n}){return h.jsx("div",{className:ie(_w({variant:t}),e),...n})}const Iw=({dateToRender:e,isFirstDay:t})=>h.jsx("div",{style:{left:t?"19px":"10px"},className:"first_day_slot",children:h.jsx("span",{children:h.jsx(Nw,{children:e})})});class jw{constructor(){wt(this,"positionBasedOnSeconds",t=>{const[,n]=t.split(":");if(!t.length)return-3;const r=Number(n);return this.normalizingMinutes(r)});wt(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);wt(this,"isInitialMinute",t=>t>=0&&t<=8);wt(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class Lw{constructor(){wt(this,"is15MinLess",t=>{const n=new Date,[r,o]=t.split(":"),s=new Date(n.getFullYear(),n.getMonth(),n.getDate(),Number(r),Number(o),0),i=new Date(n),a=te.roundMinutes(n.getMinutes());i.setHours(n.getHours(),a,0,0);const c=te.minuteDifference(s,i);return c>30||c<-30});wt(this,"normalizeDateNow",t=>{const n=t.getHours(),r=te.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const tr=({color:e="#000",isFirstDay:t,slotData:n})=>{const{timesRendered:r,bookingViewType:o}=Oe(),[s,i]=R.useState(""),[a,c]=R.useState(!1),[l,f]=R.useState(!1),u=R.useMemo(()=>{const d=new Date,m=new Date(n.key);return m.getDay()===d.getDay()&&m.getDate()===d.getDate()},[n.key]),b=d=>{i(d)},y=()=>{c(!0)},C=()=>{c(!1)},p=R.useMemo(()=>new jw().positionBasedOnSeconds(s),[n.time,s,r]),x=R.useMemo(()=>t?o===ne.DAY?"101%":"100vw":o===ne.DAY?"102%":"104%",[t,o]),g=R.useMemo(()=>u?{top:`${p-2}px`,left:t?"-18px":"-3px",width:t?"110%":"104%"}:{top:`${p-1}px`,left:t?"-18px":"-9px",width:x},[u,t,x,p]);if(R.useEffect(()=>{const d=n.time,m=new Lw,E=()=>{const T=new Date,w=m.normalizeDateNow(T),D=te.dateAndHourDateToString(T);s!==D&&b(D),f(w===d)};let v;return m.is15MinLess(d)||(v=setInterval(()=>E(),1e3)),()=>clearInterval(v)},[n.time,s]),!!l)return h.jsxs("div",{style:{...g},className:ie("timeIndicator_today",u&&x),onMouseEnter:y,onMouseOut:C,onBlur:()=>{},children:[h.jsx(ma,{style:{height:u?"4px":"2px",backgroundColor:e}}),u&&t&&h.jsx("div",{className:"today_first_day",children:h.jsx(ma,{orientation:"vertical",style:{height:"11px",backgroundColor:e}})}),a&&h.jsx(Iw,{isFirstDay:t,dateToRender:s})]})},va=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=Ht(),f=nr({bookings:e,blockTimeString:"00",slotData:a}),u=nr({bookings:e,blockTimeString:"15",slotData:a}),b=nr({bookings:e,blockTimeString:"30",slotData:a}),y=nr({bookings:e,blockTimeString:"45",slotData:a}),C=R.useCallback((p,x)=>{if(!p)return;const g=cr(x);l.get(g)||c(p,x)},[c,l]);return h.jsxs(h.Fragment,{children:[h.jsx(er,{ref:p=>C(p,{key:t.key,time:t.time}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:t}),children:f}),h.jsx(er,{ref:p=>C(p,{key:n.key,time:n.time}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},slotPosition:"second",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:n}),children:u}),h.jsx(er,{ref:p=>C(p,{key:r.key,time:r.time}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:r}),children:b}),h.jsx(er,{ref:p=>C(p,{key:o.key,time:o.time}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:o}),children:y})]})},nr=({bookings:e,blockTimeString:t,slotData:n})=>{if(e!=null&&e.length&&(n!=null&&n.day)&&(n!=null&&n.hour)){const r=e.find(o=>te.dateAndHourDateToString(new Date(o.startAt)).split(":")[1]===t);if(r)return h.jsx(Mw,{booking:r,slotData:n})}return null},$w=({dayHour:e,lunchTimeBlock:t,firstDay:n,bookingBulk:r,bookingViewType:o})=>{const s=R.useRef(""),i=w=>w===t.startAt||w===t.finishAt?(s.current="slot_disabled",!0):!1,a=te.addMinuteToHour(e.hour,15),c=te.addMinuteToHour(e.hour,30),l=te.addMinuteToHour(e.hour,45),{isOver:f,setNodeRef:u}=zn({id:`${te.newDateKey(e.day,e.hour)}`,data:{accepts:["booking-slots"]},disabled:i(e.hour)}),{isOver:b,setNodeRef:y}=zn({id:`${te.newDateKey(e.day,a)}`,data:{accepts:["booking-slots"]},disabled:i(a)}),{isOver:C,setNodeRef:p}=zn({id:`${te.newDateKey(e.day,c)}`,data:{accepts:["booking-slots"]},disabled:i(c)}),{isOver:x,setNodeRef:g}=zn({id:`${te.newDateKey(e.day,l)}`,data:{accepts:["booking-slots"]},disabled:i(l)}),d=R.useMemo(()=>({ref:u,style:{backgroundColor:f?"#0066ff":""},key:te.newDateKey(e.day,e.hour),time:e.hour}),[e.day,e.hour,f,u]),m=R.useMemo(()=>({ref:y,style:{backgroundColor:b?"#0066ff":""},key:te.newDateKey(e.day,a),time:a}),[e.day,b,a,y]),E=R.useMemo(()=>({ref:p,style:{backgroundColor:C?"#0066ff":""},key:te.newDateKey(e.day,c),time:c}),[e.day,C,p,c]),v=R.useMemo(()=>({ref:g,style:{backgroundColor:x?"#0066ff":""},key:te.newDateKey(e.day,l),time:l}),[e.day,l,x,g]),T=R.useMemo(()=>{const{day:w,hour:D}=e,P=r.filter(_=>{const I=te.dateAndHourDateToString(_.startAt),H=new Date(_.startAt).getDate(),K=new Date(w).getDate(),j=D.split(":")[0];return I.split(":")[0]===j&&H===K});return P.length?h.jsx(va,{dayHour:e,bookings:P,first:d,second:m,third:E,fourth:v,disabledCss:s.current,firstDay:n}):h.jsx(va,{first:d,second:m,third:E,fourth:v,disabledCss:s.current,firstDay:n})},[r,e,n,d,v,m,E]);return h.jsx("td",{className:ie("slot",o===ne.WEEK&&"slotWeek"),children:T},`${e.day}-${e.hour}-slot`)};function Fw({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"relative w-full z-10 overflow-hidden",children:h.jsx("table",{"data-slot":"table",className:ie("w-full caption-bottom text-sm",e),...t})})}function zw({className:e,...t}){return h.jsx("td",{"data-slot":"table-cell",className:ie("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const Ww=({hour:e,ref:t})=>{const n="Set lunch interval",r="Remove lunch interval",o="Hour options",s=R.useRef(null),i="border-solid hover:border-b-2 hover:border-b-purple-600 border-b-white",a=()=>{s!=null&&s.current&&s.current.setAttribute("class",ie("activateVisibilityTime",i))};return R.useImperativeHandle(t,()=>({setActivateHour:a})),h.jsxs(ks,{children:[h.jsx(As,{children:h.jsx("span",{ref:s,className:ie(i),children:e})}),h.jsxs(_s,{children:[h.jsx(Ay,{children:o}),h.jsx(_y,{}),h.jsx(Fi,{children:n}),h.jsx(Fi,{children:r})]})]})},Bw=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=Oe(),{selectedNode:s,emptySlotNodes:i}=Ht(),{finishAt:a,updateFinishAtWithOffset:c}=Go(p=>p),[l]=R.useState({startAt:"12:00",finishAt:"12:30"}),f=R.useCallback((p,x)=>{p&&o(p,x)},[o]),u=R.useMemo(()=>n===ne.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),b=R.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]),y=()=>s.split(";")[1];return R.useEffect(()=>{if(s){const p=i.get(s);p==null||p.showEvent(y())}},[s,i]),R.useEffect(()=>{y()===a&&c(y())},[s,a]),R.useMemo(()=>{const p=x=>x===0;return h.jsx("div",{className:ie("calendarCore",n===ne.WEEK&&"calendarCore_max"),children:h.jsx(Fw,{children:h.jsx("tbody",{children:e.map(x=>h.jsxs("tr",{children:[h.jsx(zw,{style:{...b,...u,padding:0,position:"relative"},className:"calendarCore_cell",children:h.jsx("div",{className:"calendarCore_actions",children:h.jsx(Ww,{ref:g=>f(g,x),hour:x})})},`${x}-hour`),t.map((g,d)=>h.jsx($w,{dayHour:{day:String(g),hour:x},lunchTimeBlock:l,firstDay:p(d),bookingBulk:r.booking,bookingViewType:n},`${g}-${x}-slot-content`))]},`${x}-content`))})})})},[u,e,l,b,r,f,n,t])},Hw=({bookingViewType:e})=>{const{resetSelectedNode:t,resetNodes:n}=Ht(o=>o);return R.useEffect(()=>{(e===ne.DAY||e===ne.WEEK)&&(t(),n())},[e,n,t]),R.useMemo(()=>{switch(e){case ne.DAY:case ne.WEEK:return h.jsx(Bw,{});default:return null}},[e])},Vw={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},Yw=()=>{const{bookings:e}=qe(),t={distance:5},{setBookingBulkData:n,optimisticCardUpdate:r}=Oe(),{onCardDropCallback:o}=qe(),s=Id(Qs(Ba,{activationConstraint:t}),Qs(Ha,{activationConstraint:t})),{bookingViewType:i,daysOfWeek:a}=Oe(),c=R.useCallback(C=>{const{active:p}=C;p.id},[]),l=(C,p)=>{const x=Number(new Date(p))-Number(new Date(C)),g=Math.floor(x/1e3/60),d=Math.floor(g/60),m=g%60;return`${d}:${m.toString().padStart(2,"0")}`},f=(C,p)=>{const x=new Date(C),g=p.split(":"),d=Number(g[0]),m=Number(g[1]);return x.setHours(x.getHours()+d),x.setMinutes(x.getMinutes()+m),x},u=(C,p)=>{const x=new Date(p),g=l(C.startAt,C.finishAt),d=f(p,g);return{id:C.id,startAt:x,finishAt:d}},b=async(C,p,x)=>{try{const{startAt:g,finishAt:d}=u(C,p);r(C,g,d,x),await o(C,p,x,{id:C.id,startAt:g,finishAt:d})}catch(g){console.warn(g)}},y=C=>{const{over:p,active:x}=C;if(p&&x){const g=p.data.current,d=x.data.current;d&&g&&g.accepts.includes(d.type)&&d.booking.id&&p.id&&b(d.booking,String(p.id),d.slotData)}};return R.useEffect(()=>{n({user:Vw,booking:e})},[e,n]),h.jsx("div",{className:"calendarHolder",children:h.jsx(ed,{...Sa,children:h.jsxs("div",{className:"calendarHolder_parent",children:[h.jsx($y,{}),h.jsxs("div",{className:"calendarHolder_parent_content",children:[h.jsx(Op,{daysOfWeek:a,bookingViewType:i}),h.jsx(ns,{onDragEnd:y,onDragStart:c,sensors:s,children:h.jsx(Hw,{bookingViewType:i})})]})]})})})},Uw=({viewModes:e,createBookingModal:t,onChangeViewType:n,onCardDropCallback:r,onDayChange:o,onHeaderDayClick:s,onTodayClick:i,onSlotClick:a,onModalClose:c,bookings:l,ref:f})=>{const u=R.useRef(null),{setBookingViewType:b,setWeekAndViewType:y,setTodayDayAndViewType:C,bookingViewType:p}=Oe(),{setSelectedNode:x}=Ht(d=>d),g=d=>{var m;(m=u==null?void 0:u.current)==null||m.updateFinishAt(d)};return R.useImperativeHandle(f,()=>({updateViewType:d=>b(d),updateWeekAndViewType:d=>y(d),updateTodayDayAndViewType:d=>C(d),updateSelectedNode:d=>x(d),updateFinishAt:d=>g(d)})),R.useEffect(()=>{n(p)},[p]),h.jsx(Zu,{...ba,children:h.jsx(Ju,{createBookingModal:t,viewModes:e,onHeaderDayClick:s,onTodayClick:i,onCardDropCallback:r,onDayChange:o,onSlotClick:a,onModalClose:c,bookings:l,children:h.jsx(hd,{ref:u,...Eo,children:h.jsx(Yw,{})})})})},Kw=e=>{const t=R.useRef(null);return{getCalendar:()=>h.jsx(Uw,{ref:t,...e}),updateViewType:c=>{if(!(t!=null&&t.current))throw new nn;t.current.updateViewType(c)},updateWeekAndViewType:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateWeekAndViewType(c)},updateTodayDayAndViewType:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateTodayDayAndViewType(c)},updateSelectedNode:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateSelectedNode(c)},updateFinishAt:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateFinishAt(c)}}};exports.useCalendarInstance=Kw;