react-beauty-calendar 1.0.6 → 1.0.8

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 (110) hide show
  1. package/README.md +43 -0
  2. package/dist/{lib/@types → @types}/booking.d.ts +1 -1
  3. package/dist/{lib/@types → @types}/calendar-instance.d.ts +18 -3
  4. package/dist/build/assets/main.css +1 -1
  5. package/dist/build/main.cjs.js +37 -37
  6. package/dist/build/main.es.js +7694 -7440
  7. package/dist/classes/reference-error.d.ts +4 -0
  8. package/dist/{lib/components → components}/ui/Button.d.ts +1 -1
  9. package/dist/constants/booking-view-type.constant.d.ts +6 -0
  10. package/dist/{lib/context → context}/bookingModal/BookingModalProvider.d.ts +2 -1
  11. package/dist/{lib/context → context}/drag/dragStore.d.ts +0 -3
  12. package/dist/context/emptySlotsStore.ts/retrieveSlotKey.d.ts +6 -0
  13. package/dist/{lib/context → context}/emptySlotsStore.ts/useEmptySlotStore.d.ts +1 -1
  14. package/dist/{lib/context → context}/global/days-and-week/day-and-week-store.d.ts +6 -6
  15. package/dist/{lib/context → context}/month-description/month-description-store.d.ts +1 -0
  16. package/dist/{lib/context → context}/new-event/new-event-context.d.ts +1 -1
  17. package/dist/{lib/context → context}/new-event/new-event-store.d.ts +6 -0
  18. package/dist/core/Root.d.ts +3 -0
  19. package/dist/core/booking-card/BookingCard.d.ts +10 -0
  20. package/dist/core/booking-options/BookingInfoContent.d.ts +12 -0
  21. package/dist/{lib/core → core}/booking-options/BookingInfoOptions.d.ts +2 -2
  22. package/dist/{lib/core → core}/card-slots/SlotTrigger.d.ts +1 -1
  23. package/dist/core/header-calendar/HeaderDayActions.d.ts +6 -0
  24. package/dist/core/header-calendar/HeaderTodayAction.d.ts +6 -0
  25. package/dist/{lib/core → core}/slots/CardContent.d.ts +2 -4
  26. package/dist/{lib/core → core}/slots/EventsTab.d.ts +3 -1
  27. package/dist/{lib/core → core}/slots/TimeInfo.d.ts +2 -1
  28. package/dist/hooks/use-calendar-instance.d.ts +3 -0
  29. package/dist/{lib/utils → utils}/date-utils.d.ts +3 -2
  30. package/dist/{lib/utils → utils}/types.d.ts +1 -1
  31. package/package.json +24 -15
  32. package/dist/lib/constants/booking-view-type.constant.d.ts +0 -6
  33. package/dist/lib/core/Root.d.ts +0 -6
  34. package/dist/lib/core/booking-card/BookingCard.d.ts +0 -7
  35. package/dist/lib/hooks/use-calendar-instance.d.ts +0 -7
  36. /package/dist/{lib/@types → @types}/calendar.d.ts +0 -0
  37. /package/dist/{lib/@types → @types}/index.d.ts +0 -0
  38. /package/dist/{lib/@types → @types}/profile.d.ts +0 -0
  39. /package/dist/{lib/@types → @types}/user.d.ts +0 -0
  40. /package/dist/{lib/@types → @types}/working-time.d.ts +0 -0
  41. /package/dist/{lib/components → components}/ui/Dropdown-menu.d.ts +0 -0
  42. /package/dist/{lib/components → components}/ui/Input.d.ts +0 -0
  43. /package/dist/{lib/components → components}/ui/Label.d.ts +0 -0
  44. /package/dist/{lib/components → components}/ui/Popover.d.ts +0 -0
  45. /package/dist/{lib/components → components}/ui/Select.d.ts +0 -0
  46. /package/dist/{lib/components → components}/ui/Separator.d.ts +0 -0
  47. /package/dist/{lib/components → components}/ui/Table.d.ts +0 -0
  48. /package/dist/{lib/components → components}/ui/Tabs.d.ts +0 -0
  49. /package/dist/{lib/components → components}/ui/Toggle.d.ts +0 -0
  50. /package/dist/{lib/components → components}/ui/Tooltip.d.ts +0 -0
  51. /package/dist/{lib/constants → constants}/index.d.ts +0 -0
  52. /package/dist/{lib/constants → constants}/month.constant.d.ts +0 -0
  53. /package/dist/{lib/constants → constants}/payment.constant.d.ts +0 -0
  54. /package/dist/{lib/constants → constants}/side-options.constant.d.ts +0 -0
  55. /package/dist/{lib/constants → constants}/system-colors.constant.d.ts +0 -0
  56. /package/dist/{lib/constants → constants}/url-param.constant.d.ts +0 -0
  57. /package/dist/{lib/context → context}/booking/booking-context.d.ts +0 -0
  58. /package/dist/{lib/context → context}/booking/booking-store.d.ts +0 -0
  59. /package/dist/{lib/context → context}/booking/bookingProvider.d.ts +0 -0
  60. /package/dist/{lib/context → context}/bookingModal/booking-modal-context.d.ts +0 -0
  61. /package/dist/{lib/context → context}/date-and-time/DateAndTimeContext.d.ts +0 -0
  62. /package/dist/{lib/context → context}/emptySlotsStore.ts/emptySlotKey.d.ts +0 -0
  63. /package/dist/{lib/context → context}/global/booking-info/booking-info.d.ts +0 -0
  64. /package/dist/{lib/context → context}/global/slice-global/slice-global-store.d.ts +0 -0
  65. /package/dist/{lib/context → context}/index.d.ts +0 -0
  66. /package/dist/{lib/context → context}/month-description/MonthDescriptionProvider.d.ts +0 -0
  67. /package/dist/{lib/context → context}/month-description/month-description-context.d.ts +0 -0
  68. /package/dist/{lib/core → core}/calendar/CalendarHolder.d.ts +0 -0
  69. /package/dist/{lib/core → core}/calendar/CalendarView.d.ts +0 -0
  70. /package/dist/{lib/core → core}/calendar/HourWithActions.d.ts +0 -0
  71. /package/dist/{lib/core → core}/calendar/ViewTypes.d.ts +0 -0
  72. /package/dist/{lib/core → core}/favorite-booking/FavoriteBooking.d.ts +0 -0
  73. /package/dist/{lib/core → core}/header-calendar/DaysOfWeek.d.ts +0 -0
  74. /package/dist/{lib/core → core}/header-calendar/Header.d.ts +0 -0
  75. /package/dist/{lib/core → core}/header-calendar/HeaderViewType.d.ts +0 -0
  76. /package/dist/{lib/core → core}/header-calendar/SelectItem.d.ts +0 -0
  77. /package/dist/{lib/core → core}/info/Info.d.ts +0 -0
  78. /package/dist/{lib/core → core}/shortcut-commands/ShortcutCommands.d.ts +0 -0
  79. /package/dist/{lib/core → core}/slots/Card.d.ts +0 -0
  80. /package/dist/{lib/core → core}/slots/CardOverlay.d.ts +0 -0
  81. /package/dist/{lib/core → core}/slots/EmptySlot.d.ts +0 -0
  82. /package/dist/{lib/core → core}/slots/Slots.d.ts +0 -0
  83. /package/dist/{lib/core → core}/slots/TabsContent.d.ts +0 -0
  84. /package/dist/{lib/core → core}/slots/actualTimeIndicator/ActualTimeIndicator.d.ts +0 -0
  85. /package/dist/{lib/core → core}/slots/actualTimeIndicator/position-based-on-seconds.d.ts +0 -0
  86. /package/dist/{lib/core → core}/slots/service/ProcedureWithColor.d.ts +0 -0
  87. /package/dist/{lib/core → core}/slots/service/StartAt.d.ts +0 -0
  88. /package/dist/{lib/core → core}/slots/useResizableCardHook.d.ts +0 -0
  89. /package/dist/{lib/core → core}/table-view-type/TableViewType.d.ts +0 -0
  90. /package/dist/{lib/hoc → hoc}/WithTooltip.d.ts +0 -0
  91. /package/dist/{lib/hooks → hooks}/index.d.ts +0 -0
  92. /package/dist/{lib/hooks → hooks}/use-booking-model.d.ts +0 -0
  93. /package/dist/{lib/hooks → hooks}/use-days-selected-view.d.ts +0 -0
  94. /package/dist/{lib/hooks → hooks}/use-global-store.d.ts +0 -0
  95. /package/dist/{lib/hooks → hooks}/use-is-mobile.d.ts +0 -0
  96. /package/dist/{lib/hooks → hooks}/use-month-description.d.ts +0 -0
  97. /package/dist/{lib/hooks → hooks}/use-tanstack-table.d.ts +0 -0
  98. /package/dist/{lib/hooks → hooks}/useBooking.d.ts +0 -0
  99. /package/dist/{lib/hooks → hooks}/useDebounce.d.ts +0 -0
  100. /package/dist/{lib/hooks → hooks}/useEventPrevention.d.ts +0 -0
  101. /package/dist/{lib/hooks → hooks}/useMutation.d.ts +0 -0
  102. /package/dist/{lib/hooks → hooks}/useNewEventStore.d.ts +0 -0
  103. /package/dist/{lib/hooks → hooks}/useQuery.d.ts +0 -0
  104. /package/dist/{lib/hooks → hooks}/useTrottleCallback.d.ts +0 -0
  105. /package/dist/{lib/hooks → hooks}/useUrlParam.d.ts +0 -0
  106. /package/dist/lib/{lib/utils.d.ts → utils.d.ts} +0 -0
  107. /package/dist/{lib/main.d.ts → main.d.ts} +0 -0
  108. /package/dist/{lib/mock → mock}/booking-mock.d.ts +0 -0
  109. /package/dist/{lib/utils → utils}/hours.d.ts +0 -0
  110. /package/dist/{lib/utils → utils}/string.utils.d.ts +0 -0
