react-beauty-calendar 1.0.8 → 1.2.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.
Files changed (41) hide show
  1. package/dist/@types/calendar-instance.d.ts +10 -3
  2. package/dist/build/assets/main.css +1 -1
  3. package/dist/build/main.cjs.js +46 -37
  4. package/dist/build/main.es.js +7592 -7113
  5. package/dist/components/ui/Badge.d.ts +9 -0
  6. package/dist/components/ui/Button.d.ts +1 -1
  7. package/dist/context/drag/dragStore.d.ts +4 -4
  8. package/dist/context/drag/useDragStateAtStore.d.ts +8 -0
  9. package/dist/context/global/config/ConfigProvider.d.ts +5 -0
  10. package/dist/context/global/config/config-context.d.ts +2 -0
  11. package/dist/context/global/config/config-store.d.ts +13 -0
  12. package/dist/context/global/days-and-week/day-and-week-store.d.ts +2 -0
  13. package/dist/context/index.d.ts +3 -1
  14. package/dist/context/new-event/new-event-store.d.ts +2 -0
  15. package/dist/core/Root.d.ts +1 -1
  16. package/dist/core/booking-card/BookingCard.d.ts +9 -2
  17. package/dist/core/booking-create/BookingCreate.d.ts +17 -0
  18. package/dist/core/calendar/CalendarHolder.d.ts +4 -1
  19. package/dist/core/calendar/HourWithActions.d.ts +0 -1
  20. package/dist/core/calendar/ViewTypes.d.ts +3 -5
  21. package/dist/core/card-slots/SlotTrigger.d.ts +1 -2
  22. package/dist/core/header-calendar/HeaderTodayAction.d.ts +1 -2
  23. package/dist/core/slots/Card.d.ts +5 -3
  24. package/dist/core/slots/CardBlockContent.d.ts +8 -0
  25. package/dist/core/slots/CardContent.d.ts +9 -2
  26. package/dist/core/slots/CardOverlay.d.ts +1 -1
  27. package/dist/core/slots/EventsTab.d.ts +4 -5
  28. package/dist/core/slots/SlotRender.d.ts +14 -0
  29. package/dist/core/slots/Slots.d.ts +2 -3
  30. package/dist/core/slots/TimeInfo.d.ts +6 -1
  31. package/dist/core/slots/actualTimeIndicator/ActualTimeIndicator.d.ts +2 -2
  32. package/dist/core/slots/actualTimeIndicator/FirstDaySlot.d.ts +6 -0
  33. package/dist/core/slots/actualTimeIndicator/position-based-on-seconds.d.ts +1 -3
  34. package/dist/core/slots/innerCardHandle/inner-card-handle.d.ts +5 -0
  35. package/dist/core/slots/useResizableCardHook.d.ts +4 -0
  36. package/dist/hooks/use-booking-model.d.ts +1 -1
  37. package/dist/hooks/useGlobalConfig.d.ts +3 -0
  38. package/dist/mock/booking-mock.d.ts +2 -1
  39. package/dist/utils/date-utils.d.ts +4 -0
  40. package/dist/utils/hours.d.ts +1 -1
  41. package/package.json +14 -13
@@ -1,108 +1,113 @@
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 id=Object.defineProperty;var ad=(e,t,n)=>t in e?id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xt=(e,t,n)=>ad(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),R=require("react"),Ze=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),Tr=Ma(Ze);class cd extends ReferenceError{constructor(t="Calendar instance is not initialized. Ensure the calendar is rendered before calling this method."){super(t),this.name="ReferenceErrorCustom"}}const ni=e=>{let t;const n=new Set,r=(l,d)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const v=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(h=>h(t,v))}},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},Tn=e=>e?ni(e):ni,ld=e=>e;function Rr(e,t=ld){const n=R.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return R.useDebugValue(n),n}const ri=e=>{const t=Tn(e),n=r=>Rr(t,r);return Object.assign(n,t),n},Mr=e=>e?ri(e):ri,ka={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},ud=e=>Tn(t=>({...ka,...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)}))})),Oa=6e4,dd=36e5,oi=Symbol.for("constructDateFrom");function es(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&oi in e?e[oi](t):e instanceof Date?new e.constructor(t):new Date(t)}function ko(e,t){return es(e,e)}function Pa(e,...t){const n=es.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function fd(e,t,n){const r=ko(e);return r.setTime(r.getTime()+t*Oa),r}function _a(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function pd(e,t,n){const[r,o]=Pa(n==null?void 0:n.in,e,t),s=(+r-+o)/dd;return _a(n==null?void 0:n.roundingMethod)(s)}function hd(e,t){return+ko(e)-+ko(t)}function gd(e,t,n){const r=hd(e,t)/Oa;return _a(n==null?void 0:n.roundingMethod)(r)}function md(e,t){const[n,r]=Pa(e,t.start,t.end);return{start:n,end:r}}function vd(e,t){const{start:n,end:r}=md(t==null?void 0:t.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setMinutes(0,0,0);let a=1;const c=[];for(;+i<=s;)c.push(es(n,i)),i.setHours(i.getHours()+a);return o?c.reverse():c}function yd(e,t,n){return fd(e,-t)}function bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wd(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 ir={exports:{}},xd=ir.exports,si;function Sd(){return si||(si=1,function(e,t){(function(n,r){e.exports=r()})(xd,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",d="week",u="month",v="quarter",h="year",C="date",g="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,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(L){var $=["th","st","nd","rd"],k=L%100;return"["+L+($[(k-20)%10]||$[k]||$[0])+"]"}},w=function(L,$,k){var I=String(L);return!I||I.length>=$?L:""+Array($+1-I.length).join(k)+L},D={s:w,z:function(L){var $=-L.utcOffset(),k=Math.abs($),I=Math.floor(k/60),O=k%60;return($<=0?"+":"-")+w(I,2,"0")+":"+w(O,2,"0")},m:function L($,k){if($.date()<k.date())return-L(k,$);var I=12*(k.year()-$.year())+(k.month()-$.month()),O=$.clone().add(I,u),j=k-O<0,P=$.clone().add(I+(j?-1:1),u);return+(-(I+(k-O)/(j?O-P:P-O))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:u,y:h,w:d,d:l,D:C,h:c,m:a,s:i,ms:s,Q:v}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},m="en",T={};T[m]=f;var b="$isDayjsObject",E=function(L){return L instanceof W||!(!L||!L[b])},M=function L($,k,I){var O;if(!$)return m;if(typeof $=="string"){var j=$.toLowerCase();T[j]&&(O=j),k&&(T[j]=k,O=j);var P=$.split("-");if(!O&&P.length>1)return L(P[0])}else{var F=$.name;T[F]=$,O=F}return!I&&O&&(m=O),O||!I&&m},N=function(L,$){if(E(L))return L.clone();var k=typeof $=="object"?$:{};return k.date=L,k.args=arguments,new W(k)},A=D;A.l=M,A.i=E,A.w=function(L,$){return N(L,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var W=function(){function L(k){this.$L=M(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[b]=!0}var $=L.prototype;return $.parse=function(k){this.$d=function(I){var O=I.date,j=I.utc;if(O===null)return new Date(NaN);if(A.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var P=O.match(x);if(P){var F=P[2]-1||0,U=(P[7]||"0").substring(0,3);return j?new Date(Date.UTC(P[1],F,P[3]||1,P[4]||0,P[5]||0,P[6]||0,U)):new Date(P[1],F,P[3]||1,P[4]||0,P[5]||0,P[6]||0,U)}}return new Date(O)}(k),this.init()},$.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()},$.$utils=function(){return A},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(k,I){var O=N(k);return this.startOf(I)<=O&&O<=this.endOf(I)},$.isAfter=function(k,I){return N(k)<this.startOf(I)},$.isBefore=function(k,I){return this.endOf(I)<N(k)},$.$g=function(k,I,O){return A.u(k)?this[I]:this.set(O,k)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(k,I){var O=this,j=!!A.u(I)||I,P=A.p(k),F=function(q,B){var te=A.w(O.$u?Date.UTC(O.$y,B,q):new Date(O.$y,B,q),O);return j?te:te.endOf(l)},U=function(q,B){return A.w(O.toDate()[q].apply(O.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(B)),O)},V=this.$W,H=this.$M,X=this.$D,K="set"+(this.$u?"UTC":"");switch(P){case h:return j?F(1,0):F(31,11);case u:return j?F(1,H):F(0,H+1);case d:var z=this.$locale().weekStart||0,G=(V<z?V+7:V)-z;return F(j?X-G:X+(6-G),H);case l:case C:return U(K+"Hours",0);case c:return U(K+"Minutes",1);case a:return U(K+"Seconds",2);case i:return U(K+"Milliseconds",3);default:return this.clone()}},$.endOf=function(k){return this.startOf(k,!1)},$.$set=function(k,I){var O,j=A.p(k),P="set"+(this.$u?"UTC":""),F=(O={},O[l]=P+"Date",O[C]=P+"Date",O[u]=P+"Month",O[h]=P+"FullYear",O[c]=P+"Hours",O[a]=P+"Minutes",O[i]=P+"Seconds",O[s]=P+"Milliseconds",O)[j],U=j===l?this.$D+(I-this.$W):I;if(j===u||j===h){var V=this.clone().set(C,1);V.$d[F](U),V.init(),this.$d=V.set(C,Math.min(this.$D,V.daysInMonth())).$d}else F&&this.$d[F](U);return this.init(),this},$.set=function(k,I){return this.clone().$set(k,I)},$.get=function(k){return this[A.p(k)]()},$.add=function(k,I){var O,j=this;k=Number(k);var P=A.p(I),F=function(H){var X=N(j);return A.w(X.date(X.date()+Math.round(H*k)),j)};if(P===u)return this.set(u,this.$M+k);if(P===h)return this.set(h,this.$y+k);if(P===l)return F(1);if(P===d)return F(7);var U=(O={},O[a]=r,O[c]=o,O[i]=n,O)[P]||1,V=this.$d.getTime()+k*U;return A.w(V,this)},$.subtract=function(k,I){return this.add(-1*k,I)},$.format=function(k){var I=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var j=k||"YYYY-MM-DDTHH:mm:ssZ",P=A.z(this),F=this.$H,U=this.$m,V=this.$M,H=O.weekdays,X=O.months,K=O.meridiem,z=function(B,te,_,ne){return B&&(B[te]||B(I,j))||_[te].slice(0,ne)},G=function(B){return A.s(F%12||12,B,"0")},q=K||function(B,te,_){var ne=B<12?"AM":"PM";return _?ne.toLowerCase():ne};return j.replace(y,function(B,te){return te||function(_){switch(_){case"YY":return String(I.$y).slice(-2);case"YYYY":return A.s(I.$y,4,"0");case"M":return V+1;case"MM":return A.s(V+1,2,"0");case"MMM":return z(O.monthsShort,V,X,3);case"MMMM":return z(X,V);case"D":return I.$D;case"DD":return A.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return z(O.weekdaysMin,I.$W,H,2);case"ddd":return z(O.weekdaysShort,I.$W,H,3);case"dddd":return H[I.$W];case"H":return String(F);case"HH":return A.s(F,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return q(F,U,!0);case"A":return q(F,U,!1);case"m":return String(U);case"mm":return A.s(U,2,"0");case"s":return String(I.$s);case"ss":return A.s(I.$s,2,"0");case"SSS":return A.s(I.$ms,3,"0");case"Z":return P}return null}(B)||P.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(k,I,O){var j,P=this,F=A.p(I),U=N(k),V=(U.utcOffset()-this.utcOffset())*r,H=this-U,X=function(){return A.m(P,U)};switch(F){case h:j=X()/12;break;case u:j=X();break;case v:j=X()/3;break;case d:j=(H-V)/6048e5;break;case l:j=(H-V)/864e5;break;case c:j=H/o;break;case a:j=H/r;break;case i:j=H/n;break;default:j=H}return O?j:A.a(j)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return T[this.$L]},$.locale=function(k,I){if(!k)return this.$L;var O=this.clone(),j=M(k,I,!0);return j&&(O.$L=j),O},$.clone=function(){return A.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},L}(),Y=W.prototype;return N.prototype=Y,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",h],["$D",C]].forEach(function(L){Y[L[1]]=function($){return this.$g($,L[0],L[1])}}),N.extend=function(L,$){return L.$i||(L($,W,N),L.$i=!0),N},N.locale=M,N.isDayjs=E,N.unix=function(L){return N(1e3*L)},N.en=T[m],N.Ls=T,N.p={},N})}(ir)),ir.exports}var Cd=Sd();const ii=bd(Cd),re={DAY:"day",WEEK:"week",TABLE:"table",MONTH:"month"},Wt=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Oo=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ed=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],Q={findIndexToStart(e=new Date){const t=Oo[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return Oo.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}`},getTimeDiff(e,t){const n=Number(new Date(t))-Number(new Date(e)),r=Math.floor(n/1e3/60),o=Math.floor(r/60),s=r%60;return`${o}:${s.toString().padStart(2,"0")}`},bookingTimeRange:(e,t)=>{const n=Q.getTimeDiff(e.startAt,e.finishAt),r=Q.getNewFinishAt(t,n);return{id:e.id,startAt:new Date(t),finishAt:r}},getNewFinishAt(e,t){const n=new Date(e),r=t.split(":"),o=Number(r[0]),s=Number(r[1]);return n.setHours(n.getHours()+o),n.setMinutes(n.getMinutes()+s),n},minuteDifference(e,t){return gd(e,t)},dateAndHourDateToString(e){const t=new Date(e);return`${t.getHours().toLocaleString().padStart(2,"0")}:${t.getMinutes().toLocaleString().padStart(2,"0")}`},shortMonthDescription(...e){return`${Wt[e[0].getMonth()].slice(0,3)} - ${Wt[e[1].getMonth()].slice(0,3)}`},timeDiffInSeconds(e,t){const n=ii(e),r=ii(t);return n.diff(r)/6e4},subtractMinutes(e,t){return yd(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.toString()},addMinutesToHour(e,t){const n=Q.hourMinutesStringToDate(e),r=Q.addMinutesToDate(n,t);return Q.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}=Q.firstAndLastWeekDays(e),r=t.getMonth();return r!==n.getMonth()?Q.shortMonthDescription(t,n):Wt[r]}},Dd=(e,t)=>{const n=vd({start:new Date(2014,9,6,e),end:new Date(2014,9,6,t)});return Object.values(n).map(r=>`${String(r.getHours()).padStart(2,"0")}:00`)},Aa=1,Na=24,Td=Q.generateWeekDays(),Rd=(e,t)=>({hours:Dd(Aa,Na),daysOfWeek:Td.week,timesRendered:new Map,setTodayDay:n=>{const r=Q.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}=Q.generateWeekDays(n);return r=s,{...o,daysOfWeek:s}}),r},nextWeek:()=>{const n=Q.addDay(t().getWeek().lastDayOfWeek,1);let r=[];const{week:o}=Q.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},previousWeek:()=>{const n=Q.addDay(t().getWeek().firstDayOfWeek,-1);let r=[];const{week:o}=Q.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},setDays:n=>{const r=t().daysOfWeek[0];if(!r)return[];const o=Q.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})})}}),dr=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}`},Mt=Mr((e,t)=>({emptySlotNodes:new Map,selectedNode:"",setEmptySlotNode:(n,r)=>{e(o=>{const s=new Map(o.emptySlotNodes),u=(pd(new Date(`1970/01/01 ${Na}`),new Date(2014,6,0,Number(Aa),0))+2)*4*7-1;s.size>u&&s.clear();const h=dr(r);return s.set(h,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:""}))})),Po={date:"",startAt:"",finishAt:"",slotStartAt:""},Md=e=>Tn((t,n)=>({...Po,...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=Q.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})),updatePrevStartAt:r=>t(o=>({...o,slotStartAt:r})),resetForm:()=>t(Po)})),kd=(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)}}),Od=(e,t)=>({setWeekAndViewType:n=>{const r=t().todayWeek(n);return t().setBookingViewType(re.WEEK),Q.firstAndLastWeekDays(r)},setTodayDayAndViewType:n=>{const r=t().setTodayDay(n);return t().setBookingViewType(re.DAY),r}}),xe=Mr()((...e)=>({...Rd(...e),...kd(...e),...Od(...e)})),Ia=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o}=xe();return{onViewTypeChange:i=>{switch(i){case re.DAY:{e(re.DAY),n(r[0]);break}case re.WEEK:{e(re.WEEK),t(o().firstDayOfWeek);break}case re.TABLE:{e(re.TABLE),n(o().firstDayOfWeek);break}}}}},ja=R.createContext(null),La=e=>{const t=R.use(ja);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Rr(t,e)},Pd=R.createContext(null),$a=R.createContext(null),_d=({children:e,ref:t,...n})=>{const r=R.useRef(null);r.current||(r.current=Md(n));const o=s=>{var i;(i=r.current)==null||i.getState().updateFinishAt(s)};return R.useImperativeHandle(t,()=>({updateFinishAt:o})),p.jsx($a,{value:r.current,children:e})},ts=e=>{const t=R.use($a);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Rr(t,e)},kr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ns(e){return"nodeType"in e}function Ce(e){var t,n;return e?Gt(e)?e:ns(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function rs(e){const{Document:t}=Ce(e);return e instanceof t}function Rn(e){return Gt(e)?!1:e instanceof Ce(e).HTMLElement}function Fa(e){return e instanceof Ce(e).SVGElement}function qt(e){return e?Gt(e)?e.document:ns(e)?rs(e)?e:Rn(e)||Fa(e)?e.ownerDocument:document:document:document}const Je=kr?R.useLayoutEffect:R.useEffect;function Or(e){const t=R.useRef(e);return Je(()=>{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 Ad(){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 bn(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return Je(()=>{n.current!==e&&(n.current=e)},t),n}function Mn(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fr(e){const t=Or(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 pr(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let ro={};function Pr(e,t){return R.useMemo(()=>{if(t)return t;const n=ro[e]==null?0:ro[e]+1;return ro[e]=n,e+"-"+n},[e,t])}function za(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 Bt=za(1),hr=za(-1);function Nd(e){return"clientX"in e&&"clientY"in e}function os(e){if(!e)return!1;const{KeyboardEvent:t}=Ce(e.target);return t&&e instanceof t}function Id(e){if(!e)return!1;const{TouchEvent:t}=Ce(e.target);return t&&e instanceof t}function gr(e){if(Id(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 Nd(e)?{x:e.clientX,y:e.clientY}:null}const wn=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[wn.Translate.toString(e),wn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ai="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function jd(e){return e.matches(ai)?e:e.querySelector(ai)}const Ld={display:"none"};function $d(e){let{id:t,value:n}=e;return R.createElement("div",{id:t,style:Ld},n)}function Fd(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 zd(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Wa=R.createContext(null);function kn(e){const t=R.useContext(Wa);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Wd(){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 Bd={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
+ `},Hd={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 Vd(e){let{announcements:t=Hd,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Bd}=e;const{announce:s,announcement:i}=zd(),a=Pr("DndLiveRegion"),[c,l]=R.useState(!1);if(R.useEffect(()=>{l(!0)},[]),kn(R.useMemo(()=>({onDragStart(u){let{active:v}=u;s(t.onDragStart({active:v}))},onDragMove(u){let{active:v,over:h}=u;t.onDragMove&&s(t.onDragMove({active:v,over:h}))},onDragOver(u){let{active:v,over:h}=u;s(t.onDragOver({active:v,over:h}))},onDragEnd(u){let{active:v,over:h}=u;s(t.onDragEnd({active:v,over:h}))},onDragCancel(u){let{active:v,over:h}=u;s(t.onDragCancel({active:v,over:h}))}}),[s,t])),!c)return null;const d=R.createElement(R.Fragment,null,R.createElement($d,{id:r,value:o.draggable}),R.createElement(Fd,{id:a,announcement:i}));return n?Ze.createPortal(d,n):d}var ge;(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"})(ge||(ge={}));function mr(){}function ci(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Ud(){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 $e=Object.freeze({x:0,y:0});function Yd(e,t){const n=gr(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 Kd(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Gd(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function qd(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 Xd=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=qd(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(Kd)};function Zd(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ba(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:$e}function Jd(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 Qd=Jd(1);function Ha(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 ef(e,t,n){const r=Ha(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 tf={ignoreTransform:!1};function On(e,t){t===void 0&&(t=tf);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:d}=Ce(e).getComputedStyle(e);l&&(n=ef(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 li(e){return On(e,{ignoreTransform:!0})}function nf(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function rf(e,t){return t===void 0&&(t=Ce(e).getComputedStyle(e)),t.position==="fixed"}function of(e,t){t===void 0&&(t=Ce(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 ss(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(rs(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Rn(o)||Fa(o)||n.includes(o))return n;const s=Ce(e).getComputedStyle(o);return o!==e&&of(o,s)&&n.push(o),rf(o,s)?n:r(o.parentNode)}return e?r(e):n}function Va(e){const[t]=ss(e,1);return t??null}function oo(e){return!kr||!e?null:Gt(e)?e:ns(e)?rs(e)||e===qt(e).scrollingElement?window:Rn(e)?e:null:null}function Ua(e){return Gt(e)?e.scrollX:e.scrollLeft}function Ya(e){return Gt(e)?e.scrollY:e.scrollTop}function _o(e){return{x:Ua(e),y:Ya(e)}}var me;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(me||(me={}));function Ka(e){return!kr||!e?!1:e===document.scrollingElement}function Ga(e){const t={x:0,y:0},n=Ka(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 sf={x:.2,y:.2};function af(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=sf);const{isTop:l,isBottom:d,isLeft:u,isRight:v}=Ga(e),h={x:0,y:0},C={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+g.height?(h.y=me.Backward,C.y=r*Math.abs((t.top+g.height-s)/g.height)):!d&&c>=t.bottom-g.height&&(h.y=me.Forward,C.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!v&&a>=t.right-g.width?(h.x=me.Forward,C.x=r*Math.abs((t.right-g.width-a)/g.width)):!u&&i<=t.left+g.width&&(h.x=me.Backward,C.x=r*Math.abs((t.left+g.width-i)/g.width)),{direction:h,speed:C}}function cf(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 qa(e){return e.reduce((t,n)=>Bt(t,_o(n)),$e)}function lf(e){return e.reduce((t,n)=>t+Ua(n),0)}function uf(e){return e.reduce((t,n)=>t+Ya(n),0)}function Xa(e,t){if(t===void 0&&(t=On),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Va(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const df=[["x",["left","right"],lf],["y",["top","bottom"],uf]];class is{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=ss(n),o=qa(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of df)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 mn{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 ff(e){const{EventTarget:t}=Ce(e);return e instanceof t?e:qt(e)}function so(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 Pe;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Pe||(Pe={}));function ui(e){e.preventDefault()}function pf(e){e.stopPropagation()}var de;(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"})(de||(de={}));const Za={start:[de.Space,de.Enter],cancel:[de.Esc],end:[de.Space,de.Enter,de.Tab]},hf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case de.Right:return{...n,x:n.x+25};case de.Left:return{...n,x:n.x-25};case de.Down:return{...n,y:n.y+25};case de.Up:return{...n,y:n.y-25}}};class Ja{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 mn(qt(n)),this.windowListeners=new mn(Ce(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Pe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Xa(r),n($e)}handleKeyDown(t){if(os(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Za,coordinateGetter:i=hf,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}:$e;this.referenceCoordinates||(this.referenceCoordinates=d);const u=i(t,{active:n,context:r.current,currentCoordinates:d});if(u){const v=hr(u,d),h={x:0,y:0},{scrollableAncestors:C}=r.current;for(const g of C){const x=t.code,{isTop:y,isRight:f,isLeft:w,isBottom:D,maxScroll:m,minScroll:T}=Ga(g),b=cf(g),E={x:Math.min(x===de.Right?b.right-b.width/2:b.right,Math.max(x===de.Right?b.left:b.left+b.width/2,u.x)),y:Math.min(x===de.Down?b.bottom-b.height/2:b.bottom,Math.max(x===de.Down?b.top:b.top+b.height/2,u.y))},M=x===de.Right&&!f||x===de.Left&&!w,N=x===de.Down&&!D||x===de.Up&&!y;if(M&&E.x!==u.x){const A=g.scrollLeft+v.x,W=x===de.Right&&A<=m.x||x===de.Left&&A>=T.x;if(W&&!v.y){g.scrollTo({left:A,behavior:a});return}W?h.x=g.scrollLeft-A:h.x=x===de.Right?g.scrollLeft-m.x:g.scrollLeft-T.x,h.x&&g.scrollBy({left:-h.x,behavior:a});break}else if(N&&E.y!==u.y){const A=g.scrollTop+v.y,W=x===de.Down&&A<=m.y||x===de.Up&&A>=T.y;if(W&&!v.x){g.scrollTo({top:A,behavior:a});return}W?h.y=g.scrollTop-A:h.y=x===de.Down?g.scrollTop-m.y:g.scrollTop-T.y,h.y&&g.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,Bt(hr(u,this.referenceCoordinates),h))}}}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()}}Ja.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Za,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 di(e){return!!(e&&"distance"in e)}function fi(e){return!!(e&&"delay"in e)}class as{constructor(t,n,r){var o;r===void 0&&(r=ff(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=qt(i),this.documentListeners=new mn(this.document),this.listeners=new mn(r),this.windowListeners=new mn(Ce(i)),this.initialCoordinates=(o=gr(s))!=null?o:$e,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(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.DragStart,ui),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),this.windowListeners.add(Pe.ContextMenu,ui),this.documentListeners.add(Pe.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(fi(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(di(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(Pe.Click,pf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Pe.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=gr(t))!=null?n:$e,l=hr(o,c);if(!r&&a){if(di(a)){if(a.tolerance!=null&&so(l,a.tolerance))return this.handleCancel();if(so(l,a.distance))return this.handleStart()}if(fi(a)&&so(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===de.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const gf={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Qa extends as{constructor(t){const{event:n}=t,r=qt(n.target);super(t,gf,r)}}Qa.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 mf={move:{name:"mousemove"},end:{name:"mouseup"}};var Ao;(function(e){e[e.RightClick=2]="RightClick"})(Ao||(Ao={}));class ec extends as{constructor(t){super(t,mf,qt(t.event.target))}}ec.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Ao.RightClick?!1:(r==null||r({event:n}),!0)}}];const io={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class tc extends as{constructor(t){super(t,io)}static setup(){return window.addEventListener(io.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(io.move.name,t)};function t(){}}}tc.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 vn;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(vn||(vn={}));var vr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(vr||(vr={}));function vf(e){let{acceleration:t,activator:n=vn.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=vr.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:u,threshold:v}=e;const h=bf({delta:u,disabled:!s}),[C,g]=Ad(),x=R.useRef({x:0,y:0}),y=R.useRef({x:0,y:0}),f=R.useMemo(()=>{switch(n){case vn.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case vn.DraggableRect:return o}},[n,o,c]),w=R.useRef(null),D=R.useCallback(()=>{const T=w.current;if(!T)return;const b=x.current.x*y.current.x,E=x.current.y*y.current.y;T.scrollBy(b,E)},[]),m=R.useMemo(()=>a===vr.TreeOrder?[...l].reverse():l,[a,l]);R.useEffect(()=>{if(!s||!l.length||!f){g();return}for(const T of m){if((r==null?void 0:r(T))===!1)continue;const b=l.indexOf(T),E=d[b];if(!E)continue;const{direction:M,speed:N}=af(T,E,f,t,v);for(const A of["x","y"])h[A][M[A]]||(N[A]=0,M[A]=0);if(N.x>0||N.y>0){g(),w.current=T,C(D,i),x.current=N,y.current=M;return}}x.current={x:0,y:0},y.current={x:0,y:0},g()},[t,D,r,g,s,i,JSON.stringify(f),JSON.stringify(h),C,l,m,d,JSON.stringify(v)])}const yf={x:{[me.Backward]:!1,[me.Forward]:!1},y:{[me.Backward]:!1,[me.Forward]:!1}};function bf(e){let{delta:t,disabled:n}=e;const r=pr(t);return Mn(o=>{if(n||!r||!o)return yf;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[me.Backward]:o.x[me.Backward]||s.x===-1,[me.Forward]:o.x[me.Forward]||s.x===1},y:{[me.Backward]:o.y[me.Backward]||s.y===-1,[me.Forward]:o.y[me.Forward]||s.y===1}}},[n,t,r])}function wf(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Mn(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function xf(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 xn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(xn||(xn={}));var No;(function(e){e.Optimized="optimized"})(No||(No={}));const pi=new Map;function Sf(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=x(),v=bn(u),h=R.useCallback(function(y){y===void 0&&(y=[]),!v.current&&i(f=>f===null?y:f.concat(y.filter(w=>!f.includes(w))))},[v]),C=R.useRef(null),g=Mn(y=>{if(u&&!n)return pi;if(!y||y===pi||d.current!==e||s!=null){const f=new Map;for(let w of e){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){f.set(w.id,w.rect.current);continue}const D=w.node.current,m=D?new is(c(D),D):null;w.rect.current=m,m&&f.set(w.id,m)}return f}return y},[e,s,n,u,c]);return R.useEffect(()=>{d.current=e},[e]),R.useEffect(()=>{u||h()},[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(()=>{h(),C.current=null},a))},[a,u,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:s!=null};function x(){switch(l){case xn.Always:return!1;case xn.BeforeDragging:return n;default:return!n}}}function cs(e,t){return Mn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Cf(e,t){return cs(e,t)}function Ef(e){let{callback:t,disabled:n}=e;const r=Or(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 _r(e){let{callback:t,disabled:n}=e;const r=Or(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 Df(e){return new is(On(e),e)}function hi(e,t,n){t===void 0&&(t=Df);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=Ef({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=_r({callback:s});return Je(()=>{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 Tf(e){const t=cs(e);return Ba(e,t)}const gi=[];function Rf(e){const t=R.useRef(e),n=Mn(r=>e?r&&r!==gi&&e&&t.current&&e.parentNode===t.current.parentNode?r:ss(e):gi,[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=oo(s.target);i&&n(a=>a?(a.set(i,_o(i)),new Map(a)):null)},[]);return R.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=oo(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,_o(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=oo(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>Bt(s,i),$e):qa(e):$e,[e,t])}function mi(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==$e;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?hr(e,n.current):$e}function kf(e){R.useEffect(()=>{if(!kr)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 Of(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 nc(e){return R.useMemo(()=>e?nf(e):null,[e])}const vi=[];function Pf(e,t){t===void 0&&(t=On);const[n]=e,r=nc(n?Ce(n):null),[o,s]=R.useState(vi);function i(){s(()=>e.length?e.map(c=>Ka(c)?r:new is(t(c),c)):vi)}const a=_r({callback:i});return Je(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function rc(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Rn(t)?t:e}function _f(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(l=>{for(const{target:d}of l)if(Rn(d)){r(u=>{const v=t(d);return u?{...u,width:v.width,height:v.height}:v});break}},[t]),s=_r({callback:o}),i=R.useCallback(l=>{const d=rc(l);s==null||s.disconnect(),d&&(s==null||s.observe(d)),r(d?t(d):null)},[t,s]),[a,c]=fr(i);return R.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Af=[{sensor:Qa,options:{}},{sensor:Ja,options:{}}],Nf={current:{}},ar={draggable:{measure:li},droppable:{measure:li,strategy:xn.WhileDragging,frequency:No.Optimized},dragOverlay:{measure:On}};class yn 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 If={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:mr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ar,measureDroppableContainers:mr,windowRect:null,measuringScheduled:!1},oc={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:mr,draggableNodes:new Map,over:null,measureDroppableContainers:mr},Pn=R.createContext(oc),sc=R.createContext(If);function jf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yn}}}function Lf(e,t){switch(t.type){case ge.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ge.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 ge.DragEnd:case ge.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ge.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new yn(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case ge.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 yn(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case ge.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new yn(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function $f(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(Pn),s=pr(r),i=pr(n==null?void 0:n.id);return R.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!os(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=jd(d);if(u){u.focus();break}}})}},[r,t,o,i,s]),null}function ic(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function Ff(e){return R.useMemo(()=>({draggable:{...ar.draggable,...e==null?void 0:e.draggable},droppable:{...ar.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ar.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 zf(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;Je(()=>{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=Ba(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 v=Va(l);v&&v.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Ar=R.createContext({...$e,scaleX:1,scaleY:1});var dt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(dt||(dt={}));const ls=R.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:d=Af,collisionDetection:u=Xd,measuring:v,modifiers:h,...C}=t;const g=R.useReducer(Lf,void 0,jf),[x,y]=g,[f,w]=Wd(),[D,m]=R.useState(dt.Uninitialized),T=D===dt.Initialized,{draggable:{active:b,nodes:E,translate:M},droppable:{containers:N}}=x,A=b!=null?E.get(b):null,W=R.useRef({initial:null,translated:null}),Y=R.useMemo(()=>{var be;return b!=null?{id:b,data:(be=A==null?void 0:A.data)!=null?be:Nf,rect:W}:null},[b,A]),L=R.useRef(null),[$,k]=R.useState(null),[I,O]=R.useState(null),j=bn(C,Object.values(C)),P=Pr("DndDescribedBy",i),F=R.useMemo(()=>N.getEnabled(),[N]),U=Ff(v),{droppableRects:V,measureDroppableContainers:H,measuringScheduled:X}=Sf(F,{dragging:T,dependencies:[M.x,M.y],config:U.droppable}),K=wf(E,b),z=R.useMemo(()=>I?gr(I):null,[I]),G=sd(),q=Cf(K,U.draggable.measure);zf({activeNode:b!=null?E.get(b):null,config:G.layoutShiftCompensation,initialRect:q,measure:U.draggable.measure});const B=hi(K,U.draggable.measure,q),te=hi(K?K.parentElement:null),_=R.useRef({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=N.getNodeFor((n=_.current.over)==null?void 0:n.id),ae=_f({measure:U.dragOverlay.measure}),fe=(r=ae.nodeRef.current)!=null?r:K,ve=T?(o=ae.rect)!=null?o:B:null,Ne=!!(ae.nodeRef.current&&ae.rect),Pt=Tf(Ne?null:B),Ie=nc(fe?Ce(fe):null),je=Rf(T?ne??K:null),_t=Pf(je),At=ic(h,{transform:{x:M.x-Pt.x,y:M.y-Pt.y,scaleX:1,scaleY:1},activatorEvent:I,active:Y,activeNodeRect:B,containerNodeRect:te,draggingNodeRect:ve,over:_.current.over,overlayNodeRect:ae.rect,scrollableAncestors:je,scrollableAncestorRects:_t,windowRect:Ie}),Wn=z?Bt(z,M):null,Bn=Mf(je),Xs=mi(Bn),Zs=mi(Bn,[B]),Nt=Bt(At,Xs),It=ve?Qd(ve,At):null,nn=Y&&It?u({active:Y,collisionRect:It,droppableRects:V,droppableContainers:F,pointerCoordinates:Wn}):null,Js=Gd(nn,"id"),[rt,Qs]=R.useState(null),ed=Ne?At:Bt(At,Zs),td=Zd(ed,(s=rt==null?void 0:rt.rect)!=null?s:null,B),to=R.useRef(null),ei=R.useCallback((be,De)=>{let{sensor:Te,options:ot}=De;if(L.current==null)return;const Oe=E.get(L.current);if(!Oe)return;const Re=be.nativeEvent,We=new Te({active:L.current,activeNode:Oe,event:Re,options:ot,context:_,onAbort(ye){if(!E.get(ye))return;const{onDragAbort:Be}=j.current,Ge={id:ye};Be==null||Be(Ge),f({type:"onDragAbort",event:Ge})},onPending(ye,st,Be,Ge){if(!E.get(ye))return;const{onDragPending:on}=j.current,it={id:ye,constraint:st,initialCoordinates:Be,offset:Ge};on==null||on(it),f({type:"onDragPending",event:it})},onStart(ye){const st=L.current;if(st==null)return;const Be=E.get(st);if(!Be)return;const{onDragStart:Ge}=j.current,rn={activatorEvent:Re,active:{id:st,data:Be.data,rect:W}};Ze.unstable_batchedUpdates(()=>{Ge==null||Ge(rn),m(dt.Initializing),y({type:ge.DragStart,initialCoordinates:ye,active:st}),f({type:"onDragStart",event:rn}),k(to.current),O(Re)})},onMove(ye){y({type:ge.DragMove,coordinates:ye})},onEnd:jt(ge.DragEnd),onCancel:jt(ge.DragCancel)});to.current=We;function jt(ye){return async function(){const{active:Be,collisions:Ge,over:rn,scrollAdjustedTranslate:on}=_.current;let it=null;if(Be&&on){const{cancelDrop:sn}=j.current;it={activatorEvent:Re,active:Be,collisions:Ge,delta:on,over:rn},ye===ge.DragEnd&&typeof sn=="function"&&await Promise.resolve(sn(it))&&(ye=ge.DragCancel)}L.current=null,Ze.unstable_batchedUpdates(()=>{y({type:ye}),m(dt.Uninitialized),Qs(null),k(null),O(null),to.current=null;const sn=ye===ge.DragEnd?"onDragEnd":"onDragCancel";if(it){const no=j.current[sn];no==null||no(it),f({type:sn,event:it})}})}}},[E]),nd=R.useCallback((be,De)=>(Te,ot)=>{const Oe=Te.nativeEvent,Re=E.get(ot);if(L.current!==null||!Re||Oe.dndKit||Oe.defaultPrevented)return;const We={active:Re};be(Te,De.options,We)===!0&&(Oe.dndKit={capturedBy:De.sensor},L.current=ot,ei(Te,De))},[E,ei]),ti=xf(d,nd);kf(d),Je(()=>{B&&D===dt.Initializing&&m(dt.Initialized)},[B,D]),R.useEffect(()=>{const{onDragMove:be}=j.current,{active:De,activatorEvent:Te,collisions:ot,over:Oe}=_.current;if(!De||!Te)return;const Re={active:De,activatorEvent:Te,collisions:ot,delta:{x:Nt.x,y:Nt.y},over:Oe};Ze.unstable_batchedUpdates(()=>{be==null||be(Re),f({type:"onDragMove",event:Re})})},[Nt.x,Nt.y]),R.useEffect(()=>{const{active:be,activatorEvent:De,collisions:Te,droppableContainers:ot,scrollAdjustedTranslate:Oe}=_.current;if(!be||L.current==null||!De||!Oe)return;const{onDragOver:Re}=j.current,We=ot.get(Js),jt=We&&We.rect.current?{id:We.id,rect:We.rect.current,data:We.data,disabled:We.disabled}:null,ye={active:be,activatorEvent:De,collisions:Te,delta:{x:Oe.x,y:Oe.y},over:jt};Ze.unstable_batchedUpdates(()=>{Qs(jt),Re==null||Re(ye),f({type:"onDragOver",event:ye})})},[Js]),Je(()=>{_.current={activatorEvent:I,active:Y,activeNode:K,collisionRect:It,collisions:nn,droppableRects:V,draggableNodes:E,draggingNode:fe,draggingNodeRect:ve,droppableContainers:N,over:rt,scrollableAncestors:je,scrollAdjustedTranslate:Nt},W.current={initial:ve,translated:It}},[Y,K,nn,It,E,fe,ve,V,N,rt,je,Nt]),vf({...G,delta:M,draggingRect:It,pointerCoordinates:Wn,scrollableAncestors:je,scrollableAncestorRects:_t});const rd=R.useMemo(()=>({active:Y,activeNode:K,activeNodeRect:B,activatorEvent:I,collisions:nn,containerNodeRect:te,dragOverlay:ae,draggableNodes:E,droppableContainers:N,droppableRects:V,over:rt,measureDroppableContainers:H,scrollableAncestors:je,scrollableAncestorRects:_t,measuringConfiguration:U,measuringScheduled:X,windowRect:Ie}),[Y,K,B,I,nn,te,ae,E,N,V,rt,H,je,_t,U,X,Ie]),od=R.useMemo(()=>({activatorEvent:I,activators:ti,active:Y,activeNodeRect:B,ariaDescribedById:{draggable:P},dispatch:y,draggableNodes:E,over:rt,measureDroppableContainers:H}),[I,ti,Y,B,y,P,E,rt,H]);return R.createElement(Wa.Provider,{value:w},R.createElement(Pn.Provider,{value:od},R.createElement(sc.Provider,{value:rd},R.createElement(Ar.Provider,{value:td},l)),R.createElement($f,{disabled:(a==null?void 0:a.restoreFocus)===!1})),R.createElement(Vd,{...a,hiddenTextDescribedById:P}));function sd(){const be=($==null?void 0:$.autoScrollEnabled)===!1,De=typeof c=="object"?c.enabled===!1:c===!1,Te=T&&!be&&!De;return typeof c=="object"?{...c,enabled:Te}:{enabled:Te}}}),Wf=R.createContext(null),yi="button",Bf="Draggable";function us(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Pr(Bf),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:u,over:v}=R.useContext(Pn),{role:h=yi,roleDescription:C="draggable",tabIndex:g=0}=o??{},x=(c==null?void 0:c.id)===t,y=R.useContext(x?Ar:Wf),[f,w]=fr(),[D,m]=fr(),T=Of(i,t),b=bn(n);Je(()=>(u.set(t,{id:t,key:s,node:f,activatorNode:D,data:b}),()=>{const M=u.get(t);M&&M.key===s&&u.delete(t)}),[u,t]);const E=R.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":x&&h===yi?!0:void 0,"aria-roledescription":C,"aria-describedby":d.draggable}),[r,h,g,x,C,d.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:E,isDragging:x,listeners:r?void 0:T,node:f,over:v,setNodeRef:w,setActivatorNodeRef:m,transform:y}}function Hf(){return R.useContext(sc)}const Vf="Droppable",Uf={timeout:25};function Hn(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Pr(Vf),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=R.useContext(Pn),d=R.useRef({disabled:n}),u=R.useRef(!1),v=R.useRef(null),h=R.useRef(null),{disabled:C,updateMeasurementsFor:g,timeout:x}={...Uf,...o},y=bn(g??r),f=R.useCallback(()=>{if(!u.current){u.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{l(Array.isArray(y.current)?y.current:[y.current]),h.current=null},x)},[x]),w=_r({callback:f,disabled:C||!i}),D=R.useCallback((E,M)=>{w&&(M&&(w.unobserve(M),u.current=!1),E&&w.observe(E))},[w]),[m,T]=fr(D),b=bn(t);return R.useEffect(()=>{!w||!m.current||(w.disconnect(),u.current=!1,w.observe(m.current))},[m,w]),R.useEffect(()=>(a({type:ge.RegisterDroppable,element:{id:r,key:s,disabled:n,node:m,rect:v,data:b}}),()=>a({type:ge.UnregisterDroppable,key:s,id:r})),[r]),R.useEffect(()=>{n!==d.current.disabled&&(a({type:ge.SetDroppableDisabled,id:r,key:s,disabled:n}),d.current.disabled=n)},[r,s,n,a]),{active:i,rect:v,isOver:(c==null?void 0:c.id)===r,node:m,over:c,setNodeRef:T}}function Yf(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[s,i]=R.useState(null),a=pr(n);return!n&&!r&&a&&o(a),Je(()=>{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 Kf={x:0,y:0,scaleX:1,scaleY:1};function Gf(e){let{children:t}=e;return R.createElement(Pn.Provider,{value:oc},R.createElement(Ar.Provider,{value:Kf},t))}const qf={position:"fixed",touchAction:"none"},Xf=e=>os(e)?"transform 250ms ease":void 0,Zf=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:d=Xf}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},v={...qf,width:a.width,height:a.height,top:a.top,left:a.left,transform:wn.Transform.toString(u),transformOrigin:o&&r?Yd(r,a):void 0,transition:typeof d=="function"?d(r):d,...c};return R.createElement(n,{className:i,style:v,ref:t},s)}),Jf=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)}},Qf=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:wn.Transform.toString(t)},{transform:wn.Transform.toString(n)}]},ep={duration:250,easing:"ease",keyframes:Qf,sideEffects:Jf({styles:{active:{opacity:"0"}}})};function tp(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Or((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=rc(i);if(!l)return;const{transform:d}=Ce(i).getComputedStyle(i),u=Ha(d);if(!u)return;const v=typeof t=="function"?t:np(t);return Xa(c,o.draggable.measure),v({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 np(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...ep,...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},v={x:c.x-d.x,y:c.y-d.y,...u},h=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:v}}),[C]=h,g=h[h.length-1];if(JSON.stringify(C)===JSON.stringify(g))return;const x=r==null?void 0:r({active:i,dragOverlay:a,...l}),y=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(f=>{y.onfinish=()=>{x==null||x(),f()}})}}let bi=0;function rp(e){return R.useMemo(()=>{if(e!=null)return bi++,bi},[e])}const op=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:v,containerNodeRect:h,draggableNodes:C,droppableContainers:g,dragOverlay:x,over:y,measuringConfiguration:f,scrollableAncestors:w,scrollableAncestorRects:D,windowRect:m}=Hf(),T=R.useContext(Ar),b=rp(u==null?void 0:u.id),E=ic(i,{activatorEvent:d,active:u,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:x.rect,over:y,overlayNodeRect:x.rect,scrollableAncestors:w,scrollableAncestorRects:D,transform:T,windowRect:m}),M=cs(v),N=tp({config:r,draggableNodes:C,droppableContainers:g,measuringConfiguration:f}),A=M?x.setRef:void 0;return R.createElement(Gf,null,R.createElement(Yf,{animation:N},u&&b?R.createElement(Zf,{key:b,id:u.id,ref:A,as:a,activatorEvent:d,adjustScale:t,className:c,transition:s,rect:M,style:{zIndex:l,...o},transform:E},n):null))});/**
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 sp=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 ip={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,...ip,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ac("lucide",o),...a},[...i.map(([l,d])=>R.createElement(l,d)),...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-${sp(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 cp=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],lp=we("Bookmark",cp);/**
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 up=[["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"}]],dp=we("CalendarCog",up);/**
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 fp=[["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"}]],pp=we("CalendarDays",fp);/**
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 hp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cc=we("Check",hp);/**
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 gp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],lc=we("ChevronDown",gp);/**
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 mp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],vp=we("ChevronLeft",mp);/**
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 yp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bp=we("ChevronRight",yp);/**
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 wp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xp=we("ChevronUp",wp);/**
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 Sp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Cp=we("CirclePlus",Sp);/**
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 Ep=[["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"}]],Dp=we("Columns4",Ep);/**
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 Tp=[["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"}]],Rp=we("GalleryVertical",Tp);/**
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 Mp=[["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"}]],kp=we("Grid3x3",Mp);/**
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 Op=[["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"}]],Pp=we("Pencil",Op);/**
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 _p=[["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"}]],Ap=we("SquareMousePointer",_p);/**
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 Np=[["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"}]],Ip=we("Trash2",Np);/**
101
+ * @license lucide-react v0.483.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const jp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lp=we("X",jp),uc=R.createContext(void 0),Qe=()=>{const e=R.use(uc);if(!e)throw new Error("useBookingModal must be used within a BookingModalProvider");return e};function dc(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=dc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dc(e))&&(r&&(r+=" "),r+=t);return r}const ds="-",$p=e=>{const t=zp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(ds);return a[0]===""&&a.length!==1&&a.shift(),pc(a,t)||Fp(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},pc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?pc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(ds);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},wi=/^\[(.+)\]$/,Fp=e=>{if(wi.test(e)){const t=wi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},zp=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Io(n[o],r,o,t);return r},Io=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:xi(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Wp(o)){Io(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Io(i,xi(t,s),n,r)})})},xi=(e,t)=>{let n=e;return t.split(ds).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Wp=e=>e.isThemeGetter,Bp=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)}}},jo="!",Lo=":",Hp=Lo.length,Vp=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 g=o[C];if(i===0&&a===0){if(g===Lo){s.push(o.slice(c,C)),c=C+Hp;continue}if(g==="/"){l=C;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const d=s.length===0?o:o.substring(c),u=Up(d),v=u!==d,h=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:u,maybePostfixModifierPosition:h}};if(t){const o=t+Lo,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},Up=e=>e.endsWith(jo)?e.substring(0,e.length-1):e.startsWith(jo)?e.substring(1):e,Yp=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}},Kp=e=>({cache:Bp(e.cacheSize),parseClassName:Vp(e),sortModifiers:Yp(e),...$p(e)}),Gp=/\s+/,qp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Gp);let c="";for(let l=a.length-1;l>=0;l-=1){const d=a[l],{isExternal:u,modifiers:v,hasImportantModifier:h,baseClassName:C,maybePostfixModifierPosition:g}=n(d);if(u){c=d+(c.length>0?" "+c:c);continue}let x=!!g,y=r(x?C.substring(0,g):C);if(!y){if(!x){c=d+(c.length>0?" "+c:c);continue}if(y=r(C),!y){c=d+(c.length>0?" "+c:c);continue}x=!1}const f=s(v).join(":"),w=h?f+jo:f,D=w+y;if(i.includes(D))continue;i.push(D);const m=o(y,x);for(let T=0;T<m.length;++T){const b=m[T];i.push(w+b)}c=d+(c.length>0?" "+c:c)}return c};function Xp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=hc(t))&&(r&&(r+=" "),r+=n);return r}const hc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Zp(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((d,u)=>u(d),e());return n=Kp(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=qp(c,n);return o(c,d),d}return function(){return s(Xp.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jp=/^\d+\/\d+$/,Qp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eh=/\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$/,th=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,nh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=e=>Jp.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),at=e=>!!e&&Number.isInteger(Number(e)),ao=e=>e.endsWith("%")&&oe(e.slice(0,-1)),qe=e=>Qp.test(e),oh=()=>!0,sh=e=>eh.test(e)&&!th.test(e),vc=()=>!1,ih=e=>nh.test(e),ah=e=>rh.test(e),ch=e=>!Z(e)&&!J(e),lh=e=>Xt(e,wc,vc),Z=e=>gc.test(e),St=e=>Xt(e,xc,sh),co=e=>Xt(e,hh,oe),Si=e=>Xt(e,yc,vc),uh=e=>Xt(e,bc,ah),Vn=e=>Xt(e,Sc,ih),J=e=>mc.test(e),an=e=>Zt(e,xc),dh=e=>Zt(e,gh),Ci=e=>Zt(e,yc),fh=e=>Zt(e,wc),ph=e=>Zt(e,bc),Un=e=>Zt(e,Sc,!0),Xt=(e,t,n)=>{const r=gc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zt=(e,t,n=!1)=>{const r=mc.exec(e);return r?r[1]?t(r[1]):n:!1},yc=e=>e==="position"||e==="percentage",bc=e=>e==="image"||e==="url",wc=e=>e==="length"||e==="size"||e==="bg-size",xc=e=>e==="length",hh=e=>e==="number",gh=e=>e==="family-name",Sc=e=>e==="shadow",mh=()=>{const e=he("color"),t=he("font"),n=he("text"),r=he("font-weight"),o=he("tracking"),s=he("leading"),i=he("breakpoint"),a=he("container"),c=he("spacing"),l=he("radius"),d=he("shadow"),u=he("inset-shadow"),v=he("text-shadow"),h=he("drop-shadow"),C=he("blur"),g=he("perspective"),x=he("aspect"),y=he("ease"),f=he("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],m=()=>[...D(),J,Z],T=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],E=()=>[J,Z,c],M=()=>[Lt,"full","auto",...E()],N=()=>[at,"none","subgrid",J,Z],A=()=>["auto",{span:["full",at,J,Z]},at,J,Z],W=()=>[at,"auto",J,Z],Y=()=>["auto","min","max","fr",J,Z],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...E()],I=()=>[Lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],O=()=>[e,J,Z],j=()=>[...D(),Ci,Si,{position:[J,Z]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",fh,lh,{size:[J,Z]}],U=()=>[ao,an,St],V=()=>["","none","full",l,J,Z],H=()=>["",oe,an,St],X=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[oe,ao,Ci,Si],G=()=>["","none",C,J,Z],q=()=>["none",oe,J,Z],B=()=>["none",oe,J,Z],te=()=>[oe,J,Z],_=()=>[Lt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qe],breakpoint:[qe],color:[oh],container:[qe],"drop-shadow":[qe],ease:["in","out","in-out"],font:[ch],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qe],shadow:[qe],spacing:["px",oe],text:[qe],"text-shadow":[qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lt,Z,J,x]}],container:["container"],columns:[{columns:[oe,Z,J,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:m()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[at,"auto",J,Z]}],basis:[{basis:[Lt,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,Lt,"auto","initial","none",Z]}],grow:[{grow:["",oe,J,Z]}],shrink:[{shrink:["",oe,J,Z]}],order:[{order:[at,"first","last","none",J,Z]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],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":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[a,"screen",...I()]}],"min-w":[{"min-w":[a,"screen","none",...I()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...I()]}],h:[{h:["screen",...I()]}],"min-h":[{"min-h":["screen","none",...I()]}],"max-h":[{"max-h":["screen",...I()]}],"font-size":[{text:["base",n,an,St]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,J,co]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ao,Z]}],"font-family":[{font:[dh,Z,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,J,Z]}],"line-clamp":[{"line-clamp":[oe,"none",J,co]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",J,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",J,St]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[oe,"auto",J,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,Z]}],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",J,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},at,J,Z],radial:["",J,Z],conic:[at,J,Z]},ph,uh]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],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:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,J,Z]}],"outline-w":[{outline:["",oe,an,St]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",d,Un,Vn]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",u,Un,Vn]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[oe,St]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",v,Un,Vn]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[oe,J,Z]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"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":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[J,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,Z]}],filter:[{filter:["","none",J,Z]}],blur:[{blur:G()}],brightness:[{brightness:[oe,J,Z]}],contrast:[{contrast:[oe,J,Z]}],"drop-shadow":[{"drop-shadow":["","none",h,Un,Vn]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",oe,J,Z]}],"hue-rotate":[{"hue-rotate":[oe,J,Z]}],invert:[{invert:["",oe,J,Z]}],saturate:[{saturate:[oe,J,Z]}],sepia:[{sepia:["",oe,J,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Z]}],"backdrop-blur":[{"backdrop-blur":G()}],"backdrop-brightness":[{"backdrop-brightness":[oe,J,Z]}],"backdrop-contrast":[{"backdrop-contrast":[oe,J,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,J,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,J,Z]}],"backdrop-invert":[{"backdrop-invert":["",oe,J,Z]}],"backdrop-opacity":[{"backdrop-opacity":[oe,J,Z]}],"backdrop-saturate":[{"backdrop-saturate":[oe,J,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,J,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",J,Z]}],ease:[{ease:["linear","initial",y,J,Z]}],delay:[{delay:[oe,J,Z]}],animate:[{animate:["none",f,J,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,J,Z]}],"perspective-origin":[{"perspective-origin":m()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[J,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:m()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_()}],"translate-x":[{"translate-x":_()}],"translate-y":[{"translate-y":_()}],"translate-z":[{"translate-z":_()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",J,Z]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",J,Z]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[oe,an,St,co]}],stroke:[{stroke:["none",...O()]}],"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"]}},vh=Zp(mh);function se(...e){return vh(fc(e))}function Ei(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ei(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():Ei(e[o],null)}}}}function ue(...e){return S.useCallback(Nr(...e),e)}function Ct(e){const t=bh(e),n=S.forwardRef((r,o)=>{const{children:s,...i}=r,a=S.Children.toArray(s),c=a.find(xh);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 yh=Ct("Slot");function bh(e){const t=S.forwardRef((n,r)=>{const{children:o,...s}=n;if(S.isValidElement(o)){const i=Ch(o),a=Sh(s,o.props);return o.type!==S.Fragment&&(a.ref=r?Nr(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 wh(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Cc,t}function xh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cc}function Sh(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 Ch(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 Di=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ti=fc,fs=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ti(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 v=Di(d)||Di(u);return o[l][v]}),a=n&&Object.entries(n).reduce((l,d)=>{let[u,v]=d;return v===void 0||(l[u]=v),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,d)=>{let{class:u,className:v,...h}=d;return Object.entries(h).every(C=>{let[g,x]=C;return Array.isArray(x)?x.includes({...s,...a}[g]):{...s,...a}[g]===x})?[...l,u,v]:l},[]);return Ti(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Eh=fs("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 Et({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?yh:"button";return p.jsx(s,{"data-slot":"button",className:se(Eh({variant:t,size:n,className:e})),...o})}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 y;const{scope:v,children:h,...C}=u,g=((y=v==null?void 0:v[e])==null?void 0:y[c])||a,x=S.useMemo(()=>C,Object.values(C));return p.jsx(g.Provider,{value:x,children:h})};l.displayName=s+"Provider";function d(u,v){var g;const h=((g=v==null?void 0:v[e])==null?void 0:g[c])||a,C=S.useContext(h);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,Dh(o,...t)]}function Dh(...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 Th=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ie=Th.reduce((e,t)=>{const n=Ct(`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 Ec(e,t){e&&Tr.flushSync(()=>e.dispatchEvent(t))}function Ae(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 Rh(e,t=globalThis==null?void 0:globalThis.document){const n=Ae(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 Mh="DismissableLayer",$o="dismissableLayer.update",kh="dismissableLayer.pointerDownOutside",Oh="dismissableLayer.focusOutside",Ri,Dc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_n=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),v=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=S.useState({}),C=ue(t,b=>u(b)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),f=d?g.indexOf(d):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,D=f>=y,m=Ah(b=>{const E=b.target,M=[...l.branches].some(N=>N.contains(E));!D||M||(o==null||o(b),i==null||i(b),b.defaultPrevented||a==null||a())},v),T=Nh(b=>{const E=b.target;[...l.branches].some(N=>N.contains(E))||(s==null||s(b),i==null||i(b),b.defaultPrevented||a==null||a())},v);return Rh(b=>{f===l.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),S.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ri=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Mi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ri)}},[d,v,n,l]),S.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Mi())},[d,l]),S.useEffect(()=>{const b=()=>h({});return document.addEventListener($o,b),()=>document.removeEventListener($o,b)},[]),p.jsx(ie.div,{...c,ref:C,style:{pointerEvents:w?D?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,m.onPointerDownCapture)})});_n.displayName=Mh;var Ph="DismissableLayerBranch",_h=S.forwardRef((e,t)=>{const n=S.useContext(Dc),r=S.useRef(null),o=ue(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ie.div,{...e,ref:o})});_h.displayName=Ph;function Ah(e,t=globalThis==null?void 0:globalThis.document){const n=Ae(e),r=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Tc(kh,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 Nh(e,t=globalThis==null?void 0:globalThis.document){const n=Ae(e),r=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!r.current&&Tc(Oh,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 Mi(){const e=new CustomEvent($o);document.dispatchEvent(e)}function Tc(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?Ec(o,s):o.dispatchEvent(s)}var Se=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Ih=S[" useId ".trim().toString()]||(()=>{}),jh=0;function ft(e){const[t,n]=S.useState(Ih());return Se(()=>{n(r=>r??String(jh++))},[e]),e||(t?`radix-${t}`:"")}const Lh=["top","right","bottom","left"],pt=Math.min,Me=Math.max,yr=Math.round,Yn=Math.floor,Ue=e=>({x:e,y:e}),$h={left:"right",right:"left",bottom:"top",top:"bottom"},Fh={start:"end",end:"start"};function Fo(e,t,n){return Me(e,pt(t,n))}function et(e,t){return typeof e=="function"?e(t):e}function tt(e){return e.split("-")[0]}function Jt(e){return e.split("-")[1]}function ps(e){return e==="x"?"y":"x"}function hs(e){return e==="y"?"height":"width"}function ht(e){return["top","bottom"].includes(tt(e))?"y":"x"}function gs(e){return ps(ht(e))}function zh(e,t,n){n===void 0&&(n=!1);const r=Jt(e),o=gs(e),s=hs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=br(i)),[i,br(i)]}function Wh(e){const t=br(e);return[zo(e),t,zo(t)]}function zo(e){return e.replace(/start|end/g,t=>Fh[t])}function Bh(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 Hh(e,t,n,r){const o=Jt(e);let s=Bh(tt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(zo)))),s}function br(e){return e.replace(/left|right|bottom|top/g,t=>$h[t])}function Vh(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rc(e){return typeof e!="number"?Vh(e):{top:e,right:e,bottom:e,left:e}}function wr(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 ki(e,t,n){let{reference:r,floating:o}=e;const s=ht(t),i=gs(t),a=hs(i),c=tt(t),l=s==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Jt(t)){case"start":h[i]-=v*(n&&l?-1:1);break;case"end":h[i]+=v*(n&&l?-1:1);break}return h}const Uh=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}=ki(l,r,c),v=r,h={},C=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:f,y:w,data:D,reset:m}=await y({x:d,y:u,initialPlacement:r,placement:v,strategy:o,middlewareData:h,rects:l,platform:i,elements:{reference:e,floating:t}});d=f??d,u=w??u,h={...h,[x]:{...h[x],...D}},m&&C<=50&&(C++,typeof m=="object"&&(m.placement&&(v=m.placement),m.rects&&(l=m.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):m.rects),{x:d,y:u}=ki(l,v,c)),g=-1)}return{x:d,y:u,placement:v,strategy:o,middlewareData:h}};async function Sn(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:v=!1,padding:h=0}=et(t,e),C=Rc(h),x=a[v?u==="floating"?"reference":"floating":u],y=wr(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:d,strategy:c})),f=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),D=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},m=wr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:w,strategy:c}):f);return{top:(y.top-m.top+C.top)/D.y,bottom:(m.bottom-y.bottom+C.bottom)/D.y,left:(y.left-m.left+C.left)/D.x,right:(m.right-y.right+C.right)/D.x}}const Yh=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}=et(e,t)||{};if(l==null)return{};const u=Rc(d),v={x:n,y:r},h=gs(o),C=hs(h),g=await i.getDimensions(l),x=h==="y",y=x?"top":"left",f=x?"bottom":"right",w=x?"clientHeight":"clientWidth",D=s.reference[C]+s.reference[h]-v[h]-s.floating[C],m=v[h]-s.reference[h],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let b=T?T[w]:0;(!b||!await(i.isElement==null?void 0:i.isElement(T)))&&(b=a.floating[w]||s.floating[C]);const E=D/2-m/2,M=b/2-g[C]/2-1,N=pt(u[y],M),A=pt(u[f],M),W=N,Y=b-g[C]-A,L=b/2-g[C]/2+E,$=Fo(W,L,Y),k=!c.arrow&&Jt(o)!=null&&L!==$&&s.reference[C]/2-(L<W?N:A)-g[C]/2<0,I=k?L<W?L-W:L-Y:0;return{[h]:v[h]+I,data:{[h]:$,centerOffset:L-$-I,...k&&{alignmentOffset:I}},reset:k}}}),Kh=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:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:g=!0,...x}=et(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=tt(o),f=ht(a),w=tt(a)===a,D=await(c.isRTL==null?void 0:c.isRTL(l.floating)),m=v||(w||!g?[br(a)]:Wh(a)),T=C!=="none";!v&&T&&m.push(...Hh(a,g,C,D));const b=[a,...m],E=await Sn(t,x),M=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&M.push(E[y]),u){const L=zh(o,i,D);M.push(E[L[0]],E[L[1]])}if(N=[...N,{placement:o,overflows:M}],!M.every(L=>L<=0)){var A,W;const L=(((A=s.flip)==null?void 0:A.index)||0)+1,$=b[L];if($)return{data:{index:L,overflows:N},reset:{placement:$}};let k=(W=N.filter(I=>I.overflows[0]<=0).sort((I,O)=>I.overflows[1]-O.overflows[1])[0])==null?void 0:W.placement;if(!k)switch(h){case"bestFit":{var Y;const I=(Y=N.filter(O=>{if(T){const j=ht(O.placement);return j===f||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,P)=>j+P,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:Y[0];I&&(k=I);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function Oi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pi(e){return Lh.some(t=>e[t]>=0)}const Gh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=et(e,t);switch(r){case"referenceHidden":{const s=await Sn(t,{...o,elementContext:"reference"}),i=Oi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Pi(i)}}}case"escaped":{const s=await Sn(t,{...o,altBoundary:!0}),i=Oi(s,n.floating);return{data:{escapedOffsets:i,escaped:Pi(i)}}}default:return{}}}}};async function qh(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=tt(n),a=Jt(n),c=ht(n)==="y",l=["left","top"].includes(i)?-1:1,d=s&&c?-1:1,u=et(t,e);let{mainAxis:v,crossAxis:h,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"&&(h=a==="end"?C*-1:C),c?{x:h*d,y:v*l}:{x:v*l,y:h*d}}const Xh=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 qh(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:x=>{let{x:y,y:f}=x;return{x:y,y:f}}},...c}=et(e,t),l={x:n,y:r},d=await Sn(t,c),u=ht(tt(o)),v=ps(u);let h=l[v],C=l[u];if(s){const x=v==="y"?"top":"left",y=v==="y"?"bottom":"right",f=h+d[x],w=h-d[y];h=Fo(f,h,w)}if(i){const x=u==="y"?"top":"left",y=u==="y"?"bottom":"right",f=C+d[x],w=C-d[y];C=Fo(f,C,w)}const g=a.fn({...t,[v]:h,[u]:C});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:s,[u]:i}}}}}},Jh=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}=et(e,t),d={x:n,y:r},u=ht(o),v=ps(u);let h=d[v],C=d[u];const g=et(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=v==="y"?"height":"width",D=s.reference[v]-s.floating[w]+x.mainAxis,m=s.reference[v]+s.reference[w]-x.mainAxis;h<D?h=D:h>m&&(h=m)}if(l){var y,f;const w=v==="y"?"width":"height",D=["top","left"].includes(tt(o)),m=s.reference[u]-s.floating[w]+(D&&((y=i.offset)==null?void 0:y[u])||0)+(D?0:x.crossAxis),T=s.reference[u]+s.reference[w]+(D?0:((f=i.offset)==null?void 0:f[u])||0)-(D?x.crossAxis:0);C<m?C=m:C>T&&(C=T)}return{[v]:h,[u]:C}}}},Qh=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}=et(e,t),d=await Sn(t,l),u=tt(o),v=Jt(o),h=ht(o)==="y",{width:C,height:g}=s.floating;let x,y;u==="top"||u==="bottom"?(x=u,y=v===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,x=v==="end"?"top":"bottom");const f=g-d.top-d.bottom,w=C-d.left-d.right,D=pt(g-d[x],f),m=pt(C-d[y],w),T=!t.middlewareData.shift;let b=D,E=m;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=f),T&&!v){const N=Me(d.left,0),A=Me(d.right,0),W=Me(d.top,0),Y=Me(d.bottom,0);h?E=C-2*(N!==0||A!==0?N+A:Me(d.left,d.right)):b=g-2*(W!==0||Y!==0?W+Y:Me(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:b});const M=await i.getDimensions(a.floating);return C!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Ir(){return typeof window<"u"}function Qt(e){return Mc(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(Mc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mc(e){return Ir()?e instanceof Node||e instanceof ke(e).Node:!1}function Fe(e){return Ir()?e instanceof Element||e instanceof ke(e).Element:!1}function Ye(e){return Ir()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function _i(e){return!Ir()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}function An(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ze(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function eg(e){return["table","td","th"].includes(Qt(e))}function jr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ms(e){const t=vs(),n=Fe(e)?ze(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 tg(e){let t=gt(e);for(;Ye(t)&&!Ut(t);){if(ms(t))return t;if(jr(t))return null;t=gt(t)}return null}function vs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ut(e){return["html","body","#document"].includes(Qt(e))}function ze(e){return ke(e).getComputedStyle(e)}function Lr(e){return Fe(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||_i(e)&&e.host||Ke(e);return _i(t)?t.host:t}function kc(e){const t=gt(e);return Ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&An(t)?t:kc(t)}function Cn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ke(o);if(s){const a=Wo(i);return t.concat(i,i.visualViewport||[],An(o)?o:[],a&&n?Cn(a):[])}return t.concat(o,Cn(o,[],n))}function Wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oc(e){const t=ze(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=yr(n)!==s||yr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ys(e){return Fe(e)?e:e.contextElement}function Ht(e){const t=ys(e);if(!Ye(t))return Ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Oc(t);let i=(s?yr(n.width):n.width)/r,a=(s?yr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ng=Ue(0);function Pc(e){const t=ke(e);return!vs()||!t.visualViewport?ng:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ke(e)?!1:t}function Dt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ys(e);let i=Ue(1);t&&(r?Fe(r)&&(i=Ht(r)):i=Ht(e));const a=rg(s,n,r)?Pc(s):Ue(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 v=ke(s),h=r&&Fe(r)?ke(r):r;let C=v,g=Wo(C);for(;g&&r&&h!==C;){const x=Ht(g),y=g.getBoundingClientRect(),f=ze(g),w=y.left+(g.clientLeft+parseFloat(f.paddingLeft))*x.x,D=y.top+(g.clientTop+parseFloat(f.paddingTop))*x.y;c*=x.x,l*=x.y,d*=x.x,u*=x.y,c+=w,l+=D,C=ke(g),g=Wo(C)}}return wr({width:d,height:u,x:c,y:l})}function bs(e,t){const n=Lr(e).scrollLeft;return t?t.left+n:Dt(Ke(e)).left+n}function _c(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:bs(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function og(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ke(r),a=t?jr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ue(1);const d=Ue(0),u=Ye(r);if((u||!u&&!s)&&((Qt(r)!=="body"||An(i))&&(c=Lr(r)),Ye(r))){const h=Dt(r);l=Ht(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const v=i&&!u&&!s?_c(i,c,!0):Ue(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+v.x,y:n.y*l.y-c.scrollTop*l.y+d.y+v.y}}function sg(e){return Array.from(e.getClientRects())}function ig(e){const t=Ke(e),n=Lr(e),r=e.ownerDocument.body,o=Me(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Me(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+bs(e);const a=-n.scrollTop;return ze(r).direction==="rtl"&&(i+=Me(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function ag(e,t){const n=ke(e),r=Ke(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=vs();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function cg(e,t){const n=Dt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ye(e)?Ht(e):Ue(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 Ai(e,t,n){let r;if(t==="viewport")r=ag(e,n);else if(t==="document")r=ig(Ke(e));else if(Fe(t))r=cg(t,n);else{const o=Pc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wr(r)}function Ac(e,t){const n=gt(e);return n===t||!Fe(n)||Ut(n)?!1:ze(n).position==="fixed"||Ac(n,t)}function lg(e,t){const n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(a=>Fe(a)&&Qt(a)!=="body"),o=null;const s=ze(e).position==="fixed";let i=s?gt(e):e;for(;Fe(i)&&!Ut(i);){const a=ze(i),c=ms(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||An(i)&&!c&&Ac(e,i))?r=r.filter(d=>d!==i):o=a,i=gt(i)}return t.set(e,r),r}function ug(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?jr(t)?[]:lg(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const u=Ai(t,d,o);return l.top=Me(u.top,l.top),l.right=pt(u.right,l.right),l.bottom=pt(u.bottom,l.bottom),l.left=Me(u.left,l.left),l},Ai(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dg(e){const{width:t,height:n}=Oc(e);return{width:t,height:n}}function fg(e,t,n){const r=Ye(t),o=Ke(t),s=n==="fixed",i=Dt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ue(0);if(r||!r&&!s)if((Qt(t)!=="body"||An(o))&&(a=Lr(t)),r){const v=Dt(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&(c.x=bs(o));const l=o&&!r&&!s?_c(o,a):Ue(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 lo(e){return ze(e).position==="static"}function Ni(e,t){if(!Ye(e)||ze(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ke(e)===n&&(n=n.ownerDocument.body),n}function Nc(e,t){const n=ke(e);if(jr(e))return n;if(!Ye(e)){let o=gt(e);for(;o&&!Ut(o);){if(Fe(o)&&!lo(o))return o;o=gt(o)}return n}let r=Ni(e,t);for(;r&&eg(r)&&lo(r);)r=Ni(r,t);return r&&Ut(r)&&lo(r)&&!ms(r)?n:r||tg(e)||n}const pg=async function(e){const t=this.getOffsetParent||Nc,n=this.getDimensions,r=await n(e.floating);return{reference:fg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hg(e){return ze(e).direction==="rtl"}const gg={convertOffsetParentRelativeRectToViewportRelativeRect:og,getDocumentElement:Ke,getClippingRect:ug,getOffsetParent:Nc,getElementRects:pg,getClientRects:sg,getDimensions:dg,getScale:Ht,isElement:Fe,isRTL:hg};function Ic(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mg(e,t){let n=null,r;const o=Ke(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:v,height:h}=l;if(a||t(),!v||!h)return;const C=Yn(u),g=Yn(o.clientWidth-(d+v)),x=Yn(o.clientHeight-(u+h)),y=Yn(d),w={rootMargin:-C+"px "+-g+"px "+-x+"px "+-y+"px",threshold:Me(0,pt(1,c))||1};let D=!0;function m(T){const b=T[0].intersectionRatio;if(b!==c){if(!D)return i();b?i(!1,b):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b===1&&!Ic(l,e.getBoundingClientRect())&&i(),D=!1}try{n=new IntersectionObserver(m,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(m,w)}n.observe(e)}return i(!0),s}function vg(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=ys(e),d=o||s?[...l?Cn(l):[],...Cn(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const u=l&&a?mg(l,n):null;let v=-1,h=null;i&&(h=new ResizeObserver(y=>{let[f]=y;f&&f.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),l&&!c&&h.observe(l),h.observe(t));let C,g=c?Dt(e):null;c&&x();function x(){const y=Dt(e);g&&!Ic(g,y)&&n(),g=y,C=requestAnimationFrame(x)}return n(),()=>{var y;d.forEach(f=>{o&&f.removeEventListener("scroll",n),s&&f.removeEventListener("resize",n)}),u==null||u(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(C)}}const yg=Xh,bg=Zh,wg=Kh,xg=Qh,Sg=Gh,Ii=Yh,Cg=Jh,Eg=(e,t,n)=>{const r=new Map,o={platform:gg,...n},s={...o.platform,_c:r};return Uh(e,t,{...o,platform:s})};var cr=typeof document<"u"?R.useLayoutEffect:R.useEffect;function xr(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(!xr(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)&&!xr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function jc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ji(e,t){const n=jc(e);return Math.round(t*n)/n}function uo(e){const t=S.useRef(e);return cr(()=>{t.current=e}),t}function Dg(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}),[v,h]=S.useState(r);xr(v,r)||h(r);const[C,g]=S.useState(null),[x,y]=S.useState(null),f=S.useCallback(O=>{O!==T.current&&(T.current=O,g(O))},[]),w=S.useCallback(O=>{O!==b.current&&(b.current=O,y(O))},[]),D=s||C,m=i||x,T=S.useRef(null),b=S.useRef(null),E=S.useRef(d),M=c!=null,N=uo(c),A=uo(o),W=uo(l),Y=S.useCallback(()=>{if(!T.current||!b.current)return;const O={placement:t,strategy:n,middleware:v};A.current&&(O.platform=A.current),Eg(T.current,b.current,O).then(j=>{const P={...j,isPositioned:W.current!==!1};L.current&&!xr(E.current,P)&&(E.current=P,Tr.flushSync(()=>{u(P)}))})},[v,t,n,A,W]);cr(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(O=>({...O,isPositioned:!1})))},[l]);const L=S.useRef(!1);cr(()=>(L.current=!0,()=>{L.current=!1}),[]),cr(()=>{if(D&&(T.current=D),m&&(b.current=m),D&&m){if(N.current)return N.current(D,m,Y);Y()}},[D,m,Y,N,M]);const $=S.useMemo(()=>({reference:T,floating:b,setReference:f,setFloating:w}),[f,w]),k=S.useMemo(()=>({reference:D,floating:m}),[D,m]),I=S.useMemo(()=>{const O={position:n,left:0,top:0};if(!k.floating)return O;const j=ji(k.floating,d.x),P=ji(k.floating,d.y);return a?{...O,transform:"translate("+j+"px, "+P+"px)",...jc(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:P}},[n,a,k.floating,d.x,d.y]);return S.useMemo(()=>({...d,update:Y,refs:$,elements:k,floatingStyles:I}),[d,Y,$,k,I])}const Tg=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?Ii({element:r.current,padding:o}).fn(n):{}:r?Ii({element:r,padding:o}).fn(n):{}}}},Rg=(e,t)=>({...yg(e),options:[e,t]}),Mg=(e,t)=>({...bg(e),options:[e,t]}),kg=(e,t)=>({...Cg(e),options:[e,t]}),Og=(e,t)=>({...wg(e),options:[e,t]}),Pg=(e,t)=>({...xg(e),options:[e,t]}),_g=(e,t)=>({...Sg(e),options:[e,t]}),Ag=(e,t)=>({...Tg(e),options:[e,t]});var Ng="Arrow",Lc=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(ie.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"})})});Lc.displayName=Ng;var Ig=Lc;function jg(e){const[t,n]=S.useState(void 0);return Se(()=>{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 ws="Popper",[$c,vt]=mt(ws),[Lg,Fc]=$c(ws),zc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=S.useState(null);return p.jsx(Lg,{scope:t,anchor:r,onAnchorChange:o,children:n})};zc.displayName=ws;var Wc="PopperAnchor",Bc=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Fc(Wc,n),i=S.useRef(null),a=ue(t,i);return S.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:p.jsx(ie.div,{...o,ref:a})});Bc.displayName=Wc;var xs="PopperContent",[$g,Fg]=$c(xs),Hc=S.forwardRef((e,t)=>{var z,G,q,B,te,_;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:v=!1,updatePositionStrategy:h="optimized",onPlaced:C,...g}=e,x=Fc(xs,n),[y,f]=S.useState(null),w=ue(t,ne=>f(ne)),[D,m]=S.useState(null),T=jg(D),b=(T==null?void 0:T.width)??0,E=(T==null?void 0:T.height)??0,M=r+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},A=Array.isArray(l)?l:[l],W=A.length>0,Y={padding:N,boundary:A.filter(Wg),altBoundary:W},{refs:L,floatingStyles:$,placement:k,isPositioned:I,middlewareData:O}=Dg({strategy:"fixed",placement:M,whileElementsMounted:(...ne)=>vg(...ne,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[Rg({mainAxis:o+E,alignmentAxis:i}),c&&Mg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?kg():void 0,...Y}),c&&Og({...Y}),Pg({...Y,apply:({elements:ne,rects:ae,availableWidth:fe,availableHeight:ve})=>{const{width:Ne,height:Pt}=ae.reference,Ie=ne.floating.style;Ie.setProperty("--radix-popper-available-width",`${fe}px`),Ie.setProperty("--radix-popper-available-height",`${ve}px`),Ie.setProperty("--radix-popper-anchor-width",`${Ne}px`),Ie.setProperty("--radix-popper-anchor-height",`${Pt}px`)}}),D&&Ag({element:D,padding:a}),Bg({arrowWidth:b,arrowHeight:E}),v&&_g({strategy:"referenceHidden",...Y})]}),[j,P]=Yc(k),F=Ae(C);Se(()=>{I&&(F==null||F())},[I,F]);const U=(z=O.arrow)==null?void 0:z.x,V=(G=O.arrow)==null?void 0:G.y,H=((q=O.arrow)==null?void 0:q.centerOffset)!==0,[X,K]=S.useState();return Se(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:I?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(B=O.transformOrigin)==null?void 0:B.x,(te=O.transformOrigin)==null?void 0:te.y].join(" "),...((_=O.hide)==null?void 0:_.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx($g,{scope:n,placedSide:j,onArrowChange:m,arrowX:U,arrowY:V,shouldHideArrow:H,children:p.jsx(ie.div,{"data-side":j,"data-align":P,...g,ref:w,style:{...g.style,animation:I?void 0:"none"}})})})});Hc.displayName=xs;var Vc="PopperArrow",zg={top:"bottom",right:"left",bottom:"top",left:"right"},Uc=S.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Fg(Vc,r),i=zg[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(Ig,{...o,ref:n,style:{...o.style,display:"block"}})})});Uc.displayName=Vc;function Wg(e){return e!==null}var Bg=e=>({name:"transformOrigin",options:e,fn(t){var x,y,f;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,d]=Yc(n),u={start:"0%",center:"50%",end:"100%"}[d],v=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,h=(((f=o.arrow)==null?void 0:f.y)??0)+c/2;let C="",g="";return l==="bottom"?(C=i?u:`${v}px`,g=`${-c}px`):l==="top"?(C=i?u:`${v}px`,g=`${r.floating.height+c}px`):l==="right"?(C=`${-c}px`,g=i?u:`${h}px`):l==="left"&&(C=`${r.floating.width+c}px`,g=i?u:`${h}px`),{data:{x:C,y:g}}}});function Yc(e){const[t,n="center"]=e.split("-");return[t,n]}var $r=zc,Nn=Bc,Fr=Hc,zr=Uc,Hg="Portal",In=S.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=S.useState(!1);Se(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ze.createPortal(p.jsx(ie.div,{...r,ref:t}),i):null});In.displayName=Hg;function Vg(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var nt=e=>{const{present:t,children:n}=e,r=Ug(t),o=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=ue(r.ref,Yg(o));return typeof n=="function"||r.isPresent?S.cloneElement(o,{ref:s}):null};nt.displayName="Presence";function Ug(e){const[t,n]=S.useState(),r=S.useRef({}),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Vg(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Kn(r.current);s.current=a==="mounted"?l:"none"},[a]),Se(()=>{const l=r.current,d=o.current;if(d!==e){const v=s.current,h=Kn(l);e?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&v!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Se(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=h=>{const g=Kn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=h=>{h.target===t&&(s.current=Kn(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",v),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 Kn(e){return(e==null?void 0:e.animationName)||"none"}function Yg(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 Tt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Kg({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Ae(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 Kg({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,o=S.useRef(r),s=Ae(t);return S.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Gg="VisuallyHidden",Ss=S.forwardRef((e,t)=>p.jsx(ie.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}}));Ss.displayName=Gg;var qg=Ss,[Wr,Cx]=mt("Tooltip",[vt]),Br=vt(),Kc="TooltipProvider",Xg=700,Bo="tooltip.open",[Zg,Cs]=Wr(Kc),Gc=e=>{const{__scopeTooltip:t,delayDuration:n=Xg,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})};Gc.displayName=Kc;var Hr="Tooltip",[Jg,jn]=Wr(Hr),qc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=Cs(Hr,e.__scopeTooltip),l=Br(t),[d,u]=S.useState(null),v=ft(),h=S.useRef(0),C=i??c.disableHoverableContent,g=a??c.delayDuration,x=S.useRef(!1),[y=!1,f]=Tt({prop:r,defaultProp:o,onChange:b=>{b?(c.onOpen(),document.dispatchEvent(new CustomEvent(Bo))):c.onClose(),s==null||s(b)}}),w=S.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),D=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x.current=!1,f(!0)},[f]),m=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,f(!1)},[f]),T=S.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{x.current=!0,f(!0),h.current=0},g)},[g,f]);return S.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx($r,{...l,children:p.jsx(Jg,{scope:t,contentId:v,open:y,stateAttribute:w,trigger:d,onTriggerChange:u,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?T():D()},[c.isOpenDelayedRef,T,D]),onTriggerLeave:S.useCallback(()=>{C?m():(window.clearTimeout(h.current),h.current=0)},[m,C]),onOpen:D,onClose:m,disableHoverableContent:C,children:n})})};qc.displayName=Hr;var Ho="TooltipTrigger",Xc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jn(Ho,n),s=Cs(Ho,n),i=Br(n),a=S.useRef(null),c=ue(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(Nn,{asChild:!0,...i,children:p.jsx(ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ee(e.onPointerMove,v=>{v.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)})})});Xc.displayName=Ho;var Es="TooltipPortal",[Qg,em]=Wr(Es,{forceMount:void 0}),Zc=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=jn(Es,t);return p.jsx(Qg,{scope:t,forceMount:n,children:p.jsx(nt,{present:n||s.open,children:p.jsx(In,{asChild:!0,container:o,children:r})})})};Zc.displayName=Es;var Yt="TooltipContent",Jc=S.forwardRef((e,t)=>{const n=em(Yt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=jn(Yt,e.__scopeTooltip);return p.jsx(nt,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Qc,{side:o,...s,ref:t}):p.jsx(tm,{side:o,...s,ref:t})})}),tm=S.forwardRef((e,t)=>{const n=jn(Yt,e.__scopeTooltip),r=Cs(Yt,e.__scopeTooltip),o=S.useRef(null),s=ue(t,o),[i,a]=S.useState(null),{trigger:c,onClose:l}=n,d=o.current,{onPointerInTransitChange:u}=r,v=S.useCallback(()=>{a(null),u(!1)},[u]),h=S.useCallback((C,g)=>{const x=C.currentTarget,y={x:C.clientX,y:C.clientY},f=im(y,x.getBoundingClientRect()),w=am(y,f),D=cm(g.getBoundingClientRect()),m=um([...w,...D]);a(m),u(!0)},[u]);return S.useEffect(()=>()=>v(),[v]),S.useEffect(()=>{if(c&&d){const C=x=>h(x,d),g=x=>h(x,c);return c.addEventListener("pointerleave",C),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",C),d.removeEventListener("pointerleave",g)}}},[c,d,h,v]),S.useEffect(()=>{if(i){const C=g=>{const x=g.target,y={x:g.clientX,y:g.clientY},f=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),w=!lm(y,i);f?v():w&&(v(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,d,i,l,v]),p.jsx(Qc,{...e,ref:s})}),[nm,rm]=Wr(Hr,{isInside:!1}),om=wh("TooltipContent"),Qc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=jn(Yt,n),l=Br(n),{onClose:d}=c;return S.useEffect(()=>(document.addEventListener(Bo,d),()=>document.removeEventListener(Bo,d)),[d]),S.useEffect(()=>{if(c.trigger){const u=v=>{const h=v.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,d]),p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:p.jsxs(Fr,{"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(om,{children:r}),p.jsx(nm,{scope:n,isInside:!0,children:p.jsx(qg,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Jc.displayName=Yt;var el="TooltipArrow",sm=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Br(n);return rm(el,n).isInside?null:p.jsx(zr,{...o,...r,ref:t})});sm.displayName=el;function im(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 am(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 cm(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 lm(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 um(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),dm(t)}function dm(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 fm=Gc,pm=qc,hm=Xc,gm=Zc,mm=Jc;function Ds({delayDuration:e=0,...t}){return p.jsx(fm,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function tl({...e}){return p.jsx(Ds,{children:p.jsx(pm,{"data-slot":"tooltip",...e})})}function nl({...e}){return p.jsx(hm,{"data-slot":"tooltip-trigger",...e})}function rl({className:e,sideOffset:t=0,children:n,...r}){return p.jsx(gm,{children:p.jsx(mm,{"data-slot":"tooltip-content",sideOffset:t,className:se("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 Ts=({children:e,content:t})=>p.jsx(Ds,{children:p.jsxs(tl,{children:[p.jsx(nl,{asChild:!0,children:e}),p.jsx(rl,{sideOffset:3,side:"bottom",className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:t})]})});function Rs(e){const t=e+"CollectionProvider",[n,r]=mt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:x,children:y}=g,f=R.useRef(null),w=R.useRef(new Map).current;return p.jsx(o,{scope:x,itemMap:w,collectionRef:f,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=Ct(a),l=R.forwardRef((g,x)=>{const{scope:y,children:f}=g,w=s(a,y),D=ue(x,w.collectionRef);return p.jsx(c,{ref:D,children:f})});l.displayName=a;const d=e+"CollectionItemSlot",u="data-radix-collection-item",v=Ct(d),h=R.forwardRef((g,x)=>{const{scope:y,children:f,...w}=g,D=R.useRef(null),m=ue(x,D),T=s(d,y);return R.useEffect(()=>(T.itemMap.set(D,{ref:D,...w}),()=>void T.itemMap.delete(D))),p.jsx(v,{[u]:"",ref:m,children:f})});h.displayName=d;function C(g){const x=s(e+"CollectionConsumer",g);return R.useCallback(()=>{const f=x.collectionRef.current;if(!f)return[];const w=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((T,b)=>w.indexOf(T.ref.current)-w.indexOf(b.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:h},C,r]}var vm=S.createContext(void 0);function Ms(e){const t=S.useContext(vm);return e||t||"ltr"}var fo=0;function ks(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Li()),document.body.insertAdjacentElement("beforeend",e[1]??Li()),fo++,()=>{fo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fo--}},[])}function Li(){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 po="focusScope.autoFocusOnMount",ho="focusScope.autoFocusOnUnmount",$i={bubbles:!1,cancelable:!0},ym="FocusScope",Vr=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=S.useState(null),l=Ae(o),d=Ae(s),u=S.useRef(null),v=ue(t,g=>c(g)),h=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let g=function(w){if(h.paused||!a)return;const D=w.target;a.contains(D)?u.current=D:ut(u.current,{select:!0})},x=function(w){if(h.paused||!a)return;const D=w.relatedTarget;D!==null&&(a.contains(D)||ut(u.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const m of w)m.removedNodes.length>0&&ut(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const f=new MutationObserver(y);return a&&f.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),f.disconnect()}}},[r,a,h.paused]),S.useEffect(()=>{if(a){zi.add(h);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(po,$i);a.addEventListener(po,l),a.dispatchEvent(y),y.defaultPrevented||(bm(Em(ol(a)),{select:!0}),document.activeElement===g&&ut(a))}return()=>{a.removeEventListener(po,l),setTimeout(()=>{const y=new CustomEvent(ho,$i);a.addEventListener(ho,d),a.dispatchEvent(y),y.defaultPrevented||ut(g??document.body,{select:!0}),a.removeEventListener(ho,d),zi.remove(h)},0)}}},[a,l,d,h]);const C=S.useCallback(g=>{if(!n&&!r||h.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(x&&y){const f=g.currentTarget,[w,D]=wm(f);w&&D?!g.shiftKey&&y===D?(g.preventDefault(),n&&ut(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),n&&ut(D,{select:!0})):y===f&&g.preventDefault()}},[n,r,h.paused]);return p.jsx(ie.div,{tabIndex:-1,...i,ref:v,onKeyDown:C})});Vr.displayName=ym;function bm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ut(r,{select:t}),document.activeElement!==n)return}function wm(e){const t=ol(e),n=Fi(t,e),r=Fi(t.reverse(),e);return[n,r]}function ol(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 Fi(e,t){for(const n of e)if(!xm(n,{upTo:t}))return n}function xm(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 Sm(e){return e instanceof HTMLInputElement&&"select"in e}function ut(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sm(e)&&t&&e.select()}}var zi=Cm();function Cm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Wi(e,t),e.unshift(t)},remove(t){var n;e=Wi(e,t),(n=e[0])==null||n.resume()}}}function Wi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Em(e){return e.filter(t=>t.tagName!=="A")}var go="rovingFocusGroup.onEntryFocus",Dm={bubbles:!1,cancelable:!0},Ur="RovingFocusGroup",[Vo,sl,Tm]=Rs(Ur),[Rm,il]=mt(Ur,[Tm]),[Mm,km]=Rm(Ur),al=S.forwardRef((e,t)=>p.jsx(Vo.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Vo.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Om,{...e,ref:t})})}));al.displayName=Ur;var Om=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,v=S.useRef(null),h=ue(t,v),C=Ms(s),[g=null,x]=Tt({prop:i,defaultProp:a,onChange:c}),[y,f]=S.useState(!1),w=Ae(l),D=sl(n),m=S.useRef(!1),[T,b]=S.useState(0);return S.useEffect(()=>{const E=v.current;if(E)return E.addEventListener(go,w),()=>E.removeEventListener(go,w)},[w]),p.jsx(Mm,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:g,onItemFocus:S.useCallback(E=>x(E),[x]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>b(E=>E+1),[]),onFocusableItemRemove:S.useCallback(()=>b(E=>E-1),[]),children:p.jsx(ie.div,{tabIndex:y||T===0?-1:0,"data-orientation":r,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{m.current=!0}),onFocus:ee(e.onFocus,E=>{const M=!m.current;if(E.target===E.currentTarget&&M&&!y){const N=new CustomEvent(go,Dm);if(E.currentTarget.dispatchEvent(N),!N.defaultPrevented){const A=D().filter(k=>k.focusable),W=A.find(k=>k.active),Y=A.find(k=>k.id===g),$=[W,Y,...A].filter(Boolean).map(k=>k.ref.current);ul($,d)}}m.current=!1}),onBlur:ee(e.onBlur,()=>f(!1))})})}),cl="RovingFocusGroupItem",ll=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=ft(),c=s||a,l=km(cl,n),d=l.currentTabStopId===c,u=sl(n),{onFocusableItemAdd:v,onFocusableItemRemove:h}=l;return S.useEffect(()=>{if(r)return v(),()=>h()},[r,v,h]),p.jsx(Vo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(ie.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 g=Am(C,l.orientation,l.dir);if(g!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let y=u().filter(f=>f.focusable).map(f=>f.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const f=y.indexOf(C.currentTarget);y=l.loop?Nm(y,f+1):y.slice(f+1)}setTimeout(()=>ul(y))}})})})});ll.displayName=cl;var Pm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _m(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Am(e,t,n){const r=_m(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Pm[r]}function ul(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Nm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Im=al,jm=ll,Lm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Gn=new WeakMap,qn={},mo=0,dl=function(e){return e&&(e.host||dl(e.parentNode))},$m=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dl(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})},Fm=function(e,t,n,r){var o=$m(t,Array.isArray(e)?e:[e]);qn[n]||(qn[n]=new WeakMap);var s=qn[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(v){if(a.has(v))d(v);else try{var h=v.getAttribute(r),C=h!==null&&h!=="false",g=($t.get(v)||0)+1,x=(s.get(v)||0)+1;$t.set(v,g),s.set(v,x),i.push(v),g===1&&C&&Gn.set(v,!0),x===1&&v.setAttribute(n,"true"),C||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return d(t),a.clear(),mo++,function(){i.forEach(function(u){var v=$t.get(u)-1,h=s.get(u)-1;$t.set(u,v),s.set(u,h),v||(Gn.has(u)||u.removeAttribute(r),Gn.delete(u)),h||u.removeAttribute(n)}),mo--,mo||($t=new WeakMap,$t=new WeakMap,Gn=new WeakMap,qn={})}},Os=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Lm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Fm(r,o,n,"aria-hidden")):function(){return null}},Ve=function(){return Ve=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},Ve.apply(this,arguments)};function fl(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 zm(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 lr="right-scroll-bar-position",ur="width-before-scroll-bar",Wm="with-scroll-bars-hidden",Bm="--removed-body-scroll-bar-size";function vo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Hm(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 Vm=typeof window<"u"?S.useLayoutEffect:S.useEffect,Bi=new WeakMap;function Um(e,t){var n=Hm(null,function(r){return e.forEach(function(o){return vo(o,r)})});return Vm(function(){var r=Bi.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||vo(a,null)}),s.forEach(function(a){o.has(a)||vo(a,i)})}Bi.set(n,e)},[e]),n}function Ym(e){return e}function Km(e,t){t===void 0&&(t=Ym);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 Gm(e){e===void 0&&(e={});var t=Km(null);return t.options=Ve({async:!0,ssr:!1},e),t}var pl=function(e){var t=e.sideCar,n=fl(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,Ve({},n))};pl.isSideCarExport=!0;function qm(e,t){return e.useMedium(t),pl}var hl=Gm(),yo=function(){},Yr=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:yo,onWheelCapture:yo,onTouchMoveCapture:yo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,u=e.shards,v=e.sideCar,h=e.noIsolation,C=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,f=e.gapMode,w=fl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=v,m=Um([n,t]),T=Ve(Ve({},w),o);return S.createElement(S.Fragment,null,d&&S.createElement(D,{sideCar:hl,removeScrollBar:l,shards:u,noIsolation:h,inert:C,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:f}),i?S.cloneElement(S.Children.only(a),Ve(Ve({},T),{ref:m})):S.createElement(y,Ve({},T,{className:c,ref:m}),a))});Yr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yr.classNames={fullWidth:ur,zeroRight:lr};var Xm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Zm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Xm();return t&&e.setAttribute("nonce",t),e}function Jm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ev=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zm())&&(Jm(t,n),Qm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tv=function(){var e=ev();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gl=function(){var e=tv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},nv={left:0,top:0,right:0,gap:0},bo=function(e){return parseInt(e||"",10)||0},rv=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[bo(n),bo(r),bo(o)]},ov=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return nv;var t=rv(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])}},sv=gl(),Vt="data-scroll-locked",iv=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
106
+ .`.concat(Wm,` {
102
107
  overflow: hidden `).concat(r,`;
103
108
  padding-right: `).concat(a,"px ").concat(r,`;
104
109
  }
105
- body[`).concat($t,`] {
110
+ body[`).concat(Vt,`] {
106
111
  overflow: hidden `).concat(r,`;
107
112
  overscroll-behavior: contain;
108
113
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -115,47 +120,51 @@
115
120
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
116
121
  }
117
122
 
118
- .`).concat(sr,` {
123
+ .`).concat(lr,` {
119
124
  right: `).concat(a,"px ").concat(r,`;
120
125
  }
121
126
 
122
- .`).concat(ir,` {
127
+ .`).concat(ur,` {
123
128
  margin-right: `).concat(a,"px ").concat(r,`;
124
129
  }
125
130
 
126
- .`).concat(sr," .").concat(sr,` {
131
+ .`).concat(lr," .").concat(lr,` {
127
132
  right: 0 `).concat(r,`;
128
133
  }
129
134
 
130
- .`).concat(ir," .").concat(ir,` {
135
+ .`).concat(ur," .").concat(ur,` {
131
136
  margin-right: 0 `).concat(r,`;
132
137
  }
133
138
 
134
- body[`).concat($t,`] {
135
- `).concat(Am,": ").concat(a,`px;
139
+ body[`).concat(Vt,`] {
140
+ `).concat(Bm,": ").concat(a,`px;
136
141
  }
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`
142
+ `)},Hi=function(){var e=parseInt(document.body.getAttribute(Vt)||"0",10);return isFinite(e)?e:0},av=function(){S.useEffect(function(){return document.body.setAttribute(Vt,(Hi()+1).toString()),function(){var e=Hi()-1;e<=0?document.body.removeAttribute(Vt):document.body.setAttribute(Vt,e.toString())}},[])},cv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;av();var s=S.useMemo(function(){return ov(o)},[o]);return S.createElement(sv,{styles:iv(s,!t,o,n?"":"!important")})},Uo=!1;if(typeof window<"u")try{var Xn=Object.defineProperty({},"passive",{get:function(){return Uo=!0,!0}});window.addEventListener("test",Xn,Xn),window.removeEventListener("test",Xn,Xn)}catch{Uo=!1}var Ft=Uo?{passive:!1}:!1,lv=function(e){return e.tagName==="TEXTAREA"},ml=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lv(e)&&n[t]==="visible")},uv=function(e){return ml(e,"overflowY")},dv=function(e){return ml(e,"overflowX")},Vi=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=vl(e,r);if(o){var s=yl(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vl=function(e,t){return e==="v"?uv(t):dv(t)},yl=function(e,t){return e==="v"?fv(t):pv(t)},hv=function(e,t){return e==="h"&&t==="rtl"?-1:1},gv=function(e,t,n,r,o){var s=hv(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,d=i>0,u=0,v=0;do{var h=yl(e,a),C=h[0],g=h[1],x=h[2],y=g-x-s*C;(C||y)&&vl(e,a)&&(u+=y,v+=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(v)<1)&&(l=!0),l},Zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ui=function(e){return[e.deltaX,e.deltaY]},Yi=function(e){return e&&"current"in e?e.current:e},mv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vv=function(e){return`
138
143
  .block-interactivity-`.concat(e,` {pointer-events: none;}
139
144
  .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
145
+ `)},yv=0,zt=[];function bv(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),o=S.useState(yv++)[0],s=S.useState(gl)[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 g=zm([e.lockRef.current],(e.shards||[]).map(Yi),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=Zn(g),f=n.current,w="deltaX"in g?g.deltaX:f[0]-y[0],D="deltaY"in g?g.deltaY:f[1]-y[1],m,T=g.target,b=Math.abs(w)>Math.abs(D)?"h":"v";if("touches"in g&&b==="h"&&T.type==="range")return!1;var E=Vi(b,T);if(!E)return!0;if(E?m=b:(m=b==="v"?"h":"v",E=Vi(b,T)),!E)return!1;if(!r.current&&"changedTouches"in g&&(w||D)&&(r.current=m),!m)return!0;var M=r.current||m;return gv(M,x,g,M==="h"?w:D)},[]),c=S.useCallback(function(g){var x=g;if(!(!zt.length||zt[zt.length-1]!==s)){var y="deltaY"in x?Ui(x):Zn(x),f=t.current.filter(function(m){return m.name===x.type&&(m.target===x.target||x.target===m.shadowParent)&&mv(m.delta,y)})[0];if(f&&f.should){x.cancelable&&x.preventDefault();return}if(!f){var w=(i.current.shards||[]).map(Yi).filter(Boolean).filter(function(m){return m.contains(x.target)}),D=w.length>0?a(x,w[0]):!i.current.noIsolation;D&&x.cancelable&&x.preventDefault()}}},[]),l=S.useCallback(function(g,x,y,f){var w={name:g,delta:x,target:y,should:f,shadowParent:wv(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(D){return D!==w})},1)},[]),d=S.useCallback(function(g){n.current=Zn(g),r.current=void 0},[]),u=S.useCallback(function(g){l(g.type,Ui(g),g.target,a(g,e.lockRef.current))},[]),v=S.useCallback(function(g){l(g.type,Zn(g),g.target,a(g,e.lockRef.current))},[]);S.useEffect(function(){return zt.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Ft),document.addEventListener("touchmove",c,Ft),document.addEventListener("touchstart",d,Ft),function(){zt=zt.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,Ft),document.removeEventListener("touchmove",c,Ft),document.removeEventListener("touchstart",d,Ft)}},[]);var h=e.removeScrollBar,C=e.inert;return S.createElement(S.Fragment,null,C?S.createElement(s,{styles:vv(o)}):null,h?S.createElement(cv,{gapMode:e.gapMode}):null)}function wv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xv=qm(hl,bv);var Kr=S.forwardRef(function(e,t){return S.createElement(Yr,Ve({},e,{ref:t,sideCar:xv}))});Kr.classNames=Yr.classNames;var Yo=["Enter"," "],Sv=["ArrowDown","PageUp","Home"],bl=["ArrowUp","PageDown","End"],Cv=[...Sv,...bl],Ev={ltr:[...Yo,"ArrowRight"],rtl:[...Yo,"ArrowLeft"]},Dv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[En,Tv,Rv]=Rs(Ln),[kt,wl]=mt(Ln,[Rv,vt,il]),Gr=vt(),xl=il(),[Mv,Ot]=kt(Ln),[kv,$n]=kt(Ln),Sl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Gr(t),[c,l]=S.useState(null),d=S.useRef(!1),u=Ae(s),v=Ms(o);return S.useEffect(()=>{const h=()=>{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",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),p.jsx($r,{...a,children:p.jsx(Mv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:p.jsx(kv,{scope:t,onClose:S.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:v,modal:i,children:r})})})};Sl.displayName=Ln;var Ov="MenuAnchor",Ps=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gr(n);return p.jsx(Nn,{...o,...r,ref:t})});Ps.displayName=Ov;var _s="MenuPortal",[Pv,Cl]=kt(_s,{forceMount:void 0}),El=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ot(_s,t);return p.jsx(Pv,{scope:t,forceMount:n,children:p.jsx(nt,{present:n||s.open,children:p.jsx(In,{asChild:!0,container:o,children:r})})})};El.displayName=_s;var _e="MenuContent",[_v,As]=kt(_e),Dl=S.forwardRef((e,t)=>{const n=Cl(_e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(_e,e.__scopeMenu),i=$n(_e,e.__scopeMenu);return p.jsx(En.Provider,{scope:e.__scopeMenu,children:p.jsx(nt,{present:r||s.open,children:p.jsx(En.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(Av,{...o,ref:t}):p.jsx(Nv,{...o,ref:t})})})})}),Av=S.forwardRef((e,t)=>{const n=Ot(_e,e.__scopeMenu),r=S.useRef(null),o=ue(t,r);return S.useEffect(()=>{const s=r.current;if(s)return Os(s)},[]),p.jsx(Ns,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Nv=S.forwardRef((e,t)=>{const n=Ot(_e,e.__scopeMenu);return p.jsx(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Iv=Ct("MenuContent.ScrollLock"),Ns=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:v,onDismiss:h,disableOutsideScroll:C,...g}=e,x=Ot(_e,n),y=$n(_e,n),f=Gr(n),w=xl(n),D=Tv(n),[m,T]=S.useState(null),b=S.useRef(null),E=ue(t,b,x.onContentChange),M=S.useRef(0),N=S.useRef(""),A=S.useRef(0),W=S.useRef(null),Y=S.useRef("right"),L=S.useRef(0),$=C?Kr:S.Fragment,k=C?{as:Iv,allowPinchZoom:!0}:void 0,I=j=>{var z,G;const P=N.current+j,F=D().filter(q=>!q.disabled),U=document.activeElement,V=(z=F.find(q=>q.ref.current===U))==null?void 0:z.textValue,H=F.map(q=>q.textValue),X=Kv(H,P,V),K=(G=F.find(q=>q.textValue===X))==null?void 0:G.ref.current;(function q(B){N.current=B,window.clearTimeout(M.current),B!==""&&(M.current=window.setTimeout(()=>q(""),1e3))})(P),K&&setTimeout(()=>K.focus())};S.useEffect(()=>()=>window.clearTimeout(M.current),[]),ks();const O=S.useCallback(j=>{var F,U;return Y.current===((F=W.current)==null?void 0:F.side)&&qv(j,(U=W.current)==null?void 0:U.area)},[]);return p.jsx(_v,{scope:n,searchRef:N,onItemEnter:S.useCallback(j=>{O(j)&&j.preventDefault()},[O]),onItemLeave:S.useCallback(j=>{var P;O(j)||((P=b.current)==null||P.focus(),T(null))},[O]),onTriggerLeave:S.useCallback(j=>{O(j)&&j.preventDefault()},[O]),pointerGraceTimerRef:A,onPointerGraceIntentChange:S.useCallback(j=>{W.current=j},[]),children:p.jsx($,{...k,children:p.jsx(Vr,{asChild:!0,trapped:o,onMountAutoFocus:ee(s,j=>{var P;j.preventDefault(),(P=b.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:v,onDismiss:h,children:p.jsx(Im,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:m,onCurrentTabStopIdChange:T,onEntryFocus:ee(c,j=>{y.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":Wl(x.open),"data-radix-menu-content":"",dir:y.dir,...f,...g,ref:E,style:{outline:"none",...g.style},onKeyDown:ee(g.onKeyDown,j=>{const F=j.target.closest("[data-radix-menu-content]")===j.currentTarget,U=j.ctrlKey||j.altKey||j.metaKey,V=j.key.length===1;F&&(j.key==="Tab"&&j.preventDefault(),!U&&V&&I(j.key));const H=b.current;if(j.target!==H||!Cv.includes(j.key))return;j.preventDefault();const K=D().filter(z=>!z.disabled).map(z=>z.ref.current);bl.includes(j.key)&&K.reverse(),Uv(K)}),onBlur:ee(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(M.current),N.current="")}),onPointerMove:ee(e.onPointerMove,Dn(j=>{const P=j.target,F=L.current!==j.clientX;if(j.currentTarget.contains(P)&&F){const U=j.clientX>L.current?"right":"left";Y.current=U,L.current=j.clientX}}))})})})})})})});Dl.displayName=_e;var jv="MenuGroup",Is=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ie.div,{role:"group",...r,ref:t})});Is.displayName=jv;var Lv="MenuLabel",Tl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ie.div,{...r,ref:t})});Tl.displayName=Lv;var Sr="MenuItem",Ki="menu.itemSelect",qr=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=S.useRef(null),i=$n(Sr,e.__scopeMenu),a=As(Sr,e.__scopeMenu),c=ue(t,s),l=S.useRef(!1),d=()=>{const u=s.current;if(!n&&u){const v=new CustomEvent(Ki,{bubbles:!0,cancelable:!0});u.addEventListener(Ki,h=>r==null?void 0:r(h),{once:!0}),Ec(u,v),v.defaultPrevented?l.current=!1:i.onClose()}};return p.jsx(Rl,{...o,ref:c,disabled:n,onClick:ee(e.onClick,d),onPointerDown:u=>{var v;(v=e.onPointerDown)==null||v.call(e,u),l.current=!0},onPointerUp:ee(e.onPointerUp,u=>{var v;l.current||(v=u.currentTarget)==null||v.click()}),onKeyDown:ee(e.onKeyDown,u=>{const v=a.searchRef.current!=="";n||v&&u.key===" "||Yo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});qr.displayName=Sr;var Rl=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=As(Sr,n),a=xl(n),c=S.useRef(null),l=ue(t,c),[d,u]=S.useState(!1),[v,h]=S.useState("");return S.useEffect(()=>{const C=c.current;C&&h((C.textContent??"").trim())},[s.children]),p.jsx(En.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:p.jsx(jm,{asChild:!0,...a,focusable:!r,children:p.jsx(ie.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,Dn(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,Dn(C=>i.onItemLeave(C))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),$v="MenuCheckboxItem",Ml=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(Al,{scope:e.__scopeMenu,checked:n,children:p.jsx(qr,{role:"menuitemcheckbox","aria-checked":Cr(n)?"mixed":n,...o,ref:t,"data-state":Ls(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(Cr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ml.displayName=$v;var kl="MenuRadioGroup",[Fv,zv]=kt(kl,{value:void 0,onValueChange:()=>{}}),Ol=S.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ae(r);return p.jsx(Fv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Is,{...o,ref:t})})});Ol.displayName=kl;var Pl="MenuRadioItem",_l=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=zv(Pl,e.__scopeMenu),s=n===o.value;return p.jsx(Al,{scope:e.__scopeMenu,checked:s,children:p.jsx(qr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ls(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});_l.displayName=Pl;var js="MenuItemIndicator",[Al,Wv]=kt(js,{checked:!1}),Nl=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Wv(js,n);return p.jsx(nt,{present:r||Cr(s.checked)||s.checked===!0,children:p.jsx(ie.span,{...o,ref:t,"data-state":Ls(s.checked)})})});Nl.displayName=js;var Bv="MenuSeparator",Il=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Il.displayName=Bv;var Hv="MenuArrow",jl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gr(n);return p.jsx(zr,{...o,...r,ref:t})});jl.displayName=Hv;var Vv="MenuSub",[Ex,Ll]=kt(Vv),hn="MenuSubTrigger",$l=S.forwardRef((e,t)=>{const n=Ot(hn,e.__scopeMenu),r=$n(hn,e.__scopeMenu),o=Ll(hn,e.__scopeMenu),s=As(hn,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(Ps,{asChild:!0,...l,children:p.jsx(Rl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Wl(n.open),...e,ref:Nr(t,o.onTriggerChange),onClick:u=>{var v;(v=e.onClick)==null||v.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,Dn(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,Dn(u=>{var h,C;d();const v=(h=n.content)==null?void 0:h.getBoundingClientRect();if(v){const g=(C=n.content)==null?void 0:C.dataset.side,x=g==="right",y=x?-5:5,f=v[x?"left":"right"],w=v[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+y,y:u.clientY},{x:f,y:v.top},{x:w,y:v.top},{x:w,y:v.bottom},{x:f,y:v.bottom}],side:g}),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 h;const v=s.searchRef.current!=="";e.disabled||v&&u.key===" "||Ev[r.dir].includes(u.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),u.preventDefault())})})})});$l.displayName=hn;var Fl="MenuSubContent",zl=S.forwardRef((e,t)=>{const n=Cl(_e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(_e,e.__scopeMenu),i=$n(_e,e.__scopeMenu),a=Ll(Fl,e.__scopeMenu),c=S.useRef(null),l=ue(t,c);return p.jsx(En.Provider,{scope:e.__scopeMenu,children:p.jsx(nt,{present:r||s.open,children:p.jsx(En.Slot,{scope:e.__scopeMenu,children:p.jsx(Ns,{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 h;const u=d.currentTarget.contains(d.target),v=Dv[i.dir].includes(d.key);u&&v&&(s.onOpenChange(!1),(h=a.trigger)==null||h.focus(),d.preventDefault())})})})})})});zl.displayName=Fl;function Wl(e){return e?"open":"closed"}function Cr(e){return e==="indeterminate"}function Ls(e){return Cr(e)?"indeterminate":e?"checked":"unchecked"}function Uv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Kv(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=Yv(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 Gv(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 qv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Gv(n,t)}function Dn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xv=Sl,Zv=Ps,Jv=El,Qv=Dl,ey=Is,ty=Tl,ny=qr,ry=Ml,oy=Ol,sy=_l,iy=Nl,ay=Il,cy=jl,ly=$l,uy=zl,$s="DropdownMenu",[dy,Dx]=mt($s,[wl]),Ee=wl(),[fy,Bl]=dy($s),Hl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=Ee(t),l=S.useRef(null),[d=!1,u]=Tt({prop:o,defaultProp:s,onChange:i});return p.jsx(fy,{scope:t,triggerId:ft(),triggerRef:l,contentId:ft(),open:d,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(v=>!v),[u]),modal:a,children:p.jsx(Xv,{...c,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Hl.displayName=$s;var Vl="DropdownMenuTrigger",Ul=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Bl(Vl,n),i=Ee(n);return p.jsx(Zv,{asChild:!0,...i,children:p.jsx(ie.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:Nr(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())})})})});Ul.displayName=Vl;var py="DropdownMenuPortal",Yl=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return p.jsx(Jv,{...r,...n})};Yl.displayName=py;var Kl="DropdownMenuContent",Gl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Bl(Kl,n),s=Ee(n),i=S.useRef(!1);return p.jsx(Qv,{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)"}})});Gl.displayName=Kl;var hy="DropdownMenuGroup",gy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ey,{...o,...r,ref:t})});gy.displayName=hy;var my="DropdownMenuLabel",ql=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ty,{...o,...r,ref:t})});ql.displayName=my;var vy="DropdownMenuItem",Xl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ny,{...o,...r,ref:t})});Xl.displayName=vy;var yy="DropdownMenuCheckboxItem",Zl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ry,{...o,...r,ref:t})});Zl.displayName=yy;var by="DropdownMenuRadioGroup",wy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(oy,{...o,...r,ref:t})});wy.displayName=by;var xy="DropdownMenuRadioItem",Sy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(sy,{...o,...r,ref:t})});Sy.displayName=xy;var Cy="DropdownMenuItemIndicator",Jl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(iy,{...o,...r,ref:t})});Jl.displayName=Cy;var Ey="DropdownMenuSeparator",Ql=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ay,{...o,...r,ref:t})});Ql.displayName=Ey;var Dy="DropdownMenuArrow",Ty=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(cy,{...o,...r,ref:t})});Ty.displayName=Dy;var Ry="DropdownMenuSubTrigger",My=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ly,{...o,...r,ref:t})});My.displayName=Ry;var ky="DropdownMenuSubContent",Oy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(uy,{...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)"}})});Oy.displayName=ky;var Py=Hl,_y=Ul,Ay=Yl,Ny=Gl,Iy=ql,jy=Xl,Ly=Zl,$y=Jl,Fy=Ql;function Fs({...e}){return p.jsx(Py,{"data-slot":"dropdown-menu",...e})}function zs({...e}){return p.jsx(_y,{"data-slot":"dropdown-menu-trigger",...e})}function Ws({className:e,sideOffset:t=4,...n}){return p.jsx(Ay,{children:p.jsx(Ny,{"data-slot":"dropdown-menu-content",sideOffset:t,style:{zIndex:100},className:se("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 Gi({className:e,inset:t,variant:n="default",...r}){return p.jsx(jy,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:se("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 zy({className:e,children:t,checked:n,...r}){return p.jsxs(Ly,{"data-slot":"dropdown-menu-checkbox-item",className:se("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($y,{children:p.jsx(cc,{className:"size-4"})})}),t]})}function Wy({className:e,inset:t,...n}){return p.jsx(Iy,{"data-slot":"dropdown-menu-label","data-inset":t,className:se("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function By({className:e,...t}){return p.jsx(Fy,{"data-slot":"dropdown-menu-separator",className:se("bg-border -mx-1 my-1 h-px",e),...t})}var Hy="Label",eu=S.forwardRef((e,t)=>p.jsx(ie.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())}}));eu.displayName=Hy;var Vy=eu;function Uy({className:e,...t}){return p.jsx(Vy,{"data-slot":"label",className:se("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 Yy={isDragging:!1},en=Mr(e=>({...Yy,updateIsDragging:t=>e(n=>({...n,isDragging:t}))})),Ky=({onClose:e,side:t,onOpenChange:n,buttonTrigger:r,modal:o=!1,children:s})=>{const[i,a]=R.useState({x:0,y:0}),c=en(g=>g.updateIsDragging),{attributes:l,listeners:d,setNodeRef:u,transform:v,setActivatorNodeRef:h}=us({id:"booking_info",data:{type:"another"}}),C={transform:`translate3d(${i.x+((v==null?void 0:v.x)||0)}px, ${i.y+((v==null?void 0:v.y)||0)}px, 0)`};return kn({onDragStart(){c(!0)},onDragEnd(g){if(g.active.id){const{y:x,x:y}=i;a({x:y+((v==null?void 0:v.x)||0),y:x+((v==null?void 0:v.y)||0)}),c(!1)}}}),p.jsxs(Fs,{dir:"ltr",modal:o,open:!0,onOpenChange:n,children:[p.jsx(zs,{asChild:!0,children:r||p.jsx("div",{})}),p.jsxs(Ws,{ref:u,style:{...C,zIndex:50,width:"25rem"},forceMount:!0,avoidCollisions:!0,side:t,sticky:"always",updatePositionStrategy:"always",...l,children:[p.jsxs("div",{className:"dropdownLabelContent",children:[p.jsx(Uy,{ref:h,className:"dropdownLabelContent_dropdownLabel",...d,children:"Appointment"}),p.jsx(Lp,{className:"dropdownLabelContent_close",onClick:e})]}),s]})]})},tu=({modal:e=!1,side:t,onClose:n,onOpenChange:r,buttonTrigger:o,ref:s})=>{const[i,a]=R.useState(!1),{createBookingModal:c}=Qe(),l=()=>{a(!1),n==null||n()},d=u=>{a(u),r==null||r(u)};return R.useImperativeHandle(s,()=>({showCreationModal:()=>a(!0),closeModal:()=>a(!1),isModalOpen:()=>i})),p.jsx(p.Fragment,{children:i&&p.jsx(ls,{children:p.jsx(Ky,{onClose:l,onOpenChange:d,modal:e,side:t,buttonTrigger:o,children:c})})})},Gy=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=xe(),{updateMonthMessage:o,updateHeaderDateLabel:s}=La(x=>x),{onViewTypeChange:i}=Ia(),{onHeaderDayClick:a}=Qe(),{resetSelectedNode:c,resetNodes:l}=Mt(x=>x),d=R.useRef(null),u=()=>d.current,v=()=>{var x;(x=u())==null||x.showCreationModal()},h=R.useCallback(x=>{const y=()=>{r(re.WEEK),i(re.WEEK)},f=()=>t===re.DAY;if(a==null||a(x,t),f())return y();const w=n(x);if(!w)return;const D={month:w.getMonth(),fullYear:w.getFullYear(),monthMessage:Wt[w.getMonth()]};o(D),r(re.DAY)},[t,n,o,r]),C=t===re.TABLE?{justifySelf:"start"}:{},g=R.useMemo(()=>{const x=y=>new Date(y).toDateString()===new Date().toDateString();return e.map(y=>{const f=Oo[new Date(y).getDay()];return p.jsx("th",{className:se("daysOfWeek",t!==re.DAY&&"daysOfWeek_day"),children:p.jsxs("div",{style:{...C,maxWidth:t===re.DAY?"11rem":void 0},className:"daysOfWeek_parent",children:[p.jsx("span",{className:se(x(y)&&"daysOfWeek_day_today_title"),children:f}),p.jsx("div",{style:{width:"100%"},children:p.jsx("button",{type:"button",className:se("daysOfWeek_day",x(y)?"daysOfWeek_day_today":"daysOfWeek_day_rest"),onClick:()=>h(y),children:Q.formatDate(y.toDateString())})})]})},f)})},[e,h,t]);return R.useEffect(()=>{switch(t){case re.DAY:{l(),c(),s(e[0]);break}case re.WEEK:{const x=Q.generateWeekMonthLabel(e);o({monthMessage:x})}}},[e]),p.jsxs(p.Fragment,{children:[p.jsx("table",{className:"daysOfWeek_emptySlot_table",children:p.jsx("tbody",{children:p.jsxs("tr",{children:[p.jsx("th",{style:C,className:"calendarHeader",children:p.jsx("div",{className:"daysOfWeek_emptySlot",children:p.jsx(Ts,{content:"Create booking",children:p.jsx(Et,{variant:"ghost",onClick:v,children:p.jsx(Cp,{})})})})},"emptyBlocks"),g]})})}),p.jsx(tu,{modal:!0,ref:d})]})},qy=({handleWeekChange:e})=>p.jsxs("div",{className:"header_day_actions",children:[p.jsx(Et,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("previous"),children:p.jsx(vp,{className:"header_day_actions_button_icon"})}),p.jsx(Et,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("next"),children:p.jsx(bp,{className:"header_day_actions_button_icon"})})]}),Xy=({onClick:e})=>p.jsx(Ts,{content:"Today",children:p.jsx(Et,{variant:"ghost",onClick:e,children:p.jsx(Ap,{style:{paddingTop:"0.8px"}})})}),Zy={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},Jy=({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]})}),Qy={[re.DAY]:p.jsx(Rp,{width:"90%"}),[re.WEEK]:p.jsx(Dp,{width:"90%"}),[re.TABLE]:p.jsx(pp,{width:"90%"}),[re.MONTH]:p.jsx(kp,{width:"90%"})},qi=()=>{const{bookingViewType:e}=xe(),{onViewTypeChange:t}=Ia(),{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:Qy[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(Fs,{children:[p.jsx(zs,{children:p.jsx(Ts,{content:"Calendar Modes",children:p.jsx(Et,{variant:"ghost",asChild:!0,children:i||p.jsx(dp,{className:"w-full h-full"})})})}),p.jsx(Ws,{children:s.map(a=>p.jsxs(zy,{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:Zy.capitalize(a.label)})]}),p.jsx(Jy,{code:"o"})]},a.label))})]})},eb=566,tb=()=>{const{todayWeek:e,bookingViewType:t,setTodayDay:n,nextWeek:r,previousWeek:o,setDays:s}=xe(),{resetSelectedNode:i,resetNodes:a}=Mt(m=>m),{onTodayClick:c}=Qe(),{fullYear:l,monthMessage:d}=La(m=>m),{onDayChange:u}=Qe(),[v,h]=R.useState(!1),C=()=>{const m=new Date;switch(c(m),t){case re.TABLE:case re.DAY:{n(m);break}default:{e();break}}},g=()=>s(1),x=()=>s(-1),y=m=>m==="next"?r():o(),f=m=>m==="next"?g():x(),w=m=>{switch(a(),i(),t){case re.TABLE:case re.DAY:{const T=f(m);u(T,m);break}case re.WEEK:{const T=y(m),{firstDayOfWeek:b,lastDayOfWeek:E}=Q.firstAndLastWeekDays(T);u([b,E],m);break}}};R.useEffect(()=>{e()},[e]),R.useEffect(()=>{const m=()=>{if(typeof window>"u")return!1;window.innerWidth<=eb?h(!0):h(!1)};return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const D=p.jsxs("div",{className:"header_actions",children:[p.jsx(qy,{handleWeekChange:w}),p.jsx(Xy,{onClick:C})]});return p.jsx(p.Fragment,{children:v?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:[D,p.jsx(qi,{})]})]}):p.jsxs("div",{className:"headerCalendar",children:[p.jsx("div",{className:"headerCalendar_actions",children:D}),p.jsx("div",{className:"headerCalendar_month",children:p.jsxs("span",{className:"headerCalendar_month_span",children:[d," ",l]})}),p.jsx(qi,{})]})})},nb=({children:e})=>{const{resetSelectedNode:t,resetNodes:n}=Mt(o=>o),r=xe(o=>o.bookingViewType);switch(R.useEffect(()=>{(r===re.DAY||r===re.WEEK)&&(t(),n())},[r,n,t]),r){case re.DAY:case re.WEEK:return e;default:return null}},rb=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=ud(t)),p.jsx(Pd,{value:n.current,children:e})},ob=({children:e,...t})=>p.jsx(uc,{value:{...t},children:e}),nu=R.createContext(null),sb={systemColor:"#000000",isTimeInfoVisible:!0},ib=e=>Tn(t=>({...sb,...e,updateSystemColor:n=>{t(r=>({...r,systemColor:n}))},changeTimeInfoVisibility:n=>{t(r=>({...r,isTimeInfoVisible:n}))}})),ab=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=ib(t)),p.jsx(nu,{value:n.current,children:e})},ru={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},cb=e=>Tn((t,n)=>({...e,...ru,updateMonthMessage:r=>{t(o=>({...o,...r}))},updateHeaderDateLabel:r=>{n().updateMonthMessage({month:r.getMonth(),fullYear:r.getFullYear(),monthMessage:Wt[r.getMonth()]})}})),lb=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=cb(t)),p.jsx(ja,{value:n.current,children:e})};var ub={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function Ko(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return ub[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function wo(e){var t=Ko(e);return"".concat(t.value).concat(t.unit)}var db=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return r;var o=document.createElement("style");document.head.appendChild(o);var s=o.sheet,i=`
146
+ @keyframes `.concat(r,` {
147
+ `).concat(t,`
148
+ }
149
+ `);return s&&s.insertRule(i,0),r},Er=function(){return Er=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Er.apply(this,arguments)},fb=function(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},pb=db("GridLoader","0% {transform: scale(1)} 50% {transform: scale(0.5); opacity: 0.7} 100% {transform: scale(1); opacity: 1}","grid"),Xe=function(e){return Math.random()*e};function hb(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,o=r===void 0?"#000000":r,s=e.speedMultiplier,i=s===void 0?1:s,a=e.cssOverride,c=a===void 0?{}:a,l=e.size,d=l===void 0?15:l,u=e.margin,v=u===void 0?2:u,h=fb(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),C=Ko(d),g=Ko(v),x=parseFloat(C.value.toString())*3+parseFloat(g.value.toString())*6,y=Er({width:"".concat(x).concat(C.unit),fontSize:0,display:"inline-block"},c),f=function(w){return{display:"inline-block",backgroundColor:o,width:"".concat(wo(d)),height:"".concat(wo(d)),margin:wo(v),borderRadius:"100%",animationFillMode:"both",animation:"".concat(pb," ").concat((w/100+.6)/i,"s ").concat(w/100-.2,"s infinite ease")}};return n?S.createElement("span",Er({style:y},h,{ref:function(w){w&&w.style.setProperty("width","".concat(x).concat(C.unit),"important")}}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))})):null}const gb={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},Xi=e=>Symbol.iterator in e,Zi=e=>"entries"in e,Ji=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[o,s]of n)if(!Object.is(s,r.get(o)))return!1;return!0},mb=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let o=n.next(),s=r.next();for(;!o.done&&!s.done;){if(!Object.is(o.value,s.value))return!1;o=n.next(),s=r.next()}return!!o.done&&!!s.done};function vb(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:!Xi(e)||!Xi(t)?Ji({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)}):Zi(e)&&Zi(t)?Ji(e,t):mb(e,t)}function Bs(e){const t=R.useRef(void 0);return n=>{const r=e(n);return vb(t.current,r)?t.current:t.current=r}}const ou=Mr(e=>({startAt:"",updateStartAt:t=>e(n=>({...n,startAt:t}))}));var cn={exports:{}},ln={},un={exports:{}},xo={},Jn={exports:{}},Qn={exports:{}},ce={};/** @license React v16.13.1
141
150
  * react-is.production.min.js
142
151
  *
143
152
  * Copyright (c) Facebook, Inc. and its affiliates.
144
153
  *
145
154
  * This source code is licensed under the MIT license found in the
146
155
  * 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
156
+ */var Qi;function yb(){if(Qi)return ce;Qi=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,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function w(m){if(typeof m=="object"&&m!==null){var T=m.$$typeof;switch(T){case t:switch(m=m.type,m){case c:case l:case r:case s:case o:case u:return m;default:switch(m=m&&m.$$typeof,m){case a:case d:case C:case h:case i:return m;default:return T}}case n:return T}}}function D(m){return w(m)===l}return ce.AsyncMode=c,ce.ConcurrentMode=l,ce.ContextConsumer=a,ce.ContextProvider=i,ce.Element=t,ce.ForwardRef=d,ce.Fragment=r,ce.Lazy=C,ce.Memo=h,ce.Portal=n,ce.Profiler=s,ce.StrictMode=o,ce.Suspense=u,ce.isAsyncMode=function(m){return D(m)||w(m)===c},ce.isConcurrentMode=D,ce.isContextConsumer=function(m){return w(m)===a},ce.isContextProvider=function(m){return w(m)===i},ce.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ce.isForwardRef=function(m){return w(m)===d},ce.isFragment=function(m){return w(m)===r},ce.isLazy=function(m){return w(m)===C},ce.isMemo=function(m){return w(m)===h},ce.isPortal=function(m){return w(m)===n},ce.isProfiler=function(m){return w(m)===s},ce.isStrictMode=function(m){return w(m)===o},ce.isSuspense=function(m){return w(m)===u},ce.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===l||m===s||m===o||m===u||m===v||typeof m=="object"&&m!==null&&(m.$$typeof===C||m.$$typeof===h||m.$$typeof===i||m.$$typeof===a||m.$$typeof===d||m.$$typeof===x||m.$$typeof===y||m.$$typeof===f||m.$$typeof===g)},ce.typeOf=w,ce}var le={};/** @license React v16.13.1
148
157
  * react-is.development.js
149
158
  *
150
159
  * Copyright (c) Facebook, Inc. and its affiliates.
151
160
  *
152
161
  * This source code is licensed under the MIT license found in the
153
162
  * 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}/*
163
+ */var ea;function bb(){return ea||(ea=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,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function w(_){return typeof _=="string"||typeof _=="function"||_===r||_===l||_===s||_===o||_===u||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===C||_.$$typeof===h||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===x||_.$$typeof===y||_.$$typeof===f||_.$$typeof===g)}function D(_){if(typeof _=="object"&&_!==null){var ne=_.$$typeof;switch(ne){case t:var ae=_.type;switch(ae){case c:case l:case r:case s:case o:case u:return ae;default:var fe=ae&&ae.$$typeof;switch(fe){case a:case d:case C:case h:case i:return fe;default:return ne}}case n:return ne}}}var m=c,T=l,b=a,E=i,M=t,N=d,A=r,W=C,Y=h,L=n,$=s,k=o,I=u,O=!1;function j(_){return O||(O=!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.")),P(_)||D(_)===c}function P(_){return D(_)===l}function F(_){return D(_)===a}function U(_){return D(_)===i}function V(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function H(_){return D(_)===d}function X(_){return D(_)===r}function K(_){return D(_)===C}function z(_){return D(_)===h}function G(_){return D(_)===n}function q(_){return D(_)===s}function B(_){return D(_)===o}function te(_){return D(_)===u}le.AsyncMode=m,le.ConcurrentMode=T,le.ContextConsumer=b,le.ContextProvider=E,le.Element=M,le.ForwardRef=N,le.Fragment=A,le.Lazy=W,le.Memo=Y,le.Portal=L,le.Profiler=$,le.StrictMode=k,le.Suspense=I,le.isAsyncMode=j,le.isConcurrentMode=P,le.isContextConsumer=F,le.isContextProvider=U,le.isElement=V,le.isForwardRef=H,le.isFragment=X,le.isLazy=K,le.isMemo=z,le.isPortal=G,le.isProfiler=q,le.isStrictMode=B,le.isSuspense=te,le.isValidElementType=w,le.typeOf=D}()),le}var ta;function su(){return ta||(ta=1,process.env.NODE_ENV==="production"?Qn.exports=yb():Qn.exports=bb()),Qn.exports}/*
155
164
  object-assign
156
165
  (c) Sindre Sorhus
157
166
  @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;}
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;
167
+ */var So,na;function wb(){if(na)return So;na=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 So=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 v=0;v<l.length;v++)n.call(a,l[v])&&(c[l[v]]=a[l[v]])}}return c},So}var Co,ra;function Hs(){if(ra)return Co;ra=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Co=e,Co}var Eo,oa;function iu(){return oa||(oa=1,Eo=Function.call.bind(Object.prototype.hasOwnProperty)),Eo}var Do,sa;function xb(){if(sa)return Do;sa=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Hs(),n={},r=iu();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 v=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 v.name="Invariant Violation",v}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 h=l?l():"";e("Failed "+a+" type: "+u.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Do=o,Do}var To,ia;function Sb(){if(ia)return To;ia=1;var e=su(),t=wb(),n=Hs(),r=iu(),o=xb(),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 To=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(P){var F=P&&(l&&P[l]||P[d]);if(typeof F=="function")return F}var v="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:f(),arrayOf:w,element:D(),elementType:m(),instanceOf:T,node:N(),objectOf:E,oneOf:b,oneOfType:M,shape:W,exact:Y};function C(P,F){return P===F?P!==0||1/P===1/F:P!==P&&F!==F}function g(P,F){this.message=P,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function x(P){if(process.env.NODE_ENV!=="production")var F={},U=0;function V(X,K,z,G,q,B,te){if(G=G||v,B=B||z,te!==n){if(c){var _=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 _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=G+":"+z;!F[ne]&&U<3&&(s("You are manually calling a React.PropTypes validation function for the `"+B+"` prop on `"+G+"`. 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."),F[ne]=!0,U++)}}return K[z]==null?X?K[z]===null?new g("The "+q+" `"+B+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new g("The "+q+" `"+B+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:P(K,z,G,q,B)}var H=V.bind(null,!1);return H.isRequired=V.bind(null,!0),H}function y(P){function F(U,V,H,X,K,z){var G=U[V],q=k(G);if(q!==P){var B=I(G);return new g("Invalid "+X+" `"+K+"` of type "+("`"+B+"` supplied to `"+H+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return x(F)}function f(){return x(i)}function w(P){function F(U,V,H,X,K){if(typeof P!="function")return new g("Property `"+K+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var z=U[V];if(!Array.isArray(z)){var G=k(z);return new g("Invalid "+X+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected an array."))}for(var q=0;q<z.length;q++){var B=P(z,q,H,X,K+"["+q+"]",n);if(B instanceof Error)return B}return null}return x(F)}function D(){function P(F,U,V,H,X){var K=F[U];if(!a(K)){var z=k(K);return new g("Invalid "+H+" `"+X+"` of type "+("`"+z+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return x(P)}function m(){function P(F,U,V,H,X){var K=F[U];if(!e.isValidElementType(K)){var z=k(K);return new g("Invalid "+H+" `"+X+"` of type "+("`"+z+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return x(P)}function T(P){function F(U,V,H,X,K){if(!(U[V]instanceof P)){var z=P.name||v,G=j(U[V]);return new g("Invalid "+X+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected ")+("instance of `"+z+"`."))}return null}return x(F)}function b(P){if(!Array.isArray(P))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 F(U,V,H,X,K){for(var z=U[V],G=0;G<P.length;G++)if(C(z,P[G]))return null;var q=JSON.stringify(P,function(te,_){var ne=I(_);return ne==="symbol"?String(_):_});return new g("Invalid "+X+" `"+K+"` of value `"+String(z)+"` "+("supplied to `"+H+"`, expected one of "+q+"."))}return x(F)}function E(P){function F(U,V,H,X,K){if(typeof P!="function")return new g("Property `"+K+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var z=U[V],G=k(z);if(G!=="object")return new g("Invalid "+X+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected an object."));for(var q in z)if(r(z,q)){var B=P(z,q,H,X,K+"."+q,n);if(B instanceof Error)return B}return null}return x(F)}function M(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var F=0;F<P.length;F++){var U=P[F];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(U)+" at index "+F+"."),i}function V(H,X,K,z,G){for(var q=[],B=0;B<P.length;B++){var te=P[B],_=te(H,X,K,z,G,n);if(_==null)return null;_.data&&r(_.data,"expectedType")&&q.push(_.data.expectedType)}var ne=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+z+" `"+G+"` supplied to "+("`"+K+"`"+ne+"."))}return x(V)}function N(){function P(F,U,V,H,X){return L(F[U])?null:new g("Invalid "+H+" `"+X+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return x(P)}function A(P,F,U,V,H){return new g((P||"React class")+": "+F+" type `"+U+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function W(P){function F(U,V,H,X,K){var z=U[V],G=k(z);if(G!=="object")return new g("Invalid "+X+" `"+K+"` of type `"+G+"` "+("supplied to `"+H+"`, expected `object`."));for(var q in P){var B=P[q];if(typeof B!="function")return A(H,X,K,q,I(B));var te=B(z,q,H,X,K+"."+q,n);if(te)return te}return null}return x(F)}function Y(P){function F(U,V,H,X,K){var z=U[V],G=k(z);if(G!=="object")return new g("Invalid "+X+" `"+K+"` of type `"+G+"` "+("supplied to `"+H+"`, expected `object`."));var q=t({},U[V],P);for(var B in q){var te=P[B];if(r(P,B)&&typeof te!="function")return A(H,X,K,B,I(te));if(!te)return new g("Invalid "+X+" `"+K+"` key `"+B+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[V],null," ")+`
168
+ Valid keys: `+JSON.stringify(Object.keys(P),null," "));var _=te(z,B,H,X,K+"."+B,n);if(_)return _}return null}return x(F)}function L(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(L);if(P===null||a(P))return!0;var F=u(P);if(F){var U=F.call(P),V;if(F!==P.entries){for(;!(V=U.next()).done;)if(!L(V.value))return!1}else for(;!(V=U.next()).done;){var H=V.value;if(H&&!L(H[1]))return!1}}else return!1;return!0;default:return!1}}function $(P,F){return P==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function k(P){var F=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":$(F,P)?"symbol":F}function I(P){if(typeof P>"u"||P===null)return""+P;var F=k(P);if(F==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return F}function O(P){var F=I(P);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function j(P){return!P.constructor||!P.constructor.name?v:P.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},To}var Ro,aa;function Cb(){if(aa)return Ro;aa=1;var e=Hs();function t(){}function n(){}return n.resetWarningCache=t,Ro=function(){function r(i,a,c,l,d,u){if(u!==e){var v=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 v.name="Invariant Violation",v}}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},Ro}var ca;function Xr(){if(ca)return Jn.exports;if(ca=1,process.env.NODE_ENV!=="production"){var e=su(),t=!0;Jn.exports=Sb()(e.isElement,t)}else Jn.exports=Cb()();return Jn.exports}function au(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=au(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function la(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=au(e))&&(r&&(r+=" "),r+=t);return r}const Eb=Object.freeze(Object.defineProperty({__proto__:null,clsx:la,default:la},Symbol.toStringTag,{value:"Module"})),Db=wd(Eb);var pe={},ct={},ua;function Zr(){if(ua)return ct;ua=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.dontSetMe=o,ct.findInArray=e,ct.int=r,ct.isFunction=t,ct.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 ct}var lt={},da;function Tb(){if(da)return lt;da=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.browserPrefixToKey=n,lt.browserPrefixToStyle=r,lt.default=void 0,lt.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 lt.default=t(),lt}var fa;function Vs(){if(fa)return pe;fa=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.addClassName=m,pe.addEvent=a,pe.addUserSelectStyles=w,pe.createCSSTransform=C,pe.createSVGTransform=g,pe.getTouch=y,pe.getTouchIdentifier=f,pe.getTranslation=x,pe.innerHeight=u,pe.innerWidth=v,pe.matchesSelector=s,pe.matchesSelectorAndParentsTo=i,pe.offsetXYFromParent=h,pe.outerHeight=l,pe.outerWidth=d,pe.removeClassName=T,pe.removeEvent=c,pe.removeUserSelectStyles=D;var e=Zr(),t=r(Tb());function n(b){if(typeof WeakMap!="function")return null;var E=new WeakMap,M=new WeakMap;return(n=function(N){return N?M:E})(b)}function r(b,E){if(b&&b.__esModule)return b;if(b===null||typeof b!="object"&&typeof b!="function")return{default:b};var M=n(E);if(M&&M.has(b))return M.get(b);var N={},A=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in b)if(W!=="default"&&Object.prototype.hasOwnProperty.call(b,W)){var Y=A?Object.getOwnPropertyDescriptor(b,W):null;Y&&(Y.get||Y.set)?Object.defineProperty(N,W,Y):N[W]=b[W]}return N.default=b,M&&M.set(b,N),N}let o="";function s(b,E){return o||(o=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(M){return(0,e.isFunction)(b[M])})),(0,e.isFunction)(b[o])?b[o](E):!1}function i(b,E,M){let N=b;do{if(s(N,E))return!0;if(N===M)return!1;N=N.parentNode}while(N);return!1}function a(b,E,M,N){if(!b)return;const A={capture:!0,...N};b.addEventListener?b.addEventListener(E,M,A):b.attachEvent?b.attachEvent("on"+E,M):b["on"+E]=M}function c(b,E,M,N){if(!b)return;const A={capture:!0,...N};b.removeEventListener?b.removeEventListener(E,M,A):b.detachEvent?b.detachEvent("on"+E,M):b["on"+E]=null}function l(b){let E=b.clientHeight;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E+=(0,e.int)(M.borderTopWidth),E+=(0,e.int)(M.borderBottomWidth),E}function d(b){let E=b.clientWidth;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E+=(0,e.int)(M.borderLeftWidth),E+=(0,e.int)(M.borderRightWidth),E}function u(b){let E=b.clientHeight;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E-=(0,e.int)(M.paddingTop),E-=(0,e.int)(M.paddingBottom),E}function v(b){let E=b.clientWidth;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E-=(0,e.int)(M.paddingLeft),E-=(0,e.int)(M.paddingRight),E}function h(b,E,M){const A=E===E.ownerDocument.body?{left:0,top:0}:E.getBoundingClientRect(),W=(b.clientX+E.scrollLeft-A.left)/M,Y=(b.clientY+E.scrollTop-A.top)/M;return{x:W,y:Y}}function C(b,E){const M=x(b,E,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:M}}function g(b,E){return x(b,E,"")}function x(b,E,M){let{x:N,y:A}=b,W="translate(".concat(N).concat(M,",").concat(A).concat(M,")");if(E){const Y="".concat(typeof E.x=="string"?E.x:E.x+M),L="".concat(typeof E.y=="string"?E.y:E.y+M);W="translate(".concat(Y,", ").concat(L,")")+W}return W}function y(b,E){return b.targetTouches&&(0,e.findInArray)(b.targetTouches,M=>E===M.identifier)||b.changedTouches&&(0,e.findInArray)(b.changedTouches,M=>E===M.identifier)}function f(b){if(b.targetTouches&&b.targetTouches[0])return b.targetTouches[0].identifier;if(b.changedTouches&&b.changedTouches[0])return b.changedTouches[0].identifier}function w(b){if(!b)return;let E=b.getElementById("react-draggable-style-el");E||(E=b.createElement("style"),E.type="text/css",E.id="react-draggable-style-el",E.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
169
+ `,E.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
170
+ `,b.getElementsByTagName("head")[0].appendChild(E)),b.body&&m(b.body,"react-draggable-transparent-selection")}function D(b){if(b)try{if(b.body&&T(b.body,"react-draggable-transparent-selection"),b.selection)b.selection.empty();else{const E=(b.defaultView||window).getSelection();E&&E.type!=="Caret"&&E.removeAllRanges()}}catch{}}function m(b,E){b.classList?b.classList.add(E):b.className.match(new RegExp("(?:^|\\s)".concat(E,"(?!\\S)")))||(b.className+=" ".concat(E))}function T(b,E){b.classList?b.classList.remove(E):b.className=b.className.replace(new RegExp("(?:^|\\s)".concat(E,"(?!\\S)"),"g"),"")}return pe}var He={},pa;function cu(){if(pa)return He;pa=1,Object.defineProperty(He,"__esModule",{value:!0}),He.canDragX=o,He.canDragY=s,He.createCoreData=a,He.createDraggableData=c,He.getBoundPosition=n,He.getControlPosition=i,He.snapToGrid=r;var e=Zr(),t=Vs();function n(u,v,h){if(!u.props.bounds)return[v,h];let{bounds:C}=u.props;C=typeof C=="string"?C:l(C);const g=d(u);if(typeof C=="string"){const{ownerDocument:x}=g,y=x.defaultView;let f;if(C==="parent"?f=g.parentNode:f=x.querySelector(C),!(f instanceof y.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const w=f,D=y.getComputedStyle(g),m=y.getComputedStyle(w);C={left:-g.offsetLeft+(0,e.int)(m.paddingLeft)+(0,e.int)(D.marginLeft),top:-g.offsetTop+(0,e.int)(m.paddingTop)+(0,e.int)(D.marginTop),right:(0,t.innerWidth)(w)-(0,t.outerWidth)(g)-g.offsetLeft+(0,e.int)(m.paddingRight)-(0,e.int)(D.marginRight),bottom:(0,t.innerHeight)(w)-(0,t.outerHeight)(g)-g.offsetTop+(0,e.int)(m.paddingBottom)-(0,e.int)(D.marginBottom)}}return(0,e.isNum)(C.right)&&(v=Math.min(v,C.right)),(0,e.isNum)(C.bottom)&&(h=Math.min(h,C.bottom)),(0,e.isNum)(C.left)&&(v=Math.max(v,C.left)),(0,e.isNum)(C.top)&&(h=Math.max(h,C.top)),[v,h]}function r(u,v,h){const C=Math.round(v/u[0])*u[0],g=Math.round(h/u[1])*u[1];return[C,g]}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,v,h){const C=typeof v=="number"?(0,t.getTouch)(u,v):null;if(typeof v=="number"&&!C)return null;const g=d(h),x=h.props.offsetParent||g.offsetParent||g.ownerDocument.body;return(0,t.offsetXYFromParent)(C||u,x,h.props.scale)}function a(u,v,h){const C=!(0,e.isNum)(u.lastX),g=d(u);return C?{node:g,deltaX:0,deltaY:0,lastX:v,lastY:h,x:v,y:h}:{node:g,deltaX:v-u.lastX,deltaY:h-u.lastY,lastX:u.lastX,lastY:u.lastY,x:v,y:h}}function c(u,v){const h=u.props.scale;return{node:v.node,x:u.state.x+v.deltaX/h,y:u.state.y+v.deltaY/h,deltaX:v.deltaX/h,deltaY:v.deltaY/h,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 v=u.findDOMNode();if(!v)throw new Error("<DraggableCore>: Unmounted during event!");return v}return He}var dn={},er={},ha;function lu(){if(ha)return er;ha=1,Object.defineProperty(er,"__esModule",{value:!0}),er.default=e;function e(){}return er}var ga;function Rb(){if(ga)return dn;ga=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=void 0;var e=l(R),t=a(Xr()),n=a(Ze),r=Vs(),o=cu(),s=Zr(),i=a(lu());function a(x){return x&&x.__esModule?x:{default:x}}function c(x){if(typeof WeakMap!="function")return null;var y=new WeakMap,f=new WeakMap;return(c=function(w){return w?f:y})(x)}function l(x,y){if(x&&x.__esModule)return x;if(x===null||typeof x!="object"&&typeof x!="function")return{default:x};var f=c(y);if(f&&f.has(x))return f.get(x);var w={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in x)if(m!=="default"&&Object.prototype.hasOwnProperty.call(x,m)){var T=D?Object.getOwnPropertyDescriptor(x,m):null;T&&(T.get||T.set)?Object.defineProperty(w,m,T):w[m]=x[m]}return w.default=x,f&&f.set(x,w),w}function d(x,y,f){return y=u(y),y in x?Object.defineProperty(x,y,{value:f,enumerable:!0,configurable:!0,writable:!0}):x[y]=f,x}function u(x){var y=v(x,"string");return typeof y=="symbol"?y:String(y)}function v(x,y){if(typeof x!="object"||x===null)return x;var f=x[Symbol.toPrimitive];if(f!==void 0){var w=f.call(x,y);if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(x)}const h={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=h.mouse,g=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",y=>{if(this.props.onMouseDown(y),!this.props.allowAnyClick&&typeof y.button=="number"&&y.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:w}=f;if(this.props.disabled||!(y.target instanceof w.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(y.target,this.props.handle,f)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(y.target,this.props.cancel,f))return;y.type==="touchstart"&&y.preventDefault();const D=(0,r.getTouchIdentifier)(y);this.touchIdentifier=D;const m=(0,o.getControlPosition)(y,D,this);if(m==null)return;const{x:T,y:b}=m,E=(0,o.createCoreData)(this,T,b);(0,i.default)("DraggableCore: handleDragStart: %j",E),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(y,E)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(w),this.dragging=!0,this.lastX=T,this.lastY=b,(0,r.addEvent)(w,C.move,this.handleDrag),(0,r.addEvent)(w,C.stop,this.handleDragStop))}),d(this,"handleDrag",y=>{const f=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(f==null)return;let{x:w,y:D}=f;if(Array.isArray(this.props.grid)){let b=w-this.lastX,E=D-this.lastY;if([b,E]=(0,o.snapToGrid)(this.props.grid,b,E),!b&&!E)return;w=this.lastX+b,D=this.lastY+E}const m=(0,o.createCoreData)(this,w,D);if((0,i.default)("DraggableCore: handleDrag: %j",m),this.props.onDrag(y,m)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const E=document.createEvent("MouseEvents");E.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(E)}return}this.lastX=w,this.lastY=D}),d(this,"handleDragStop",y=>{if(!this.dragging)return;const f=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(f==null)return;let{x:w,y:D}=f;if(Array.isArray(this.props.grid)){let E=w-this.lastX||0,M=D-this.lastY||0;[E,M]=(0,o.snapToGrid)(this.props.grid,E,M),w=this.lastX+E,D=this.lastY+M}const m=(0,o.createCoreData)(this,w,D);if(this.props.onStop(y,m)===!1||this.mounted===!1)return!1;const b=this.findDOMNode();b&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(b.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",m),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,b&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(b.ownerDocument,C.move,this.handleDrag),(0,r.removeEvent)(b.ownerDocument,C.stop,this.handleDragStop))}),d(this,"onMouseDown",y=>(C=h.mouse,this.handleDragStart(y))),d(this,"onMouseUp",y=>(C=h.mouse,this.handleDragStop(y))),d(this,"onTouchStart",y=>(C=h.touch,this.handleDragStart(y))),d(this,"onTouchEnd",y=>(C=h.touch,this.handleDragStop(y)))}componentDidMount(){this.mounted=!0;const y=this.findDOMNode();y&&(0,r.addEvent)(y,h.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const y=this.findDOMNode();if(y){const{ownerDocument:f}=y;(0,r.removeEvent)(f,h.mouse.move,this.handleDrag),(0,r.removeEvent)(f,h.touch.move,this.handleDrag),(0,r.removeEvent)(f,h.mouse.stop,this.handleDragStop),(0,r.removeEvent)(f,h.touch.stop,this.handleDragStop),(0,r.removeEvent)(y,h.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(f)}}findDOMNode(){var y,f;return(y=this.props)!==null&&y!==void 0&&y.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 dn.default=g,d(g,"displayName","DraggableCore"),d(g,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(x,y){if(x[y]&&x[y].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(g,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),dn}var ma;function Mb(){return ma||(ma=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=v(R),n=d(Xr()),r=d(Ze),o=d(Db),s=Vs(),i=cu(),a=Zr(),c=d(Rb()),l=d(lu());function d(f){return f&&f.__esModule?f:{default:f}}function u(f){if(typeof WeakMap!="function")return null;var w=new WeakMap,D=new WeakMap;return(u=function(m){return m?D:w})(f)}function v(f,w){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var D=u(w);if(D&&D.has(f))return D.get(f);var m={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in f)if(b!=="default"&&Object.prototype.hasOwnProperty.call(f,b)){var E=T?Object.getOwnPropertyDescriptor(f,b):null;E&&(E.get||E.set)?Object.defineProperty(m,b,E):m[b]=f[b]}return m.default=f,D&&D.set(f,m),m}function h(){return h=Object.assign?Object.assign.bind():function(f){for(var w=1;w<arguments.length;w++){var D=arguments[w];for(var m in D)Object.prototype.hasOwnProperty.call(D,m)&&(f[m]=D[m])}return f},h.apply(this,arguments)}function C(f,w,D){return w=g(w),w in f?Object.defineProperty(f,w,{value:D,enumerable:!0,configurable:!0,writable:!0}):f[w]=D,f}function g(f){var w=x(f,"string");return typeof w=="symbol"?w:String(w)}function x(f,w){if(typeof f!="object"||f===null)return f;var D=f[Symbol.toPrimitive];if(D!==void 0){var m=D.call(f,w);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(f)}class y extends t.Component{static getDerivedStateFromProps(w,D){let{position:m}=w,{prevPropsPosition:T}=D;return m&&(!T||m.x!==T.x||m.y!==T.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:m,prevPropsPosition:T}),{x:m.x,y:m.y,prevPropsPosition:{...m}}):null}constructor(w){super(w),C(this,"onDragStart",(D,m)=>{if((0,l.default)("Draggable: onDragStart: %j",m),this.props.onStart(D,(0,i.createDraggableData)(this,m))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(D,m)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",m);const T=(0,i.createDraggableData)(this,m),b={x:T.x,y:T.y,slackX:0,slackY:0};if(this.props.bounds){const{x:M,y:N}=b;b.x+=this.state.slackX,b.y+=this.state.slackY;const[A,W]=(0,i.getBoundPosition)(this,b.x,b.y);b.x=A,b.y=W,b.slackX=this.state.slackX+(M-b.x),b.slackY=this.state.slackY+(N-b.y),T.x=b.x,T.y=b.y,T.deltaX=b.x-this.state.x,T.deltaY=b.y-this.state.y}if(this.props.onDrag(D,T)===!1)return!1;this.setState(b)}),C(this,"onDragStop",(D,m)=>{if(!this.state.dragging||this.props.onStop(D,(0,i.createDraggableData)(this,m))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",m);const b={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:M,y:N}=this.props.position;b.x=M,b.y=N}this.setState(b)}),this.state={dragging:!1,dragged:!1,x:w.position?w.position.x:w.defaultPosition.x,y:w.position?w.position.y:w.defaultPosition.y,prevPropsPosition:{...w.position},slackX:0,slackY:0,isElementSVG:!1},w.position&&!(w.onDrag||w.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 w,D;return(w=(D=this.props)===null||D===void 0||(D=D.nodeRef)===null||D===void 0?void 0:D.current)!==null&&w!==void 0?w:r.default.findDOMNode(this)}render(){const{axis:w,bounds:D,children:m,defaultPosition:T,defaultClassName:b,defaultClassNameDragging:E,defaultClassNameDragged:M,position:N,positionOffset:A,scale:W,...Y}=this.props;let L={},$=null;const I=!!!N||this.state.dragging,O=N||T,j={x:(0,i.canDragX)(this)&&I?this.state.x:O.x,y:(0,i.canDragY)(this)&&I?this.state.y:O.y};this.state.isElementSVG?$=(0,s.createSVGTransform)(j,A):L=(0,s.createCSSTransform)(j,A);const P=(0,o.default)(m.props.className||"",b,{[E]:this.state.dragging,[M]:this.state.dragged});return t.createElement(c.default,h({},Y,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(m),{className:P,style:{...m.props.style,...L},transform:$}))}}e.default=y,C(y,"displayName","Draggable"),C(y,"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(y,"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})}(xo)),xo}var va;function uu(){if(va)return un.exports;va=1;const{default:e,DraggableCore:t}=Mb();return un.exports=e,un.exports.default=e,un.exports.DraggableCore=t,un.exports}var tr={},ya;function kb(){if(ya)return tr;ya=1,tr.__esModule=!0,tr.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(v){return Object.getOwnPropertyDescriptor(c,v).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 tr}var fn={},ba;function du(){if(ba)return fn;ba=1,fn.__esModule=!0,fn.resizableProps=void 0;var e=t(Xr());uu();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 fn.resizableProps=n,fn}var wa;function fu(){if(wa)return ln;wa=1,ln.__esModule=!0,ln.default=void 0;var e=i(R),t=uu(),n=kb(),r=du(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(y){if(typeof WeakMap!="function")return null;var f=new WeakMap,w=new WeakMap;return(s=function(m){return m?w:f})(y)}function i(y,f){if(y&&y.__esModule)return y;if(y===null||typeof y!="object"&&typeof y!="function")return{default:y};var w=s(f);if(w&&w.has(y))return w.get(y);var D={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in y)if(T!=="default"&&Object.prototype.hasOwnProperty.call(y,T)){var b=m?Object.getOwnPropertyDescriptor(y,T):null;b&&(b.get||b.set)?Object.defineProperty(D,T,b):D[T]=y[T]}return D.default=y,w&&w.set(y,D),D}function a(){return a=Object.assign?Object.assign.bind():function(y){for(var f=1;f<arguments.length;f++){var w=arguments[f];for(var D in w)Object.prototype.hasOwnProperty.call(w,D)&&(y[D]=w[D])}return y},a.apply(this,arguments)}function c(y,f){if(y==null)return{};var w={},D=Object.keys(y),m,T;for(T=0;T<D.length;T++)m=D[T],!(f.indexOf(m)>=0)&&(w[m]=y[m]);return w}function l(y,f){var w=Object.keys(y);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(y);f&&(D=D.filter(function(m){return Object.getOwnPropertyDescriptor(y,m).enumerable})),w.push.apply(w,D)}return w}function d(y){for(var f=1;f<arguments.length;f++){var w=arguments[f]!=null?arguments[f]:{};f%2?l(Object(w),!0).forEach(function(D){u(y,D,w[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(w)):l(Object(w)).forEach(function(D){Object.defineProperty(y,D,Object.getOwnPropertyDescriptor(w,D))})}return y}function u(y,f,w){return f=v(f),f in y?Object.defineProperty(y,f,{value:w,enumerable:!0,configurable:!0,writable:!0}):y[f]=w,y}function v(y){var f=h(y,"string");return typeof f=="symbol"?f:String(f)}function h(y,f){if(typeof y!="object"||y===null)return y;var w=y[Symbol.toPrimitive];if(w!==void 0){var D=w.call(y,f);if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(y)}function C(y,f){y.prototype=Object.create(f.prototype),y.prototype.constructor=y,g(y,f)}function g(y,f){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,m){return D.__proto__=m,D},g(y,f)}var x=function(y){C(f,y);function f(){for(var D,m=arguments.length,T=new Array(m),b=0;b<m;b++)T[b]=arguments[b];return D=y.call.apply(y,[this].concat(T))||this,D.handleRefs={},D.lastHandleRect=null,D.slack=null,D}var w=f.prototype;return w.componentWillUnmount=function(){this.resetData()},w.resetData=function(){this.lastHandleRect=this.slack=null},w.runConstraints=function(m,T){var b=this.props,E=b.minConstraints,M=b.maxConstraints,N=b.lockAspectRatio;if(!E&&!M&&!N)return[m,T];if(N){var A=this.props.width/this.props.height,W=m-this.props.width,Y=T-this.props.height;Math.abs(W)>Math.abs(Y*A)?T=m/A:m=T*A}var L=m,$=T,k=this.slack||[0,0],I=k[0],O=k[1];return m+=I,T+=O,E&&(m=Math.max(E[0],m),T=Math.max(E[1],T)),M&&(m=Math.min(M[0],m),T=Math.min(M[1],T)),this.slack=[I+(L-m),O+($-T)],[m,T]},w.resizeHandler=function(m,T){var b=this;return function(E,M){var N=M.node,A=M.deltaX,W=M.deltaY;m==="onResizeStart"&&b.resetData();var Y=(b.props.axis==="both"||b.props.axis==="x")&&T!=="n"&&T!=="s",L=(b.props.axis==="both"||b.props.axis==="y")&&T!=="e"&&T!=="w";if(!(!Y&&!L)){var $=T[0],k=T[T.length-1],I=N.getBoundingClientRect();if(b.lastHandleRect!=null){if(k==="w"){var O=I.left-b.lastHandleRect.left;A+=O}if($==="n"){var j=I.top-b.lastHandleRect.top;W+=j}}b.lastHandleRect=I,k==="w"&&(A=-A),$==="n"&&(W=-W);var P=b.props.width+(Y?A/b.props.transformScale:0),F=b.props.height+(L?W/b.props.transformScale:0),U=b.runConstraints(P,F);P=U[0],F=U[1];var V=P!==b.props.width||F!==b.props.height,H=typeof b.props[m]=="function"?b.props[m]:null,X=m==="onResize"&&!V;H&&!X&&(E.persist==null||E.persist(),H(E,{node:N,size:{width:P,height:F},handle:T})),m==="onResizeStop"&&b.resetData()}}},w.renderResizeHandle=function(m,T){var b=this.props.handle;if(!b)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+m,ref:T});if(typeof b=="function")return b(m,T);var E=typeof b.type=="string",M=d({ref:T},E?{}:{handleAxis:m});return e.cloneElement(b,M)},w.render=function(){var m=this,T=this.props,b=T.children,E=T.className,M=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 N=T.resizeHandles;T.transformScale;var A=c(T,o);return(0,n.cloneElement)(b,d(d({},A),{},{className:(E?E+" ":"")+"react-resizable",children:[].concat(b.props.children,N.map(function(W){var Y,L=(Y=m.handleRefs[W])!=null?Y:m.handleRefs[W]=e.createRef();return e.createElement(t.DraggableCore,a({},M,{nodeRef:L,key:"resizableHandle-"+W,onStop:m.resizeHandler("onResizeStop",W),onStart:m.resizeHandler("onResizeStart",W),onDrag:m.resizeHandler("onResize",W)}),m.renderResizeHandle(W,L))}))}))},f}(e.Component);return ln.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},ln}var pn={},xa;function Ob(){if(xa)return pn;xa=1,pn.__esModule=!0,pn.default=void 0;var e=a(R),t=s(Xr()),n=s(fu()),r=du(),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 w=new WeakMap,D=new WeakMap;return(i=function(T){return T?D:w})(f)}function a(f,w){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var D=i(w);if(D&&D.has(f))return D.get(f);var m={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in f)if(b!=="default"&&Object.prototype.hasOwnProperty.call(f,b)){var E=T?Object.getOwnPropertyDescriptor(f,b):null;E&&(E.get||E.set)?Object.defineProperty(m,b,E):m[b]=f[b]}return m.default=f,D&&D.set(f,m),m}function c(){return c=Object.assign?Object.assign.bind():function(f){for(var w=1;w<arguments.length;w++){var D=arguments[w];for(var m in D)Object.prototype.hasOwnProperty.call(D,m)&&(f[m]=D[m])}return f},c.apply(this,arguments)}function l(f,w){var D=Object.keys(f);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(f);w&&(m=m.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),D.push.apply(D,m)}return D}function d(f){for(var w=1;w<arguments.length;w++){var D=arguments[w]!=null?arguments[w]:{};w%2?l(Object(D),!0).forEach(function(m){u(f,m,D[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(D)):l(Object(D)).forEach(function(m){Object.defineProperty(f,m,Object.getOwnPropertyDescriptor(D,m))})}return f}function u(f,w,D){return w=v(w),w in f?Object.defineProperty(f,w,{value:D,enumerable:!0,configurable:!0,writable:!0}):f[w]=D,f}function v(f){var w=h(f,"string");return typeof w=="symbol"?w:String(w)}function h(f,w){if(typeof f!="object"||f===null)return f;var D=f[Symbol.toPrimitive];if(D!==void 0){var m=D.call(f,w);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(f)}function C(f,w){if(f==null)return{};var D={},m=Object.keys(f),T,b;for(b=0;b<m.length;b++)T=m[b],!(w.indexOf(T)>=0)&&(D[T]=f[T]);return D}function g(f,w){f.prototype=Object.create(w.prototype),f.prototype.constructor=f,x(f,w)}function x(f,w){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,T){return m.__proto__=T,m},x(f,w)}var y=function(f){g(w,f);function w(){for(var m,T=arguments.length,b=new Array(T),E=0;E<T;E++)b[E]=arguments[E];return m=f.call.apply(f,[this].concat(b))||this,m.state={width:m.props.width,height:m.props.height,propsWidth:m.props.width,propsHeight:m.props.height},m.onResize=function(M,N){var A=N.size;m.props.onResize?(M.persist==null||M.persist(),m.setState(A,function(){return m.props.onResize&&m.props.onResize(M,N)})):m.setState(A)},m}w.getDerivedStateFromProps=function(T,b){return b.propsWidth!==T.width||b.propsHeight!==T.height?{width:T.width,height:T.height,propsWidth:T.width,propsHeight:T.height}:null};var D=w.prototype;return D.render=function(){var T=this.props,b=T.handle,E=T.handleSize;T.onResize;var M=T.onResizeStart,N=T.onResizeStop,A=T.draggableOpts,W=T.minConstraints,Y=T.maxConstraints,L=T.lockAspectRatio,$=T.axis;T.width,T.height;var k=T.resizeHandles,I=T.style,O=T.transformScale,j=C(T,o);return e.createElement(n.default,{axis:$,draggableOpts:A,handle:b,handleSize:E,height:this.state.height,lockAspectRatio:L,maxConstraints:Y,minConstraints:W,onResizeStart:M,onResize:this.onResize,onResizeStop:N,resizeHandles:k,transformScale:O,width:this.state.width},e.createElement("div",c({},j,{style:d(d({},I),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},w}(e.Component);return pn.default=y,y.propTypes=d(d({},r.resizableProps),{},{children:t.default.element}),pn}var Sa;function Pb(){return Sa||(Sa=1,cn.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},cn.exports.Resizable=fu().default,cn.exports.ResizableBox=Ob().default),cn.exports}var pu=Pb();function _b(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 Ab=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:_b(t,n,r)},Nb=({bookingInit:e,slotData:t,heightStyle:n})=>p.jsx(op,{modifiers:[Ab],dropAnimation:{duration:2e3,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:"Draggable dragging",children:p.jsx(Go,{booking:e,slotData:t,heightStyle:n})}),Go=({booking:e,slotData:t,onClick:n,heightStyle:r,customClasses:o,ref:s})=>{const{day:i,hour:a}=t,[c,l]=R.useState(!1),d=xe(Bs(N=>N.bookingViewType)),{updateIsDragging:u,isDragging:v}=en(N=>N),h=ou(N=>N.startAt),{attributes:C,listeners:g,setNodeRef:x,isDragging:y,transform:f}=us({id:e.id,data:{type:"booking-slots",booking:e,slotData:t}}),w=f?{transform:`translate3d(${f.x}px, ${f.y}px, 0)`}:void 0;kn({onDragStart:()=>u(!0),onDragAbort:()=>D(),onDragCancel:()=>D(),onDragEnd:()=>D()});const D=R.useCallback(()=>{u(!1)},[]),m=N=>N<="11:30",T=R.useMemo(()=>({cursor:v?"ns-resize":"pointer",width:d===re.DAY?"99%":"100%"}),[v,d]),b=(N,A)=>{const W=Q.dateAndHourDateToString(new Date(N.finishAt));return Q.isTodayDate(A)&&m(W)?{backgroundColor:"#000000c0"}:{backgroundColor:"#000456c0"}},[E,M]=R.useState(e);return R.useEffect(()=>{if(h.length){const N=Q.bookingTimeRange(e,h);M({...N})}},[h]),R.useImperativeHandle(s,()=>({changeCurrentCardResize:()=>l(N=>!N)})),y?p.jsx(Nb,{bookingInit:E,slotData:t,heightStyle:r}):p.jsx("div",{ref:x,className:se("cardContent_render",c&&"cardContent_render_dragging",o),style:{...w,...T},...g,...C,children:p.jsx("div",{className:"relative w-full h-full",style:b(e,new Date(i.split(":")[1])),onPointerUp:n,children:p.jsxs("div",{className:se("flex flex-col h-full text-white pl-2 lg:pl-2 justify-start items-start"),children:[p.jsx("p",{style:{height:"1.8rem",alignContent:"center"},children:`${Q.dateAndHourDateToString(e.startAt)} - ${Q.dateAndHourDateToString(e.finishAt)}`}),p.jsx("span",{className:"flex flex-row items-center justify-center"})]})},`${i}-${a}`)},e.id)};function Ib(e,t){const n=e>new Date(t.startAt),r=e<new Date(t.finishAt);return n&&r}const jb={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)Ib(e.startAt,o)&&r++;return r}},Us=({bookingInit:e,slotData:t,heightStyle:n,topHeightIncrement:r,onClick:o,customClasses:s,bookingViewType:i,resizableParam:a,events:c,open:l=!0,lastCard:d,half:u,cardContentRef:v,cardsQuantity:h,cardIndex:C,ref:g})=>{var $;const x=en(k=>k.updateIsDragging),{bookings:y,onCardResizeEnd:f}=Qe(),[w,D]=R.useState(""),m=R.useRef(null),T=i===re.DAY?{width:"99%"}:{width:"100%"},b=(k,I)=>{var O;D("show-handle"),x(!0),a!=null&&a.onResizeStart&&a.onResizeStart(k,I),(O=m.current)==null||O.changeCurrentCardResize()},E=(k,I)=>{var O;(O=m.current)==null||O.changeCurrentCardResize(),D(""),x(!1),f(e),a!=null&&a.onResizeStop&&a.onResizeStop(k,I)},M=R.useMemo(()=>jb.calculateOverlappingBookings(e,y),[e,y]),N=R.useMemo(()=>se(a==null?void 0:a.customClass,w,u&&M>0&&"",u?"":M>0&&"inner_cards_parent",d&&M&&u&&"inner_cards_parent_last_card_disable",d&&M&&"inner_cards_parent_last_card",d&&M===2&&"inner_cards_parent_last_card_layer_2",M===1&&!u&&"inner_cards_parent_1_layer",M===2&&"inner_cards_parent_2_layer",u&&M===3&&"inner_cards_parent_resizable_layer_3_half inner_cards_parent_3_layer_half",M===3&&"inner_cards_parent_resizable_layer_3 inner_cards_parent_3_layer"),[a,w,u,M,d]),A=k=>k===0?"8rem":"4rem",W=R.useMemo(()=>u&&C===0&&h===3||u&&C===1&&h===3?A(C):M===2?"0.8rem":d&&M===1?"0.2rem":d&&M?"1rem":M===1?"0.4rem":0,[u,d,M,C,h]),Y=R.useMemo(()=>u&&C===0&&h===3&&!M?"0rem":u&&C===0&&h===3?"0.4rem":u&&C===1&&h===3?"5rem":d&&h===3?"9rem":d?"6.5rem":0,[u,d,C,M,h]),L=R.useMemo(()=>u&&h===3&&(u&&C===0||u&&C===1)||u&&d&&h===3||u&&d?{inset:`${r}rem ${W} ${n}rem ${Y}`}:u&&h===3||u?{inset:`${r}rem 6.5rem ${n}rem ${W}`}:{inset:`${r||0}rem ${W} ${n}rem`},[u,M,n,r,C,h,W,Y]);if(R.useEffect(()=>()=>{c!=null&&c.onUnmount&&(c==null||c.onUnmount())},[]),R.useImperativeHandle(v,()=>({changeCurrentCardResize:()=>{var k;(k=m.current)==null||k.changeCurrentCardResize()}})),!l&&!e.finishAt)return null;if(($=a==null?void 0:a.state)!=null&&$.height){const{state:k,onResize:I}=a;return p.jsx(pu.Resizable,{className:se(N),height:k==null?void 0:k.height,width:k==null?void 0:k.width,onResize:I,onResizeStart:b,onResizeStop:E,resizeHandles:["s","n"],draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:p.jsx("div",{className:"card_content_core",style:{...L},children:p.jsx(Go,{ref:m,heightStyle:n,booking:e,slotData:t,onClick:o,layerCount:M,half:u},e.id)})})}return p.jsx("div",{ref:g,className:"card_content_core",style:{...T,...L},children:p.jsx(Go,{heightStyle:n,customClasses:s,booking:e,slotData:t,onClick:o})})},Lb=e=>{const t=R.use(nu);if(!t)throw new Error("useConfig must be used within a ConfigContext");return Rr(t,e)};function Ca(e,[t,n]){return Math.min(n,Math.max(t,e))}function $b(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 Fb=[" ","Enter","ArrowUp","ArrowDown"],zb=[" ","Enter"],Fn="Select",[Jr,Qr,Wb]=Rs(Fn),[tn,Rx]=mt(Fn,[Wb,vt]),eo=vt(),[Bb,yt]=tn(Fn),[Hb,Vb]=tn(Fn),hu=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:v,required:h,form:C}=e,g=eo(t),[x,y]=S.useState(null),[f,w]=S.useState(null),[D,m]=S.useState(!1),T=Ms(l),[b=!1,E]=Tt({prop:r,defaultProp:o,onChange:s}),[M,N]=Tt({prop:i,defaultProp:a,onChange:c}),A=S.useRef(null),W=x?C||!!x.closest("form"):!0,[Y,L]=S.useState(new Set),$=Array.from(Y).map(k=>k.props.value).join(";");return p.jsx($r,{...g,children:p.jsxs(Bb,{required:h,scope:t,trigger:x,onTriggerChange:y,valueNode:f,onValueNodeChange:w,valueNodeHasChildren:D,onValueNodeHasChildrenChange:m,contentId:ft(),value:M,onValueChange:N,open:b,onOpenChange:E,dir:T,triggerPointerDownPosRef:A,disabled:v,children:[p.jsx(Jr.Provider,{scope:t,children:p.jsx(Hb,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(k=>{L(I=>new Set(I).add(k))},[]),onNativeOptionRemove:S.useCallback(k=>{L(I=>{const O=new Set(I);return O.delete(k),O})},[]),children:n})}),W?p.jsxs(Lu,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:u,value:M,onChange:k=>N(k.target.value),disabled:v,form:C,children:[M===void 0?p.jsx("option",{value:""}):null,Array.from(Y)]},$):null]})})};hu.displayName=Fn;var gu="SelectTrigger",mu=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=eo(n),i=yt(gu,n),a=i.disabled||r,c=ue(t,i.onTriggerChange),l=Qr(n),d=S.useRef("touch"),[u,v,h]=$u(g=>{const x=l().filter(w=>!w.disabled),y=x.find(w=>w.value===i.value),f=Fu(x,g,y);f!==void 0&&i.onValueChange(f.value)}),C=g=>{a||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(Nn,{asChild:!0,...s,children:p.jsx(ie.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":ju(i.value)?"":void 0,...o,ref:c,onClick:ee(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&C(g)}),onPointerDown:ee(o.onPointerDown,g=>{d.current=g.pointerType;const x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(C(g),g.preventDefault())}),onKeyDown:ee(o.onKeyDown,g=>{const x=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&v(g.key),!(x&&g.key===" ")&&Fb.includes(g.key)&&(C(),g.preventDefault())})})})});mu.displayName=gu;var vu="SelectValue",yu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=yt(vu,n),{onValueNodeHasChildrenChange:l}=c,d=s!==void 0,u=ue(t,c.onValueNodeChange);return Se(()=>{l(d)},[l,d]),p.jsx(ie.span,{...a,ref:u,style:{pointerEvents:"none"},children:ju(c.value)?p.jsx(p.Fragment,{children:i}):s})});yu.displayName=vu;var Ub="SelectIcon",bu=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(ie.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});bu.displayName=Ub;var Yb="SelectPortal",wu=e=>p.jsx(In,{asChild:!0,...e});wu.displayName=Yb;var Rt="SelectContent",xu=S.forwardRef((e,t)=>{const n=yt(Rt,e.__scopeSelect),[r,o]=S.useState();if(Se(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Tr.createPortal(p.jsx(Su,{scope:e.__scopeSelect,children:p.jsx(Jr.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Cu,{...e,ref:t})});xu.displayName=Rt;var Le=10,[Su,bt]=tn(Rt),Kb="SelectContentImpl",Gb=Ct("SelectContent.RemoveScroll"),Cu=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:v,collisionPadding:h,sticky:C,hideWhenDetached:g,avoidCollisions:x,...y}=e,f=yt(Rt,n),[w,D]=S.useState(null),[m,T]=S.useState(null),b=ue(t,z=>D(z)),[E,M]=S.useState(null),[N,A]=S.useState(null),W=Qr(n),[Y,L]=S.useState(!1),$=S.useRef(!1);S.useEffect(()=>{if(w)return Os(w)},[w]),ks();const k=S.useCallback(z=>{const[G,...q]=W().map(_=>_.ref.current),[B]=q.slice(-1),te=document.activeElement;for(const _ of z)if(_===te||(_==null||_.scrollIntoView({block:"nearest"}),_===G&&m&&(m.scrollTop=0),_===B&&m&&(m.scrollTop=m.scrollHeight),_==null||_.focus(),document.activeElement!==te))return},[W,m]),I=S.useCallback(()=>k([E,w]),[k,E,w]);S.useEffect(()=>{Y&&I()},[Y,I]);const{onOpenChange:O,triggerPointerDownPosRef:j}=f;S.useEffect(()=>{if(w){let z={x:0,y:0};const G=B=>{var te,_;z={x:Math.abs(Math.round(B.pageX)-(((te=j.current)==null?void 0:te.x)??0)),y:Math.abs(Math.round(B.pageY)-(((_=j.current)==null?void 0:_.y)??0))}},q=B=>{z.x<=10&&z.y<=10?B.preventDefault():w.contains(B.target)||O(!1),document.removeEventListener("pointermove",G),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",q,{capture:!0})}}},[w,O,j]),S.useEffect(()=>{const z=()=>O(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[O]);const[P,F]=$u(z=>{const G=W().filter(te=>!te.disabled),q=G.find(te=>te.ref.current===document.activeElement),B=Fu(G,z,q);B&&setTimeout(()=>B.ref.current.focus())}),U=S.useCallback((z,G,q)=>{const B=!$.current&&!q;(f.value!==void 0&&f.value===G||B)&&(M(z),B&&($.current=!0))},[f.value]),V=S.useCallback(()=>w==null?void 0:w.focus(),[w]),H=S.useCallback((z,G,q)=>{const B=!$.current&&!q;(f.value!==void 0&&f.value===G||B)&&A(z)},[f.value]),X=r==="popper"?qo:Eu,K=X===qo?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:v,collisionPadding:h,sticky:C,hideWhenDetached:g,avoidCollisions:x}:{};return p.jsx(Su,{scope:n,content:w,viewport:m,onViewportChange:T,itemRefCallback:U,selectedItem:E,onItemLeave:V,itemTextRefCallback:H,focusSelectedItem:I,selectedItemText:N,position:r,isPositioned:Y,searchRef:P,children:p.jsx(Kr,{as:Gb,allowPinchZoom:!0,children:p.jsx(Vr,{asChild:!0,trapped:f.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:ee(o,z=>{var G;(G=f.trigger)==null||G.focus({preventScroll:!0}),z.preventDefault()}),children:p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:p.jsx(X,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:z=>z.preventDefault(),...y,...K,onPlaced:()=>L(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ee(y.onKeyDown,z=>{const G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&F(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let B=W().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(z.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const te=z.target,_=B.indexOf(te);B=B.slice(_+1)}setTimeout(()=>k(B)),z.preventDefault()}})})})})})})});Cu.displayName=Kb;var qb="SelectItemAlignedPosition",Eu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=yt(Rt,n),i=bt(Rt,n),[a,c]=S.useState(null),[l,d]=S.useState(null),u=ue(t,b=>d(b)),v=Qr(n),h=S.useRef(!1),C=S.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:y,focusSelectedItem:f}=i,w=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&g&&x&&y){const b=s.trigger.getBoundingClientRect(),E=l.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),N=y.getBoundingClientRect();if(s.dir!=="rtl"){const te=N.left-E.left,_=M.left-te,ne=b.left-_,ae=b.width+ne,fe=Math.max(ae,E.width),ve=window.innerWidth-Le,Ne=Ca(_,[Le,Math.max(Le,ve-fe)]);a.style.minWidth=ae+"px",a.style.left=Ne+"px"}else{const te=E.right-N.right,_=window.innerWidth-M.right-te,ne=window.innerWidth-b.right-_,ae=b.width+ne,fe=Math.max(ae,E.width),ve=window.innerWidth-Le,Ne=Ca(_,[Le,Math.max(Le,ve-fe)]);a.style.minWidth=ae+"px",a.style.right=Ne+"px"}const A=v(),W=window.innerHeight-Le*2,Y=g.scrollHeight,L=window.getComputedStyle(l),$=parseInt(L.borderTopWidth,10),k=parseInt(L.paddingTop,10),I=parseInt(L.borderBottomWidth,10),O=parseInt(L.paddingBottom,10),j=$+k+Y+O+I,P=Math.min(x.offsetHeight*5,j),F=window.getComputedStyle(g),U=parseInt(F.paddingTop,10),V=parseInt(F.paddingBottom,10),H=b.top+b.height/2-Le,X=W-H,K=x.offsetHeight/2,z=x.offsetTop+K,G=$+k+z,q=j-G;if(G<=H){const te=A.length>0&&x===A[A.length-1].ref.current;a.style.bottom="0px";const _=l.clientHeight-g.offsetTop-g.offsetHeight,ne=Math.max(X,K+(te?V:0)+_+I),ae=G+ne;a.style.height=ae+"px"}else{const te=A.length>0&&x===A[0].ref.current;a.style.top="0px";const ne=Math.max(H,$+g.offsetTop+(te?U:0)+K)+q;a.style.height=ne+"px",g.scrollTop=G-H+g.offsetTop}a.style.margin=`${Le}px 0`,a.style.minHeight=P+"px",a.style.maxHeight=W+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[v,s.trigger,s.valueNode,a,l,g,x,y,s.dir,r]);Se(()=>w(),[w]);const[D,m]=S.useState();Se(()=>{l&&m(window.getComputedStyle(l).zIndex)},[l]);const T=S.useCallback(b=>{b&&C.current===!0&&(w(),f==null||f(),C.current=!1)},[w,f]);return p.jsx(Zb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:T,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:p.jsx(ie.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Eu.displayName=qb;var Xb="SelectPopperPosition",qo=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Le,...s}=e,i=eo(n);return p.jsx(Fr,{...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)"}})});qo.displayName=Xb;var[Zb,Ys]=tn(Rt,{}),Xo="SelectViewport",Du=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=bt(Xo,n),i=Ys(Xo,n),a=ue(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(Jr.Slot,{scope:n,children:p.jsx(ie.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:v}=i;if(v!=null&&v.current&&u){const h=Math.abs(c.current-d.scrollTop);if(h>0){const C=window.innerHeight-Le*2,g=parseFloat(u.style.minHeight),x=parseFloat(u.style.height),y=Math.max(g,x);if(y<C){const f=y+h,w=Math.min(C,f),D=f-w;u.style.height=w+"px",u.style.bottom==="0px"&&(d.scrollTop=D>0?D:0,u.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});Du.displayName=Xo;var Tu="SelectGroup",[Jb,Qb]=tn(Tu),ew=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ft();return p.jsx(Jb,{scope:n,id:o,children:p.jsx(ie.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ew.displayName=Tu;var Ru="SelectLabel",tw=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Qb(Ru,n);return p.jsx(ie.div,{id:o.id,...r,ref:t})});tw.displayName=Ru;var Dr="SelectItem",[nw,Mu]=tn(Dr),ku=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=yt(Dr,n),c=bt(Dr,n),l=a.value===r,[d,u]=S.useState(s??""),[v,h]=S.useState(!1),C=ue(t,f=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,f,r,o)}),g=ft(),x=S.useRef("touch"),y=()=>{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(nw,{scope:n,value:r,disabled:o,textId:g,isSelected:l,onItemTextChange:S.useCallback(f=>{u(w=>w||((f==null?void 0:f.textContent)??"").trim())},[]),children:p.jsx(Jr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:p.jsx(ie.div,{role:"option","aria-labelledby":g,"data-highlighted":v?"":void 0,"aria-selected":l&&v,"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,()=>h(!0)),onBlur:ee(i.onBlur,()=>h(!1)),onClick:ee(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:ee(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:ee(i.onPointerDown,f=>{x.current=f.pointerType}),onPointerMove:ee(i.onPointerMove,f=>{var w;x.current=f.pointerType,o?(w=c.onItemLeave)==null||w.call(c):x.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,f=>{var w;f.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:ee(i.onKeyDown,f=>{var D;((D=c.searchRef)==null?void 0:D.current)!==""&&f.key===" "||(zb.includes(f.key)&&y(),f.key===" "&&f.preventDefault())})})})})});ku.displayName=Dr;var gn="SelectItemText",Ou=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=yt(gn,n),a=bt(gn,n),c=Mu(gn,n),l=Vb(gn,n),[d,u]=S.useState(null),v=ue(t,y=>u(y),c.onItemTextChange,y=>{var f;return(f=a.itemTextRefCallback)==null?void 0:f.call(a,y,c.value,c.disabled)}),h=d==null?void 0:d.textContent,C=S.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=l;return Se(()=>(g(C),()=>x(C)),[g,x,C]),p.jsxs(p.Fragment,{children:[p.jsx(ie.span,{id:c.textId,...s,ref:v}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Tr.createPortal(s.children,i.valueNode):null]})});Ou.displayName=gn;var Pu="SelectItemIndicator",_u=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Mu(Pu,n).isSelected?p.jsx(ie.span,{"aria-hidden":!0,...r,ref:t}):null});_u.displayName=Pu;var Zo="SelectScrollUpButton",Au=S.forwardRef((e,t)=>{const n=bt(Zo,e.__scopeSelect),r=Ys(Zo,e.__scopeSelect),[o,s]=S.useState(!1),i=ue(t,r.onScrollButtonChange);return Se(()=>{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(Iu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Au.displayName=Zo;var Jo="SelectScrollDownButton",Nu=S.forwardRef((e,t)=>{const n=bt(Jo,e.__scopeSelect),r=Ys(Jo,e.__scopeSelect),[o,s]=S.useState(!1),i=ue(t,r.onScrollButtonChange);return Se(()=>{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(Iu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Nu.displayName=Jo;var Iu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=bt("SelectScrollButton",n),i=S.useRef(null),a=Qr(n),c=S.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),Se(()=>{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(ie.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()})})}),rw="SelectSeparator",ow=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(ie.div,{"aria-hidden":!0,...r,ref:t})});ow.displayName=rw;var Qo="SelectArrow",sw=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=eo(n),s=yt(Qo,n),i=bt(Qo,n);return s.open&&i.position==="popper"?p.jsx(zr,{...o,...r,ref:t}):null});sw.displayName=Qo;function ju(e){return e===""||e===void 0}var Lu=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=S.useRef(null),s=ue(t,o),i=$b(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(Ss,{asChild:!0,children:p.jsx("select",{...r,ref:s,defaultValue:n})})});Lu.displayName="BubbleSelect";function $u(e){const t=Ae(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 Fu(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=iw(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 iw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var aw=hu,cw=mu,lw=yu,uw=bu,dw=wu,fw=xu,pw=Du,hw=ku,gw=Ou,mw=_u,vw=Au,yw=Nu;function bw({...e}){return p.jsx(aw,{"data-slot":"select",...e})}function ww({...e}){return p.jsx(lw,{"data-slot":"select-value",...e})}function xw({className:e,size:t="default",children:n,...r}){return p.jsxs(cw,{"data-slot":"select-trigger","data-size":t,className:se("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(uw,{asChild:!0,children:p.jsx(lc,{className:"size-4 opacity-50"})})]})}function Sw({className:e,children:t,position:n="popper",...r}){return p.jsx(dw,{children:p.jsxs(fw,{"data-slot":"select-content",className:se("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(Ew,{}),p.jsx(pw,{className:se("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(Dw,{})]})})}function Cw({className:e,children:t,...n}){return p.jsxs(hw,{"data-slot":"select-item",className:se("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(mw,{children:p.jsx(cc,{className:"size-4"})})}),p.jsx(gw,{children:t})]})}function Ew({className:e,...t}){return p.jsx(vw,{"data-slot":"select-scroll-up-button",className:se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(xp,{className:"size-4"})})}function Dw({className:e,...t}){return p.jsx(yw,{"data-slot":"select-scroll-down-button",className:se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(lc,{className:"size-4"})})}const Tw=15,nr=600,Rw=15,Mo=-Math.abs(1.98),Ks=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=R.useState({height:nr,width:nr}),[a,c]=R.useState(0),l=(T,b)=>{const E=Q.timeDiffInSeconds(T,b),M=Math.ceil(E/Tw);return-Math.abs((M-1)*2)},[d,u]=R.useState(o?l(e.finishAt,e.startAt):Mo),v=T=>T===-Math.abs(0)||T===0,h=()=>Q.timeDiffInSeconds(e.finishAt,e.startAt)===Rw,C=async T=>{if(T.includes("n")){const b=y(e.startAt,"add");if(h())return;c(E=>E+2),n&&n(b)}else{const b=x(e.finishAt,"add");u(E=>v(E)?Mo:E-2),t&&t(b)}},g=async T=>{if(T.includes("n")){const E=y(e.startAt,"remove");c(M=>M-2),n&&n(E);return}const b=x(e.finishAt,"remove");h()||(u(E=>E+2),r&&r(b))},x=(T,b)=>{const E=new Date(T),M=E.getMinutes();return b==="add"&&E.setMinutes(M+15),b==="remove"&&E.setMinutes(M-15),E},y=(T,b)=>{const E=new Date(T),M=E.getMinutes();return b==="add"&&E.setMinutes(M+15),b==="remove"&&E.setMinutes(M-15),E};return{state:s,setState:i,resetState:()=>{i({height:nr,width:nr})},resetHeightStyle:()=>{u(Mo)},heightStyle:d,topHeightIncrement:a,onResize:(T,{size:b,handle:E})=>{switch(T.stopPropagation(),T.preventDefault(),E){case"se":case"s":{i(M=>(Number(M.height)<Number(b.height)&&C(["s","se"]),Number(M.height)>Number(b.height)&&g(["s","se"]),{...M,height:b.height}));break}case"n":{i(M=>Math.abs(Number(b.height-Number(M.height)))<10?{...M,height:b.height}:(+(M.height<Number(b.height))&&g(["n"]),+(M.height>Number(b.height))&&C(["n"]),{...M,height:b.height}));break}}},updateHeightStyle:(T,b)=>{u(l(T,b))}}},Mw=R.forwardRef(({isDragging:e,slotData:t,events:{onClick:n,renderPreviewCard:r,resetPrevView:o}},s)=>{const[i,a]=R.useState(!1),c=ts(k=>k.startAt),l=xe(k=>k.bookingViewType),{systemColor:d,isTimeInfoVisible:u}=Lb(k=>k),[v,h]=R.useState(!1),[C,g]=R.useState(Q.addMinutesToHour(t.time,15)),[x,y]=R.useState(!1),f=R.useRef(null),w=x?{backgroundColor:"white",border:"none"}:{},D=R.useMemo(()=>({id:"dragging_booking_preview",startAt:Q.convertStringTimeToDateFormat(c),finishAt:Q.convertStringTimeToDateFormat(C)}),[C,c]),m=()=>{h(!0),y(!0),r()},T=()=>{h(!1),n(C),$()};R.useEffect(()=>{var k;v&&((k=f.current)==null||k.changeCurrentCardResize())},[v]);const{state:b,resetState:E,resetHeightStyle:M,heightStyle:N,onResize:A,updateHeightStyle:W}=Ks({booking:D,onAddTime:k=>{g(Q.dateTimeAsString(k))},onSubTime:k=>{g(Q.dateTimeAsString(k))}}),Y=()=>{$()},L=R.useCallback(()=>{g(Q.addMinutesToHour(t.time,15))},[t.time]),$=R.useCallback(()=>{y(!1),E(),L(),M(),o()},[L,M,o,E]);if(R.useEffect(()=>{if(!C||!c)return;const k=Q.convertStringTimeToDateFormat(C),I=Q.convertStringTimeToDateFormat(c);Number.isNaN(k)||Number.isNaN(I)||!(k instanceof Date)||!(I instanceof Date)||W(k,I)},[C,c]),R.useEffect(()=>()=>{$()},[]),R.useImperativeHandle(s,()=>({show:()=>a(!0),hide:()=>a(!1),changeIsOpen:k=>a(k)}),[]),!!i)return p.jsx("div",{style:{...w,border:u&&!e?`1.5px solid ${d}`:"none"},className:se("timeInfo_core",w),children:p.jsx(pu.Resizable,{className:"slot-resizable",height:b.height,width:b.width,onResizeStart:m,onResizeStop:T,onResize:A,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:x?p.jsx("div",{className:"timeInfo_core_dragging",children:p.jsx(Us,{bookingInit:D,bookingViewType:l,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyle:N,cardContentRef:f,resizableParam:{state:b,onResize:A,customClass:"show-handle"},events:{onUnmount:Y}})}):p.jsx("div",{className:"timeInfo_core_timeParent",children:!e&&p.jsx("span",{className:"timeInfo_core_timeParent_time",style:{color:d,display:u?"initial":"none"},children:t.time})})})})}),rr=({slotData:e,slotPosition:t,disabledCss:n,events:r,actualTimerIndicatorChildren:o,children:s,ref:i})=>{const{isDragging:a,updateIsDragging:c}=en(_=>_),{emptySlotNodes:l,setSelectedNode:d,resetSelectedNode:u}=Mt(),{onModalClose:v,onSlotClick:h}=Qe(),{startAt:C,finishAt:g,updateDate:x,updateStartAt:y,updateFinishAtWithOffset:f,resetForm:w}=ts(_=>_),D=xe(_=>_.bookingViewType),[m,T]=R.useState(!1),[b,E]=R.useState(!1),M=R.useRef(null),N=R.useRef(null),A=R.useRef(null),W=()=>A.current,Y=()=>{var _;(_=A.current)==null||_.isModalOpen()},L=()=>{var _;(_=W())==null||_.showCreationModal()},$=()=>{var _;(_=N.current)==null||_.show()},k=()=>{var _;(_=N.current)==null||_.hide()},I=_=>{var ne;(ne=N.current)==null||ne.changeIsOpen(_)},O=R.useMemo(()=>({id:"dragging_booking_preview",startAt:Q.convertStringTimeToDateFormat(C),finishAt:Q.convertStringTimeToDateFormat(g)}),[g,C]),{updateHeightStyle:j,heightStyle:P}=Ks({booking:O}),F=R.useCallback(()=>{var ne,ae,fe;if(!s||typeof s!="object")return;if("props"in s&&s.props&&typeof s.props=="object"&&"bookings"in s.props&&Array.isArray(s.props.bookings)&&(ne=s.props)!=null&&ne.bookings.length&&"slotData"in s.props&&typeof((ae=s==null?void 0:s.props)==null?void 0:ae.slotData)=="object"&&(fe=s==null?void 0:s.props)!=null&&fe.slotData&&"hour"in s.props.slotData&&typeof s.props.slotData.hour=="string"&&"blockTimeString"in s.props&&typeof s.props.blockTimeString=="string"){const ve=s.props.blockTimeString,Ne=s.props.slotData.hour;if(s.props.bookings.findIndex(je=>{const _t=Number(Ne.split(":")[0]),At=Number(ve),Wn=je.startAt.getHours(),Bn=je.startAt.getMinutes();return _t===Wn&&At===Bn})!==-1)return}if(a||Y()||m)return;r.onMouseEnterEvent()===t&&$()},[t,a,m,s,r]),U=()=>{w(),c(!1),u()},V=_=>{var fe;U();const ne=dr(e),ae=l==null?void 0:l.get(ne);ae&&ae.closeEvent(),v==null||v(),_==null||_.stopPropagation(),_==null||_.preventDefault(),(fe=W())==null||fe.closeModal()},H=_=>{_||V(),T(_),I(_)},X=R.useCallback(_=>{if(U(),a&&!_)return;c(!1);const{time:ne,key:ae}=e,fe=dr({key:ae,time:ne}),ve=l==null?void 0:l.get(fe);d(fe),ve&&ve.showEvent(ne),x(ae);const Ie=f(_||ne,_?0:15);h({slotData:e,finishTime:Ie}),L()},[e,l,a,d,h,x,y,c,f]),K=()=>{a||Y()||k()},z=n.length||b?n:"hovering_slotTrigger_core",G=R.useCallback(()=>{const{time:_,key:ne}=e;c(!0),E(!0),x(ne),y(_),f(_)},[f,e,x,c,y]),q=()=>{L()},B=R.useCallback(()=>{E(!1)},[]),te=()=>{k(),L(),T(!0)};return R.useEffect(()=>{a?document.body.style.cursor="ns-resize":document.body.style.cursor="default"},[a]),R.useEffect(()=>{if(!g||!C)return;const _=Q.convertStringTimeToDateFormat(g),ne=Q.convertStringTimeToDateFormat(C);Number.isNaN(_)||Number.isNaN(ne)||!(_ instanceof Date)||!(ne instanceof Date)||j(_,ne)},[g,C]),R.useEffect(()=>{if(!m){k();return}M!=null&&M.current&&M.current.scrollIntoView({behavior:"smooth",block:"center"})},[m]),R.useEffect(()=>{s||k(),b&&$()},[s,b]),R.useEffect(()=>{b&&$()},[b]),R.useImperativeHandle(i,()=>({showEvent:_=>{y(_),te()},closeEvent:()=>{var _;(_=W())==null||_.closeModal(),T(!1),k(),B()},onOpenCloseChange:_=>{I(_),T(_),B()}})),p.jsxs(p.Fragment,{children:[p.jsxs("div",{ref:e.ref,style:{borderBottom:t==="fourth"?"1px solid #8080807a":"",...e.style},className:se("slotTrigger_core",D===re.DAY&&"slotTrigger_core_day",z),onMouseOver:F,onMouseLeave:K,onFocus:()=>{},children:[p.jsx(Mw,{ref:N,isDragging:a,slotData:e,events:{onClick:X,openOptions:q,renderPreviewCard:G,resetPrevView:B}}),o,m&&p.jsx(Us,{ref:M,bookingInit:O,bookingViewType:D,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyle:P}),s]},e.key),p.jsx(tu,{ref:A,onClose:V,onOpenChange:H,buttonTrigger:p.jsx("div",{},e.key),side:D===re.DAY?"top":"right"})]})};var Gs="Popover",[zu,Mx]=mt(Gs,[vt]),zn=vt(),[kw,wt]=zu(Gs),Wu=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=zn(t),c=S.useRef(null),[l,d]=S.useState(!1),[u=!1,v]=Tt({prop:r,defaultProp:o,onChange:s});return p.jsx($r,{...a,children:p.jsx(kw,{scope:t,contentId:ft(),triggerRef:c,open:u,onOpenChange:v,onOpenToggle:S.useCallback(()=>v(h=>!h),[v]),hasCustomAnchor:l,onCustomAnchorAdd:S.useCallback(()=>d(!0),[]),onCustomAnchorRemove:S.useCallback(()=>d(!1),[]),modal:i,children:n})})};Wu.displayName=Gs;var Bu="PopoverAnchor",Hu=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Bu,n),s=zn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return S.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(Nn,{...s,...r,ref:t})});Hu.displayName=Bu;var Vu="PopoverTrigger",Uu=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Vu,n),s=zn(n),i=ue(t,o.triggerRef),a=p.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xu(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(Nn,{asChild:!0,...s,children:a})});Uu.displayName=Vu;var qs="PopoverPortal",[Ow,Pw]=zu(qs,{forceMount:void 0}),Yu=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=wt(qs,t);return p.jsx(Ow,{scope:t,forceMount:n,children:p.jsx(nt,{present:n||s.open,children:p.jsx(In,{asChild:!0,container:o,children:r})})})};Yu.displayName=qs;var Kt="PopoverContent",Ku=S.forwardRef((e,t)=>{const n=Pw(Kt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=wt(Kt,e.__scopePopover);return p.jsx(nt,{present:r||s.open,children:s.modal?p.jsx(Aw,{...o,ref:t}):p.jsx(Nw,{...o,ref:t})})});Ku.displayName=Kt;var _w=Ct("PopoverContent.RemoveScroll"),Aw=S.forwardRef((e,t)=>{const n=wt(Kt,e.__scopePopover),r=S.useRef(null),o=ue(t,r),s=S.useRef(!1);return S.useEffect(()=>{const i=r.current;if(i)return Os(i)},[]),p.jsx(Kr,{as:_w,allowPinchZoom:!0,children:p.jsx(Gu,{...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})})})}),Nw=S.forwardRef((e,t)=>{const n=wt(Kt,e.__scopePopover),r=S.useRef(!1),o=S.useRef(!1);return p.jsx(Gu,{...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()}})}),Gu=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,v=wt(Kt,n),h=zn(n);return ks(),p.jsx(Vr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>v.onOpenChange(!1),children:p.jsx(Fr,{"data-state":Xu(v.open),role:"dialog",id:v.contentId,...h,...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)"}})})})}),qu="PopoverClose",Iw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(qu,n);return p.jsx(ie.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});Iw.displayName=qu;var jw="PopoverArrow",Lw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zn(n);return p.jsx(zr,{...o,...r,ref:t})});Lw.displayName=jw;function Xu(e){return e?"open":"closed"}var $w=Wu,Fw=Hu,zw=Uu,Ww=Yu,Bw=Ku;function Hw({...e}){return p.jsx($w,{"data-slot":"popover",...e})}function Vw({...e}){return p.jsx(zw,{"data-slot":"popover-trigger",...e})}function Uw({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(Ww,{children:p.jsx(Bw,{"data-slot":"popover-content",align:t,sideOffset:n,className:se("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 Yw({...e}){return p.jsx(Fw,{"data-slot":"popover-anchor",...e})}var Kw="Toggle",Zu=S.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...s}=e,[i=!1,a]=Tt({prop:n,onChange:o,defaultProp:r});return p.jsx(ie.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)})})});Zu.displayName=Kw;var Gw=Zu;const qw=fs("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 p.jsx(Gw,{"data-slot":"toggle",className:se(qw({variant:t,size:n,className:e})),...r})}const Zw=()=>{const[e,t]=R.useState(!1);return p.jsx(Ds,{children:p.jsxs(tl,{children:[p.jsx(nl,{asChild:!0,children:p.jsx("div",{children:p.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:p.jsx(lp,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),p.jsx(rl,{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"})})]})})},Jw=({options:e,onChange:t})=>p.jsxs(bw,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[p.jsx(xw,{className:"w-[180px]",children:p.jsx(ww,{placeholder:"view"})}),p.jsx(Sw,{children:e.map(n=>p.jsx(Cw,{value:n.text,children:n.text},n.text))})]}),Qw=[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],ex=5,tx=0,nx=({side:e,xAxis:t,yAxis:n,updatePosition:r,children:o})=>{const{attributes:s,listeners:i,setNodeRef:a,transform:c,setActivatorNodeRef:l}=us({id:"booking-info-id",data:{type:"booking-info-options"}}),d=en(v=>v.updateIsDragging),u={transform:`translate3d(${t+((c==null?void 0:c.x)||0)}px, ${n+((c==null?void 0:c.y)||0)}px, 0)`};return kn({onDragStart(){d(!0)},onDragEnd(v){v.active.id&&r(c)}}),p.jsx(Uw,{ref:a,updatePositionStrategy:"optimized",side:e,align:"start",sticky:"always",sideOffset:ex,alignOffset:tx,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(Zw,{}),p.jsx(Et,{type:"button",variant:"outline",size:"icon",children:p.jsx(Pp,{className:"h-3 w-3"})}),p.jsx(Et,{type:"button",variant:"outline",size:"icon",onClick:()=>{},children:p.jsx(Ip,{className:"h-3 w-3"})}),p.jsx(Jw,{options:Qw,onChange:()=>{}})]}),o]})})},Ea={xAxis:0,yAxis:0},Ju=({isEditingOpen:e,side:t,booking:n,onOpenChange:r,children:o})=>{const[s,i]=R.useState({...Ea}),a=en(h=>h.updateIsDragging),c=R.useMemo(()=>`${Q.dateAndHourDateToString(n.startAt)} - ${Q.dateAndHourDateToString(n.finishAt)}`,[n.startAt,n.finishAt]),l=R.useMemo(()=>{const h=new Date(n.startAt),C=h.getDate(),g=h.getDay(),x=Wt[h.getMonth()];return p.jsx("span",{children:`${Ed[g]}, ${C} ${x}`})},[n.startAt]),d=()=>({backgroundColor:""}),u=h=>{h||console.info("No transform info to show "),i({xAxis:s.xAxis+((h==null?void 0:h.x)||0),yAxis:s.yAxis+((h==null?void 0:h.y)||0)})};kn({onDragStart(h){const C=h.active.data.current,g=h.active.id,x=C.type==="booking-info-options";g&&x&&a(!0)}});const v=h=>{h===!1&&i({...Ea}),r(h)};return p.jsxs(Hw,{open:e,onOpenChange:v,defaultOpen:!1,children:[p.jsx(Yw,{style:{width:"100%"},children:p.jsx(Vw,{asChild:!0,children:o})}),p.jsx(ls,{children:p.jsx(nx,{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]})})]})})})]})};Ju.displayName="BookingInfoOptions";const Da=({booking:e,slotData:t,cardsQuantity:n=1,cardIndex:r=0,lastCard:o=!1,half:s=!1,ref:i})=>{const{bookingViewType:a}=xe(),[c,l]=R.useState({...e}),[d,u]=R.useState(!1),v=R.useRef("left"),h=()=>{const m=t.day.split(":")[0].trim();if(a===re.DAY)v.current="top";else switch(m){case"Mon":case"Sun":v.current="right";break;default:v.current="left";break}u(!0)},C=async m=>{try{l(T=>({...T,finishAt:m}))}catch(T){console.log(T)}},g=async m=>{l(T=>({...T,startAt:m}))},x=async m=>{try{l(T=>({...T,finishAt:m}))}catch(T){console.log(T)}},{state:y,heightStyle:f,topHeightIncrement:w,onResize:D}=Ks({booking:c,onAddTime:C,onAddStartTime:g,onSubTime:x,starter:!0});return R.useImperativeHandle(i,()=>({bookingId:e.id}),[e.id]),p.jsx(Ju,{booking:c,onOpenChange:u,side:a===re.DAY?"top":"left",isEditingOpen:d,children:p.jsx(Us,{resizableParam:{state:y,onResize:D,resizeHandle:["s","n"]},customClasses:"Draggable",bookingInit:c,bookingViewType:a,slotData:t,topHeightIncrement:w,heightStyle:f,onClick:h,half:s,lastCard:o,cardsQuantity:n,cardIndex:r})})},or=({bookings:e,blockTimeString:t,slotData:n})=>{if(!e||!(n!=null&&n.day)&&!(n!=null&&n.hour))return null;const r=e.filter(o=>Q.dateAndHourDateToString(new Date(o.startAt)).split(":")[1]===t);if(!(!r||!(r!=null&&r.length)))return r.length===1?p.jsx(Da,{booking:r[0],slotData:n}):p.jsx(p.Fragment,{children:r.map((o,s)=>p.jsx(Da,{booking:o,half:!0,slotData:n,lastCard:r.length-1===s,cardsQuantity:r.length,cardIndex:s},o.id))})};var rx="Separator",Ta="horizontal",ox=["horizontal","vertical"],Qu=S.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ta,...o}=e,s=sx(r)?r:Ta,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(ie.div,{"data-orientation":s,...a,...o,ref:t})});Qu.displayName=rx;function sx(e){return ox.includes(e)}var ix=Qu;function ax({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(ix,{"data-slot":"separator-root",decorative:n,orientation:t,className:se("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 cx=fs("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 lx({className:e,variant:t,...n}){return p.jsx("div",{className:se(cx({variant:t}),e),...n})}const ux=({dateToRender:e,isFirstDay:t})=>p.jsx("div",{style:{left:t?"3px":"10px"},className:"first_day_slot",children:p.jsx("span",{children:p.jsx(lx,{children:e})})});class dx{constructor(){xt(this,"positionBasedOnSeconds",t=>{const[,n]=t.split(":");if(!t.length)return-3;const r=Number(n);return this.normalizingMinutes(r)});xt(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);xt(this,"isInitialMinute",t=>t>=0&&t<=8);xt(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class fx{constructor(){xt(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=Q.roundMinutes(n.getMinutes());i.setHours(n.getHours(),a,0,0);const c=Q.minuteDifference(s,i);return c>30||c<-30});xt(this,"normalizeDateNow",t=>{const n=t.getHours(),r=Q.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const sr=({color:e="#000",isFirstDay:t,slotData:n})=>{const{timesRendered:r,bookingViewType:o}=xe(),[s,i]=R.useState(""),[a,c]=R.useState(!1),[l,d]=R.useState(!1),u=R.useMemo(()=>{const f=new Date,w=new Date(n.key);return w.getDay()===f.getDay()&&w.getDate()===f.getDate()},[n.key]),v=f=>{i(f)},h=()=>{c(!0)},C=()=>{c(!1)},g=R.useMemo(()=>new dx().positionBasedOnSeconds(s),[n.time,s,r]),x=R.useMemo(()=>t?"101%":o===re.DAY?"102%":"104%",[t,o]),y=R.useMemo(()=>u?{top:`${g-2}px`,left:t?"-1px":"-3px",width:t?"101%":"104%"}:{top:`${g-1}px`,left:t?"-1px":"0px",width:x},[u,t,x,g]);if(R.useEffect(()=>{const f=n.time,w=new fx,D=()=>{const T=new Date,b=w.normalizeDateNow(T),E=Q.dateAndHourDateToString(T);s!==E&&v(E),d(b===f)};let m;return w.is15MinLess(f)||(m=setInterval(()=>D(),1e3)),()=>clearInterval(m)},[n.time,s]),!!l)return p.jsxs("div",{style:{...y},className:se("timeIndicator_today",u&&x,u&&"timeIndicator_today_circle"),onMouseEnter:h,onMouseOut:C,onBlur:()=>{},children:[p.jsx(ax,{className:"focus-effect",style:{height:u?"4px":"2px",backgroundColor:e}}),a&&p.jsx(ux,{isFirstDay:t,dateToRender:s})]})},Ra=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=Mt(),d=R.useCallback((u,v)=>{if(!u)return;const h=dr(v);l.get(h)||c(u,v)},[c,l]);return p.jsxs(p.Fragment,{children:[p.jsx(rr,{ref:u=>d(u,{key:t.key,time:t.time}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:t}),children:p.jsx(or,{bookings:e,blockTimeString:"00",slotData:a})}),p.jsx(rr,{ref:u=>d(u,{key:n.key,time:n.time}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},slotPosition:"second",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:n}),children:p.jsx(or,{bookings:e,blockTimeString:"15",slotData:a})}),p.jsx(rr,{ref:u=>d(u,{key:r.key,time:r.time}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:r}),children:p.jsx(or,{bookings:e,blockTimeString:"30",slotData:a})}),p.jsx(rr,{ref:u=>d(u,{key:o.key,time:o.time}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:o}),children:p.jsx(or,{bookings:e,blockTimeString:"45",slotData:a})})]})},px=R.memo(({firstDay:e,booking:t,dayHour:n,disabledCss:r,firstBlockTimeData:o,secondBlockTimeData:s,thirdBlockTimeData:i,fourthBlockTimeData:a})=>{const{day:c,hour:l}=n,d=R.useMemo(()=>t.filter(u=>{const v=Q.dateAndHourDateToString(u.startAt),h=new Date(u.startAt).getDate(),C=new Date(c).getDate(),g=l.split(":")[0];return v.split(":")[0]===g&&h===C}),[t,n]);return d.length?p.jsx(Ra,{dayHour:n,bookings:d,first:o,second:s,third:i,fourth:a,disabledCss:r,firstDay:e}):p.jsx(Ra,{first:o,second:s,third:i,fourth:a,disabledCss:r,firstDay:e})}),hx=({dayHour:e,lunchTimeBlock:t,firstDay:n,bookingBulk:r})=>{const o=R.useRef(""),s=ou(T=>T.updateStartAt),{bookingViewType:i}=xe(Bs(T=>({bookingViewType:T.bookingViewType}))),a=R.useMemo(()=>Q.addMinuteToHour(e.hour,15),[e.hour]),c=R.useMemo(()=>Q.addMinuteToHour(e.hour,30),[e.hour]),l=R.useMemo(()=>Q.addMinuteToHour(e.hour,45),[e.hour]),{isOver:d,setNodeRef:u}=Hn({id:`${Q.newDateKey(e.day,e.hour)}`,data:{accepts:["booking-slots"]}}),{isOver:v,setNodeRef:h}=Hn({id:`${Q.newDateKey(e.day,a)}`,data:{accepts:["booking-slots"]}}),{isOver:C,setNodeRef:g}=Hn({id:`${Q.newDateKey(e.day,c)}`,data:{accepts:["booking-slots"]}}),{isOver:x,setNodeRef:y}=Hn({id:`${Q.newDateKey(e.day,l)}`,data:{accepts:["booking-slots"]}});R.useEffect(()=>{d&&s(`${Q.newDateKey(e.day,e.hour)}`),v&&s(`${Q.newDateKey(e.day,a)}`),C&&s(`${Q.newDateKey(e.day,c)}`),x&&s(`${Q.newDateKey(e.day,l)}`)},[d,v,C,x]);const f=R.useMemo(()=>({ref:u,style:{backgroundColor:d?"#0066ff":""},key:Q.newDateKey(e.day,e.hour),time:e.hour}),[e.day,d,e.hour,u]),w=R.useMemo(()=>({ref:h,style:{backgroundColor:v?"#0066ff":""},key:Q.newDateKey(e.day,a),time:a}),[e.day,v,a,h]),D=R.useMemo(()=>({ref:g,style:{backgroundColor:C?"#0066ff":""},key:Q.newDateKey(e.day,c),time:c}),[e.day,C,c,g]),m=R.useMemo(()=>({ref:y,style:{backgroundColor:x?"#0066ff":""},key:Q.newDateKey(e.day,l),time:l}),[e.day,l,x,y]);return p.jsx("td",{className:se("slot",i===re.WEEK&&"slotWeek"),children:p.jsx(px,{booking:r,dayHour:e,firstDay:n,disabledCss:o.current,firstBlockTimeData:f,secondBlockTimeData:w,thirdBlockTimeData:D,fourthBlockTimeData:m})},`${e.day}-${e.hour}-slot`)};function gx({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:se("w-full caption-bottom text-sm",e),...t})})}function mx({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:se("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const vx=({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",se("activateVisibilityTime",i))};return R.useImperativeHandle(t,()=>({setActivateHour:a})),p.jsxs(Fs,{children:[p.jsx(zs,{children:p.jsx("span",{ref:s,className:se(i),children:e})}),p.jsxs(Ws,{children:[p.jsx(Wy,{children:o}),p.jsx(By,{}),p.jsx(Gi,{children:n}),p.jsx(Gi,{children:r})]})]})},yx=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=xe(Bs(g=>({addTimesRendered:g.addTimesRendered,bookingBulkData:g.bookingBulkData,bookingViewType:g.bookingViewType,daysOfWeek:g.daysOfWeek,hours:g.hours}))),{selectedNode:s,emptySlotNodes:i}=Mt(),{finishAt:a,updateFinishAtWithOffset:c}=ts(g=>g),[l]=R.useState({startAt:"12:00",finishAt:"12:30"}),d=R.useCallback((g,x)=>{g&&o(g,x)},[o]),u=R.useMemo(()=>n===re.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),v=R.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]),h=R.useMemo(()=>s.split(";")[1],[s]);return R.useEffect(()=>{if(s){const g=i.get(s);g==null||g.showEvent(h)}},[s,i]),R.useEffect(()=>{h===a&&c(h)},[s,a]),R.useMemo(()=>{const g=x=>x===0;return p.jsx("div",{className:se("calendarCore",n===re.WEEK&&"calendarCore_max"),children:p.jsx(gx,{children:p.jsx("tbody",{children:e.map(x=>p.jsxs("tr",{children:[p.jsx(mx,{style:{...v,...u,padding:0,position:"relative"},className:"calendarCore_cell",children:p.jsx("div",{className:"calendarCore_actions",children:p.jsx(vx,{ref:y=>d(y,x),hour:x})})},`${x}-hour`),t.map((y,f)=>p.jsx(hx,{dayHour:{day:String(y),hour:x},lunchTimeBlock:l,firstDay:g(f),bookingBulk:r.booking},`${y}-${x}-slot-content`))]},`${x}-content`))})})})},[u,e,v,r.booking,d,n,t,t.length])},bx=({isLoading:e})=>{const{bookings:t}=Qe(),n={distance:5},{setBookingBulkData:r,optimisticCardUpdate:o}=xe(),{onCardDropCallback:s}=Qe(),i=Ud(ci(ec,{activationConstraint:n}),ci(tc,{activationConstraint:n})),{bookingViewType:a,daysOfWeek:c}=xe(),l=R.useCallback(h=>{const{active:C}=h;C.id},[]),d=async(h,C,g)=>{try{const{startAt:x,finishAt:y}=Q.bookingTimeRange(h,C);o(h,x,y,g),await s(h,C,g,{id:h.id,startAt:x,finishAt:y})}catch(x){console.warn(x)}},u=h=>{const{over:C,active:g}=h;if(C&&g){const x=C.data.current,y=g.data.current;y&&x&&x.accepts.includes(y.type)&&y.booking.id&&C.id&&d(y.booking,String(C.id),y.slotData)}},v={position:"absolute",top:"50%",left:"50%",transform:"translate('-50%', '-50%')",zIndex:100};return R.useEffect(()=>{r({user:gb,booking:t})},[t,r]),p.jsxs("div",{className:"calendarHolder",children:[p.jsx(lb,{...ru,children:p.jsxs("div",{className:"calendarHolder_parent",children:[p.jsx(tb,{}),p.jsxs("div",{className:"calendarHolder_parent_content",children:[p.jsx(Gy,{daysOfWeek:c,bookingViewType:a}),p.jsx(nb,{children:p.jsx(ls,{onDragEnd:u,onDragStart:l,sensors:i,children:p.jsx(yx,{})})})]})]})}),p.jsx(hb,{color:"#000000aa",loading:e,cssOverride:v,size:15,"aria-label":"Loading Spinner","data-testid":"GridLoader"})]})},wx=({viewModes:e,createBookingModal:t,onChangeViewType:n,onCardDropCallback:r,onCardResizeEnd:o,onDayChange:s,onHeaderDayClick:i,onTodayClick:a,onSlotClick:c,onModalClose:l,bookings:d,isTimeInfoVisible:u,systemColor:v,ref:h})=>{const[C,g]=R.useState(!1),x=R.useRef(null),{setBookingViewType:y,setWeekAndViewType:f,setTodayDayAndViewType:w,bookingViewType:D,setTodayDay:m,todayWeek:T}=xe(),{setSelectedNode:b}=Mt(A=>A),E=A=>{var W;console.log("hour24Format",A),(W=x==null?void 0:x.current)==null||W.updateFinishAt(A)},M=A=>{m(new Date(A))},N=A=>{T(new Date(A))};return R.useImperativeHandle(h,()=>({updateViewType:A=>y(A),updateWeekAndViewType:A=>f(A),updateTodayDayAndViewType:A=>w(A),updateSelectedNode:A=>{setTimeout(()=>{b(A)},10)},updateFinishAt:A=>E(A),changeLoading:A=>g(A),goToDay:A=>M(A),goToWeek:A=>N(A)})),R.useEffect(()=>{n(D)},[D]),p.jsx(ab,{isTimeInfoVisible:u,systemColor:v,children:p.jsx(rb,{...ka,children:p.jsx(ob,{createBookingModal:t,viewModes:e,onHeaderDayClick:i,onTodayClick:a,onCardDropCallback:r,onCardResizeEnd:o,onDayChange:s,onSlotClick:c,onModalClose:l,bookings:d,children:p.jsx(_d,{ref:x,...Po,children:p.jsx(bx,{isLoading:C})})})})})},xx=e=>{const t=R.useRef(null),n=()=>{if(!(t!=null&&t.current))throw new cd};return{getCalendar:()=>p.jsx(wx,{ref:t,...e}),updateViewType:v=>{var h;n(),(h=t.current)==null||h.updateViewType(v)},updateWeekAndViewType:v=>{var h;return n(),(h=t.current)==null?void 0:h.updateWeekAndViewType(v)},updateTodayDayAndViewType:v=>{var h;return n(),(h=t.current)==null?void 0:h.updateTodayDayAndViewType(v)},updateSelectedNode:v=>{var h;n(),(h=t.current)==null||h.updateSelectedNode(v)},updateFinishAt:v=>{var h;n(),(h=t.current)==null||h.updateFinishAt(v)},changeLoading:v=>{var h;n(),(h=t.current)==null||h.changeLoading(v)},goToDay:v=>{var h;n(),(h=t.current)==null||h.goToDay(v)},goToWeek:v=>{var h;n(),(h=t.current)==null||h.goToWeek(v)}}};exports.useCalendarInstance=xx;