@@ -1,108 +1,108 @@
1
- "use strict";require('./assets/main.css');var Lu=Object.defineProperty;var Fu=(e,t,n)=>t in e?Lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var st=(e,t,n)=>Fu(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),M=require("react"),Ue=require("react-dom");function pa(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 x=pa(M),yr=pa(Ue),Ys=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(b=>b(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},br=e=>e?Ys(e):Ys,zu=e=>e;function Yo(e,t=zu){const n=M.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return M.useDebugValue(n),n}const Us=e=>{const t=br(e),n=r=>Yo(t,r);return Object.assign(n,t),n},Uo=e=>e?Us(e):Us,ha={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},Wu=e=>br(t=>({...ha,...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)}))})),wr=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 Ko(e){return"nodeType"in e}function be(e){var t,n;return e?Vt(e)?e:Ko(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Go(e){const{Document:t}=be(e);return e instanceof t}function wn(e){return Vt(e)?!1:e instanceof be(e).HTMLElement}function ga(e){return e instanceof be(e).SVGElement}function Yt(e){return e?Vt(e)?e.document:Ko(e)?Go(e)?e:wn(e)||ga(e)?e.ownerDocument:document:document:document}const Ke=wr?M.useLayoutEffect:M.useEffect;function xr(e){const t=M.useRef(e);return Ke(()=>{t.current=e}),M.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 Bu(){const e=M.useRef(null),t=M.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=M.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function pn(e,t){t===void 0&&(t=[e]);const n=M.useRef(e);return Ke(()=>{n.current!==e&&(n.current=e)},t),n}function xn(e,t){const n=M.useRef();return M.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function rr(e){const t=xr(e),n=M.useRef(null),r=M.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function or(e){const t=M.useRef();return M.useEffect(()=>{t.current=e},[e]),t.current}let qr={};function Sr(e,t){return M.useMemo(()=>{if(t)return t;const n=qr[e]==null?0:qr[e]+1;return qr[e]=n,e+"-"+n},[e,t])}function ma(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,l]of a){const d=s[c];d!=null&&(s[c]=d+e*l)}return s},{...t})}}const jt=ma(1),sr=ma(-1);function Hu(e){return"clientX"in e&&"clientY"in e}function qo(e){if(!e)return!1;const{KeyboardEvent:t}=be(e.target);return t&&e instanceof t}function Vu(e){if(!e)return!1;const{TouchEvent:t}=be(e.target);return t&&e instanceof t}function ir(e){if(Vu(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 Hu(e)?{x:e.clientX,y:e.clientY}:null}const hn=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[hn.Translate.toString(e),hn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ks="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Yu(e){return e.matches(Ks)?e:e.querySelector(Ks)}const Uu={display:"none"};function Ku(e){let{id:t,value:n}=e;return M.createElement("div",{id:t,style:Uu},n)}function Gu(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 M.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function qu(){const[e,t]=M.useState("");return{announce:M.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const va=M.createContext(null);function Cr(e){const t=M.useContext(va);M.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Xu(){const[e]=M.useState(()=>new Set),t=M.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[M.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 Zu={draggable:`
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:`
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
- `},Ju={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 Qu(e){let{announcements:t=Ju,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Zu}=e;const{announce:s,announcement:i}=qu(),a=Sr("DndLiveRegion"),[c,l]=M.useState(!1);if(M.useEffect(()=>{l(!0)},[]),Cr(M.useMemo(()=>({onDragStart(u){let{active:v}=u;s(t.onDragStart({active:v}))},onDragMove(u){let{active:v,over:b}=u;t.onDragMove&&s(t.onDragMove({active:v,over:b}))},onDragOver(u){let{active:v,over:b}=u;s(t.onDragOver({active:v,over:b}))},onDragEnd(u){let{active:v,over:b}=u;s(t.onDragEnd({active:v,over:b}))},onDragCancel(u){let{active:v,over:b}=u;s(t.onDragCancel({active:v,over:b}))}}),[s,t])),!c)return null;const d=M.createElement(M.Fragment,null,M.createElement(Ku,{id:r,value:o.draggable}),M.createElement(Gu,{id:a,announcement:i}));return n?Ue.createPortal(d,n):d}var pe;(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"})(pe||(pe={}));function ar(){}function Gs(e,t){return M.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function ed(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return M.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Ie=Object.freeze({x:0,y:0});function td(e,t){const n=ir(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 nd(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function rd(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function od(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 sd=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=od(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(nd)};function id(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ya(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ie}function ad(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 cd=ad(1);function ba(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 ld(e,t,n){const r=ba(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 ud={ignoreTransform:!1};function Sn(e,t){t===void 0&&(t=ud);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:d}=be(e).getComputedStyle(e);l&&(n=ld(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 Sn(e,{ignoreTransform:!0})}function dd(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function fd(e,t){return t===void 0&&(t=be(e).getComputedStyle(e)),t.position==="fixed"}function pd(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 Xo(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Go(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!wn(o)||ga(o)||n.includes(o))return n;const s=be(e).getComputedStyle(o);return o!==e&&pd(o,s)&&n.push(o),fd(o,s)?n:r(o.parentNode)}return e?r(e):n}function wa(e){const[t]=Xo(e,1);return t??null}function Xr(e){return!wr||!e?null:Vt(e)?e:Ko(e)?Go(e)||e===Yt(e).scrollingElement?window:wn(e)?e:null:null}function xa(e){return Vt(e)?e.scrollX:e.scrollLeft}function Sa(e){return Vt(e)?e.scrollY:e.scrollTop}function wo(e){return{x:xa(e),y:Sa(e)}}var ge;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ge||(ge={}));function Ca(e){return!wr||!e?!1:e===document.scrollingElement}function Da(e){const t={x:0,y:0},n=Ca(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 hd={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=hd);const{isTop:l,isBottom:d,isLeft:u,isRight:v}=Da(e),b={x:0,y:0},D={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+g.height?(b.y=ge.Backward,D.y=r*Math.abs((t.top+g.height-s)/g.height)):!d&&c>=t.bottom-g.height&&(b.y=ge.Forward,D.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!v&&a>=t.right-g.width?(b.x=ge.Forward,D.x=r*Math.abs((t.right-g.width-a)/g.width)):!u&&i<=t.left+g.width&&(b.x=ge.Backward,D.x=r*Math.abs((t.left+g.width-i)/g.width)),{direction:b,speed:D}}function md(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 Ea(e){return e.reduce((t,n)=>jt(t,wo(n)),Ie)}function vd(e){return e.reduce((t,n)=>t+xa(n),0)}function yd(e){return e.reduce((t,n)=>t+Sa(n),0)}function Ma(e,t){if(t===void 0&&(t=Sn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);wa(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const bd=[["x",["left","right"],vd],["y",["top","bottom"],yd]];class Zo{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=Xo(n),o=Ea(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of bd)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 un{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 wd(e){const{EventTarget:t}=be(e);return e instanceof t?e:Yt(e)}function Zr(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 Ae;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ae||(Ae={}));function Xs(e){e.preventDefault()}function xd(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 Ra={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter,ue.Tab]},Sd=(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 Ta{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 un(Yt(n)),this.windowListeners=new un(be(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ae.Resize,this.handleCancel),this.windowListeners.add(Ae.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ae.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Ma(r),n(Ie)}handleKeyDown(t){if(qo(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Ra,coordinateGetter:i=Sd,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 v=sr(u,d),b={x:0,y:0},{scrollableAncestors:D}=r.current;for(const g of D){const S=t.code,{isTop:m,isRight:f,isLeft:h,isBottom:C,maxScroll:y,minScroll:E}=Da(g),w=md(g),R={x:Math.min(S===ue.Right?w.right-w.width/2:w.right,Math.max(S===ue.Right?w.left:w.left+w.width/2,u.x)),y:Math.min(S===ue.Down?w.bottom-w.height/2:w.bottom,Math.max(S===ue.Down?w.top:w.top+w.height/2,u.y))},A=S===ue.Right&&!f||S===ue.Left&&!h,I=S===ue.Down&&!C||S===ue.Up&&!m;if(A&&R.x!==u.x){const j=g.scrollLeft+v.x,B=S===ue.Right&&j<=y.x||S===ue.Left&&j>=E.x;if(B&&!v.y){g.scrollTo({left:j,behavior:a});return}B?b.x=g.scrollLeft-j:b.x=S===ue.Right?g.scrollLeft-y.x:g.scrollLeft-E.x,b.x&&g.scrollBy({left:-b.x,behavior:a});break}else if(I&&R.y!==u.y){const j=g.scrollTop+v.y,B=S===ue.Down&&j<=y.y||S===ue.Up&&j>=E.y;if(B&&!v.x){g.scrollTo({top:j,behavior:a});return}B?b.y=g.scrollTop-j:b.y=S===ue.Down?g.scrollTop-y.y:g.scrollTop-E.y,b.y&&g.scrollBy({top:-b.y,behavior:a});break}}this.handleMove(t,jt(sr(u,this.referenceCoordinates),b))}}}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()}}Ta.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ra,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 Zs(e){return!!(e&&"distance"in e)}function Js(e){return!!(e&&"delay"in e)}class Jo{constructor(t,n,r){var o;r===void 0&&(r=wd(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 un(this.document),this.listeners=new un(r),this.windowListeners=new un(be(i)),this.initialCoordinates=(o=ir(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(Ae.Resize,this.handleCancel),this.windowListeners.add(Ae.DragStart,Xs),this.windowListeners.add(Ae.VisibilityChange,this.handleCancel),this.windowListeners.add(Ae.ContextMenu,Xs),this.documentListeners.add(Ae.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Js(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Zs(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(Ae.Click,xd,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ae.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=ir(t))!=null?n:Ie,l=sr(o,c);if(!r&&a){if(Zs(a)){if(a.tolerance!=null&&Zr(l,a.tolerance))return this.handleCancel();if(Zr(l,a.distance))return this.handleStart()}if(Js(a)&&Zr(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 Cd={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Oa extends Jo{constructor(t){const{event:n}=t,r=Yt(n.target);super(t,Cd,r)}}Oa.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 Dd={move:{name:"mousemove"},end:{name:"mouseup"}};var xo;(function(e){e[e.RightClick=2]="RightClick"})(xo||(xo={}));class Pa extends Jo{constructor(t){super(t,Dd,Yt(t.event.target))}}Pa.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===xo.RightClick?!1:(r==null||r({event:n}),!0)}}];const Jr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Aa extends Jo{constructor(t){super(t,Jr)}static setup(){return window.addEventListener(Jr.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Jr.move.name,t)};function t(){}}}Aa.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 dn;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(dn||(dn={}));var cr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(cr||(cr={}));function Ed(e){let{acceleration:t,activator:n=dn.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=cr.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:u,threshold:v}=e;const b=Rd({delta:u,disabled:!s}),[D,g]=Bu(),S=M.useRef({x:0,y:0}),m=M.useRef({x:0,y:0}),f=M.useMemo(()=>{switch(n){case dn.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case dn.DraggableRect:return o}},[n,o,c]),h=M.useRef(null),C=M.useCallback(()=>{const E=h.current;if(!E)return;const w=S.current.x*m.current.x,R=S.current.y*m.current.y;E.scrollBy(w,R)},[]),y=M.useMemo(()=>a===cr.TreeOrder?[...l].reverse():l,[a,l]);M.useEffect(()=>{if(!s||!l.length||!f){g();return}for(const E of y){if((r==null?void 0:r(E))===!1)continue;const w=l.indexOf(E),R=d[w];if(!R)continue;const{direction:A,speed:I}=gd(E,R,f,t,v);for(const j of["x","y"])b[j][A[j]]||(I[j]=0,A[j]=0);if(I.x>0||I.y>0){g(),h.current=E,D(C,i),S.current=I,m.current=A;return}}S.current={x:0,y:0},m.current={x:0,y:0},g()},[t,C,r,g,s,i,JSON.stringify(f),JSON.stringify(b),D,l,y,d,JSON.stringify(v)])}const Md={x:{[ge.Backward]:!1,[ge.Forward]:!1},y:{[ge.Backward]:!1,[ge.Forward]:!1}};function Rd(e){let{delta:t,disabled:n}=e;const r=or(t);return xn(o=>{if(n||!r||!o)return Md;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 Td(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return xn(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function Od(e,t){return M.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 gn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(gn||(gn={}));var So;(function(e){e.Optimized="optimized"})(So||(So={}));const Qs=new Map;function Pd(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=M.useState(null),{frequency:a,measure:c,strategy:l}=o,d=M.useRef(e),u=S(),v=pn(u),b=M.useCallback(function(m){m===void 0&&(m=[]),!v.current&&i(f=>f===null?m:f.concat(m.filter(h=>!f.includes(h))))},[v]),D=M.useRef(null),g=xn(m=>{if(u&&!n)return Qs;if(!m||m===Qs||d.current!==e||s!=null){const f=new Map;for(let h of e){if(!h)continue;if(s&&s.length>0&&!s.includes(h.id)&&h.rect.current){f.set(h.id,h.rect.current);continue}const C=h.node.current,y=C?new Zo(c(C),C):null;h.rect.current=y,y&&f.set(h.id,y)}return f}return m},[e,s,n,u,c]);return M.useEffect(()=>{d.current=e},[e]),M.useEffect(()=>{u||b()},[n,u]),M.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),M.useEffect(()=>{u||typeof a!="number"||D.current!==null||(D.current=setTimeout(()=>{b(),D.current=null},a))},[a,u,b,...r]),{droppableRects:g,measureDroppableContainers:b,measuringScheduled:s!=null};function S(){switch(l){case gn.Always:return!1;case gn.BeforeDragging:return n;default:return!n}}}function Qo(e,t){return xn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Ad(e,t){return Qo(e,t)}function _d(e){let{callback:t,disabled:n}=e;const r=xr(t),o=M.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return M.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Dr(e){let{callback:t,disabled:n}=e;const r=xr(t),o=M.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return M.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function kd(e){return new Zo(Sn(e),e)}function ei(e,t,n){t===void 0&&(t=kd);const[r,o]=M.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=_d({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=Dr({callback:s});return Ke(()=>{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 Nd(e){const t=Qo(e);return ya(e,t)}const ti=[];function Id(e){const t=M.useRef(e),n=xn(r=>e?r&&r!==ti&&e&&t.current&&e.parentNode===t.current.parentNode?r:Xo(e):ti,[e]);return M.useEffect(()=>{t.current=e},[e]),n}function jd(e){const[t,n]=M.useState(null),r=M.useRef(e),o=M.useCallback(s=>{const i=Xr(s.target);i&&n(a=>a?(a.set(i,wo(i)),new Map(a)):null)},[]);return M.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=Xr(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,wo(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=Xr(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),M.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>jt(s,i),Ie):Ea(e):Ie,[e,t])}function ni(e,t){t===void 0&&(t=[]);const n=M.useRef(null);return M.useEffect(()=>{n.current=null},t),M.useEffect(()=>{const r=e!==Ie;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?sr(e,n.current):Ie}function $d(e){M.useEffect(()=>{if(!wr)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 Ld(e,t){return M.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function _a(e){return M.useMemo(()=>e?dd(e):null,[e])}const ri=[];function Fd(e,t){t===void 0&&(t=Sn);const[n]=e,r=_a(n?be(n):null),[o,s]=M.useState(ri);function i(){s(()=>e.length?e.map(c=>Ca(c)?r:new Zo(t(c),c)):ri)}const a=Dr({callback:i});return Ke(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function ka(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return wn(t)?t:e}function zd(e){let{measure:t}=e;const[n,r]=M.useState(null),o=M.useCallback(l=>{for(const{target:d}of l)if(wn(d)){r(u=>{const v=t(d);return u?{...u,width:v.width,height:v.height}:v});break}},[t]),s=Dr({callback:o}),i=M.useCallback(l=>{const d=ka(l);s==null||s.disconnect(),d&&(s==null||s.observe(d)),r(d?t(d):null)},[t,s]),[a,c]=rr(i);return M.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Wd=[{sensor:Oa,options:{}},{sensor:Ta,options:{}}],Bd={current:{}},Jn={draggable:{measure:qs},droppable:{measure:qs,strategy:gn.WhileDragging,frequency:So.Optimized},dragOverlay:{measure:Sn}};class fn 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 Hd={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new fn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ar},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Jn,measureDroppableContainers:ar,windowRect:null,measuringScheduled:!1},Na={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ar,draggableNodes:new Map,over:null,measureDroppableContainers:ar},Cn=M.createContext(Na),Ia=M.createContext(Hd);function Vd(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new fn}}}function Yd(e,t){switch(t.type){case pe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case pe.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 pe.DragEnd:case pe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case pe.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new fn(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case pe.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 fn(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case pe.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new fn(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Ud(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=M.useContext(Cn),s=or(r),i=or(n==null?void 0:n.id);return M.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!qo(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=Yu(d);if(u){u.focus();break}}})}},[r,t,o,i,s]),null}function ja(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function Kd(e){return M.useMemo(()=>({draggable:{...Jn.draggable,...e==null?void 0:e.draggable},droppable:{...Jn.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Jn.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 Gd(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=M.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ke(()=>{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=ya(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=wa(l);v&&v.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Er=M.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 es=M.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:d=Wd,collisionDetection:u=sd,measuring:v,modifiers:b,...D}=t;const g=M.useReducer(Yd,void 0,Vd),[S,m]=g,[f,h]=Xu(),[C,y]=M.useState(ut.Uninitialized),E=C===ut.Initialized,{draggable:{active:w,nodes:R,translate:A},droppable:{containers:I}}=S,j=w!=null?R.get(w):null,B=M.useRef({initial:null,translated:null}),H=M.useMemo(()=>{var ve;return w!=null?{id:w,data:(ve=j==null?void 0:j.data)!=null?ve:Bd,rect:B}:null},[w,j]),N=M.useRef(null),[_,O]=M.useState(null),[$,P]=M.useState(null),k=pn(D,Object.values(D)),T=Sr("DndDescribedBy",i),L=M.useMemo(()=>I.getEnabled(),[I]),V=Kd(v),{droppableRects:U,measureDroppableContainers:Y,measuringScheduled:Z}=Pd(L,{dragging:E,dependencies:[A.x,A.y],config:V.droppable}),K=Td(R,w),W=M.useMemo(()=>$?ir($):null,[$]),G=$u(),q=Ad(K,V.draggable.measure);Gd({activeNode:w!=null?R.get(w):null,config:G.layoutShiftCompensation,initialRect:q,measure:V.draggable.measure});const z=ei(K,V.draggable.measure,q),X=ei(K?K.parentElement:null),F=M.useRef({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=I.getNodeFor((n=F.current.over)==null?void 0:n.id),de=zd({measure:V.dragOverlay.measure}),Se=(r=de.nodeRef.current)!=null?r:K,Ce=E?(o=de.rect)!=null?o:z:null,Je=!!(de.nodeRef.current&&de.rect),Nn=Nd(Je?null:z),Qe=_a(Se?be(Se):null),et=Id(E?re??K:null),In=Fd(et),jn=ja(b,{transform:{x:A.x-Nn.x,y:A.y-Nn.y,scaleX:1,scaleY:1},activatorEvent:$,active:H,activeNodeRect:z,containerNodeRect:X,draggingNodeRect:Ce,over:F.current.over,overlayNodeRect:de.rect,scrollableAncestors:et,scrollableAncestorRects:In,windowRect:Qe}),Fs=W?jt(W,A):null,zs=jd(et),Pu=ni(zs),Au=ni(zs,[z]),Ot=jt(jn,Pu),Pt=Ce?cd(Ce,jn):null,Zt=H&&Pt?u({active:H,collisionRect:Pt,droppableRects:U,droppableContainers:L,pointerCoordinates:Fs}):null,Ws=rd(Zt,"id"),[tt,Bs]=M.useState(null),_u=Je?jn:jt(jn,Au),ku=id(_u,(s=tt==null?void 0:tt.rect)!=null?s:null,z),Kr=M.useRef(null),Hs=M.useCallback((ve,De)=>{let{sensor:Ee,options:nt}=De;if(N.current==null)return;const Pe=R.get(N.current);if(!Pe)return;const Me=ve.nativeEvent,Le=new Ee({active:N.current,activeNode:Pe,event:Me,options:nt,context:F,onAbort(me){if(!R.get(me))return;const{onDragAbort:Fe}=k.current,Ye={id:me};Fe==null||Fe(Ye),f({type:"onDragAbort",event:Ye})},onPending(me,rt,Fe,Ye){if(!R.get(me))return;const{onDragPending:Qt}=k.current,ot={id:me,constraint:rt,initialCoordinates:Fe,offset:Ye};Qt==null||Qt(ot),f({type:"onDragPending",event:ot})},onStart(me){const rt=N.current;if(rt==null)return;const Fe=R.get(rt);if(!Fe)return;const{onDragStart:Ye}=k.current,Jt={activatorEvent:Me,active:{id:rt,data:Fe.data,rect:B}};Ue.unstable_batchedUpdates(()=>{Ye==null||Ye(Jt),y(ut.Initializing),m({type:pe.DragStart,initialCoordinates:me,active:rt}),f({type:"onDragStart",event:Jt}),O(Kr.current),P(Me)})},onMove(me){m({type:pe.DragMove,coordinates:me})},onEnd:At(pe.DragEnd),onCancel:At(pe.DragCancel)});Kr.current=Le;function At(me){return async function(){const{active:Fe,collisions:Ye,over:Jt,scrollAdjustedTranslate:Qt}=F.current;let ot=null;if(Fe&&Qt){const{cancelDrop:en}=k.current;ot={activatorEvent:Me,active:Fe,collisions:Ye,delta:Qt,over:Jt},me===pe.DragEnd&&typeof en=="function"&&await Promise.resolve(en(ot))&&(me=pe.DragCancel)}N.current=null,Ue.unstable_batchedUpdates(()=>{m({type:me}),y(ut.Uninitialized),Bs(null),O(null),P(null),Kr.current=null;const en=me===pe.DragEnd?"onDragEnd":"onDragCancel";if(ot){const Gr=k.current[en];Gr==null||Gr(ot),f({type:en,event:ot})}})}}},[R]),Nu=M.useCallback((ve,De)=>(Ee,nt)=>{const Pe=Ee.nativeEvent,Me=R.get(nt);if(N.current!==null||!Me||Pe.dndKit||Pe.defaultPrevented)return;const Le={active:Me};ve(Ee,De.options,Le)===!0&&(Pe.dndKit={capturedBy:De.sensor},N.current=nt,Hs(Ee,De))},[R,Hs]),Vs=Od(d,Nu);$d(d),Ke(()=>{z&&C===ut.Initializing&&y(ut.Initialized)},[z,C]),M.useEffect(()=>{const{onDragMove:ve}=k.current,{active:De,activatorEvent:Ee,collisions:nt,over:Pe}=F.current;if(!De||!Ee)return;const Me={active:De,activatorEvent:Ee,collisions:nt,delta:{x:Ot.x,y:Ot.y},over:Pe};Ue.unstable_batchedUpdates(()=>{ve==null||ve(Me),f({type:"onDragMove",event:Me})})},[Ot.x,Ot.y]),M.useEffect(()=>{const{active:ve,activatorEvent:De,collisions:Ee,droppableContainers:nt,scrollAdjustedTranslate:Pe}=F.current;if(!ve||N.current==null||!De||!Pe)return;const{onDragOver:Me}=k.current,Le=nt.get(Ws),At=Le&&Le.rect.current?{id:Le.id,rect:Le.rect.current,data:Le.data,disabled:Le.disabled}:null,me={active:ve,activatorEvent:De,collisions:Ee,delta:{x:Pe.x,y:Pe.y},over:At};Ue.unstable_batchedUpdates(()=>{Bs(At),Me==null||Me(me),f({type:"onDragOver",event:me})})},[Ws]),Ke(()=>{F.current={activatorEvent:$,active:H,activeNode:K,collisionRect:Pt,collisions:Zt,droppableRects:U,draggableNodes:R,draggingNode:Se,draggingNodeRect:Ce,droppableContainers:I,over:tt,scrollableAncestors:et,scrollAdjustedTranslate:Ot},B.current={initial:Ce,translated:Pt}},[H,K,Zt,Pt,R,Se,Ce,U,I,tt,et,Ot]),Ed({...G,delta:A,draggingRect:Pt,pointerCoordinates:Fs,scrollableAncestors:et,scrollableAncestorRects:In});const Iu=M.useMemo(()=>({active:H,activeNode:K,activeNodeRect:z,activatorEvent:$,collisions:Zt,containerNodeRect:X,dragOverlay:de,draggableNodes:R,droppableContainers:I,droppableRects:U,over:tt,measureDroppableContainers:Y,scrollableAncestors:et,scrollableAncestorRects:In,measuringConfiguration:V,measuringScheduled:Z,windowRect:Qe}),[H,K,z,$,Zt,X,de,R,I,U,tt,Y,et,In,V,Z,Qe]),ju=M.useMemo(()=>({activatorEvent:$,activators:Vs,active:H,activeNodeRect:z,ariaDescribedById:{draggable:T},dispatch:m,draggableNodes:R,over:tt,measureDroppableContainers:Y}),[$,Vs,H,z,m,T,R,tt,Y]);return M.createElement(va.Provider,{value:h},M.createElement(Cn.Provider,{value:ju},M.createElement(Ia.Provider,{value:Iu},M.createElement(Er.Provider,{value:ku},l)),M.createElement(Ud,{disabled:(a==null?void 0:a.restoreFocus)===!1})),M.createElement(Qu,{...a,hiddenTextDescribedById:T}));function $u(){const ve=(_==null?void 0:_.autoScrollEnabled)===!1,De=typeof c=="object"?c.enabled===!1:c===!1,Ee=E&&!ve&&!De;return typeof c=="object"?{...c,enabled:Ee}:{enabled:Ee}}}),qd=M.createContext(null),oi="button",Xd="Draggable";function ts(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Sr(Xd),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:u,over:v}=M.useContext(Cn),{role:b=oi,roleDescription:D="draggable",tabIndex:g=0}=o??{},S=(c==null?void 0:c.id)===t,m=M.useContext(S?Er:qd),[f,h]=rr(),[C,y]=rr(),E=Ld(i,t),w=pn(n);Ke(()=>(u.set(t,{id:t,key:s,node:f,activatorNode:C,data:w}),()=>{const A=u.get(t);A&&A.key===s&&u.delete(t)}),[u,t]);const R=M.useMemo(()=>({role:b,tabIndex:g,"aria-disabled":r,"aria-pressed":S&&b===oi?!0:void 0,"aria-roledescription":D,"aria-describedby":d.draggable}),[r,b,g,S,D,d.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:R,isDragging:S,listeners:r?void 0:E,node:f,over:v,setNodeRef:h,setActivatorNodeRef:y,transform:m}}function Zd(){return M.useContext(Ia)}const Jd="Droppable",Qd={timeout:25};function $n(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Sr(Jd),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=M.useContext(Cn),d=M.useRef({disabled:n}),u=M.useRef(!1),v=M.useRef(null),b=M.useRef(null),{disabled:D,updateMeasurementsFor:g,timeout:S}={...Qd,...o},m=pn(g??r),f=M.useCallback(()=>{if(!u.current){u.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{l(Array.isArray(m.current)?m.current:[m.current]),b.current=null},S)},[S]),h=Dr({callback:f,disabled:D||!i}),C=M.useCallback((R,A)=>{h&&(A&&(h.unobserve(A),u.current=!1),R&&h.observe(R))},[h]),[y,E]=rr(C),w=pn(t);return M.useEffect(()=>{!h||!y.current||(h.disconnect(),u.current=!1,h.observe(y.current))},[y,h]),M.useEffect(()=>(a({type:pe.RegisterDroppable,element:{id:r,key:s,disabled:n,node:y,rect:v,data:w}}),()=>a({type:pe.UnregisterDroppable,key:s,id:r})),[r]),M.useEffect(()=>{n!==d.current.disabled&&(a({type:pe.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:y,over:c,setNodeRef:E}}function ef(e){let{animation:t,children:n}=e;const[r,o]=M.useState(null),[s,i]=M.useState(null),a=or(n);return!n&&!r&&a&&o(a),Ke(()=>{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]),M.createElement(M.Fragment,null,n,r?M.cloneElement(r,{ref:i}):null)}const tf={x:0,y:0,scaleX:1,scaleY:1};function nf(e){let{children:t}=e;return M.createElement(Cn.Provider,{value:Na},M.createElement(Er.Provider,{value:tf},t))}const rf={position:"fixed",touchAction:"none"},of=e=>qo(e)?"transform 250ms ease":void 0,sf=M.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:d=of}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},v={...rf,width:a.width,height:a.height,top:a.top,left:a.left,transform:hn.Transform.toString(u),transformOrigin:o&&r?td(r,a):void 0,transition:typeof d=="function"?d(r):d,...c};return M.createElement(n,{className:i,style:v,ref:t},s)}),af=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)}},cf=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:hn.Transform.toString(t)},{transform:hn.Transform.toString(n)}]},lf={duration:250,easing:"ease",keyframes:cf,sideEffects:af({styles:{active:{opacity:"0"}}})};function uf(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return xr((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=ka(i);if(!l)return;const{transform:d}=be(i).getComputedStyle(i),u=ba(d);if(!u)return;const v=typeof t=="function"?t:df(t);return Ma(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 df(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...lf,...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},b=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:v}}),[D]=b,g=b[b.length-1];if(JSON.stringify(D)===JSON.stringify(g))return;const S=r==null?void 0:r({active:i,dragOverlay:a,...l}),m=a.node.animate(b,{duration:t,easing:n,fill:"forwards"});return new Promise(f=>{m.onfinish=()=>{S==null||S(),f()}})}}let si=0;function ff(e){return M.useMemo(()=>{if(e!=null)return si++,si},[e])}const pf=M.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:b,draggableNodes:D,droppableContainers:g,dragOverlay:S,over:m,measuringConfiguration:f,scrollableAncestors:h,scrollableAncestorRects:C,windowRect:y}=Zd(),E=M.useContext(Er),w=ff(u==null?void 0:u.id),R=ja(i,{activatorEvent:d,active:u,activeNodeRect:v,containerNodeRect:b,draggingNodeRect:S.rect,over:m,overlayNodeRect:S.rect,scrollableAncestors:h,scrollableAncestorRects:C,transform:E,windowRect:y}),A=Qo(v),I=uf({config:r,draggableNodes:D,droppableContainers:g,measuringConfiguration:f}),j=A?S.setRef:void 0;return M.createElement(nf,null,M.createElement(ef,{animation:I},u&&w?M.createElement(sf,{key:w,id:u.id,ref:j,as:a,activatorEvent:d,adjustScale:t,className:c,transition:s,rect:A,style:{zIndex:l,...o},transform:R},n):null))}),ce={DAY:"DAY",WEEK:"WEEK",TABLE:"TABLE",MONTH:"MONTH"},Ge=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],$a=6e4,ii=Symbol.for("constructDateFrom");function hf(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ii in e?e[ii](t):e instanceof Date?new e.constructor(t):new Date(t)}function Co(e,t){return hf(e,e)}function gf(e,t,n){const r=Co(e);return r.setTime(r.getTime()+t*$a),r}function mf(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function vf(e,t){return+Co(e)-+Co(t)}function yf(e,t,n){const r=vf(e,t)/$a;return mf(n==null?void 0:n.roundingMethod)(r)}function bf(e,t,n){return gf(e,-t)}function wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xf(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 Qn={exports:{}},Sf=Qn.exports,ai;function Cf(){return ai||(ai=1,function(e,t){(function(n,r){e.exports=r()})(Sf,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",d="week",u="month",v="quarter",b="year",D="date",g="Invalid Date",S=/^(\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(N){var _=["th","st","nd","rd"],O=N%100;return"["+N+(_[(O-20)%10]||_[O]||_[0])+"]"}},h=function(N,_,O){var $=String(N);return!$||$.length>=_?N:""+Array(_+1-$.length).join(O)+N},C={s:h,z:function(N){var _=-N.utcOffset(),O=Math.abs(_),$=Math.floor(O/60),P=O%60;return(_<=0?"+":"-")+h($,2,"0")+":"+h(P,2,"0")},m:function N(_,O){if(_.date()<O.date())return-N(O,_);var $=12*(O.year()-_.year())+(O.month()-_.month()),P=_.clone().add($,u),k=O-P<0,T=_.clone().add($+(k?-1:1),u);return+(-($+(O-P)/(k?P-T:T-P))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:u,y:b,w:d,d:l,D,h:c,m:a,s:i,ms:s,Q:v}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},y="en",E={};E[y]=f;var w="$isDayjsObject",R=function(N){return N instanceof B||!(!N||!N[w])},A=function N(_,O,$){var P;if(!_)return y;if(typeof _=="string"){var k=_.toLowerCase();E[k]&&(P=k),O&&(E[k]=O,P=k);var T=_.split("-");if(!P&&T.length>1)return N(T[0])}else{var L=_.name;E[L]=_,P=L}return!$&&P&&(y=P),P||!$&&y},I=function(N,_){if(R(N))return N.clone();var O=typeof _=="object"?_:{};return O.date=N,O.args=arguments,new B(O)},j=C;j.l=A,j.i=R,j.w=function(N,_){return I(N,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var B=function(){function N(O){this.$L=A(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[w]=!0}var _=N.prototype;return _.parse=function(O){this.$d=function($){var P=$.date,k=$.utc;if(P===null)return new Date(NaN);if(j.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var T=P.match(S);if(T){var L=T[2]-1||0,V=(T[7]||"0").substring(0,3);return k?new Date(Date.UTC(T[1],L,T[3]||1,T[4]||0,T[5]||0,T[6]||0,V)):new Date(T[1],L,T[3]||1,T[4]||0,T[5]||0,T[6]||0,V)}}return new Date(P)}(O),this.init()},_.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},_.$utils=function(){return j},_.isValid=function(){return this.$d.toString()!==g},_.isSame=function(O,$){var P=I(O);return this.startOf($)<=P&&P<=this.endOf($)},_.isAfter=function(O,$){return I(O)<this.startOf($)},_.isBefore=function(O,$){return this.endOf($)<I(O)},_.$g=function(O,$,P){return j.u(O)?this[$]:this.set(P,O)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(O,$){var P=this,k=!!j.u($)||$,T=j.p(O),L=function(q,z){var X=j.w(P.$u?Date.UTC(P.$y,z,q):new Date(P.$y,z,q),P);return k?X:X.endOf(l)},V=function(q,z){return j.w(P.toDate()[q].apply(P.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(z)),P)},U=this.$W,Y=this.$M,Z=this.$D,K="set"+(this.$u?"UTC":"");switch(T){case b:return k?L(1,0):L(31,11);case u:return k?L(1,Y):L(0,Y+1);case d:var W=this.$locale().weekStart||0,G=(U<W?U+7:U)-W;return L(k?Z-G:Z+(6-G),Y);case l:case D:return V(K+"Hours",0);case c:return V(K+"Minutes",1);case a:return V(K+"Seconds",2);case i:return V(K+"Milliseconds",3);default:return this.clone()}},_.endOf=function(O){return this.startOf(O,!1)},_.$set=function(O,$){var P,k=j.p(O),T="set"+(this.$u?"UTC":""),L=(P={},P[l]=T+"Date",P[D]=T+"Date",P[u]=T+"Month",P[b]=T+"FullYear",P[c]=T+"Hours",P[a]=T+"Minutes",P[i]=T+"Seconds",P[s]=T+"Milliseconds",P)[k],V=k===l?this.$D+($-this.$W):$;if(k===u||k===b){var U=this.clone().set(D,1);U.$d[L](V),U.init(),this.$d=U.set(D,Math.min(this.$D,U.daysInMonth())).$d}else L&&this.$d[L](V);return this.init(),this},_.set=function(O,$){return this.clone().$set(O,$)},_.get=function(O){return this[j.p(O)]()},_.add=function(O,$){var P,k=this;O=Number(O);var T=j.p($),L=function(Y){var Z=I(k);return j.w(Z.date(Z.date()+Math.round(Y*O)),k)};if(T===u)return this.set(u,this.$M+O);if(T===b)return this.set(b,this.$y+O);if(T===l)return L(1);if(T===d)return L(7);var V=(P={},P[a]=r,P[c]=o,P[i]=n,P)[T]||1,U=this.$d.getTime()+O*V;return j.w(U,this)},_.subtract=function(O,$){return this.add(-1*O,$)},_.format=function(O){var $=this,P=this.$locale();if(!this.isValid())return P.invalidDate||g;var k=O||"YYYY-MM-DDTHH:mm:ssZ",T=j.z(this),L=this.$H,V=this.$m,U=this.$M,Y=P.weekdays,Z=P.months,K=P.meridiem,W=function(z,X,F,re){return z&&(z[X]||z($,k))||F[X].slice(0,re)},G=function(z){return j.s(L%12||12,z,"0")},q=K||function(z,X,F){var re=z<12?"AM":"PM";return F?re.toLowerCase():re};return k.replace(m,function(z,X){return X||function(F){switch(F){case"YY":return String($.$y).slice(-2);case"YYYY":return j.s($.$y,4,"0");case"M":return U+1;case"MM":return j.s(U+1,2,"0");case"MMM":return W(P.monthsShort,U,Z,3);case"MMMM":return W(Z,U);case"D":return $.$D;case"DD":return j.s($.$D,2,"0");case"d":return String($.$W);case"dd":return W(P.weekdaysMin,$.$W,Y,2);case"ddd":return W(P.weekdaysShort,$.$W,Y,3);case"dddd":return Y[$.$W];case"H":return String(L);case"HH":return j.s(L,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return q(L,V,!0);case"A":return q(L,V,!1);case"m":return String(V);case"mm":return j.s(V,2,"0");case"s":return String($.$s);case"ss":return j.s($.$s,2,"0");case"SSS":return j.s($.$ms,3,"0");case"Z":return T}return null}(z)||T.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(O,$,P){var k,T=this,L=j.p($),V=I(O),U=(V.utcOffset()-this.utcOffset())*r,Y=this-V,Z=function(){return j.m(T,V)};switch(L){case b:k=Z()/12;break;case u:k=Z();break;case v:k=Z()/3;break;case d:k=(Y-U)/6048e5;break;case l:k=(Y-U)/864e5;break;case c:k=Y/o;break;case a:k=Y/r;break;case i:k=Y/n;break;default:k=Y}return P?k:j.a(k)},_.daysInMonth=function(){return this.endOf(u).$D},_.$locale=function(){return E[this.$L]},_.locale=function(O,$){if(!O)return this.$L;var P=this.clone(),k=A(O,$,!0);return k&&(P.$L=k),P},_.clone=function(){return j.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()},N}(),H=B.prototype;return I.prototype=H,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",b],["$D",D]].forEach(function(N){H[N[1]]=function(_){return this.$g(_,N[0],N[1])}}),I.extend=function(N,_){return N.$i||(N(_,B,I),N.$i=!0),I},I.locale=A,I.isDayjs=R,I.unix=function(N){return I(1e3*N)},I.en=E[y],I.Ls=E,I.p={},I})}(Qn)),Qn.exports}var Df=Cf();const ci=wf(Df),Do=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ef=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],te={findIndexToStart(e=new Date){const t=Do[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return Do.indexOf(e)},generateWeekDays(e){const t=this.findIndexToStart(e),n=new Array(7).fill(0);let r=new Date,o=new Date;return{week:n.map((i,a)=>{const c=e||new Date,l=a-t,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()+l);return a===0&&(r=new Date(d.getFullYear(),d.getMonth(),d.getDate())),a===n.length-1&&(o=new Date(d.getFullYear(),d.getMonth(),d.getDate())),d}),firstDayOfWeek:r,lastDayOfWeek:o}},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 yf(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`${Ge[e[0].getMonth()].slice(0,3)} - ${Ge[e[1].getMonth()].slice(0,3)}`},timeDiffInSeconds(e,t){const n=ci(e),r=ci(t);return n.diff(r)/6e4},subtractMinutes(e,t){return bf(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}},Mf=(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)}}),Rf=(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},Tf="08:00",Of="23:30",Pf=60,Qr=te.generateWeekDays(),Af=(e,t)=>({hours:Rf(Tf,Of,Pf),selectedDay:null,daysOfWeek:Qr.week,firstDayOfWeek:Qr.firstDayOfWeek,lastDayOfWeek:Qr.lastDayOfWeek,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=new Date,o=new Date;return e(s=>{const i=_f(s.selectedDay,n),{week:a,firstDayOfWeek:c,lastDayOfWeek:l}=te.generateWeekDays(i);return r=c,o=l,{...s,daysOfWeek:a,firstDayOfWeek:c,lastDayOfWeek:l}}),{firstDayOfWeek:r,lastDayOfWeek:o}},nextWeek:()=>{const n=te.addDay(t().lastDayOfWeek,1),{firstDayOfWeek:r,lastDayOfWeek:o,week:s}=te.generateWeekDays(n);return e(i=>({...i,daysOfWeek:s,firstDayOfWeek:r,lastDayOfWeek:o})),{firstDayOfWeek:r,lastDayOfWeek:o}},previousWeek:()=>{const n=te.addDay(t().firstDayOfWeek,-1),{firstDayOfWeek:r,lastDayOfWeek:o,week:s}=te.generateWeekDays(n);return e(i=>({...i,daysOfWeek:s,firstDayOfWeek:r,lastDayOfWeek:o})),{firstDayOfWeek:r,lastDayOfWeek:o}},setDays:n=>{const r=t().daysOfWeek[0];if(!r)return[];const o=te.generateDays(r,n);return e(s=>({...s,daysOfWeek:o,firstDayOfWeek:o[0],lastDayOfWeek:o[0]})),o},getWeek:()=>{const n=t().firstDayOfWeek,r=t().lastDayOfWeek;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})})}}),_f=(e,t)=>t||(e?new Date(e):new Date),kf=(e,t)=>({setWeekAndViewType:n=>{const r=t().todayWeek(n);return t().setBookingViewType("WEEK"),r},setTodayDayAndViewType:n=>{const r=t().setTodayDay(n);return t().setBookingViewType("DAY"),r}}),Oe=Uo()((...e)=>({...Af(...e),...Mf(...e),...kf(...e)})),La=M.createContext(null),ns=e=>{const t=M.use(La);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Yo(t,e)},Nf=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o,selectedDay:s}=Oe(),{updateMonthMessage:i}=ns(l=>l),a=l=>{switch(l){case ce.DAY:{if(e(ce.DAY),r.length===1){const d=r[0];if(d){n(new Date(d)),c(new Date(d));break}}if(s){n(new Date(s)),c(new Date(s));break}n(new Date),c(new Date);break}case ce.WEEK:{e(ce.WEEK);const d=r[0];t(d);const{lastDayOfWeek:u,firstDayOfWeek:v}=o(),b=v.getMonth(),D=b!==u.getMonth()?te.shortMonthDescription(v,u):Ge[b];i({monthMessage:D});break}case ce.TABLE:{if(e(ce.TABLE),r.length===1){const d=r[0];if(d){n(new Date(d)),c(new Date(d));break}}if(s){n(new Date(s)),c(new Date(s));break}n(new Date),c(new Date);break}}},c=l=>{i({month:l.getMonth(),fullYear:l.getFullYear(),monthMessage:Ge[l.getMonth()]})};return{onViewTypeChange:a}},If=M.createContext(null),Eo={date:"",startAt:"",finishAt:""},jf=e=>br(t=>({...Eo,...e,updateForm:n=>t(r=>({...r,...n})),updateDynamicForm:(n,r)=>t(o=>({...o,[n]:r})),updateStartAt:n=>t(r=>({...r,startAt:n})),updateFinishAt:n=>t(r=>({...r,finishAt:n})),updateClient:(n,r)=>t(o=>({...o,client:{id:n,name:r}})),updateDate:n=>t(r=>({...r,date:n})),resetForm:()=>t(Eo)})),Fa=M.createContext(null),$f=({children:e,...t})=>{const n=M.useRef(null);return n.current||(n.current=jf(t)),p.jsx(Fa,{value:n.current,children:e})},za=e=>{const t=M.use(Fa);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Yo(t,e)};function Wa(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=Wa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ba(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wa(e))&&(r&&(r+=" "),r+=t);return r}const rs="-",Lf=e=>{const t=zf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(rs);return a[0]===""&&a.length!==1&&a.shift(),Ha(a,t)||Ff(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Ha=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ha(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(rs);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},li=/^\[(.+)\]$/,Ff=e=>{if(li.test(e)){const t=li.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},zf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Mo(n[o],r,o,t);return r},Mo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:ui(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Wf(o)){Mo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Mo(i,ui(t,s),n,r)})})},ui=(e,t)=>{let n=e;return t.split(rs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Wf=e=>e.isThemeGetter,Bf=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)}}},Ro="!",To=":",Hf=To.length,Vf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,l;for(let D=0;D<o.length;D++){let g=o[D];if(i===0&&a===0){if(g===To){s.push(o.slice(c,D)),c=D+Hf;continue}if(g==="/"){l=D;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const d=s.length===0?o:o.substring(c),u=Yf(d),v=u!==d,b=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:u,maybePostfixModifierPosition:b}};if(t){const o=t+To,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},Yf=e=>e.endsWith(Ro)?e.substring(0,e.length-1):e.startsWith(Ro)?e.substring(1):e,Uf=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}},Kf=e=>({cache:Bf(e.cacheSize),parseClassName:Vf(e),sortModifiers:Uf(e),...Lf(e)}),Gf=/\s+/,qf=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Gf);let c="";for(let l=a.length-1;l>=0;l-=1){const d=a[l],{isExternal:u,modifiers:v,hasImportantModifier:b,baseClassName:D,maybePostfixModifierPosition:g}=n(d);if(u){c=d+(c.length>0?" "+c:c);continue}let S=!!g,m=r(S?D.substring(0,g):D);if(!m){if(!S){c=d+(c.length>0?" "+c:c);continue}if(m=r(D),!m){c=d+(c.length>0?" "+c:c);continue}S=!1}const f=s(v).join(":"),h=b?f+Ro:f,C=h+m;if(i.includes(C))continue;i.push(C);const y=o(m,S);for(let E=0;E<y.length;++E){const w=y[E];i.push(h+w)}c=d+(c.length>0?" "+c:c)}return c};function Xf(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Va(t))&&(r&&(r+=" "),r+=n);return r}const Va=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Va(e[r]))&&(n&&(n+=" "),n+=t);return n};function Zf(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((d,u)=>u(d),e());return n=Kf(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=qf(c,n);return o(c,d),d}return function(){return s(Xf.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ya=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ua=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jf=/^\d+\/\d+$/,Qf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ep=/\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$/,tp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,np=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_t=e=>Jf.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),xt=e=>!!e&&Number.isInteger(Number(e)),di=e=>e.endsWith("%")&&ne(e.slice(0,-1)),it=e=>Qf.test(e),op=()=>!0,sp=e=>ep.test(e)&&!tp.test(e),os=()=>!1,ip=e=>np.test(e),ap=e=>rp.test(e),cp=e=>!J(e)&&!Q(e),lp=e=>Ut(e,qa,os),J=e=>Ya.test(e),St=e=>Ut(e,Xa,sp),eo=e=>Ut(e,wp,ne),up=e=>Ut(e,Ka,os),dp=e=>Ut(e,Ga,ap),fp=e=>Ut(e,os,ip),Q=e=>Ua.test(e),Ln=e=>Kt(e,Xa),pp=e=>Kt(e,xp),hp=e=>Kt(e,Ka),gp=e=>Kt(e,qa),mp=e=>Kt(e,Ga),vp=e=>Kt(e,Sp,!0),Ut=(e,t,n)=>{const r=Ya.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kt=(e,t,n=!1)=>{const r=Ua.exec(e);return r?r[1]?t(r[1]):n:!1},Ka=e=>e==="position",yp=new Set(["image","url"]),Ga=e=>yp.has(e),bp=new Set(["length","size","percentage"]),qa=e=>bp.has(e),Xa=e=>e==="length",wp=e=>e==="number",xp=e=>e==="family-name",Sp=e=>e==="shadow",Cp=()=>{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("drop-shadow"),b=he("blur"),D=he("perspective"),g=he("aspect"),S=he("ease"),m=he("animate"),f=()=>["auto","avoid","all","avoid-page","page","left","right","column"],h=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["auto","hidden","clip","visible","scroll"],y=()=>["auto","contain","none"],E=()=>[Q,J,c],w=()=>[_t,"full","auto",...E()],R=()=>[xt,"none","subgrid",Q,J],A=()=>["auto",{span:["full",xt,Q,J]},Q,J],I=()=>[xt,"auto",Q,J],j=()=>["auto","min","max","fr",Q,J],B=()=>["start","end","center","between","around","evenly","stretch","baseline"],H=()=>["start","end","center","stretch"],N=()=>["auto",...E()],_=()=>[_t,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],O=()=>[e,Q,J],$=()=>[di,St],P=()=>["","none","full",l,Q,J],k=()=>["",ne,Ln,St],T=()=>["solid","dashed","dotted","double"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["","none",b,Q,J],U=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q,J],Y=()=>["none",ne,Q,J],Z=()=>["none",ne,Q,J],K=()=>[ne,Q,J],W=()=>[_t,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[it],breakpoint:[it],color:[op],container:[it],"drop-shadow":[it],ease:["in","out","in-out"],font:[cp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[it],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[it],shadow:[it],spacing:["px",ne],text:[it],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_t,J,Q,g]}],container:["container"],columns:[{columns:[ne,J,Q,a]}],"break-after":[{"break-after":f()}],"break-before":[{"break-before":f()}],"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:[...h(),J,Q]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:y()}],"overscroll-x":[{"overscroll-x":y()}],"overscroll-y":[{"overscroll-y":y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[xt,"auto",Q,J]}],basis:[{basis:[_t,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,_t,"auto","initial","none",J]}],grow:[{grow:["",ne,Q,J]}],shrink:[{shrink:["",ne,Q,J]}],order:[{order:[xt,"first","last","none",Q,J]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...H(),"baseline"]}],"align-self":[{self:["auto",...H(),"baseline"]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],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:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[a,"screen",..._()]}],"min-w":[{"min-w":[a,"screen","none",..._()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},..._()]}],h:[{h:["screen",..._()]}],"min-h":[{"min-h":["screen","none",..._()]}],"max-h":[{"max-h":["screen",..._()]}],"font-size":[{text:["base",n,Ln,St]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Q,eo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",di,J]}],"font-family":[{font:[pp,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":[ne,"none",Q,eo]}],leading:[{leading:[s,...E()]}],"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:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...T(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",Q,St]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ne,"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:E()}],"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"]}],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:[...h(),hp,up]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",gp,lp]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xt,Q,J],radial:["",Q,J],conic:[xt,Q,J]},mp,dp]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:k()}],"border-w-x":[{"border-x":k()}],"border-w-y":[{"border-y":k()}],"border-w-s":[{"border-s":k()}],"border-w-e":[{"border-e":k()}],"border-w-t":[{"border-t":k()}],"border-w-r":[{"border-r":k()}],"border-w-b":[{"border-b":k()}],"border-w-l":[{"border-l":k()}],"divide-x":[{"divide-x":k()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":k()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...T(),"hidden","none"]}],"divide-style":[{divide:[...T(),"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:[...T(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,Q,J]}],"outline-w":[{outline:["",ne,Ln,St]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",d,vp,fp]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",Q,J,u]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ne,St]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":k()}],"inset-ring-color":[{"inset-ring":O()}],opacity:[{opacity:[ne,Q,J]}],"mix-blend":[{"mix-blend":[...L(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none",Q,J]}],blur:[{blur:V()}],brightness:[{brightness:[ne,Q,J]}],contrast:[{contrast:[ne,Q,J]}],"drop-shadow":[{"drop-shadow":["","none",v,Q,J]}],grayscale:[{grayscale:["",ne,Q,J]}],"hue-rotate":[{"hue-rotate":[ne,Q,J]}],invert:[{invert:["",ne,Q,J]}],saturate:[{saturate:[ne,Q,J]}],sepia:[{sepia:["",ne,Q,J]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,J]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[ne,Q,J]}],"backdrop-contrast":[{"backdrop-contrast":[ne,Q,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,Q,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,Q,J]}],"backdrop-invert":[{"backdrop-invert":["",ne,Q,J]}],"backdrop-opacity":[{"backdrop-opacity":[ne,Q,J]}],"backdrop-saturate":[{"backdrop-saturate":[ne,Q,J]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,Q,J]}],"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",Q,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",Q,J]}],ease:[{ease:["linear","initial",S,Q,J]}],delay:[{delay:[ne,Q,J]}],animate:[{animate:["none",m,Q,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[D,Q,J]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[Q,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:W()}],"translate-x":[{"translate-x":W()}],"translate-y":[{"translate-y":W()}],"translate-z":[{"translate-z":W()}],"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",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":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",Q,J]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ne,Ln,St,eo]}],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-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Dp=Zf(Cp);function oe(...e){return Dp(Ba(e))}const Ep=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=Oe(),{updateMonthMessage:o}=ns(d=>d),s=t===ce.DAY?{textAlign:"start"}:{textAlign:"center"},i=t===ce.TABLE?{justifySelf:"start"}:{},a=M.useCallback(d=>{const u=n(d);if(!u)return;const v={month:u.getMonth(),fullYear:u.getFullYear(),monthMessage:Ge[u.getMonth()]};o(v),r(ce.DAY)},[n,o,r]),c=M.useMemo(()=>{const d=u=>new Date(u).toDateString()===new Date().toDateString();return e.map(u=>{const v=Do[new Date(u).getDay()];return p.jsx("th",{className:oe("daysOfWeek",t!==ce.DAY&&"daysOfWeek_day"),children:p.jsxs("div",{style:{...s,...i},className:"daysOfWeek_parent",children:[p.jsx("span",{className:oe(d(u)&&"daysOfWeek_day_today_title"),children:v}),p.jsx("div",{style:{width:"100%"},children:p.jsx("button",{type:"button",className:oe("daysOfWeek_day",d(u)?"daysOfWeek_day_today":"daysOfWeek_day_rest"),onClick:()=>a(u),children:te.formatDate(u.toDateString())})})]})},v)})},[e,a,t]),l=p.jsx("th",{style:i,className:"calendarHeader",children:p.jsx("div",{className:"daysOfWeek_emptySlot"})},"emptyBlocks");return p.jsx("table",{className:"daysOfWeek_emptySlot_table",children:p.jsx("tbody",{children:p.jsxs("tr",{children:[l,c]})})})};/**
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]})})})};/**
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(),Za=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
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();/**
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 Rp={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 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"};/**
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 Tp=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>M.createElement("svg",{ref:c,...Rp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Za("lucide",o),...a},[...i.map(([l,d])=>M.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
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]]));/**
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=M.forwardRef(({className:r,...o},s)=>M.createElement(Tp,{ref:s,iconNode:t,className:Za(`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(Pp,{ref:s,iconNode:t,className:sc(`lucide-${Mp(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 Op=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],Pp=we("Bookmark",Op);/**
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);/**
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 Ap=[["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"}]],_p=we("CalendarCog",Ap);/**
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);/**
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 kp=[["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"}]],Np=we("CalendarDays",kp);/**
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);/**
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 Ip=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ja=we("Check",Ip);/**
45
+ */const Lp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ic=we("Check",Lp);/**
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 jp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qa=we("ChevronDown",jp);/**
50
+ */const $p=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ac=we("ChevronDown",$p);/**
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 $p=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Lp=we("ChevronLeft",$p);/**
55
+ */const Fp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],zp=we("ChevronLeft",Fp);/**
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 Fp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zp=we("ChevronRight",Fp);/**
60
+ */const Wp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bp=we("ChevronRight",Wp);/**
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 Wp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Bp=we("ChevronUp",Wp);/**
65
+ */const Hp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Vp=we("ChevronUp",Hp);/**
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 Hp=[["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"}]],Vp=we("Columns4",Hp);/**
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);/**
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 Yp=[["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"}]],Up=we("GalleryVertical",Yp);/**
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);/**
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 Kp=[["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"}]],Gp=we("Grid3x3",Kp);/**
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);/**
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 qp=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Xp=we("Pencil",qp);/**
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);/**
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 Zp=[["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"}]],Jp=we("SquareMousePointer",Zp);/**
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);/**
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 Qp=[["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"}]],eh=we("Trash2",Qp);/**
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);/**
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 th=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nh=we("X",th);function fi(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=fi(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():fi(e[o],null)}}}}function le(...e){return x.useCallback(Mr(...e),e)}var dt=x.forwardRef((e,t)=>{const{children:n,...r}=e,o=x.Children.toArray(n),s=o.find(rh);if(s){const i=s.props.children,a=o.map(c=>c===s?x.Children.count(i)>1?x.Children.only(null):x.isValidElement(i)?i.props.children:null:c);return p.jsx(Oo,{...r,ref:t,children:x.isValidElement(i)?x.cloneElement(i,void 0,a):null})}return p.jsx(Oo,{...r,ref:t,children:n})});dt.displayName="Slot";var Oo=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const o=sh(n),s=oh(r,n.props);return n.type!==x.Fragment&&(s.ref=t?Mr(t,o):o),x.cloneElement(n,s)}return x.Children.count(n)>1?x.Children.only(null):null});Oo.displayName="SlotClone";var ec=({children:e})=>p.jsx(p.Fragment,{children:e});function rh(e){return x.isValidElement(e)&&e.type===ec}function oh(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 sh(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 pi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hi=Ba,tc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hi(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=pi(d)||pi(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,...b}=d;return Object.entries(b).every(D=>{let[g,S]=D;return Array.isArray(S)?S.includes({...s,...a}[g]):{...s,...a}[g]===S})?[...l,u,v]:l},[]);return hi(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},ih=tc("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?dt:"button";return p.jsx(s,{"data-slot":"button",className:oe(ih({variant:t,size:n,className:e})),...o})}const lr=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}`},zt=Uo((e,t)=>({emptySlotNodes:new Map,selectedNode:"",setEmptySlotNode:(n,r)=>{e(o=>{const s=new Map(o.emptySlotNodes);s.size>447&&s.clear();const c=lr(r);return s.set(c,n),{...o,emptySlotNodes:s}})},setSelectedNode:(n,r=!1)=>{const o=new Map(t().emptySlotNodes),s=t().selectedNode;e(i=>{if(r){const a=o.get(s);a&&a.closeEvent()}return{...i,selectedNode:n}})},resetNodes:()=>{e(n=>{const r=new Map(n.emptySlotNodes);return r.clear(),{...n,emptySlotNodes:r}})},resetSelectedNode:()=>e(n=>({...n,selectedNode:""}))})),nc=M.createContext(void 0),Ct=()=>{const e=M.use(nc);if(!e)throw new Error("useBookingModal must be used within a BookingModalProvider");return e};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=x.createContext(i),c=n.length;n=[...n,i];const l=u=>{var m;const{scope:v,children:b,...D}=u,g=((m=v==null?void 0:v[e])==null?void 0:m[c])||a,S=x.useMemo(()=>D,Object.values(D));return p.jsx(g.Provider,{value:S,children:b})};l.displayName=s+"Provider";function d(u,v){var g;const b=((g=v==null?void 0:v[e])==null?void 0:g[c])||a,D=x.useContext(b);if(D)return D;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=>x.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,ah(o,...t)]}function ah(...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 x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var ch=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=ch.reduce((e,t)=>{const n=x.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?dt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rc(e,t){e&&yr.flushSync(()=>e.dispatchEvent(t))}function ke(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lh(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e);x.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 uh="DismissableLayer",Po="dismissableLayer.update",dh="dismissableLayer.pointerDownOutside",fh="dismissableLayer.focusOutside",gi,oc=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Dn=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=x.useContext(oc),[d,u]=x.useState(null),v=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=x.useState({}),D=le(t,w=>u(w)),g=Array.from(l.layers),[S]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=g.indexOf(S),f=d?g.indexOf(d):-1,h=l.layersWithOutsidePointerEventsDisabled.size>0,C=f>=m,y=gh(w=>{const R=w.target,A=[...l.branches].some(I=>I.contains(R));!C||A||(o==null||o(w),i==null||i(w),w.defaultPrevented||a==null||a())},v),E=mh(w=>{const R=w.target;[...l.branches].some(I=>I.contains(R))||(s==null||s(w),i==null||i(w),w.defaultPrevented||a==null||a())},v);return lh(w=>{f===l.layers.size-1&&(r==null||r(w),!w.defaultPrevented&&a&&(w.preventDefault(),a()))},v),x.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gi=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=gi)}},[d,v,n,l]),x.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),mi())},[d,l]),x.useEffect(()=>{const w=()=>b({});return document.addEventListener(Po,w),()=>document.removeEventListener(Po,w)},[]),p.jsx(se.div,{...c,ref:D,style:{pointerEvents:h?C?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,y.onPointerDownCapture)})});Dn.displayName=uh;var ph="DismissableLayerBranch",hh=x.forwardRef((e,t)=>{const n=x.useContext(oc),r=x.useRef(null),o=le(t,r);return x.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})});hh.displayName=ph;function gh(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){sc(dh,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 mh(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e),r=x.useRef(!1);return x.useEffect(()=>{const o=s=>{s.target&&!r.current&&sc(fh,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(Po);document.dispatchEvent(e)}function sc(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?rc(o,s):o.dispatchEvent(s)}var ye=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},vh=x.useId||(()=>{}),yh=0;function ft(e){const[t,n]=x.useState(vh());return ye(()=>{n(r=>r??String(yh++))},[e]),e||(t?`radix-${t}`:"")}const bh=["top","right","bottom","left"],pt=Math.min,Re=Math.max,ur=Math.round,Fn=Math.floor,Be=e=>({x:e,y:e}),wh={left:"right",right:"left",bottom:"top",top:"bottom"},xh={start:"end",end:"start"};function Ao(e,t,n){return Re(e,pt(t,n))}function qe(e,t){return typeof e=="function"?e(t):e}function Xe(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(Xe(e))?"y":"x"}function as(e){return ss(ht(e))}function Sh(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=dr(i)),[i,dr(i)]}function Ch(e){const t=dr(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>xh[t])}function Dh(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 Eh(e,t,n,r){const o=Gt(e);let s=Dh(Xe(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(_o)))),s}function dr(e){return e.replace(/left|right|bottom|top/g,t=>wh[t])}function Mh(e){return{top:0,right:0,bottom:0,left:0,...e}}function ic(e){return typeof e!="number"?Mh(e):{top:e,right:e,bottom:e,left:e}}function fr(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 vi(e,t,n){let{reference:r,floating:o}=e;const s=ht(t),i=as(t),a=is(i),c=Xe(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 b;switch(c){case"top":b={x:d,y:r.y-o.height};break;case"bottom":b={x:d,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:u};break;case"left":b={x:r.x-o.width,y:u};break;default:b={x:r.x,y:r.y}}switch(Gt(t)){case"start":b[i]-=v*(n&&l?-1:1);break;case"end":b[i]+=v*(n&&l?-1:1);break}return b}const Rh=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}=vi(l,r,c),v=r,b={},D=0;for(let g=0;g<a.length;g++){const{name:S,fn:m}=a[g],{x:f,y:h,data:C,reset:y}=await m({x:d,y:u,initialPlacement:r,placement:v,strategy:o,middlewareData:b,rects:l,platform:i,elements:{reference:e,floating:t}});d=f??d,u=h??u,b={...b,[S]:{...b[S],...C}},y&&D<=50&&(D++,typeof y=="object"&&(y.placement&&(v=y.placement),y.rects&&(l=y.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:d,y:u}=vi(l,v,c)),g=-1)}return{x:d,y:u,placement:v,strategy:o,middlewareData:b}};async function mn(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:b=0}=qe(t,e),D=ic(b),S=a[v?u==="floating"?"reference":"floating":u],m=fr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.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,h=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(h))?await(s.getScale==null?void 0:s.getScale(h))||{x:1,y:1}:{x:1,y:1},y=fr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:h,strategy:c}):f);return{top:(m.top-y.top+D.top)/C.y,bottom:(y.bottom-m.bottom+D.bottom)/C.y,left:(m.left-y.left+D.left)/C.x,right:(y.right-m.right+D.right)/C.x}}const Th=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}=qe(e,t)||{};if(l==null)return{};const u=ic(d),v={x:n,y:r},b=as(o),D=is(b),g=await i.getDimensions(l),S=b==="y",m=S?"top":"left",f=S?"bottom":"right",h=S?"clientHeight":"clientWidth",C=s.reference[D]+s.reference[b]-v[b]-s.floating[D],y=v[b]-s.reference[b],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let w=E?E[h]:0;(!w||!await(i.isElement==null?void 0:i.isElement(E)))&&(w=a.floating[h]||s.floating[D]);const R=C/2-y/2,A=w/2-g[D]/2-1,I=pt(u[m],A),j=pt(u[f],A),B=I,H=w-g[D]-j,N=w/2-g[D]/2+R,_=Ao(B,N,H),O=!c.arrow&&Gt(o)!=null&&N!==_&&s.reference[D]/2-(N<B?I:j)-g[D]/2<0,$=O?N<B?N-B:N-H:0;return{[b]:v[b]+$,data:{[b]:_,centerOffset:N-_-$,...O&&{alignmentOffset:$}},reset:O}}}),Oh=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:b="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:g=!0,...S}=qe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=Xe(o),f=ht(a),h=Xe(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),y=v||(h||!g?[dr(a)]:Ch(a)),E=D!=="none";!v&&E&&y.push(...Eh(a,g,D,C));const w=[a,...y],R=await mn(t,S),A=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&A.push(R[m]),u){const N=Sh(o,i,C);A.push(R[N[0]],R[N[1]])}if(I=[...I,{placement:o,overflows:A}],!A.every(N=>N<=0)){var j,B;const N=(((j=s.flip)==null?void 0:j.index)||0)+1,_=w[N];if(_)return{data:{index:N,overflows:I},reset:{placement:_}};let O=(B=I.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:B.placement;if(!O)switch(b){case"bestFit":{var H;const $=(H=I.filter(P=>{if(E){const k=ht(P.placement);return k===f||k==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(k=>k>0).reduce((k,T)=>k+T,0)]).sort((P,k)=>P[1]-k[1])[0])==null?void 0:H[0];$&&(O=$);break}case"initialPlacement":O=a;break}if(o!==O)return{reset:{placement:O}}}return{}}}};function yi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bi(e){return bh.some(t=>e[t]>=0)}const Ph=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=qe(e,t);switch(r){case"referenceHidden":{const s=await mn(t,{...o,elementContext:"reference"}),i=yi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:bi(i)}}}case"escaped":{const s=await mn(t,{...o,altBoundary:!0}),i=yi(s,n.floating);return{data:{escapedOffsets:i,escaped:bi(i)}}}default:return{}}}}};async function Ah(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Xe(n),a=Gt(n),c=ht(n)==="y",l=["left","top"].includes(i)?-1:1,d=s&&c?-1:1,u=qe(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:D}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof D=="number"&&(b=a==="end"?D*-1:D),c?{x:b*d,y:v*l}:{x:v*l,y:b*d}}const _h=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 Ah(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}}}}},kh=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:S=>{let{x:m,y:f}=S;return{x:m,y:f}}},...c}=qe(e,t),l={x:n,y:r},d=await mn(t,c),u=ht(Xe(o)),v=ss(u);let b=l[v],D=l[u];if(s){const S=v==="y"?"top":"left",m=v==="y"?"bottom":"right",f=b+d[S],h=b-d[m];b=Ao(f,b,h)}if(i){const S=u==="y"?"top":"left",m=u==="y"?"bottom":"right",f=D+d[S],h=D-d[m];D=Ao(f,D,h)}const g=a.fn({...t,[v]:b,[u]:D});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:s,[u]:i}}}}}},Nh=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}=qe(e,t),d={x:n,y:r},u=ht(o),v=ss(u);let b=d[v],D=d[u];const g=qe(a,t),S=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const h=v==="y"?"height":"width",C=s.reference[v]-s.floating[h]+S.mainAxis,y=s.reference[v]+s.reference[h]-S.mainAxis;b<C?b=C:b>y&&(b=y)}if(l){var m,f;const h=v==="y"?"width":"height",C=["top","left"].includes(Xe(o)),y=s.reference[u]-s.floating[h]+(C&&((m=i.offset)==null?void 0:m[u])||0)+(C?0:S.crossAxis),E=s.reference[u]+s.reference[h]+(C?0:((f=i.offset)==null?void 0:f[u])||0)-(C?S.crossAxis:0);D<y?D=y:D>E&&(D=E)}return{[v]:b,[u]:D}}}},Ih=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}=qe(e,t),d=await mn(t,l),u=Xe(o),v=Gt(o),b=ht(o)==="y",{width:D,height:g}=s.floating;let S,m;u==="top"||u==="bottom"?(S=u,m=v===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(m=u,S=v==="end"?"top":"bottom");const f=g-d.top-d.bottom,h=D-d.left-d.right,C=pt(g-d[S],f),y=pt(D-d[m],h),E=!t.middlewareData.shift;let w=C,R=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=h),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=f),E&&!v){const I=Re(d.left,0),j=Re(d.right,0),B=Re(d.top,0),H=Re(d.bottom,0);b?R=D-2*(I!==0||j!==0?I+j:Re(d.left,d.right)):w=g-2*(B!==0||H!==0?B+H:Re(d.top,d.bottom))}await c({...t,availableWidth:R,availableHeight:w});const A=await i.getDimensions(a.floating);return D!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function Rr(){return typeof window<"u"}function qt(e){return ac(e)?(e.nodeName||"").toLowerCase():"#document"}function Te(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(ac(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ac(e){return Rr()?e instanceof Node||e instanceof Te(e).Node:!1}function je(e){return Rr()?e instanceof Element||e instanceof Te(e).Element:!1}function He(e){return Rr()?e instanceof HTMLElement||e instanceof Te(e).HTMLElement:!1}function wi(e){return!Rr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Te(e).ShadowRoot}function En(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=$e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function jh(e){return["table","td","th"].includes(qt(e))}function Tr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function cs(e){const t=ls(),n=je(e)?$e(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 $h(e){let t=gt(e);for(;He(t)&&!Wt(t);){if(cs(t))return t;if(Tr(t))return null;t=gt(t)}return null}function ls(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wt(e){return["html","body","#document"].includes(qt(e))}function $e(e){return Te(e).getComputedStyle(e)}function Or(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||wi(e)&&e.host||Ve(e);return wi(t)?t.host:t}function cc(e){const t=gt(e);return Wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&En(t)?t:cc(t)}function vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Te(o);if(s){const a=ko(i);return t.concat(i,i.visualViewport||[],En(o)?o:[],a&&n?vn(a):[])}return t.concat(o,vn(o,[],n))}function ko(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lc(e){const t=$e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=He(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ur(n)!==s||ur(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function us(e){return je(e)?e:e.contextElement}function $t(e){const t=us(e);if(!He(t))return Be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=lc(t);let i=(s?ur(n.width):n.width)/r,a=(s?ur(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Lh=Be(0);function uc(e){const t=Te(e);return!ls()||!t.visualViewport?Lh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Te(e)?!1:t}function Dt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=us(e);let i=Be(1);t&&(r?je(r)&&(i=$t(r)):i=$t(e));const a=Fh(s,n,r)?uc(s):Be(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=Te(s),b=r&&je(r)?Te(r):r;let D=v,g=ko(D);for(;g&&r&&b!==D;){const S=$t(g),m=g.getBoundingClientRect(),f=$e(g),h=m.left+(g.clientLeft+parseFloat(f.paddingLeft))*S.x,C=m.top+(g.clientTop+parseFloat(f.paddingTop))*S.y;c*=S.x,l*=S.y,d*=S.x,u*=S.y,c+=h,l+=C,D=Te(g),g=ko(D)}}return fr({width:d,height:u,x:c,y:l})}function ds(e,t){const n=Or(e).scrollLeft;return t?t.left+n:Dt(Ve(e)).left+n}function dc(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 zh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ve(r),a=t?Tr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Be(1);const d=Be(0),u=He(r);if((u||!u&&!s)&&((qt(r)!=="body"||En(i))&&(c=Or(r)),He(r))){const b=Dt(r);l=$t(r),d.x=b.x+r.clientLeft,d.y=b.y+r.clientTop}const v=i&&!u&&!s?dc(i,c,!0):Be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+v.x,y:n.y*l.y-c.scrollTop*l.y+d.y+v.y}}function Wh(e){return Array.from(e.getClientRects())}function Bh(e){const t=Ve(e),n=Or(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 $e(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function Hh(e,t){const n=Te(e),r=Ve(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=ls();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function Vh(e,t){const n=Dt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=He(e)?$t(e):Be(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function xi(e,t,n){let r;if(t==="viewport")r=Hh(e,n);else if(t==="document")r=Bh(Ve(e));else if(je(t))r=Vh(t,n);else{const o=uc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fr(r)}function fc(e,t){const n=gt(e);return n===t||!je(n)||Wt(n)?!1:$e(n).position==="fixed"||fc(n,t)}function Yh(e,t){const n=t.get(e);if(n)return n;let r=vn(e,[],!1).filter(a=>je(a)&&qt(a)!=="body"),o=null;const s=$e(e).position==="fixed";let i=s?gt(e):e;for(;je(i)&&!Wt(i);){const a=$e(i),c=cs(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||En(i)&&!c&&fc(e,i))?r=r.filter(d=>d!==i):o=a,i=gt(i)}return t.set(e,r),r}function Uh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Tr(t)?[]:Yh(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const u=xi(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},xi(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Kh(e){const{width:t,height:n}=lc(e);return{width:t,height:n}}function Gh(e,t,n){const r=He(t),o=Ve(t),s=n==="fixed",i=Dt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Be(0);if(r||!r&&!s)if((qt(t)!=="body"||En(o))&&(a=Or(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=ds(o));const l=o&&!r&&!s?dc(o,a):Be(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 to(e){return $e(e).position==="static"}function Si(e,t){if(!He(e)||$e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function pc(e,t){const n=Te(e);if(Tr(e))return n;if(!He(e)){let o=gt(e);for(;o&&!Wt(o);){if(je(o)&&!to(o))return o;o=gt(o)}return n}let r=Si(e,t);for(;r&&jh(r)&&to(r);)r=Si(r,t);return r&&Wt(r)&&to(r)&&!cs(r)?n:r||$h(e)||n}const qh=async function(e){const t=this.getOffsetParent||pc,n=this.getDimensions,r=await n(e.floating);return{reference:Gh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xh(e){return $e(e).direction==="rtl"}const Zh={convertOffsetParentRelativeRectToViewportRelativeRect:zh,getDocumentElement:Ve,getClippingRect:Uh,getOffsetParent:pc,getElementRects:qh,getClientRects:Wh,getDimensions:Kh,getScale:$t,isElement:je,isRTL:Xh};function hc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jh(e,t){let n=null,r;const o=Ve(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:v,height:b}=l;if(a||t(),!v||!b)return;const D=Fn(u),g=Fn(o.clientWidth-(d+v)),S=Fn(o.clientHeight-(u+b)),m=Fn(d),h={rootMargin:-D+"px "+-g+"px "+-S+"px "+-m+"px",threshold:Re(0,pt(1,c))||1};let C=!0;function y(E){const w=E[0].intersectionRatio;if(w!==c){if(!C)return i();w?i(!1,w):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w===1&&!hc(l,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch{n=new IntersectionObserver(y,h)}n.observe(e)}return i(!0),s}function Qh(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?vn(l):[],...vn(t)]:[];d.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const u=l&&a?Jh(l,n):null;let v=-1,b=null;i&&(b=new ResizeObserver(m=>{let[f]=m;f&&f.target===l&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var h;(h=b)==null||h.observe(t)})),n()}),l&&!c&&b.observe(l),b.observe(t));let D,g=c?Dt(e):null;c&&S();function S(){const m=Dt(e);g&&!hc(g,m)&&n(),g=m,D=requestAnimationFrame(S)}return n(),()=>{var m;d.forEach(f=>{o&&f.removeEventListener("scroll",n),s&&f.removeEventListener("resize",n)}),u==null||u(),(m=b)==null||m.disconnect(),b=null,c&&cancelAnimationFrame(D)}}const eg=_h,tg=kh,ng=Oh,rg=Ih,og=Ph,Ci=Th,sg=Nh,ig=(e,t,n)=>{const r=new Map,o={platform:Zh,...n},s={...o.platform,_c:r};return Rh(e,t,{...o,platform:s})};var er=typeof document<"u"?M.useLayoutEffect:M.useEffect;function pr(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(!pr(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)&&!pr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function gc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Di(e,t){const n=gc(e);return Math.round(t*n)/n}function no(e){const t=x.useRef(e);return er(()=>{t.current=e}),t}function ag(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]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=x.useState(r);pr(v,r)||b(r);const[D,g]=x.useState(null),[S,m]=x.useState(null),f=x.useCallback(P=>{P!==E.current&&(E.current=P,g(P))},[]),h=x.useCallback(P=>{P!==w.current&&(w.current=P,m(P))},[]),C=s||D,y=i||S,E=x.useRef(null),w=x.useRef(null),R=x.useRef(d),A=c!=null,I=no(c),j=no(o),B=no(l),H=x.useCallback(()=>{if(!E.current||!w.current)return;const P={placement:t,strategy:n,middleware:v};j.current&&(P.platform=j.current),ig(E.current,w.current,P).then(k=>{const T={...k,isPositioned:B.current!==!1};N.current&&!pr(R.current,T)&&(R.current=T,yr.flushSync(()=>{u(T)}))})},[v,t,n,j,B]);er(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[l]);const N=x.useRef(!1);er(()=>(N.current=!0,()=>{N.current=!1}),[]),er(()=>{if(C&&(E.current=C),y&&(w.current=y),C&&y){if(I.current)return I.current(C,y,H);H()}},[C,y,H,I,A]);const _=x.useMemo(()=>({reference:E,floating:w,setReference:f,setFloating:h}),[f,h]),O=x.useMemo(()=>({reference:C,floating:y}),[C,y]),$=x.useMemo(()=>{const P={position:n,left:0,top:0};if(!O.floating)return P;const k=Di(O.floating,d.x),T=Di(O.floating,d.y);return a?{...P,transform:"translate("+k+"px, "+T+"px)",...gc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:T}},[n,a,O.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:H,refs:_,elements:O,floatingStyles:$}),[d,H,_,O,$])}const cg=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?Ci({element:r.current,padding:o}).fn(n):{}:r?Ci({element:r,padding:o}).fn(n):{}}}},lg=(e,t)=>({...eg(e),options:[e,t]}),ug=(e,t)=>({...tg(e),options:[e,t]}),dg=(e,t)=>({...sg(e),options:[e,t]}),fg=(e,t)=>({...ng(e),options:[e,t]}),pg=(e,t)=>({...rg(e),options:[e,t]}),hg=(e,t)=>({...og(e),options:[e,t]}),gg=(e,t)=>({...cg(e),options:[e,t]});var mg="Arrow",mc=x.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"})})});mc.displayName=mg;var vg=mc;function yg(e){const[t,n]=x.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",[vc,vt]=mt(fs),[bg,yc]=vc(fs),bc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return p.jsx(bg,{scope:t,anchor:r,onAnchorChange:o,children:n})};bc.displayName=fs;var wc="PopperAnchor",xc=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=yc(wc,n),i=x.useRef(null),a=le(t,i);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:p.jsx(se.div,{...o,ref:a})});xc.displayName=wc;var ps="PopperContent",[wg,xg]=vc(ps),Sc=x.forwardRef((e,t)=>{var W,G,q,z,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:v=!1,updatePositionStrategy:b="optimized",onPlaced:D,...g}=e,S=yc(ps,n),[m,f]=x.useState(null),h=le(t,re=>f(re)),[C,y]=x.useState(null),E=yg(C),w=(E==null?void 0:E.width)??0,R=(E==null?void 0:E.height)??0,A=r+(s!=="center"?"-"+s:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},j=Array.isArray(l)?l:[l],B=j.length>0,H={padding:I,boundary:j.filter(Cg),altBoundary:B},{refs:N,floatingStyles:_,placement:O,isPositioned:$,middlewareData:P}=ag({strategy:"fixed",placement:A,whileElementsMounted:(...re)=>Qh(...re,{animationFrame:b==="always"}),elements:{reference:S.anchor},middleware:[lg({mainAxis:o+R,alignmentAxis:i}),c&&ug({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?dg():void 0,...H}),c&&fg({...H}),pg({...H,apply:({elements:re,rects:de,availableWidth:Se,availableHeight:Ce})=>{const{width:Je,height:Nn}=de.reference,Qe=re.floating.style;Qe.setProperty("--radix-popper-available-width",`${Se}px`),Qe.setProperty("--radix-popper-available-height",`${Ce}px`),Qe.setProperty("--radix-popper-anchor-width",`${Je}px`),Qe.setProperty("--radix-popper-anchor-height",`${Nn}px`)}}),C&&gg({element:C,padding:a}),Dg({arrowWidth:w,arrowHeight:R}),v&&hg({strategy:"referenceHidden",...H})]}),[k,T]=Ec(O),L=ke(D);ye(()=>{$&&(L==null||L())},[$,L]);const V=(W=P.arrow)==null?void 0:W.x,U=(G=P.arrow)==null?void 0:G.y,Y=((q=P.arrow)==null?void 0:q.centerOffset)!==0,[Z,K]=x.useState();return ye(()=>{m&&K(window.getComputedStyle(m).zIndex)},[m]),p.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:$?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(z=P.transformOrigin)==null?void 0:z.x,(X=P.transformOrigin)==null?void 0:X.y].join(" "),...((F=P.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(wg,{scope:n,placedSide:k,onArrowChange:y,arrowX:V,arrowY:U,shouldHideArrow:Y,children:p.jsx(se.div,{"data-side":k,"data-align":T,...g,ref:h,style:{...g.style,animation:$?void 0:"none"}})})})});Sc.displayName=ps;var Cc="PopperArrow",Sg={top:"bottom",right:"left",bottom:"top",left:"right"},Dc=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=xg(Cc,r),i=Sg[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(vg,{...o,ref:n,style:{...o.style,display:"block"}})})});Dc.displayName=Cc;function Cg(e){return e!==null}var Dg=e=>({name:"transformOrigin",options:e,fn(t){var S,m,f;const{placement:n,rects:r,middlewareData:o}=t,i=((S=o.arrow)==null?void 0:S.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,d]=Ec(n),u={start:"0%",center:"50%",end:"100%"}[d],v=(((m=o.arrow)==null?void 0:m.x)??0)+a/2,b=(((f=o.arrow)==null?void 0:f.y)??0)+c/2;let D="",g="";return l==="bottom"?(D=i?u:`${v}px`,g=`${-c}px`):l==="top"?(D=i?u:`${v}px`,g=`${r.floating.height+c}px`):l==="right"?(D=`${-c}px`,g=i?u:`${b}px`):l==="left"&&(D=`${r.floating.width+c}px`,g=i?u:`${b}px`),{data:{x:D,y:g}}}});function Ec(e){const[t,n="center"]=e.split("-");return[t,n]}var Pr=bc,Mn=xc,Ar=Sc,_r=Dc,Eg="Portal",Rn=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=x.useState(!1);ye(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ue.createPortal(p.jsx(se.div,{...r,ref:t}),i):null});Rn.displayName=Eg;function Mg(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Ze=e=>{const{present:t,children:n}=e,r=Rg(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=le(r.ref,Tg(o));return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:s}):null};Ze.displayName="Presence";function Rg(e){const[t,n]=x.useState(),r=x.useRef({}),o=x.useRef(e),s=x.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Mg(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=zn(r.current);s.current=a==="mounted"?l:"none"},[a]),ye(()=>{const l=r.current,d=o.current;if(d!==e){const v=s.current,b=zn(l);e?c("MOUNT"):b==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&v!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ye(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=b=>{const g=zn(r.current).includes(b.animationName);if(b.target===t&&g&&(c("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(s.current=zn(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:x.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function zn(e){return(e==null?void 0:e.animationName)||"none"}function Tg(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]=Og({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=ke(n),c=x.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 Og({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),s=ke(t);return x.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Pg="VisuallyHidden",hs=x.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=Pg;var Ag=hs,[kr,Iw]=mt("Tooltip",[vt]),Nr=vt(),Mc="TooltipProvider",_g=700,No="tooltip.open",[kg,gs]=kr(Mc),Rc=e=>{const{__scopeTooltip:t,delayDuration:n=_g,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[i,a]=x.useState(!0),c=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),p.jsx(kg,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:x.useCallback(d=>{c.current=d},[]),disableHoverableContent:o,children:s})};Rc.displayName=Mc;var Ir="Tooltip",[Ng,Tn]=kr(Ir),Tc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=gs(Ir,e.__scopeTooltip),l=Nr(t),[d,u]=x.useState(null),v=ft(),b=x.useRef(0),D=i??c.disableHoverableContent,g=a??c.delayDuration,S=x.useRef(!1),[m=!1,f]=Et({prop:r,defaultProp:o,onChange:w=>{w?(c.onOpen(),document.dispatchEvent(new CustomEvent(No))):c.onClose(),s==null||s(w)}}),h=x.useMemo(()=>m?S.current?"delayed-open":"instant-open":"closed",[m]),C=x.useCallback(()=>{window.clearTimeout(b.current),b.current=0,S.current=!1,f(!0)},[f]),y=x.useCallback(()=>{window.clearTimeout(b.current),b.current=0,f(!1)},[f]),E=x.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{S.current=!0,f(!0),b.current=0},g)},[g,f]);return x.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),p.jsx(Pr,{...l,children:p.jsx(Ng,{scope:t,contentId:v,open:m,stateAttribute:h,trigger:d,onTriggerChange:u,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?E():C()},[c.isOpenDelayed,E,C]),onTriggerLeave:x.useCallback(()=>{D?y():(window.clearTimeout(b.current),b.current=0)},[y,D]),onOpen:C,onClose:y,disableHoverableContent:D,children:n})})};Tc.displayName=Ir;var Io="TooltipTrigger",Oc=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Tn(Io,n),s=gs(Io,n),i=Nr(n),a=x.useRef(null),c=le(t,a,o.onTriggerChange),l=x.useRef(!1),d=x.useRef(!1),u=x.useCallback(()=>l.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(Mn,{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,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,()=>{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)})})});Oc.displayName=Io;var ms="TooltipPortal",[Ig,jg]=kr(ms,{forceMount:void 0}),Pc=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Tn(ms,t);return p.jsx(Ig,{scope:t,forceMount:n,children:p.jsx(Ze,{present:n||s.open,children:p.jsx(Rn,{asChild:!0,container:o,children:r})})})};Pc.displayName=ms;var Bt="TooltipContent",Ac=x.forwardRef((e,t)=>{const n=jg(Bt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Tn(Bt,e.__scopeTooltip);return p.jsx(Ze,{present:r||i.open,children:i.disableHoverableContent?p.jsx(_c,{side:o,...s,ref:t}):p.jsx($g,{side:o,...s,ref:t})})}),$g=x.forwardRef((e,t)=>{const n=Tn(Bt,e.__scopeTooltip),r=gs(Bt,e.__scopeTooltip),o=x.useRef(null),s=le(t,o),[i,a]=x.useState(null),{trigger:c,onClose:l}=n,d=o.current,{onPointerInTransitChange:u}=r,v=x.useCallback(()=>{a(null),u(!1)},[u]),b=x.useCallback((D,g)=>{const S=D.currentTarget,m={x:D.clientX,y:D.clientY},f=Wg(m,S.getBoundingClientRect()),h=Bg(m,f),C=Hg(g.getBoundingClientRect()),y=Yg([...h,...C]);a(y),u(!0)},[u]);return x.useEffect(()=>()=>v(),[v]),x.useEffect(()=>{if(c&&d){const D=S=>b(S,d),g=S=>b(S,c);return c.addEventListener("pointerleave",D),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",D),d.removeEventListener("pointerleave",g)}}},[c,d,b,v]),x.useEffect(()=>{if(i){const D=g=>{const S=g.target,m={x:g.clientX,y:g.clientY},f=(c==null?void 0:c.contains(S))||(d==null?void 0:d.contains(S)),h=!Vg(m,i);f?v():h&&(v(),l())};return document.addEventListener("pointermove",D),()=>document.removeEventListener("pointermove",D)}},[c,d,i,l,v]),p.jsx(_c,{...e,ref:s})}),[Lg,Fg]=kr(Ir,{isInside:!1}),_c=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Tn(Bt,n),l=Nr(n),{onClose:d}=c;return x.useEffect(()=>(document.addEventListener(No,d),()=>document.removeEventListener(No,d)),[d]),x.useEffect(()=>{if(c.trigger){const u=v=>{const b=v.target;b!=null&&b.contains(c.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,d]),p.jsx(Dn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:p.jsxs(Ar,{"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(ec,{children:r}),p.jsx(Lg,{scope:n,isInside:!0,children:p.jsx(Ag,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Ac.displayName=Bt;var kc="TooltipArrow",zg=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Nr(n);return Fg(kc,n).isInside?null:p.jsx(_r,{...o,...r,ref:t})});zg.displayName=kc;function Wg(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 Bg(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 Hg(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 Vg(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 Yg(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),Ug(t)}function Ug(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 Kg=Rc,Gg=Tc,qg=Oc,Xg=Pc,Zg=Ac;function vs({delayDuration:e=0,...t}){return p.jsx(Kg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Nc({...e}){return p.jsx(vs,{children:p.jsx(Gg,{"data-slot":"tooltip",...e})})}function Ic({...e}){return p.jsx(qg,{"data-slot":"tooltip-trigger",...e})}function jc({className:e,sideOffset:t=0,children:n,...r}){return p.jsx(Xg,{children:p.jsx(Zg,{"data-slot":"tooltip-content",sideOffset:t,className:oe("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 Jg=({children:e,content:t})=>p.jsx(vs,{children:p.jsxs(Nc,{children:[p.jsx(Ic,{asChild:!0,children:e}),p.jsx(jc,{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=b=>{const{scope:D,children:g}=b,S=M.useRef(null),m=M.useRef(new Map).current;return p.jsx(o,{scope:D,itemMap:m,collectionRef:S,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=M.forwardRef((b,D)=>{const{scope:g,children:S}=b,m=s(a,g),f=le(D,m.collectionRef);return p.jsx(dt,{ref:f,children:S})});c.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",u=M.forwardRef((b,D)=>{const{scope:g,children:S,...m}=b,f=M.useRef(null),h=le(D,f),C=s(l,g);return M.useEffect(()=>(C.itemMap.set(f,{ref:f,...m}),()=>void C.itemMap.delete(f))),p.jsx(dt,{[d]:"",ref:h,children:S})});u.displayName=l;function v(b){const D=s(e+"CollectionConsumer",b);return M.useCallback(()=>{const S=D.collectionRef.current;if(!S)return[];const m=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(D.itemMap.values()).sort((C,y)=>m.indexOf(C.ref.current)-m.indexOf(y.ref.current))},[D.collectionRef,D.itemMap])}return[{Provider:i,Slot:c,ItemSlot:u},v,r]}var Qg=x.createContext(void 0);function bs(e){const t=x.useContext(Qg);return e||t||"ltr"}var ro=0;function ws(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ei()),document.body.insertAdjacentElement("beforeend",e[1]??Ei()),ro++,()=>{ro===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ro--}},[])}function Ei(){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 oo="focusScope.autoFocusOnMount",so="focusScope.autoFocusOnUnmount",Mi={bubbles:!1,cancelable:!0},em="FocusScope",jr=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=x.useState(null),l=ke(o),d=ke(s),u=x.useRef(null),v=le(t,g=>c(g)),b=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let g=function(h){if(b.paused||!a)return;const C=h.target;a.contains(C)?u.current=C:lt(u.current,{select:!0})},S=function(h){if(b.paused||!a)return;const C=h.relatedTarget;C!==null&&(a.contains(C)||lt(u.current,{select:!0}))},m=function(h){if(document.activeElement===document.body)for(const y of h)y.removedNodes.length>0&&lt(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",S);const f=new MutationObserver(m);return a&&f.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",S),f.disconnect()}}},[r,a,b.paused]),x.useEffect(()=>{if(a){Ti.add(b);const g=document.activeElement;if(!a.contains(g)){const m=new CustomEvent(oo,Mi);a.addEventListener(oo,l),a.dispatchEvent(m),m.defaultPrevented||(tm(im($c(a)),{select:!0}),document.activeElement===g&&lt(a))}return()=>{a.removeEventListener(oo,l),setTimeout(()=>{const m=new CustomEvent(so,Mi);a.addEventListener(so,d),a.dispatchEvent(m),m.defaultPrevented||lt(g??document.body,{select:!0}),a.removeEventListener(so,d),Ti.remove(b)},0)}}},[a,l,d,b]);const D=x.useCallback(g=>{if(!n&&!r||b.paused)return;const S=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,m=document.activeElement;if(S&&m){const f=g.currentTarget,[h,C]=nm(f);h&&C?!g.shiftKey&&m===C?(g.preventDefault(),n&&lt(h,{select:!0})):g.shiftKey&&m===h&&(g.preventDefault(),n&&lt(C,{select:!0})):m===f&&g.preventDefault()}},[n,r,b.paused]);return p.jsx(se.div,{tabIndex:-1,...i,ref:v,onKeyDown:D})});jr.displayName=em;function tm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lt(r,{select:t}),document.activeElement!==n)return}function nm(e){const t=$c(e),n=Ri(t,e),r=Ri(t.reverse(),e);return[n,r]}function $c(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 Ri(e,t){for(const n of e)if(!rm(n,{upTo:t}))return n}function rm(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 om(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&&om(e)&&t&&e.select()}}var Ti=sm();function sm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Oi(e,t),e.unshift(t)},remove(t){var n;e=Oi(e,t),(n=e[0])==null||n.resume()}}}function Oi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function im(e){return e.filter(t=>t.tagName!=="A")}var io="rovingFocusGroup.onEntryFocus",am={bubbles:!1,cancelable:!0},$r="RovingFocusGroup",[jo,Lc,cm]=ys($r),[lm,Fc]=mt($r,[cm]),[um,dm]=lm($r),zc=x.forwardRef((e,t)=>p.jsx(jo.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(jo.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(fm,{...e,ref:t})})}));zc.displayName=$r;var fm=x.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=x.useRef(null),b=le(t,v),D=bs(s),[g=null,S]=Et({prop:i,defaultProp:a,onChange:c}),[m,f]=x.useState(!1),h=ke(l),C=Lc(n),y=x.useRef(!1),[E,w]=x.useState(0);return x.useEffect(()=>{const R=v.current;if(R)return R.addEventListener(io,h),()=>R.removeEventListener(io,h)},[h]),p.jsx(um,{scope:n,orientation:r,dir:D,loop:o,currentTabStopId:g,onItemFocus:x.useCallback(R=>S(R),[S]),onItemShiftTab:x.useCallback(()=>f(!0),[]),onFocusableItemAdd:x.useCallback(()=>w(R=>R+1),[]),onFocusableItemRemove:x.useCallback(()=>w(R=>R-1),[]),children:p.jsx(se.div,{tabIndex:m||E===0?-1:0,"data-orientation":r,...u,ref:b,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{y.current=!0}),onFocus:ee(e.onFocus,R=>{const A=!y.current;if(R.target===R.currentTarget&&A&&!m){const I=new CustomEvent(io,am);if(R.currentTarget.dispatchEvent(I),!I.defaultPrevented){const j=C().filter(O=>O.focusable),B=j.find(O=>O.active),H=j.find(O=>O.id===g),_=[B,H,...j].filter(Boolean).map(O=>O.ref.current);Hc(_,d)}}y.current=!1}),onBlur:ee(e.onBlur,()=>f(!1))})})}),Wc="RovingFocusGroupItem",Bc=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=ft(),c=s||a,l=dm(Wc,n),d=l.currentTabStopId===c,u=Lc(n),{onFocusableItemAdd:v,onFocusableItemRemove:b}=l;return x.useEffect(()=>{if(r)return v(),()=>b()},[r,v,b]),p.jsx(jo.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,D=>{r?l.onItemFocus(c):D.preventDefault()}),onFocus:ee(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:ee(e.onKeyDown,D=>{if(D.key==="Tab"&&D.shiftKey){l.onItemShiftTab();return}if(D.target!==D.currentTarget)return;const g=gm(D,l.orientation,l.dir);if(g!==void 0){if(D.metaKey||D.ctrlKey||D.altKey||D.shiftKey)return;D.preventDefault();let m=u().filter(f=>f.focusable).map(f=>f.ref.current);if(g==="last")m.reverse();else if(g==="prev"||g==="next"){g==="prev"&&m.reverse();const f=m.indexOf(D.currentTarget);m=l.loop?mm(m,f+1):m.slice(f+1)}setTimeout(()=>Hc(m))}})})})});Bc.displayName=Wc;var pm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gm(e,t,n){const r=hm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return pm[r]}function Hc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function mm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vm=zc,ym=Bc,bm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kt=new WeakMap,Wn=new WeakMap,Bn={},ao=0,Vc=function(e){return e&&(e.host||Vc(e.parentNode))},wm=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Vc(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})},xm=function(e,t,n,r){var o=wm(t,Array.isArray(e)?e:[e]);Bn[n]||(Bn[n]=new WeakMap);var s=Bn[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 b=v.getAttribute(r),D=b!==null&&b!=="false",g=(kt.get(v)||0)+1,S=(s.get(v)||0)+1;kt.set(v,g),s.set(v,S),i.push(v),g===1&&D&&Wn.set(v,!0),S===1&&v.setAttribute(n,"true"),D||v.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",v,m)}})};return d(t),a.clear(),ao++,function(){i.forEach(function(u){var v=kt.get(u)-1,b=s.get(u)-1;kt.set(u,v),s.set(u,b),v||(Wn.has(u)||u.removeAttribute(r),Wn.delete(u)),b||u.removeAttribute(n)}),ao--,ao||(kt=new WeakMap,kt=new WeakMap,Wn=new WeakMap,Bn={})}},xs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=bm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),xm(r,o,n,"aria-hidden")):function(){return null}},We=function(){return We=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},We.apply(this,arguments)};function Yc(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 Sm(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 tr="right-scroll-bar-position",nr="width-before-scroll-bar",Cm="with-scroll-bars-hidden",Dm="--removed-body-scroll-bar-size";function co(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Em(e,t){var n=M.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 Mm=typeof window<"u"?x.useLayoutEffect:x.useEffect,Pi=new WeakMap;function Rm(e,t){var n=Em(null,function(r){return e.forEach(function(o){return co(o,r)})});return Mm(function(){var r=Pi.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||co(a,null)}),s.forEach(function(a){o.has(a)||co(a,i)})}Pi.set(n,e)},[e]),n}function Tm(e){return e}function Om(e,t){t===void 0&&(t=Tm);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 Pm(e){e===void 0&&(e={});var t=Om(null);return t.options=We({async:!0,ssr:!1},e),t}var Uc=function(e){var t=e.sideCar,n=Yc(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 x.createElement(r,We({},n))};Uc.isSideCarExport=!0;function Am(e,t){return e.useMedium(t),Uc}var Kc=Pm(),lo=function(){},Lr=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:lo,onWheelCapture:lo,onTouchMoveCapture:lo}),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,b=e.noIsolation,D=e.inert,g=e.allowPinchZoom,S=e.as,m=S===void 0?"div":S,f=e.gapMode,h=Yc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,y=Rm([n,t]),E=We(We({},h),o);return x.createElement(x.Fragment,null,d&&x.createElement(C,{sideCar:Kc,removeScrollBar:l,shards:u,noIsolation:b,inert:D,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:f}),i?x.cloneElement(x.Children.only(a),We(We({},E),{ref:y})):x.createElement(m,We({},E,{className:c,ref:y}),a))});Lr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lr.classNames={fullWidth:nr,zeroRight:tr};var _m=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function km(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_m();return t&&e.setAttribute("nonce",t),e}function Nm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Im(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=km())&&(Nm(t,n),Im(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$m=function(){var e=jm();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gc=function(){var e=$m(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Lm={left:0,top:0,right:0,gap:0},uo=function(e){return parseInt(e||"",10)||0},Fm=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[uo(n),uo(r),uo(o)]},zm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Lm;var t=Fm(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])}},Wm=Gc(),Lt="data-scroll-locked",Bm=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(Cm,` {
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,` {
102
102
  overflow: hidden `).concat(r,`;
103
103
  padding-right: `).concat(a,"px ").concat(r,`;
104
104
  }
105
- body[`).concat(Lt,`] {
105
+ body[`).concat($t,`] {
106
106
  overflow: hidden `).concat(r,`;
107
107
  overscroll-behavior: contain;
108
108
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -115,47 +115,47 @@
115
115
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
116
116
  }
117
117
 
118
- .`).concat(tr,` {
118
+ .`).concat(sr,` {
119
119
  right: `).concat(a,"px ").concat(r,`;
120
120
  }
121
121
 
122
- .`).concat(nr,` {
122
+ .`).concat(ir,` {
123
123
  margin-right: `).concat(a,"px ").concat(r,`;
124
124
  }
125
125
 
126
- .`).concat(tr," .").concat(tr,` {
126
+ .`).concat(sr," .").concat(sr,` {
127
127
  right: 0 `).concat(r,`;
128
128
  }
129
129
 
130
- .`).concat(nr," .").concat(nr,` {
130
+ .`).concat(ir," .").concat(ir,` {
131
131
  margin-right: 0 `).concat(r,`;
132
132
  }
133
133
 
134
- body[`).concat(Lt,`] {
135
- `).concat(Dm,": ").concat(a,`px;
134
+ body[`).concat($t,`] {
135
+ `).concat(Am,": ").concat(a,`px;
136
136
  }
137
- `)},Ai=function(){var e=parseInt(document.body.getAttribute(Lt)||"0",10);return isFinite(e)?e:0},Hm=function(){x.useEffect(function(){return document.body.setAttribute(Lt,(Ai()+1).toString()),function(){var e=Ai()-1;e<=0?document.body.removeAttribute(Lt):document.body.setAttribute(Lt,e.toString())}},[])},Vm=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Hm();var s=x.useMemo(function(){return zm(o)},[o]);return x.createElement(Wm,{styles:Bm(s,!t,o,n?"":"!important")})},$o=!1;if(typeof window<"u")try{var Hn=Object.defineProperty({},"passive",{get:function(){return $o=!0,!0}});window.addEventListener("test",Hn,Hn),window.removeEventListener("test",Hn,Hn)}catch{$o=!1}var Nt=$o?{passive:!1}:!1,Ym=function(e){return e.tagName==="TEXTAREA"},qc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ym(e)&&n[t]==="visible")},Um=function(e){return qc(e,"overflowY")},Km=function(e){return qc(e,"overflowX")},_i=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xc(e,r);if(o){var s=Zc(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gm=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},qm=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xc=function(e,t){return e==="v"?Um(t):Km(t)},Zc=function(e,t){return e==="v"?Gm(t):qm(t)},Xm=function(e,t){return e==="h"&&t==="rtl"?-1:1},Zm=function(e,t,n,r,o){var s=Xm(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 b=Zc(e,a),D=b[0],g=b[1],S=b[2],m=g-S-s*D;(D||m)&&Xc(e,a)&&(u+=m,v+=D),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},Vn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ki=function(e){return[e.deltaX,e.deltaY]},Ni=function(e){return e&&"current"in e?e.current:e},Jm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qm=function(e){return`
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`
138
138
  .block-interactivity-`.concat(e,` {pointer-events: none;}
139
139
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
140
- `)},ev=0,It=[];function tv(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(ev++)[0],s=x.useState(Gc)[0],i=x.useRef(e);x.useEffect(function(){i.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Sm([e.lockRef.current],(e.shards||[]).map(Ni),!0).filter(Boolean);return g.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=x.useCallback(function(g,S){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var m=Vn(g),f=n.current,h="deltaX"in g?g.deltaX:f[0]-m[0],C="deltaY"in g?g.deltaY:f[1]-m[1],y,E=g.target,w=Math.abs(h)>Math.abs(C)?"h":"v";if("touches"in g&&w==="h"&&E.type==="range")return!1;var R=_i(w,E);if(!R)return!0;if(R?y=w:(y=w==="v"?"h":"v",R=_i(w,E)),!R)return!1;if(!r.current&&"changedTouches"in g&&(h||C)&&(r.current=y),!y)return!0;var A=r.current||y;return Zm(A,S,g,A==="h"?h:C)},[]),c=x.useCallback(function(g){var S=g;if(!(!It.length||It[It.length-1]!==s)){var m="deltaY"in S?ki(S):Vn(S),f=t.current.filter(function(y){return y.name===S.type&&(y.target===S.target||S.target===y.shadowParent)&&Jm(y.delta,m)})[0];if(f&&f.should){S.cancelable&&S.preventDefault();return}if(!f){var h=(i.current.shards||[]).map(Ni).filter(Boolean).filter(function(y){return y.contains(S.target)}),C=h.length>0?a(S,h[0]):!i.current.noIsolation;C&&S.cancelable&&S.preventDefault()}}},[]),l=x.useCallback(function(g,S,m,f){var h={name:g,delta:S,target:m,should:f,shadowParent:nv(m)};t.current.push(h),setTimeout(function(){t.current=t.current.filter(function(C){return C!==h})},1)},[]),d=x.useCallback(function(g){n.current=Vn(g),r.current=void 0},[]),u=x.useCallback(function(g){l(g.type,ki(g),g.target,a(g,e.lockRef.current))},[]),v=x.useCallback(function(g){l(g.type,Vn(g),g.target,a(g,e.lockRef.current))},[]);x.useEffect(function(){return It.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Nt),document.addEventListener("touchmove",c,Nt),document.addEventListener("touchstart",d,Nt),function(){It=It.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,Nt),document.removeEventListener("touchmove",c,Nt),document.removeEventListener("touchstart",d,Nt)}},[]);var b=e.removeScrollBar,D=e.inert;return x.createElement(x.Fragment,null,D?x.createElement(s,{styles:Qm(o)}):null,b?x.createElement(Vm,{gapMode:e.gapMode}):null)}function nv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rv=Am(Kc,tv);var Fr=x.forwardRef(function(e,t){return x.createElement(Lr,We({},e,{ref:t,sideCar:rv}))});Fr.classNames=Lr.classNames;var Lo=["Enter"," "],ov=["ArrowDown","PageUp","Home"],Jc=["ArrowUp","PageDown","End"],sv=[...ov,...Jc],iv={ltr:[...Lo,"ArrowRight"],rtl:[...Lo,"ArrowLeft"]},av={ltr:["ArrowLeft"],rtl:["ArrowRight"]},On="Menu",[yn,cv,lv]=ys(On),[Rt,Qc]=mt(On,[lv,vt,Fc]),zr=vt(),el=Fc(),[uv,Tt]=Rt(On),[dv,Pn]=Rt(On),tl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=zr(t),[c,l]=x.useState(null),d=x.useRef(!1),u=ke(s),v=bs(o);return x.useEffect(()=>{const b=()=>{d.current=!0,document.addEventListener("pointerdown",D,{capture:!0,once:!0}),document.addEventListener("pointermove",D,{capture:!0,once:!0})},D=()=>d.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",D,{capture:!0}),document.removeEventListener("pointermove",D,{capture:!0})}},[]),p.jsx(Pr,{...a,children:p.jsx(uv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:p.jsx(dv,{scope:t,onClose:x.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:v,modal:i,children:r})})})};tl.displayName=On;var fv="MenuAnchor",Ss=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=zr(n);return p.jsx(Mn,{...o,...r,ref:t})});Ss.displayName=fv;var Cs="MenuPortal",[pv,nl]=Rt(Cs,{forceMount:void 0}),rl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Tt(Cs,t);return p.jsx(pv,{scope:t,forceMount:n,children:p.jsx(Ze,{present:n||s.open,children:p.jsx(Rn,{asChild:!0,container:o,children:r})})})};rl.displayName=Cs;var _e="MenuContent",[hv,Ds]=Rt(_e),ol=x.forwardRef((e,t)=>{const n=nl(_e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Tt(_e,e.__scopeMenu),i=Pn(_e,e.__scopeMenu);return p.jsx(yn.Provider,{scope:e.__scopeMenu,children:p.jsx(Ze,{present:r||s.open,children:p.jsx(yn.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(gv,{...o,ref:t}):p.jsx(mv,{...o,ref:t})})})})}),gv=x.forwardRef((e,t)=>{const n=Tt(_e,e.__scopeMenu),r=x.useRef(null),o=le(t,r);return x.useEffect(()=>{const s=r.current;if(s)return xs(s)},[]),p.jsx(Es,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),mv=x.forwardRef((e,t)=>{const n=Tt(_e,e.__scopeMenu);return p.jsx(Es,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Es=x.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:b,disableOutsideScroll:D,...g}=e,S=Tt(_e,n),m=Pn(_e,n),f=zr(n),h=el(n),C=cv(n),[y,E]=x.useState(null),w=x.useRef(null),R=le(t,w,S.onContentChange),A=x.useRef(0),I=x.useRef(""),j=x.useRef(0),B=x.useRef(null),H=x.useRef("right"),N=x.useRef(0),_=D?Fr:x.Fragment,O=D?{as:dt,allowPinchZoom:!0}:void 0,$=k=>{var W,G;const T=I.current+k,L=C().filter(q=>!q.disabled),V=document.activeElement,U=(W=L.find(q=>q.ref.current===V))==null?void 0:W.textValue,Y=L.map(q=>q.textValue),Z=Tv(Y,T,U),K=(G=L.find(q=>q.textValue===Z))==null?void 0:G.ref.current;(function q(z){I.current=z,window.clearTimeout(A.current),z!==""&&(A.current=window.setTimeout(()=>q(""),1e3))})(T),K&&setTimeout(()=>K.focus())};x.useEffect(()=>()=>window.clearTimeout(A.current),[]),ws();const P=x.useCallback(k=>{var L,V;return H.current===((L=B.current)==null?void 0:L.side)&&Pv(k,(V=B.current)==null?void 0:V.area)},[]);return p.jsx(hv,{scope:n,searchRef:I,onItemEnter:x.useCallback(k=>{P(k)&&k.preventDefault()},[P]),onItemLeave:x.useCallback(k=>{var T;P(k)||((T=w.current)==null||T.focus(),E(null))},[P]),onTriggerLeave:x.useCallback(k=>{P(k)&&k.preventDefault()},[P]),pointerGraceTimerRef:j,onPointerGraceIntentChange:x.useCallback(k=>{B.current=k},[]),children:p.jsx(_,{...O,children:p.jsx(jr,{asChild:!0,trapped:o,onMountAutoFocus:ee(s,k=>{var T;k.preventDefault(),(T=w.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(Dn,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:v,onDismiss:b,children:p.jsx(vm,{asChild:!0,...h,dir:m.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:E,onEntryFocus:ee(c,k=>{m.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Ar,{role:"menu","aria-orientation":"vertical","data-state":wl(S.open),"data-radix-menu-content":"",dir:m.dir,...f,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:ee(g.onKeyDown,k=>{const L=k.target.closest("[data-radix-menu-content]")===k.currentTarget,V=k.ctrlKey||k.altKey||k.metaKey,U=k.key.length===1;L&&(k.key==="Tab"&&k.preventDefault(),!V&&U&&$(k.key));const Y=w.current;if(k.target!==Y||!sv.includes(k.key))return;k.preventDefault();const K=C().filter(W=>!W.disabled).map(W=>W.ref.current);Jc.includes(k.key)&&K.reverse(),Mv(K)}),onBlur:ee(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(A.current),I.current="")}),onPointerMove:ee(e.onPointerMove,bn(k=>{const T=k.target,L=N.current!==k.clientX;if(k.currentTarget.contains(T)&&L){const V=k.clientX>N.current?"right":"left";H.current=V,N.current=k.clientX}}))})})})})})})});ol.displayName=_e;var vv="MenuGroup",Ms=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{role:"group",...r,ref:t})});Ms.displayName=vv;var yv="MenuLabel",sl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{...r,ref:t})});sl.displayName=yv;var hr="MenuItem",Ii="menu.itemSelect",Wr=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=x.useRef(null),i=Pn(hr,e.__scopeMenu),a=Ds(hr,e.__scopeMenu),c=le(t,s),l=x.useRef(!1),d=()=>{const u=s.current;if(!n&&u){const v=new CustomEvent(Ii,{bubbles:!0,cancelable:!0});u.addEventListener(Ii,b=>r==null?void 0:r(b),{once:!0}),rc(u,v),v.defaultPrevented?l.current=!1:i.onClose()}};return p.jsx(il,{...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===" "||Lo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Wr.displayName=hr;var il=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Ds(hr,n),a=el(n),c=x.useRef(null),l=le(t,c),[d,u]=x.useState(!1),[v,b]=x.useState("");return x.useEffect(()=>{const D=c.current;D&&b((D.textContent??"").trim())},[s.children]),p.jsx(yn.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:p.jsx(ym,{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,bn(D=>{r?i.onItemLeave(D):(i.onItemEnter(D),D.defaultPrevented||D.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,bn(D=>i.onItemLeave(D))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),bv="MenuCheckboxItem",al=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(fl,{scope:e.__scopeMenu,checked:n,children:p.jsx(Wr,{role:"menuitemcheckbox","aria-checked":gr(n)?"mixed":n,...o,ref:t,"data-state":Ts(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(gr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});al.displayName=bv;var cl="MenuRadioGroup",[wv,xv]=Rt(cl,{value:void 0,onValueChange:()=>{}}),ll=x.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ke(r);return p.jsx(wv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Ms,{...o,ref:t})})});ll.displayName=cl;var ul="MenuRadioItem",dl=x.forwardRef((e,t)=>{const{value:n,...r}=e,o=xv(ul,e.__scopeMenu),s=n===o.value;return p.jsx(fl,{scope:e.__scopeMenu,checked:s,children:p.jsx(Wr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ts(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});dl.displayName=ul;var Rs="MenuItemIndicator",[fl,Sv]=Rt(Rs,{checked:!1}),pl=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Sv(Rs,n);return p.jsx(Ze,{present:r||gr(s.checked)||s.checked===!0,children:p.jsx(se.span,{...o,ref:t,"data-state":Ts(s.checked)})})});pl.displayName=Rs;var Cv="MenuSeparator",hl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});hl.displayName=Cv;var Dv="MenuArrow",gl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=zr(n);return p.jsx(_r,{...o,...r,ref:t})});gl.displayName=Dv;var Ev="MenuSub",[jw,ml]=Rt(Ev),cn="MenuSubTrigger",vl=x.forwardRef((e,t)=>{const n=Tt(cn,e.__scopeMenu),r=Pn(cn,e.__scopeMenu),o=ml(cn,e.__scopeMenu),s=Ds(cn,e.__scopeMenu),i=x.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},d=x.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return x.useEffect(()=>d,[d]),x.useEffect(()=>{const u=a.current;return()=>{window.clearTimeout(u),c(null)}},[a,c]),p.jsx(Ss,{asChild:!0,...l,children:p.jsx(il,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":wl(n.open),...e,ref:Mr(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,bn(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,bn(u=>{var b,D;d();const v=(b=n.content)==null?void 0:b.getBoundingClientRect();if(v){const g=(D=n.content)==null?void 0:D.dataset.side,S=g==="right",m=S?-5:5,f=v[S?"left":"right"],h=v[S?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+m,y:u.clientY},{x:f,y:v.top},{x:h,y:v.top},{x:h,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 b;const v=s.searchRef.current!=="";e.disabled||v&&u.key===" "||iv[r.dir].includes(u.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),u.preventDefault())})})})});vl.displayName=cn;var yl="MenuSubContent",bl=x.forwardRef((e,t)=>{const n=nl(_e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Tt(_e,e.__scopeMenu),i=Pn(_e,e.__scopeMenu),a=ml(yl,e.__scopeMenu),c=x.useRef(null),l=le(t,c);return p.jsx(yn.Provider,{scope:e.__scopeMenu,children:p.jsx(Ze,{present:r||s.open,children:p.jsx(yn.Slot,{scope:e.__scopeMenu,children:p.jsx(Es,{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 b;const u=d.currentTarget.contains(d.target),v=av[i.dir].includes(d.key);u&&v&&(s.onOpenChange(!1),(b=a.trigger)==null||b.focus(),d.preventDefault())})})})})})});bl.displayName=yl;function wl(e){return e?"open":"closed"}function gr(e){return e==="indeterminate"}function Ts(e){return gr(e)?"indeterminate":e?"checked":"unchecked"}function Mv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Rv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Tv(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=Rv(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 Ov(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 Pv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ov(n,t)}function bn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Av=tl,_v=Ss,kv=rl,Nv=ol,Iv=Ms,jv=sl,$v=Wr,Lv=al,Fv=ll,zv=dl,Wv=pl,Bv=hl,Hv=gl,Vv=vl,Yv=bl,Os="DropdownMenu",[Uv,$w]=mt(Os,[Qc]),xe=Qc(),[Kv,xl]=Uv(Os),Sl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=xe(t),l=x.useRef(null),[d=!1,u]=Et({prop:o,defaultProp:s,onChange:i});return p.jsx(Kv,{scope:t,triggerId:ft(),triggerRef:l,contentId:ft(),open:d,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(v=>!v),[u]),modal:a,children:p.jsx(Av,{...c,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Sl.displayName=Os;var Cl="DropdownMenuTrigger",Dl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=xl(Cl,n),i=xe(n);return p.jsx(_v,{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())})})})});Dl.displayName=Cl;var Gv="DropdownMenuPortal",El=e=>{const{__scopeDropdownMenu:t,...n}=e,r=xe(t);return p.jsx(kv,{...r,...n})};El.displayName=Gv;var Ml="DropdownMenuContent",Rl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xl(Ml,n),s=xe(n),i=x.useRef(!1);return p.jsx(Nv,{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)"}})});Rl.displayName=Ml;var qv="DropdownMenuGroup",Xv=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Iv,{...o,...r,ref:t})});Xv.displayName=qv;var Zv="DropdownMenuLabel",Tl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(jv,{...o,...r,ref:t})});Tl.displayName=Zv;var Jv="DropdownMenuItem",Ol=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx($v,{...o,...r,ref:t})});Ol.displayName=Jv;var Qv="DropdownMenuCheckboxItem",Pl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Lv,{...o,...r,ref:t})});Pl.displayName=Qv;var ey="DropdownMenuRadioGroup",ty=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Fv,{...o,...r,ref:t})});ty.displayName=ey;var ny="DropdownMenuRadioItem",ry=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(zv,{...o,...r,ref:t})});ry.displayName=ny;var oy="DropdownMenuItemIndicator",Al=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Wv,{...o,...r,ref:t})});Al.displayName=oy;var sy="DropdownMenuSeparator",_l=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Bv,{...o,...r,ref:t})});_l.displayName=sy;var iy="DropdownMenuArrow",ay=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Hv,{...o,...r,ref:t})});ay.displayName=iy;var cy="DropdownMenuSubTrigger",ly=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Vv,{...o,...r,ref:t})});ly.displayName=cy;var uy="DropdownMenuSubContent",dy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Yv,{...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)"}})});dy.displayName=uy;var fy=Sl,py=Dl,hy=El,gy=Rl,my=Tl,vy=Ol,yy=Pl,by=Al,wy=_l;function Ps({...e}){return p.jsx(fy,{"data-slot":"dropdown-menu",...e})}function As({...e}){return p.jsx(py,{"data-slot":"dropdown-menu-trigger",...e})}function _s({className:e,sideOffset:t=4,...n}){return p.jsx(hy,{children:p.jsx(gy,{"data-slot":"dropdown-menu-content",sideOffset:t,className:oe("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 ji({className:e,inset:t,variant:n="default",...r}){return p.jsx(vy,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:oe("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 xy({className:e,children:t,checked:n,...r}){return p.jsxs(yy,{"data-slot":"dropdown-menu-checkbox-item",className:oe("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(by,{children:p.jsx(Ja,{className:"size-4"})})}),t]})}function Sy({className:e,inset:t,...n}){return p.jsx(my,{"data-slot":"dropdown-menu-label","data-inset":t,className:oe("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Cy({className:e,...t}){return p.jsx(wy,{"data-slot":"dropdown-menu-separator",className:oe("bg-border -mx-1 my-1 h-px",e),...t})}const Dy={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},Ey=({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]})}),My={[ce.DAY]:p.jsx(Up,{size:"20px"}),[ce.WEEK]:p.jsx(Vp,{size:"20px"}),[ce.TABLE]:p.jsx(Np,{size:"20px"}),[ce.MONTH]:p.jsx(Gp,{size:"20px"})},$i=()=>{const{bookingViewType:e}=Oe(),{onViewTypeChange:t}=Nf(),{resetNodes:n,resetSelectedNode:r}=zt(),{viewModes:o,onChangeViewType:s}=Ct(),[i,a]=M.useState(ce.WEEK),c=M.useCallback(v=>v===e?"custom":"outline",[e]),l=M.useCallback(v=>{v!==i&&(n(),r(),s(v),a(v),t(v))},[t,i,n,r,s]),d=M.useMemo(()=>o.map(v=>({variant:c(v),icon:My[v],events:b=>l(b),label:v})),[o,l,c]),u=M.useMemo(()=>{const v=d.find(b=>b.label===i);if(v)return v.icon},[i,d]);return p.jsxs(Ps,{children:[p.jsx(As,{children:p.jsx(Ft,{variant:"ghost",className:"w-8 h-8",asChild:!0,children:p.jsx(Jg,{content:"Calendar Modes",children:u||p.jsx(_p,{color:"gray",className:"w-full h-full"})})})}),p.jsx(_s,{className:"z-100",children:d.map(v=>p.jsxs(xy,{checked:v.label===i,onCheckedChange:()=>v.events(v.label),className:"flex flex-row justify-between gap-6",children:[p.jsxs("div",{className:"flex flex-row gap-4",children:[v.icon,p.jsx("div",{children:Dy.capitalize(v.label)})]}),p.jsx(Ey,{code:"o"})]},v.label))})]})},Ry=566,Ty=()=>{const{todayWeek:e}=Oe(),{fullYear:t,monthMessage:n,updateMonthMessage:r}=ns(c=>c),[o,s]=M.useState(!1),i=c=>{r({month:c.getMonth(),fullYear:c.getFullYear(),monthMessage:Ge[c.getMonth()]})};M.useEffect(()=>{const{lastDayOfWeek:c,firstDayOfWeek:l}=e(),d=l.getMonth(),u=d!==c.getMonth()?te.shortMonthDescription(l,c):Ge[d];r({monthMessage:u})},[e,r]),M.useEffect(()=>{const c=()=>{if(typeof window>"u")return!1;window.innerWidth<=Ry?s(!0):s(!1)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);const a=p.jsxs("div",{className:"header_actions",children:[p.jsx(Oy,{updateMonthMessage:r,updateDateInfo:i}),p.jsx(Py,{updateMonthMessage:r,updateDateInfo:i,mobileLayout:o})]});return p.jsx(p.Fragment,{children:o?p.jsxs("div",{className:"headerCalendar_mobile",children:[p.jsx("div",{className:"headerCalendar_mobile_month",children:p.jsxs("span",{className:"headerCalendar_mobile_month_span",children:[n," ",t]})}),p.jsxs("div",{className:"headerCalendar_mobile_actions",children:[a,p.jsx($i,{})]})]}):p.jsxs("div",{className:"headerCalendar",children:[p.jsx("div",{className:"headerCalendar_actions",children:a}),p.jsx("div",{className:"headerCalendar_month",children:p.jsxs("span",{className:"headerCalendar_month_span",children:[n," ",t]})}),p.jsx($i,{})]})})},Oy=({updateMonthMessage:e,updateDateInfo:t})=>{const{nextWeek:n,previousWeek:r,bookingViewType:o,setDays:s}=Oe(),i=zt(m=>m.resetSelectedNode),a=zt(m=>m.resetNodes),{onDayChange:c}=Ct(),l=()=>s(1),d=()=>s(-1),u=m=>m==="next"?n():r(),v=m=>m==="next"?l():d(),b=(...m)=>{const f=te.shortMonthDescription(m[0],m[1]);e({monthMessage:f})},D=m=>{m.length&&t(m[0])},g=(m,f)=>{const h=m.getMonth(),C=f.getMonth();if(t(f),h!==C)return b(m,f)},S=m=>{switch(a(),i(),o){case ce.TABLE:case ce.DAY:{const f=v(m);c(f,m),D(f);break}case ce.WEEK:{const{firstDayOfWeek:f,lastDayOfWeek:h}=u(m);c([f,h],m),g(f,h);break}}};return p.jsxs("div",{className:"header_day_actions",children:[p.jsx(Ft,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>S("previous"),children:p.jsx(Lp,{className:"header_day_actions_button_icon"})}),p.jsx(Ft,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>S("next"),children:p.jsx(zp,{className:"header_day_actions_button_icon"})})]})},Py=({updateMonthMessage:e,updateDateInfo:t,mobileLayout:n})=>{const{todayWeek:r,bookingViewType:o,setTodayDay:s}=Oe(),{onTodayClick:i}=Ct(),a=()=>{const c=new Date;switch(i(c),o){case ce.TABLE:case ce.DAY:{s(c),t(c);break}default:{const{lastDayOfWeek:l,firstDayOfWeek:d}=r(),u=d.getMonth(),v=u!==l.getMonth()?te.shortMonthDescription(d,l):Ge[u];e({monthMessage:v});break}}};return p.jsxs(Ft,{variant:n?"ghost":"outline",onClick:a,children:[p.jsx(Jp,{style:{paddingTop:"0.8px"}}),!n&&"Today"]})},Fo=({booking:e,slotData:t})=>{const{day:n,hour:r}=t,o=i=>i<="11:30",s=(i,a)=>{const c=te.dateAndHourDateToString(new Date(i.finishAt));return te.isTodayDate(a)&&o(c)?{backgroundColor:"#000000c0"}:{backgroundColor:"#000456c0"}};return p.jsx("div",{className:"relative w-full h-full",style:s(e,new Date(n.split(":")[1])),children:p.jsxs("div",{className:oe("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"})]})},`${n}-${r}`)};var tn={exports:{}},nn={},rn={exports:{}},fo={},Yn={exports:{}},Un={exports:{}},ie={};/** @license React v16.13.1
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
141
141
  * react-is.production.min.js
142
142
  *
143
143
  * Copyright (c) Facebook, Inc. and its affiliates.
144
144
  *
145
145
  * This source code is licensed under the MIT license found in the
146
146
  * LICENSE file in the root directory of this source tree.
147
- */var Li;function Ay(){if(Li)return ie;Li=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,b=e?Symbol.for("react.memo"):60115,D=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function h(y){if(typeof y=="object"&&y!==null){var E=y.$$typeof;switch(E){case t:switch(y=y.type,y){case c:case l:case r:case s:case o:case u:return y;default:switch(y=y&&y.$$typeof,y){case a:case d:case D:case b:case i:return y;default:return E}}case n:return E}}}function C(y){return h(y)===l}return ie.AsyncMode=c,ie.ConcurrentMode=l,ie.ContextConsumer=a,ie.ContextProvider=i,ie.Element=t,ie.ForwardRef=d,ie.Fragment=r,ie.Lazy=D,ie.Memo=b,ie.Portal=n,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=u,ie.isAsyncMode=function(y){return C(y)||h(y)===c},ie.isConcurrentMode=C,ie.isContextConsumer=function(y){return h(y)===a},ie.isContextProvider=function(y){return h(y)===i},ie.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},ie.isForwardRef=function(y){return h(y)===d},ie.isFragment=function(y){return h(y)===r},ie.isLazy=function(y){return h(y)===D},ie.isMemo=function(y){return h(y)===b},ie.isPortal=function(y){return h(y)===n},ie.isProfiler=function(y){return h(y)===s},ie.isStrictMode=function(y){return h(y)===o},ie.isSuspense=function(y){return h(y)===u},ie.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===l||y===s||y===o||y===u||y===v||typeof y=="object"&&y!==null&&(y.$$typeof===D||y.$$typeof===b||y.$$typeof===i||y.$$typeof===a||y.$$typeof===d||y.$$typeof===S||y.$$typeof===m||y.$$typeof===f||y.$$typeof===g)},ie.typeOf=h,ie}var ae={};/** @license React v16.13.1
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
148
148
  * react-is.development.js
149
149
  *
150
150
  * Copyright (c) Facebook, Inc. and its affiliates.
151
151
  *
152
152
  * This source code is licensed under the MIT license found in the
153
153
  * LICENSE file in the root directory of this source tree.
154
- */var Fi;function _y(){return Fi||(Fi=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,b=e?Symbol.for("react.memo"):60115,D=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function h(F){return typeof F=="string"||typeof F=="function"||F===r||F===l||F===s||F===o||F===u||F===v||typeof F=="object"&&F!==null&&(F.$$typeof===D||F.$$typeof===b||F.$$typeof===i||F.$$typeof===a||F.$$typeof===d||F.$$typeof===S||F.$$typeof===m||F.$$typeof===f||F.$$typeof===g)}function C(F){if(typeof F=="object"&&F!==null){var re=F.$$typeof;switch(re){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 D:case b:case i:return Se;default:return re}}case n:return re}}}var y=c,E=l,w=a,R=i,A=t,I=d,j=r,B=D,H=b,N=n,_=s,O=o,$=u,P=!1;function k(F){return P||(P=!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.")),T(F)||C(F)===c}function T(F){return C(F)===l}function L(F){return C(F)===a}function V(F){return C(F)===i}function U(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function Y(F){return C(F)===d}function Z(F){return C(F)===r}function K(F){return C(F)===D}function W(F){return C(F)===b}function G(F){return C(F)===n}function q(F){return C(F)===s}function z(F){return C(F)===o}function X(F){return C(F)===u}ae.AsyncMode=y,ae.ConcurrentMode=E,ae.ContextConsumer=w,ae.ContextProvider=R,ae.Element=A,ae.ForwardRef=I,ae.Fragment=j,ae.Lazy=B,ae.Memo=H,ae.Portal=N,ae.Profiler=_,ae.StrictMode=O,ae.Suspense=$,ae.isAsyncMode=k,ae.isConcurrentMode=T,ae.isContextConsumer=L,ae.isContextProvider=V,ae.isElement=U,ae.isForwardRef=Y,ae.isFragment=Z,ae.isLazy=K,ae.isMemo=W,ae.isPortal=G,ae.isProfiler=q,ae.isStrictMode=z,ae.isSuspense=X,ae.isValidElementType=h,ae.typeOf=C}()),ae}var zi;function kl(){return zi||(zi=1,process.env.NODE_ENV==="production"?Un.exports=Ay():Un.exports=_y()),Un.exports}/*
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}/*
155
155
  object-assign
156
156
  (c) Sindre Sorhus
157
157
  @license MIT
158
- */var po,Wi;function ky(){if(Wi)return po;Wi=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 po=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},po}var ho,Bi;function ks(){if(Bi)return ho;Bi=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ho=e,ho}var go,Hi;function Nl(){return Hi||(Hi=1,go=Function.call.bind(Object.prototype.hasOwnProperty)),go}var mo,Vi;function Ny(){if(Vi)return mo;Vi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ks(),n={},r=Nl();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(D){u=D}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 b=l?l():"";e("Failed "+a+" type: "+u.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mo=o,mo}var vo,Yi;function Iy(){if(Yi)return vo;Yi=1;var e=kl(),t=ky(),n=ks(),r=Nl(),o=Ny(),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 vo=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(T){var L=T&&(l&&T[l]||T[d]);if(typeof L=="function")return L}var v="<<anonymous>>",b={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:h,element:C(),elementType:y(),instanceOf:E,node:I(),objectOf:R,oneOf:w,oneOfType:A,shape:B,exact:H};function D(T,L){return T===L?T!==0||1/T===1/L:T!==T&&L!==L}function g(T,L){this.message=T,this.data=L&&typeof L=="object"?L:{},this.stack=""}g.prototype=Error.prototype;function S(T){if(process.env.NODE_ENV!=="production")var L={},V=0;function U(Z,K,W,G,q,z,X){if(G=G||v,z=z||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 re=G+":"+W;!L[re]&&V<3&&(s("You are manually calling a React.PropTypes validation function for the `"+z+"` 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."),L[re]=!0,V++)}}return K[W]==null?Z?K[W]===null?new g("The "+q+" `"+z+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new g("The "+q+" `"+z+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:T(K,W,G,q,z)}var Y=U.bind(null,!1);return Y.isRequired=U.bind(null,!0),Y}function m(T){function L(V,U,Y,Z,K,W){var G=V[U],q=O(G);if(q!==T){var z=$(G);return new g("Invalid "+Z+" `"+K+"` of type "+("`"+z+"` supplied to `"+Y+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return S(L)}function f(){return S(i)}function h(T){function L(V,U,Y,Z,K){if(typeof T!="function")return new g("Property `"+K+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var W=V[U];if(!Array.isArray(W)){var G=O(W);return new g("Invalid "+Z+" `"+K+"` of type "+("`"+G+"` supplied to `"+Y+"`, expected an array."))}for(var q=0;q<W.length;q++){var z=T(W,q,Y,Z,K+"["+q+"]",n);if(z instanceof Error)return z}return null}return S(L)}function C(){function T(L,V,U,Y,Z){var K=L[V];if(!a(K)){var W=O(K);return new g("Invalid "+Y+" `"+Z+"` of type "+("`"+W+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return S(T)}function y(){function T(L,V,U,Y,Z){var K=L[V];if(!e.isValidElementType(K)){var W=O(K);return new g("Invalid "+Y+" `"+Z+"` of type "+("`"+W+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return S(T)}function E(T){function L(V,U,Y,Z,K){if(!(V[U]instanceof T)){var W=T.name||v,G=k(V[U]);return new g("Invalid "+Z+" `"+K+"` of type "+("`"+G+"` supplied to `"+Y+"`, expected ")+("instance of `"+W+"`."))}return null}return S(L)}function w(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function L(V,U,Y,Z,K){for(var W=V[U],G=0;G<T.length;G++)if(D(W,T[G]))return null;var q=JSON.stringify(T,function(X,F){var re=$(F);return re==="symbol"?String(F):F});return new g("Invalid "+Z+" `"+K+"` of value `"+String(W)+"` "+("supplied to `"+Y+"`, expected one of "+q+"."))}return S(L)}function R(T){function L(V,U,Y,Z,K){if(typeof T!="function")return new g("Property `"+K+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var W=V[U],G=O(W);if(G!=="object")return new g("Invalid "+Z+" `"+K+"` of type "+("`"+G+"` supplied to `"+Y+"`, expected an object."));for(var q in W)if(r(W,q)){var z=T(W,q,Y,Z,K+"."+q,n);if(z instanceof Error)return z}return null}return S(L)}function A(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var L=0;L<T.length;L++){var V=T[L];if(typeof V!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(V)+" at index "+L+"."),i}function U(Y,Z,K,W,G){for(var q=[],z=0;z<T.length;z++){var X=T[z],F=X(Y,Z,K,W,G,n);if(F==null)return null;F.data&&r(F.data,"expectedType")&&q.push(F.data.expectedType)}var re=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+W+" `"+G+"` supplied to "+("`"+K+"`"+re+"."))}return S(U)}function I(){function T(L,V,U,Y,Z){return N(L[V])?null:new g("Invalid "+Y+" `"+Z+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return S(T)}function j(T,L,V,U,Y){return new g((T||"React class")+": "+L+" type `"+V+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function B(T){function L(V,U,Y,Z,K){var W=V[U],G=O(W);if(G!=="object")return new g("Invalid "+Z+" `"+K+"` of type `"+G+"` "+("supplied to `"+Y+"`, expected `object`."));for(var q in T){var z=T[q];if(typeof z!="function")return j(Y,Z,K,q,$(z));var X=z(W,q,Y,Z,K+"."+q,n);if(X)return X}return null}return S(L)}function H(T){function L(V,U,Y,Z,K){var W=V[U],G=O(W);if(G!=="object")return new g("Invalid "+Z+" `"+K+"` of type `"+G+"` "+("supplied to `"+Y+"`, expected `object`."));var q=t({},V[U],T);for(var z in q){var X=T[z];if(r(T,z)&&typeof X!="function")return j(Y,Z,K,z,$(X));if(!X)return new g("Invalid "+Z+" `"+K+"` key `"+z+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(V[U],null," ")+`
159
- Valid keys: `+JSON.stringify(Object.keys(T),null," "));var F=X(W,z,Y,Z,K+"."+z,n);if(F)return F}return null}return S(L)}function N(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(N);if(T===null||a(T))return!0;var L=u(T);if(L){var V=L.call(T),U;if(L!==T.entries){for(;!(U=V.next()).done;)if(!N(U.value))return!1}else for(;!(U=V.next()).done;){var Y=U.value;if(Y&&!N(Y[1]))return!1}}else return!1;return!0;default:return!1}}function _(T,L){return T==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function O(T){var L=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":_(L,T)?"symbol":L}function $(T){if(typeof T>"u"||T===null)return""+T;var L=O(T);if(L==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return L}function P(T){var L=$(T);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function k(T){return!T.constructor||!T.constructor.name?v:T.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},vo}var yo,Ui;function jy(){if(Ui)return yo;Ui=1;var e=ks();function t(){}function n(){}return n.resetWarningCache=t,yo=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},yo}var Ki;function Br(){if(Ki)return Yn.exports;if(Ki=1,process.env.NODE_ENV!=="production"){var e=kl(),t=!0;Yn.exports=Iy()(e.isElement,t)}else Yn.exports=jy()();return Yn.exports}function Il(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=Il(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Gi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Il(e))&&(r&&(r+=" "),r+=t);return r}const $y=Object.freeze(Object.defineProperty({__proto__:null,clsx:Gi,default:Gi},Symbol.toStringTag,{value:"Module"})),Ly=xf($y);var fe={},at={},qi;function Hr(){if(qi)return at;qi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.dontSetMe=o,at.findInArray=e,at.int=r,at.isFunction=t,at.isNum=n;function e(s,i){for(let a=0,c=s.length;a<c;a++)if(i.apply(i,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function n(s){return typeof s=="number"&&!isNaN(s)}function r(s){return parseInt(s,10)}function o(s,i,a){if(s[i])return new Error("Invalid prop ".concat(i," passed to ").concat(a," - do not set this, set it on the child."))}return at}var ct={},Xi;function Fy(){if(Xi)return ct;Xi=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 Zi;function Ns(){if(Zi)return fe;Zi=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=y,fe.addEvent=a,fe.addUserSelectStyles=h,fe.createCSSTransform=D,fe.createSVGTransform=g,fe.getTouch=m,fe.getTouchIdentifier=f,fe.getTranslation=S,fe.innerHeight=u,fe.innerWidth=v,fe.matchesSelector=s,fe.matchesSelectorAndParentsTo=i,fe.offsetXYFromParent=b,fe.outerHeight=l,fe.outerWidth=d,fe.removeClassName=E,fe.removeEvent=c,fe.removeUserSelectStyles=C;var e=Hr(),t=r(Fy());function n(w){if(typeof WeakMap!="function")return null;var R=new WeakMap,A=new WeakMap;return(n=function(I){return I?A:R})(w)}function r(w,R){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var A=n(R);if(A&&A.has(w))return A.get(w);var I={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var B in w)if(B!=="default"&&Object.prototype.hasOwnProperty.call(w,B)){var H=j?Object.getOwnPropertyDescriptor(w,B):null;H&&(H.get||H.set)?Object.defineProperty(I,B,H):I[B]=w[B]}return I.default=w,A&&A.set(w,I),I}let o="";function s(w,R){return o||(o=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(A){return(0,e.isFunction)(w[A])})),(0,e.isFunction)(w[o])?w[o](R):!1}function i(w,R,A){let I=w;do{if(s(I,R))return!0;if(I===A)return!1;I=I.parentNode}while(I);return!1}function a(w,R,A,I){if(!w)return;const j={capture:!0,...I};w.addEventListener?w.addEventListener(R,A,j):w.attachEvent?w.attachEvent("on"+R,A):w["on"+R]=A}function c(w,R,A,I){if(!w)return;const j={capture:!0,...I};w.removeEventListener?w.removeEventListener(R,A,j):w.detachEvent?w.detachEvent("on"+R,A):w["on"+R]=null}function l(w){let R=w.clientHeight;const A=w.ownerDocument.defaultView.getComputedStyle(w);return R+=(0,e.int)(A.borderTopWidth),R+=(0,e.int)(A.borderBottomWidth),R}function d(w){let R=w.clientWidth;const A=w.ownerDocument.defaultView.getComputedStyle(w);return R+=(0,e.int)(A.borderLeftWidth),R+=(0,e.int)(A.borderRightWidth),R}function u(w){let R=w.clientHeight;const A=w.ownerDocument.defaultView.getComputedStyle(w);return R-=(0,e.int)(A.paddingTop),R-=(0,e.int)(A.paddingBottom),R}function v(w){let R=w.clientWidth;const A=w.ownerDocument.defaultView.getComputedStyle(w);return R-=(0,e.int)(A.paddingLeft),R-=(0,e.int)(A.paddingRight),R}function b(w,R,A){const j=R===R.ownerDocument.body?{left:0,top:0}:R.getBoundingClientRect(),B=(w.clientX+R.scrollLeft-j.left)/A,H=(w.clientY+R.scrollTop-j.top)/A;return{x:B,y:H}}function D(w,R){const A=S(w,R,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:A}}function g(w,R){return S(w,R,"")}function S(w,R,A){let{x:I,y:j}=w,B="translate(".concat(I).concat(A,",").concat(j).concat(A,")");if(R){const H="".concat(typeof R.x=="string"?R.x:R.x+A),N="".concat(typeof R.y=="string"?R.y:R.y+A);B="translate(".concat(H,", ").concat(N,")")+B}return B}function m(w,R){return w.targetTouches&&(0,e.findInArray)(w.targetTouches,A=>R===A.identifier)||w.changedTouches&&(0,e.findInArray)(w.changedTouches,A=>R===A.identifier)}function f(w){if(w.targetTouches&&w.targetTouches[0])return w.targetTouches[0].identifier;if(w.changedTouches&&w.changedTouches[0])return w.changedTouches[0].identifier}function h(w){if(!w)return;let R=w.getElementById("react-draggable-style-el");R||(R=w.createElement("style"),R.type="text/css",R.id="react-draggable-style-el",R.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
160
- `,R.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
161
- `,w.getElementsByTagName("head")[0].appendChild(R)),w.body&&y(w.body,"react-draggable-transparent-selection")}function C(w){if(w)try{if(w.body&&E(w.body,"react-draggable-transparent-selection"),w.selection)w.selection.empty();else{const R=(w.defaultView||window).getSelection();R&&R.type!=="Caret"&&R.removeAllRanges()}}catch{}}function y(w,R){w.classList?w.classList.add(R):w.className.match(new RegExp("(?:^|\\s)".concat(R,"(?!\\S)")))||(w.className+=" ".concat(R))}function E(w,R){w.classList?w.classList.remove(R):w.className=w.className.replace(new RegExp("(?:^|\\s)".concat(R,"(?!\\S)"),"g"),"")}return fe}var ze={},Ji;function jl(){if(Ji)return ze;Ji=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.canDragX=o,ze.canDragY=s,ze.createCoreData=a,ze.createDraggableData=c,ze.getBoundPosition=n,ze.getControlPosition=i,ze.snapToGrid=r;var e=Hr(),t=Ns();function n(u,v,b){if(!u.props.bounds)return[v,b];let{bounds:D}=u.props;D=typeof D=="string"?D:l(D);const g=d(u);if(typeof D=="string"){const{ownerDocument:S}=g,m=S.defaultView;let f;if(D==="parent"?f=g.parentNode:f=S.querySelector(D),!(f instanceof m.HTMLElement))throw new Error('Bounds selector "'+D+'" could not find an element.');const h=f,C=m.getComputedStyle(g),y=m.getComputedStyle(h);D={left:-g.offsetLeft+(0,e.int)(y.paddingLeft)+(0,e.int)(C.marginLeft),top:-g.offsetTop+(0,e.int)(y.paddingTop)+(0,e.int)(C.marginTop),right:(0,t.innerWidth)(h)-(0,t.outerWidth)(g)-g.offsetLeft+(0,e.int)(y.paddingRight)-(0,e.int)(C.marginRight),bottom:(0,t.innerHeight)(h)-(0,t.outerHeight)(g)-g.offsetTop+(0,e.int)(y.paddingBottom)-(0,e.int)(C.marginBottom)}}return(0,e.isNum)(D.right)&&(v=Math.min(v,D.right)),(0,e.isNum)(D.bottom)&&(b=Math.min(b,D.bottom)),(0,e.isNum)(D.left)&&(v=Math.max(v,D.left)),(0,e.isNum)(D.top)&&(b=Math.max(b,D.top)),[v,b]}function r(u,v,b){const D=Math.round(v/u[0])*u[0],g=Math.round(b/u[1])*u[1];return[D,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,b){const D=typeof v=="number"?(0,t.getTouch)(u,v):null;if(typeof v=="number"&&!D)return null;const g=d(b),S=b.props.offsetParent||g.offsetParent||g.ownerDocument.body;return(0,t.offsetXYFromParent)(D||u,S,b.props.scale)}function a(u,v,b){const D=!(0,e.isNum)(u.lastX),g=d(u);return D?{node:g,deltaX:0,deltaY:0,lastX:v,lastY:b,x:v,y:b}:{node:g,deltaX:v-u.lastX,deltaY:b-u.lastY,lastX:u.lastX,lastY:u.lastY,x:v,y:b}}function c(u,v){const b=u.props.scale;return{node:v.node,x:u.state.x+v.deltaX/b,y:u.state.y+v.deltaY/b,deltaX:v.deltaX/b,deltaY:v.deltaY/b,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 ze}var on={},Kn={},Qi;function $l(){if(Qi)return Kn;Qi=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.default=e;function e(){}return Kn}var ea;function zy(){if(ea)return on;ea=1,Object.defineProperty(on,"__esModule",{value:!0}),on.default=void 0;var e=l(M),t=a(Br()),n=a(Ue),r=Ns(),o=jl(),s=Hr(),i=a($l());function a(S){return S&&S.__esModule?S:{default:S}}function c(S){if(typeof WeakMap!="function")return null;var m=new WeakMap,f=new WeakMap;return(c=function(h){return h?f:m})(S)}function l(S,m){if(S&&S.__esModule)return S;if(S===null||typeof S!="object"&&typeof S!="function")return{default:S};var f=c(m);if(f&&f.has(S))return f.get(S);var h={},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in S)if(y!=="default"&&Object.prototype.hasOwnProperty.call(S,y)){var E=C?Object.getOwnPropertyDescriptor(S,y):null;E&&(E.get||E.set)?Object.defineProperty(h,y,E):h[y]=S[y]}return h.default=S,f&&f.set(S,h),h}function d(S,m,f){return m=u(m),m in S?Object.defineProperty(S,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):S[m]=f,S}function u(S){var m=v(S,"string");return typeof m=="symbol"?m:String(m)}function v(S,m){if(typeof S!="object"||S===null)return S;var f=S[Symbol.toPrimitive];if(f!==void 0){var h=f.call(S,m);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(S)}const b={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let D=b.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",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:h}=f;if(this.props.disabled||!(m.target instanceof h.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 C=(0,r.getTouchIdentifier)(m);this.touchIdentifier=C;const y=(0,o.getControlPosition)(m,C,this);if(y==null)return;const{x:E,y:w}=y,R=(0,o.createCoreData)(this,E,w);(0,i.default)("DraggableCore: handleDragStart: %j",R),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(m,R)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(h),this.dragging=!0,this.lastX=E,this.lastY=w,(0,r.addEvent)(h,D.move,this.handleDrag),(0,r.addEvent)(h,D.stop,this.handleDragStop))}),d(this,"handleDrag",m=>{const f=(0,o.getControlPosition)(m,this.touchIdentifier,this);if(f==null)return;let{x:h,y:C}=f;if(Array.isArray(this.props.grid)){let w=h-this.lastX,R=C-this.lastY;if([w,R]=(0,o.snapToGrid)(this.props.grid,w,R),!w&&!R)return;h=this.lastX+w,C=this.lastY+R}const y=(0,o.createCoreData)(this,h,C);if((0,i.default)("DraggableCore: handleDrag: %j",y),this.props.onDrag(m,y)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const R=document.createEvent("MouseEvents");R.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(R)}return}this.lastX=h,this.lastY=C}),d(this,"handleDragStop",m=>{if(!this.dragging)return;const f=(0,o.getControlPosition)(m,this.touchIdentifier,this);if(f==null)return;let{x:h,y:C}=f;if(Array.isArray(this.props.grid)){let R=h-this.lastX||0,A=C-this.lastY||0;[R,A]=(0,o.snapToGrid)(this.props.grid,R,A),h=this.lastX+R,C=this.lastY+A}const y=(0,o.createCoreData)(this,h,C);if(this.props.onStop(m,y)===!1||this.mounted===!1)return!1;const w=this.findDOMNode();w&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(w.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",y),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,w&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(w.ownerDocument,D.move,this.handleDrag),(0,r.removeEvent)(w.ownerDocument,D.stop,this.handleDragStop))}),d(this,"onMouseDown",m=>(D=b.mouse,this.handleDragStart(m))),d(this,"onMouseUp",m=>(D=b.mouse,this.handleDragStop(m))),d(this,"onTouchStart",m=>(D=b.touch,this.handleDragStart(m))),d(this,"onTouchEnd",m=>(D=b.touch,this.handleDragStop(m)))}componentDidMount(){this.mounted=!0;const m=this.findDOMNode();m&&(0,r.addEvent)(m,b.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const m=this.findDOMNode();if(m){const{ownerDocument:f}=m;(0,r.removeEvent)(f,b.mouse.move,this.handleDrag),(0,r.removeEvent)(f,b.touch.move,this.handleDrag),(0,r.removeEvent)(f,b.mouse.stop,this.handleDragStop),(0,r.removeEvent)(f,b.touch.stop,this.handleDragStop),(0,r.removeEvent)(m,b.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 on.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(S,m){if(S[m]&&S[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(g,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),on}var ta;function Wy(){return ta||(ta=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(M),n=d(Br()),r=d(Ue),o=d(Ly),s=Ns(),i=jl(),a=Hr(),c=d(zy()),l=d($l());function d(f){return f&&f.__esModule?f:{default:f}}function u(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,C=new WeakMap;return(u=function(y){return y?C:h})(f)}function v(f,h){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var C=u(h);if(C&&C.has(f))return C.get(f);var y={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in f)if(w!=="default"&&Object.prototype.hasOwnProperty.call(f,w)){var R=E?Object.getOwnPropertyDescriptor(f,w):null;R&&(R.get||R.set)?Object.defineProperty(y,w,R):y[w]=f[w]}return y.default=f,C&&C.set(f,y),y}function b(){return b=Object.assign?Object.assign.bind():function(f){for(var h=1;h<arguments.length;h++){var C=arguments[h];for(var y in C)Object.prototype.hasOwnProperty.call(C,y)&&(f[y]=C[y])}return f},b.apply(this,arguments)}function D(f,h,C){return h=g(h),h in f?Object.defineProperty(f,h,{value:C,enumerable:!0,configurable:!0,writable:!0}):f[h]=C,f}function g(f){var h=S(f,"string");return typeof h=="symbol"?h:String(h)}function S(f,h){if(typeof f!="object"||f===null)return f;var C=f[Symbol.toPrimitive];if(C!==void 0){var y=C.call(f,h);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(f)}class m extends t.Component{static getDerivedStateFromProps(h,C){let{position:y}=h,{prevPropsPosition:E}=C;return y&&(!E||y.x!==E.x||y.y!==E.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:y,prevPropsPosition:E}),{x:y.x,y:y.y,prevPropsPosition:{...y}}):null}constructor(h){super(h),D(this,"onDragStart",(C,y)=>{if((0,l.default)("Draggable: onDragStart: %j",y),this.props.onStart(C,(0,i.createDraggableData)(this,y))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),D(this,"onDrag",(C,y)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",y);const E=(0,i.createDraggableData)(this,y),w={x:E.x,y:E.y,slackX:0,slackY:0};if(this.props.bounds){const{x:A,y:I}=w;w.x+=this.state.slackX,w.y+=this.state.slackY;const[j,B]=(0,i.getBoundPosition)(this,w.x,w.y);w.x=j,w.y=B,w.slackX=this.state.slackX+(A-w.x),w.slackY=this.state.slackY+(I-w.y),E.x=w.x,E.y=w.y,E.deltaX=w.x-this.state.x,E.deltaY=w.y-this.state.y}if(this.props.onDrag(C,E)===!1)return!1;this.setState(w)}),D(this,"onDragStop",(C,y)=>{if(!this.state.dragging||this.props.onStop(C,(0,i.createDraggableData)(this,y))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",y);const w={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:A,y:I}=this.props.position;w.x=A,w.y=I}this.setState(w)}),this.state={dragging:!1,dragged:!1,x:h.position?h.position.x:h.defaultPosition.x,y:h.position?h.position.y:h.defaultPosition.y,prevPropsPosition:{...h.position},slackX:0,slackY:0,isElementSVG:!1},h.position&&!(h.onDrag||h.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 h,C;return(h=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&h!==void 0?h:r.default.findDOMNode(this)}render(){const{axis:h,bounds:C,children:y,defaultPosition:E,defaultClassName:w,defaultClassNameDragging:R,defaultClassNameDragged:A,position:I,positionOffset:j,scale:B,...H}=this.props;let N={},_=null;const $=!!!I||this.state.dragging,P=I||E,k={x:(0,i.canDragX)(this)&&$?this.state.x:P.x,y:(0,i.canDragY)(this)&&$?this.state.y:P.y};this.state.isElementSVG?_=(0,s.createSVGTransform)(k,j):N=(0,s.createCSSTransform)(k,j);const T=(0,o.default)(y.props.className||"",w,{[R]:this.state.dragging,[A]:this.state.dragged});return t.createElement(c.default,b({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(y),{className:T,style:{...y.props.style,...N},transform:_}))}}e.default=m,D(m,"displayName","Draggable"),D(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}),D(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})}(fo)),fo}var na;function Ll(){if(na)return rn.exports;na=1;const{default:e,DraggableCore:t}=Wy();return rn.exports=e,rn.exports.default=e,rn.exports.DraggableCore=t,rn.exports}var Gn={},ra;function By(){if(ra)return Gn;ra=1,Gn.__esModule=!0,Gn.cloneElement=a;var e=t(M);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 Gn}var sn={},oa;function Fl(){if(oa)return sn;oa=1,sn.__esModule=!0,sn.resizableProps=void 0;var e=t(Br());Ll();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 sn.resizableProps=n,sn}var sa;function zl(){if(sa)return nn;sa=1,nn.__esModule=!0,nn.default=void 0;var e=i(M),t=Ll(),n=By(),r=Fl(),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,h=new WeakMap;return(s=function(y){return y?h: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 h=s(f);if(h&&h.has(m))return h.get(m);var C={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in m)if(E!=="default"&&Object.prototype.hasOwnProperty.call(m,E)){var w=y?Object.getOwnPropertyDescriptor(m,E):null;w&&(w.get||w.set)?Object.defineProperty(C,E,w):C[E]=m[E]}return C.default=m,h&&h.set(m,C),C}function a(){return a=Object.assign?Object.assign.bind():function(m){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(m[C]=h[C])}return m},a.apply(this,arguments)}function c(m,f){if(m==null)return{};var h={},C=Object.keys(m),y,E;for(E=0;E<C.length;E++)y=C[E],!(f.indexOf(y)>=0)&&(h[y]=m[y]);return h}function l(m,f){var h=Object.keys(m);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(m);f&&(C=C.filter(function(y){return Object.getOwnPropertyDescriptor(m,y).enumerable})),h.push.apply(h,C)}return h}function d(m){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?l(Object(h),!0).forEach(function(C){u(m,C,h[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(h)):l(Object(h)).forEach(function(C){Object.defineProperty(m,C,Object.getOwnPropertyDescriptor(h,C))})}return m}function u(m,f,h){return f=v(f),f in m?Object.defineProperty(m,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):m[f]=h,m}function v(m){var f=b(m,"string");return typeof f=="symbol"?f:String(f)}function b(m,f){if(typeof m!="object"||m===null)return m;var h=m[Symbol.toPrimitive];if(h!==void 0){var C=h.call(m,f);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(m)}function D(m,f){m.prototype=Object.create(f.prototype),m.prototype.constructor=m,g(m,f)}function g(m,f){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,y){return C.__proto__=y,C},g(m,f)}var S=function(m){D(f,m);function f(){for(var C,y=arguments.length,E=new Array(y),w=0;w<y;w++)E[w]=arguments[w];return C=m.call.apply(m,[this].concat(E))||this,C.handleRefs={},C.lastHandleRect=null,C.slack=null,C}var h=f.prototype;return h.componentWillUnmount=function(){this.resetData()},h.resetData=function(){this.lastHandleRect=this.slack=null},h.runConstraints=function(y,E){var w=this.props,R=w.minConstraints,A=w.maxConstraints,I=w.lockAspectRatio;if(!R&&!A&&!I)return[y,E];if(I){var j=this.props.width/this.props.height,B=y-this.props.width,H=E-this.props.height;Math.abs(B)>Math.abs(H*j)?E=y/j:y=E*j}var N=y,_=E,O=this.slack||[0,0],$=O[0],P=O[1];return y+=$,E+=P,R&&(y=Math.max(R[0],y),E=Math.max(R[1],E)),A&&(y=Math.min(A[0],y),E=Math.min(A[1],E)),this.slack=[$+(N-y),P+(_-E)],[y,E]},h.resizeHandler=function(y,E){var w=this;return function(R,A){var I=A.node,j=A.deltaX,B=A.deltaY;y==="onResizeStart"&&w.resetData();var H=(w.props.axis==="both"||w.props.axis==="x")&&E!=="n"&&E!=="s",N=(w.props.axis==="both"||w.props.axis==="y")&&E!=="e"&&E!=="w";if(!(!H&&!N)){var _=E[0],O=E[E.length-1],$=I.getBoundingClientRect();if(w.lastHandleRect!=null){if(O==="w"){var P=$.left-w.lastHandleRect.left;j+=P}if(_==="n"){var k=$.top-w.lastHandleRect.top;B+=k}}w.lastHandleRect=$,O==="w"&&(j=-j),_==="n"&&(B=-B);var T=w.props.width+(H?j/w.props.transformScale:0),L=w.props.height+(N?B/w.props.transformScale:0),V=w.runConstraints(T,L);T=V[0],L=V[1];var U=T!==w.props.width||L!==w.props.height,Y=typeof w.props[y]=="function"?w.props[y]:null,Z=y==="onResize"&&!U;Y&&!Z&&(R.persist==null||R.persist(),Y(R,{node:I,size:{width:T,height:L},handle:E})),y==="onResizeStop"&&w.resetData()}}},h.renderResizeHandle=function(y,E){var w=this.props.handle;if(!w)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+y,ref:E});if(typeof w=="function")return w(y,E);var R=typeof w.type=="string",A=d({ref:E},R?{}:{handleAxis:y});return e.cloneElement(w,A)},h.render=function(){var y=this,E=this.props,w=E.children,R=E.className,A=E.draggableOpts;E.width,E.height,E.handle,E.handleSize,E.lockAspectRatio,E.axis,E.minConstraints,E.maxConstraints,E.onResize,E.onResizeStop,E.onResizeStart;var I=E.resizeHandles;E.transformScale;var j=c(E,o);return(0,n.cloneElement)(w,d(d({},j),{},{className:(R?R+" ":"")+"react-resizable",children:[].concat(w.props.children,I.map(function(B){var H,N=(H=y.handleRefs[B])!=null?H:y.handleRefs[B]=e.createRef();return e.createElement(t.DraggableCore,a({},A,{nodeRef:N,key:"resizableHandle-"+B,onStop:y.resizeHandler("onResizeStop",B),onStart:y.resizeHandler("onResizeStart",B),onDrag:y.resizeHandler("onResize",B)}),y.renderResizeHandle(B,N))}))}))},f}(e.Component);return nn.default=S,S.propTypes=r.resizableProps,S.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},nn}var an={},ia;function Hy(){if(ia)return an;ia=1,an.__esModule=!0,an.default=void 0;var e=a(M),t=s(Br()),n=s(zl()),r=Fl(),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 h=new WeakMap,C=new WeakMap;return(i=function(E){return E?C:h})(f)}function a(f,h){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var C=i(h);if(C&&C.has(f))return C.get(f);var y={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in f)if(w!=="default"&&Object.prototype.hasOwnProperty.call(f,w)){var R=E?Object.getOwnPropertyDescriptor(f,w):null;R&&(R.get||R.set)?Object.defineProperty(y,w,R):y[w]=f[w]}return y.default=f,C&&C.set(f,y),y}function c(){return c=Object.assign?Object.assign.bind():function(f){for(var h=1;h<arguments.length;h++){var C=arguments[h];for(var y in C)Object.prototype.hasOwnProperty.call(C,y)&&(f[y]=C[y])}return f},c.apply(this,arguments)}function l(f,h){var C=Object.keys(f);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(f);h&&(y=y.filter(function(E){return Object.getOwnPropertyDescriptor(f,E).enumerable})),C.push.apply(C,y)}return C}function d(f){for(var h=1;h<arguments.length;h++){var C=arguments[h]!=null?arguments[h]:{};h%2?l(Object(C),!0).forEach(function(y){u(f,y,C[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(C)):l(Object(C)).forEach(function(y){Object.defineProperty(f,y,Object.getOwnPropertyDescriptor(C,y))})}return f}function u(f,h,C){return h=v(h),h in f?Object.defineProperty(f,h,{value:C,enumerable:!0,configurable:!0,writable:!0}):f[h]=C,f}function v(f){var h=b(f,"string");return typeof h=="symbol"?h:String(h)}function b(f,h){if(typeof f!="object"||f===null)return f;var C=f[Symbol.toPrimitive];if(C!==void 0){var y=C.call(f,h);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(f)}function D(f,h){if(f==null)return{};var C={},y=Object.keys(f),E,w;for(w=0;w<y.length;w++)E=y[w],!(h.indexOf(E)>=0)&&(C[E]=f[E]);return C}function g(f,h){f.prototype=Object.create(h.prototype),f.prototype.constructor=f,S(f,h)}function S(f,h){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(y,E){return y.__proto__=E,y},S(f,h)}var m=function(f){g(h,f);function h(){for(var y,E=arguments.length,w=new Array(E),R=0;R<E;R++)w[R]=arguments[R];return y=f.call.apply(f,[this].concat(w))||this,y.state={width:y.props.width,height:y.props.height,propsWidth:y.props.width,propsHeight:y.props.height},y.onResize=function(A,I){var j=I.size;y.props.onResize?(A.persist==null||A.persist(),y.setState(j,function(){return y.props.onResize&&y.props.onResize(A,I)})):y.setState(j)},y}h.getDerivedStateFromProps=function(E,w){return w.propsWidth!==E.width||w.propsHeight!==E.height?{width:E.width,height:E.height,propsWidth:E.width,propsHeight:E.height}:null};var C=h.prototype;return C.render=function(){var E=this.props,w=E.handle,R=E.handleSize;E.onResize;var A=E.onResizeStart,I=E.onResizeStop,j=E.draggableOpts,B=E.minConstraints,H=E.maxConstraints,N=E.lockAspectRatio,_=E.axis;E.width,E.height;var O=E.resizeHandles,$=E.style,P=E.transformScale,k=D(E,o);return e.createElement(n.default,{axis:_,draggableOpts:j,handle:w,handleSize:R,height:this.state.height,lockAspectRatio:N,maxConstraints:H,minConstraints:B,onResizeStart:A,onResize:this.onResize,onResizeStop:I,resizeHandles:O,transformScale:P,width:this.state.width},e.createElement("div",c({},k,{style:d(d({},$),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},h}(e.Component);return an.default=m,m.propTypes=d(d({},r.resizableProps),{},{children:t.default.element}),an}var aa;function Vy(){return aa||(aa=1,tn.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},tn.exports.Resizable=zl().default,tn.exports.ResizableBox=Hy().default),tn.exports}var Wl=Vy();const An=Uo(e=>({isDragging:!1,isDelayActive:!0,updateIsDragging:t=>e(n=>({...n,isDragging:t})),updateIsDelayActive:t=>e(n=>({...n,isDelayActive:t})),onChangeIsDelayActive:()=>e(t=>({...t,isDelayActive:!t}))})),mr=({bookingInit:e,slotData:t,heightStyleTransformer:n,onClick:r,pendingStyle:o,style:s,listeners:i,attributes:a,customClasses:c,bookingViewType:l,resizableParam:d,events:u,open:v=!0,ref:b})=>{var y;const[D,g]=M.useState(""),{updateIsDragging:S}=An(E=>E),m=l===ce.DAY?{width:"99%"}:{width:"100%"};M.useEffect(()=>()=>{u!=null&&u.onUnmount&&(u==null||u.onUnmount())},[]);const f=(E,w)=>{g("show-handle"),S(!0),d!=null&&d.onResizeStart&&d.onResizeStart(E,w)},h=(E,w)=>{g(""),S(!1),d!=null&&d.onResizeStop&&d.onResizeStop(E,w)},C={height:n,position:"relative",zIndex:50,...o,...s,...m};if(!v&&!e.finishAt)return null;if((y=d==null?void 0:d.state)!=null&&y.height){const{state:E,onResize:w}=d;return p.jsx(Wl.Resizable,{className:oe("cardContent_resizable",d.customClass,D),height:E==null?void 0:E.height,width:E==null?void 0:E.width,onResize:w,onResizeStart:f,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("div",{ref:b,className:oe("cardContent_render",c,D.length&&"dragging-effect"),onClick:r,style:C,...i,...a,children:p.jsx(Fo,{booking:e,slotData:t})})})})}return p.jsx("div",{style:{height:n,display:"flex",zIndex:100,...m},children:p.jsx("div",{ref:b,className:oe("cardContent_render",c),onClick:r,style:C,...i,...a,children:p.jsx(Fo,{booking:e,slotData:t})})})};var Yy="Label",Bl=x.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())}}));Bl.displayName=Yy;var Uy=Bl;function Ky({className:e,...t}){return p.jsx(Uy,{"data-slot":"label",className:oe("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 Gy=({onClose:e,onOpenChange:t,buttonTrigger:n})=>{const[r,o]=M.useState({x:0,y:0}),s=Ct(),{attributes:i,listeners:a,setNodeRef:c,transform:l,setActivatorNodeRef:d}=ts({id:"unique-id",data:{type:"another"}}),u={transform:`translate3d(${r.x+((l==null?void 0:l.x)||0)}px, ${r.y+((l==null?void 0:l.y)||0)}px, 0)`};return Cr({onDragEnd(v){if(v.active.id){const{y:b,x:D}=r;o({x:D+((l==null?void 0:l.x)||0),y:b+((l==null?void 0:l.y)||0)})}}}),p.jsxs(Ps,{modal:!1,open:!0,defaultOpen:!1,onOpenChange:t,children:[p.jsx(As,{asChild:!0,children:n}),p.jsxs(_s,{ref:c,style:{...u,zIndex:100,width:"25rem"},forceMount:!0,avoidCollisions:!0,side:"right",sticky:"always",updatePositionStrategy:"always",onEscapeKeyDown:()=>{},...i,children:[p.jsxs("div",{className:"dropdownLabelContent",children:[p.jsx(Ky,{ref:d,className:"dropdownLabelContent_dropdownLabel",...a,children:"Appointment"}),p.jsx(nh,{className:"dropdownLabelContent_close",onClick:e})]}),s.createBookingModal]})]})};var qy="Toggle",Hl=x.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)})})});Hl.displayName=qy;var Xy=Hl;const Zy=tc("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 Jy({className:e,variant:t,size:n,...r}){return p.jsx(Xy,{"data-slot":"toggle",className:oe(Zy({variant:t,size:n,className:e})),...r})}const Qy=()=>{const[e,t]=M.useState(!1);return p.jsx(vs,{children:p.jsxs(Nc,{children:[p.jsx(Ic,{asChild:!0,children:p.jsx("div",{children:p.jsx(Jy,{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(Pp,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),p.jsx(jc,{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"})})]})})};var Is="Popover",[Vl,Fw]=mt(Is,[vt]),_n=vt(),[eb,yt]=Vl(Is),Yl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=_n(t),c=x.useRef(null),[l,d]=x.useState(!1),[u=!1,v]=Et({prop:r,defaultProp:o,onChange:s});return p.jsx(Pr,{...a,children:p.jsx(eb,{scope:t,contentId:ft(),triggerRef:c,open:u,onOpenChange:v,onOpenToggle:x.useCallback(()=>v(b=>!b),[v]),hasCustomAnchor:l,onCustomAnchorAdd:x.useCallback(()=>d(!0),[]),onCustomAnchorRemove:x.useCallback(()=>d(!1),[]),modal:i,children:n})})};Yl.displayName=Is;var Ul="PopoverAnchor",Kl=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(Ul,n),s=_n(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return x.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(Mn,{...s,...r,ref:t})});Kl.displayName=Ul;var Gl="PopoverTrigger",ql=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(Gl,n),s=_n(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":eu(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(Mn,{asChild:!0,...s,children:a})});ql.displayName=Gl;var js="PopoverPortal",[tb,nb]=Vl(js,{forceMount:void 0}),Xl=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=yt(js,t);return p.jsx(tb,{scope:t,forceMount:n,children:p.jsx(Ze,{present:n||s.open,children:p.jsx(Rn,{asChild:!0,container:o,children:r})})})};Xl.displayName=js;var Ht="PopoverContent",Zl=x.forwardRef((e,t)=>{const n=nb(Ht,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=yt(Ht,e.__scopePopover);return p.jsx(Ze,{present:r||s.open,children:s.modal?p.jsx(rb,{...o,ref:t}):p.jsx(ob,{...o,ref:t})})});Zl.displayName=Ht;var rb=x.forwardRef((e,t)=>{const n=yt(Ht,e.__scopePopover),r=x.useRef(null),o=le(t,r),s=x.useRef(!1);return x.useEffect(()=>{const i=r.current;if(i)return xs(i)},[]),p.jsx(Fr,{as:dt,allowPinchZoom:!0,children:p.jsx(Jl,{...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})})})}),ob=x.forwardRef((e,t)=>{const n=yt(Ht,e.__scopePopover),r=x.useRef(!1),o=x.useRef(!1);return p.jsx(Jl,{...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()}})}),Jl=x.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=yt(Ht,n),b=_n(n);return ws(),p.jsx(jr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(Dn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>v.onOpenChange(!1),children:p.jsx(Ar,{"data-state":eu(v.open),role:"dialog",id:v.contentId,...b,...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)"}})})})}),Ql="PopoverClose",sb=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(Ql,n);return p.jsx(se.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});sb.displayName=Ql;var ib="PopoverArrow",ab=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=_n(n);return p.jsx(_r,{...o,...r,ref:t})});ab.displayName=ib;function eu(e){return e?"open":"closed"}var cb=Yl,lb=Kl,ub=ql,db=Xl,fb=Zl;function pb({...e}){return p.jsx(cb,{"data-slot":"popover",...e})}function hb({...e}){return p.jsx(ub,{"data-slot":"popover-trigger",...e})}function gb({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(db,{children:p.jsx(fb,{"data-slot":"popover-content",align:t,sideOffset:n,className:oe("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 mb({...e}){return p.jsx(lb,{"data-slot":"popover-anchor",...e})}function ca(e,[t,n]){return Math.min(n,Math.max(t,e))}function vb(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var yb=[" ","Enter","ArrowUp","ArrowDown"],bb=[" ","Enter"],kn="Select",[Vr,Yr,wb]=ys(kn),[Xt,zw]=mt(kn,[wb,vt]),Ur=vt(),[xb,bt]=Xt(kn),[Sb,Cb]=Xt(kn),tu=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:b,form:D}=e,g=Ur(t),[S,m]=x.useState(null),[f,h]=x.useState(null),[C,y]=x.useState(!1),E=bs(l),[w=!1,R]=Et({prop:r,defaultProp:o,onChange:s}),[A,I]=Et({prop:i,defaultProp:a,onChange:c}),j=x.useRef(null),B=S?D||!!S.closest("form"):!0,[H,N]=x.useState(new Set),_=Array.from(H).map(O=>O.props.value).join(";");return p.jsx(Pr,{...g,children:p.jsxs(xb,{required:b,scope:t,trigger:S,onTriggerChange:m,valueNode:f,onValueNodeChange:h,valueNodeHasChildren:C,onValueNodeHasChildrenChange:y,contentId:ft(),value:A,onValueChange:I,open:w,onOpenChange:R,dir:E,triggerPointerDownPosRef:j,disabled:v,children:[p.jsx(Vr.Provider,{scope:t,children:p.jsx(Sb,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(O=>{N($=>new Set($).add(O))},[]),onNativeOptionRemove:x.useCallback(O=>{N($=>{const P=new Set($);return P.delete(O),P})},[]),children:n})}),B?p.jsxs(Du,{"aria-hidden":!0,required:b,tabIndex:-1,name:d,autoComplete:u,value:A,onChange:O=>I(O.target.value),disabled:v,form:D,children:[A===void 0?p.jsx("option",{value:""}):null,Array.from(H)]},_):null]})})};tu.displayName=kn;var nu="SelectTrigger",ru=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Ur(n),i=bt(nu,n),a=i.disabled||r,c=le(t,i.onTriggerChange),l=Yr(n),d=x.useRef("touch"),[u,v,b]=Eu(g=>{const S=l().filter(h=>!h.disabled),m=S.find(h=>h.value===i.value),f=Mu(S,g,m);f!==void 0&&i.onValueChange(f.value)}),D=g=>{a||(i.onOpenChange(!0),b()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(Mn,{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":Cu(i.value)?"":void 0,...o,ref:c,onClick:ee(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&D(g)}),onPointerDown:ee(o.onPointerDown,g=>{d.current=g.pointerType;const S=g.target;S.hasPointerCapture(g.pointerId)&&S.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(D(g),g.preventDefault())}),onKeyDown:ee(o.onKeyDown,g=>{const S=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&v(g.key),!(S&&g.key===" ")&&yb.includes(g.key)&&(D(),g.preventDefault())})})})});ru.displayName=nu;var ou="SelectValue",su=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=bt(ou,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:Cu(c.value)?p.jsx(p.Fragment,{children:i}):s})});su.displayName=ou;var Db="SelectIcon",iu=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(se.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});iu.displayName=Db;var Eb="SelectPortal",au=e=>p.jsx(Rn,{asChild:!0,...e});au.displayName=Eb;var Mt="SelectContent",cu=x.forwardRef((e,t)=>{const n=bt(Mt,e.__scopeSelect),[r,o]=x.useState();if(ye(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?yr.createPortal(p.jsx(lu,{scope:e.__scopeSelect,children:p.jsx(Vr.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(uu,{...e,ref:t})});cu.displayName=Mt;var Ne=10,[lu,wt]=Xt(Mt),Mb="SelectContentImpl",uu=x.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:b,sticky:D,hideWhenDetached:g,avoidCollisions:S,...m}=e,f=bt(Mt,n),[h,C]=x.useState(null),[y,E]=x.useState(null),w=le(t,W=>C(W)),[R,A]=x.useState(null),[I,j]=x.useState(null),B=Yr(n),[H,N]=x.useState(!1),_=x.useRef(!1);x.useEffect(()=>{if(h)return xs(h)},[h]),ws();const O=x.useCallback(W=>{const[G,...q]=B().map(F=>F.ref.current),[z]=q.slice(-1),X=document.activeElement;for(const F of W)if(F===X||(F==null||F.scrollIntoView({block:"nearest"}),F===G&&y&&(y.scrollTop=0),F===z&&y&&(y.scrollTop=y.scrollHeight),F==null||F.focus(),document.activeElement!==X))return},[B,y]),$=x.useCallback(()=>O([R,h]),[O,R,h]);x.useEffect(()=>{H&&$()},[H,$]);const{onOpenChange:P,triggerPointerDownPosRef:k}=f;x.useEffect(()=>{if(h){let W={x:0,y:0};const G=z=>{var X,F;W={x:Math.abs(Math.round(z.pageX)-(((X=k.current)==null?void 0:X.x)??0)),y:Math.abs(Math.round(z.pageY)-(((F=k.current)==null?void 0:F.y)??0))}},q=z=>{W.x<=10&&W.y<=10?z.preventDefault():h.contains(z.target)||P(!1),document.removeEventListener("pointermove",G),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",q,{capture:!0})}}},[h,P,k]),x.useEffect(()=>{const W=()=>P(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[P]);const[T,L]=Eu(W=>{const G=B().filter(X=>!X.disabled),q=G.find(X=>X.ref.current===document.activeElement),z=Mu(G,W,q);z&&setTimeout(()=>z.ref.current.focus())}),V=x.useCallback((W,G,q)=>{const z=!_.current&&!q;(f.value!==void 0&&f.value===G||z)&&(A(W),z&&(_.current=!0))},[f.value]),U=x.useCallback(()=>h==null?void 0:h.focus(),[h]),Y=x.useCallback((W,G,q)=>{const z=!_.current&&!q;(f.value!==void 0&&f.value===G||z)&&j(W)},[f.value]),Z=r==="popper"?zo:du,K=Z===zo?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:v,collisionPadding:b,sticky:D,hideWhenDetached:g,avoidCollisions:S}:{};return p.jsx(lu,{scope:n,content:h,viewport:y,onViewportChange:E,itemRefCallback:V,selectedItem:R,onItemLeave:U,itemTextRefCallback:Y,focusSelectedItem:$,selectedItemText:I,position:r,isPositioned:H,searchRef:T,children:p.jsx(Fr,{as:dt,allowPinchZoom:!0,children:p.jsx(jr,{asChild:!0,trapped:f.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:ee(o,W=>{var G;(G=f.trigger)==null||G.focus({preventScroll:!0}),W.preventDefault()}),children:p.jsx(Dn,{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,...K,onPlaced:()=>N(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ee(m.onKeyDown,W=>{const G=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!G&&W.key.length===1&&L(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let z=B().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(W.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const X=W.target,F=z.indexOf(X);z=z.slice(F+1)}setTimeout(()=>O(z)),W.preventDefault()}})})})})})})});uu.displayName=Mb;var Rb="SelectItemAlignedPosition",du=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=bt(Mt,n),i=wt(Mt,n),[a,c]=x.useState(null),[l,d]=x.useState(null),u=le(t,w=>d(w)),v=Yr(n),b=x.useRef(!1),D=x.useRef(!0),{viewport:g,selectedItem:S,selectedItemText:m,focusSelectedItem:f}=i,h=x.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&g&&S&&m){const w=s.trigger.getBoundingClientRect(),R=l.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),I=m.getBoundingClientRect();if(s.dir!=="rtl"){const X=I.left-R.left,F=A.left-X,re=w.left-F,de=w.width+re,Se=Math.max(de,R.width),Ce=window.innerWidth-Ne,Je=ca(F,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.left=Je+"px"}else{const X=R.right-I.right,F=window.innerWidth-A.right-X,re=window.innerWidth-w.right-F,de=w.width+re,Se=Math.max(de,R.width),Ce=window.innerWidth-Ne,Je=ca(F,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.right=Je+"px"}const j=v(),B=window.innerHeight-Ne*2,H=g.scrollHeight,N=window.getComputedStyle(l),_=parseInt(N.borderTopWidth,10),O=parseInt(N.paddingTop,10),$=parseInt(N.borderBottomWidth,10),P=parseInt(N.paddingBottom,10),k=_+O+H+P+$,T=Math.min(S.offsetHeight*5,k),L=window.getComputedStyle(g),V=parseInt(L.paddingTop,10),U=parseInt(L.paddingBottom,10),Y=w.top+w.height/2-Ne,Z=B-Y,K=S.offsetHeight/2,W=S.offsetTop+K,G=_+O+W,q=k-G;if(G<=Y){const X=j.length>0&&S===j[j.length-1].ref.current;a.style.bottom="0px";const F=l.clientHeight-g.offsetTop-g.offsetHeight,re=Math.max(Z,K+(X?U:0)+F+$),de=G+re;a.style.height=de+"px"}else{const X=j.length>0&&S===j[0].ref.current;a.style.top="0px";const re=Math.max(Y,_+g.offsetTop+(X?V:0)+K)+q;a.style.height=re+"px",g.scrollTop=G-Y+g.offsetTop}a.style.margin=`${Ne}px 0`,a.style.minHeight=T+"px",a.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>b.current=!0)}},[v,s.trigger,s.valueNode,a,l,g,S,m,s.dir,r]);ye(()=>h(),[h]);const[C,y]=x.useState();ye(()=>{l&&y(window.getComputedStyle(l).zIndex)},[l]);const E=x.useCallback(w=>{w&&D.current===!0&&(h(),f==null||f(),D.current=!1)},[h,f]);return p.jsx(Ob,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:b,onScrollButtonChange:E,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(se.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});du.displayName=Rb;var Tb="SelectPopperPosition",zo=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ne,...s}=e,i=Ur(n);return p.jsx(Ar,{...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)"}})});zo.displayName=Tb;var[Ob,$s]=Xt(Mt,{}),Wo="SelectViewport",fu=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=wt(Wo,n),i=$s(Wo,n),a=le(t,s.onViewportChange),c=x.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(Vr.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:v}=i;if(v!=null&&v.current&&u){const b=Math.abs(c.current-d.scrollTop);if(b>0){const D=window.innerHeight-Ne*2,g=parseFloat(u.style.minHeight),S=parseFloat(u.style.height),m=Math.max(g,S);if(m<D){const f=m+b,h=Math.min(D,f),C=f-h;u.style.height=h+"px",u.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,u.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});fu.displayName=Wo;var pu="SelectGroup",[Pb,Ab]=Xt(pu),_b=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ft();return p.jsx(Pb,{scope:n,id:o,children:p.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});_b.displayName=pu;var hu="SelectLabel",kb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ab(hu,n);return p.jsx(se.div,{id:o.id,...r,ref:t})});kb.displayName=hu;var vr="SelectItem",[Nb,gu]=Xt(vr),mu=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=bt(vr,n),c=wt(vr,n),l=a.value===r,[d,u]=x.useState(s??""),[v,b]=x.useState(!1),D=le(t,f=>{var h;return(h=c.itemRefCallback)==null?void 0:h.call(c,f,r,o)}),g=ft(),S=x.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(Nb,{scope:n,value:r,disabled:o,textId:g,isSelected:l,onItemTextChange:x.useCallback(f=>{u(h=>h||((f==null?void 0:f.textContent)??"").trim())},[]),children:p.jsx(Vr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:p.jsx(se.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:D,onFocus:ee(i.onFocus,()=>b(!0)),onBlur:ee(i.onBlur,()=>b(!1)),onClick:ee(i.onClick,()=>{S.current!=="mouse"&&m()}),onPointerUp:ee(i.onPointerUp,()=>{S.current==="mouse"&&m()}),onPointerDown:ee(i.onPointerDown,f=>{S.current=f.pointerType}),onPointerMove:ee(i.onPointerMove,f=>{var h;S.current=f.pointerType,o?(h=c.onItemLeave)==null||h.call(c):S.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,f=>{var h;f.currentTarget===document.activeElement&&((h=c.onItemLeave)==null||h.call(c))}),onKeyDown:ee(i.onKeyDown,f=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&f.key===" "||(bb.includes(f.key)&&m(),f.key===" "&&f.preventDefault())})})})})});mu.displayName=vr;var ln="SelectItemText",vu=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=bt(ln,n),a=wt(ln,n),c=gu(ln,n),l=Cb(ln,n),[d,u]=x.useState(null),v=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)}),b=d==null?void 0:d.textContent,D=x.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:b},c.value),[c.disabled,c.value,b]),{onNativeOptionAdd:g,onNativeOptionRemove:S}=l;return ye(()=>(g(D),()=>S(D)),[g,S,D]),p.jsxs(p.Fragment,{children:[p.jsx(se.span,{id:c.textId,...s,ref:v}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?yr.createPortal(s.children,i.valueNode):null]})});vu.displayName=ln;var yu="SelectItemIndicator",bu=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gu(yu,n).isSelected?p.jsx(se.span,{"aria-hidden":!0,...r,ref:t}):null});bu.displayName=yu;var Bo="SelectScrollUpButton",wu=x.forwardRef((e,t)=>{const n=wt(Bo,e.__scopeSelect),r=$s(Bo,e.__scopeSelect),[o,s]=x.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(Su,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});wu.displayName=Bo;var Ho="SelectScrollDownButton",xu=x.forwardRef((e,t)=>{const n=wt(Ho,e.__scopeSelect),r=$s(Ho,e.__scopeSelect),[o,s]=x.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(Su,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});xu.displayName=Ho;var Su=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=wt("SelectScrollButton",n),i=x.useRef(null),a=Yr(n),c=x.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return x.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()})})}),Ib="SelectSeparator",jb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});jb.displayName=Ib;var Vo="SelectArrow",$b=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ur(n),s=bt(Vo,n),i=wt(Vo,n);return s.open&&i.position==="popper"?p.jsx(_r,{...o,...r,ref:t}):null});$b.displayName=Vo;function Cu(e){return e===""||e===void 0}var Du=x.forwardRef((e,t)=>{const{value:n,...r}=e,o=x.useRef(null),s=le(t,o),i=vb(n);return x.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})})});Du.displayName="BubbleSelect";function Eu(e){const t=ke(e),n=x.useRef(""),r=x.useRef(0),o=x.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=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Mu(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=Lb(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 Lb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Fb=tu,zb=ru,Wb=su,Bb=iu,Hb=au,Vb=cu,Yb=fu,Ub=mu,Kb=vu,Gb=bu,qb=wu,Xb=xu;function Zb({...e}){return p.jsx(Fb,{"data-slot":"select",...e})}function Jb({...e}){return p.jsx(Wb,{"data-slot":"select-value",...e})}function Qb({className:e,size:t="default",children:n,...r}){return p.jsxs(zb,{"data-slot":"select-trigger","data-size":t,className:oe("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(Bb,{asChild:!0,children:p.jsx(Qa,{className:"size-4 opacity-50"})})]})}function ew({className:e,children:t,position:n="popper",...r}){return p.jsx(Hb,{children:p.jsxs(Vb,{"data-slot":"select-content",className:oe("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(nw,{}),p.jsx(Yb,{className:oe("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(rw,{})]})})}function tw({className:e,children:t,...n}){return p.jsxs(Ub,{"data-slot":"select-item",className:oe("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(Gb,{children:p.jsx(Ja,{className:"size-4"})})}),p.jsx(Kb,{children:t})]})}function nw({className:e,...t}){return p.jsx(qb,{"data-slot":"select-scroll-up-button",className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Bp,{className:"size-4"})})}function rw({className:e,...t}){return p.jsx(Xb,{"data-slot":"select-scroll-down-button",className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Qa,{className:"size-4"})})}const ow=({options:e,onChange:t})=>p.jsxs(Zb,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[p.jsx(Qb,{className:"w-[180px]",children:p.jsx(Jb,{placeholder:"view"})}),p.jsx(ew,{children:e.map(n=>p.jsx(tw,{value:n.text,children:n.text},n.text))})]}),sw=5,iw=0,Ru=({isEditingOpen:e,side:t,booking:n,onOpenChange:r,children:o})=>{const[s,i]=M.useState({x:0,y:0}),a=An(),{attributes:c,listeners:l,setNodeRef:d,transform:u,setActivatorNodeRef:v}=ts({id:"booking-info-id",data:{type:"booking-info-options"}}),b={transform:`translate3d(${s.x+((u==null?void 0:u.x)||0)}px, ${s.y+((u==null?void 0:u.y)||0)}px, 0)`},D=M.useMemo(()=>[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],[]),g=M.useMemo(()=>`${te.dateAndHourDateToString(n.startAt)} - ${te.dateAndHourDateToString(n.finishAt)}`,[n.startAt,n.finishAt]),S=M.useMemo(()=>{const h=new Date(n.startAt),C=h.getDate(),y=h.getDay(),E=Ge[h.getMonth()];return p.jsx("span",{children:`${Ef[y]}, ${C} ${E}`})},[n.startAt]),m=()=>({backgroundColor:""}),f=async()=>{};return Cr({onDragStart(h){h.active.id&&a.updateIsDragging(!0)},onDragEnd(h){if(h.active.id){const{y:C,x:y}=s;i({x:y+((u==null?void 0:u.x)||0),y:C+((u==null?void 0:u.y)||0)}),a.updateIsDragging(!1)}}}),p.jsxs(pb,{open:e,onOpenChange:r,children:[p.jsx(mb,{style:{width:"100%"},children:p.jsx(hb,{asChild:!0,children:o})}),p.jsx(gb,{ref:d,updatePositionStrategy:"optimized",side:t,align:"start",sticky:"always",sideOffset:sw,alignOffset:iw,style:{...b,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:v,className:"w-full cursor-move",...c,...l}),p.jsx(Qy,{}),p.jsx(Ft,{type:"button",variant:"outline",size:"icon",children:p.jsx(Xp,{className:"h-3 w-3"})}),p.jsx(Ft,{type:"button",variant:"outline",size:"icon",onClick:f,children:p.jsx(eh,{className:"h-3 w-3"})}),p.jsx(ow,{options:D,onChange:()=>{}})]}),p.jsxs("div",{className:"bookingCard_content",children:[p.jsx("div",{children:p.jsx("span",{style:m(),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:[S," | ",g]})})]})]})})]})};Ru.displayName="BookingInfoOptions";function aw(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 cw=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:aw(t,n,r)},lw=({bookingInit:e,slotData:t,heightStyle:n})=>p.jsx(pf,{modifiers:[cw],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(Fo,{booking:e,slotData:t})})}),la=600,uw=15,dw=({booking:e,slotData:t,ref:n})=>{const{bookingViewType:r,optimisticCardUpdate:o}=Oe(),[s,i]=M.useState({...e}),[a,c]=M.useState(!1),[l,d]=M.useState(0),[u,v]=M.useState(!1),b=M.useRef("left"),D=()=>{const N=t.day.split(":")[0].trim();if(r===ce.DAY)b.current="top";else switch(N){case"Mon":case"Sun":b.current="right";break;default:b.current="left";break}v(!0)},{attributes:g,listeners:S,setNodeRef:m,isDragging:f,transform:h}=ts({id:s.id,data:{type:"booking-slots",booking:s,slotData:t}}),C=h?{transform:`translate3d(${h.x}px, ${h.y}px, 0)`}:void 0,y=M.useCallback(N=>{c(!0);const{constraint:_}=N;"delay"in _&&d(_.delay)},[]),E=M.useCallback(()=>{c(!1)},[]);Cr({onDragPending:N=>y(N),onDragAbort:()=>E(),onDragCancel:()=>E(),onDragEnd:()=>E()});const w=a?{animationDuration:`${l}ms`}:{},R=async N=>{try{i(_=>({..._,finishAt:N}))}catch(_){console.log(_)}},A=async N=>{o(s,N,s.finishAt,t),i(_=>({..._,startAt:N}))},I=async N=>{try{i(_=>({..._,finishAt:N}))}catch(_){console.log(_)}},{state:j,heightStyle:B,onResize:H}=Ls({booking:s,onAddTime:R,onAddStartTime:A,onSubTime:I,starter:!0});return M.useImperativeHandle(n,()=>({bookingId:e.id}),[e.id]),p.jsx(p.Fragment,{children:f?p.jsxs(p.Fragment,{children:[p.jsx(lw,{bookingInit:e,slotData:t,heightStyle:`${B}rem`}),p.jsx("div",{className:"isDraggingCard",children:p.jsx(mr,{bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${B}rem`})})]}):p.jsx(es,{children:p.jsx(Ru,{booking:s,onOpenChange:v,side:r===ce.DAY?"top":"left",isEditingOpen:u,children:p.jsx(mr,{ref:m,resizableParam:{state:j,onResize:H,resizeHandle:["s"]},customClasses:oe("Draggable",a&&"pendingDelay"),bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${B}rem`,onClick:D,pendingStyle:w,style:{...C,backgroundColor:"black"},listeners:S,attributes:g})})})})},fw=.2,Ls=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=M.useState({height:la,width:600}),[a,c]=M.useState(o?Math.round(te.timeDiffInSeconds(e.finishAt,e.startAt)/7.5):2),l=h=>h%8===0,d=h=>h>=18,u=h=>{const C=h>=8&&h<=10,y=h%2===0;return C&&l(h)&&y},v=async(h=["se","s"])=>{if(h.includes("n")){const C=D(e.startAt,"remove");n&&n(C)}else{const C=D(e.finishAt,"add");c(y=>{const E=Math.round(y)+2;return u(E)||d(E)?E+fw:E}),t&&t(C)}},b=async()=>{const h=D(e.finishAt,"remove");te.timeDiffInSeconds(e.finishAt,e.startAt)!==uw&&(c(y=>(y>10,y-2)),r&&r(h))},D=(h,C)=>{const y=new Date(h),E=y.getMinutes();return C==="add"&&y.setMinutes(E+15),C==="remove"&&y.setMinutes(E-15),y};return{state:s,setState:i,resetState:()=>{i({height:la,width:600})},resetHeightStyle:()=>{c(2)},heightStyle:a,onResize:(h,{size:C,handle:y})=>{switch(h.stopPropagation(),h.preventDefault(),y){case"se":case"s":{i(E=>(Number(E.height)<Number(C.height)&&v(),Number(E.height)>Number(C.height)&&b(),{...E,height:C.height,width:C.width}));break}case"n":{i(E=>(Number(C.height)>Number(E.height)&&v(["n"]),{...E,height:C.height,width:C.width}));break}}},updateHeightStyle:(h,C)=>{c(te.timeDiffInSeconds(h,C)/7.3)}}},pw=({slotData:e,events:{onClick:t,renderPreviewCard:n,resetPrevView:r}})=>{const{startAt:o}=za(_=>_),[s,i]=M.useState(0),[a,c]=M.useState(te.addMinutesToHour(e.time,15)),[l,d]=M.useState(!1),u=M.useRef(null);M.useEffect(()=>{s!==0&&s>20&&(d(!0),n())},[s,n]);const v=M.useMemo(()=>te.convertStringTimeToDateFormat(o),[o]),b=M.useMemo(()=>te.convertStringTimeToDateFormat(a),[a]),D=M.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:v,finishAt:b,createdAt:new Date,updatedAt:new Date}),[b,v]),g=()=>{u.current||(u.current=setInterval(()=>{i(_=>_+1)},10))},S=M.useCallback(()=>{u.current&&(i(0),clearInterval(u.current),u.current=null)},[]),m=()=>{s<20?(t(),S(),B()):(S(),t(a),B())},f=async _=>{c(te.dateTimeAsString(_))},h=async _=>{c(te.dateTimeAsString(_))},{state:C,resetState:y,resetHeightStyle:E,heightStyle:w,onResize:R,updateHeightStyle:A}=Ls({booking:D,onAddTime:f,onSubTime:h});M.useEffect(()=>{A(b,v)},[b,v,A]);const I=()=>{B()},j=M.useCallback(()=>{c(te.addMinutesToHour(e.time,15))},[e.time]),B=M.useCallback(()=>{d(!1),y(),j(),E(),r()},[j,E,r,y]);M.useEffect(()=>()=>{S(),B()},[]);const H=Oe(_=>_.bookingViewType),N=l?{backgroundColor:"white",border:"none"}:{};return p.jsx("div",{style:{...N},className:oe("timeInfo_core",N),children:p.jsx(Wl.Resizable,{className:"slot-resizable",height:C.height,width:C.width,onResizeStart:g,onResizeStop:m,onResize:R,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:l?p.jsx("div",{className:"timeInfo_core_dragging",children:p.jsx(mr,{customClasses:"dragging-effect",bookingInit:D,bookingViewType:H,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${w}rem`,resizableParam:{state:C,onResize:R,customClass:"show-handle"},events:{onUnmount:I}})}):p.jsx("div",{className:"timeInfo_core_timeParent",children:p.jsx("span",{className:"timeInfo_core_timeParent_time",children:e.time})})})})},qn=({slotData:e,slotPosition:t,disabledCss:n,events:r,border:o,actualTimerIndicatorChildren:s,children:i,ref:a})=>{const{updateIsDelayActive:c,isDragging:l,updateIsDragging:d}=An(z=>z),{emptySlotNodes:u,setSelectedNode:v}=zt(),{onModalClose:b,onSlotClick:D}=Ct(),{finishAt:g,startAt:S,updateStartAt:m,updateFinishAt:f,updateDate:h}=za(z=>z),C=Oe(z=>z.bookingViewType),y=M.useMemo(()=>te.convertStringTimeToDateFormat(S),[S]),E=M.useMemo(()=>te.convertStringTimeToDateFormat(g),[g]),w=M.useMemo(()=>{const z=te.convertStringTimeToDateFormat(g);return{id:"3",startAt:te.convertStringTimeToDateFormat(S),finishAt:z}},[g,S]),{updateHeightStyle:R,heightStyle:A}=Ls({booking:w}),[I,j]=M.useState(!1),[B,H]=M.useState(!1),[N,_]=M.useState(!1),[O,$]=M.useState(!1),P=M.useRef(null);M.useEffect(()=>{R(E,y)},[E,y,R]);const k=M.useCallback(()=>{if(l||B)return;r.onMouseEnterEvent()===t&&_(!0)},[t,r,l,B]),T=z=>{d(!1),c(!0);const X=lr(e),F=u==null?void 0:u.get(X);F&&F.closeEvent(),b==null||b(),z.stopPropagation(),z.preventDefault(),H(!1)},L=z=>{c(!0),j(z),_(z),H(z)},V=M.useCallback((z,X=15)=>{const F=te.addMinutesToHour(z,X);f(F)},[f]),U=M.useCallback(z=>{if(l&&!z)return;d(!1);const{time:X,key:F}=e;D({time:X,key:F});const re=lr({key:F,time:X}),de=u==null?void 0:u.get(re);v(re),de&&de.showEvent(),h(F),m(X),V(z||X,z?0:15),H(!0)},[e,h,m,V,u,l,v,d,D]),Y=()=>{l||B||_(!1)},Z=n.length||O?n:"hovering_slotTrigger_core",K=o?"slotTrigger_core_border":"",W=M.useCallback(()=>{const{time:z,key:X}=e;d(!0),$(!0),h(X),m(z),V(z)},[V,e,h,d,m]),G=()=>{H(!0)};M.useEffect(()=>{I&&P!=null&&P.current&&P.current.scrollIntoView({behavior:"smooth",block:"center"})},[I]),M.useEffect(()=>{i||_(!1)},[i]),M.useImperativeHandle(a,()=>({showEvent:()=>{_(!1),c(!1),H(!0),j(!0)},closeEvent:()=>{H(!1),j(!1),_(!1),q()},onOpenCloseChange:z=>{_(z),j(z),q()}}));const q=M.useCallback(()=>{$(!1)},[]);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{ref:e.ref,style:e.style,className:oe("slotTrigger_core",C===ce.DAY&&"slotTrigger_core_day",K,Z),onMouseOver:k,onMouseLeave:Y,onFocus:()=>{},children:[s,(!i&&N&&!I||O)&&p.jsx(pw,{slotData:e,events:{onClick:U,openOptions:G,renderPreviewCard:W,resetPrevView:q}}),I&&p.jsx("div",{style:{width:"100%"},children:p.jsx(mr,{ref:P,bookingInit:w,bookingViewType:C,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${A}rem`})}),i]},e.key),B&&p.jsx(es,{children:p.jsx(Gy,{onClose:T,onOpenChange:L,buttonTrigger:p.jsx("div",{},e.key)})})]})};var hw="Separator",ua="horizontal",gw=["horizontal","vertical"],Tu=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=ua,...o}=e,s=mw(r)?r:ua,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})});Tu.displayName=hw;function mw(e){return gw.includes(e)}var vw=Tu;function bo({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(vw,{"data-slot":"separator-root",decorative:n,orientation:t,className:oe("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 yw{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 bw{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 Xn=({tailwindColor:e,isFirstDay:t,slotData:n})=>{const{timesRendered:r,bookingViewType:o}=Oe(),[s,i]=M.useState(!1),[a,c]=M.useState(""),l=M.useMemo(()=>{const S=new Date().getDay();return new Date(n.key).getDay()===S},[n.key]);M.useEffect(()=>{const g=n.time,S=new bw,m=()=>{const h=new Date,C=S.normalizeDateNow(h),y=te.dateAndHourDateToString(h);c(y),i(C===g)};let f;return S.is15MinLess(g)||(f=setInterval(()=>m(),1e3)),()=>clearInterval(f)},[n.time]);const d=M.useMemo(()=>new yw().positionBasedOnSeconds(n.time,a,r),[n.time,a,r]),u=M.useMemo(()=>t?o==="DAY"?"w-[101%]":"w-[100vw]":o==="DAY"?"w-[102%]":"w-[104%]",[t,o]);return s?p.jsx(p.Fragment,{children:l?p.jsx("div",{style:{top:`${d-2}px`},className:oe("absolute right-0 z-100",t?"left-[-18px] w-[102%]":"w-[104%] left-[-3px]",u),children:p.jsxs("div",{className:"relative",children:[p.jsx(bo,{style:{height:"4px"},className:e}),t&&p.jsx("div",{className:"absolute left-0 top-[-3px] cursor-pointer",children:p.jsx(bo,{orientation:"vertical",style:{height:"11px"},className:e})}),p.jsx(da,{isRendered:t,dateToRender:a})]})}):p.jsxs("div",{style:{top:`${d-1}px`},className:oe("absolute right-0 z-100",t?"left-[-18px]":"left-[-9px]",u),children:[p.jsx(bo,{style:{height:"2px"},className:e}),p.jsx(da,{isRendered:t,dateToRender:a})]})}):void 0},da=({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})})})})},fa=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=zt(),d=Zn({bookings:e,blockTimeString:"00",slotData:a}),u=Zn({bookings:e,blockTimeString:"15",slotData:a}),v=Zn({bookings:e,blockTimeString:"30",slotData:a}),b=Zn({bookings:e,blockTimeString:"45",slotData:a}),D=M.useCallback((g,S)=>{if(!g)return;const m=lr(S);l.get(m)||c(g,S)},[c,l]);return p.jsxs(p.Fragment,{children:[p.jsx(qn,{ref:g=>D(g,{key:t.key,time:t.time}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",actualTimerIndicatorChildren:p.jsx(Xn,{tailwindColor:"bg-black",isFirstDay:i,slotData:t}),children:d}),p.jsx(qn,{ref:g=>D(g,{key:n.key,time:n.time}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},border:!0,slotPosition:"second",actualTimerIndicatorChildren:p.jsx(Xn,{tailwindColor:"bg-black",isFirstDay:i,slotData:n}),children:u}),p.jsx(qn,{ref:g=>D(g,{key:r.key,time:r.time}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",actualTimerIndicatorChildren:p.jsx(Xn,{tailwindColor:"bg-black",isFirstDay:i,slotData:r}),children:v}),p.jsx(qn,{ref:g=>D(g,{key:o.key,time:o.time}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",actualTimerIndicatorChildren:p.jsx(Xn,{tailwindColor:"bg-black",isFirstDay:i,slotData:o}),children:b})]})},Zn=({bookings:e,blockTimeString:t,slotData:n})=>M.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(dw,{booking:r,slotData:n})}return null},[t,e,n]),ww=({dayHour:e,lunchTimeBlock:t,firstDay:n,bookingBulk:r,bookingViewType:o})=>{const s=An(R=>R.isDragging),i=M.useRef(""),a=R=>R===t.startAt||R===t.finishAt?(i.current="slot_disabled",!0):!1,c=te.addMinuteToHour(e.hour,15),l=te.addMinuteToHour(e.hour,30),d=te.addMinuteToHour(e.hour,45),{isOver:u,setNodeRef:v}=$n({id:`${te.newDateKey(e.day,e.hour)}`,data:{accepts:["booking-slots"]},disabled:a(e.hour)||s}),{isOver:b,setNodeRef:D}=$n({id:`${te.newDateKey(e.day,c)}`,data:{accepts:["booking-slots"]},disabled:a(c)||s}),{isOver:g,setNodeRef:S}=$n({id:`${te.newDateKey(e.day,l)}`,data:{accepts:["booking-slots"]},disabled:a(l)||s}),{isOver:m,setNodeRef:f}=$n({id:`${te.newDateKey(e.day,d)}`,data:{accepts:["booking-slots"]},disabled:a(d)||s}),h=M.useMemo(()=>({ref:v,style:{backgroundColor:u?"#0066ff":""},key:te.newDateKey(e.day,e.hour),time:e.hour}),[e.day,e.hour,u,v]),C=M.useMemo(()=>({ref:D,style:{backgroundColor:b?"#0066ff":""},key:te.newDateKey(e.day,c),time:c}),[e.day,b,c,D]),y=M.useMemo(()=>({ref:S,style:{backgroundColor:g?"#0066ff":""},key:te.newDateKey(e.day,l),time:l}),[e.day,g,S,l]),E=M.useMemo(()=>({ref:f,style:{backgroundColor:m?"#0066ff":""},key:te.newDateKey(e.day,d),time:d}),[e.day,d,m,f]),w=M.useMemo(()=>{const{day:R,hour:A}=e,I=r.filter(j=>{const B=te.dateAndHourDateToString(j.startAt),H=new Date(j.startAt).getDate(),N=new Date(R).getDate(),_=A.split(":")[0];return B.split(":")[0]===_&&H===N});return I.length?p.jsx(fa,{dayHour:e,bookings:I,first:h,second:C,third:y,fourth:E,disabledCss:i.current,firstDay:n}):p.jsx(fa,{first:h,second:C,third:y,fourth:E,disabledCss:i.current,firstDay:n})},[r,e,n,h,E,C,y]);return p.jsx("td",{className:oe("slot",o===ce.WEEK&&"slotWeek"),children:w},`${e.day}-${e.hour}-slot`)};function xw({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:oe("w-full caption-bottom text-sm",e),...t})})}function Sw({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:oe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const Cw=({hour:e,ref:t})=>{const n="Set lunch interval",r="Remove lunch interval",o="Hour options",s=M.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",oe("activateVisibilityTime",a))};return M.useImperativeHandle(t,()=>({setDisabledHour:i,setActivateHour:c})),p.jsxs(Ps,{children:[p.jsx(As,{children:p.jsx("span",{ref:s,className:oe(a),children:e})}),p.jsxs(_s,{children:[p.jsx(Sy,{children:o}),p.jsx(Cy,{}),p.jsx(ji,{children:n}),p.jsx(ji,{children:r})]})]})},Dw=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=Oe(),{selectedNode:s,emptySlotNodes:i}=zt(),[a]=M.useState({startAt:"12:00",finishAt:"12:30"}),c=M.useCallback((v,b)=>{v&&o(v,b)},[o]),l=M.useMemo(()=>n===ce.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),d=M.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]);return M.useEffect(()=>{if(s){const v=i.get(s);v&&v.showEvent()}},[s,i]),M.useMemo(()=>{const v=b=>b===0;return p.jsx("div",{className:oe("calendarCore",n===ce.WEEK&&"calendarCore_max"),children:p.jsx(xw,{children:e.map(b=>p.jsxs("tr",{children:[p.jsx(Sw,{style:{...d,...l,padding:0,position:"relative"},className:"calendarCore_cell",children:p.jsx("div",{className:"calendarCore_actions",children:p.jsx(Cw,{ref:D=>c(D,b),hour:b})})},`${b}-hour`),t.map((D,g)=>p.jsx(ww,{dayHour:{day:String(D),hour:b},lunchTimeBlock:a,firstDay:v(g),bookingBulk:r.booking,bookingViewType:n},`${D}-${b}-slot-content`))]},`${b}-content`))})})},[l,e,a,d,r,c,n,t])},Ew=({bookingViewType:e})=>M.useMemo(()=>{switch(e){case ce.DAY:case ce.WEEK:return p.jsx(Dw,{});default:return null}},[e]),Mw=({children:e,...t})=>{const n=M.useRef(null);return n.current||(n.current=Wu(t)),p.jsx(If,{value:n.current,children:e})},Rw=({children:e,...t})=>p.jsx(nc,{value:{...t},children:e}),Ou={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},Tw=e=>br(t=>({...e,...Ou,updateMonthMessage:n=>{t(r=>({...r,...n}))}})),Ow=({children:e,...t})=>{const n=M.useRef(null);return n.current||(n.current=Tw(t)),p.jsx(La,{value:n.current,children:e})},Pw={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},Aw=()=>{const{isDelayActive:e}=An(g=>g),{bookings:t}=Ct(),n=M.useMemo(()=>({delay:e?500:0,tolerance:100}),[e]),{setBookingBulkData:r,optimisticCardUpdate:o}=Oe(),{onCardDropCallback:s}=Ct();M.useEffect(()=>{r({user:Pw,booking:t})},[t,r]);const i=ed(Gs(Pa,{activationConstraint:n}),Gs(Aa,{activationConstraint:n})),{bookingViewType:a,daysOfWeek:c}=Oe(),l=M.useCallback(g=>{const{active:S}=g;S.id},[]),d=(g,S)=>{const m=Number(new Date(S))-Number(new Date(g)),f=Math.floor(m/1e3/60),h=Math.floor(f/60),C=f%60;return`${h}:${C.toString().padStart(2,"0")}`},u=(g,S)=>{const m=new Date(g),f=S.split(":"),h=Number(f[0]),C=Number(f[1]);return m.setHours(m.getHours()+h),m.setMinutes(m.getMinutes()+C),m},v=(g,S)=>{const m=new Date(S),f=d(g.startAt,g.finishAt),h=u(S,f);return{newStartAt:m,newFinishDate:h}},b=async(g,S,m)=>{try{const{newStartAt:f,newFinishDate:h}=v(g,S);o(g,f,h,m),await s(g,S,m)}catch(f){console.warn(f)}},D=g=>{const{over:S,active:m}=g;if(S&&m){const f=S.data.current,h=m.data.current;h&&f&&f.accepts.includes(h.type)&&h.booking.id&&S.id&&b(h.booking,String(S.id),h.slotData)}};return p.jsx("div",{className:"calendarHolder",children:p.jsx(Ow,{...Ou,children:p.jsxs("div",{className:"calendarHolder_parent",children:[p.jsx(Ty,{}),p.jsxs("div",{className:"calendarHolder_parent_content",children:[p.jsx(Ep,{daysOfWeek:c,bookingViewType:a}),p.jsx(es,{onDragEnd:D,onDragStart:l,sensors:i,children:p.jsx(Ew,{bookingViewType:a})})]})]})})})},_w=({viewModes:e,createBookingModal:t,onChangeViewType:n,onCardDropCallback:r,onDayChange:o,onTodayClick:s,onSlotClick:i,onModalClose:a,bookings:c,ref:l})=>(M.useImperativeHandle(l,()=>({getStatus:()=>!0})),p.jsx(Mw,{...ha,children:p.jsx(Rw,{createBookingModal:t,viewModes:e,onChangeViewType:n,onTodayClick:s,onCardDropCallback:r,onDayChange:o,onSlotClick:i,onModalClose:a,bookings:c,children:p.jsx($f,{...Eo,children:p.jsx(Aw,{})})})})),kw=e=>{console.log("creating a calendar instance");const t=M.useRef(null);return{getCalendar:()=>p.jsx(_w,{ref:t,...e})}};exports.useCalendarInstance=kw;
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;