react-beauty-calendar 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,128 +1,108 @@
1
- "use strict";var Vu=Object.defineProperty;var Uu=(e,t,n)=>t in e?Vu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var at=(e,t,n)=>Uu(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),R=require("react");function Yu(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=Yu(R),qs=e=>{let t;const n=new Set,r=(l,d)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const f=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(g=>g(t,f))}},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?qs(e):qs,Ku=e=>e;function Go(e,t=Ku){const n=R.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return R.useDebugValue(n),n}const Xs=e=>{const t=Sr(e),n=r=>Go(t,r);return Object.assign(n,t),n},qo=e=>e?Xs(e):Xs,wa={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},Gu=e=>Sr(t=>({...wa,...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)}))}));function xa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qu(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 Fn={exports:{}},ye={};/**
2
- * @license React
3
- * react-dom.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Zs;function Xu(){if(Zs)return ye;Zs=1;var e=R;function t(c){var l="https://react.dev/errors/"+c;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+c+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(c,l,d){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:u==null?null:""+u,children:c,containerInfo:l,implementation:d}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,l){if(c==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return ye.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ye.createPortal=function(c,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return s(c,l,null,d)},ye.flushSync=function(c){var l=i.T,d=r.p;try{if(i.T=null,r.p=2,c)return c()}finally{i.T=l,r.p=d,r.d.f()}},ye.preconnect=function(c,l){typeof c=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,r.d.C(c,l))},ye.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},ye.preinit=function(c,l){if(typeof c=="string"&&l&&typeof l.as=="string"){var d=l.as,u=a(d,l.crossOrigin),f=typeof l.integrity=="string"?l.integrity:void 0,g=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;d==="style"?r.d.S(c,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:u,integrity:f,fetchPriority:g}):d==="script"&&r.d.X(c,{crossOrigin:u,integrity:f,fetchPriority:g,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},ye.preinitModule=function(c,l){if(typeof c=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var d=a(l.as,l.crossOrigin);r.d.M(c,{crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&r.d.M(c)},ye.preload=function(c,l){if(typeof c=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var d=l.as,u=a(d,l.crossOrigin);r.d.L(c,d,{crossOrigin:u,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},ye.preloadModule=function(c,l){if(typeof c=="string")if(l){var d=a(l.as,l.crossOrigin);r.d.m(c,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else r.d.m(c)},ye.requestFormReset=function(c){r.d.r(c)},ye.unstable_batchedUpdates=function(c,l){return c(l)},ye.useFormState=function(c,l,d){return i.H.useFormState(c,l,d)},ye.useFormStatus=function(){return i.H.useHostTransitionStatus()},ye.version="19.0.0",ye}var be={};/**
10
- * @license React
11
- * react-dom.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Js;function Zu(){return Js||(Js=1,process.env.NODE_ENV!=="production"&&function(){function e(){}function t(u){return""+u}function n(u,f,g){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(C);var v=!1}catch{v=!0}return v&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object"),t(C)),{$$typeof:l,key:C==null?null:""+C,children:u,containerInfo:f,implementation:g}}function r(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}function o(u){return u===null?"`null`":u===void 0?"`undefined`":u===""?"an empty string":'something with type "'+typeof u+'"'}function s(u){return u===null?"`null`":u===void 0?"`undefined`":u===""?"an empty string":typeof u=="string"?JSON.stringify(u):typeof u=="number"?"`"+u+"`":'something with type "'+typeof u+'"'}function i(){var u=d.H;return u===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
18
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
19
- 2. You might be breaking the Rules of Hooks
20
- 3. You might have more than one copy of React in the same app
21
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=R,c={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},l=Symbol.for("react.portal"),d=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),be.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,be.createPortal=function(u,f){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error("Target container is not a DOM element.");return n(u,f,null,g)},be.flushSync=function(u){var f=d.T,g=c.p;try{if(d.T=null,c.p=2,u)return u()}finally{d.T=f,c.p=g,c.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},be.preconnect=function(u,f){typeof u=="string"&&u?f!=null&&typeof f!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",s(f)):f!=null&&typeof f.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",o(f.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(u)),typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,c.d.C(u,f))},be.prefetchDNS=function(u){if(typeof u!="string"||!u)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(u));else if(1<arguments.length){var f=arguments[1];typeof f=="object"&&f.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",s(f)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",s(f))}typeof u=="string"&&c.d.D(u)},be.preinit=function(u,f){if(typeof u=="string"&&u?f==null||typeof f!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",s(f)):f.as!=="style"&&f.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',s(f.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(u)),typeof u=="string"&&f&&typeof f.as=="string"){var g=f.as,C=r(g,f.crossOrigin),v=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;g==="style"?c.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:C,integrity:v,fetchPriority:S}):g==="script"&&c.d.X(u,{crossOrigin:C,integrity:v,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},be.preinitModule=function(u,f){var g="";if(typeof u=="string"&&u||(g+=" The `href` argument encountered was "+o(u)+"."),f!==void 0&&typeof f!="object"?g+=" The `options` argument encountered was "+o(f)+".":f&&"as"in f&&f.as!=="script"&&(g+=" The `as` option encountered was "+s(f.as)+"."),g)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",g);else switch(g=f&&typeof f.as=="string"?f.as:"script",g){case"script":break;default:g=s(g),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',g,u)}typeof u=="string"&&(typeof f=="object"&&f!==null?(f.as==null||f.as==="script")&&(g=r(f.as,f.crossOrigin),c.d.M(u,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})):f==null&&c.d.M(u))},be.preload=function(u,f){var g="";if(typeof u=="string"&&u||(g+=" The `href` argument encountered was "+o(u)+"."),f==null||typeof f!="object"?g+=" The `options` argument encountered was "+o(f)+".":typeof f.as=="string"&&f.as||(g+=" The `as` option encountered was "+o(f.as)+"."),g&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',g),typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){g=f.as;var C=r(g,f.crossOrigin);c.d.L(u,g,{crossOrigin:C,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},be.preloadModule=function(u,f){var g="";typeof u=="string"&&u||(g+=" The `href` argument encountered was "+o(u)+"."),f!==void 0&&typeof f!="object"?g+=" The `options` argument encountered was "+o(f)+".":f&&"as"in f&&typeof f.as!="string"&&(g+=" The `as` option encountered was "+o(f.as)+"."),g&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',g),typeof u=="string"&&(f?(g=r(f.as,f.crossOrigin),c.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0})):c.d.m(u))},be.requestFormReset=function(u){c.d.r(u)},be.unstable_batchedUpdates=function(u,f){return u(f)},be.useFormState=function(u,f,g){return i().useFormState(u,f,g)},be.useFormStatus=function(){return i().useHostTransitionStatus()},be.version="19.0.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),be}var Qs;function Xo(){if(Qs)return Fn.exports;Qs=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}return process.env.NODE_ENV==="production"?(e(),Fn.exports=Xu()):Fn.exports=Zu(),Fn.exports}var Ve=Xo();const Ju=xa(Ve),Cr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Zo(e){return"nodeType"in e}function xe(e){var t,n;return e?Yt(e)?e:Zo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Jo(e){const{Document:t}=xe(e);return e instanceof t}function Sn(e){return Yt(e)?!1:e instanceof xe(e).HTMLElement}function Sa(e){return e instanceof xe(e).SVGElement}function Kt(e){return e?Yt(e)?e.document:Zo(e)?Jo(e)?e:Sn(e)||Sa(e)?e.ownerDocument:document:document:document}const qe=Cr?R.useLayoutEffect:R.useEffect;function Dr(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 Qu(){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 gn(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return qe(()=>{n.current!==e&&(n.current=e)},t),n}function Cn(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ir(e){const t=Dr(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function ar(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let Jr={};function Er(e,t){return R.useMemo(()=>{if(t)return t;const n=Jr[e]==null?0:Jr[e]+1;return Jr[e]=n,e+"-"+n},[e,t])}function Ca(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 $t=Ca(1),cr=Ca(-1);function ed(e){return"clientX"in e&&"clientY"in e}function Qo(e){if(!e)return!1;const{KeyboardEvent:t}=xe(e.target);return t&&e instanceof t}function td(e){if(!e)return!1;const{TouchEvent:t}=xe(e.target);return t&&e instanceof t}function lr(e){if(td(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ed(e)?{x:e.clientX,y:e.clientY}:null}const mn=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[mn.Translate.toString(e),mn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ei="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function nd(e){return e.matches(ei)?e:e.querySelector(ei)}const rd={display:"none"};function od(e){let{id:t,value:n}=e;return R.createElement("div",{id:t,style:rd},n)}function sd(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 id(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Da=R.createContext(null);function Rr(e){const t=R.useContext(Da);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function ad(){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 cd={draggable:`
1
+ "use strict";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 ha(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=ha(M),br=ha(Ue),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 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},wr=e=>e?Us(e):Us,zu=e=>e;function Uo(e,t=zu){const n=M.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return M.useDebugValue(n),n}const Ks=e=>{const t=wr(e),n=r=>Uo(t,r);return Object.assign(n,t),n},Ko=e=>e?Ks(e):Ks,ga={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},Wu=e=>wr(t=>({...ga,...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)}))})),xr=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 Go(e){return"nodeType"in e}function be(e){var t,n;return e?Vt(e)?e:Go(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function qo(e){const{Document:t}=be(e);return e instanceof t}function wn(e){return Vt(e)?!1:e instanceof be(e).HTMLElement}function ma(e){return e instanceof be(e).SVGElement}function Yt(e){return e?Vt(e)?e.document:Go(e)?qo(e)?e:wn(e)||ma(e)?e.ownerDocument:document:document:document}const Ke=xr?M.useLayoutEffect:M.useEffect;function Sr(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=Sr(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 Xr={};function Cr(e,t){return M.useMemo(()=>{if(t)return t;const n=Xr[e]==null?0:Xr[e]+1;return Xr[e]=n,e+"-"+n},[e,t])}function va(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=va(1),sr=va(-1);function Hu(e){return"clientX"in e&&"clientY"in e}function Xo(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}}}),Gs="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(Gs)?e:e.querySelector(Gs)}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 ya=M.createContext(null);function Dr(e){const t=M.useContext(ya);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:`
22
2
  To pick up a draggable item, press the space bar.
23
3
  While dragging, use the arrow keys to move the item.
24
4
  Press space again to drop the item in its new position, or press escape to cancel.
25
- `},ld={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 ud(e){let{announcements:t=ld,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=cd}=e;const{announce:s,announcement:i}=id(),a=Er("DndLiveRegion"),[c,l]=R.useState(!1);if(R.useEffect(()=>{l(!0)},[]),Rr(R.useMemo(()=>({onDragStart(u){let{active:f}=u;s(t.onDragStart({active:f}))},onDragMove(u){let{active:f,over:g}=u;t.onDragMove&&s(t.onDragMove({active:f,over:g}))},onDragOver(u){let{active:f,over:g}=u;s(t.onDragOver({active:f,over:g}))},onDragEnd(u){let{active:f,over:g}=u;s(t.onDragEnd({active:f,over:g}))},onDragCancel(u){let{active:f,over:g}=u;s(t.onDragCancel({active:f,over:g}))}}),[s,t])),!c)return null;const d=R.createElement(R.Fragment,null,R.createElement(od,{id:r,value:o.draggable}),R.createElement(sd,{id:a,announcement:i}));return n?Ve.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 ur(){}function ti(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function dd(){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 Le=Object.freeze({x:0,y:0});function fd(e,t){const n=lr(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 pd(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function hd(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function gd(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 md=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=gd(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(pd)};function vd(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ea(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Le}function yd(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 bd=yd(1);function Ra(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 wd(e,t,n){const r=Ra(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 xd={ignoreTransform:!1};function Dn(e,t){t===void 0&&(t=xd);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:d}=xe(e).getComputedStyle(e);l&&(n=wd(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 ni(e){return Dn(e,{ignoreTransform:!0})}function Sd(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Cd(e,t){return t===void 0&&(t=xe(e).getComputedStyle(e)),t.position==="fixed"}function Dd(e,t){t===void 0&&(t=xe(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 es(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Jo(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Sn(o)||Sa(o)||n.includes(o))return n;const s=xe(e).getComputedStyle(o);return o!==e&&Dd(o,s)&&n.push(o),Cd(o,s)?n:r(o.parentNode)}return e?r(e):n}function Ta(e){const[t]=es(e,1);return t??null}function Qr(e){return!Cr||!e?null:Yt(e)?e:Zo(e)?Jo(e)||e===Kt(e).scrollingElement?window:Sn(e)?e:null:null}function Ma(e){return Yt(e)?e.scrollX:e.scrollLeft}function Oa(e){return Yt(e)?e.scrollY:e.scrollTop}function Co(e){return{x:Ma(e),y:Oa(e)}}var ge;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ge||(ge={}));function Pa(e){return!Cr||!e?!1:e===document.scrollingElement}function Aa(e){const t={x:0,y:0},n=Pa(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 Ed={x:.2,y:.2};function Rd(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=Ed);const{isTop:l,isBottom:d,isLeft:u,isRight:f}=Aa(e),g={x:0,y:0},C={x:0,y:0},v={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+v.height?(g.y=ge.Backward,C.y=r*Math.abs((t.top+v.height-s)/v.height)):!d&&c>=t.bottom-v.height&&(g.y=ge.Forward,C.y=r*Math.abs((t.bottom-v.height-c)/v.height)),!f&&a>=t.right-v.width?(g.x=ge.Forward,C.x=r*Math.abs((t.right-v.width-a)/v.width)):!u&&i<=t.left+v.width&&(g.x=ge.Backward,C.x=r*Math.abs((t.left+v.width-i)/v.width)),{direction:g,speed:C}}function Td(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 _a(e){return e.reduce((t,n)=>$t(t,Co(n)),Le)}function Md(e){return e.reduce((t,n)=>t+Ma(n),0)}function Od(e){return e.reduce((t,n)=>t+Oa(n),0)}function Na(e,t){if(t===void 0&&(t=Dn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Ta(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Pd=[["x",["left","right"],Md],["y",["top","bottom"],Od]];class ts{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=es(n),o=_a(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of Pd)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 fn{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 Ad(e){const{EventTarget:t}=xe(e);return e instanceof t?e:Kt(e)}function eo(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Ne;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ne||(Ne={}));function ri(e){e.preventDefault()}function _d(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 ka={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter,ue.Tab]},Nd=(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 Ia{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 fn(Kt(n)),this.windowListeners=new fn(xe(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ne.Resize,this.handleCancel),this.windowListeners.add(Ne.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ne.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Na(r),n(Le)}handleKeyDown(t){if(Qo(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=ka,coordinateGetter:i=Nd,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}:Le;this.referenceCoordinates||(this.referenceCoordinates=d);const u=i(t,{active:n,context:r.current,currentCoordinates:d});if(u){const f=cr(u,d),g={x:0,y:0},{scrollableAncestors:C}=r.current;for(const v of C){const S=t.code,{isTop:y,isRight:p,isLeft:m,isBottom:D,maxScroll:b,minScroll:E}=Aa(v),w=Td(v),T={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&&!p||S===ue.Left&&!m,I=S===ue.Down&&!D||S===ue.Up&&!y;if(A&&T.x!==u.x){const j=v.scrollLeft+f.x,B=S===ue.Right&&j<=b.x||S===ue.Left&&j>=E.x;if(B&&!f.y){v.scrollTo({left:j,behavior:a});return}B?g.x=v.scrollLeft-j:g.x=S===ue.Right?v.scrollLeft-b.x:v.scrollLeft-E.x,g.x&&v.scrollBy({left:-g.x,behavior:a});break}else if(I&&T.y!==u.y){const j=v.scrollTop+f.y,B=S===ue.Down&&j<=b.y||S===ue.Up&&j>=E.y;if(B&&!f.x){v.scrollTo({top:j,behavior:a});return}B?g.y=v.scrollTop-j:g.y=S===ue.Down?v.scrollTop-b.y:v.scrollTop-E.y,g.y&&v.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,$t(cr(u,this.referenceCoordinates),g))}}}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()}}Ia.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ka,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 oi(e){return!!(e&&"distance"in e)}function si(e){return!!(e&&"delay"in e)}class ns{constructor(t,n,r){var o;r===void 0&&(r=Ad(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=Kt(i),this.documentListeners=new fn(this.document),this.listeners=new fn(r),this.windowListeners=new fn(xe(i)),this.initialCoordinates=(o=lr(s))!=null?o:Le,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(Ne.Resize,this.handleCancel),this.windowListeners.add(Ne.DragStart,ri),this.windowListeners.add(Ne.VisibilityChange,this.handleCancel),this.windowListeners.add(Ne.ContextMenu,ri),this.documentListeners.add(Ne.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(si(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(oi(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(Ne.Click,_d,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ne.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=lr(t))!=null?n:Le,l=cr(o,c);if(!r&&a){if(oi(a)){if(a.tolerance!=null&&eo(l,a.tolerance))return this.handleCancel();if(eo(l,a.distance))return this.handleStart()}if(si(a)&&eo(l,a.tolerance))return this.handleCancel();this.handlePending(a,l);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const kd={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ja extends ns{constructor(t){const{event:n}=t,r=Kt(n.target);super(t,kd,r)}}ja.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 Id={move:{name:"mousemove"},end:{name:"mouseup"}};var Do;(function(e){e[e.RightClick=2]="RightClick"})(Do||(Do={}));class La extends ns{constructor(t){super(t,Id,Kt(t.event.target))}}La.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Do.RightClick?!1:(r==null||r({event:n}),!0)}}];const to={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class $a extends ns{constructor(t){super(t,to)}static setup(){return window.addEventListener(to.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(to.move.name,t)};function t(){}}}$a.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 pn;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(pn||(pn={}));var dr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(dr||(dr={}));function jd(e){let{acceleration:t,activator:n=pn.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=dr.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:u,threshold:f}=e;const g=$d({delta:u,disabled:!s}),[C,v]=Qu(),S=R.useRef({x:0,y:0}),y=R.useRef({x:0,y:0}),p=R.useMemo(()=>{switch(n){case pn.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case pn.DraggableRect:return o}},[n,o,c]),m=R.useRef(null),D=R.useCallback(()=>{const E=m.current;if(!E)return;const w=S.current.x*y.current.x,T=S.current.y*y.current.y;E.scrollBy(w,T)},[]),b=R.useMemo(()=>a===dr.TreeOrder?[...l].reverse():l,[a,l]);R.useEffect(()=>{if(!s||!l.length||!p){v();return}for(const E of b){if((r==null?void 0:r(E))===!1)continue;const w=l.indexOf(E),T=d[w];if(!T)continue;const{direction:A,speed:I}=Rd(E,T,p,t,f);for(const j of["x","y"])g[j][A[j]]||(I[j]=0,A[j]=0);if(I.x>0||I.y>0){v(),m.current=E,C(D,i),S.current=I,y.current=A;return}}S.current={x:0,y:0},y.current={x:0,y:0},v()},[t,D,r,v,s,i,JSON.stringify(p),JSON.stringify(g),C,l,b,d,JSON.stringify(f)])}const Ld={x:{[ge.Backward]:!1,[ge.Forward]:!1},y:{[ge.Backward]:!1,[ge.Forward]:!1}};function $d(e){let{delta:t,disabled:n}=e;const r=ar(t);return Cn(o=>{if(n||!r||!o)return Ld;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 Fd(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Cn(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function zd(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 vn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(vn||(vn={}));var Eo;(function(e){e.Optimized="optimized"})(Eo||(Eo={}));const ii=new Map;function Wd(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=S(),f=gn(u),g=R.useCallback(function(y){y===void 0&&(y=[]),!f.current&&i(p=>p===null?y:p.concat(y.filter(m=>!p.includes(m))))},[f]),C=R.useRef(null),v=Cn(y=>{if(u&&!n)return ii;if(!y||y===ii||d.current!==e||s!=null){const p=new Map;for(let m of e){if(!m)continue;if(s&&s.length>0&&!s.includes(m.id)&&m.rect.current){p.set(m.id,m.rect.current);continue}const D=m.node.current,b=D?new ts(c(D),D):null;m.rect.current=b,b&&p.set(m.id,b)}return p}return y},[e,s,n,u,c]);return R.useEffect(()=>{d.current=e},[e]),R.useEffect(()=>{u||g()},[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(()=>{g(),C.current=null},a))},[a,u,g,...r]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:s!=null};function S(){switch(l){case vn.Always:return!1;case vn.BeforeDragging:return n;default:return!n}}}function rs(e,t){return Cn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Bd(e,t){return rs(e,t)}function Hd(e){let{callback:t,disabled:n}=e;const r=Dr(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Tr(e){let{callback:t,disabled:n}=e;const r=Dr(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Vd(e){return new ts(Dn(e),e)}function ai(e,t,n){t===void 0&&(t=Vd);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=Hd({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 Ud(e){const t=rs(e);return Ea(e,t)}const ci=[];function Yd(e){const t=R.useRef(e),n=Cn(r=>e?r&&r!==ci&&e&&t.current&&e.parentNode===t.current.parentNode?r:es(e):ci,[e]);return R.useEffect(()=>{t.current=e},[e]),n}function Kd(e){const[t,n]=R.useState(null),r=R.useRef(e),o=R.useCallback(s=>{const i=Qr(s.target);i&&n(a=>a?(a.set(i,Co(i)),new Map(a)):null)},[]);return R.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=Qr(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,Co(l)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const l=Qr(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>$t(s,i),Le):_a(e):Le,[e,t])}function li(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==Le;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?cr(e,n.current):Le}function Gd(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 qd(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 Fa(e){return R.useMemo(()=>e?Sd(e):null,[e])}const ui=[];function Xd(e,t){t===void 0&&(t=Dn);const[n]=e,r=Fa(n?xe(n):null),[o,s]=R.useState(ui);function i(){s(()=>e.length?e.map(c=>Pa(c)?r:new ts(t(c),c)):ui)}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 za(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Sn(t)?t:e}function Zd(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(l=>{for(const{target:d}of l)if(Sn(d)){r(u=>{const f=t(d);return u?{...u,width:f.width,height:f.height}:f});break}},[t]),s=Tr({callback:o}),i=R.useCallback(l=>{const d=za(l);s==null||s.disconnect(),d&&(s==null||s.observe(d)),r(d?t(d):null)},[t,s]),[a,c]=ir(i);return R.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Jd=[{sensor:ja,options:{}},{sensor:Ia,options:{}}],Qd={current:{}},tr={draggable:{measure:ni},droppable:{measure:ni,strategy:vn.WhileDragging,frequency:Eo.Optimized},dragOverlay:{measure:Dn}};class hn 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 ef={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new hn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ur},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:tr,measureDroppableContainers:ur,windowRect:null,measuringScheduled:!1},Wa={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ur,draggableNodes:new Map,over:null,measureDroppableContainers:ur},En=R.createContext(Wa),Ba=R.createContext(ef);function tf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new hn}}}function nf(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 hn(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 hn(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 hn(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function rf(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(En),s=ar(r),i=ar(n==null?void 0:n.id);return R.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=nd(d);if(u){u.focus();break}}})}},[r,t,o,i,s]),null}function Ha(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function of(e){return R.useMemo(()=>({draggable:{...tr.draggable,...e==null?void 0:e.draggable},droppable:{...tr.droppable,...e==null?void 0:e.droppable},dragOverlay:{...tr.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 sf(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=Ea(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 f=Ta(l);f&&f.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Mr=R.createContext({...Le,scaleX:1,scaleY:1});var ft;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ft||(ft={}));const os=R.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:d=Jd,collisionDetection:u=md,measuring:f,modifiers:g,...C}=t;const v=R.useReducer(nf,void 0,tf),[S,y]=v,[p,m]=ad(),[D,b]=R.useState(ft.Uninitialized),E=D===ft.Initialized,{draggable:{active:w,nodes:T,translate:A},droppable:{containers:I}}=S,j=w!=null?T.get(w):null,B=R.useRef({initial:null,translated:null}),H=R.useMemo(()=>{var ve;return w!=null?{id:w,data:(ve=j==null?void 0:j.data)!=null?ve:Qd,rect:B}:null},[w,j]),k=R.useRef(null),[_,O]=R.useState(null),[L,P]=R.useState(null),N=gn(C,Object.values(C)),M=Er("DndDescribedBy",i),$=R.useMemo(()=>I.getEnabled(),[I]),V=of(f),{droppableRects:Y,measureDroppableContainers:U,measuringScheduled:Z}=Wd($,{dragging:E,dependencies:[A.x,A.y],config:V.droppable}),K=Fd(T,w),W=R.useMemo(()=>L?lr(L):null,[L]),G=Hu(),q=Bd(K,V.draggable.measure);sf({activeNode:w!=null?T.get(w):null,config:G.layoutShiftCompensation,initialRect:q,measure:V.draggable.measure});const z=ai(K,V.draggable.measure,q),X=ai(K?K.parentElement:null),F=R.useRef({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=I.getNodeFor((n=F.current.over)==null?void 0:n.id),de=Zd({measure:V.dragOverlay.measure}),De=(r=de.nodeRef.current)!=null?r:K,Ee=E?(o=de.rect)!=null?o:z:null,et=!!(de.nodeRef.current&&de.rect),jn=Ud(et?null:z),tt=Fa(De?xe(De):null),nt=Yd(E?oe??K:null),Ln=Xd(nt),$n=Ha(g,{transform:{x:A.x-jn.x,y:A.y-jn.y,scaleX:1,scaleY:1},activatorEvent:L,active:H,activeNodeRect:z,containerNodeRect:X,draggingNodeRect:Ee,over:F.current.over,overlayNodeRect:de.rect,scrollableAncestors:nt,scrollableAncestorRects:Ln,windowRect:tt}),Hs=W?$t(W,A):null,Vs=Kd(nt),ju=li(Vs),Lu=li(Vs,[z]),At=$t($n,ju),_t=Ee?bd(Ee,$n):null,Qt=H&&_t?u({active:H,collisionRect:_t,droppableRects:Y,droppableContainers:$,pointerCoordinates:Hs}):null,Us=hd(Qt,"id"),[rt,Ys]=R.useState(null),$u=et?$n:$t($n,Lu),Fu=vd($u,(s=rt==null?void 0:rt.rect)!=null?s:null,z),Xr=R.useRef(null),Ks=R.useCallback((ve,Re)=>{let{sensor:Te,options:ot}=Re;if(k.current==null)return;const _e=T.get(k.current);if(!_e)return;const Me=ve.nativeEvent,ze=new Te({active:k.current,activeNode:_e,event:Me,options:ot,context:F,onAbort(me){if(!T.get(me))return;const{onDragAbort:We}=N.current,Ge={id:me};We==null||We(Ge),p({type:"onDragAbort",event:Ge})},onPending(me,st,We,Ge){if(!T.get(me))return;const{onDragPending:tn}=N.current,it={id:me,constraint:st,initialCoordinates:We,offset:Ge};tn==null||tn(it),p({type:"onDragPending",event:it})},onStart(me){const st=k.current;if(st==null)return;const We=T.get(st);if(!We)return;const{onDragStart:Ge}=N.current,en={activatorEvent:Me,active:{id:st,data:We.data,rect:B}};Ve.unstable_batchedUpdates(()=>{Ge==null||Ge(en),b(ft.Initializing),y({type:pe.DragStart,initialCoordinates:me,active:st}),p({type:"onDragStart",event:en}),O(Xr.current),P(Me)})},onMove(me){y({type:pe.DragMove,coordinates:me})},onEnd:Nt(pe.DragEnd),onCancel:Nt(pe.DragCancel)});Xr.current=ze;function Nt(me){return async function(){const{active:We,collisions:Ge,over:en,scrollAdjustedTranslate:tn}=F.current;let it=null;if(We&&tn){const{cancelDrop:nn}=N.current;it={activatorEvent:Me,active:We,collisions:Ge,delta:tn,over:en},me===pe.DragEnd&&typeof nn=="function"&&await Promise.resolve(nn(it))&&(me=pe.DragCancel)}k.current=null,Ve.unstable_batchedUpdates(()=>{y({type:me}),b(ft.Uninitialized),Ys(null),O(null),P(null),Xr.current=null;const nn=me===pe.DragEnd?"onDragEnd":"onDragCancel";if(it){const Zr=N.current[nn];Zr==null||Zr(it),p({type:nn,event:it})}})}}},[T]),zu=R.useCallback((ve,Re)=>(Te,ot)=>{const _e=Te.nativeEvent,Me=T.get(ot);if(k.current!==null||!Me||_e.dndKit||_e.defaultPrevented)return;const ze={active:Me};ve(Te,Re.options,ze)===!0&&(_e.dndKit={capturedBy:Re.sensor},k.current=ot,Ks(Te,Re))},[T,Ks]),Gs=zd(d,zu);Gd(d),qe(()=>{z&&D===ft.Initializing&&b(ft.Initialized)},[z,D]),R.useEffect(()=>{const{onDragMove:ve}=N.current,{active:Re,activatorEvent:Te,collisions:ot,over:_e}=F.current;if(!Re||!Te)return;const Me={active:Re,activatorEvent:Te,collisions:ot,delta:{x:At.x,y:At.y},over:_e};Ve.unstable_batchedUpdates(()=>{ve==null||ve(Me),p({type:"onDragMove",event:Me})})},[At.x,At.y]),R.useEffect(()=>{const{active:ve,activatorEvent:Re,collisions:Te,droppableContainers:ot,scrollAdjustedTranslate:_e}=F.current;if(!ve||k.current==null||!Re||!_e)return;const{onDragOver:Me}=N.current,ze=ot.get(Us),Nt=ze&&ze.rect.current?{id:ze.id,rect:ze.rect.current,data:ze.data,disabled:ze.disabled}:null,me={active:ve,activatorEvent:Re,collisions:Te,delta:{x:_e.x,y:_e.y},over:Nt};Ve.unstable_batchedUpdates(()=>{Ys(Nt),Me==null||Me(me),p({type:"onDragOver",event:me})})},[Us]),qe(()=>{F.current={activatorEvent:L,active:H,activeNode:K,collisionRect:_t,collisions:Qt,droppableRects:Y,draggableNodes:T,draggingNode:De,draggingNodeRect:Ee,droppableContainers:I,over:rt,scrollableAncestors:nt,scrollAdjustedTranslate:At},B.current={initial:Ee,translated:_t}},[H,K,Qt,_t,T,De,Ee,Y,I,rt,nt,At]),jd({...G,delta:A,draggingRect:_t,pointerCoordinates:Hs,scrollableAncestors:nt,scrollableAncestorRects:Ln});const Wu=R.useMemo(()=>({active:H,activeNode:K,activeNodeRect:z,activatorEvent:L,collisions:Qt,containerNodeRect:X,dragOverlay:de,draggableNodes:T,droppableContainers:I,droppableRects:Y,over:rt,measureDroppableContainers:U,scrollableAncestors:nt,scrollableAncestorRects:Ln,measuringConfiguration:V,measuringScheduled:Z,windowRect:tt}),[H,K,z,L,Qt,X,de,T,I,Y,rt,U,nt,Ln,V,Z,tt]),Bu=R.useMemo(()=>({activatorEvent:L,activators:Gs,active:H,activeNodeRect:z,ariaDescribedById:{draggable:M},dispatch:y,draggableNodes:T,over:rt,measureDroppableContainers:U}),[L,Gs,H,z,y,M,T,rt,U]);return R.createElement(Da.Provider,{value:m},R.createElement(En.Provider,{value:Bu},R.createElement(Ba.Provider,{value:Wu},R.createElement(Mr.Provider,{value:Fu},l)),R.createElement(rf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),R.createElement(ud,{...a,hiddenTextDescribedById:M}));function Hu(){const ve=(_==null?void 0:_.autoScrollEnabled)===!1,Re=typeof c=="object"?c.enabled===!1:c===!1,Te=E&&!ve&&!Re;return typeof c=="object"?{...c,enabled:Te}:{enabled:Te}}}),af=R.createContext(null),di="button",cf="Draggable";function ss(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Er(cf),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:u,over:f}=R.useContext(En),{role:g=di,roleDescription:C="draggable",tabIndex:v=0}=o??{},S=(c==null?void 0:c.id)===t,y=R.useContext(S?Mr:af),[p,m]=ir(),[D,b]=ir(),E=qd(i,t),w=gn(n);qe(()=>(u.set(t,{id:t,key:s,node:p,activatorNode:D,data:w}),()=>{const A=u.get(t);A&&A.key===s&&u.delete(t)}),[u,t]);const T=R.useMemo(()=>({role:g,tabIndex:v,"aria-disabled":r,"aria-pressed":S&&g===di?!0:void 0,"aria-roledescription":C,"aria-describedby":d.draggable}),[r,g,v,S,C,d.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:T,isDragging:S,listeners:r?void 0:E,node:p,over:f,setNodeRef:m,setActivatorNodeRef:b,transform:y}}function lf(){return R.useContext(Ba)}const uf="Droppable",df={timeout:25};function zn(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Er(uf),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=R.useContext(En),d=R.useRef({disabled:n}),u=R.useRef(!1),f=R.useRef(null),g=R.useRef(null),{disabled:C,updateMeasurementsFor:v,timeout:S}={...df,...o},y=gn(v??r),p=R.useCallback(()=>{if(!u.current){u.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{l(Array.isArray(y.current)?y.current:[y.current]),g.current=null},S)},[S]),m=Tr({callback:p,disabled:C||!i}),D=R.useCallback((T,A)=>{m&&(A&&(m.unobserve(A),u.current=!1),T&&m.observe(T))},[m]),[b,E]=ir(D),w=gn(t);return R.useEffect(()=>{!m||!b.current||(m.disconnect(),u.current=!1,m.observe(b.current))},[b,m]),R.useEffect(()=>(a({type:pe.RegisterDroppable,element:{id:r,key:s,disabled:n,node:b,rect:f,data:w}}),()=>a({type:pe.UnregisterDroppable,key:s,id:r})),[r]),R.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:f,isOver:(c==null?void 0:c.id)===r,node:b,over:c,setNodeRef:E}}function ff(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[s,i]=R.useState(null),a=ar(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 pf={x:0,y:0,scaleX:1,scaleY:1};function hf(e){let{children:t}=e;return R.createElement(En.Provider,{value:Wa},R.createElement(Mr.Provider,{value:pf},t))}const gf={position:"fixed",touchAction:"none"},mf=e=>Qo(e)?"transform 250ms ease":void 0,vf=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:d=mf}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},f={...gf,width:a.width,height:a.height,top:a.top,left:a.left,transform:mn.Transform.toString(u),transformOrigin:o&&r?fd(r,a):void 0,transition:typeof d=="function"?d(r):d,...c};return R.createElement(n,{className:i,style:f,ref:t},s)}),yf=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)}},bf=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:mn.Transform.toString(t)},{transform:mn.Transform.toString(n)}]},wf={duration:250,easing:"ease",keyframes:bf,sideEffects:yf({styles:{active:{opacity:"0"}}})};function xf(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Dr((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=za(i);if(!l)return;const{transform:d}=xe(i).getComputedStyle(i),u=Ra(d);if(!u)return;const f=typeof t=="function"?t:Sf(t);return Na(c,o.draggable.measure),f({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 Sf(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...wf,...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},f={x:c.x-d.x,y:c.y-d.y,...u},g=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:f}}),[C]=g,v=g[g.length-1];if(JSON.stringify(C)===JSON.stringify(v))return;const S=r==null?void 0:r({active:i,dragOverlay:a,...l}),y=a.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(p=>{y.onfinish=()=>{S==null||S(),p()}})}}let fi=0;function Cf(e){return R.useMemo(()=>{if(e!=null)return fi++,fi},[e])}const Df=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:f,containerNodeRect:g,draggableNodes:C,droppableContainers:v,dragOverlay:S,over:y,measuringConfiguration:p,scrollableAncestors:m,scrollableAncestorRects:D,windowRect:b}=lf(),E=R.useContext(Mr),w=Cf(u==null?void 0:u.id),T=Ha(i,{activatorEvent:d,active:u,activeNodeRect:f,containerNodeRect:g,draggingNodeRect:S.rect,over:y,overlayNodeRect:S.rect,scrollableAncestors:m,scrollableAncestorRects:D,transform:E,windowRect:b}),A=rs(f),I=xf({config:r,draggableNodes:C,droppableContainers:v,measuringConfiguration:p}),j=A?S.setRef:void 0;return R.createElement(hf,null,R.createElement(ff,{animation:I},u&&w?R.createElement(vf,{key:w,id:u.id,ref:j,as:a,activatorEvent:d,adjustScale:t,className:c,transition:s,rect:A,style:{zIndex:l,...o},transform:T},n):null))}),ce={DAY:"DAY",WEEK:"WEEK",TABLE:"TABLE",MONTH:"MONTH"},Xe=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Va=6e4,pi=Symbol.for("constructDateFrom");function Ef(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&pi in e?e[pi](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ro(e,t){return Ef(e,e)}function Rf(e,t,n){const r=Ro(e);return r.setTime(r.getTime()+t*Va),r}function Tf(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function Mf(e,t){return+Ro(e)-+Ro(t)}function Of(e,t,n){const r=Mf(e,t)/Va;return Tf(n==null?void 0:n.roundingMethod)(r)}function Pf(e,t,n){return Rf(e,-t)}var nr={exports:{}},Af=nr.exports,hi;function _f(){return hi||(hi=1,function(e,t){(function(n,r){e.exports=r()})(Af,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",d="week",u="month",f="quarter",g="year",C="date",v="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={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(k){var _=["th","st","nd","rd"],O=k%100;return"["+k+(_[(O-20)%10]||_[O]||_[0])+"]"}},m=function(k,_,O){var L=String(k);return!L||L.length>=_?k:""+Array(_+1-L.length).join(O)+k},D={s:m,z:function(k){var _=-k.utcOffset(),O=Math.abs(_),L=Math.floor(O/60),P=O%60;return(_<=0?"+":"-")+m(L,2,"0")+":"+m(P,2,"0")},m:function k(_,O){if(_.date()<O.date())return-k(O,_);var L=12*(O.year()-_.year())+(O.month()-_.month()),P=_.clone().add(L,u),N=O-P<0,M=_.clone().add(L+(N?-1:1),u);return+(-(L+(O-P)/(N?P-M:M-P))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:u,y:g,w:d,d:l,D:C,h:c,m:a,s:i,ms:s,Q:f}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},b="en",E={};E[b]=p;var w="$isDayjsObject",T=function(k){return k instanceof B||!(!k||!k[w])},A=function k(_,O,L){var P;if(!_)return b;if(typeof _=="string"){var N=_.toLowerCase();E[N]&&(P=N),O&&(E[N]=O,P=N);var M=_.split("-");if(!P&&M.length>1)return k(M[0])}else{var $=_.name;E[$]=_,P=$}return!L&&P&&(b=P),P||!L&&b},I=function(k,_){if(T(k))return k.clone();var O=typeof _=="object"?_:{};return O.date=k,O.args=arguments,new B(O)},j=D;j.l=A,j.i=T,j.w=function(k,_){return I(k,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var B=function(){function k(O){this.$L=A(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[w]=!0}var _=k.prototype;return _.parse=function(O){this.$d=function(L){var P=L.date,N=L.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 M=P.match(S);if(M){var $=M[2]-1||0,V=(M[7]||"0").substring(0,3);return N?new Date(Date.UTC(M[1],$,M[3]||1,M[4]||0,M[5]||0,M[6]||0,V)):new Date(M[1],$,M[3]||1,M[4]||0,M[5]||0,M[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()!==v},_.isSame=function(O,L){var P=I(O);return this.startOf(L)<=P&&P<=this.endOf(L)},_.isAfter=function(O,L){return I(O)<this.startOf(L)},_.isBefore=function(O,L){return this.endOf(L)<I(O)},_.$g=function(O,L,P){return j.u(O)?this[L]:this.set(P,O)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(O,L){var P=this,N=!!j.u(L)||L,M=j.p(O),$=function(q,z){var X=j.w(P.$u?Date.UTC(P.$y,z,q):new Date(P.$y,z,q),P);return N?X:X.endOf(l)},V=function(q,z){return j.w(P.toDate()[q].apply(P.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(z)),P)},Y=this.$W,U=this.$M,Z=this.$D,K="set"+(this.$u?"UTC":"");switch(M){case g:return N?$(1,0):$(31,11);case u:return N?$(1,U):$(0,U+1);case d:var W=this.$locale().weekStart||0,G=(Y<W?Y+7:Y)-W;return $(N?Z-G:Z+(6-G),U);case l:case C: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,L){var P,N=j.p(O),M="set"+(this.$u?"UTC":""),$=(P={},P[l]=M+"Date",P[C]=M+"Date",P[u]=M+"Month",P[g]=M+"FullYear",P[c]=M+"Hours",P[a]=M+"Minutes",P[i]=M+"Seconds",P[s]=M+"Milliseconds",P)[N],V=N===l?this.$D+(L-this.$W):L;if(N===u||N===g){var Y=this.clone().set(C,1);Y.$d[$](V),Y.init(),this.$d=Y.set(C,Math.min(this.$D,Y.daysInMonth())).$d}else $&&this.$d[$](V);return this.init(),this},_.set=function(O,L){return this.clone().$set(O,L)},_.get=function(O){return this[j.p(O)]()},_.add=function(O,L){var P,N=this;O=Number(O);var M=j.p(L),$=function(U){var Z=I(N);return j.w(Z.date(Z.date()+Math.round(U*O)),N)};if(M===u)return this.set(u,this.$M+O);if(M===g)return this.set(g,this.$y+O);if(M===l)return $(1);if(M===d)return $(7);var V=(P={},P[a]=r,P[c]=o,P[i]=n,P)[M]||1,Y=this.$d.getTime()+O*V;return j.w(Y,this)},_.subtract=function(O,L){return this.add(-1*O,L)},_.format=function(O){var L=this,P=this.$locale();if(!this.isValid())return P.invalidDate||v;var N=O||"YYYY-MM-DDTHH:mm:ssZ",M=j.z(this),$=this.$H,V=this.$m,Y=this.$M,U=P.weekdays,Z=P.months,K=P.meridiem,W=function(z,X,F,oe){return z&&(z[X]||z(L,N))||F[X].slice(0,oe)},G=function(z){return j.s($%12||12,z,"0")},q=K||function(z,X,F){var oe=z<12?"AM":"PM";return F?oe.toLowerCase():oe};return N.replace(y,function(z,X){return X||function(F){switch(F){case"YY":return String(L.$y).slice(-2);case"YYYY":return j.s(L.$y,4,"0");case"M":return Y+1;case"MM":return j.s(Y+1,2,"0");case"MMM":return W(P.monthsShort,Y,Z,3);case"MMMM":return W(Z,Y);case"D":return L.$D;case"DD":return j.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return W(P.weekdaysMin,L.$W,U,2);case"ddd":return W(P.weekdaysShort,L.$W,U,3);case"dddd":return U[L.$W];case"H":return String($);case"HH":return j.s($,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return q($,V,!0);case"A":return q($,V,!1);case"m":return String(V);case"mm":return j.s(V,2,"0");case"s":return String(L.$s);case"ss":return j.s(L.$s,2,"0");case"SSS":return j.s(L.$ms,3,"0");case"Z":return M}return null}(z)||M.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(O,L,P){var N,M=this,$=j.p(L),V=I(O),Y=(V.utcOffset()-this.utcOffset())*r,U=this-V,Z=function(){return j.m(M,V)};switch($){case g:N=Z()/12;break;case u:N=Z();break;case f:N=Z()/3;break;case d:N=(U-Y)/6048e5;break;case l:N=(U-Y)/864e5;break;case c:N=U/o;break;case a:N=U/r;break;case i:N=U/n;break;default:N=U}return P?N:j.a(N)},_.daysInMonth=function(){return this.endOf(u).$D},_.$locale=function(){return E[this.$L]},_.locale=function(O,L){if(!O)return this.$L;var P=this.clone(),N=A(O,L,!0);return N&&(P.$L=N),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()},k}(),H=B.prototype;return I.prototype=H,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",g],["$D",C]].forEach(function(k){H[k[1]]=function(_){return this.$g(_,k[0],k[1])}}),I.extend=function(k,_){return k.$i||(k(_,B,I),k.$i=!0),I},I.locale=A,I.isDayjs=T,I.unix=function(k){return I(1e3*k)},I.en=E[b],I.Ls=E,I.p={},I})}(nr)),nr.exports}var Nf=_f();const gi=xa(Nf),To=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],kf=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],te={findIndexToStart(e=new Date){const t=To[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return To.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 Of(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`${Xe[e[0].getMonth()].slice(0,3)} - ${Xe[e[1].getMonth()].slice(0,3)}`},timeDiffInSeconds(e,t){const n=gi(e),r=gi(t);return n.diff(r)/6e4},subtractMinutes(e,t){return Pf(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}},If=(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)}}),jf=(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},Lf="08:00",$f="23:30",Ff=60,no=te.generateWeekDays(),zf=(e,t)=>({hours:jf(Lf,$f,Ff),selectedDay:null,daysOfWeek:no.week,firstDayOfWeek:no.firstDayOfWeek,lastDayOfWeek:no.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=Wf(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})})}}),Wf=(e,t)=>t||(e?new Date(e):new Date),Bf=(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}}),Ae=qo()((...e)=>({...zf(...e),...If(...e),...Bf(...e)})),Ua=R.createContext(null),is=e=>{const t=R.use(Ua);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Go(t,e)},Hf=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o,selectedDay:s}=Ae(),{updateMonthMessage:i}=is(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:f}=o(),g=f.getMonth(),C=g!==u.getMonth()?te.shortMonthDescription(f,u):Xe[g];i({monthMessage:C});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:Xe[l.getMonth()]})};return{onViewTypeChange:a}},Vf=R.createContext(null),Mo={date:"",startAt:"",finishAt:""},Uf=e=>Sr(t=>({...Mo,...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(Mo)})),Ya=R.createContext(null),Yf=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Uf(t)),h.jsx(Ya,{value:n.current,children:e})},Ka=e=>{const t=R.use(Ya);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Go(t,e)};function Ga(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=Ga(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ga(e))&&(r&&(r+=" "),r+=t);return r}const as="-",Kf=e=>{const t=qf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(as);return a[0]===""&&a.length!==1&&a.shift(),Xa(a,t)||Gf(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Xa=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Xa(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(as);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},mi=/^\[(.+)\]$/,Gf=e=>{if(mi.test(e)){const t=mi.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)Oo(n[o],r,o,t);return r},Oo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:vi(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Xf(o)){Oo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Oo(i,vi(t,s),n,r)})})},vi=(e,t)=>{let n=e;return t.split(as).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)}}},Po="!",Ao=":",Jf=Ao.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 v=o[C];if(i===0&&a===0){if(v===Ao){s.push(o.slice(c,C)),c=C+Jf;continue}if(v==="/"){l=C;continue}}v==="["?i++:v==="]"?i--:v==="("?a++:v===")"&&a--}const d=s.length===0?o:o.substring(c),u=ep(d),f=u!==d,g=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:g}};if(t){const o=t+Ao,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(Po)?e.substring(0,e.length-1):e.startsWith(Po)?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:f,hasImportantModifier:g,baseClassName:C,maybePostfixModifierPosition:v}=n(d);if(u){c=d+(c.length>0?" "+c:c);continue}let S=!!v,y=r(S?C.substring(0,v):C);if(!y){if(!S){c=d+(c.length>0?" "+c:c);continue}if(y=r(C),!y){c=d+(c.length>0?" "+c:c);continue}S=!1}const p=s(f).join(":"),m=g?p+Po:p,D=m+y;if(i.includes(D))continue;i.push(D);const b=o(y,S);for(let E=0;E<b.length;++E){const w=b[E];i.push(m+w)}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=Za(t))&&(r&&(r+=" "),r+=n);return r}const Za=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Za(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 he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qa=/^\((?:(\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)),Ct=e=>!!e&&Number.isInteger(Number(e)),yi=e=>e.endsWith("%")&&re(e.slice(0,-1)),ct=e=>cp.test(e),pp=()=>!0,hp=e=>lp.test(e)&&!up.test(e),cs=()=>!1,gp=e=>dp.test(e),mp=e=>fp.test(e),vp=e=>!J(e)&&!Q(e),yp=e=>Gt(e,nc,cs),J=e=>Ja.test(e),Dt=e=>Gt(e,rc,hp),ro=e=>Gt(e,Op,re),bp=e=>Gt(e,ec,cs),wp=e=>Gt(e,tc,mp),xp=e=>Gt(e,cs,gp),Q=e=>Qa.test(e),Wn=e=>qt(e,rc),Sp=e=>qt(e,Pp),Cp=e=>qt(e,ec),Dp=e=>qt(e,nc),Ep=e=>qt(e,tc),Rp=e=>qt(e,Ap,!0),Gt=(e,t,n)=>{const r=Ja.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},qt=(e,t,n=!1)=>{const r=Qa.exec(e);return r?r[1]?t(r[1]):n:!1},ec=e=>e==="position",Tp=new Set(["image","url"]),tc=e=>Tp.has(e),Mp=new Set(["length","size","percentage"]),nc=e=>Mp.has(e),rc=e=>e==="length",Op=e=>e==="number",Pp=e=>e==="family-name",Ap=e=>e==="shadow",_p=()=>{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"),f=he("drop-shadow"),g=he("blur"),C=he("perspective"),v=he("aspect"),S=he("ease"),y=he("animate"),p=()=>["auto","avoid","all","avoid-page","page","left","right","column"],m=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],E=()=>[Q,J,c],w=()=>[kt,"full","auto",...E()],T=()=>[Ct,"none","subgrid",Q,J],A=()=>["auto",{span:["full",Ct,Q,J]},Q,J],I=()=>[Ct,"auto",Q,J],j=()=>["auto","min","max","fr",Q,J],B=()=>["start","end","center","between","around","evenly","stretch","baseline"],H=()=>["start","end","center","stretch"],k=()=>["auto",...E()],_=()=>[kt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],O=()=>[e,Q,J],L=()=>[yi,Dt],P=()=>["","none","full",l,Q,J],N=()=>["",re,Wn,Dt],M=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["","none",g,Q,J],Y=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q,J],U=()=>["none",re,Q,J],Z=()=>["none",re,Q,J],K=()=>[re,Q,J],W=()=>[kt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ct],breakpoint:[ct],color:[pp],container:[ct],"drop-shadow":[ct],ease:["in","out","in-out"],font:[vp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ct],shadow:[ct],spacing:["px",re],text:[ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kt,J,Q,v]}],container:["container"],columns:[{columns:[re,J,Q,a]}],"break-after":[{"break-after":p()}],"break-before":[{"break-before":p()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...m(),J,Q]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],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:[Ct,"auto",Q,J]}],basis:[{basis:[kt,"full","auto",a,...E()]}],"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:[Ct,"first","last","none",Q,J]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":T()}],"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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],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,Wn,Dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Q,ro]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yi,J]}],"font-family":[{font:[Sp,J,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,J]}],"line-clamp":[{"line-clamp":[re,"none",Q,ro]}],leading:[{leading:[s,...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:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Q,Dt]}],"text-decoration-color":[{decoration:O()}],"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: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:[...m(),Cp,bp]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Dp,yp]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ct,Q,J],radial:["",Q,J],conic:[Ct,Q,J]},Ep,wp]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"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:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":N()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"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:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,Q,J]}],"outline-w":[{outline:["",re,Wn,Dt]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",d,Rp,xp]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",Q,J,u]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[re,Dt]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":O()}],opacity:[{opacity:[re,Q,J]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",Q,J]}],blur:[{blur:V()}],brightness:[{brightness:[re,Q,J]}],contrast:[{contrast:[re,Q,J]}],"drop-shadow":[{"drop-shadow":["","none",f,Q,J]}],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":V()}],"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":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:[re,"initial",Q,J]}],ease:[{ease:["linear","initial",S,Q,J]}],delay:[{delay:[re,Q,J]}],animate:[{animate:["none",y,Q,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Q,J]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],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:Y()}],"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:[re,Wn,Dt,ro]}],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","*","**"]}},Np=ip(_p);function ne(...e){return Np(qa(e))}const kp="_calendarHeader_ocihc_1",Ip={calendarHeader:kp},jp=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=Ae(),{updateMonthMessage:o}=is(d=>d),s=t===ce.DAY?"text-start":"text-center",i=t===ce.TABLE&&"justify-self-start",a=R.useCallback(d=>{const u=n(d);if(!u)return;const f={month:u.getMonth(),fullYear:u.getFullYear(),monthMessage:Xe[u.getMonth()]};o(f),r(ce.DAY)},[n,o,r]),c=R.useMemo(()=>{const d=u=>new Date(u).toDateString()===new Date().toDateString();return e.map(u=>{const f=To[new Date(u).getDay()];return h.jsx("th",{className:ne("min-w-[12rem] w-[100vw]",t!==ce.DAY&&"max-w-[2rem]"),children:h.jsxs("div",{className:ne("flex flex-col gap-[3px] text-gray-500 ",s,i),children:[h.jsx("span",{className:ne(d(u)&&"text-purple-500"),children:f}),h.jsx("div",{className:"w-full",children:h.jsx("button",{type:"button",className:ne("hover:cursor-pointer",d(u)?"bg-purple-500 text-white rounded-full p-1":"hover:bg-gray-100 hover:border hover:border-gray-300 p-2 border-none rounded-full"),onClick:()=>a(u),children:te.formatDate(u.toDateString())})})]})},f)})},[e,s,a,i,t]),l=h.jsx("th",{className:ne(Ip.calendarHeader,i),children:h.jsx("div",{className:"max-w-[4rem] min-w-[4rem] h-16 w-16"})},"emptyBlocks");return h.jsx("table",{className:"min-w-full w-full bg-white no-border-sides",children:h.jsx("tbody",{children:h.jsxs("tr",{children:[l,c]})})})};/**
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=Cr("DndLiveRegion"),[c,l]=M.useState(!1);if(M.useEffect(()=>{l(!0)},[]),Dr(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 qs(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 ba(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 wa(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=wa(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 Xs(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 Zo(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(qo(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!wn(o)||ma(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 xa(e){const[t]=Zo(e,1);return t??null}function Zr(e){return!xr||!e?null:Vt(e)?e:Go(e)?qo(e)||e===Yt(e).scrollingElement?window:wn(e)?e:null:null}function Sa(e){return Vt(e)?e.scrollX:e.scrollLeft}function Ca(e){return Vt(e)?e.scrollY:e.scrollTop}function xo(e){return{x:Sa(e),y:Ca(e)}}var ge;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ge||(ge={}));function Da(e){return!xr||!e?!1:e===document.scrollingElement}function Ea(e){const t={x:0,y:0},n=Da(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}=Ea(e),b={x:0,y:0},C={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+g.height?(b.y=ge.Backward,C.y=r*Math.abs((t.top+g.height-s)/g.height)):!d&&c>=t.bottom-g.height&&(b.y=ge.Forward,C.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!v&&a>=t.right-g.width?(b.x=ge.Forward,C.x=r*Math.abs((t.right-g.width-a)/g.width)):!u&&i<=t.left+g.width&&(b.x=ge.Backward,C.x=r*Math.abs((t.left+g.width-i)/g.width)),{direction:b,speed:C}}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 Ma(e){return e.reduce((t,n)=>jt(t,xo(n)),Ie)}function vd(e){return e.reduce((t,n)=>t+Sa(n),0)}function yd(e){return e.reduce((t,n)=>t+Ca(n),0)}function Ra(e,t){if(t===void 0&&(t=Sn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);xa(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 Jo{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=Zo(n),o=Ma(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 Jr(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 Zs(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 Ta={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 Oa{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&&Ra(r),n(Ie)}handleKeyDown(t){if(Xo(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Ta,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:C}=r.current;for(const g of C){const S=t.code,{isTop:m,isRight:f,isLeft:h,isBottom:D,maxScroll:y,minScroll:E}=Ea(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&&!D||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()}}Oa.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ta,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 Js(e){return!!(e&&"distance"in e)}function Qs(e){return!!(e&&"delay"in e)}class Qo{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,Zs),this.windowListeners.add(Ae.VisibilityChange,this.handleCancel),this.windowListeners.add(Ae.ContextMenu,Zs),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(Qs(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Js(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(Js(a)){if(a.tolerance!=null&&Jr(l,a.tolerance))return this.handleCancel();if(Jr(l,a.distance))return this.handleStart()}if(Qs(a)&&Jr(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 Pa extends Qo{constructor(t){const{event:n}=t,r=Yt(n.target);super(t,Cd,r)}}Pa.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 So;(function(e){e[e.RightClick=2]="RightClick"})(So||(So={}));class Aa extends Qo{constructor(t){super(t,Dd,Yt(t.event.target))}}Aa.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===So.RightClick?!1:(r==null||r({event:n}),!0)}}];const Qr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Na extends Qo{constructor(t){super(t,Qr)}static setup(){return window.addEventListener(Qr.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Qr.move.name,t)};function t(){}}}Na.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}),[C,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),D=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,C(D,i),S.current=I,m.current=A;return}}S.current={x:0,y:0},m.current={x:0,y:0},g()},[t,D,r,g,s,i,JSON.stringify(f),JSON.stringify(b),C,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 Co;(function(e){e.Optimized="optimized"})(Co||(Co={}));const ei=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]),C=M.useRef(null),g=xn(m=>{if(u&&!n)return ei;if(!m||m===ei||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 D=h.node.current,y=D?new Jo(c(D),D):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"||C.current!==null||(C.current=setTimeout(()=>{b(),C.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 es(e,t){return xn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Ad(e,t){return es(e,t)}function Nd(e){let{callback:t,disabled:n}=e;const r=Sr(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 Er(e){let{callback:t,disabled:n}=e;const r=Sr(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 Jo(Sn(e),e)}function ti(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=Nd({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=Er({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 _d(e){const t=es(e);return ba(e,t)}const ni=[];function Id(e){const t=M.useRef(e),n=xn(r=>e?r&&r!==ni&&e&&t.current&&e.parentNode===t.current.parentNode?r:Zo(e):ni,[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=Zr(s.target);i&&n(a=>a?(a.set(i,xo(i)),new Map(a)):null)},[]);return M.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=Zr(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,xo(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=Zr(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):Ma(e):Ie,[e,t])}function ri(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(!xr)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 ka(e){return M.useMemo(()=>e?dd(e):null,[e])}const oi=[];function Fd(e,t){t===void 0&&(t=Sn);const[n]=e,r=ka(n?be(n):null),[o,s]=M.useState(oi);function i(){s(()=>e.length?e.map(c=>Da(c)?r:new Jo(t(c),c)):oi)}const a=Er({callback:i});return Ke(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function _a(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=Er({callback:o}),i=M.useCallback(l=>{const d=_a(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:Pa,options:{}},{sensor:Oa,options:{}}],Bd={current:{}},Jn={draggable:{measure:Xs},droppable:{measure:Xs,strategy:gn.WhileDragging,frequency:Co.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},Ia={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ar,draggableNodes:new Map,over:null,measureDroppableContainers:ar},Cn=M.createContext(Ia),ja=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(!Xo(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 $a(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=ba(d,r);if(i||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const v=xa(l);v&&v.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Mr=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 ts=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,...C}=t;const g=M.useReducer(Yd,void 0,Vd),[S,m]=g,[f,h]=Xu(),[D,y]=M.useState(ut.Uninitialized),E=D===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]),_=M.useRef(null),[N,O]=M.useState(null),[$,P]=M.useState(null),k=pn(C,Object.values(C)),T=Cr("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=ti(K,V.draggable.measure,q),X=ti(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}),oe=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),_n=_d(Je?null:z),Qe=ka(Se?be(Se):null),et=Id(E?oe??K:null),In=Fd(et),jn=$a(b,{transform:{x:A.x-_n.x,y:A.y-_n.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}),zs=W?jt(W,A):null,Ws=jd(et),Pu=ri(Ws),Au=ri(Ws,[z]),Ot=jt(jn,Pu),Pt=Ce?cd(Ce,jn):null,Zt=H&&Pt?u({active:H,collisionRect:Pt,droppableRects:U,droppableContainers:L,pointerCoordinates:zs}):null,Bs=rd(Zt,"id"),[tt,Hs]=M.useState(null),Nu=Je?jn:jt(jn,Au),ku=id(Nu,(s=tt==null?void 0:tt.rect)!=null?s:null,z),Gr=M.useRef(null),Vs=M.useCallback((ve,De)=>{let{sensor:Ee,options:nt}=De;if(_.current==null)return;const Pe=R.get(_.current);if(!Pe)return;const Me=ve.nativeEvent,Le=new Ee({active:_.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=_.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(Gr.current),P(Me)})},onMove(me){m({type:pe.DragMove,coordinates:me})},onEnd:At(pe.DragEnd),onCancel:At(pe.DragCancel)});Gr.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)}_.current=null,Ue.unstable_batchedUpdates(()=>{m({type:me}),y(ut.Uninitialized),Hs(null),O(null),P(null),Gr.current=null;const en=me===pe.DragEnd?"onDragEnd":"onDragCancel";if(ot){const qr=k.current[en];qr==null||qr(ot),f({type:en,event:ot})}})}}},[R]),_u=M.useCallback((ve,De)=>(Ee,nt)=>{const Pe=Ee.nativeEvent,Me=R.get(nt);if(_.current!==null||!Me||Pe.dndKit||Pe.defaultPrevented)return;const Le={active:Me};ve(Ee,De.options,Le)===!0&&(Pe.dndKit={capturedBy:De.sensor},_.current=nt,Vs(Ee,De))},[R,Vs]),Ys=Od(d,_u);$d(d),Ke(()=>{z&&D===ut.Initializing&&y(ut.Initialized)},[z,D]),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||_.current==null||!De||!Pe)return;const{onDragOver:Me}=k.current,Le=nt.get(Bs),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(()=>{Hs(At),Me==null||Me(me),f({type:"onDragOver",event:me})})},[Bs]),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:zs,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:Ys,active:H,activeNodeRect:z,ariaDescribedById:{draggable:T},dispatch:m,draggableNodes:R,over:tt,measureDroppableContainers:Y}),[$,Ys,H,z,m,T,R,tt,Y]);return M.createElement(ya.Provider,{value:h},M.createElement(Cn.Provider,{value:ju},M.createElement(ja.Provider,{value:Iu},M.createElement(Mr.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=(N==null?void 0:N.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),si="button",Xd="Draggable";function ns(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Cr(Xd),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:u,over:v}=M.useContext(Cn),{role:b=si,roleDescription:C="draggable",tabIndex:g=0}=o??{},S=(c==null?void 0:c.id)===t,m=M.useContext(S?Mr:qd),[f,h]=rr(),[D,y]=rr(),E=Ld(i,t),w=pn(n);Ke(()=>(u.set(t,{id:t,key:s,node:f,activatorNode:D,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===si?!0:void 0,"aria-roledescription":C,"aria-describedby":d.draggable}),[r,b,g,S,C,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(ja)}const Jd="Droppable",Qd={timeout:25};function $n(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Cr(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:C,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=Er({callback:f,disabled:C||!i}),D=M.useCallback((R,A)=>{h&&(A&&(h.unobserve(A),u.current=!1),R&&h.observe(R))},[h]),[y,E]=rr(D),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:Ia},M.createElement(Mr.Provider,{value:tf},t))}const rf={position:"fixed",touchAction:"none"},of=e=>Xo(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 Sr((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=_a(i);if(!l)return;const{transform:d}=be(i).getComputedStyle(i),u=wa(d);if(!u)return;const v=typeof t=="function"?t:df(t);return Ra(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}}),[C]=b,g=b[b.length-1];if(JSON.stringify(C)===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 ii=0;function ff(e){return M.useMemo(()=>{if(e!=null)return ii++,ii},[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:C,droppableContainers:g,dragOverlay:S,over:m,measuringConfiguration:f,scrollableAncestors:h,scrollableAncestorRects:D,windowRect:y}=Zd(),E=M.useContext(Mr),w=ff(u==null?void 0:u.id),R=$a(i,{activatorEvent:d,active:u,activeNodeRect:v,containerNodeRect:b,draggingNodeRect:S.rect,over:m,overlayNodeRect:S.rect,scrollableAncestors:h,scrollableAncestorRects:D,transform:E,windowRect:y}),A=es(v),I=uf({config:r,draggableNodes:C,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"],La=6e4,ai=Symbol.for("constructDateFrom");function hf(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ai in e?e[ai](t):e instanceof Date?new e.constructor(t):new Date(t)}function Do(e,t){return hf(e,e)}function gf(e,t,n){const r=Do(e);return r.setTime(r.getTime()+t*La),r}function mf(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function vf(e,t){return+Do(e)-+Do(t)}function yf(e,t,n){const r=vf(e,t)/La;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,ci;function Cf(){return ci||(ci=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",C="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(_){var N=["th","st","nd","rd"],O=_%100;return"["+_+(N[(O-20)%10]||N[O]||N[0])+"]"}},h=function(_,N,O){var $=String(_);return!$||$.length>=N?_:""+Array(N+1-$.length).join(O)+_},D={s:h,z:function(_){var N=-_.utcOffset(),O=Math.abs(N),$=Math.floor(O/60),P=O%60;return(N<=0?"+":"-")+h($,2,"0")+":"+h(P,2,"0")},m:function _(N,O){if(N.date()<O.date())return-_(O,N);var $=12*(O.year()-N.year())+(O.month()-N.month()),P=N.clone().add($,u),k=O-P<0,T=N.clone().add($+(k?-1:1),u);return+(-($+(O-P)/(k?P-T:T-P))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:u,y:b,w:d,d:l,D:C,h:c,m:a,s:i,ms:s,Q:v}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},y="en",E={};E[y]=f;var w="$isDayjsObject",R=function(_){return _ instanceof B||!(!_||!_[w])},A=function _(N,O,$){var P;if(!N)return y;if(typeof N=="string"){var k=N.toLowerCase();E[k]&&(P=k),O&&(E[k]=O,P=k);var T=N.split("-");if(!P&&T.length>1)return _(T[0])}else{var L=N.name;E[L]=N,P=L}return!$&&P&&(y=P),P||!$&&y},I=function(_,N){if(R(_))return _.clone();var O=typeof N=="object"?N:{};return O.date=_,O.args=arguments,new B(O)},j=D;j.l=A,j.i=R,j.w=function(_,N){return I(_,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var B=function(){function _(O){this.$L=A(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[w]=!0}var N=_.prototype;return N.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()},N.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()},N.$utils=function(){return j},N.isValid=function(){return this.$d.toString()!==g},N.isSame=function(O,$){var P=I(O);return this.startOf($)<=P&&P<=this.endOf($)},N.isAfter=function(O,$){return I(O)<this.startOf($)},N.isBefore=function(O,$){return this.endOf($)<I(O)},N.$g=function(O,$,P){return j.u(O)?this[$]:this.set(P,O)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.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 C: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()}},N.endOf=function(O){return this.startOf(O,!1)},N.$set=function(O,$){var P,k=j.p(O),T="set"+(this.$u?"UTC":""),L=(P={},P[l]=T+"Date",P[C]=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(C,1);U.$d[L](V),U.init(),this.$d=U.set(C,Math.min(this.$D,U.daysInMonth())).$d}else L&&this.$d[L](V);return this.init(),this},N.set=function(O,$){return this.clone().$set(O,$)},N.get=function(O){return this[j.p(O)]()},N.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)},N.subtract=function(O,$){return this.add(-1*O,$)},N.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,oe){return z&&(z[X]||z($,k))||F[X].slice(0,oe)},G=function(z){return j.s(L%12||12,z,"0")},q=K||function(z,X,F){var oe=z<12?"AM":"PM";return F?oe.toLowerCase():oe};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(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.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)},N.daysInMonth=function(){return this.endOf(u).$D},N.$locale=function(){return E[this.$L]},N.locale=function(O,$){if(!O)return this.$L;var P=this.clone(),k=A(O,$,!0);return k&&(P.$L=k),P},N.clone=function(){return j.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},_}(),H=B.prototype;return I.prototype=H,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",b],["$D",C]].forEach(function(_){H[_[1]]=function(N){return this.$g(N,_[0],_[1])}}),I.extend=function(_,N){return _.$i||(_(N,B,I),_.$i=!0),I},I.locale=A,I.isDayjs=R,I.unix=function(_){return I(1e3*_)},I.en=E[y],I.Ls=E,I.p={},I})}(Qn)),Qn.exports}var Df=Cf();const li=wf(Df),Eo=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ef=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],te={findIndexToStart(e=new Date){const t=Eo[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return Eo.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=li(e),r=li(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,eo=te.generateWeekDays(),Af=(e,t)=>({hours:Rf(Tf,Of,Pf),selectedDay:null,daysOfWeek:eo.week,firstDayOfWeek:eo.firstDayOfWeek,lastDayOfWeek:eo.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=Nf(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})})}}),Nf=(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=Ko()((...e)=>({...Af(...e),...Mf(...e),...kf(...e)})),Fa=M.createContext(null),rs=e=>{const t=M.use(Fa);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Uo(t,e)},_f=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o,selectedDay:s}=Oe(),{updateMonthMessage:i}=rs(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(),C=b!==u.getMonth()?te.shortMonthDescription(v,u):Ge[b];i({monthMessage:C});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),Mo={date:"",startAt:"",finishAt:""},jf=e=>wr(t=>({...Mo,...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(Mo)})),za=M.createContext(null),$f=({children:e,...t})=>{const n=M.useRef(null);return n.current||(n.current=jf(t)),p.jsx(za,{value:n.current,children:e})},Wa=e=>{const t=M.use(za);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Uo(t,e)};function Ba(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=Ba(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ha(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ba(e))&&(r&&(r+=" "),r+=t);return r}const os="-",Lf=e=>{const t=zf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(os);return a[0]===""&&a.length!==1&&a.shift(),Va(a,t)||Ff(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Va=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Va(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=/^\[(.+)\]$/,Ff=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}},zf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ro(n[o],r,o,t);return r},Ro=(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(Wf(o)){Ro(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Ro(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},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)}}},To="!",Oo=":",Hf=Oo.length,Vf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,l;for(let C=0;C<o.length;C++){let g=o[C];if(i===0&&a===0){if(g===Oo){s.push(o.slice(c,C)),c=C+Hf;continue}if(g==="/"){l=C;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+Oo,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(To)?e.substring(0,e.length-1):e.startsWith(To)?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:C,maybePostfixModifierPosition:g}=n(d);if(u){c=d+(c.length>0?" "+c:c);continue}let S=!!g,m=r(S?C.substring(0,g):C);if(!m){if(!S){c=d+(c.length>0?" "+c:c);continue}if(m=r(C),!m){c=d+(c.length>0?" "+c:c);continue}S=!1}const f=s(v).join(":"),h=b?f+To:f,D=h+m;if(i.includes(D))continue;i.push(D);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=Ya(t))&&(r&&(r+=" "),r+=n);return r}const Ya=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ya(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},Ua=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ka=/^\((?:(\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)\(.+\)$/,Nt=e=>Jf.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),xt=e=>!!e&&Number.isInteger(Number(e)),fi=e=>e.endsWith("%")&&re(e.slice(0,-1)),it=e=>Qf.test(e),op=()=>!0,sp=e=>ep.test(e)&&!tp.test(e),ss=()=>!1,ip=e=>np.test(e),ap=e=>rp.test(e),cp=e=>!J(e)&&!Q(e),lp=e=>Ut(e,Xa,ss),J=e=>Ua.test(e),St=e=>Ut(e,Za,sp),to=e=>Ut(e,wp,re),up=e=>Ut(e,Ga,ss),dp=e=>Ut(e,qa,ap),fp=e=>Ut(e,ss,ip),Q=e=>Ka.test(e),Ln=e=>Kt(e,Za),pp=e=>Kt(e,xp),hp=e=>Kt(e,Ga),gp=e=>Kt(e,Xa),mp=e=>Kt(e,qa),vp=e=>Kt(e,Sp,!0),Ut=(e,t,n)=>{const r=Ua.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kt=(e,t,n=!1)=>{const r=Ka.exec(e);return r?r[1]?t(r[1]):n:!1},Ga=e=>e==="position",yp=new Set(["image","url"]),qa=e=>yp.has(e),bp=new Set(["length","size","percentage"]),Xa=e=>bp.has(e),Za=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"),C=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"],D=()=>["auto","hidden","clip","visible","scroll"],y=()=>["auto","contain","none"],E=()=>[Q,J,c],w=()=>[Nt,"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"],_=()=>["auto",...E()],N=()=>[Nt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],O=()=>[e,Q,J],$=()=>[fi,St],P=()=>["","none","full",l,Q,J],k=()=>["",re,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",re,Q,J],Z=()=>["none",re,Q,J],K=()=>[re,Q,J],W=()=>[Nt,"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",re],text:[it],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Nt,J,Q,g]}],container:["container"],columns:[{columns:[re,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:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],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:[Nt,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,Nt,"auto","initial","none",J]}],grow:[{grow:["",re,Q,J]}],shrink:[{shrink:["",re,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:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen",...N()]}],"min-h":[{"min-h":["screen","none",...N()]}],"max-h":[{"max-h":["screen",...N()]}],"font-size":[{text:["base",n,Ln,St]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Q,to]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fi,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":[re,"none",Q,to]}],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:[re,"from-font","auto",Q,St]}],"text-decoration-color":[{decoration:O()}],"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: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":[re,Q,J]}],"outline-w":[{outline:["",re,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":[re,St]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":k()}],"inset-ring-color":[{"inset-ring":O()}],opacity:[{opacity:[re,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:[re,Q,J]}],contrast:[{contrast:[re,Q,J]}],"drop-shadow":[{"drop-shadow":["","none",v,Q,J]}],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":V()}],"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":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:[re,"initial",Q,J]}],ease:[{ease:["linear","initial",S,Q,J]}],delay:[{delay:[re,Q,J]}],animate:[{animate:["none",m,Q,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,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:[re,Ln,St,to]}],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 ne(...e){return Dp(Ha(e))}const Ep="_calendarHeader_ocihc_1",Mp={calendarHeader:Ep},Rp=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=Oe(),{updateMonthMessage:o}=rs(d=>d),s=t===ce.DAY?"text-start":"text-center",i=t===ce.TABLE&&"justify-self-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=Eo[new Date(u).getDay()];return p.jsx("th",{className:ne("min-w-[12rem] w-[100vw]",t!==ce.DAY&&"max-w-[2rem]"),children:p.jsxs("div",{className:ne("flex flex-col gap-[3px] text-gray-500 ",s,i),children:[p.jsx("span",{className:ne(d(u)&&"text-purple-500"),children:v}),p.jsx("div",{className:"w-full",children:p.jsx("button",{type:"button",className:ne("hover:cursor-pointer",d(u)?"bg-purple-500 text-white rounded-full p-1":"hover:bg-gray-100 hover:border hover:border-gray-300 p-2 border-none rounded-full"),onClick:()=>a(u),children:te.formatDate(u.toDateString())})})]})},v)})},[e,s,a,i,t]),l=p.jsx("th",{className:ne(Mp.calendarHeader,i),children:p.jsx("div",{className:"max-w-[4rem] min-w-[4rem] h-16 w-16"})},"emptyBlocks");return p.jsx("table",{className:"min-w-full w-full bg-white no-border-sides",children:p.jsx("tbody",{children:p.jsxs("tr",{children:[l,c]})})})};/**
26
6
  * @license lucide-react v0.483.0 - ISC
27
7
  *
28
8
  * This source code is licensed under the ISC license.
29
9
  * See the LICENSE file in the root directory of this source tree.
30
- */const Lp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
10
+ */const Tp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ja=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
31
11
  * @license lucide-react v0.483.0 - ISC
32
12
  *
33
13
  * This source code is licensed under the ISC license.
34
14
  * See the LICENSE file in the root directory of this source tree.
35
- */var $p={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"};/**
36
16
  * @license lucide-react v0.483.0 - ISC
37
17
  *
38
18
  * This source code is licensed under the ISC license.
39
19
  * See the LICENSE file in the root directory of this source tree.
40
- */const Fp=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,...$p,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:oc("lucide",o),...a},[...i.map(([l,d])=>R.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
20
+ */const Pp=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,...Op,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ja("lucide",o),...a},[...i.map(([l,d])=>M.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
41
21
  * @license lucide-react v0.483.0 - ISC
42
22
  *
43
23
  * This source code is licensed under the ISC license.
44
24
  * See the LICENSE file in the root directory of this source tree.
45
- */const Se=(e,t)=>{const n=R.forwardRef(({className:r,...o},s)=>R.createElement(Fp,{ref:s,iconNode:t,className:oc(`lucide-${Lp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
25
+ */const we=(e,t)=>{const n=M.forwardRef(({className:r,...o},s)=>M.createElement(Pp,{ref:s,iconNode:t,className:Ja(`lucide-${Tp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
46
26
  * @license lucide-react v0.483.0 - ISC
47
27
  *
48
28
  * This source code is licensed under the ISC license.
49
29
  * See the LICENSE file in the root directory of this source tree.
50
- */const zp=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],Wp=Se("Bookmark",zp);/**
30
+ */const Ap=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],Np=we("Bookmark",Ap);/**
51
31
  * @license lucide-react v0.483.0 - ISC
52
32
  *
53
33
  * This source code is licensed under the ISC license.
54
34
  * See the LICENSE file in the root directory of this source tree.
55
- */const Bp=[["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"}]],Hp=Se("CalendarCog",Bp);/**
35
+ */const kp=[["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",kp);/**
56
36
  * @license lucide-react v0.483.0 - ISC
57
37
  *
58
38
  * This source code is licensed under the ISC license.
59
39
  * See the LICENSE file in the root directory of this source tree.
60
- */const Vp=[["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"}]],Up=Se("CalendarDays",Vp);/**
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);/**
61
41
  * @license lucide-react v0.483.0 - ISC
62
42
  *
63
43
  * This source code is licensed under the ISC license.
64
44
  * See the LICENSE file in the root directory of this source tree.
65
- */const Yp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sc=Se("Check",Yp);/**
45
+ */const $p=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qa=we("Check",$p);/**
66
46
  * @license lucide-react v0.483.0 - ISC
67
47
  *
68
48
  * This source code is licensed under the ISC license.
69
49
  * See the LICENSE file in the root directory of this source tree.
70
- */const Kp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ic=Se("ChevronDown",Kp);/**
50
+ */const Lp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ec=we("ChevronDown",Lp);/**
71
51
  * @license lucide-react v0.483.0 - ISC
72
52
  *
73
53
  * This source code is licensed under the ISC license.
74
54
  * See the LICENSE file in the root directory of this source tree.
75
- */const Gp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qp=Se("ChevronLeft",Gp);/**
55
+ */const Fp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],zp=we("ChevronLeft",Fp);/**
76
56
  * @license lucide-react v0.483.0 - ISC
77
57
  *
78
58
  * This source code is licensed under the ISC license.
79
59
  * See the LICENSE file in the root directory of this source tree.
80
- */const Xp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Zp=Se("ChevronRight",Xp);/**
60
+ */const Wp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bp=we("ChevronRight",Wp);/**
81
61
  * @license lucide-react v0.483.0 - ISC
82
62
  *
83
63
  * This source code is licensed under the ISC license.
84
64
  * See the LICENSE file in the root directory of this source tree.
85
- */const Jp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Qp=Se("ChevronUp",Jp);/**
65
+ */const Hp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Vp=we("ChevronUp",Hp);/**
86
66
  * @license lucide-react v0.483.0 - ISC
87
67
  *
88
68
  * This source code is licensed under the ISC license.
89
69
  * See the LICENSE file in the root directory of this source tree.
90
- */const eh=[["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"}]],th=Se("Columns4",eh);/**
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);/**
91
71
  * @license lucide-react v0.483.0 - ISC
92
72
  *
93
73
  * This source code is licensed under the ISC license.
94
74
  * See the LICENSE file in the root directory of this source tree.
95
- */const nh=[["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"}]],rh=Se("GalleryVertical",nh);/**
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);/**
96
76
  * @license lucide-react v0.483.0 - ISC
97
77
  *
98
78
  * This source code is licensed under the ISC license.
99
79
  * See the LICENSE file in the root directory of this source tree.
100
- */const oh=[["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"}]],sh=Se("Grid3x3",oh);/**
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);/**
101
81
  * @license lucide-react v0.483.0 - ISC
102
82
  *
103
83
  * This source code is licensed under the ISC license.
104
84
  * See the LICENSE file in the root directory of this source tree.
105
- */const ih=[["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"}]],ah=Se("Pencil",ih);/**
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);/**
106
86
  * @license lucide-react v0.483.0 - ISC
107
87
  *
108
88
  * This source code is licensed under the ISC license.
109
89
  * See the LICENSE file in the root directory of this source tree.
110
- */const ch=[["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"}]],lh=Se("SquareMousePointer",ch);/**
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);/**
111
91
  * @license lucide-react v0.483.0 - ISC
112
92
  *
113
93
  * This source code is licensed under the ISC license.
114
94
  * See the LICENSE file in the root directory of this source tree.
115
- */const uh=[["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"}]],dh=Se("Trash2",uh);/**
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);/**
116
96
  * @license lucide-react v0.483.0 - ISC
117
97
  *
118
98
  * This source code is licensed under the ISC license.
119
99
  * See the LICENSE file in the root directory of this source tree.
120
- */const fh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ph=Se("X",fh);function bi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Or(...e){return t=>{let n=!1;const r=e.map(o=>{const s=bi(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():bi(e[o],null)}}}}function le(...e){return x.useCallback(Or(...e),e)}var pt=x.forwardRef((e,t)=>{const{children:n,...r}=e,o=x.Children.toArray(n),s=o.find(hh);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 h.jsx(_o,{...r,ref:t,children:x.isValidElement(i)?x.cloneElement(i,void 0,a):null})}return h.jsx(_o,{...r,ref:t,children:n})});pt.displayName="Slot";var _o=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const o=mh(n),s=gh(r,n.props);return n.type!==x.Fragment&&(s.ref=t?Or(t,o):o),x.cloneElement(n,s)}return x.Children.count(n)>1?x.Children.only(null):null});_o.displayName="SlotClone";var ac=({children:e})=>h.jsx(h.Fragment,{children:e});function hh(e){return x.isValidElement(e)&&e.type===ac}function gh(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 mh(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 wi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xi=qa,cc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xi(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 f=wi(d)||wi(u);return o[l][f]}),a=n&&Object.entries(n).reduce((l,d)=>{let[u,f]=d;return f===void 0||(l[u]=f),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,d)=>{let{class:u,className:f,...g}=d;return Object.entries(g).every(C=>{let[v,S]=C;return Array.isArray(S)?S.includes({...s,...a}[v]):{...s,...a}[v]===S})?[...l,u,f]:l},[]);return xi(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},vh=cc("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 Wt({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?pt:"button";return h.jsx(s,{"data-slot":"button",className:ne(vh({variant:t,size:n,className:e})),...o})}const fr=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}`},Bt=qo((e,t)=>({emptySlotNodes:new Map,selectedNode:"",setEmptySlotNode:(n,r)=>{e(o=>{const s=new Map(o.emptySlotNodes);s.size>447&&s.clear();const c=fr(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:""}))})),lc=R.createContext(void 0),Et=()=>{const e=R.use(lc);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 yt(e,t=[]){let n=[];function r(s,i){const a=x.createContext(i),c=n.length;n=[...n,i];const l=u=>{var y;const{scope:f,children:g,...C}=u,v=((y=f==null?void 0:f[e])==null?void 0:y[c])||a,S=x.useMemo(()=>C,Object.values(C));return h.jsx(v.Provider,{value:S,children:g})};l.displayName=s+"Provider";function d(u,f){var v;const g=((v=f==null?void 0:f[e])==null?void 0:v[c])||a,C=x.useContext(g);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=>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,yh(o,...t)]}function yh(...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 bh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=bh.reduce((e,t)=>{const n=x.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?pt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function uc(e,t){e&&Ve.flushSync(()=>e.dispatchEvent(t))}function Ie(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 wh(e,t=globalThis==null?void 0:globalThis.document){const n=Ie(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 xh="DismissableLayer",No="dismissableLayer.update",Sh="dismissableLayer.pointerDownOutside",Ch="dismissableLayer.focusOutside",Si,dc=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rn=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=x.useContext(dc),[d,u]=x.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=x.useState({}),C=le(t,w=>u(w)),v=Array.from(l.layers),[S]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(S),p=d?v.indexOf(d):-1,m=l.layersWithOutsidePointerEventsDisabled.size>0,D=p>=y,b=Rh(w=>{const T=w.target,A=[...l.branches].some(I=>I.contains(T));!D||A||(o==null||o(w),i==null||i(w),w.defaultPrevented||a==null||a())},f),E=Th(w=>{const T=w.target;[...l.branches].some(I=>I.contains(T))||(s==null||s(w),i==null||i(w),w.defaultPrevented||a==null||a())},f);return wh(w=>{p===l.layers.size-1&&(r==null||r(w),!w.defaultPrevented&&a&&(w.preventDefault(),a()))},f),x.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Si=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Ci(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Si)}},[d,f,n,l]),x.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Ci())},[d,l]),x.useEffect(()=>{const w=()=>g({});return document.addEventListener(No,w),()=>document.removeEventListener(No,w)},[]),h.jsx(se.div,{...c,ref:C,style:{pointerEvents:m?D?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,b.onPointerDownCapture)})});Rn.displayName=xh;var Dh="DismissableLayerBranch",Eh=x.forwardRef((e,t)=>{const n=x.useContext(dc),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]),h.jsx(se.div,{...e,ref:o})});Eh.displayName=Dh;function Rh(e,t=globalThis==null?void 0:globalThis.document){const n=Ie(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){fc(Sh,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 Th(e,t=globalThis==null?void 0:globalThis.document){const n=Ie(e),r=x.useRef(!1);return x.useEffect(()=>{const o=s=>{s.target&&!r.current&&fc(Ch,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 Ci(){const e=new CustomEvent(No);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 we=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},Mh=x.useId||(()=>{}),Oh=0;function ht(e){const[t,n]=x.useState(Mh());return we(()=>{n(r=>r??String(Oh++))},[e]),e||(t?`radix-${t}`:"")}const Ph=["top","right","bottom","left"],gt=Math.min,Oe=Math.max,pr=Math.round,Bn=Math.floor,Ue=e=>({x:e,y:e}),Ah={left:"right",right:"left",bottom:"top",top:"bottom"},_h={start:"end",end:"start"};function ko(e,t,n){return Oe(e,gt(t,n))}function Ze(e,t){return typeof e=="function"?e(t):e}function Je(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function ls(e){return e==="x"?"y":"x"}function us(e){return e==="y"?"height":"width"}function mt(e){return["top","bottom"].includes(Je(e))?"y":"x"}function ds(e){return ls(mt(e))}function Nh(e,t,n){n===void 0&&(n=!1);const r=Xt(e),o=ds(e),s=us(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=hr(i)),[i,hr(i)]}function kh(e){const t=hr(e);return[Io(e),t,Io(t)]}function Io(e){return e.replace(/start|end/g,t=>_h[t])}function Ih(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 jh(e,t,n,r){const o=Xt(e);let s=Ih(Je(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Io)))),s}function hr(e){return e.replace(/left|right|bottom|top/g,t=>Ah[t])}function Lh(e){return{top:0,right:0,bottom:0,left:0,...e}}function pc(e){return typeof e!="number"?Lh(e):{top:e,right:e,bottom:e,left:e}}function gr(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 Di(e,t,n){let{reference:r,floating:o}=e;const s=mt(t),i=ds(t),a=us(i),c=Je(t),l=s==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:u};break;case"left":g={x:r.x-o.width,y:u};break;default:g={x:r.x,y:r.y}}switch(Xt(t)){case"start":g[i]-=f*(n&&l?-1:1);break;case"end":g[i]+=f*(n&&l?-1:1);break}return g}const $h=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}=Di(l,r,c),f=r,g={},C=0;for(let v=0;v<a.length;v++){const{name:S,fn:y}=a[v],{x:p,y:m,data:D,reset:b}=await y({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});d=p??d,u=m??u,g={...g,[S]:{...g[S],...D}},b&&C<=50&&(C++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(l=b.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:d,y:u}=Di(l,f,c)),v=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:g}};async function yn(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:f=!1,padding:g=0}=Ze(t,e),C=pc(g),S=a[f?u==="floating"?"reference":"floating":u],y=gr(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})),p=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,m=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),D=await(s.isElement==null?void 0:s.isElement(m))?await(s.getScale==null?void 0:s.getScale(m))||{x:1,y:1}:{x:1,y:1},b=gr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:m,strategy:c}):p);return{top:(y.top-b.top+C.top)/D.y,bottom:(b.bottom-y.bottom+C.bottom)/D.y,left:(y.left-b.left+C.left)/D.x,right:(b.right-y.right+C.right)/D.x}}const Fh=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}=Ze(e,t)||{};if(l==null)return{};const u=pc(d),f={x:n,y:r},g=ds(o),C=us(g),v=await i.getDimensions(l),S=g==="y",y=S?"top":"left",p=S?"bottom":"right",m=S?"clientHeight":"clientWidth",D=s.reference[C]+s.reference[g]-f[g]-s.floating[C],b=f[g]-s.reference[g],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let w=E?E[m]:0;(!w||!await(i.isElement==null?void 0:i.isElement(E)))&&(w=a.floating[m]||s.floating[C]);const T=D/2-b/2,A=w/2-v[C]/2-1,I=gt(u[y],A),j=gt(u[p],A),B=I,H=w-v[C]-j,k=w/2-v[C]/2+T,_=ko(B,k,H),O=!c.arrow&&Xt(o)!=null&&k!==_&&s.reference[C]/2-(k<B?I:j)-v[C]/2<0,L=O?k<B?k-B:k-H:0;return{[g]:f[g]+L,data:{[g]:_,centerOffset:k-_-L,...O&&{alignmentOffset:L}},reset:O}}}),zh=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:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:v=!0,...S}=Ze(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Je(o),p=mt(a),m=Je(a)===a,D=await(c.isRTL==null?void 0:c.isRTL(l.floating)),b=f||(m||!v?[hr(a)]:kh(a)),E=C!=="none";!f&&E&&b.push(...jh(a,v,C,D));const w=[a,...b],T=await yn(t,S),A=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&A.push(T[y]),u){const k=Nh(o,i,D);A.push(T[k[0]],T[k[1]])}if(I=[...I,{placement:o,overflows:A}],!A.every(k=>k<=0)){var j,B;const k=(((j=s.flip)==null?void 0:j.index)||0)+1,_=w[k];if(_)return{data:{index:k,overflows:I},reset:{placement:_}};let O=(B=I.filter(L=>L.overflows[0]<=0).sort((L,P)=>L.overflows[1]-P.overflows[1])[0])==null?void 0:B.placement;if(!O)switch(g){case"bestFit":{var H;const L=(H=I.filter(P=>{if(E){const N=mt(P.placement);return N===p||N==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(N=>N>0).reduce((N,M)=>N+M,0)]).sort((P,N)=>P[1]-N[1])[0])==null?void 0:H[0];L&&(O=L);break}case"initialPlacement":O=a;break}if(o!==O)return{reset:{placement:O}}}return{}}}};function Ei(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ri(e){return Ph.some(t=>e[t]>=0)}const Wh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ze(e,t);switch(r){case"referenceHidden":{const s=await yn(t,{...o,elementContext:"reference"}),i=Ei(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ri(i)}}}case"escaped":{const s=await yn(t,{...o,altBoundary:!0}),i=Ei(s,n.floating);return{data:{escapedOffsets:i,escaped:Ri(i)}}}default:return{}}}}};async function Bh(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Je(n),a=Xt(n),c=mt(n)==="y",l=["left","top"].includes(i)?-1:1,d=s&&c?-1:1,u=Ze(t,e);let{mainAxis:f,crossAxis:g,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"&&(g=a==="end"?C*-1:C),c?{x:g*d,y:f*l}:{x:f*l,y:g*d}}const Hh=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 Bh(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}}}}},Vh=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:y,y:p}=S;return{x:y,y:p}}},...c}=Ze(e,t),l={x:n,y:r},d=await yn(t,c),u=mt(Je(o)),f=ls(u);let g=l[f],C=l[u];if(s){const S=f==="y"?"top":"left",y=f==="y"?"bottom":"right",p=g+d[S],m=g-d[y];g=ko(p,g,m)}if(i){const S=u==="y"?"top":"left",y=u==="y"?"bottom":"right",p=C+d[S],m=C-d[y];C=ko(p,C,m)}const v=a.fn({...t,[f]:g,[u]:C});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[f]:s,[u]:i}}}}}},Uh=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}=Ze(e,t),d={x:n,y:r},u=mt(o),f=ls(u);let g=d[f],C=d[u];const v=Ze(a,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const m=f==="y"?"height":"width",D=s.reference[f]-s.floating[m]+S.mainAxis,b=s.reference[f]+s.reference[m]-S.mainAxis;g<D?g=D:g>b&&(g=b)}if(l){var y,p;const m=f==="y"?"width":"height",D=["top","left"].includes(Je(o)),b=s.reference[u]-s.floating[m]+(D&&((y=i.offset)==null?void 0:y[u])||0)+(D?0:S.crossAxis),E=s.reference[u]+s.reference[m]+(D?0:((p=i.offset)==null?void 0:p[u])||0)-(D?S.crossAxis:0);C<b?C=b:C>E&&(C=E)}return{[f]:g,[u]:C}}}},Yh=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}=Ze(e,t),d=await yn(t,l),u=Je(o),f=Xt(o),g=mt(o)==="y",{width:C,height:v}=s.floating;let S,y;u==="top"||u==="bottom"?(S=u,y=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,S=f==="end"?"top":"bottom");const p=v-d.top-d.bottom,m=C-d.left-d.right,D=gt(v-d[S],p),b=gt(C-d[y],m),E=!t.middlewareData.shift;let w=D,T=b;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=m),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=p),E&&!f){const I=Oe(d.left,0),j=Oe(d.right,0),B=Oe(d.top,0),H=Oe(d.bottom,0);g?T=C-2*(I!==0||j!==0?I+j:Oe(d.left,d.right)):w=v-2*(B!==0||H!==0?B+H:Oe(d.top,d.bottom))}await c({...t,availableWidth:T,availableHeight:w});const A=await i.getDimensions(a.floating);return C!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function Pr(){return typeof window<"u"}function Zt(e){return hc(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(hc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hc(e){return Pr()?e instanceof Node||e instanceof Pe(e).Node:!1}function $e(e){return Pr()?e instanceof Element||e instanceof Pe(e).Element:!1}function Ye(e){return Pr()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function Ti(e){return!Pr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Tn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Kh(e){return["table","td","th"].includes(Zt(e))}function Ar(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function fs(e){const t=ps(),n=$e(e)?Fe(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 Gh(e){let t=vt(e);for(;Ye(t)&&!Ht(t);){if(fs(t))return t;if(Ar(t))return null;t=vt(t)}return null}function ps(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ht(e){return["html","body","#document"].includes(Zt(e))}function Fe(e){return Pe(e).getComputedStyle(e)}function _r(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vt(e){if(Zt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ti(e)&&e.host||Ke(e);return Ti(t)?t.host:t}function gc(e){const t=vt(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&Tn(t)?t:gc(t)}function bn(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=Pe(o);if(s){const a=jo(i);return t.concat(i,i.visualViewport||[],Tn(o)?o:[],a&&n?bn(a):[])}return t.concat(o,bn(o,[],n))}function jo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=Fe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=pr(n)!==s||pr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function hs(e){return $e(e)?e:e.contextElement}function Ft(e){const t=hs(e);if(!Ye(t))return Ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=mc(t);let i=(s?pr(n.width):n.width)/r,a=(s?pr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const qh=Ue(0);function vc(e){const t=Pe(e);return!ps()||!t.visualViewport?qh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function Rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=hs(e);let i=Ue(1);t&&(r?$e(r)&&(i=Ft(r)):i=Ft(e));const a=Xh(s,n,r)?vc(s):Ue(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(s){const f=Pe(s),g=r&&$e(r)?Pe(r):r;let C=f,v=jo(C);for(;v&&r&&g!==C;){const S=Ft(v),y=v.getBoundingClientRect(),p=Fe(v),m=y.left+(v.clientLeft+parseFloat(p.paddingLeft))*S.x,D=y.top+(v.clientTop+parseFloat(p.paddingTop))*S.y;c*=S.x,l*=S.y,d*=S.x,u*=S.y,c+=m,l+=D,C=Pe(v),v=jo(C)}}return gr({width:d,height:u,x:c,y:l})}function gs(e,t){const n=_r(e).scrollLeft;return t?t.left+n:Rt(Ke(e)).left+n}function yc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:gs(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=Ke(r),a=t?Ar(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ue(1);const d=Ue(0),u=Ye(r);if((u||!u&&!s)&&((Zt(r)!=="body"||Tn(i))&&(c=_r(r)),Ye(r))){const g=Rt(r);l=Ft(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=i&&!u&&!s?yc(i,c,!0):Ue(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+f.x,y:n.y*l.y-c.scrollTop*l.y+d.y+f.y}}function Jh(e){return Array.from(e.getClientRects())}function Qh(e){const t=Ke(e),n=_r(e),r=e.ownerDocument.body,o=Oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gs(e);const a=-n.scrollTop;return Fe(r).direction==="rtl"&&(i+=Oe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function eg(e,t){const n=Pe(e),r=Ke(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=ps();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function tg(e,t){const n=Rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ye(e)?Ft(e):Ue(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Mi(e,t,n){let r;if(t==="viewport")r=eg(e,n);else if(t==="document")r=Qh(Ke(e));else if($e(t))r=tg(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 gr(r)}function bc(e,t){const n=vt(e);return n===t||!$e(n)||Ht(n)?!1:Fe(n).position==="fixed"||bc(n,t)}function ng(e,t){const n=t.get(e);if(n)return n;let r=bn(e,[],!1).filter(a=>$e(a)&&Zt(a)!=="body"),o=null;const s=Fe(e).position==="fixed";let i=s?vt(e):e;for(;$e(i)&&!Ht(i);){const a=Fe(i),c=fs(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Tn(i)&&!c&&bc(e,i))?r=r.filter(d=>d!==i):o=a,i=vt(i)}return t.set(e,r),r}function rg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ar(t)?[]:ng(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const u=Mi(t,d,o);return l.top=Oe(u.top,l.top),l.right=gt(u.right,l.right),l.bottom=gt(u.bottom,l.bottom),l.left=Oe(u.left,l.left),l},Mi(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function og(e){const{width:t,height:n}=mc(e);return{width:t,height:n}}function sg(e,t,n){const r=Ye(t),o=Ke(t),s=n==="fixed",i=Rt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ue(0);if(r||!r&&!s)if((Zt(t)!=="body"||Tn(o))&&(a=_r(t)),r){const f=Rt(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&(c.x=gs(o));const l=o&&!r&&!s?yc(o,a):Ue(0),d=i.left+a.scrollLeft-c.x-l.x,u=i.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:i.width,height:i.height}}function oo(e){return Fe(e).position==="static"}function Oi(e,t){if(!Ye(e)||Fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ke(e)===n&&(n=n.ownerDocument.body),n}function wc(e,t){const n=Pe(e);if(Ar(e))return n;if(!Ye(e)){let o=vt(e);for(;o&&!Ht(o);){if($e(o)&&!oo(o))return o;o=vt(o)}return n}let r=Oi(e,t);for(;r&&Kh(r)&&oo(r);)r=Oi(r,t);return r&&Ht(r)&&oo(r)&&!fs(r)?n:r||Gh(e)||n}const ig=async function(e){const t=this.getOffsetParent||wc,n=this.getDimensions,r=await n(e.floating);return{reference:sg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ag(e){return Fe(e).direction==="rtl"}const cg={convertOffsetParentRelativeRectToViewportRelativeRect:Zh,getDocumentElement:Ke,getClippingRect:rg,getOffsetParent:wc,getElementRects:ig,getClientRects:Jh,getDimensions:og,getScale:Ft,isElement:$e,isRTL:ag};function xc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lg(e,t){let n=null,r;const o=Ke(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:f,height:g}=l;if(a||t(),!f||!g)return;const C=Bn(u),v=Bn(o.clientWidth-(d+f)),S=Bn(o.clientHeight-(u+g)),y=Bn(d),m={rootMargin:-C+"px "+-v+"px "+-S+"px "+-y+"px",threshold:Oe(0,gt(1,c))||1};let D=!0;function b(E){const w=E[0].intersectionRatio;if(w!==c){if(!D)return i();w?i(!1,w):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w===1&&!xc(l,e.getBoundingClientRect())&&i(),D=!1}try{n=new IntersectionObserver(b,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,m)}n.observe(e)}return i(!0),s}function ug(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=hs(e),d=o||s?[...l?bn(l):[],...bn(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const u=l&&a?lg(l,n):null;let f=-1,g=null;i&&(g=new ResizeObserver(y=>{let[p]=y;p&&p.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var m;(m=g)==null||m.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let C,v=c?Rt(e):null;c&&S();function S(){const y=Rt(e);v&&!xc(v,y)&&n(),v=y,C=requestAnimationFrame(S)}return n(),()=>{var y;d.forEach(p=>{o&&p.removeEventListener("scroll",n),s&&p.removeEventListener("resize",n)}),u==null||u(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(C)}}const dg=Hh,fg=Vh,pg=zh,hg=Yh,gg=Wh,Pi=Fh,mg=Uh,vg=(e,t,n)=>{const r=new Map,o={platform:cg,...n},s={...o.platform,_c:r};return $h(e,t,{...o,platform:s})};var rr=typeof document<"u"?R.useLayoutEffect:R.useEffect;function mr(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(!mr(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)&&!mr(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 Ai(e,t){const n=Sc(e);return Math.round(t*n)/n}function so(e){const t=x.useRef(e);return rr(()=>{t.current=e}),t}function yg(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}),[f,g]=x.useState(r);mr(f,r)||g(r);const[C,v]=x.useState(null),[S,y]=x.useState(null),p=x.useCallback(P=>{P!==E.current&&(E.current=P,v(P))},[]),m=x.useCallback(P=>{P!==w.current&&(w.current=P,y(P))},[]),D=s||C,b=i||S,E=x.useRef(null),w=x.useRef(null),T=x.useRef(d),A=c!=null,I=so(c),j=so(o),B=so(l),H=x.useCallback(()=>{if(!E.current||!w.current)return;const P={placement:t,strategy:n,middleware:f};j.current&&(P.platform=j.current),vg(E.current,w.current,P).then(N=>{const M={...N,isPositioned:B.current!==!1};k.current&&!mr(T.current,M)&&(T.current=M,Ve.flushSync(()=>{u(M)}))})},[f,t,n,j,B]);rr(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[l]);const k=x.useRef(!1);rr(()=>(k.current=!0,()=>{k.current=!1}),[]),rr(()=>{if(D&&(E.current=D),b&&(w.current=b),D&&b){if(I.current)return I.current(D,b,H);H()}},[D,b,H,I,A]);const _=x.useMemo(()=>({reference:E,floating:w,setReference:p,setFloating:m}),[p,m]),O=x.useMemo(()=>({reference:D,floating:b}),[D,b]),L=x.useMemo(()=>{const P={position:n,left:0,top:0};if(!O.floating)return P;const N=Ai(O.floating,d.x),M=Ai(O.floating,d.y);return a?{...P,transform:"translate("+N+"px, "+M+"px)",...Sc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:M}},[n,a,O.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:H,refs:_,elements:O,floatingStyles:L}),[d,H,_,O,L])}const bg=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?Pi({element:r.current,padding:o}).fn(n):{}:r?Pi({element:r,padding:o}).fn(n):{}}}},wg=(e,t)=>({...dg(e),options:[e,t]}),xg=(e,t)=>({...fg(e),options:[e,t]}),Sg=(e,t)=>({...mg(e),options:[e,t]}),Cg=(e,t)=>({...pg(e),options:[e,t]}),Dg=(e,t)=>({...hg(e),options:[e,t]}),Eg=(e,t)=>({...gg(e),options:[e,t]}),Rg=(e,t)=>({...bg(e),options:[e,t]});var Tg="Arrow",Cc=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(se.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cc.displayName=Tg;var Mg=Cc;function Og(e){const[t,n]=x.useState(void 0);return we(()=>{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 ms="Popper",[Dc,bt]=yt(ms),[Pg,Ec]=Dc(ms),Rc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return h.jsx(Pg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Rc.displayName=ms;var Tc="PopperAnchor",Mc=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ec(Tc,n),i=x.useRef(null),a=le(t,i);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:h.jsx(se.div,{...o,ref:a})});Mc.displayName=Tc;var vs="PopperContent",[Ag,_g]=Dc(vs),Oc=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:f=!1,updatePositionStrategy:g="optimized",onPlaced:C,...v}=e,S=Ec(vs,n),[y,p]=x.useState(null),m=le(t,oe=>p(oe)),[D,b]=x.useState(null),E=Og(D),w=(E==null?void 0:E.width)??0,T=(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(kg),altBoundary:B},{refs:k,floatingStyles:_,placement:O,isPositioned:L,middlewareData:P}=yg({strategy:"fixed",placement:A,whileElementsMounted:(...oe)=>ug(...oe,{animationFrame:g==="always"}),elements:{reference:S.anchor},middleware:[wg({mainAxis:o+T,alignmentAxis:i}),c&&xg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Sg():void 0,...H}),c&&Cg({...H}),Dg({...H,apply:({elements:oe,rects:de,availableWidth:De,availableHeight:Ee})=>{const{width:et,height:jn}=de.reference,tt=oe.floating.style;tt.setProperty("--radix-popper-available-width",`${De}px`),tt.setProperty("--radix-popper-available-height",`${Ee}px`),tt.setProperty("--radix-popper-anchor-width",`${et}px`),tt.setProperty("--radix-popper-anchor-height",`${jn}px`)}}),D&&Rg({element:D,padding:a}),Ig({arrowWidth:w,arrowHeight:T}),f&&Eg({strategy:"referenceHidden",...H})]}),[N,M]=_c(O),$=Ie(C);we(()=>{L&&($==null||$())},[L,$]);const V=(W=P.arrow)==null?void 0:W.x,Y=(G=P.arrow)==null?void 0:G.y,U=((q=P.arrow)==null?void 0:q.centerOffset)!==0,[Z,K]=x.useState();return we(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),h.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:L?_.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:h.jsx(Ag,{scope:n,placedSide:N,onArrowChange:b,arrowX:V,arrowY:Y,shouldHideArrow:U,children:h.jsx(se.div,{"data-side":N,"data-align":M,...v,ref:m,style:{...v.style,animation:L?void 0:"none"}})})})});Oc.displayName=vs;var Pc="PopperArrow",Ng={top:"bottom",right:"left",bottom:"top",left:"right"},Ac=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=_g(Pc,r),i=Ng[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(Mg,{...o,ref:n,style:{...o.style,display:"block"}})})});Ac.displayName=Pc;function kg(e){return e!==null}var Ig=e=>({name:"transformOrigin",options:e,fn(t){var S,y,p;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]=_c(n),u={start:"0%",center:"50%",end:"100%"}[d],f=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,g=(((p=o.arrow)==null?void 0:p.y)??0)+c/2;let C="",v="";return l==="bottom"?(C=i?u:`${f}px`,v=`${-c}px`):l==="top"?(C=i?u:`${f}px`,v=`${r.floating.height+c}px`):l==="right"?(C=`${-c}px`,v=i?u:`${g}px`):l==="left"&&(C=`${r.floating.width+c}px`,v=i?u:`${g}px`),{data:{x:C,y:v}}}});function _c(e){const[t,n="center"]=e.split("-");return[t,n]}var Nr=Rc,Mn=Mc,kr=Oc,Ir=Ac,jg="Portal",On=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=x.useState(!1);we(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ju.createPortal(h.jsx(se.div,{...r,ref:t}),i):null});On.displayName=jg;function Lg(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Qe=e=>{const{present:t,children:n}=e,r=$g(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=le(r.ref,Fg(o));return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:s}):null};Qe.displayName="Presence";function $g(e){const[t,n]=x.useState(),r=x.useRef({}),o=x.useRef(e),s=x.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Lg(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=Hn(r.current);s.current=a==="mounted"?l:"none"},[a]),we(()=>{const l=r.current,d=o.current;if(d!==e){const f=s.current,g=Hn(l);e?c("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&f!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),we(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=g=>{const v=Hn(r.current).includes(g.animationName);if(g.target===t&&v&&(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)})}},f=g=>{g.target===t&&(s.current=Hn(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",f),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 Hn(e){return(e==null?void 0:e.animationName)||"none"}function Fg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Tt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=zg({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Ie(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 zg({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),s=Ie(t);return x.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Wg="VisuallyHidden",ys=x.forwardRef((e,t)=>h.jsx(se.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ys.displayName=Wg;var Bg=ys,[jr,Yw]=yt("Tooltip",[bt]),Lr=bt(),Nc="TooltipProvider",Hg=700,Lo="tooltip.open",[Vg,bs]=jr(Nc),kc=e=>{const{__scopeTooltip:t,delayDuration:n=Hg,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)},[]),h.jsx(Vg,{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})};kc.displayName=Nc;var $r="Tooltip",[Ug,Pn]=jr($r),Ic=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=bs($r,e.__scopeTooltip),l=Lr(t),[d,u]=x.useState(null),f=ht(),g=x.useRef(0),C=i??c.disableHoverableContent,v=a??c.delayDuration,S=x.useRef(!1),[y=!1,p]=Tt({prop:r,defaultProp:o,onChange:w=>{w?(c.onOpen(),document.dispatchEvent(new CustomEvent(Lo))):c.onClose(),s==null||s(w)}}),m=x.useMemo(()=>y?S.current?"delayed-open":"instant-open":"closed",[y]),D=x.useCallback(()=>{window.clearTimeout(g.current),g.current=0,S.current=!1,p(!0)},[p]),b=x.useCallback(()=>{window.clearTimeout(g.current),g.current=0,p(!1)},[p]),E=x.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{S.current=!0,p(!0),g.current=0},v)},[v,p]);return x.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),h.jsx(Nr,{...l,children:h.jsx(Ug,{scope:t,contentId:f,open:y,stateAttribute:m,trigger:d,onTriggerChange:u,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?E():D()},[c.isOpenDelayed,E,D]),onTriggerLeave:x.useCallback(()=>{C?b():(window.clearTimeout(g.current),g.current=0)},[b,C]),onOpen:D,onClose:b,disableHoverableContent:C,children:n})})};Ic.displayName=$r;var $o="TooltipTrigger",jc=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Pn($o,n),s=bs($o,n),i=Lr(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]),h.jsx(Mn,{asChild:!0,...i,children:h.jsx(se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ee(e.onPointerMove,f=>{f.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)})})});jc.displayName=$o;var ws="TooltipPortal",[Yg,Kg]=jr(ws,{forceMount:void 0}),Lc=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Pn(ws,t);return h.jsx(Yg,{scope:t,forceMount:n,children:h.jsx(Qe,{present:n||s.open,children:h.jsx(On,{asChild:!0,container:o,children:r})})})};Lc.displayName=ws;var Vt="TooltipContent",$c=x.forwardRef((e,t)=>{const n=Kg(Vt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Pn(Vt,e.__scopeTooltip);return h.jsx(Qe,{present:r||i.open,children:i.disableHoverableContent?h.jsx(Fc,{side:o,...s,ref:t}):h.jsx(Gg,{side:o,...s,ref:t})})}),Gg=x.forwardRef((e,t)=>{const n=Pn(Vt,e.__scopeTooltip),r=bs(Vt,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,f=x.useCallback(()=>{a(null),u(!1)},[u]),g=x.useCallback((C,v)=>{const S=C.currentTarget,y={x:C.clientX,y:C.clientY},p=Jg(y,S.getBoundingClientRect()),m=Qg(y,p),D=em(v.getBoundingClientRect()),b=nm([...m,...D]);a(b),u(!0)},[u]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(c&&d){const C=S=>g(S,d),v=S=>g(S,c);return c.addEventListener("pointerleave",C),d.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",C),d.removeEventListener("pointerleave",v)}}},[c,d,g,f]),x.useEffect(()=>{if(i){const C=v=>{const S=v.target,y={x:v.clientX,y:v.clientY},p=(c==null?void 0:c.contains(S))||(d==null?void 0:d.contains(S)),m=!tm(y,i);p?f():m&&(f(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,d,i,l,f]),h.jsx(Fc,{...e,ref:s})}),[qg,Xg]=jr($r,{isInside:!1}),Fc=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Pn(Vt,n),l=Lr(n),{onClose:d}=c;return x.useEffect(()=>(document.addEventListener(Lo,d),()=>document.removeEventListener(Lo,d)),[d]),x.useEffect(()=>{if(c.trigger){const u=f=>{const g=f.target;g!=null&&g.contains(c.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,d]),h.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:h.jsxs(kr,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(ac,{children:r}),h.jsx(qg,{scope:n,isInside:!0,children:h.jsx(Bg,{id:c.contentId,role:"tooltip",children:o||r})})]})})});$c.displayName=Vt;var zc="TooltipArrow",Zg=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Lr(n);return Xg(zc,n).isInside?null:h.jsx(Ir,{...o,...r,ref:t})});Zg.displayName=zc;function Jg(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 Qg(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 em(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 tm(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 nm(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),rm(t)}function rm(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 om=kc,sm=Ic,im=jc,am=Lc,cm=$c;function xs({delayDuration:e=0,...t}){return h.jsx(om,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Wc({...e}){return h.jsx(xs,{children:h.jsx(sm,{"data-slot":"tooltip",...e})})}function Bc({...e}){return h.jsx(im,{"data-slot":"tooltip-trigger",...e})}function Hc({className:e,sideOffset:t=0,children:n,...r}){return h.jsx(am,{children:h.jsx(cm,{"data-slot":"tooltip-content",sideOffset:t,className:ne("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 lm=({children:e,content:t})=>h.jsx(xs,{children:h.jsxs(Wc,{children:[h.jsx(Bc,{asChild:!0,children:e}),h.jsx(Hc,{sideOffset:9,side:"bottom",className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:h.jsx("p",{children:t})})]})});function Ss(e){const t=e+"CollectionProvider",[n,r]=yt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:C,children:v}=g,S=R.useRef(null),y=R.useRef(new Map).current;return h.jsx(o,{scope:C,itemMap:y,collectionRef:S,children:v})};i.displayName=t;const a=e+"CollectionSlot",c=R.forwardRef((g,C)=>{const{scope:v,children:S}=g,y=s(a,v),p=le(C,y.collectionRef);return h.jsx(pt,{ref:p,children:S})});c.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",u=R.forwardRef((g,C)=>{const{scope:v,children:S,...y}=g,p=R.useRef(null),m=le(C,p),D=s(l,v);return R.useEffect(()=>(D.itemMap.set(p,{ref:p,...y}),()=>void D.itemMap.delete(p))),h.jsx(pt,{[d]:"",ref:m,children:S})});u.displayName=l;function f(g){const C=s(e+"CollectionConsumer",g);return R.useCallback(()=>{const S=C.collectionRef.current;if(!S)return[];const y=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(C.itemMap.values()).sort((D,b)=>y.indexOf(D.ref.current)-y.indexOf(b.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:i,Slot:c,ItemSlot:u},f,r]}var um=x.createContext(void 0);function Cs(e){const t=x.useContext(um);return e||t||"ltr"}var io=0;function Ds(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_i()),document.body.insertAdjacentElement("beforeend",e[1]??_i()),io++,()=>{io===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),io--}},[])}function _i(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ao="focusScope.autoFocusOnMount",co="focusScope.autoFocusOnUnmount",Ni={bubbles:!1,cancelable:!0},dm="FocusScope",Fr=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=x.useState(null),l=Ie(o),d=Ie(s),u=x.useRef(null),f=le(t,v=>c(v)),g=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let v=function(m){if(g.paused||!a)return;const D=m.target;a.contains(D)?u.current=D:dt(u.current,{select:!0})},S=function(m){if(g.paused||!a)return;const D=m.relatedTarget;D!==null&&(a.contains(D)||dt(u.current,{select:!0}))},y=function(m){if(document.activeElement===document.body)for(const b of m)b.removedNodes.length>0&&dt(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",S);const p=new MutationObserver(y);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",S),p.disconnect()}}},[r,a,g.paused]),x.useEffect(()=>{if(a){Ii.add(g);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(ao,Ni);a.addEventListener(ao,l),a.dispatchEvent(y),y.defaultPrevented||(fm(vm(Vc(a)),{select:!0}),document.activeElement===v&&dt(a))}return()=>{a.removeEventListener(ao,l),setTimeout(()=>{const y=new CustomEvent(co,Ni);a.addEventListener(co,d),a.dispatchEvent(y),y.defaultPrevented||dt(v??document.body,{select:!0}),a.removeEventListener(co,d),Ii.remove(g)},0)}}},[a,l,d,g]);const C=x.useCallback(v=>{if(!n&&!r||g.paused)return;const S=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(S&&y){const p=v.currentTarget,[m,D]=pm(p);m&&D?!v.shiftKey&&y===D?(v.preventDefault(),n&&dt(m,{select:!0})):v.shiftKey&&y===m&&(v.preventDefault(),n&&dt(D,{select:!0})):y===p&&v.preventDefault()}},[n,r,g.paused]);return h.jsx(se.div,{tabIndex:-1,...i,ref:f,onKeyDown:C})});Fr.displayName=dm;function fm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(dt(r,{select:t}),document.activeElement!==n)return}function pm(e){const t=Vc(e),n=ki(t,e),r=ki(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 ki(e,t){for(const n of e)if(!hm(n,{upTo:t}))return n}function hm(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 gm(e){return e instanceof HTMLInputElement&&"select"in e}function dt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gm(e)&&t&&e.select()}}var Ii=mm();function mm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ji(e,t),e.unshift(t)},remove(t){var n;e=ji(e,t),(n=e[0])==null||n.resume()}}}function ji(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function vm(e){return e.filter(t=>t.tagName!=="A")}var lo="rovingFocusGroup.onEntryFocus",ym={bubbles:!1,cancelable:!0},zr="RovingFocusGroup",[Fo,Uc,bm]=Ss(zr),[wm,Yc]=yt(zr,[bm]),[xm,Sm]=wm(zr),Kc=x.forwardRef((e,t)=>h.jsx(Fo.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Fo.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Cm,{...e,ref:t})})}));Kc.displayName=zr;var Cm=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,f=x.useRef(null),g=le(t,f),C=Cs(s),[v=null,S]=Tt({prop:i,defaultProp:a,onChange:c}),[y,p]=x.useState(!1),m=Ie(l),D=Uc(n),b=x.useRef(!1),[E,w]=x.useState(0);return x.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(lo,m),()=>T.removeEventListener(lo,m)},[m]),h.jsx(xm,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:v,onItemFocus:x.useCallback(T=>S(T),[S]),onItemShiftTab:x.useCallback(()=>p(!0),[]),onFocusableItemAdd:x.useCallback(()=>w(T=>T+1),[]),onFocusableItemRemove:x.useCallback(()=>w(T=>T-1),[]),children:h.jsx(se.div,{tabIndex:y||E===0?-1:0,"data-orientation":r,...u,ref:g,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{b.current=!0}),onFocus:ee(e.onFocus,T=>{const A=!b.current;if(T.target===T.currentTarget&&A&&!y){const I=new CustomEvent(lo,ym);if(T.currentTarget.dispatchEvent(I),!I.defaultPrevented){const j=D().filter(O=>O.focusable),B=j.find(O=>O.active),H=j.find(O=>O.id===v),_=[B,H,...j].filter(Boolean).map(O=>O.ref.current);Xc(_,d)}}b.current=!1}),onBlur:ee(e.onBlur,()=>p(!1))})})}),Gc="RovingFocusGroupItem",qc=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=ht(),c=s||a,l=Sm(Gc,n),d=l.currentTabStopId===c,u=Uc(n),{onFocusableItemAdd:f,onFocusableItemRemove:g}=l;return x.useEffect(()=>{if(r)return f(),()=>g()},[r,f,g]),h.jsx(Fo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:h.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 v=Rm(C,l.orientation,l.dir);if(v!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let y=u().filter(p=>p.focusable).map(p=>p.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const p=y.indexOf(C.currentTarget);y=l.loop?Tm(y,p+1):y.slice(p+1)}setTimeout(()=>Xc(y))}})})})});qc.displayName=Gc;var Dm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Em(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Rm(e,t,n){const r=Em(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Dm[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 Tm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Mm=Kc,Om=qc,Pm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},It=new WeakMap,Vn=new WeakMap,Un={},uo=0,Zc=function(e){return e&&(e.host||Zc(e.parentNode))},Am=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})},_m=function(e,t,n,r){var o=Am(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(f){if(a.has(f))d(f);else try{var g=f.getAttribute(r),C=g!==null&&g!=="false",v=(It.get(f)||0)+1,S=(s.get(f)||0)+1;It.set(f,v),s.set(f,S),i.push(f),v===1&&C&&Vn.set(f,!0),S===1&&f.setAttribute(n,"true"),C||f.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return d(t),a.clear(),uo++,function(){i.forEach(function(u){var f=It.get(u)-1,g=s.get(u)-1;It.set(u,f),s.set(u,g),f||(Vn.has(u)||u.removeAttribute(r),Vn.delete(u)),g||u.removeAttribute(n)}),uo--,uo||(It=new WeakMap,It=new WeakMap,Vn=new WeakMap,Un={})}},Es=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Pm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),_m(r,o,n,"aria-hidden")):function(){return null}},He=function(){return He=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},He.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 Nm(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 or="right-scroll-bar-position",sr="width-before-scroll-bar",km="with-scroll-bars-hidden",Im="--removed-body-scroll-bar-size";function fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jm(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 Lm=typeof window<"u"?x.useLayoutEffect:x.useEffect,Li=new WeakMap;function $m(e,t){var n=jm(null,function(r){return e.forEach(function(o){return fo(o,r)})});return Lm(function(){var r=Li.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||fo(a,null)}),s.forEach(function(a){o.has(a)||fo(a,i)})}Li.set(n,e)},[e]),n}function Fm(e){return e}function zm(e,t){t===void 0&&(t=Fm);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 Wm(e){e===void 0&&(e={});var t=zm(null);return t.options=He({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 x.createElement(r,He({},n))};Qc.isSideCarExport=!0;function Bm(e,t){return e.useMedium(t),Qc}var el=Wm(),po=function(){},Wr=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:po,onWheelCapture:po,onTouchMoveCapture:po}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,g=e.noIsolation,C=e.inert,v=e.allowPinchZoom,S=e.as,y=S===void 0?"div":S,p=e.gapMode,m=Jc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=f,b=$m([n,t]),E=He(He({},m),o);return x.createElement(x.Fragment,null,d&&x.createElement(D,{sideCar:el,removeScrollBar:l,shards:u,noIsolation:g,inert:C,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:p}),i?x.cloneElement(x.Children.only(a),He(He({},E),{ref:b})):x.createElement(y,He({},E,{className:c,ref:b}),a))});Wr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wr.classNames={fullWidth:sr,zeroRight:or};var Hm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hm();return t&&e.setAttribute("nonce",t),e}function Um(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ym(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Km=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Vm())&&(Um(t,n),Ym(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gm=function(){var e=Km();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tl=function(){var e=Gm(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},qm={left:0,top:0,right:0,gap:0},ho=function(e){return parseInt(e||"",10)||0},Xm=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ho(n),ho(r),ho(o)]},Zm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qm;var t=Xm(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])}},Jm=tl(),zt="data-scroll-locked",Qm=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
121
- .`.concat(km,` {
100
+ */const rh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oh=we("X",rh);function pi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=pi(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():pi(e[o],null)}}}}function le(...e){return x.useCallback(Rr(...e),e)}var dt=x.forwardRef((e,t)=>{const{children:n,...r}=e,o=x.Children.toArray(n),s=o.find(sh);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(Po,{...r,ref:t,children:x.isValidElement(i)?x.cloneElement(i,void 0,a):null})}return p.jsx(Po,{...r,ref:t,children:n})});dt.displayName="Slot";var Po=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const o=ah(n),s=ih(r,n.props);return n.type!==x.Fragment&&(s.ref=t?Rr(t,o):o),x.cloneElement(n,s)}return x.Children.count(n)>1?x.Children.only(null):null});Po.displayName="SlotClone";var tc=({children:e})=>p.jsx(p.Fragment,{children:e});function sh(e){return x.isValidElement(e)&&e.type===tc}function ih(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 ah(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 hi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gi=Ha,nc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gi(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=hi(d)||hi(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(C=>{let[g,S]=C;return Array.isArray(S)?S.includes({...s,...a}[g]):{...s,...a}[g]===S})?[...l,u,v]:l},[]);return gi(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},ch=nc("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:ne(ch({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=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=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:""}))})),rc=M.createContext(void 0),Ct=()=>{const e=M.use(rc);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,...C}=u,g=((m=v==null?void 0:v[e])==null?void 0:m[c])||a,S=x.useMemo(()=>C,Object.values(C));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,C=x.useContext(b);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=>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,lh(o,...t)]}function lh(...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 uh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=uh.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 oc(e,t){e&&br.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 dh(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 fh="DismissableLayer",Ao="dismissableLayer.update",ph="dismissableLayer.pointerDownOutside",hh="dismissableLayer.focusOutside",mi,sc=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(sc),[d,u]=x.useState(null),v=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=x.useState({}),C=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,D=f>=m,y=vh(w=>{const R=w.target,A=[...l.branches].some(I=>I.contains(R));!D||A||(o==null||o(w),i==null||i(w),w.defaultPrevented||a==null||a())},v),E=yh(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 dh(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&&(mi=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),vi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=mi)}},[d,v,n,l]),x.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),vi())},[d,l]),x.useEffect(()=>{const w=()=>b({});return document.addEventListener(Ao,w),()=>document.removeEventListener(Ao,w)},[]),p.jsx(se.div,{...c,ref:C,style:{pointerEvents:h?D?"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=fh;var gh="DismissableLayerBranch",mh=x.forwardRef((e,t)=>{const n=x.useContext(sc),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})});mh.displayName=gh;function vh(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(){ic(ph,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 yh(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&&ic(hh,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 vi(){const e=new CustomEvent(Ao);document.dispatchEvent(e)}function ic(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?oc(o,s):o.dispatchEvent(s)}var ye=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},bh=x.useId||(()=>{}),wh=0;function ft(e){const[t,n]=x.useState(bh());return ye(()=>{n(r=>r??String(wh++))},[e]),e||(t?`radix-${t}`:"")}const xh=["top","right","bottom","left"],pt=Math.min,Re=Math.max,ur=Math.round,Fn=Math.floor,Be=e=>({x:e,y:e}),Sh={left:"right",right:"left",bottom:"top",top:"bottom"},Ch={start:"end",end:"start"};function No(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 is(e){return e==="x"?"y":"x"}function as(e){return e==="y"?"height":"width"}function ht(e){return["top","bottom"].includes(Xe(e))?"y":"x"}function cs(e){return is(ht(e))}function Dh(e,t,n){n===void 0&&(n=!1);const r=Gt(e),o=cs(e),s=as(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=dr(i)),[i,dr(i)]}function Eh(e){const t=dr(e);return[ko(e),t,ko(t)]}function ko(e){return e.replace(/start|end/g,t=>Ch[t])}function Mh(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 Rh(e,t,n,r){const o=Gt(e);let s=Mh(Xe(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ko)))),s}function dr(e){return e.replace(/left|right|bottom|top/g,t=>Sh[t])}function Th(e){return{top:0,right:0,bottom:0,left:0,...e}}function ac(e){return typeof e!="number"?Th(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 yi(e,t,n){let{reference:r,floating:o}=e;const s=ht(t),i=cs(t),a=as(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 Oh=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}=yi(l,r,c),v=r,b={},C=0;for(let g=0;g<a.length;g++){const{name:S,fn:m}=a[g],{x:f,y:h,data:D,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],...D}},y&&C<=50&&(C++,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}=yi(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),C=ac(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)),D=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+C.top)/D.y,bottom:(y.bottom-m.bottom+C.bottom)/D.y,left:(m.left-y.left+C.left)/D.x,right:(y.right-m.right+C.right)/D.x}}const Ph=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=ac(d),v={x:n,y:r},b=cs(o),C=as(b),g=await i.getDimensions(l),S=b==="y",m=S?"top":"left",f=S?"bottom":"right",h=S?"clientHeight":"clientWidth",D=s.reference[C]+s.reference[b]-v[b]-s.floating[C],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[C]);const R=D/2-y/2,A=w/2-g[C]/2-1,I=pt(u[m],A),j=pt(u[f],A),B=I,H=w-g[C]-j,_=w/2-g[C]/2+R,N=No(B,_,H),O=!c.arrow&&Gt(o)!=null&&_!==N&&s.reference[C]/2-(_<B?I:j)-g[C]/2<0,$=O?_<B?_-B:_-H:0;return{[b]:v[b]+$,data:{[b]:N,centerOffset:_-N-$,...O&&{alignmentOffset:$}},reset:O}}}),Ah=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:C="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,D=await(c.isRTL==null?void 0:c.isRTL(l.floating)),y=v||(h||!g?[dr(a)]:Eh(a)),E=C!=="none";!v&&E&&y.push(...Rh(a,g,C,D));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 _=Dh(o,i,D);A.push(R[_[0]],R[_[1]])}if(I=[...I,{placement:o,overflows:A}],!A.every(_=>_<=0)){var j,B;const _=(((j=s.flip)==null?void 0:j.index)||0)+1,N=w[_];if(N)return{data:{index:_,overflows:I},reset:{placement:N}};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 bi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wi(e){return xh.some(t=>e[t]>=0)}const Nh=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=bi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:wi(i)}}}case"escaped":{const s=await mn(t,{...o,altBoundary:!0}),i=bi(s,n.floating);return{data:{escapedOffsets:i,escaped:wi(i)}}}default:return{}}}}};async function kh(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: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"&&(b=a==="end"?C*-1:C),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 kh(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}}}}},Ih=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=is(u);let b=l[v],C=l[u];if(s){const S=v==="y"?"top":"left",m=v==="y"?"bottom":"right",f=b+d[S],h=b-d[m];b=No(f,b,h)}if(i){const S=u==="y"?"top":"left",m=u==="y"?"bottom":"right",f=C+d[S],h=C-d[m];C=No(f,C,h)}const g=a.fn({...t,[v]:b,[u]:C});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:s,[u]:i}}}}}},jh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=qe(e,t),d={x:n,y:r},u=ht(o),v=is(u);let b=d[v],C=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",D=s.reference[v]-s.floating[h]+S.mainAxis,y=s.reference[v]+s.reference[h]-S.mainAxis;b<D?b=D:b>y&&(b=y)}if(l){var m,f;const h=v==="y"?"width":"height",D=["top","left"].includes(Xe(o)),y=s.reference[u]-s.floating[h]+(D&&((m=i.offset)==null?void 0:m[u])||0)+(D?0:S.crossAxis),E=s.reference[u]+s.reference[h]+(D?0:((f=i.offset)==null?void 0:f[u])||0)-(D?S.crossAxis:0);C<y?C=y:C>E&&(C=E)}return{[v]:b,[u]:C}}}},$h=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:C,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=C-d.left-d.right,D=pt(g-d[S],f),y=pt(C-d[m],h),E=!t.middlewareData.shift;let w=D,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=C-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 C!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function Tr(){return typeof window<"u"}function qt(e){return cc(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=(cc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cc(e){return Tr()?e instanceof Node||e instanceof Te(e).Node:!1}function je(e){return Tr()?e instanceof Element||e instanceof Te(e).Element:!1}function He(e){return Tr()?e instanceof HTMLElement||e instanceof Te(e).HTMLElement:!1}function xi(e){return!Tr()||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 Lh(e){return["table","td","th"].includes(qt(e))}function Or(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ls(e){const t=us(),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 Fh(e){let t=gt(e);for(;He(t)&&!Wt(t);){if(ls(t))return t;if(Or(t))return null;t=gt(t)}return null}function us(){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 Pr(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||xi(e)&&e.host||Ve(e);return xi(t)?t.host:t}function lc(e){const t=gt(e);return Wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&En(t)?t:lc(t)}function vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Te(o);if(s){const a=_o(i);return t.concat(i,i.visualViewport||[],En(o)?o:[],a&&n?vn(a):[])}return t.concat(o,vn(o,[],n))}function _o(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uc(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 ds(e){return je(e)?e:e.contextElement}function $t(e){const t=ds(e);if(!He(t))return Be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=uc(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 zh=Be(0);function dc(e){const t=Te(e);return!us()||!t.visualViewport?zh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wh(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=ds(e);let i=Be(1);t&&(r?je(r)&&(i=$t(r)):i=$t(e));const a=Wh(s,n,r)?dc(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 C=v,g=_o(C);for(;g&&r&&b!==C;){const S=$t(g),m=g.getBoundingClientRect(),f=$e(g),h=m.left+(g.clientLeft+parseFloat(f.paddingLeft))*S.x,D=m.top+(g.clientTop+parseFloat(f.paddingTop))*S.y;c*=S.x,l*=S.y,d*=S.x,u*=S.y,c+=h,l+=D,C=Te(g),g=_o(C)}}return fr({width:d,height:u,x:c,y:l})}function fs(e,t){const n=Pr(e).scrollLeft;return t?t.left+n:Dt(Ve(e)).left+n}function fc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:fs(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Bh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ve(r),a=t?Or(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=Pr(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?fc(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 Hh(e){return Array.from(e.getClientRects())}function Vh(e){const t=Ve(e),n=Pr(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fs(e);const a=-n.scrollTop;return $e(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function Yh(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=us();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function Uh(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 Si(e,t,n){let r;if(t==="viewport")r=Yh(e,n);else if(t==="document")r=Vh(Ve(e));else if(je(t))r=Uh(t,n);else{const o=dc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fr(r)}function pc(e,t){const n=gt(e);return n===t||!je(n)||Wt(n)?!1:$e(n).position==="fixed"||pc(n,t)}function Kh(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=ls(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||En(i)&&!c&&pc(e,i))?r=r.filter(d=>d!==i):o=a,i=gt(i)}return t.set(e,r),r}function Gh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Or(t)?[]:Kh(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const u=Si(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},Si(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function qh(e){const{width:t,height:n}=uc(e);return{width:t,height:n}}function Xh(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=Pr(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=fs(o));const l=o&&!r&&!s?fc(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 no(e){return $e(e).position==="static"}function Ci(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 hc(e,t){const n=Te(e);if(Or(e))return n;if(!He(e)){let o=gt(e);for(;o&&!Wt(o);){if(je(o)&&!no(o))return o;o=gt(o)}return n}let r=Ci(e,t);for(;r&&Lh(r)&&no(r);)r=Ci(r,t);return r&&Wt(r)&&no(r)&&!ls(r)?n:r||Fh(e)||n}const Zh=async function(e){const t=this.getOffsetParent||hc,n=this.getDimensions,r=await n(e.floating);return{reference:Xh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Jh(e){return $e(e).direction==="rtl"}const Qh={convertOffsetParentRelativeRectToViewportRelativeRect:Bh,getDocumentElement:Ve,getClippingRect:Gh,getOffsetParent:hc,getElementRects:Zh,getClientRects:Hh,getDimensions:qh,getScale:$t,isElement:je,isRTL:Jh};function gc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eg(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 C=Fn(u),g=Fn(o.clientWidth-(d+v)),S=Fn(o.clientHeight-(u+b)),m=Fn(d),h={rootMargin:-C+"px "+-g+"px "+-S+"px "+-m+"px",threshold:Re(0,pt(1,c))||1};let D=!0;function y(E){const w=E[0].intersectionRatio;if(w!==c){if(!D)return i();w?i(!1,w):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w===1&&!gc(l,e.getBoundingClientRect())&&i(),D=!1}try{n=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch{n=new IntersectionObserver(y,h)}n.observe(e)}return i(!0),s}function tg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ds(e),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?eg(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 C,g=c?Dt(e):null;c&&S();function S(){const m=Dt(e);g&&!gc(g,m)&&n(),g=m,C=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(C)}}const ng=_h,rg=Ih,og=Ah,sg=$h,ig=Nh,Di=Ph,ag=jh,cg=(e,t,n)=>{const r=new Map,o={platform:Qh,...n},s={...o.platform,_c:r};return Oh(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 mc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ei(e,t){const n=mc(e);return Math.round(t*n)/n}function ro(e){const t=x.useRef(e);return er(()=>{t.current=e}),t}function lg(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[C,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))},[]),D=s||C,y=i||S,E=x.useRef(null),w=x.useRef(null),R=x.useRef(d),A=c!=null,I=ro(c),j=ro(o),B=ro(l),H=x.useCallback(()=>{if(!E.current||!w.current)return;const P={placement:t,strategy:n,middleware:v};j.current&&(P.platform=j.current),cg(E.current,w.current,P).then(k=>{const T={...k,isPositioned:B.current!==!1};_.current&&!pr(R.current,T)&&(R.current=T,br.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 _=x.useRef(!1);er(()=>(_.current=!0,()=>{_.current=!1}),[]),er(()=>{if(D&&(E.current=D),y&&(w.current=y),D&&y){if(I.current)return I.current(D,y,H);H()}},[D,y,H,I,A]);const N=x.useMemo(()=>({reference:E,floating:w,setReference:f,setFloating:h}),[f,h]),O=x.useMemo(()=>({reference:D,floating:y}),[D,y]),$=x.useMemo(()=>{const P={position:n,left:0,top:0};if(!O.floating)return P;const k=Ei(O.floating,d.x),T=Ei(O.floating,d.y);return a?{...P,transform:"translate("+k+"px, "+T+"px)",...mc(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:N,elements:O,floatingStyles:$}),[d,H,N,O,$])}const ug=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):{}}}},dg=(e,t)=>({...ng(e),options:[e,t]}),fg=(e,t)=>({...rg(e),options:[e,t]}),pg=(e,t)=>({...ag(e),options:[e,t]}),hg=(e,t)=>({...og(e),options:[e,t]}),gg=(e,t)=>({...sg(e),options:[e,t]}),mg=(e,t)=>({...ig(e),options:[e,t]}),vg=(e,t)=>({...ug(e),options:[e,t]});var yg="Arrow",vc=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"})})});vc.displayName=yg;var bg=vc;function wg(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 ps="Popper",[yc,vt]=mt(ps),[xg,bc]=yc(ps),wc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return p.jsx(xg,{scope:t,anchor:r,onAnchorChange:o,children:n})};wc.displayName=ps;var xc="PopperAnchor",Sc=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=bc(xc,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})});Sc.displayName=xc;var hs="PopperContent",[Sg,Cg]=yc(hs),Cc=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:C,...g}=e,S=bc(hs,n),[m,f]=x.useState(null),h=le(t,oe=>f(oe)),[D,y]=x.useState(null),E=wg(D),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(Eg),altBoundary:B},{refs:_,floatingStyles:N,placement:O,isPositioned:$,middlewareData:P}=lg({strategy:"fixed",placement:A,whileElementsMounted:(...oe)=>tg(...oe,{animationFrame:b==="always"}),elements:{reference:S.anchor},middleware:[dg({mainAxis:o+R,alignmentAxis:i}),c&&fg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?pg():void 0,...H}),c&&hg({...H}),gg({...H,apply:({elements:oe,rects:de,availableWidth:Se,availableHeight:Ce})=>{const{width:Je,height:_n}=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",`${Je}px`),Qe.setProperty("--radix-popper-anchor-height",`${_n}px`)}}),D&&vg({element:D,padding:a}),Mg({arrowWidth:w,arrowHeight:R}),v&&mg({strategy:"referenceHidden",...H})]}),[k,T]=Mc(O),L=ke(C);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:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:$?N.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(Sg,{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"}})})})});Cc.displayName=hs;var Dc="PopperArrow",Dg={top:"bottom",right:"left",bottom:"top",left:"right"},Ec=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Cg(Dc,r),i=Dg[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(bg,{...o,ref:n,style:{...o.style,display:"block"}})})});Ec.displayName=Dc;function Eg(e){return e!==null}var Mg=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]=Mc(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 C="",g="";return l==="bottom"?(C=i?u:`${v}px`,g=`${-c}px`):l==="top"?(C=i?u:`${v}px`,g=`${r.floating.height+c}px`):l==="right"?(C=`${-c}px`,g=i?u:`${b}px`):l==="left"&&(C=`${r.floating.width+c}px`,g=i?u:`${b}px`),{data:{x:C,y:g}}}});function Mc(e){const[t,n="center"]=e.split("-");return[t,n]}var Ar=wc,Mn=Sc,Nr=Cc,kr=Ec,Rg="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=Rg;function Tg(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Ze=e=>{const{present:t,children:n}=e,r=Og(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=le(r.ref,Pg(o));return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:s}):null};Ze.displayName="Presence";function Og(e){const[t,n]=x.useState(),r=x.useRef({}),o=x.useRef(e),s=x.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Tg(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 Pg(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]=Ag({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 Ag({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 Ng="VisuallyHidden",gs=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}}));gs.displayName=Ng;var kg=gs,[_r,$w]=mt("Tooltip",[vt]),Ir=vt(),Rc="TooltipProvider",_g=700,Io="tooltip.open",[Ig,ms]=_r(Rc),Tc=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(Ig,{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})};Tc.displayName=Rc;var jr="Tooltip",[jg,Tn]=_r(jr),Oc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=ms(jr,e.__scopeTooltip),l=Ir(t),[d,u]=x.useState(null),v=ft(),b=x.useRef(0),C=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(Io))):c.onClose(),s==null||s(w)}}),h=x.useMemo(()=>m?S.current?"delayed-open":"instant-open":"closed",[m]),D=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(Ar,{...l,children:p.jsx(jg,{scope:t,contentId:v,open:m,stateAttribute:h,trigger:d,onTriggerChange:u,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?E():D()},[c.isOpenDelayed,E,D]),onTriggerLeave:x.useCallback(()=>{C?y():(window.clearTimeout(b.current),b.current=0)},[y,C]),onOpen:D,onClose:y,disableHoverableContent:C,children:n})})};Oc.displayName=jr;var jo="TooltipTrigger",Pc=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Tn(jo,n),s=ms(jo,n),i=Ir(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)})})});Pc.displayName=jo;var vs="TooltipPortal",[$g,Lg]=_r(vs,{forceMount:void 0}),Ac=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Tn(vs,t);return p.jsx($g,{scope:t,forceMount:n,children:p.jsx(Ze,{present:n||s.open,children:p.jsx(Rn,{asChild:!0,container:o,children:r})})})};Ac.displayName=vs;var Bt="TooltipContent",Nc=x.forwardRef((e,t)=>{const n=Lg(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(kc,{side:o,...s,ref:t}):p.jsx(Fg,{side:o,...s,ref:t})})}),Fg=x.forwardRef((e,t)=>{const n=Tn(Bt,e.__scopeTooltip),r=ms(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((C,g)=>{const S=C.currentTarget,m={x:C.clientX,y:C.clientY},f=Hg(m,S.getBoundingClientRect()),h=Vg(m,f),D=Yg(g.getBoundingClientRect()),y=Kg([...h,...D]);a(y),u(!0)},[u]);return x.useEffect(()=>()=>v(),[v]),x.useEffect(()=>{if(c&&d){const C=S=>b(S,d),g=S=>b(S,c);return c.addEventListener("pointerleave",C),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",C),d.removeEventListener("pointerleave",g)}}},[c,d,b,v]),x.useEffect(()=>{if(i){const C=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=!Ug(m,i);f?v():h&&(v(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,d,i,l,v]),p.jsx(kc,{...e,ref:s})}),[zg,Wg]=_r(jr,{isInside:!1}),kc=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Tn(Bt,n),l=Ir(n),{onClose:d}=c;return x.useEffect(()=>(document.addEventListener(Io,d),()=>document.removeEventListener(Io,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(Nr,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(tc,{children:r}),p.jsx(zg,{scope:n,isInside:!0,children:p.jsx(kg,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Nc.displayName=Bt;var _c="TooltipArrow",Bg=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ir(n);return Wg(_c,n).isInside?null:p.jsx(kr,{...o,...r,ref:t})});Bg.displayName=_c;function Hg(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 Vg(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 Yg(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 Ug(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 Kg(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),Gg(t)}function Gg(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 qg=Tc,Xg=Oc,Zg=Pc,Jg=Ac,Qg=Nc;function ys({delayDuration:e=0,...t}){return p.jsx(qg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Ic({...e}){return p.jsx(ys,{children:p.jsx(Xg,{"data-slot":"tooltip",...e})})}function jc({...e}){return p.jsx(Zg,{"data-slot":"tooltip-trigger",...e})}function $c({className:e,sideOffset:t=0,children:n,...r}){return p.jsx(Jg,{children:p.jsx(Qg,{"data-slot":"tooltip-content",sideOffset:t,className:ne("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 em=({children:e,content:t})=>p.jsx(ys,{children:p.jsxs(Ic,{children:[p.jsx(jc,{asChild:!0,children:e}),p.jsx($c,{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 bs(e){const t=e+"CollectionProvider",[n,r]=mt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=b=>{const{scope:C,children:g}=b,S=M.useRef(null),m=M.useRef(new Map).current;return p.jsx(o,{scope:C,itemMap:m,collectionRef:S,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=M.forwardRef((b,C)=>{const{scope:g,children:S}=b,m=s(a,g),f=le(C,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,C)=>{const{scope:g,children:S,...m}=b,f=M.useRef(null),h=le(C,f),D=s(l,g);return M.useEffect(()=>(D.itemMap.set(f,{ref:f,...m}),()=>void D.itemMap.delete(f))),p.jsx(dt,{[d]:"",ref:h,children:S})});u.displayName=l;function v(b){const C=s(e+"CollectionConsumer",b);return M.useCallback(()=>{const S=C.collectionRef.current;if(!S)return[];const m=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(C.itemMap.values()).sort((D,y)=>m.indexOf(D.ref.current)-m.indexOf(y.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:i,Slot:c,ItemSlot:u},v,r]}var tm=x.createContext(void 0);function ws(e){const t=x.useContext(tm);return e||t||"ltr"}var oo=0;function xs(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mi()),document.body.insertAdjacentElement("beforeend",e[1]??Mi()),oo++,()=>{oo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),oo--}},[])}function Mi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var so="focusScope.autoFocusOnMount",io="focusScope.autoFocusOnUnmount",Ri={bubbles:!1,cancelable:!0},nm="FocusScope",$r=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 D=h.target;a.contains(D)?u.current=D:lt(u.current,{select:!0})},S=function(h){if(b.paused||!a)return;const D=h.relatedTarget;D!==null&&(a.contains(D)||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){Oi.add(b);const g=document.activeElement;if(!a.contains(g)){const m=new CustomEvent(so,Ri);a.addEventListener(so,l),a.dispatchEvent(m),m.defaultPrevented||(rm(cm(Lc(a)),{select:!0}),document.activeElement===g&&lt(a))}return()=>{a.removeEventListener(so,l),setTimeout(()=>{const m=new CustomEvent(io,Ri);a.addEventListener(io,d),a.dispatchEvent(m),m.defaultPrevented||lt(g??document.body,{select:!0}),a.removeEventListener(io,d),Oi.remove(b)},0)}}},[a,l,d,b]);const C=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,D]=om(f);h&&D?!g.shiftKey&&m===D?(g.preventDefault(),n&&lt(h,{select:!0})):g.shiftKey&&m===h&&(g.preventDefault(),n&&lt(D,{select:!0})):m===f&&g.preventDefault()}},[n,r,b.paused]);return p.jsx(se.div,{tabIndex:-1,...i,ref:v,onKeyDown:C})});$r.displayName=nm;function rm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lt(r,{select:t}),document.activeElement!==n)return}function om(e){const t=Lc(e),n=Ti(t,e),r=Ti(t.reverse(),e);return[n,r]}function Lc(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 Ti(e,t){for(const n of e)if(!sm(n,{upTo:t}))return n}function sm(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 im(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&&im(e)&&t&&e.select()}}var Oi=am();function am(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Pi(e,t),e.unshift(t)},remove(t){var n;e=Pi(e,t),(n=e[0])==null||n.resume()}}}function Pi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cm(e){return e.filter(t=>t.tagName!=="A")}var ao="rovingFocusGroup.onEntryFocus",lm={bubbles:!1,cancelable:!0},Lr="RovingFocusGroup",[$o,Fc,um]=bs(Lr),[dm,zc]=mt(Lr,[um]),[fm,pm]=dm(Lr),Wc=x.forwardRef((e,t)=>p.jsx($o.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx($o.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(hm,{...e,ref:t})})}));Wc.displayName=Lr;var hm=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),C=ws(s),[g=null,S]=Et({prop:i,defaultProp:a,onChange:c}),[m,f]=x.useState(!1),h=ke(l),D=Fc(n),y=x.useRef(!1),[E,w]=x.useState(0);return x.useEffect(()=>{const R=v.current;if(R)return R.addEventListener(ao,h),()=>R.removeEventListener(ao,h)},[h]),p.jsx(fm,{scope:n,orientation:r,dir:C,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(ao,lm);if(R.currentTarget.dispatchEvent(I),!I.defaultPrevented){const j=D().filter(O=>O.focusable),B=j.find(O=>O.active),H=j.find(O=>O.id===g),N=[B,H,...j].filter(Boolean).map(O=>O.ref.current);Vc(N,d)}}y.current=!1}),onBlur:ee(e.onBlur,()=>f(!1))})})}),Bc="RovingFocusGroupItem",Hc=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=ft(),c=s||a,l=pm(Bc,n),d=l.currentTabStopId===c,u=Fc(n),{onFocusableItemAdd:v,onFocusableItemRemove:b}=l;return x.useEffect(()=>{if(r)return v(),()=>b()},[r,v,b]),p.jsx($o.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 g=vm(C,l.orientation,l.dir);if(g!==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(g==="last")m.reverse();else if(g==="prev"||g==="next"){g==="prev"&&m.reverse();const f=m.indexOf(C.currentTarget);m=l.loop?ym(m,f+1):m.slice(f+1)}setTimeout(()=>Vc(m))}})})})});Hc.displayName=Bc;var gm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function vm(e,t,n){const r=mm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return gm[r]}function Vc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ym(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bm=Wc,wm=Hc,xm=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={},co=0,Yc=function(e){return e&&(e.host||Yc(e.parentNode))},Sm=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Yc(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})},Cm=function(e,t,n,r){var o=Sm(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),C=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&&C&&Wn.set(v,!0),S===1&&v.setAttribute(n,"true"),C||v.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",v,m)}})};return d(t),a.clear(),co++,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)}),co--,co||(kt=new WeakMap,kt=new WeakMap,Wn=new WeakMap,Bn={})}},Ss=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Cm(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 Uc(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 Dm(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",Em="with-scroll-bars-hidden",Mm="--removed-body-scroll-bar-size";function lo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rm(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 Tm=typeof window<"u"?x.useLayoutEffect:x.useEffect,Ai=new WeakMap;function Om(e,t){var n=Rm(null,function(r){return e.forEach(function(o){return lo(o,r)})});return Tm(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)||lo(a,null)}),s.forEach(function(a){o.has(a)||lo(a,i)})}Ai.set(n,e)},[e]),n}function Pm(e){return e}function Am(e,t){t===void 0&&(t=Pm);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 Nm(e){e===void 0&&(e={});var t=Am(null);return t.options=We({async:!0,ssr:!1},e),t}var Kc=function(e){var t=e.sideCar,n=Uc(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))};Kc.isSideCarExport=!0;function km(e,t){return e.useMedium(t),Kc}var Gc=Nm(),uo=function(){},Fr=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:uo,onWheelCapture:uo,onTouchMoveCapture:uo}),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,C=e.inert,g=e.allowPinchZoom,S=e.as,m=S===void 0?"div":S,f=e.gapMode,h=Uc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=v,y=Om([n,t]),E=We(We({},h),o);return x.createElement(x.Fragment,null,d&&x.createElement(D,{sideCar:Gc,removeScrollBar:l,shards:u,noIsolation:b,inert:C,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))});Fr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fr.classNames={fullWidth:nr,zeroRight:tr};var _m=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Im(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_m();return t&&e.setAttribute("nonce",t),e}function jm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $m(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Lm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Im())&&(jm(t,n),$m(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fm=function(){var e=Lm();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},qc=function(){var e=Fm(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},zm={left:0,top:0,right:0,gap:0},fo=function(e){return parseInt(e||"",10)||0},Wm=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[fo(n),fo(r),fo(o)]},Bm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zm;var t=Wm(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])}},Hm=qc(),Lt="data-scroll-locked",Vm=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(Em,` {
122
102
  overflow: hidden `).concat(r,`;
123
103
  padding-right: `).concat(a,"px ").concat(r,`;
124
104
  }
125
- body[`).concat(zt,`] {
105
+ body[`).concat(Lt,`] {
126
106
  overflow: hidden `).concat(r,`;
127
107
  overscroll-behavior: contain;
128
108
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -135,47 +115,47 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
135
115
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
136
116
  }
137
117
 
138
- .`).concat(or,` {
118
+ .`).concat(tr,` {
139
119
  right: `).concat(a,"px ").concat(r,`;
140
120
  }
141
121
 
142
- .`).concat(sr,` {
122
+ .`).concat(nr,` {
143
123
  margin-right: `).concat(a,"px ").concat(r,`;
144
124
  }
145
125
 
146
- .`).concat(or," .").concat(or,` {
126
+ .`).concat(tr," .").concat(tr,` {
147
127
  right: 0 `).concat(r,`;
148
128
  }
149
129
 
150
- .`).concat(sr," .").concat(sr,` {
130
+ .`).concat(nr," .").concat(nr,` {
151
131
  margin-right: 0 `).concat(r,`;
152
132
  }
153
133
 
154
- body[`).concat(zt,`] {
155
- `).concat(Im,": ").concat(a,`px;
134
+ body[`).concat(Lt,`] {
135
+ `).concat(Mm,": ").concat(a,`px;
156
136
  }
157
- `)},$i=function(){var e=parseInt(document.body.getAttribute(zt)||"0",10);return isFinite(e)?e:0},ev=function(){x.useEffect(function(){return document.body.setAttribute(zt,($i()+1).toString()),function(){var e=$i()-1;e<=0?document.body.removeAttribute(zt):document.body.setAttribute(zt,e.toString())}},[])},tv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ev();var s=x.useMemo(function(){return Zm(o)},[o]);return x.createElement(Jm,{styles:Qm(s,!t,o,n?"":"!important")})},zo=!1;if(typeof window<"u")try{var Yn=Object.defineProperty({},"passive",{get:function(){return zo=!0,!0}});window.addEventListener("test",Yn,Yn),window.removeEventListener("test",Yn,Yn)}catch{zo=!1}var jt=zo?{passive:!1}:!1,nv=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&&!nv(e)&&n[t]==="visible")},rv=function(e){return nl(e,"overflowY")},ov=function(e){return nl(e,"overflowX")},Fi=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},sv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},iv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rl=function(e,t){return e==="v"?rv(t):ov(t)},ol=function(e,t){return e==="v"?sv(t):iv(t)},av=function(e,t){return e==="h"&&t==="rtl"?-1:1},cv=function(e,t,n,r,o){var s=av(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,d=i>0,u=0,f=0;do{var g=ol(e,a),C=g[0],v=g[1],S=g[2],y=v-S-s*C;(C||y)&&rl(e,a)&&(u+=y,f+=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(f)<1)&&(l=!0),l},Kn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zi=function(e){return[e.deltaX,e.deltaY]},Wi=function(e){return e&&"current"in e?e.current:e},lv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uv=function(e){return`
137
+ `)},Ni=function(){var e=parseInt(document.body.getAttribute(Lt)||"0",10);return isFinite(e)?e:0},Ym=function(){x.useEffect(function(){return document.body.setAttribute(Lt,(Ni()+1).toString()),function(){var e=Ni()-1;e<=0?document.body.removeAttribute(Lt):document.body.setAttribute(Lt,e.toString())}},[])},Um=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ym();var s=x.useMemo(function(){return Bm(o)},[o]);return x.createElement(Hm,{styles:Vm(s,!t,o,n?"":"!important")})},Lo=!1;if(typeof window<"u")try{var Hn=Object.defineProperty({},"passive",{get:function(){return Lo=!0,!0}});window.addEventListener("test",Hn,Hn),window.removeEventListener("test",Hn,Hn)}catch{Lo=!1}var _t=Lo?{passive:!1}:!1,Km=function(e){return e.tagName==="TEXTAREA"},Xc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Km(e)&&n[t]==="visible")},Gm=function(e){return Xc(e,"overflowY")},qm=function(e){return Xc(e,"overflowX")},ki=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Zc(e,r);if(o){var s=Jc(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xm=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Zm=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Zc=function(e,t){return e==="v"?Gm(t):qm(t)},Jc=function(e,t){return e==="v"?Xm(t):Zm(t)},Jm=function(e,t){return e==="h"&&t==="rtl"?-1:1},Qm=function(e,t,n,r,o){var s=Jm(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=Jc(e,a),C=b[0],g=b[1],S=b[2],m=g-S-s*C;(C||m)&&Zc(e,a)&&(u+=m,v+=C),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&Math.abs(u)<1||!d&&Math.abs(v)<1)&&(l=!0),l},Vn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_i=function(e){return[e.deltaX,e.deltaY]},Ii=function(e){return e&&"current"in e?e.current:e},ev=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tv=function(e){return`
158
138
  .block-interactivity-`.concat(e,` {pointer-events: none;}
159
139
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
160
- `)},dv=0,Lt=[];function fv(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(dv++)[0],s=x.useState(tl)[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 v=Nm([e.lockRef.current],(e.shards||[]).map(Wi),!0).filter(Boolean);return v.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=x.useCallback(function(v,S){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var y=Kn(v),p=n.current,m="deltaX"in v?v.deltaX:p[0]-y[0],D="deltaY"in v?v.deltaY:p[1]-y[1],b,E=v.target,w=Math.abs(m)>Math.abs(D)?"h":"v";if("touches"in v&&w==="h"&&E.type==="range")return!1;var T=Fi(w,E);if(!T)return!0;if(T?b=w:(b=w==="v"?"h":"v",T=Fi(w,E)),!T)return!1;if(!r.current&&"changedTouches"in v&&(m||D)&&(r.current=b),!b)return!0;var A=r.current||b;return cv(A,S,v,A==="h"?m:D)},[]),c=x.useCallback(function(v){var S=v;if(!(!Lt.length||Lt[Lt.length-1]!==s)){var y="deltaY"in S?zi(S):Kn(S),p=t.current.filter(function(b){return b.name===S.type&&(b.target===S.target||S.target===b.shadowParent)&&lv(b.delta,y)})[0];if(p&&p.should){S.cancelable&&S.preventDefault();return}if(!p){var m=(i.current.shards||[]).map(Wi).filter(Boolean).filter(function(b){return b.contains(S.target)}),D=m.length>0?a(S,m[0]):!i.current.noIsolation;D&&S.cancelable&&S.preventDefault()}}},[]),l=x.useCallback(function(v,S,y,p){var m={name:v,delta:S,target:y,should:p,shadowParent:pv(y)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(D){return D!==m})},1)},[]),d=x.useCallback(function(v){n.current=Kn(v),r.current=void 0},[]),u=x.useCallback(function(v){l(v.type,zi(v),v.target,a(v,e.lockRef.current))},[]),f=x.useCallback(function(v){l(v.type,Kn(v),v.target,a(v,e.lockRef.current))},[]);x.useEffect(function(){return Lt.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",c,jt),document.addEventListener("touchmove",c,jt),document.addEventListener("touchstart",d,jt),function(){Lt=Lt.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,jt),document.removeEventListener("touchmove",c,jt),document.removeEventListener("touchstart",d,jt)}},[]);var g=e.removeScrollBar,C=e.inert;return x.createElement(x.Fragment,null,C?x.createElement(s,{styles:uv(o)}):null,g?x.createElement(tv,{gapMode:e.gapMode}):null)}function pv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hv=Bm(el,fv);var Br=x.forwardRef(function(e,t){return x.createElement(Wr,He({},e,{ref:t,sideCar:hv}))});Br.classNames=Wr.classNames;var Wo=["Enter"," "],gv=["ArrowDown","PageUp","Home"],sl=["ArrowUp","PageDown","End"],mv=[...gv,...sl],vv={ltr:[...Wo,"ArrowRight"],rtl:[...Wo,"ArrowLeft"]},yv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},An="Menu",[wn,bv,wv]=Ss(An),[Ot,il]=yt(An,[wv,bt,Yc]),Hr=bt(),al=Yc(),[xv,Pt]=Ot(An),[Sv,_n]=Ot(An),cl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Hr(t),[c,l]=x.useState(null),d=x.useRef(!1),u=Ie(s),f=Cs(o);return x.useEffect(()=>{const g=()=>{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",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),h.jsx(Nr,{...a,children:h.jsx(xv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:h.jsx(Sv,{scope:t,onClose:x.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})};cl.displayName=An;var Cv="MenuAnchor",Rs=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hr(n);return h.jsx(Mn,{...o,...r,ref:t})});Rs.displayName=Cv;var Ts="MenuPortal",[Dv,ll]=Ot(Ts,{forceMount:void 0}),ul=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Pt(Ts,t);return h.jsx(Dv,{scope:t,forceMount:n,children:h.jsx(Qe,{present:n||s.open,children:h.jsx(On,{asChild:!0,container:o,children:r})})})};ul.displayName=Ts;var ke="MenuContent",[Ev,Ms]=Ot(ke),dl=x.forwardRef((e,t)=>{const n=ll(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Pt(ke,e.__scopeMenu),i=_n(ke,e.__scopeMenu);return h.jsx(wn.Provider,{scope:e.__scopeMenu,children:h.jsx(Qe,{present:r||s.open,children:h.jsx(wn.Slot,{scope:e.__scopeMenu,children:i.modal?h.jsx(Rv,{...o,ref:t}):h.jsx(Tv,{...o,ref:t})})})})}),Rv=x.forwardRef((e,t)=>{const n=Pt(ke,e.__scopeMenu),r=x.useRef(null),o=le(t,r);return x.useEffect(()=>{const s=r.current;if(s)return Es(s)},[]),h.jsx(Os,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Tv=x.forwardRef((e,t)=>{const n=Pt(ke,e.__scopeMenu);return h.jsx(Os,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Os=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:f,onDismiss:g,disableOutsideScroll:C,...v}=e,S=Pt(ke,n),y=_n(ke,n),p=Hr(n),m=al(n),D=bv(n),[b,E]=x.useState(null),w=x.useRef(null),T=le(t,w,S.onContentChange),A=x.useRef(0),I=x.useRef(""),j=x.useRef(0),B=x.useRef(null),H=x.useRef("right"),k=x.useRef(0),_=C?Br:x.Fragment,O=C?{as:pt,allowPinchZoom:!0}:void 0,L=N=>{var W,G;const M=I.current+N,$=D().filter(q=>!q.disabled),V=document.activeElement,Y=(W=$.find(q=>q.ref.current===V))==null?void 0:W.textValue,U=$.map(q=>q.textValue),Z=Fv(U,M,Y),K=(G=$.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))})(M),K&&setTimeout(()=>K.focus())};x.useEffect(()=>()=>window.clearTimeout(A.current),[]),Ds();const P=x.useCallback(N=>{var $,V;return H.current===(($=B.current)==null?void 0:$.side)&&Wv(N,(V=B.current)==null?void 0:V.area)},[]);return h.jsx(Ev,{scope:n,searchRef:I,onItemEnter:x.useCallback(N=>{P(N)&&N.preventDefault()},[P]),onItemLeave:x.useCallback(N=>{var M;P(N)||((M=w.current)==null||M.focus(),E(null))},[P]),onTriggerLeave:x.useCallback(N=>{P(N)&&N.preventDefault()},[P]),pointerGraceTimerRef:j,onPointerGraceIntentChange:x.useCallback(N=>{B.current=N},[]),children:h.jsx(_,{...O,children:h.jsx(Fr,{asChild:!0,trapped:o,onMountAutoFocus:ee(s,N=>{var M;N.preventDefault(),(M=w.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:h.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,onDismiss:g,children:h.jsx(Mm,{asChild:!0,...m,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:b,onCurrentTabStopIdChange:E,onEntryFocus:ee(c,N=>{y.isUsingKeyboardRef.current||N.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(kr,{role:"menu","aria-orientation":"vertical","data-state":Tl(S.open),"data-radix-menu-content":"",dir:y.dir,...p,...v,ref:T,style:{outline:"none",...v.style},onKeyDown:ee(v.onKeyDown,N=>{const $=N.target.closest("[data-radix-menu-content]")===N.currentTarget,V=N.ctrlKey||N.altKey||N.metaKey,Y=N.key.length===1;$&&(N.key==="Tab"&&N.preventDefault(),!V&&Y&&L(N.key));const U=w.current;if(N.target!==U||!mv.includes(N.key))return;N.preventDefault();const K=D().filter(W=>!W.disabled).map(W=>W.ref.current);sl.includes(N.key)&&K.reverse(),Lv(K)}),onBlur:ee(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(A.current),I.current="")}),onPointerMove:ee(e.onPointerMove,xn(N=>{const M=N.target,$=k.current!==N.clientX;if(N.currentTarget.contains(M)&&$){const V=N.clientX>k.current?"right":"left";H.current=V,k.current=N.clientX}}))})})})})})})});dl.displayName=ke;var Mv="MenuGroup",Ps=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"group",...r,ref:t})});Ps.displayName=Mv;var Ov="MenuLabel",fl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{...r,ref:t})});fl.displayName=Ov;var vr="MenuItem",Bi="menu.itemSelect",Vr=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=x.useRef(null),i=_n(vr,e.__scopeMenu),a=Ms(vr,e.__scopeMenu),c=le(t,s),l=x.useRef(!1),d=()=>{const u=s.current;if(!n&&u){const f=new CustomEvent(Bi,{bubbles:!0,cancelable:!0});u.addEventListener(Bi,g=>r==null?void 0:r(g),{once:!0}),uc(u,f),f.defaultPrevented?l.current=!1:i.onClose()}};return h.jsx(pl,{...o,ref:c,disabled:n,onClick:ee(e.onClick,d),onPointerDown:u=>{var f;(f=e.onPointerDown)==null||f.call(e,u),l.current=!0},onPointerUp:ee(e.onPointerUp,u=>{var f;l.current||(f=u.currentTarget)==null||f.click()}),onKeyDown:ee(e.onKeyDown,u=>{const f=a.searchRef.current!=="";n||f&&u.key===" "||Wo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Vr.displayName=vr;var pl=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Ms(vr,n),a=al(n),c=x.useRef(null),l=le(t,c),[d,u]=x.useState(!1),[f,g]=x.useState("");return x.useEffect(()=>{const C=c.current;C&&g((C.textContent??"").trim())},[s.children]),h.jsx(wn.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:h.jsx(Om,{asChild:!0,...a,focusable:!r,children:h.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,xn(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,xn(C=>i.onItemLeave(C))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),Pv="MenuCheckboxItem",hl=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(bl,{scope:e.__scopeMenu,checked:n,children:h.jsx(Vr,{role:"menuitemcheckbox","aria-checked":yr(n)?"mixed":n,...o,ref:t,"data-state":_s(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(yr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});hl.displayName=Pv;var gl="MenuRadioGroup",[Av,_v]=Ot(gl,{value:void 0,onValueChange:()=>{}}),ml=x.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ie(r);return h.jsx(Av,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(Ps,{...o,ref:t})})});ml.displayName=gl;var vl="MenuRadioItem",yl=x.forwardRef((e,t)=>{const{value:n,...r}=e,o=_v(vl,e.__scopeMenu),s=n===o.value;return h.jsx(bl,{scope:e.__scopeMenu,checked:s,children:h.jsx(Vr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":_s(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});yl.displayName=vl;var As="MenuItemIndicator",[bl,Nv]=Ot(As,{checked:!1}),wl=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Nv(As,n);return h.jsx(Qe,{present:r||yr(s.checked)||s.checked===!0,children:h.jsx(se.span,{...o,ref:t,"data-state":_s(s.checked)})})});wl.displayName=As;var kv="MenuSeparator",xl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});xl.displayName=kv;var Iv="MenuArrow",Sl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hr(n);return h.jsx(Ir,{...o,...r,ref:t})});Sl.displayName=Iv;var jv="MenuSub",[Kw,Cl]=Ot(jv),un="MenuSubTrigger",Dl=x.forwardRef((e,t)=>{const n=Pt(un,e.__scopeMenu),r=_n(un,e.__scopeMenu),o=Cl(un,e.__scopeMenu),s=Ms(un,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]),h.jsx(Rs,{asChild:!0,...l,children:h.jsx(pl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Tl(n.open),...e,ref:Or(t,o.onTriggerChange),onClick:u=>{var f;(f=e.onClick)==null||f.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,xn(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,xn(u=>{var g,C;d();const f=(g=n.content)==null?void 0:g.getBoundingClientRect();if(f){const v=(C=n.content)==null?void 0:C.dataset.side,S=v==="right",y=S?-5:5,p=f[S?"left":"right"],m=f[S?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+y,y:u.clientY},{x:p,y:f.top},{x:m,y:f.top},{x:m,y:f.bottom},{x:p,y:f.bottom}],side:v}),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 g;const f=s.searchRef.current!=="";e.disabled||f&&u.key===" "||vv[r.dir].includes(u.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),u.preventDefault())})})})});Dl.displayName=un;var El="MenuSubContent",Rl=x.forwardRef((e,t)=>{const n=ll(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Pt(ke,e.__scopeMenu),i=_n(ke,e.__scopeMenu),a=Cl(El,e.__scopeMenu),c=x.useRef(null),l=le(t,c);return h.jsx(wn.Provider,{scope:e.__scopeMenu,children:h.jsx(Qe,{present:r||s.open,children:h.jsx(wn.Slot,{scope:e.__scopeMenu,children:h.jsx(Os,{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 g;const u=d.currentTarget.contains(d.target),f=yv[i.dir].includes(d.key);u&&f&&(s.onOpenChange(!1),(g=a.trigger)==null||g.focus(),d.preventDefault())})})})})})});Rl.displayName=El;function Tl(e){return e?"open":"closed"}function yr(e){return e==="indeterminate"}function _s(e){return yr(e)?"indeterminate":e?"checked":"unchecked"}function Lv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $v(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Fv(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=$v(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 zv(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 Wv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return zv(n,t)}function xn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Bv=cl,Hv=Rs,Vv=ul,Uv=dl,Yv=Ps,Kv=fl,Gv=Vr,qv=hl,Xv=ml,Zv=yl,Jv=wl,Qv=xl,ey=Sl,ty=Dl,ny=Rl,Ns="DropdownMenu",[ry,Gw]=yt(Ns,[il]),Ce=il(),[oy,Ml]=ry(Ns),Ol=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=Ce(t),l=x.useRef(null),[d=!1,u]=Tt({prop:o,defaultProp:s,onChange:i});return h.jsx(oy,{scope:t,triggerId:ht(),triggerRef:l,contentId:ht(),open:d,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(f=>!f),[u]),modal:a,children:h.jsx(Bv,{...c,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Ol.displayName=Ns;var Pl="DropdownMenuTrigger",Al=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Ml(Pl,n),i=Ce(n);return h.jsx(Hv,{asChild:!0,...i,children:h.jsx(se.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Or(t,s.triggerRef),onPointerDown:ee(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:ee(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Al.displayName=Pl;var sy="DropdownMenuPortal",_l=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ce(t);return h.jsx(Vv,{...r,...n})};_l.displayName=sy;var Nl="DropdownMenuContent",kl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ml(Nl,n),s=Ce(n),i=x.useRef(!1);return h.jsx(Uv,{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)"}})});kl.displayName=Nl;var iy="DropdownMenuGroup",ay=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(Yv,{...o,...r,ref:t})});ay.displayName=iy;var cy="DropdownMenuLabel",Il=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(Kv,{...o,...r,ref:t})});Il.displayName=cy;var ly="DropdownMenuItem",jl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(Gv,{...o,...r,ref:t})});jl.displayName=ly;var uy="DropdownMenuCheckboxItem",Ll=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(qv,{...o,...r,ref:t})});Ll.displayName=uy;var dy="DropdownMenuRadioGroup",fy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(Xv,{...o,...r,ref:t})});fy.displayName=dy;var py="DropdownMenuRadioItem",hy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(Zv,{...o,...r,ref:t})});hy.displayName=py;var gy="DropdownMenuItemIndicator",$l=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(Jv,{...o,...r,ref:t})});$l.displayName=gy;var my="DropdownMenuSeparator",Fl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(Qv,{...o,...r,ref:t})});Fl.displayName=my;var vy="DropdownMenuArrow",yy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(ey,{...o,...r,ref:t})});yy.displayName=vy;var by="DropdownMenuSubTrigger",wy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(ty,{...o,...r,ref:t})});wy.displayName=by;var xy="DropdownMenuSubContent",Sy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ce(n);return h.jsx(ny,{...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)"}})});Sy.displayName=xy;var Cy=Ol,Dy=Al,Ey=_l,Ry=kl,Ty=Il,My=jl,Oy=Ll,Py=$l,Ay=Fl;function ks({...e}){return h.jsx(Cy,{"data-slot":"dropdown-menu",...e})}function Is({...e}){return h.jsx(Dy,{"data-slot":"dropdown-menu-trigger",...e})}function js({className:e,sideOffset:t=4,...n}){return h.jsx(Ey,{children:h.jsx(Ry,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ne("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 Hi({className:e,inset:t,variant:n="default",...r}){return h.jsx(My,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ne("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 _y({className:e,children:t,checked:n,...r}){return h.jsxs(Oy,{"data-slot":"dropdown-menu-checkbox-item",className:ne("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[h.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:h.jsx(Py,{children:h.jsx(sc,{className:"size-4"})})}),t]})}function Ny({className:e,inset:t,...n}){return h.jsx(Ty,{"data-slot":"dropdown-menu-label","data-inset":t,className:ne("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function ky({className:e,...t}){return h.jsx(Ay,{"data-slot":"dropdown-menu-separator",className:ne("bg-border -mx-1 my-1 h-px",e),...t})}const Iy={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},jy=({code:e})=>h.jsx("p",{className:"text-sm text-muted-foreground",children:h.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[h.jsx("span",{className:"text-xs",children:"⌘"}),e]})}),Ly={[ce.DAY]:h.jsx(rh,{size:"20px"}),[ce.WEEK]:h.jsx(th,{size:"20px"}),[ce.TABLE]:h.jsx(Up,{size:"20px"}),[ce.MONTH]:h.jsx(sh,{size:"20px"})},Vi=()=>{const{bookingViewType:e}=Ae(),{onViewTypeChange:t}=Hf(),{resetNodes:n,resetSelectedNode:r}=Bt(),{viewModes:o,onChangeViewType:s}=Et(),[i,a]=R.useState(ce.WEEK),c=R.useCallback(f=>f===e?"custom":"outline",[e]),l=R.useCallback(f=>{f!==i&&(n(),r(),s(f),a(f),t(f))},[t,i,n,r,s]),d=R.useMemo(()=>o.map(f=>({variant:c(f),icon:Ly[f],events:g=>l(g),label:f})),[o,l,c]),u=R.useMemo(()=>{const f=d.find(g=>g.label===i);if(f)return f.icon},[i,d]);return h.jsxs(ks,{children:[h.jsx(Is,{children:h.jsx(Wt,{variant:"ghost",className:"w-8 h-8",asChild:!0,children:h.jsx(lm,{content:"Calendar Modes",children:u||h.jsx(Hp,{color:"gray",className:"w-full h-full"})})})}),h.jsx(js,{className:"z-100",children:d.map(f=>h.jsxs(_y,{checked:f.label===i,onCheckedChange:()=>f.events(f.label),className:"flex flex-row justify-between gap-6",children:[h.jsxs("div",{className:"flex flex-row gap-4",children:[f.icon,h.jsx("div",{children:Iy.capitalize(f.label)})]}),h.jsx(jy,{code:"o"})]},f.label))})]})},$y=566,Fy=()=>{const{todayWeek:e}=Ae(),{fullYear:t,monthMessage:n,updateMonthMessage:r}=is(c=>c),[o,s]=R.useState(!1),i=c=>{r({month:c.getMonth(),fullYear:c.getFullYear(),monthMessage:Xe[c.getMonth()]})};R.useEffect(()=>{const{lastDayOfWeek:c,firstDayOfWeek:l}=e(),d=l.getMonth(),u=d!==c.getMonth()?te.shortMonthDescription(l,c):Xe[d];r({monthMessage:u})},[e,r]),R.useEffect(()=>{const c=()=>{if(typeof window>"u")return!1;window.innerWidth<=$y?s(!0):s(!1)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);const a=h.jsxs("div",{className:"flex flex-row items-center gap-[0.25rem]",children:[h.jsx(zy,{updateMonthMessage:r,updateDateInfo:i}),h.jsx(Wy,{updateMonthMessage:r,updateDateInfo:i,mobileLayout:o})]});return h.jsx(h.Fragment,{children:o?h.jsxs("div",{className:"w-full flex flex-col justify-between pt-[0.5rem] bg-white",children:[h.jsx("div",{className:"content-center z-50",children:h.jsxs("span",{className:"text-gray-800 font-bold",children:[n," ",t]})}),h.jsxs("div",{className:"gap-2 z-50 flex flex-row justify-between items-center",children:[a,h.jsx(Vi,{})]})]}):h.jsxs("div",{className:"w-full flex justify-between mt-[0.5rem] bg-white relative",children:[h.jsx("div",{className:"z-50 flex flex-row items-center",children:a}),h.jsx("div",{className:"content-center z-50 absolute top-[50%] left-[50%] right-[50%] translate-x-[-50%] translate-y-[-50%] w-max",children:h.jsxs("span",{className:" text-gray-800 font-bold",children:[n," ",t]})}),h.jsx(Vi,{})]})})},zy=({updateMonthMessage:e,updateDateInfo:t})=>{const{nextWeek:n,previousWeek:r,bookingViewType:o,setDays:s}=Ae(),i=Bt(y=>y.resetSelectedNode),a=Bt(y=>y.resetNodes),{onDayChange:c}=Et(),l=()=>s(1),d=()=>s(-1),u=y=>y==="next"?n():r(),f=y=>y==="next"?l():d(),g=(...y)=>{const p=te.shortMonthDescription(y[0],y[1]);e({monthMessage:p})},C=y=>{y.length&&t(y[0])},v=(y,p)=>{const m=y.getMonth(),D=p.getMonth();if(t(p),m!==D)return g(y,p)},S=y=>{switch(a(),i(),o){case ce.TABLE:case ce.DAY:{const p=f(y);c(p,y),C(p);break}case ce.WEEK:{const{firstDayOfWeek:p,lastDayOfWeek:m}=u(y);c([p,m],y),v(p,m);break}}};return h.jsxs("div",{className:"flex flex-row justify-center",children:[h.jsx(Wt,{className:"bg-white hover:bg-gray-100 border-none rounded-full py-3 px-3 flex focus:bg-gray-200 focus:outline-0 ",variant:"ghost",size:"lg",onClick:()=>S("previous"),children:h.jsx(qp,{className:"h-4 w-4 text-gray-500"})}),h.jsx(Wt,{className:"bg-white hover:bg-gray-100 border-none rounded-full py-3 px-3 flex text-gray-500 target:border-none focus:bg-gray-200 focus:outline-0",variant:"ghost",size:"lg",onClick:()=>S("next"),children:h.jsx(Zp,{className:"h-4 w-4 text-gray-500"})})]})},Wy=({updateMonthMessage:e,updateDateInfo:t,mobileLayout:n})=>{const{todayWeek:r,bookingViewType:o,setTodayDay:s}=Ae(),{onTodayClick:i}=Et(),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(),f=u!==l.getMonth()?te.shortMonthDescription(d,l):Xe[u];e({monthMessage:f});break}}};return h.jsxs(Wt,{variant:n?"ghost":"outline",onClick:a,children:[h.jsx(lh,{style:{paddingTop:"0.8px"}}),!n&&"Today"]})},Bo=({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 h.jsx("div",{className:"relative w-full h-full",style:s(e,new Date(n.split(":")[1])),children:h.jsxs("div",{className:ne("flex flex-col h-full text-white pl-2 lg:pl-2 justify-start items-start"),children:[h.jsx("p",{className:"text-[0.8rem] h-[0.8rem]",children:`${te.dateAndHourDateToString(e.startAt)} - ${te.dateAndHourDateToString(e.finishAt)}`}),h.jsx("span",{className:"flex flex-row items-center justify-center"})]})},`${n}-${r}`)};var rn={exports:{}},on={},sn={exports:{}},go={},Gn={exports:{}},qn={exports:{}},ie={};/** @license React v16.13.1
140
+ `)},nv=0,It=[];function rv(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(nv++)[0],s=x.useState(qc)[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=Dm([e.lockRef.current],(e.shards||[]).map(Ii),!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],D="deltaY"in g?g.deltaY:f[1]-m[1],y,E=g.target,w=Math.abs(h)>Math.abs(D)?"h":"v";if("touches"in g&&w==="h"&&E.type==="range")return!1;var R=ki(w,E);if(!R)return!0;if(R?y=w:(y=w==="v"?"h":"v",R=ki(w,E)),!R)return!1;if(!r.current&&"changedTouches"in g&&(h||D)&&(r.current=y),!y)return!0;var A=r.current||y;return Qm(A,S,g,A==="h"?h:D)},[]),c=x.useCallback(function(g){var S=g;if(!(!It.length||It[It.length-1]!==s)){var m="deltaY"in S?_i(S):Vn(S),f=t.current.filter(function(y){return y.name===S.type&&(y.target===S.target||S.target===y.shadowParent)&&ev(y.delta,m)})[0];if(f&&f.should){S.cancelable&&S.preventDefault();return}if(!f){var h=(i.current.shards||[]).map(Ii).filter(Boolean).filter(function(y){return y.contains(S.target)}),D=h.length>0?a(S,h[0]):!i.current.noIsolation;D&&S.cancelable&&S.preventDefault()}}},[]),l=x.useCallback(function(g,S,m,f){var h={name:g,delta:S,target:m,should:f,shadowParent:ov(m)};t.current.push(h),setTimeout(function(){t.current=t.current.filter(function(D){return D!==h})},1)},[]),d=x.useCallback(function(g){n.current=Vn(g),r.current=void 0},[]),u=x.useCallback(function(g){l(g.type,_i(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,_t),document.addEventListener("touchmove",c,_t),document.addEventListener("touchstart",d,_t),function(){It=It.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,_t),document.removeEventListener("touchmove",c,_t),document.removeEventListener("touchstart",d,_t)}},[]);var b=e.removeScrollBar,C=e.inert;return x.createElement(x.Fragment,null,C?x.createElement(s,{styles:tv(o)}):null,b?x.createElement(Um,{gapMode:e.gapMode}):null)}function ov(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sv=km(Gc,rv);var zr=x.forwardRef(function(e,t){return x.createElement(Fr,We({},e,{ref:t,sideCar:sv}))});zr.classNames=Fr.classNames;var Fo=["Enter"," "],iv=["ArrowDown","PageUp","Home"],Qc=["ArrowUp","PageDown","End"],av=[...iv,...Qc],cv={ltr:[...Fo,"ArrowRight"],rtl:[...Fo,"ArrowLeft"]},lv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},On="Menu",[yn,uv,dv]=bs(On),[Rt,el]=mt(On,[dv,vt,zc]),Wr=vt(),tl=zc(),[fv,Tt]=Rt(On),[pv,Pn]=Rt(On),nl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Wr(t),[c,l]=x.useState(null),d=x.useRef(!1),u=ke(s),v=ws(o);return x.useEffect(()=>{const b=()=>{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",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),p.jsx(Ar,{...a,children:p.jsx(fv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:p.jsx(pv,{scope:t,onClose:x.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:v,modal:i,children:r})})})};nl.displayName=On;var hv="MenuAnchor",Cs=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wr(n);return p.jsx(Mn,{...o,...r,ref:t})});Cs.displayName=hv;var Ds="MenuPortal",[gv,rl]=Rt(Ds,{forceMount:void 0}),ol=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Tt(Ds,t);return p.jsx(gv,{scope:t,forceMount:n,children:p.jsx(Ze,{present:n||s.open,children:p.jsx(Rn,{asChild:!0,container:o,children:r})})})};ol.displayName=Ds;var Ne="MenuContent",[mv,Es]=Rt(Ne),sl=x.forwardRef((e,t)=>{const n=rl(Ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Tt(Ne,e.__scopeMenu),i=Pn(Ne,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(vv,{...o,ref:t}):p.jsx(yv,{...o,ref:t})})})})}),vv=x.forwardRef((e,t)=>{const n=Tt(Ne,e.__scopeMenu),r=x.useRef(null),o=le(t,r);return x.useEffect(()=>{const s=r.current;if(s)return Ss(s)},[]),p.jsx(Ms,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yv=x.forwardRef((e,t)=>{const n=Tt(Ne,e.__scopeMenu);return p.jsx(Ms,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ms=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:C,...g}=e,S=Tt(Ne,n),m=Pn(Ne,n),f=Wr(n),h=tl(n),D=uv(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"),_=x.useRef(0),N=C?zr:x.Fragment,O=C?{as:dt,allowPinchZoom:!0}:void 0,$=k=>{var W,G;const T=I.current+k,L=D().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=Pv(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),[]),xs();const P=x.useCallback(k=>{var L,V;return H.current===((L=B.current)==null?void 0:L.side)&&Nv(k,(V=B.current)==null?void 0:V.area)},[]);return p.jsx(mv,{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(N,{...O,children:p.jsx($r,{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(bm,{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(Nr,{role:"menu","aria-orientation":"vertical","data-state":xl(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||!av.includes(k.key))return;k.preventDefault();const K=D().filter(W=>!W.disabled).map(W=>W.ref.current);Qc.includes(k.key)&&K.reverse(),Tv(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=_.current!==k.clientX;if(k.currentTarget.contains(T)&&L){const V=k.clientX>_.current?"right":"left";H.current=V,_.current=k.clientX}}))})})})})})})});sl.displayName=Ne;var bv="MenuGroup",Rs=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{role:"group",...r,ref:t})});Rs.displayName=bv;var wv="MenuLabel",il=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{...r,ref:t})});il.displayName=wv;var hr="MenuItem",ji="menu.itemSelect",Br=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=x.useRef(null),i=Pn(hr,e.__scopeMenu),a=Es(hr,e.__scopeMenu),c=le(t,s),l=x.useRef(!1),d=()=>{const u=s.current;if(!n&&u){const v=new CustomEvent(ji,{bubbles:!0,cancelable:!0});u.addEventListener(ji,b=>r==null?void 0:r(b),{once:!0}),oc(u,v),v.defaultPrevented?l.current=!1:i.onClose()}};return p.jsx(al,{...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===" "||Fo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Br.displayName=hr;var al=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Es(hr,n),a=tl(n),c=x.useRef(null),l=le(t,c),[d,u]=x.useState(!1),[v,b]=x.useState("");return x.useEffect(()=>{const C=c.current;C&&b((C.textContent??"").trim())},[s.children]),p.jsx(yn.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:p.jsx(wm,{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(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,bn(C=>i.onItemLeave(C))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),xv="MenuCheckboxItem",cl=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(pl,{scope:e.__scopeMenu,checked:n,children:p.jsx(Br,{role:"menuitemcheckbox","aria-checked":gr(n)?"mixed":n,...o,ref:t,"data-state":Os(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(gr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});cl.displayName=xv;var ll="MenuRadioGroup",[Sv,Cv]=Rt(ll,{value:void 0,onValueChange:()=>{}}),ul=x.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ke(r);return p.jsx(Sv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Rs,{...o,ref:t})})});ul.displayName=ll;var dl="MenuRadioItem",fl=x.forwardRef((e,t)=>{const{value:n,...r}=e,o=Cv(dl,e.__scopeMenu),s=n===o.value;return p.jsx(pl,{scope:e.__scopeMenu,checked:s,children:p.jsx(Br,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Os(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});fl.displayName=dl;var Ts="MenuItemIndicator",[pl,Dv]=Rt(Ts,{checked:!1}),hl=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Dv(Ts,n);return p.jsx(Ze,{present:r||gr(s.checked)||s.checked===!0,children:p.jsx(se.span,{...o,ref:t,"data-state":Os(s.checked)})})});hl.displayName=Ts;var Ev="MenuSeparator",gl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});gl.displayName=Ev;var Mv="MenuArrow",ml=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wr(n);return p.jsx(kr,{...o,...r,ref:t})});ml.displayName=Mv;var Rv="MenuSub",[Lw,vl]=Rt(Rv),cn="MenuSubTrigger",yl=x.forwardRef((e,t)=>{const n=Tt(cn,e.__scopeMenu),r=Pn(cn,e.__scopeMenu),o=vl(cn,e.__scopeMenu),s=Es(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(Cs,{asChild:!0,...l,children:p.jsx(al,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":xl(n.open),...e,ref:Rr(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,C;d();const v=(b=n.content)==null?void 0:b.getBoundingClientRect();if(v){const g=(C=n.content)==null?void 0:C.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===" "||cv[r.dir].includes(u.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),u.preventDefault())})})})});yl.displayName=cn;var bl="MenuSubContent",wl=x.forwardRef((e,t)=>{const n=rl(Ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Tt(Ne,e.__scopeMenu),i=Pn(Ne,e.__scopeMenu),a=vl(bl,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(Ms,{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=lv[i.dir].includes(d.key);u&&v&&(s.onOpenChange(!1),(b=a.trigger)==null||b.focus(),d.preventDefault())})})})})})});wl.displayName=bl;function xl(e){return e?"open":"closed"}function gr(e){return e==="indeterminate"}function Os(e){return gr(e)?"indeterminate":e?"checked":"unchecked"}function Tv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ov(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Pv(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=Ov(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 Av(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 Nv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Av(n,t)}function bn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var kv=nl,_v=Cs,Iv=ol,jv=sl,$v=Rs,Lv=il,Fv=Br,zv=cl,Wv=ul,Bv=fl,Hv=hl,Vv=gl,Yv=ml,Uv=yl,Kv=wl,Ps="DropdownMenu",[Gv,Fw]=mt(Ps,[el]),xe=el(),[qv,Sl]=Gv(Ps),Cl=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(qv,{scope:t,triggerId:ft(),triggerRef:l,contentId:ft(),open:d,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(v=>!v),[u]),modal:a,children:p.jsx(kv,{...c,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Cl.displayName=Ps;var Dl="DropdownMenuTrigger",El=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Sl(Dl,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:Rr(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())})})})});El.displayName=Dl;var Xv="DropdownMenuPortal",Ml=e=>{const{__scopeDropdownMenu:t,...n}=e,r=xe(t);return p.jsx(Iv,{...r,...n})};Ml.displayName=Xv;var Rl="DropdownMenuContent",Tl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Sl(Rl,n),s=xe(n),i=x.useRef(!1);return p.jsx(jv,{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)"}})});Tl.displayName=Rl;var Zv="DropdownMenuGroup",Jv=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx($v,{...o,...r,ref:t})});Jv.displayName=Zv;var Qv="DropdownMenuLabel",Ol=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Lv,{...o,...r,ref:t})});Ol.displayName=Qv;var ey="DropdownMenuItem",Pl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Fv,{...o,...r,ref:t})});Pl.displayName=ey;var ty="DropdownMenuCheckboxItem",Al=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(zv,{...o,...r,ref:t})});Al.displayName=ty;var ny="DropdownMenuRadioGroup",ry=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Wv,{...o,...r,ref:t})});ry.displayName=ny;var oy="DropdownMenuRadioItem",sy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Bv,{...o,...r,ref:t})});sy.displayName=oy;var iy="DropdownMenuItemIndicator",Nl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Hv,{...o,...r,ref:t})});Nl.displayName=iy;var ay="DropdownMenuSeparator",kl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Vv,{...o,...r,ref:t})});kl.displayName=ay;var cy="DropdownMenuArrow",ly=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Yv,{...o,...r,ref:t})});ly.displayName=cy;var uy="DropdownMenuSubTrigger",dy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Uv,{...o,...r,ref:t})});dy.displayName=uy;var fy="DropdownMenuSubContent",py=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(Kv,{...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)"}})});py.displayName=fy;var hy=Cl,gy=El,my=Ml,vy=Tl,yy=Ol,by=Pl,wy=Al,xy=Nl,Sy=kl;function As({...e}){return p.jsx(hy,{"data-slot":"dropdown-menu",...e})}function Ns({...e}){return p.jsx(gy,{"data-slot":"dropdown-menu-trigger",...e})}function ks({className:e,sideOffset:t=4,...n}){return p.jsx(my,{children:p.jsx(vy,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ne("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(by,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ne("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 Cy({className:e,children:t,checked:n,...r}){return p.jsxs(wy,{"data-slot":"dropdown-menu-checkbox-item",className:ne("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(xy,{children:p.jsx(Qa,{className:"size-4"})})}),t]})}function Dy({className:e,inset:t,...n}){return p.jsx(yy,{"data-slot":"dropdown-menu-label","data-inset":t,className:ne("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Ey({className:e,...t}){return p.jsx(Sy,{"data-slot":"dropdown-menu-separator",className:ne("bg-border -mx-1 my-1 h-px",e),...t})}const My={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},Ry=({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]})}),Ty={[ce.DAY]:p.jsx(Gp,{size:"20px"}),[ce.WEEK]:p.jsx(Up,{size:"20px"}),[ce.TABLE]:p.jsx(jp,{size:"20px"}),[ce.MONTH]:p.jsx(Xp,{size:"20px"})},Li=()=>{const{bookingViewType:e}=Oe(),{onViewTypeChange:t}=_f(),{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:Ty[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(As,{children:[p.jsx(Ns,{children:p.jsx(Ft,{variant:"ghost",className:"w-8 h-8",asChild:!0,children:p.jsx(em,{content:"Calendar Modes",children:u||p.jsx(_p,{color:"gray",className:"w-full h-full"})})})}),p.jsx(ks,{className:"z-100",children:d.map(v=>p.jsxs(Cy,{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:My.capitalize(v.label)})]}),p.jsx(Ry,{code:"o"})]},v.label))})]})},Oy=566,Py=()=>{const{todayWeek:e}=Oe(),{fullYear:t,monthMessage:n,updateMonthMessage:r}=rs(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<=Oy?s(!0):s(!1)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);const a=p.jsxs("div",{className:"flex flex-row items-center gap-[0.25rem]",children:[p.jsx(Ay,{updateMonthMessage:r,updateDateInfo:i}),p.jsx(Ny,{updateMonthMessage:r,updateDateInfo:i,mobileLayout:o})]});return p.jsx(p.Fragment,{children:o?p.jsxs("div",{className:"w-full flex flex-col justify-between pt-[0.5rem] bg-white",children:[p.jsx("div",{className:"content-center z-50 text-center",children:p.jsxs("span",{className:"text-gray-800 font-bold",children:[n," ",t]})}),p.jsxs("div",{className:"gap-2 z-50 flex flex-row justify-between items-center",children:[a,p.jsx(Li,{})]})]}):p.jsxs("div",{className:"w-full flex justify-between mt-[0.5rem] bg-white relative",children:[p.jsx("div",{className:"z-50 flex flex-row items-center",children:a}),p.jsx("div",{className:"content-center z-50 absolute top-[50%] left-[50%] right-[50%] translate-x-[-50%] translate-y-[-50%] w-max",children:p.jsxs("span",{className:" text-gray-800 font-bold",children:[n," ",t]})}),p.jsx(Li,{})]})})},Ay=({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})},C=m=>{m.length&&t(m[0])},g=(m,f)=>{const h=m.getMonth(),D=f.getMonth();if(t(f),h!==D)return b(m,f)},S=m=>{switch(a(),i(),o){case ce.TABLE:case ce.DAY:{const f=v(m);c(f,m),C(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:"flex flex-row justify-center",children:[p.jsx(Ft,{className:"bg-white hover:bg-gray-100 border-none rounded-full py-3 px-3 flex focus:bg-gray-200 focus:outline-0 ",variant:"ghost",size:"lg",onClick:()=>S("previous"),children:p.jsx(zp,{className:"h-4 w-4 text-gray-500"})}),p.jsx(Ft,{className:"bg-white hover:bg-gray-100 border-none rounded-full py-3 px-3 flex text-gray-500 target:border-none focus:bg-gray-200 focus:outline-0",variant:"ghost",size:"lg",onClick:()=>S("next"),children:p.jsx(Bp,{className:"h-4 w-4 text-gray-500"})})]})},Ny=({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(eh,{style:{paddingTop:"0.8px"}}),!n&&"Today"]})},zo=({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:ne("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:{}},po={},Yn={exports:{}},Un={exports:{}},ie={};/** @license React v16.13.1
161
141
  * react-is.production.min.js
162
142
  *
163
143
  * Copyright (c) Facebook, Inc. and its affiliates.
164
144
  *
165
145
  * This source code is licensed under the MIT license found in the
166
146
  * LICENSE file in the root directory of this source tree.
167
- */var Ui;function By(){if(Ui)return ie;Ui=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,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,p=e?Symbol.for("react.scope"):60119;function m(b){if(typeof b=="object"&&b!==null){var E=b.$$typeof;switch(E){case t:switch(b=b.type,b){case c:case l:case r:case s:case o:case u:return b;default:switch(b=b&&b.$$typeof,b){case a:case d:case C:case g:case i:return b;default:return E}}case n:return E}}}function D(b){return m(b)===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=C,ie.Memo=g,ie.Portal=n,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=u,ie.isAsyncMode=function(b){return D(b)||m(b)===c},ie.isConcurrentMode=D,ie.isContextConsumer=function(b){return m(b)===a},ie.isContextProvider=function(b){return m(b)===i},ie.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},ie.isForwardRef=function(b){return m(b)===d},ie.isFragment=function(b){return m(b)===r},ie.isLazy=function(b){return m(b)===C},ie.isMemo=function(b){return m(b)===g},ie.isPortal=function(b){return m(b)===n},ie.isProfiler=function(b){return m(b)===s},ie.isStrictMode=function(b){return m(b)===o},ie.isSuspense=function(b){return m(b)===u},ie.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===l||b===s||b===o||b===u||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===C||b.$$typeof===g||b.$$typeof===i||b.$$typeof===a||b.$$typeof===d||b.$$typeof===S||b.$$typeof===y||b.$$typeof===p||b.$$typeof===v)},ie.typeOf=m,ie}var ae={};/** @license React v16.13.1
147
+ */var Fi;function ky(){if(Fi)return ie;Fi=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,C=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 C:case b:case i:return y;default:return E}}case n:return E}}}function D(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=C,ie.Memo=b,ie.Portal=n,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=u,ie.isAsyncMode=function(y){return D(y)||h(y)===c},ie.isConcurrentMode=D,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)===C},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===C||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
168
148
  * react-is.development.js
169
149
  *
170
150
  * Copyright (c) Facebook, Inc. and its affiliates.
171
151
  *
172
152
  * This source code is licensed under the MIT license found in the
173
153
  * LICENSE file in the root directory of this source tree.
174
- */var Yi;function Hy(){return Yi||(Yi=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,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,p=e?Symbol.for("react.scope"):60119;function m(F){return typeof F=="string"||typeof F=="function"||F===r||F===l||F===s||F===o||F===u||F===f||typeof F=="object"&&F!==null&&(F.$$typeof===C||F.$$typeof===g||F.$$typeof===i||F.$$typeof===a||F.$$typeof===d||F.$$typeof===S||F.$$typeof===y||F.$$typeof===p||F.$$typeof===v)}function D(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 De=de&&de.$$typeof;switch(De){case a:case d:case C:case g:case i:return De;default:return oe}}case n:return oe}}}var b=c,E=l,w=a,T=i,A=t,I=d,j=r,B=C,H=g,k=n,_=s,O=o,L=u,P=!1;function N(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.")),M(F)||D(F)===c}function M(F){return D(F)===l}function $(F){return D(F)===a}function V(F){return D(F)===i}function Y(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function U(F){return D(F)===d}function Z(F){return D(F)===r}function K(F){return D(F)===C}function W(F){return D(F)===g}function G(F){return D(F)===n}function q(F){return D(F)===s}function z(F){return D(F)===o}function X(F){return D(F)===u}ae.AsyncMode=b,ae.ConcurrentMode=E,ae.ContextConsumer=w,ae.ContextProvider=T,ae.Element=A,ae.ForwardRef=I,ae.Fragment=j,ae.Lazy=B,ae.Memo=H,ae.Portal=k,ae.Profiler=_,ae.StrictMode=O,ae.Suspense=L,ae.isAsyncMode=N,ae.isConcurrentMode=M,ae.isContextConsumer=$,ae.isContextProvider=V,ae.isElement=Y,ae.isForwardRef=U,ae.isFragment=Z,ae.isLazy=K,ae.isMemo=W,ae.isPortal=G,ae.isProfiler=q,ae.isStrictMode=z,ae.isSuspense=X,ae.isValidElementType=m,ae.typeOf=D}()),ae}var Ki;function zl(){return Ki||(Ki=1,process.env.NODE_ENV==="production"?qn.exports=By():qn.exports=Hy()),qn.exports}/*
154
+ */var zi;function _y(){return zi||(zi=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,C=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===C||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 D(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 b:case i:return Se;default:return oe}}case n:return oe}}}var y=c,E=l,w=a,R=i,A=t,I=d,j=r,B=C,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)||D(F)===c}function T(F){return D(F)===l}function L(F){return D(F)===a}function V(F){return D(F)===i}function U(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function Y(F){return D(F)===d}function Z(F){return D(F)===r}function K(F){return D(F)===C}function W(F){return D(F)===b}function G(F){return D(F)===n}function q(F){return D(F)===s}function z(F){return D(F)===o}function X(F){return D(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=_,ae.Profiler=N,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=D}()),ae}var Wi;function _l(){return Wi||(Wi=1,process.env.NODE_ENV==="production"?Un.exports=ky():Un.exports=_y()),Un.exports}/*
175
155
  object-assign
176
156
  (c) Sindre Sorhus
177
157
  @license MIT
178
- */var mo,Gi;function Vy(){if(Gi)return mo;Gi=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 mo=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 f=0;f<l.length;f++)n.call(a,l[f])&&(c[l[f]]=a[l[f]])}}return c},mo}var vo,qi;function Ls(){if(qi)return vo;qi=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vo=e,vo}var yo,Xi;function Wl(){return Xi||(Xi=1,yo=Function.call.bind(Object.prototype.hasOwnProperty)),yo}var bo,Zi;function Uy(){if(Zi)return bo;Zi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ls(),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 f=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 f.name="Invariant Violation",f}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 g=l?l():"";e("Failed "+a+" type: "+u.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bo=o,bo}var wo,Ji;function Yy(){if(Ji)return wo;Ji=1;var e=zl(),t=Vy(),n=Ls(),r=Wl(),o=Uy(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return wo=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(M){var $=M&&(l&&M[l]||M[d]);if(typeof $=="function")return $}var f="<<anonymous>>",g={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:p(),arrayOf:m,element:D(),elementType:b(),instanceOf:E,node:I(),objectOf:T,oneOf:w,oneOfType:A,shape:B,exact:H};function C(M,$){return M===$?M!==0||1/M===1/$:M!==M&&$!==$}function v(M,$){this.message=M,this.data=$&&typeof $=="object"?$:{},this.stack=""}v.prototype=Error.prototype;function S(M){if(process.env.NODE_ENV!=="production")var $={},V=0;function Y(Z,K,W,G,q,z,X){if(G=G||f,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 oe=G+":"+W;!$[oe]&&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."),$[oe]=!0,V++)}}return K[W]==null?Z?K[W]===null?new v("The "+q+" `"+z+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new v("The "+q+" `"+z+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:M(K,W,G,q,z)}var U=Y.bind(null,!1);return U.isRequired=Y.bind(null,!0),U}function y(M){function $(V,Y,U,Z,K,W){var G=V[Y],q=O(G);if(q!==M){var z=L(G);return new v("Invalid "+Z+" `"+K+"` of type "+("`"+z+"` supplied to `"+U+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return S($)}function p(){return S(i)}function m(M){function $(V,Y,U,Z,K){if(typeof M!="function")return new v("Property `"+K+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var W=V[Y];if(!Array.isArray(W)){var G=O(W);return new v("Invalid "+Z+" `"+K+"` of type "+("`"+G+"` supplied to `"+U+"`, expected an array."))}for(var q=0;q<W.length;q++){var z=M(W,q,U,Z,K+"["+q+"]",n);if(z instanceof Error)return z}return null}return S($)}function D(){function M($,V,Y,U,Z){var K=$[V];if(!a(K)){var W=O(K);return new v("Invalid "+U+" `"+Z+"` of type "+("`"+W+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return S(M)}function b(){function M($,V,Y,U,Z){var K=$[V];if(!e.isValidElementType(K)){var W=O(K);return new v("Invalid "+U+" `"+Z+"` of type "+("`"+W+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return S(M)}function E(M){function $(V,Y,U,Z,K){if(!(V[Y]instanceof M)){var W=M.name||f,G=N(V[Y]);return new v("Invalid "+Z+" `"+K+"` of type "+("`"+G+"` supplied to `"+U+"`, expected ")+("instance of `"+W+"`."))}return null}return S($)}function w(M){if(!Array.isArray(M))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 $(V,Y,U,Z,K){for(var W=V[Y],G=0;G<M.length;G++)if(C(W,M[G]))return null;var q=JSON.stringify(M,function(X,F){var oe=L(F);return oe==="symbol"?String(F):F});return new v("Invalid "+Z+" `"+K+"` of value `"+String(W)+"` "+("supplied to `"+U+"`, expected one of "+q+"."))}return S($)}function T(M){function $(V,Y,U,Z,K){if(typeof M!="function")return new v("Property `"+K+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var W=V[Y],G=O(W);if(G!=="object")return new v("Invalid "+Z+" `"+K+"` of type "+("`"+G+"` supplied to `"+U+"`, expected an object."));for(var q in W)if(r(W,q)){var z=M(W,q,U,Z,K+"."+q,n);if(z instanceof Error)return z}return null}return S($)}function A(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var $=0;$<M.length;$++){var V=M[$];if(typeof V!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(V)+" at index "+$+"."),i}function Y(U,Z,K,W,G){for(var q=[],z=0;z<M.length;z++){var X=M[z],F=X(U,Z,K,W,G,n);if(F==null)return null;F.data&&r(F.data,"expectedType")&&q.push(F.data.expectedType)}var oe=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new v("Invalid "+W+" `"+G+"` supplied to "+("`"+K+"`"+oe+"."))}return S(Y)}function I(){function M($,V,Y,U,Z){return k($[V])?null:new v("Invalid "+U+" `"+Z+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return S(M)}function j(M,$,V,Y,U){return new v((M||"React class")+": "+$+" type `"+V+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function B(M){function $(V,Y,U,Z,K){var W=V[Y],G=O(W);if(G!=="object")return new v("Invalid "+Z+" `"+K+"` of type `"+G+"` "+("supplied to `"+U+"`, expected `object`."));for(var q in M){var z=M[q];if(typeof z!="function")return j(U,Z,K,q,L(z));var X=z(W,q,U,Z,K+"."+q,n);if(X)return X}return null}return S($)}function H(M){function $(V,Y,U,Z,K){var W=V[Y],G=O(W);if(G!=="object")return new v("Invalid "+Z+" `"+K+"` of type `"+G+"` "+("supplied to `"+U+"`, expected `object`."));var q=t({},V[Y],M);for(var z in q){var X=M[z];if(r(M,z)&&typeof X!="function")return j(U,Z,K,z,L(X));if(!X)return new v("Invalid "+Z+" `"+K+"` key `"+z+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(V[Y],null," ")+`
179
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var F=X(W,z,U,Z,K+"."+z,n);if(F)return F}return null}return S($)}function k(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(k);if(M===null||a(M))return!0;var $=u(M);if($){var V=$.call(M),Y;if($!==M.entries){for(;!(Y=V.next()).done;)if(!k(Y.value))return!1}else for(;!(Y=V.next()).done;){var U=Y.value;if(U&&!k(U[1]))return!1}}else return!1;return!0;default:return!1}}function _(M,$){return M==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function O(M){var $=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":_($,M)?"symbol":$}function L(M){if(typeof M>"u"||M===null)return""+M;var $=O(M);if($==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return $}function P(M){var $=L(M);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function N(M){return!M.constructor||!M.constructor.name?f:M.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},wo}var xo,Qi;function Ky(){if(Qi)return xo;Qi=1;var e=Ls();function t(){}function n(){}return n.resetWarningCache=t,xo=function(){function r(i,a,c,l,d,u){if(u!==e){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}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xo}var ea;function Ur(){if(ea)return Gn.exports;if(ea=1,process.env.NODE_ENV!=="production"){var e=zl(),t=!0;Gn.exports=Yy()(e.isElement,t)}else Gn.exports=Ky()();return Gn.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 ta(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Bl(e))&&(r&&(r+=" "),r+=t);return r}const Gy=Object.freeze(Object.defineProperty({__proto__:null,clsx:ta,default:ta},Symbol.toStringTag,{value:"Module"})),qy=qu(Gy);var fe={},lt={},na;function Yr(){if(na)return lt;na=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.dontSetMe=o,lt.findInArray=e,lt.int=r,lt.isFunction=t,lt.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 lt}var ut={},ra;function Xy(){if(ra)return ut;ra=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.browserPrefixToKey=n,ut.browserPrefixToStyle=r,ut.default=void 0,ut.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 ut.default=t(),ut}var oa;function $s(){if(oa)return fe;oa=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=b,fe.addEvent=a,fe.addUserSelectStyles=m,fe.createCSSTransform=C,fe.createSVGTransform=v,fe.getTouch=y,fe.getTouchIdentifier=p,fe.getTranslation=S,fe.innerHeight=u,fe.innerWidth=f,fe.matchesSelector=s,fe.matchesSelectorAndParentsTo=i,fe.offsetXYFromParent=g,fe.outerHeight=l,fe.outerWidth=d,fe.removeClassName=E,fe.removeEvent=c,fe.removeUserSelectStyles=D;var e=Yr(),t=r(Xy());function n(w){if(typeof WeakMap!="function")return null;var T=new WeakMap,A=new WeakMap;return(n=function(I){return I?A:T})(w)}function r(w,T){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var A=n(T);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,T){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](T):!1}function i(w,T,A){let I=w;do{if(s(I,T))return!0;if(I===A)return!1;I=I.parentNode}while(I);return!1}function a(w,T,A,I){if(!w)return;const j={capture:!0,...I};w.addEventListener?w.addEventListener(T,A,j):w.attachEvent?w.attachEvent("on"+T,A):w["on"+T]=A}function c(w,T,A,I){if(!w)return;const j={capture:!0,...I};w.removeEventListener?w.removeEventListener(T,A,j):w.detachEvent?w.detachEvent("on"+T,A):w["on"+T]=null}function l(w){let T=w.clientHeight;const A=w.ownerDocument.defaultView.getComputedStyle(w);return T+=(0,e.int)(A.borderTopWidth),T+=(0,e.int)(A.borderBottomWidth),T}function d(w){let T=w.clientWidth;const A=w.ownerDocument.defaultView.getComputedStyle(w);return T+=(0,e.int)(A.borderLeftWidth),T+=(0,e.int)(A.borderRightWidth),T}function u(w){let T=w.clientHeight;const A=w.ownerDocument.defaultView.getComputedStyle(w);return T-=(0,e.int)(A.paddingTop),T-=(0,e.int)(A.paddingBottom),T}function f(w){let T=w.clientWidth;const A=w.ownerDocument.defaultView.getComputedStyle(w);return T-=(0,e.int)(A.paddingLeft),T-=(0,e.int)(A.paddingRight),T}function g(w,T,A){const j=T===T.ownerDocument.body?{left:0,top:0}:T.getBoundingClientRect(),B=(w.clientX+T.scrollLeft-j.left)/A,H=(w.clientY+T.scrollTop-j.top)/A;return{x:B,y:H}}function C(w,T){const A=S(w,T,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:A}}function v(w,T){return S(w,T,"")}function S(w,T,A){let{x:I,y:j}=w,B="translate(".concat(I).concat(A,",").concat(j).concat(A,")");if(T){const H="".concat(typeof T.x=="string"?T.x:T.x+A),k="".concat(typeof T.y=="string"?T.y:T.y+A);B="translate(".concat(H,", ").concat(k,")")+B}return B}function y(w,T){return w.targetTouches&&(0,e.findInArray)(w.targetTouches,A=>T===A.identifier)||w.changedTouches&&(0,e.findInArray)(w.changedTouches,A=>T===A.identifier)}function p(w){if(w.targetTouches&&w.targetTouches[0])return w.targetTouches[0].identifier;if(w.changedTouches&&w.changedTouches[0])return w.changedTouches[0].identifier}function m(w){if(!w)return;let T=w.getElementById("react-draggable-style-el");T||(T=w.createElement("style"),T.type="text/css",T.id="react-draggable-style-el",T.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
180
- `,T.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
181
- `,w.getElementsByTagName("head")[0].appendChild(T)),w.body&&b(w.body,"react-draggable-transparent-selection")}function D(w){if(w)try{if(w.body&&E(w.body,"react-draggable-transparent-selection"),w.selection)w.selection.empty();else{const T=(w.defaultView||window).getSelection();T&&T.type!=="Caret"&&T.removeAllRanges()}}catch{}}function b(w,T){w.classList?w.classList.add(T):w.className.match(new RegExp("(?:^|\\s)".concat(T,"(?!\\S)")))||(w.className+=" ".concat(T))}function E(w,T){w.classList?w.classList.remove(T):w.className=w.className.replace(new RegExp("(?:^|\\s)".concat(T,"(?!\\S)"),"g"),"")}return fe}var Be={},sa;function Hl(){if(sa)return Be;sa=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.canDragX=o,Be.canDragY=s,Be.createCoreData=a,Be.createDraggableData=c,Be.getBoundPosition=n,Be.getControlPosition=i,Be.snapToGrid=r;var e=Yr(),t=$s();function n(u,f,g){if(!u.props.bounds)return[f,g];let{bounds:C}=u.props;C=typeof C=="string"?C:l(C);const v=d(u);if(typeof C=="string"){const{ownerDocument:S}=v,y=S.defaultView;let p;if(C==="parent"?p=v.parentNode:p=S.querySelector(C),!(p instanceof y.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const m=p,D=y.getComputedStyle(v),b=y.getComputedStyle(m);C={left:-v.offsetLeft+(0,e.int)(b.paddingLeft)+(0,e.int)(D.marginLeft),top:-v.offsetTop+(0,e.int)(b.paddingTop)+(0,e.int)(D.marginTop),right:(0,t.innerWidth)(m)-(0,t.outerWidth)(v)-v.offsetLeft+(0,e.int)(b.paddingRight)-(0,e.int)(D.marginRight),bottom:(0,t.innerHeight)(m)-(0,t.outerHeight)(v)-v.offsetTop+(0,e.int)(b.paddingBottom)-(0,e.int)(D.marginBottom)}}return(0,e.isNum)(C.right)&&(f=Math.min(f,C.right)),(0,e.isNum)(C.bottom)&&(g=Math.min(g,C.bottom)),(0,e.isNum)(C.left)&&(f=Math.max(f,C.left)),(0,e.isNum)(C.top)&&(g=Math.max(g,C.top)),[f,g]}function r(u,f,g){const C=Math.round(f/u[0])*u[0],v=Math.round(g/u[1])*u[1];return[C,v]}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,f,g){const C=typeof f=="number"?(0,t.getTouch)(u,f):null;if(typeof f=="number"&&!C)return null;const v=d(g),S=g.props.offsetParent||v.offsetParent||v.ownerDocument.body;return(0,t.offsetXYFromParent)(C||u,S,g.props.scale)}function a(u,f,g){const C=!(0,e.isNum)(u.lastX),v=d(u);return C?{node:v,deltaX:0,deltaY:0,lastX:f,lastY:g,x:f,y:g}:{node:v,deltaX:f-u.lastX,deltaY:g-u.lastY,lastX:u.lastX,lastY:u.lastY,x:f,y:g}}function c(u,f){const g=u.props.scale;return{node:f.node,x:u.state.x+f.deltaX/g,y:u.state.y+f.deltaY/g,deltaX:f.deltaX/g,deltaY:f.deltaY/g,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 f=u.findDOMNode();if(!f)throw new Error("<DraggableCore>: Unmounted during event!");return f}return Be}var an={},Xn={},ia;function Vl(){if(ia)return Xn;ia=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.default=e;function e(){}return Xn}var aa;function Zy(){if(aa)return an;aa=1,Object.defineProperty(an,"__esModule",{value:!0}),an.default=void 0;var e=l(R),t=a(Ur()),n=a(Xo()),r=$s(),o=Hl(),s=Yr(),i=a(Vl());function a(S){return S&&S.__esModule?S:{default:S}}function c(S){if(typeof WeakMap!="function")return null;var y=new WeakMap,p=new WeakMap;return(c=function(m){return m?p:y})(S)}function l(S,y){if(S&&S.__esModule)return S;if(S===null||typeof S!="object"&&typeof S!="function")return{default:S};var p=c(y);if(p&&p.has(S))return p.get(S);var m={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in S)if(b!=="default"&&Object.prototype.hasOwnProperty.call(S,b)){var E=D?Object.getOwnPropertyDescriptor(S,b):null;E&&(E.get||E.set)?Object.defineProperty(m,b,E):m[b]=S[b]}return m.default=S,p&&p.set(S,m),m}function d(S,y,p){return y=u(y),y in S?Object.defineProperty(S,y,{value:p,enumerable:!0,configurable:!0,writable:!0}):S[y]=p,S}function u(S){var y=f(S,"string");return typeof y=="symbol"?y:String(y)}function f(S,y){if(typeof S!="object"||S===null)return S;var p=S[Symbol.toPrimitive];if(p!==void 0){var m=p.call(S,y);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(S)}const g={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=g.mouse,v=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",y=>{if(this.props.onMouseDown(y),!this.props.allowAnyClick&&typeof y.button=="number"&&y.button!==0)return!1;const p=this.findDOMNode();if(!p||!p.ownerDocument||!p.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:m}=p;if(this.props.disabled||!(y.target instanceof m.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(y.target,this.props.handle,p)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(y.target,this.props.cancel,p))return;y.type==="touchstart"&&y.preventDefault();const D=(0,r.getTouchIdentifier)(y);this.touchIdentifier=D;const b=(0,o.getControlPosition)(y,D,this);if(b==null)return;const{x:E,y:w}=b,T=(0,o.createCoreData)(this,E,w);(0,i.default)("DraggableCore: handleDragStart: %j",T),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(y,T)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(m),this.dragging=!0,this.lastX=E,this.lastY=w,(0,r.addEvent)(m,C.move,this.handleDrag),(0,r.addEvent)(m,C.stop,this.handleDragStop))}),d(this,"handleDrag",y=>{const p=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(p==null)return;let{x:m,y:D}=p;if(Array.isArray(this.props.grid)){let w=m-this.lastX,T=D-this.lastY;if([w,T]=(0,o.snapToGrid)(this.props.grid,w,T),!w&&!T)return;m=this.lastX+w,D=this.lastY+T}const b=(0,o.createCoreData)(this,m,D);if((0,i.default)("DraggableCore: handleDrag: %j",b),this.props.onDrag(y,b)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const T=document.createEvent("MouseEvents");T.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(T)}return}this.lastX=m,this.lastY=D}),d(this,"handleDragStop",y=>{if(!this.dragging)return;const p=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(p==null)return;let{x:m,y:D}=p;if(Array.isArray(this.props.grid)){let T=m-this.lastX||0,A=D-this.lastY||0;[T,A]=(0,o.snapToGrid)(this.props.grid,T,A),m=this.lastX+T,D=this.lastY+A}const b=(0,o.createCoreData)(this,m,D);if(this.props.onStop(y,b)===!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",b),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,w&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(w.ownerDocument,C.move,this.handleDrag),(0,r.removeEvent)(w.ownerDocument,C.stop,this.handleDragStop))}),d(this,"onMouseDown",y=>(C=g.mouse,this.handleDragStart(y))),d(this,"onMouseUp",y=>(C=g.mouse,this.handleDragStop(y))),d(this,"onTouchStart",y=>(C=g.touch,this.handleDragStart(y))),d(this,"onTouchEnd",y=>(C=g.touch,this.handleDragStop(y)))}componentDidMount(){this.mounted=!0;const y=this.findDOMNode();y&&(0,r.addEvent)(y,g.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const y=this.findDOMNode();if(y){const{ownerDocument:p}=y;(0,r.removeEvent)(p,g.mouse.move,this.handleDrag),(0,r.removeEvent)(p,g.touch.move,this.handleDrag),(0,r.removeEvent)(p,g.mouse.stop,this.handleDragStop),(0,r.removeEvent)(p,g.touch.stop,this.handleDragStop),(0,r.removeEvent)(y,g.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(p)}}findDOMNode(){var y,p;return(y=this.props)!==null&&y!==void 0&&y.nodeRef?(p=this.props)===null||p===void 0||(p=p.nodeRef)===null||p===void 0?void 0:p.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 an.default=v,d(v,"displayName","DraggableCore"),d(v,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(S,y){if(S[y]&&S[y].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),d(v,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),an}var ca;function Jy(){return ca||(ca=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=f(R),n=d(Ur()),r=d(Xo()),o=d(qy),s=$s(),i=Hl(),a=Yr(),c=d(Zy()),l=d(Vl());function d(p){return p&&p.__esModule?p:{default:p}}function u(p){if(typeof WeakMap!="function")return null;var m=new WeakMap,D=new WeakMap;return(u=function(b){return b?D:m})(p)}function f(p,m){if(p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var D=u(m);if(D&&D.has(p))return D.get(p);var b={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in p)if(w!=="default"&&Object.prototype.hasOwnProperty.call(p,w)){var T=E?Object.getOwnPropertyDescriptor(p,w):null;T&&(T.get||T.set)?Object.defineProperty(b,w,T):b[w]=p[w]}return b.default=p,D&&D.set(p,b),b}function g(){return g=Object.assign?Object.assign.bind():function(p){for(var m=1;m<arguments.length;m++){var D=arguments[m];for(var b in D)Object.prototype.hasOwnProperty.call(D,b)&&(p[b]=D[b])}return p},g.apply(this,arguments)}function C(p,m,D){return m=v(m),m in p?Object.defineProperty(p,m,{value:D,enumerable:!0,configurable:!0,writable:!0}):p[m]=D,p}function v(p){var m=S(p,"string");return typeof m=="symbol"?m:String(m)}function S(p,m){if(typeof p!="object"||p===null)return p;var D=p[Symbol.toPrimitive];if(D!==void 0){var b=D.call(p,m);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}class y extends t.Component{static getDerivedStateFromProps(m,D){let{position:b}=m,{prevPropsPosition:E}=D;return b&&(!E||b.x!==E.x||b.y!==E.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:b,prevPropsPosition:E}),{x:b.x,y:b.y,prevPropsPosition:{...b}}):null}constructor(m){super(m),C(this,"onDragStart",(D,b)=>{if((0,l.default)("Draggable: onDragStart: %j",b),this.props.onStart(D,(0,i.createDraggableData)(this,b))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(D,b)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",b);const E=(0,i.createDraggableData)(this,b),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(D,E)===!1)return!1;this.setState(w)}),C(this,"onDragStop",(D,b)=>{if(!this.state.dragging||this.props.onStop(D,(0,i.createDraggableData)(this,b))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",b);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:m.position?m.position.x:m.defaultPosition.x,y:m.position?m.position.y:m.defaultPosition.y,prevPropsPosition:{...m.position},slackX:0,slackY:0,isElementSVG:!1},m.position&&!(m.onDrag||m.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var m,D;return(m=(D=this.props)===null||D===void 0||(D=D.nodeRef)===null||D===void 0?void 0:D.current)!==null&&m!==void 0?m:r.default.findDOMNode(this)}render(){const{axis:m,bounds:D,children:b,defaultPosition:E,defaultClassName:w,defaultClassNameDragging:T,defaultClassNameDragged:A,position:I,positionOffset:j,scale:B,...H}=this.props;let k={},_=null;const L=!!!I||this.state.dragging,P=I||E,N={x:(0,i.canDragX)(this)&&L?this.state.x:P.x,y:(0,i.canDragY)(this)&&L?this.state.y:P.y};this.state.isElementSVG?_=(0,s.createSVGTransform)(N,j):k=(0,s.createCSSTransform)(N,j);const M=(0,o.default)(b.props.className||"",w,{[T]:this.state.dragging,[A]:this.state.dragged});return t.createElement(c.default,g({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(b),{className:M,style:{...b.props.style,...k},transform:_}))}}e.default=y,C(y,"displayName","Draggable"),C(y,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),C(y,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(go)),go}var la;function Ul(){if(la)return sn.exports;la=1;const{default:e,DraggableCore:t}=Jy();return sn.exports=e,sn.exports.default=e,sn.exports.DraggableCore=t,sn.exports}var Zn={},ua;function Qy(){if(ua)return Zn;ua=1,Zn.__esModule=!0,Zn.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(f){return Object.getOwnPropertyDescriptor(c,f).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 Zn}var cn={},da;function Yl(){if(da)return cn;da=1,cn.__esModule=!0,cn.resizableProps=void 0;var e=t(Ur());Ul();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 cn.resizableProps=n,cn}var fa;function Kl(){if(fa)return on;fa=1,on.__esModule=!0,on.default=void 0;var e=i(R),t=Ul(),n=Qy(),r=Yl(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(y){if(typeof WeakMap!="function")return null;var p=new WeakMap,m=new WeakMap;return(s=function(b){return b?m:p})(y)}function i(y,p){if(y&&y.__esModule)return y;if(y===null||typeof y!="object"&&typeof y!="function")return{default:y};var m=s(p);if(m&&m.has(y))return m.get(y);var D={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in y)if(E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)){var w=b?Object.getOwnPropertyDescriptor(y,E):null;w&&(w.get||w.set)?Object.defineProperty(D,E,w):D[E]=y[E]}return D.default=y,m&&m.set(y,D),D}function a(){return a=Object.assign?Object.assign.bind():function(y){for(var p=1;p<arguments.length;p++){var m=arguments[p];for(var D in m)Object.prototype.hasOwnProperty.call(m,D)&&(y[D]=m[D])}return y},a.apply(this,arguments)}function c(y,p){if(y==null)return{};var m={},D=Object.keys(y),b,E;for(E=0;E<D.length;E++)b=D[E],!(p.indexOf(b)>=0)&&(m[b]=y[b]);return m}function l(y,p){var m=Object.keys(y);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(y);p&&(D=D.filter(function(b){return Object.getOwnPropertyDescriptor(y,b).enumerable})),m.push.apply(m,D)}return m}function d(y){for(var p=1;p<arguments.length;p++){var m=arguments[p]!=null?arguments[p]:{};p%2?l(Object(m),!0).forEach(function(D){u(y,D,m[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(m)):l(Object(m)).forEach(function(D){Object.defineProperty(y,D,Object.getOwnPropertyDescriptor(m,D))})}return y}function u(y,p,m){return p=f(p),p in y?Object.defineProperty(y,p,{value:m,enumerable:!0,configurable:!0,writable:!0}):y[p]=m,y}function f(y){var p=g(y,"string");return typeof p=="symbol"?p:String(p)}function g(y,p){if(typeof y!="object"||y===null)return y;var m=y[Symbol.toPrimitive];if(m!==void 0){var D=m.call(y,p);if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(y)}function C(y,p){y.prototype=Object.create(p.prototype),y.prototype.constructor=y,v(y,p)}function v(y,p){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,b){return D.__proto__=b,D},v(y,p)}var S=function(y){C(p,y);function p(){for(var D,b=arguments.length,E=new Array(b),w=0;w<b;w++)E[w]=arguments[w];return D=y.call.apply(y,[this].concat(E))||this,D.handleRefs={},D.lastHandleRect=null,D.slack=null,D}var m=p.prototype;return m.componentWillUnmount=function(){this.resetData()},m.resetData=function(){this.lastHandleRect=this.slack=null},m.runConstraints=function(b,E){var w=this.props,T=w.minConstraints,A=w.maxConstraints,I=w.lockAspectRatio;if(!T&&!A&&!I)return[b,E];if(I){var j=this.props.width/this.props.height,B=b-this.props.width,H=E-this.props.height;Math.abs(B)>Math.abs(H*j)?E=b/j:b=E*j}var k=b,_=E,O=this.slack||[0,0],L=O[0],P=O[1];return b+=L,E+=P,T&&(b=Math.max(T[0],b),E=Math.max(T[1],E)),A&&(b=Math.min(A[0],b),E=Math.min(A[1],E)),this.slack=[L+(k-b),P+(_-E)],[b,E]},m.resizeHandler=function(b,E){var w=this;return function(T,A){var I=A.node,j=A.deltaX,B=A.deltaY;b==="onResizeStart"&&w.resetData();var H=(w.props.axis==="both"||w.props.axis==="x")&&E!=="n"&&E!=="s",k=(w.props.axis==="both"||w.props.axis==="y")&&E!=="e"&&E!=="w";if(!(!H&&!k)){var _=E[0],O=E[E.length-1],L=I.getBoundingClientRect();if(w.lastHandleRect!=null){if(O==="w"){var P=L.left-w.lastHandleRect.left;j+=P}if(_==="n"){var N=L.top-w.lastHandleRect.top;B+=N}}w.lastHandleRect=L,O==="w"&&(j=-j),_==="n"&&(B=-B);var M=w.props.width+(H?j/w.props.transformScale:0),$=w.props.height+(k?B/w.props.transformScale:0),V=w.runConstraints(M,$);M=V[0],$=V[1];var Y=M!==w.props.width||$!==w.props.height,U=typeof w.props[b]=="function"?w.props[b]:null,Z=b==="onResize"&&!Y;U&&!Z&&(T.persist==null||T.persist(),U(T,{node:I,size:{width:M,height:$},handle:E})),b==="onResizeStop"&&w.resetData()}}},m.renderResizeHandle=function(b,E){var w=this.props.handle;if(!w)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+b,ref:E});if(typeof w=="function")return w(b,E);var T=typeof w.type=="string",A=d({ref:E},T?{}:{handleAxis:b});return e.cloneElement(w,A)},m.render=function(){var b=this,E=this.props,w=E.children,T=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:(T?T+" ":"")+"react-resizable",children:[].concat(w.props.children,I.map(function(B){var H,k=(H=b.handleRefs[B])!=null?H:b.handleRefs[B]=e.createRef();return e.createElement(t.DraggableCore,a({},A,{nodeRef:k,key:"resizableHandle-"+B,onStop:b.resizeHandler("onResizeStop",B),onStart:b.resizeHandler("onResizeStart",B),onDrag:b.resizeHandler("onResize",B)}),b.renderResizeHandle(B,k))}))}))},p}(e.Component);return on.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},on}var ln={},pa;function eb(){if(pa)return ln;pa=1,ln.__esModule=!0,ln.default=void 0;var e=a(R),t=s(Ur()),n=s(Kl()),r=Yl(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function s(p){return p&&p.__esModule?p:{default:p}}function i(p){if(typeof WeakMap!="function")return null;var m=new WeakMap,D=new WeakMap;return(i=function(E){return E?D:m})(p)}function a(p,m){if(p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var D=i(m);if(D&&D.has(p))return D.get(p);var b={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in p)if(w!=="default"&&Object.prototype.hasOwnProperty.call(p,w)){var T=E?Object.getOwnPropertyDescriptor(p,w):null;T&&(T.get||T.set)?Object.defineProperty(b,w,T):b[w]=p[w]}return b.default=p,D&&D.set(p,b),b}function c(){return c=Object.assign?Object.assign.bind():function(p){for(var m=1;m<arguments.length;m++){var D=arguments[m];for(var b in D)Object.prototype.hasOwnProperty.call(D,b)&&(p[b]=D[b])}return p},c.apply(this,arguments)}function l(p,m){var D=Object.keys(p);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(p);m&&(b=b.filter(function(E){return Object.getOwnPropertyDescriptor(p,E).enumerable})),D.push.apply(D,b)}return D}function d(p){for(var m=1;m<arguments.length;m++){var D=arguments[m]!=null?arguments[m]:{};m%2?l(Object(D),!0).forEach(function(b){u(p,b,D[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(D)):l(Object(D)).forEach(function(b){Object.defineProperty(p,b,Object.getOwnPropertyDescriptor(D,b))})}return p}function u(p,m,D){return m=f(m),m in p?Object.defineProperty(p,m,{value:D,enumerable:!0,configurable:!0,writable:!0}):p[m]=D,p}function f(p){var m=g(p,"string");return typeof m=="symbol"?m:String(m)}function g(p,m){if(typeof p!="object"||p===null)return p;var D=p[Symbol.toPrimitive];if(D!==void 0){var b=D.call(p,m);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}function C(p,m){if(p==null)return{};var D={},b=Object.keys(p),E,w;for(w=0;w<b.length;w++)E=b[w],!(m.indexOf(E)>=0)&&(D[E]=p[E]);return D}function v(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,S(p,m)}function S(p,m){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,E){return b.__proto__=E,b},S(p,m)}var y=function(p){v(m,p);function m(){for(var b,E=arguments.length,w=new Array(E),T=0;T<E;T++)w[T]=arguments[T];return b=p.call.apply(p,[this].concat(w))||this,b.state={width:b.props.width,height:b.props.height,propsWidth:b.props.width,propsHeight:b.props.height},b.onResize=function(A,I){var j=I.size;b.props.onResize?(A.persist==null||A.persist(),b.setState(j,function(){return b.props.onResize&&b.props.onResize(A,I)})):b.setState(j)},b}m.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 D=m.prototype;return D.render=function(){var E=this.props,w=E.handle,T=E.handleSize;E.onResize;var A=E.onResizeStart,I=E.onResizeStop,j=E.draggableOpts,B=E.minConstraints,H=E.maxConstraints,k=E.lockAspectRatio,_=E.axis;E.width,E.height;var O=E.resizeHandles,L=E.style,P=E.transformScale,N=C(E,o);return e.createElement(n.default,{axis:_,draggableOpts:j,handle:w,handleSize:T,height:this.state.height,lockAspectRatio:k,maxConstraints:H,minConstraints:B,onResizeStart:A,onResize:this.onResize,onResizeStop:I,resizeHandles:O,transformScale:P,width:this.state.width},e.createElement("div",c({},N,{style:d(d({},L),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},m}(e.Component);return ln.default=y,y.propTypes=d(d({},r.resizableProps),{},{children:t.default.element}),ln}var ha;function tb(){return ha||(ha=1,rn.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},rn.exports.Resizable=Kl().default,rn.exports.ResizableBox=eb().default),rn.exports}var Gl=tb();const Nn=qo(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}))})),br=({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:f=!0,ref:g})=>{var b;const[C,v]=R.useState(""),{updateIsDragging:S}=Nn(E=>E),y=R.useMemo(()=>l===ce.DAY?"w-[99%]":"w-full",[l]),p=R.useMemo(()=>l===ce.DAY?"w-[99%]":"w-full",[l]);R.useEffect(()=>()=>{u!=null&&u.onUnmount&&(u==null||u.onUnmount())},[]);const m=(E,w)=>{v("show-handle"),S(!0),d!=null&&d.onResizeStart&&d.onResizeStart(E,w)},D=(E,w)=>{v(""),S(!1),d!=null&&d.onResizeStop&&d.onResizeStop(E,w)};if(!f&&!e.finishAt)return null;if((b=d==null?void 0:d.state)!=null&&b.height){const{state:E,onResize:w}=d;return h.jsx(Gl.Resizable,{className:ne("absolute top-[0px]",d.customClass,C),height:E==null?void 0:E.height,width:E==null?void 0:E.width,onResize:w,onResizeStart:m,onResizeStop:D,resizeHandles:["s"],draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:h.jsx("div",{className:ne("flex",p),style:{height:n,zIndex:99},children:h.jsx("div",{ref:g,className:ne("border rounded-md overflow-hidden",y,c,C.length&&"dragging-effect"),onClick:r,style:{height:n,position:"relative",zIndex:50,...o,...s},...i,...a,children:h.jsx(Bo,{booking:e,slotData:t})})})})}return h.jsx("div",{className:ne("flex",p),style:{height:n,zIndex:100},children:h.jsx("div",{ref:g,className:ne("hover:bg-white border rounded-md overflow-hidden",y,c),onClick:r,style:{height:n,position:"relative",zIndex:50,...o,...s},...i,...a,children:h.jsx(Bo,{booking:e,slotData:t})})})};var nb="Label",ql=x.forwardRef((e,t)=>h.jsx(se.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ql.displayName=nb;var rb=ql;function ob({className:e,...t}){return h.jsx(rb,{"data-slot":"label",className:ne("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 sb=({onClose:e,onOpenChange:t,buttonTrigger:n})=>{const[r,o]=R.useState({x:0,y:0}),s=Et(),{attributes:i,listeners:a,setNodeRef:c,transform:l,setActivatorNodeRef:d}=ss({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 Rr({onDragEnd(f){if(f.active.id){const{y:g,x:C}=r;o({x:C+((l==null?void 0:l.x)||0),y:g+((l==null?void 0:l.y)||0)})}}}),h.jsxs(ks,{dir:"ltr",modal:!1,open:!0,defaultOpen:!1,onOpenChange:t,children:[h.jsx(Is,{asChild:!0,children:n}),h.jsxs(js,{ref:c,style:{...u,zIndex:100},className:"w-[25rem]",updatePositionStrategy:"always",forceMount:!0,side:"right",sticky:"always",onEscapeKeyDown:()=>{},...i,children:[h.jsxs("div",{className:"flex justify-between items-center hover:bg-gray-100 rounded-sm",children:[h.jsx(ob,{ref:d,className:"w-full hover:cursor-move p-4",...a,children:"Appointment"}),h.jsx(ph,{className:"hover:cursor-pointer hover:text-gray-500",onClick:e})]}),s.createBookingModal]})]})},ib="_Draggable_1rwnc_7",ab="_pendingDelay_1rwnc_22",cb="_dragging_1rwnc_59",wr={Draggable:ib,pendingDelay:ab,dragging:cb};var lb="Toggle",Xl=x.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...s}=e,[i=!1,a]=Tt({prop:n,onChange:o,defaultProp:r});return h.jsx(se.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:ee(e.onClick,()=>{e.disabled||a(!i)})})});Xl.displayName=lb;var ub=Xl;const db=cc("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 fb({className:e,variant:t,size:n,...r}){return h.jsx(ub,{"data-slot":"toggle",className:ne(db({variant:t,size:n,className:e})),...r})}const pb=()=>{const[e,t]=R.useState(!1);return h.jsx(xs,{children:h.jsxs(Wc,{children:[h.jsx(Bc,{asChild:!0,children:h.jsx("div",{children:h.jsx(fb,{className:"group size-10 p-0 hover:bg-indigo-50 hover:text-indigo-500 data-[state=on]:bg-indigo-50 data-[state=on]:text-indigo-500","aria-label":"Bookmark this",variant:e?"default":"outline",pressed:e,onPressedChange:t,children:h.jsx(Wp,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),h.jsx(Hc,{className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:h.jsx("p",{children:e?"Remove bookmark":"Bookmark this"})})]})})};var Fs="Popover",[Zl,Xw]=yt(Fs,[bt]),kn=bt(),[hb,wt]=Zl(Fs),Jl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=kn(t),c=x.useRef(null),[l,d]=x.useState(!1),[u=!1,f]=Tt({prop:r,defaultProp:o,onChange:s});return h.jsx(Nr,{...a,children:h.jsx(hb,{scope:t,contentId:ht(),triggerRef:c,open:u,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(g=>!g),[f]),hasCustomAnchor:l,onCustomAnchorAdd:x.useCallback(()=>d(!0),[]),onCustomAnchorRemove:x.useCallback(()=>d(!1),[]),modal:i,children:n})})};Jl.displayName=Fs;var Ql="PopoverAnchor",gb=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Ql,n),s=kn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return x.useEffect(()=>(i(),()=>a()),[i,a]),h.jsx(Mn,{...s,...r,ref:t})});gb.displayName=Ql;var eu="PopoverTrigger",tu=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(eu,n),s=kn(n),i=le(t,o.triggerRef),a=h.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":iu(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:h.jsx(Mn,{asChild:!0,...s,children:a})});tu.displayName=eu;var zs="PopoverPortal",[mb,vb]=Zl(zs,{forceMount:void 0}),nu=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=wt(zs,t);return h.jsx(mb,{scope:t,forceMount:n,children:h.jsx(Qe,{present:n||s.open,children:h.jsx(On,{asChild:!0,container:o,children:r})})})};nu.displayName=zs;var Ut="PopoverContent",ru=x.forwardRef((e,t)=>{const n=vb(Ut,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=wt(Ut,e.__scopePopover);return h.jsx(Qe,{present:r||s.open,children:s.modal?h.jsx(yb,{...o,ref:t}):h.jsx(bb,{...o,ref:t})})});ru.displayName=Ut;var yb=x.forwardRef((e,t)=>{const n=wt(Ut,e.__scopePopover),r=x.useRef(null),o=le(t,r),s=x.useRef(!1);return x.useEffect(()=>{const i=r.current;if(i)return Es(i)},[]),h.jsx(Br,{as:pt,allowPinchZoom:!0,children:h.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})})})}),bb=x.forwardRef((e,t)=>{const n=wt(Ut,e.__scopePopover),r=x.useRef(!1),o=x.useRef(!1);return h.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=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,f=wt(Ut,n),g=kn(n);return Ds(),h.jsx(Fr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:h.jsx(kr,{"data-state":iu(f.open),role:"dialog",id:f.contentId,...g,...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",wb=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(su,n);return h.jsx(se.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});wb.displayName=su;var xb="PopoverArrow",Sb=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kn(n);return h.jsx(Ir,{...o,...r,ref:t})});Sb.displayName=xb;function iu(e){return e?"open":"closed"}var Cb=Jl,Db=tu,Eb=nu,Rb=ru;function Tb({...e}){return h.jsx(Cb,{"data-slot":"popover",...e})}function Mb({...e}){return h.jsx(Db,{"data-slot":"popover-trigger",...e})}function Ob({className:e,align:t="center",sideOffset:n=4,...r}){return h.jsx(Eb,{children:h.jsx(Rb,{"data-slot":"popover-content",align:t,sideOffset:n,className:ne("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 ga(e,[t,n]){return Math.min(n,Math.max(t,e))}function Pb(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 Ab=[" ","Enter","ArrowUp","ArrowDown"],_b=[" ","Enter"],In="Select",[Kr,Gr,Nb]=Ss(In),[Jt,Zw]=yt(In,[Nb,bt]),qr=bt(),[kb,xt]=Jt(In),[Ib,jb]=Jt(In),au=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:f,required:g,form:C}=e,v=qr(t),[S,y]=x.useState(null),[p,m]=x.useState(null),[D,b]=x.useState(!1),E=Cs(l),[w=!1,T]=Tt({prop:r,defaultProp:o,onChange:s}),[A,I]=Tt({prop:i,defaultProp:a,onChange:c}),j=x.useRef(null),B=S?C||!!S.closest("form"):!0,[H,k]=x.useState(new Set),_=Array.from(H).map(O=>O.props.value).join(";");return h.jsx(Nr,{...v,children:h.jsxs(kb,{required:g,scope:t,trigger:S,onTriggerChange:y,valueNode:p,onValueNodeChange:m,valueNodeHasChildren:D,onValueNodeHasChildrenChange:b,contentId:ht(),value:A,onValueChange:I,open:w,onOpenChange:T,dir:E,triggerPointerDownPosRef:j,disabled:f,children:[h.jsx(Kr.Provider,{scope:t,children:h.jsx(Ib,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(O=>{k(L=>new Set(L).add(O))},[]),onNativeOptionRemove:x.useCallback(O=>{k(L=>{const P=new Set(L);return P.delete(O),P})},[]),children:n})}),B?h.jsxs(Pu,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:u,value:A,onChange:O=>I(O.target.value),disabled:f,form:C,children:[A===void 0?h.jsx("option",{value:""}):null,Array.from(H)]},_):null]})})};au.displayName=In;var cu="SelectTrigger",lu=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=qr(n),i=xt(cu,n),a=i.disabled||r,c=le(t,i.onTriggerChange),l=Gr(n),d=x.useRef("touch"),[u,f,g]=Au(v=>{const S=l().filter(m=>!m.disabled),y=S.find(m=>m.value===i.value),p=_u(S,v,y);p!==void 0&&i.onValueChange(p.value)}),C=v=>{a||(i.onOpenChange(!0),g()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return h.jsx(Mn,{asChild:!0,...s,children:h.jsx(se.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ou(i.value)?"":void 0,...o,ref:c,onClick:ee(o.onClick,v=>{v.currentTarget.focus(),d.current!=="mouse"&&C(v)}),onPointerDown:ee(o.onPointerDown,v=>{d.current=v.pointerType;const S=v.target;S.hasPointerCapture(v.pointerId)&&S.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(C(v),v.preventDefault())}),onKeyDown:ee(o.onKeyDown,v=>{const S=u.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&f(v.key),!(S&&v.key===" ")&&Ab.includes(v.key)&&(C(),v.preventDefault())})})})});lu.displayName=cu;var uu="SelectValue",du=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=xt(uu,n),{onValueNodeHasChildrenChange:l}=c,d=s!==void 0,u=le(t,c.onValueNodeChange);return we(()=>{l(d)},[l,d]),h.jsx(se.span,{...a,ref:u,style:{pointerEvents:"none"},children:Ou(c.value)?h.jsx(h.Fragment,{children:i}):s})});du.displayName=uu;var Lb="SelectIcon",fu=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(se.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});fu.displayName=Lb;var $b="SelectPortal",pu=e=>h.jsx(On,{asChild:!0,...e});pu.displayName=$b;var Mt="SelectContent",hu=x.forwardRef((e,t)=>{const n=xt(Mt,e.__scopeSelect),[r,o]=x.useState();if(we(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Ve.createPortal(h.jsx(gu,{scope:e.__scopeSelect,children:h.jsx(Kr.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),s):null}return h.jsx(mu,{...e,ref:t})});hu.displayName=Mt;var je=10,[gu,St]=Jt(Mt),Fb="SelectContentImpl",mu=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:f,collisionPadding:g,sticky:C,hideWhenDetached:v,avoidCollisions:S,...y}=e,p=xt(Mt,n),[m,D]=x.useState(null),[b,E]=x.useState(null),w=le(t,W=>D(W)),[T,A]=x.useState(null),[I,j]=x.useState(null),B=Gr(n),[H,k]=x.useState(!1),_=x.useRef(!1);x.useEffect(()=>{if(m)return Es(m)},[m]),Ds();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&&b&&(b.scrollTop=0),F===z&&b&&(b.scrollTop=b.scrollHeight),F==null||F.focus(),document.activeElement!==X))return},[B,b]),L=x.useCallback(()=>O([T,m]),[O,T,m]);x.useEffect(()=>{H&&L()},[H,L]);const{onOpenChange:P,triggerPointerDownPosRef:N}=p;x.useEffect(()=>{if(m){let W={x:0,y:0};const G=z=>{var X,F;W={x:Math.abs(Math.round(z.pageX)-(((X=N.current)==null?void 0:X.x)??0)),y:Math.abs(Math.round(z.pageY)-(((F=N.current)==null?void 0:F.y)??0))}},q=z=>{W.x<=10&&W.y<=10?z.preventDefault():m.contains(z.target)||P(!1),document.removeEventListener("pointermove",G),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",q,{capture:!0})}}},[m,P,N]),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[M,$]=Au(W=>{const G=B().filter(X=>!X.disabled),q=G.find(X=>X.ref.current===document.activeElement),z=_u(G,W,q);z&&setTimeout(()=>z.ref.current.focus())}),V=x.useCallback((W,G,q)=>{const z=!_.current&&!q;(p.value!==void 0&&p.value===G||z)&&(A(W),z&&(_.current=!0))},[p.value]),Y=x.useCallback(()=>m==null?void 0:m.focus(),[m]),U=x.useCallback((W,G,q)=>{const z=!_.current&&!q;(p.value!==void 0&&p.value===G||z)&&j(W)},[p.value]),Z=r==="popper"?Ho:vu,K=Z===Ho?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:f,collisionPadding:g,sticky:C,hideWhenDetached:v,avoidCollisions:S}:{};return h.jsx(gu,{scope:n,content:m,viewport:b,onViewportChange:E,itemRefCallback:V,selectedItem:T,onItemLeave:Y,itemTextRefCallback:U,focusSelectedItem:L,selectedItemText:I,position:r,isPositioned:H,searchRef:M,children:h.jsx(Br,{as:pt,allowPinchZoom:!0,children:h.jsx(Fr,{asChild:!0,trapped:p.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:ee(o,W=>{var G;(G=p.trigger)==null||G.focus({preventScroll:!0}),W.preventDefault()}),children:h.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:h.jsx(Z,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:W=>W.preventDefault(),...y,...K,onPlaced:()=>k(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ee(y.onKeyDown,W=>{const G=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!G&&W.key.length===1&&$(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()}})})})})})})});mu.displayName=Fb;var zb="SelectItemAlignedPosition",vu=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=xt(Mt,n),i=St(Mt,n),[a,c]=x.useState(null),[l,d]=x.useState(null),u=le(t,w=>d(w)),f=Gr(n),g=x.useRef(!1),C=x.useRef(!0),{viewport:v,selectedItem:S,selectedItemText:y,focusSelectedItem:p}=i,m=x.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&v&&S&&y){const w=s.trigger.getBoundingClientRect(),T=l.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),I=y.getBoundingClientRect();if(s.dir!=="rtl"){const X=I.left-T.left,F=A.left-X,oe=w.left-F,de=w.width+oe,De=Math.max(de,T.width),Ee=window.innerWidth-je,et=ga(F,[je,Math.max(je,Ee-De)]);a.style.minWidth=de+"px",a.style.left=et+"px"}else{const X=T.right-I.right,F=window.innerWidth-A.right-X,oe=window.innerWidth-w.right-F,de=w.width+oe,De=Math.max(de,T.width),Ee=window.innerWidth-je,et=ga(F,[je,Math.max(je,Ee-De)]);a.style.minWidth=de+"px",a.style.right=et+"px"}const j=f(),B=window.innerHeight-je*2,H=v.scrollHeight,k=window.getComputedStyle(l),_=parseInt(k.borderTopWidth,10),O=parseInt(k.paddingTop,10),L=parseInt(k.borderBottomWidth,10),P=parseInt(k.paddingBottom,10),N=_+O+H+P+L,M=Math.min(S.offsetHeight*5,N),$=window.getComputedStyle(v),V=parseInt($.paddingTop,10),Y=parseInt($.paddingBottom,10),U=w.top+w.height/2-je,Z=B-U,K=S.offsetHeight/2,W=S.offsetTop+K,G=_+O+W,q=N-G;if(G<=U){const X=j.length>0&&S===j[j.length-1].ref.current;a.style.bottom="0px";const F=l.clientHeight-v.offsetTop-v.offsetHeight,oe=Math.max(Z,K+(X?Y:0)+F+L),de=G+oe;a.style.height=de+"px"}else{const X=j.length>0&&S===j[0].ref.current;a.style.top="0px";const oe=Math.max(U,_+v.offsetTop+(X?V:0)+K)+q;a.style.height=oe+"px",v.scrollTop=G-U+v.offsetTop}a.style.margin=`${je}px 0`,a.style.minHeight=M+"px",a.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[f,s.trigger,s.valueNode,a,l,v,S,y,s.dir,r]);we(()=>m(),[m]);const[D,b]=x.useState();we(()=>{l&&b(window.getComputedStyle(l).zIndex)},[l]);const E=x.useCallback(w=>{w&&C.current===!0&&(m(),p==null||p(),C.current=!1)},[m,p]);return h.jsx(Bb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:h.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:h.jsx(se.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});vu.displayName=zb;var Wb="SelectPopperPosition",Ho=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=je,...s}=e,i=qr(n);return h.jsx(kr,{...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)"}})});Ho.displayName=Wb;var[Bb,Ws]=Jt(Mt,{}),Vo="SelectViewport",yu=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=St(Vo,n),i=Ws(Vo,n),a=le(t,s.onViewportChange),c=x.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(Kr.Slot,{scope:n,children:h.jsx(se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ee(o.onScroll,l=>{const d=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&u){const g=Math.abs(c.current-d.scrollTop);if(g>0){const C=window.innerHeight-je*2,v=parseFloat(u.style.minHeight),S=parseFloat(u.style.height),y=Math.max(v,S);if(y<C){const p=y+g,m=Math.min(C,p),D=p-m;u.style.height=m+"px",u.style.bottom==="0px"&&(d.scrollTop=D>0?D:0,u.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});yu.displayName=Vo;var bu="SelectGroup",[Hb,Vb]=Jt(bu),Ub=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ht();return h.jsx(Hb,{scope:n,id:o,children:h.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ub.displayName=bu;var wu="SelectLabel",Yb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Vb(wu,n);return h.jsx(se.div,{id:o.id,...r,ref:t})});Yb.displayName=wu;var xr="SelectItem",[Kb,xu]=Jt(xr),Su=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=xt(xr,n),c=St(xr,n),l=a.value===r,[d,u]=x.useState(s??""),[f,g]=x.useState(!1),C=le(t,p=>{var m;return(m=c.itemRefCallback)==null?void 0:m.call(c,p,r,o)}),v=ht(),S=x.useRef("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(Kb,{scope:n,value:r,disabled:o,textId:v,isSelected:l,onItemTextChange:x.useCallback(p=>{u(m=>m||((p==null?void 0:p.textContent)??"").trim())},[]),children:h.jsx(Kr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:h.jsx(se.div,{role:"option","aria-labelledby":v,"data-highlighted":f?"":void 0,"aria-selected":l&&f,"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,()=>g(!0)),onBlur:ee(i.onBlur,()=>g(!1)),onClick:ee(i.onClick,()=>{S.current!=="mouse"&&y()}),onPointerUp:ee(i.onPointerUp,()=>{S.current==="mouse"&&y()}),onPointerDown:ee(i.onPointerDown,p=>{S.current=p.pointerType}),onPointerMove:ee(i.onPointerMove,p=>{var m;S.current=p.pointerType,o?(m=c.onItemLeave)==null||m.call(c):S.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,p=>{var m;p.currentTarget===document.activeElement&&((m=c.onItemLeave)==null||m.call(c))}),onKeyDown:ee(i.onKeyDown,p=>{var D;((D=c.searchRef)==null?void 0:D.current)!==""&&p.key===" "||(_b.includes(p.key)&&y(),p.key===" "&&p.preventDefault())})})})})});Su.displayName=xr;var dn="SelectItemText",Cu=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=xt(dn,n),a=St(dn,n),c=xu(dn,n),l=jb(dn,n),[d,u]=x.useState(null),f=le(t,y=>u(y),c.onItemTextChange,y=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,y,c.value,c.disabled)}),g=d==null?void 0:d.textContent,C=x.useMemo(()=>h.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:S}=l;return we(()=>(v(C),()=>S(C)),[v,S,C]),h.jsxs(h.Fragment,{children:[h.jsx(se.span,{id:c.textId,...s,ref:f}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ve.createPortal(s.children,i.valueNode):null]})});Cu.displayName=dn;var Du="SelectItemIndicator",Eu=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return xu(Du,n).isSelected?h.jsx(se.span,{"aria-hidden":!0,...r,ref:t}):null});Eu.displayName=Du;var Uo="SelectScrollUpButton",Ru=x.forwardRef((e,t)=>{const n=St(Uo,e.__scopeSelect),r=Ws(Uo,e.__scopeSelect),[o,s]=x.useState(!1),i=le(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?h.jsx(Mu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Ru.displayName=Uo;var Yo="SelectScrollDownButton",Tu=x.forwardRef((e,t)=>{const n=St(Yo,e.__scopeSelect),r=Ws(Yo,e.__scopeSelect),[o,s]=x.useState(!1),i=le(t,r.onScrollButtonChange);return we(()=>{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?h.jsx(Mu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Tu.displayName=Yo;var Mu=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=St("SelectScrollButton",n),i=x.useRef(null),a=Gr(n),c=x.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return x.useEffect(()=>()=>c(),[c]),we(()=>{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]),h.jsx(se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ee(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ee(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ee(o.onPointerLeave,()=>{c()})})}),Gb="SelectSeparator",qb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});qb.displayName=Gb;var Ko="SelectArrow",Xb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qr(n),s=xt(Ko,n),i=St(Ko,n);return s.open&&i.position==="popper"?h.jsx(Ir,{...o,...r,ref:t}):null});Xb.displayName=Ko;function Ou(e){return e===""||e===void 0}var Pu=x.forwardRef((e,t)=>{const{value:n,...r}=e,o=x.useRef(null),s=le(t,o),i=Pb(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]),h.jsx(ys,{asChild:!0,children:h.jsx("select",{...r,ref:s,defaultValue:n})})});Pu.displayName="BubbleSelect";function Au(e){const t=Ie(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 _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=Zb(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 Zb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Jb=au,Qb=lu,ew=du,tw=fu,nw=pu,rw=hu,ow=yu,sw=Su,iw=Cu,aw=Eu,cw=Ru,lw=Tu;function uw({...e}){return h.jsx(Jb,{"data-slot":"select",...e})}function dw({...e}){return h.jsx(ew,{"data-slot":"select-value",...e})}function fw({className:e,size:t="default",children:n,...r}){return h.jsxs(Qb,{"data-slot":"select-trigger","data-size":t,className:ne("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,h.jsx(tw,{asChild:!0,children:h.jsx(ic,{className:"size-4 opacity-50"})})]})}function pw({className:e,children:t,position:n="popper",...r}){return h.jsx(nw,{children:h.jsxs(rw,{"data-slot":"select-content",className:ne("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[h.jsx(gw,{}),h.jsx(ow,{className:ne("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),h.jsx(mw,{})]})})}function hw({className:e,children:t,...n}){return h.jsxs(sw,{"data-slot":"select-item",className:ne("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[h.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:h.jsx(aw,{children:h.jsx(sc,{className:"size-4"})})}),h.jsx(iw,{children:t})]})}function gw({className:e,...t}){return h.jsx(cw,{"data-slot":"select-scroll-up-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(Qp,{className:"size-4"})})}function mw({className:e,...t}){return h.jsx(lw,{"data-slot":"select-scroll-down-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(ic,{className:"size-4"})})}const vw=({options:e,onChange:t})=>h.jsxs(uw,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[h.jsx(fw,{className:"w-[180px]",children:h.jsx(dw,{placeholder:"view"})}),h.jsx(pw,{children:e.map(n=>h.jsx(hw,{value:n.text,children:n.text},n.text))})]}),Nu=({side:e,booking:t,onOpenChange:n})=>{const[r]=R.useState(70),[o]=R.useState(-150),[s,i]=R.useState({x:0,y:0}),a=Nn(),{attributes:c,listeners:l,setNodeRef:d,transform:u,setActivatorNodeRef:f}=ss({id:"booking-info-id",data:{type:"booking-info-options"}}),g={transform:`translate3d(${s.x+((u==null?void 0:u.x)||0)}px, ${s.y+((u==null?void 0:u.y)||0)}px, 0)`},C=R.useMemo(()=>[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],[]),v=R.useMemo(()=>`${te.dateAndHourDateToString(t.startAt)} - ${te.dateAndHourDateToString(t.finishAt)}`,[t.startAt,t.finishAt]),S=R.useMemo(()=>{const m=new Date(t.startAt),D=m.getDate(),b=m.getDay(),E=Xe[m.getMonth()];return h.jsx("span",{children:`${kf[b]}, ${D} ${E}`})},[t.startAt]),y=()=>({backgroundColor:""}),p=async()=>{};return Rr({onDragStart(m){m.active.id&&a.updateIsDragging(!0)},onDragEnd(m){if(m.active.id){const{y:D,x:b}=s;i({x:b+((u==null?void 0:u.x)||0),y:D+((u==null?void 0:u.y)||0)}),a.updateIsDragging(!1)}}}),h.jsxs(Tb,{open:!0,onOpenChange:n,children:[h.jsx(Mb,{}),h.jsx(Ob,{ref:d,updatePositionStrategy:"optimized",className:"w-[25rem]",side:e,align:"start",sticky:"always",sideOffset:r,alignOffset:o,style:g,children:h.jsxs("div",{className:"grid gap-3",children:[h.jsx("input",{type:"text",style:{position:"absolute",opacity:0,height:0,width:0}}),h.jsxs("div",{className:"flex justify-end gap-1",children:[h.jsx("div",{ref:f,className:"w-full cursor-move",...c,...l}),h.jsx(pb,{}),h.jsx(Wt,{type:"button",variant:"outline",size:"icon",children:h.jsx(ah,{className:"h-3 w-3"})}),h.jsx(Wt,{type:"button",variant:"outline",size:"icon",onClick:p,children:h.jsx(dh,{className:"h-3 w-3"})}),h.jsx(vw,{options:C,onChange:()=>{}})]}),h.jsxs("div",{className:"mb-1 grid grid-cols-[25px_1fr] items-start pb-1 last:mb-0 last:pb-0",children:[h.jsx("div",{children:h.jsx("span",{style:y(),className:"flex h-4 w-4 translate-y-0 rounded-sm"})}),h.jsx("div",{className:"space-y-1",children:h.jsxs("p",{className:"text-sm text-muted-foreground",children:[S," | ",v]})})]})]})})]})};Nu.displayName="BookingInfoOptions";function yw(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 bw=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:yw(t,n,r)},ww=({bookingInit:e,slotData:t,heightStyle:n})=>h.jsx(Df,{modifiers:[bw],dropAnimation:{duration:2e3,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:ne("w-full",wr.Draggable,wr.dragging),children:h.jsx("div",{className:ne("text-white w-full absolute z-10 border rounded-sm overflow-hidden"),style:{height:n},children:h.jsx(Bo,{booking:e,slotData:t})})}),ma=600,xw=15,Sw=({booking:e,slotData:t,ref:n})=>{const{bookingViewType:r,optimisticCardUpdate:o}=Ae(),[s,i]=R.useState({...e}),[a,c]=R.useState(!1),[l,d]=R.useState(0),[u,f]=R.useState(!1),g=R.useRef("left"),C=()=>{const k=t.day.split(":")[0].trim();if(r===ce.DAY)g.current="top";else switch(k){case"Mon":case"Sun":g.current="right";break;default:g.current="left";break}f(!0)},{attributes:v,listeners:S,setNodeRef:y,isDragging:p,transform:m}=ss({id:s.id,data:{type:"booking-slots",booking:s,slotData:t}}),D=m?{transform:`translate3d(${m.x}px, ${m.y}px, 0)`}:void 0,b=R.useCallback(k=>{c(!0);const{constraint:_}=k;"delay"in _&&d(_.delay)},[]),E=R.useCallback(()=>{c(!1)},[]);Rr({onDragPending:k=>b(k),onDragAbort:()=>E(),onDragCancel:()=>E(),onDragEnd:()=>E()});const w=a?{animationDuration:`${l}ms`}:{},T=async k=>{try{i(_=>({..._,finishAt:k}))}catch(_){console.log(_)}},A=async k=>{o(s,k,s.finishAt,t),i(_=>({..._,startAt:k}))},I=async k=>{try{i(_=>({..._,finishAt:k}))}catch(_){console.log(_)}},{state:j,heightStyle:B,onResize:H}=Bs({booking:s,onAddTime:T,onAddStartTime:A,onSubTime:I,starter:!0});return R.useImperativeHandle(n,()=>({bookingId:e.id}),[e.id]),h.jsxs(h.Fragment,{children:[p?h.jsxs(h.Fragment,{children:[h.jsx(ww,{bookingInit:e,slotData:t,heightStyle:`${B}rem`}),h.jsx("div",{className:"w-full h-[2rem] z-100 relative",children:h.jsx(br,{bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${B}rem`})})]}):h.jsx(br,{ref:y,resizableParam:{state:j,onResize:H,resizeHandle:["s"]},customClasses:`bg-black ${wr.Draggable} ${a&&wr.pendingDelay}`,bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${B}rem`,onClick:C,pendingStyle:w,style:D,listeners:S,attributes:v}),u&&h.jsx(os,{children:h.jsx(Nu,{booking:s,onOpenChange:f,side:g.current})})]})},Cw=.2,Bs=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=R.useState({height:ma,width:600}),[a,c]=R.useState(o?Math.round(te.timeDiffInSeconds(e.finishAt,e.startAt)/7.5):2),l=m=>m%8===0,d=m=>m>=18,u=m=>{const D=m>=8&&m<=10,b=m%2===0;return D&&l(m)&&b},f=async(m=["se","s"])=>{if(m.includes("n")){const D=C(e.startAt,"remove");n&&n(D)}else{const D=C(e.finishAt,"add");c(b=>{const E=Math.round(b)+2;return u(E)||d(E)?E+Cw:E}),t&&t(D)}},g=async()=>{const m=C(e.finishAt,"remove");te.timeDiffInSeconds(e.finishAt,e.startAt)!==xw&&(c(b=>(b>10,b-2)),r&&r(m))},C=(m,D)=>{const b=new Date(m),E=b.getMinutes();return D==="add"&&b.setMinutes(E+15),D==="remove"&&b.setMinutes(E-15),b};return{state:s,setState:i,resetState:()=>{i({height:ma,width:600})},resetHeightStyle:()=>{c(2)},heightStyle:a,onResize:(m,{size:D,handle:b})=>{switch(m.stopPropagation(),m.preventDefault(),b){case"se":case"s":{i(E=>(Number(E.height)<Number(D.height)&&f(),Number(E.height)>Number(D.height)&&g(),{...E,height:D.height,width:D.width}));break}case"n":{i(E=>(Number(D.height)>Number(E.height)&&f(["n"]),{...E,height:D.height,width:D.width}));break}}},updateHeightStyle:(m,D)=>{c(te.timeDiffInSeconds(m,D)/7.3)}}},Dw=({slotData:e,events:{onClick:t,renderPreviewCard:n,resetPrevView:r}})=>{const{startAt:o}=Ka(_=>_),[s,i]=R.useState(0),[a,c]=R.useState(te.addMinutesToHour(e.time,15)),[l,d]=R.useState(!1),u=R.useRef(null);R.useEffect(()=>{s!==0&&s>20&&(d(!0),n())},[s,n]);const f=R.useMemo(()=>te.convertStringTimeToDateFormat(o),[o]),g=R.useMemo(()=>te.convertStringTimeToDateFormat(a),[a]),C=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:f,finishAt:g,createdAt:new Date,updatedAt:new Date}),[g,f]),v=()=>{u.current||(u.current=setInterval(()=>{i(_=>_+1)},10))},S=R.useCallback(()=>{u.current&&(i(0),clearInterval(u.current),u.current=null)},[]),y=()=>{s<20?(t(),S(),B()):(S(),t(a),B())},p=async _=>{c(te.dateTimeAsString(_))},m=async _=>{c(te.dateTimeAsString(_))},{state:D,resetState:b,resetHeightStyle:E,heightStyle:w,onResize:T,updateHeightStyle:A}=Bs({booking:C,onAddTime:p,onSubTime:m});R.useEffect(()=>{A(g,f)},[g,f,A]);const I=()=>{B()},j=R.useCallback(()=>{c(te.addMinutesToHour(e.time,15))},[e.time]),B=R.useCallback(()=>{d(!1),b(),j(),E(),r()},[j,E,r,b]);R.useEffect(()=>()=>{S(),B()},[]);const H=Ae(_=>_.bookingViewType),k=l?"bg-white border-none":"";return h.jsx("div",{className:ne("w-full bg-red-300 h-full z-[-1] content-center border-solid border-[1px] border-black rounded-sm cursor-default",k),children:h.jsx(Gl.Resizable,{className:"slot-resizable ",height:D.height,width:D.width,onResizeStart:v,onResizeStop:y,onResize:T,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:l?h.jsx("div",{style:{height:"100%",alignContent:"center"},children:h.jsx(br,{customClasses:"dragging-effect",bookingInit:C,bookingViewType:H,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${w}rem`,resizableParam:{state:D,onResize:T,customClass:"show-handle"},events:{onUnmount:I}})}):h.jsx("div",{className:"rounded-sm w-full h-full content-center relative",children:h.jsx("span",{className:"absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]",children:e.time})})})})},Jn=({slotData:e,slotPosition:t,disabledCss:n,events:r,border:o,actualTimerIndicatorChildren:s,children:i,ref:a})=>{const{updateIsDelayActive:c,isDragging:l,updateIsDragging:d}=Nn(z=>z),{emptySlotNodes:u,setSelectedNode:f}=Bt(),{onModalClose:g,onSlotClick:C}=Et(),{finishAt:v,startAt:S,updateStartAt:y,updateFinishAt:p,updateDate:m}=Ka(z=>z),D=Ae(z=>z.bookingViewType),b=R.useMemo(()=>te.convertStringTimeToDateFormat(S),[S]),E=R.useMemo(()=>te.convertStringTimeToDateFormat(v),[v]),w=R.useMemo(()=>{const z=te.convertStringTimeToDateFormat(v);return{id:"3",startAt:te.convertStringTimeToDateFormat(S),finishAt:z}},[v,S]),{updateHeightStyle:T,heightStyle:A}=Bs({booking:w}),[I,j]=R.useState(!1),[B,H]=R.useState(!1),[k,_]=R.useState(!1),[O,L]=R.useState(!1),P=R.useRef(null);R.useEffect(()=>{T(E,b)},[E,b,T]);const N=R.useCallback(()=>{if(l||B)return;r.onMouseEnterEvent()===t&&_(!0)},[t,r,l,B]),M=z=>{d(!1),c(!0);const X=fr(e),F=u==null?void 0:u.get(X);F&&F.closeEvent(),g==null||g(),z.stopPropagation(),z.preventDefault(),H(!1)},$=z=>{c(!0),j(z),_(z),H(z)},V=R.useCallback((z,X=15)=>{const F=te.addMinutesToHour(z,X);p(F)},[p]),Y=R.useCallback(z=>{if(l&&!z)return;d(!1);const{time:X,key:F}=e;C({time:X,key:F});const oe=fr({key:F,time:X}),de=u==null?void 0:u.get(oe);f(oe),de&&de.showEvent(),m(F),y(X),V(z||X,z?0:15),H(!0)},[e,m,y,V,u,l,f,d,C]),U=()=>{l||B||_(!1)},Z=n.length||O?n:"hover:bg-white-50",K=o?"border-b border-solid":"",W=R.useCallback(()=>{const{time:z,key:X}=e;d(!0),L(!0),m(X),y(z),V(z)},[V,e,m,d,y]),G=()=>{H(!0)};R.useEffect(()=>{I&&P!=null&&P.current&&P.current.scrollIntoView({behavior:"smooth",block:"center"})},[I]),R.useEffect(()=>{i||_(!1)},[i]),R.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=R.useCallback(()=>{L(!1)},[]);return h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:e.ref,style:e.style,className:ne("w-[100%] min-w-32 h-[2rem] relative",K,Z),onMouseOver:N,onMouseLeave:U,onFocus:()=>{},children:[s,(!i&&k&&!I||O)&&h.jsx(Dw,{slotData:e,events:{onClick:Y,openOptions:G,renderPreviewCard:W,resetPrevView:q}}),I&&h.jsx("div",{className:"w-full",children:h.jsx(br,{ref:P,bookingInit:w,bookingViewType:D,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${A}rem`})}),i]},e.key),B&&h.jsx(os,{children:h.jsx(sb,{onClose:M,onOpenChange:$,buttonTrigger:h.jsx("div",{},e.key)})})]})};var Ew="Separator",va="horizontal",Rw=["horizontal","vertical"],ku=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=va,...o}=e,s=Tw(r)?r:va,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return h.jsx(se.div,{"data-orientation":s,...a,...o,ref:t})});ku.displayName=Ew;function Tw(e){return Rw.includes(e)}var Mw=ku;function So({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return h.jsx(Mw,{"data-slot":"separator-root",decorative:n,orientation:t,className:ne("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(){at(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)});at(this,"toggleTimeVisibility",(t,n,r,o)=>{const s=o.get(t);s&&this.isSameHour(n,t)&&(this.isInitialMinute(r)?s.setDisabledHour():s.setActivateHour())});at(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);at(this,"isInitialMinute",t=>t>=0&&t<=8);at(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class Pw{constructor(){at(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});at(this,"normalizeDateNow",t=>{const n=t.getHours(),r=te.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const Qn=({tailwindColor:e,isFirstDay:t,slotData:n})=>{const{timesRendered:r,bookingViewType:o}=Ae(),[s,i]=R.useState(!1),[a,c]=R.useState(""),l=R.useMemo(()=>{const S=new Date().getDay();return new Date(n.key).getDay()===S},[n.key]);R.useEffect(()=>{const v=n.time,S=new Pw,y=()=>{const m=new Date,D=S.normalizeDateNow(m),b=te.dateAndHourDateToString(m);c(b),i(D===v)};let p;return S.is15MinLess(v)||(p=setInterval(()=>y(),1e3)),()=>clearInterval(p)},[n.time]);const d=R.useMemo(()=>new Ow().positionBasedOnSeconds(n.time,a,r),[n.time,a,r]),u=R.useMemo(()=>t?o==="DAY"?"w-[101%]":"w-[100vw]":o==="DAY"?"w-[102%]":"w-[104%]",[t,o]);return s?h.jsx(h.Fragment,{children:l?h.jsx("div",{style:{top:`${d-2}px`},className:ne("absolute right-0 z-100",t?"left-[-18px] w-[102%]":"w-[104%] left-[-3px]",u),children:h.jsxs("div",{className:"relative",children:[h.jsx(So,{style:{height:"4px"},className:e}),t&&h.jsx("div",{className:"absolute left-0 top-[-3px] cursor-pointer",children:h.jsx(So,{orientation:"vertical",style:{height:"11px"},className:e})}),h.jsx(ya,{isRendered:t,dateToRender:a})]})}):h.jsxs("div",{style:{top:`${d-1}px`},className:ne("absolute right-0 z-100",t?"left-[-18px]":"left-[-9px]",u),children:[h.jsx(So,{style:{height:"2px"},className:e}),h.jsx(ya,{isRendered:t,dateToRender:a})]})}):void 0},ya=({isRendered:e,dateToRender:t})=>{const n=e&&t;return h.jsx(h.Fragment,{children:n&&h.jsx("div",{className:"absolute left-[-42px] top-[-8px] z-50",children:h.jsx("span",{children:h.jsx("strong",{children:t})})})})},ba=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=Bt(),d=er({bookings:e,blockTimeString:"00",slotData:a}),u=er({bookings:e,blockTimeString:"15",slotData:a}),f=er({bookings:e,blockTimeString:"30",slotData:a}),g=er({bookings:e,blockTimeString:"45",slotData:a}),C=R.useCallback((v,S)=>{if(!v)return;const y=fr(S);l.get(y)||c(v,S)},[c,l]);return h.jsxs(h.Fragment,{children:[h.jsx(Jn,{ref:v=>C(v,{key:t.key,time:t.time}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",actualTimerIndicatorChildren:h.jsx(Qn,{tailwindColor:"bg-black",isFirstDay:i,slotData:t}),children:d}),h.jsx(Jn,{ref:v=>C(v,{key:n.key,time:n.time}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},border:!0,slotPosition:"second",actualTimerIndicatorChildren:h.jsx(Qn,{tailwindColor:"bg-black",isFirstDay:i,slotData:n}),children:u}),h.jsx(Jn,{ref:v=>C(v,{key:r.key,time:r.time}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",actualTimerIndicatorChildren:h.jsx(Qn,{tailwindColor:"bg-black",isFirstDay:i,slotData:r}),children:f}),h.jsx(Jn,{ref:v=>C(v,{key:o.key,time:o.time}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",actualTimerIndicatorChildren:h.jsx(Qn,{tailwindColor:"bg-black",isFirstDay:i,slotData:o}),children:g})]})},er=({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 h.jsx(Sw,{booking:r,slotData:n})}return null},[t,e,n]),Aw=({dayHour:e,lunchTimeBlock:t,firstDay:n,bookingBulk:r,bookingViewType:o})=>{const s=Nn(T=>T.isDragging),i=R.useRef(""),a=T=>T===t.startAt||T===t.finishAt?(i.current="bg-gray-200 border-none",!0):!1,c=te.addMinuteToHour(e.hour,15),l=te.addMinuteToHour(e.hour,30),d=te.addMinuteToHour(e.hour,45),{isOver:u,setNodeRef:f}=zn({id:`${te.newDateKey(e.day,e.hour)}`,data:{accepts:["booking-slots"]},disabled:a(e.hour)||s}),{isOver:g,setNodeRef:C}=zn({id:`${te.newDateKey(e.day,c)}`,data:{accepts:["booking-slots"]},disabled:a(c)||s}),{isOver:v,setNodeRef:S}=zn({id:`${te.newDateKey(e.day,l)}`,data:{accepts:["booking-slots"]},disabled:a(l)||s}),{isOver:y,setNodeRef:p}=zn({id:`${te.newDateKey(e.day,d)}`,data:{accepts:["booking-slots"]},disabled:a(d)||s}),m=R.useMemo(()=>({ref:f,style:{backgroundColor:u?"#0066ff":""},key:te.newDateKey(e.day,e.hour),time:e.hour}),[e.day,e.hour,u,f]),D=R.useMemo(()=>({ref:C,style:{backgroundColor:g?"#0066ff":""},key:te.newDateKey(e.day,c),time:c}),[e.day,g,c,C]),b=R.useMemo(()=>({ref:S,style:{backgroundColor:v?"#0066ff":""},key:te.newDateKey(e.day,l),time:l}),[e.day,v,S,l]),E=R.useMemo(()=>({ref:p,style:{backgroundColor:y?"#0066ff":""},key:te.newDateKey(e.day,d),time:d}),[e.day,d,y,p]),w=R.useMemo(()=>{const{day:T,hour:A}=e,I=r.filter(j=>{const B=te.dateAndHourDateToString(j.startAt),H=new Date(j.startAt).getDate(),k=new Date(T).getDate(),_=A.split(":")[0];return B.split(":")[0]===_&&H===k});return I.length?h.jsx(ba,{dayHour:e,bookings:I,first:m,second:D,third:b,fourth:E,disabledCss:i.current,firstDay:n}):h.jsx(ba,{first:m,second:D,third:b,fourth:E,disabledCss:i.current,firstDay:n})},[r,e,n,m,E,D,b]);return h.jsx("td",{className:ne("bg-white border border-gray-300 min-w-[8rem] w-[80rem] p-0 relative z-[0px]",o===ce.WEEK&&"max-w-[12rem] min-w-[5rem]"),children:w},`${e.day}-${e.hour}-slot`)};function _w({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"relative w-full z-10 overflow-hidden",children:h.jsx("table",{"data-slot":"table",className:ne("w-full caption-bottom text-sm",e),...t})})}function Nw({className:e,...t}){return h.jsx("td",{"data-slot":"table-cell",className:ne("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const kw=({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",ne("activateVisibilityTime",a))};return R.useImperativeHandle(t,()=>({setDisabledHour:i,setActivateHour:c})),h.jsxs(ks,{children:[h.jsx(Is,{children:h.jsx("span",{ref:s,className:ne(a),children:e})}),h.jsxs(js,{children:[h.jsx(Ny,{children:o}),h.jsx(ky,{}),h.jsx(Hi,{children:n}),h.jsx(Hi,{children:r})]})]})},Iw=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=Ae(),{selectedNode:s,emptySlotNodes:i}=Bt(),[a]=R.useState({startAt:"12:00",finishAt:"12:30"}),c=R.useCallback((f,g)=>{f&&o(f,g)},[o]),l=R.useMemo(()=>n===ce.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),d=R.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]);return R.useEffect(()=>{if(s){const f=i.get(s);f&&f.showEvent()}},[s,i]),R.useMemo(()=>{const f=g=>g===0;return h.jsx("div",{className:ne("h-[75vh] overflow-auto",n===ce.WEEK&&"w-max"),children:h.jsx(_w,{children:e.map(g=>h.jsxs("tr",{children:[h.jsx(Nw,{style:{...d,...l,padding:0,position:"relative"},className:"border border-gray-300 py-2 px-4 text-center w-3 min-w-16",children:h.jsx("div",{className:"absolute top-[-3px] left-0 right-5 bg-white text-end",children:h.jsx(kw,{ref:C=>c(C,g),hour:g})})},`${g}-hour`),t.map((C,v)=>h.jsx(Aw,{dayHour:{day:String(C),hour:g},lunchTimeBlock:a,firstDay:f(v),bookingBulk:r.booking,bookingViewType:n},`${C}-${g}-slot-content`))]},`${g}-content`))})})},[l,e,a,d,r,c,n,t])},jw=({bookingViewType:e})=>R.useMemo(()=>{switch(e){case ce.DAY:case ce.WEEK:return h.jsx(Iw,{});default:return null}},[e]),Lw=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Gu(t)),h.jsx(Vf,{value:n.current,children:e})},$w=({children:e,...t})=>h.jsx(lc,{value:{...t},children:e}),Iu={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},Fw=e=>Sr(t=>({...e,...Iu,updateMonthMessage:n=>{t(r=>({...r,...n}))}})),zw=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Fw(t)),h.jsx(Ua,{value:n.current,children:e})},Ww={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},Bw=()=>{const{isDelayActive:e}=Nn(v=>v),{bookings:t}=Et(),n=R.useMemo(()=>({delay:e?500:0,tolerance:100}),[e]),{setBookingBulkData:r,optimisticCardUpdate:o}=Ae(),{onCardDropCallback:s}=Et();R.useEffect(()=>{r({user:Ww,booking:t})},[t,r]);const i=dd(ti(La,{activationConstraint:n}),ti($a,{activationConstraint:n})),{bookingViewType:a,daysOfWeek:c}=Ae(),l=R.useCallback(v=>{const{active:S}=v;S.id},[]),d=(v,S)=>{const y=Number(new Date(S))-Number(new Date(v)),p=Math.floor(y/1e3/60),m=Math.floor(p/60),D=p%60;return`${m}:${D.toString().padStart(2,"0")}`},u=(v,S)=>{const y=new Date(v),p=S.split(":"),m=Number(p[0]),D=Number(p[1]);return y.setHours(y.getHours()+m),y.setMinutes(y.getMinutes()+D),y},f=(v,S)=>{const y=new Date(S),p=d(v.startAt,v.finishAt),m=u(S,p);return{newStartAt:y,newFinishDate:m}},g=async(v,S,y)=>{try{const{newStartAt:p,newFinishDate:m}=f(v,S);o(v,p,m,y),await s(v,S,y)}catch(p){console.warn(p)}},C=v=>{const{over:S,active:y}=v;if(S&&y){const p=S.data.current,m=y.data.current;m&&p&&p.accepts.includes(m.type)&&m.booking.id&&S.id&&g(m.booking,String(S.id),m.slotData)}};return h.jsx("div",{className:"z-[100] max-w-[1410px]",children:h.jsx(zw,{...Iu,children:h.jsxs("div",{className:"w-full h-full z-[100]",children:[h.jsx(Fy,{}),h.jsxs("div",{className:"flex flex-col z-[100] overflow-auto",children:[h.jsx(jp,{daysOfWeek:c,bookingViewType:a}),h.jsx(os,{onDragEnd:C,onDragStart:l,sensors:i,children:h.jsx(jw,{bookingViewType:a})})]})]})})})},Hw=({viewModes:e,createBookingModal:t,onChangeViewType:n,onCardDropCallback:r,onDayChange:o,onTodayClick:s,onSlotClick:i,onModalClose:a,bookings:c,ref:l})=>(R.useImperativeHandle(l,()=>({getStatus:()=>!0})),h.jsx(Lw,{...wa,children:h.jsx($w,{createBookingModal:t,viewModes:e,onChangeViewType:n,onTodayClick:s,onCardDropCallback:r,onDayChange:o,onSlotClick:i,onModalClose:a,bookings:c,children:h.jsx(Yf,{...Mo,children:h.jsx(Bw,{})})})})),Vw=e=>{console.log("creating a calendar instance");const t=R.useRef(null);return{getCalendar:()=>h.jsx(Hw,{ref:t,...e})}};exports.useCalendarInstance=Vw;
158
+ */var ho,Bi;function Iy(){if(Bi)return ho;Bi=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 ho=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},ho}var go,Hi;function _s(){if(Hi)return go;Hi=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return go=e,go}var mo,Vi;function Il(){return Vi||(Vi=1,mo=Function.call.bind(Object.prototype.hasOwnProperty)),mo}var vo,Yi;function jy(){if(Yi)return vo;Yi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=_s(),n={},r=Il();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var d in s)if(r(s,d)){var u;try{if(typeof s[d]!="function"){var v=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}u=s[d](i,d,c,a,null,t)}catch(C){u=C}if(u&&!(u instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var b=l?l():"";e("Failed "+a+" type: "+u.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vo=o,vo}var yo,Ui;function $y(){if(Ui)return yo;Ui=1;var e=_l(),t=Iy(),n=_s(),r=Il(),o=jy(),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 yo=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:D(),elementType:y(),instanceOf:E,node:I(),objectOf:R,oneOf:w,oneOfType:A,shape:B,exact:H};function C(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 oe=G+":"+W;!L[oe]&&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[oe]=!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 D(){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(C(W,T[G]))return null;var q=JSON.stringify(T,function(X,F){var oe=$(F);return oe==="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 oe=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+W+" `"+G+"` supplied to "+("`"+K+"`"+oe+"."))}return S(U)}function I(){function T(L,V,U,Y,Z){return _(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 _(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(_);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(!_(U.value))return!1}else for(;!(U=V.next()).done;){var Y=U.value;if(Y&&!_(Y[1]))return!1}}else return!1;return!0;default:return!1}}function N(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":N(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},yo}var bo,Ki;function Ly(){if(Ki)return bo;Ki=1;var e=_s();function t(){}function n(){}return n.resetWarningCache=t,bo=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},bo}var Gi;function Hr(){if(Gi)return Yn.exports;if(Gi=1,process.env.NODE_ENV!=="production"){var e=_l(),t=!0;Yn.exports=$y()(e.isElement,t)}else Yn.exports=Ly()();return Yn.exports}function jl(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=jl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function qi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=jl(e))&&(r&&(r+=" "),r+=t);return r}const Fy=Object.freeze(Object.defineProperty({__proto__:null,clsx:qi,default:qi},Symbol.toStringTag,{value:"Module"})),zy=xf(Fy);var fe={},at={},Xi;function Vr(){if(Xi)return at;Xi=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={},Zi;function Wy(){if(Zi)return ct;Zi=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 Ji;function Is(){if(Ji)return fe;Ji=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=y,fe.addEvent=a,fe.addUserSelectStyles=h,fe.createCSSTransform=C,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=D;var e=Vr(),t=r(Wy());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 C(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),_="".concat(typeof R.y=="string"?R.y:R.y+A);B="translate(".concat(H,", ").concat(_,")")+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 D(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={},Qi;function $l(){if(Qi)return ze;Qi=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=Vr(),t=Is();function n(u,v,b){if(!u.props.bounds)return[v,b];let{bounds:C}=u.props;C=typeof C=="string"?C:l(C);const g=d(u);if(typeof C=="string"){const{ownerDocument:S}=g,m=S.defaultView;let f;if(C==="parent"?f=g.parentNode:f=S.querySelector(C),!(f instanceof m.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const h=f,D=m.getComputedStyle(g),y=m.getComputedStyle(h);C={left:-g.offsetLeft+(0,e.int)(y.paddingLeft)+(0,e.int)(D.marginLeft),top:-g.offsetTop+(0,e.int)(y.paddingTop)+(0,e.int)(D.marginTop),right:(0,t.innerWidth)(h)-(0,t.outerWidth)(g)-g.offsetLeft+(0,e.int)(y.paddingRight)-(0,e.int)(D.marginRight),bottom:(0,t.innerHeight)(h)-(0,t.outerHeight)(g)-g.offsetTop+(0,e.int)(y.paddingBottom)-(0,e.int)(D.marginBottom)}}return(0,e.isNum)(C.right)&&(v=Math.min(v,C.right)),(0,e.isNum)(C.bottom)&&(b=Math.min(b,C.bottom)),(0,e.isNum)(C.left)&&(v=Math.max(v,C.left)),(0,e.isNum)(C.top)&&(b=Math.max(b,C.top)),[v,b]}function r(u,v,b){const C=Math.round(v/u[0])*u[0],g=Math.round(b/u[1])*u[1];return[C,g]}function o(u){return u.props.axis==="both"||u.props.axis==="x"}function s(u){return u.props.axis==="both"||u.props.axis==="y"}function i(u,v,b){const C=typeof v=="number"?(0,t.getTouch)(u,v):null;if(typeof v=="number"&&!C)return null;const g=d(b),S=b.props.offsetParent||g.offsetParent||g.ownerDocument.body;return(0,t.offsetXYFromParent)(C||u,S,b.props.scale)}function a(u,v,b){const C=!(0,e.isNum)(u.lastX),g=d(u);return C?{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={},ea;function Ll(){if(ea)return Kn;ea=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.default=e;function e(){}return Kn}var ta;function By(){if(ta)return on;ta=1,Object.defineProperty(on,"__esModule",{value:!0}),on.default=void 0;var e=l(M),t=a(Hr()),n=a(Ue),r=Is(),o=$l(),s=Vr(),i=a(Ll());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={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in S)if(y!=="default"&&Object.prototype.hasOwnProperty.call(S,y)){var E=D?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 C=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 D=(0,r.getTouchIdentifier)(m);this.touchIdentifier=D;const y=(0,o.getControlPosition)(m,D,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,C.move,this.handleDrag),(0,r.addEvent)(h,C.stop,this.handleDragStop))}),d(this,"handleDrag",m=>{const f=(0,o.getControlPosition)(m,this.touchIdentifier,this);if(f==null)return;let{x:h,y:D}=f;if(Array.isArray(this.props.grid)){let w=h-this.lastX,R=D-this.lastY;if([w,R]=(0,o.snapToGrid)(this.props.grid,w,R),!w&&!R)return;h=this.lastX+w,D=this.lastY+R}const y=(0,o.createCoreData)(this,h,D);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=D}),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:D}=f;if(Array.isArray(this.props.grid)){let R=h-this.lastX||0,A=D-this.lastY||0;[R,A]=(0,o.snapToGrid)(this.props.grid,R,A),h=this.lastX+R,D=this.lastY+A}const y=(0,o.createCoreData)(this,h,D);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,C.move,this.handleDrag),(0,r.removeEvent)(w.ownerDocument,C.stop,this.handleDragStop))}),d(this,"onMouseDown",m=>(C=b.mouse,this.handleDragStart(m))),d(this,"onMouseUp",m=>(C=b.mouse,this.handleDragStop(m))),d(this,"onTouchStart",m=>(C=b.touch,this.handleDragStart(m))),d(this,"onTouchEnd",m=>(C=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 na;function Hy(){return na||(na=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(Hr()),r=d(Ue),o=d(zy),s=Is(),i=$l(),a=Vr(),c=d(By()),l=d(Ll());function d(f){return f&&f.__esModule?f:{default:f}}function u(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,D=new WeakMap;return(u=function(y){return y?D: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 D=u(h);if(D&&D.has(f))return D.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,D&&D.set(f,y),y}function b(){return b=Object.assign?Object.assign.bind():function(f){for(var h=1;h<arguments.length;h++){var D=arguments[h];for(var y in D)Object.prototype.hasOwnProperty.call(D,y)&&(f[y]=D[y])}return f},b.apply(this,arguments)}function C(f,h,D){return h=g(h),h in f?Object.defineProperty(f,h,{value:D,enumerable:!0,configurable:!0,writable:!0}):f[h]=D,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 D=f[Symbol.toPrimitive];if(D!==void 0){var y=D.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,D){let{position:y}=h,{prevPropsPosition:E}=D;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),C(this,"onDragStart",(D,y)=>{if((0,l.default)("Draggable: onDragStart: %j",y),this.props.onStart(D,(0,i.createDraggableData)(this,y))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(D,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(D,E)===!1)return!1;this.setState(w)}),C(this,"onDragStop",(D,y)=>{if(!this.state.dragging||this.props.onStop(D,(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,D;return(h=(D=this.props)===null||D===void 0||(D=D.nodeRef)===null||D===void 0?void 0:D.current)!==null&&h!==void 0?h:r.default.findDOMNode(this)}render(){const{axis:h,bounds:D,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?N=(0,s.createSVGTransform)(k,j):_=(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,..._},transform:N}))}}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})}(po)),po}var ra;function Fl(){if(ra)return rn.exports;ra=1;const{default:e,DraggableCore:t}=Hy();return rn.exports=e,rn.exports.default=e,rn.exports.DraggableCore=t,rn.exports}var Gn={},oa;function Vy(){if(oa)return Gn;oa=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={},sa;function zl(){if(sa)return sn;sa=1,sn.__esModule=!0,sn.resizableProps=void 0;var e=t(Hr());Fl();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 ia;function Wl(){if(ia)return nn;ia=1,nn.__esModule=!0,nn.default=void 0;var e=i(M),t=Fl(),n=Vy(),r=zl(),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 D={},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(D,E,w):D[E]=m[E]}return D.default=m,h&&h.set(m,D),D}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 D in h)Object.prototype.hasOwnProperty.call(h,D)&&(m[D]=h[D])}return m},a.apply(this,arguments)}function c(m,f){if(m==null)return{};var h={},D=Object.keys(m),y,E;for(E=0;E<D.length;E++)y=D[E],!(f.indexOf(y)>=0)&&(h[y]=m[y]);return h}function l(m,f){var h=Object.keys(m);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(m);f&&(D=D.filter(function(y){return Object.getOwnPropertyDescriptor(m,y).enumerable})),h.push.apply(h,D)}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(D){u(m,D,h[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(h)):l(Object(h)).forEach(function(D){Object.defineProperty(m,D,Object.getOwnPropertyDescriptor(h,D))})}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 D=h.call(m,f);if(typeof D!="object")return D;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,g(m,f)}function g(m,f){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,y){return D.__proto__=y,D},g(m,f)}var S=function(m){C(f,m);function f(){for(var D,y=arguments.length,E=new Array(y),w=0;w<y;w++)E[w]=arguments[w];return D=m.call.apply(m,[this].concat(E))||this,D.handleRefs={},D.lastHandleRect=null,D.slack=null,D}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 _=y,N=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=[$+(_-y),P+(N-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",_=(w.props.axis==="both"||w.props.axis==="y")&&E!=="e"&&E!=="w";if(!(!H&&!_)){var N=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==="n"){var k=$.top-w.lastHandleRect.top;B+=k}}w.lastHandleRect=$,O==="w"&&(j=-j),N==="n"&&(B=-B);var T=w.props.width+(H?j/w.props.transformScale:0),L=w.props.height+(_?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,_=(H=y.handleRefs[B])!=null?H:y.handleRefs[B]=e.createRef();return e.createElement(t.DraggableCore,a({},A,{nodeRef:_,key:"resizableHandle-"+B,onStop:y.resizeHandler("onResizeStop",B),onStart:y.resizeHandler("onResizeStart",B),onDrag:y.resizeHandler("onResize",B)}),y.renderResizeHandle(B,_))}))}))},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={},aa;function Yy(){if(aa)return an;aa=1,an.__esModule=!0,an.default=void 0;var e=a(M),t=s(Hr()),n=s(Wl()),r=zl(),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,D=new WeakMap;return(i=function(E){return E?D: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 D=i(h);if(D&&D.has(f))return D.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,D&&D.set(f,y),y}function c(){return c=Object.assign?Object.assign.bind():function(f){for(var h=1;h<arguments.length;h++){var D=arguments[h];for(var y in D)Object.prototype.hasOwnProperty.call(D,y)&&(f[y]=D[y])}return f},c.apply(this,arguments)}function l(f,h){var D=Object.keys(f);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(f);h&&(y=y.filter(function(E){return Object.getOwnPropertyDescriptor(f,E).enumerable})),D.push.apply(D,y)}return D}function d(f){for(var h=1;h<arguments.length;h++){var D=arguments[h]!=null?arguments[h]:{};h%2?l(Object(D),!0).forEach(function(y){u(f,y,D[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(D)):l(Object(D)).forEach(function(y){Object.defineProperty(f,y,Object.getOwnPropertyDescriptor(D,y))})}return f}function u(f,h,D){return h=v(h),h in f?Object.defineProperty(f,h,{value:D,enumerable:!0,configurable:!0,writable:!0}):f[h]=D,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 D=f[Symbol.toPrimitive];if(D!==void 0){var y=D.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 C(f,h){if(f==null)return{};var D={},y=Object.keys(f),E,w;for(w=0;w<y.length;w++)E=y[w],!(h.indexOf(E)>=0)&&(D[E]=f[E]);return D}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 D=h.prototype;return D.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,_=E.lockAspectRatio,N=E.axis;E.width,E.height;var O=E.resizeHandles,$=E.style,P=E.transformScale,k=C(E,o);return e.createElement(n.default,{axis:N,draggableOpts:j,handle:w,handleSize:R,height:this.state.height,lockAspectRatio:_,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 ca;function Uy(){return ca||(ca=1,tn.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},tn.exports.Resizable=Wl().default,tn.exports.ResizableBox=Yy().default),tn.exports}var Bl=Uy();const An=Ko(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[C,g]=M.useState(""),{updateIsDragging:S}=An(E=>E),m=M.useMemo(()=>l===ce.DAY?"w-[99%]":"w-full",[l]),f=M.useMemo(()=>l===ce.DAY?"w-[99%]":"w-full",[l]);M.useEffect(()=>()=>{u!=null&&u.onUnmount&&(u==null||u.onUnmount())},[]);const h=(E,w)=>{g("show-handle"),S(!0),d!=null&&d.onResizeStart&&d.onResizeStart(E,w)},D=(E,w)=>{g(""),S(!1),d!=null&&d.onResizeStop&&d.onResizeStop(E,w)};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(Bl.Resizable,{className:ne("absolute top-[0px]",d.customClass,C),height:E==null?void 0:E.height,width:E==null?void 0:E.width,onResize:w,onResizeStart:h,onResizeStop:D,resizeHandles:["s"],draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:p.jsx("div",{className:ne("flex",f),style:{height:n,zIndex:99},children:p.jsx("div",{ref:b,className:ne("border rounded-md overflow-hidden",m,c,C.length&&"dragging-effect"),onClick:r,style:{height:n,position:"relative",zIndex:50,...o,...s},...i,...a,children:p.jsx(zo,{booking:e,slotData:t})})})})}return p.jsx("div",{className:ne("flex",f),style:{height:n,zIndex:100},children:p.jsx("div",{ref:b,className:ne("hover:bg-white border rounded-md overflow-hidden",m,c),onClick:r,style:{height:n,position:"relative",zIndex:50,...o,...s},...i,...a,children:p.jsx(zo,{booking:e,slotData:t})})})};var Ky="Label",Hl=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())}}));Hl.displayName=Ky;var Gy=Hl;function qy({className:e,...t}){return p.jsx(Gy,{"data-slot":"label",className:ne("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 Xy=({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}=ns({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 Dr({onDragEnd(v){if(v.active.id){const{y:b,x:C}=r;o({x:C+((l==null?void 0:l.x)||0),y:b+((l==null?void 0:l.y)||0)})}}}),p.jsxs(As,{dir:"ltr",modal:!1,open:!0,defaultOpen:!1,onOpenChange:t,children:[p.jsx(Ns,{asChild:!0,children:n}),p.jsxs(ks,{ref:c,style:{...u,zIndex:100},className:"w-[25rem]",updatePositionStrategy:"always",forceMount:!0,side:"right",sticky:"always",onEscapeKeyDown:()=>{},...i,children:[p.jsxs("div",{className:"flex justify-between items-center hover:bg-gray-100 rounded-sm",children:[p.jsx(qy,{ref:d,className:"w-full hover:cursor-move p-4",...a,children:"Appointment"}),p.jsx(oh,{className:"hover:cursor-pointer hover:text-gray-500",onClick:e})]}),s.createBookingModal]})]})},Zy="_Draggable_1rwnc_7",Jy="_pendingDelay_1rwnc_22",Qy="_dragging_1rwnc_59",vr={Draggable:Zy,pendingDelay:Jy,dragging:Qy};var eb="Toggle",Vl=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)})})});Vl.displayName=eb;var tb=Vl;const nb=nc("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 rb({className:e,variant:t,size:n,...r}){return p.jsx(tb,{"data-slot":"toggle",className:ne(nb({variant:t,size:n,className:e})),...r})}const ob=()=>{const[e,t]=M.useState(!1);return p.jsx(ys,{children:p.jsxs(Ic,{children:[p.jsx(jc,{asChild:!0,children:p.jsx("div",{children:p.jsx(rb,{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(Np,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),p.jsx($c,{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 js="Popover",[Yl,Ww]=mt(js,[vt]),Nn=vt(),[sb,yt]=Yl(js),Ul=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=Nn(t),c=x.useRef(null),[l,d]=x.useState(!1),[u=!1,v]=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:v,onOpenToggle:x.useCallback(()=>v(b=>!b),[v]),hasCustomAnchor:l,onCustomAnchorAdd:x.useCallback(()=>d(!0),[]),onCustomAnchorRemove:x.useCallback(()=>d(!1),[]),modal:i,children:n})})};Ul.displayName=js;var Kl="PopoverAnchor",ib=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(Kl,n),s=Nn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return x.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(Mn,{...s,...r,ref:t})});ib.displayName=Kl;var Gl="PopoverTrigger",ql=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(Gl,n),s=Nn(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 $s="PopoverPortal",[ab,cb]=Yl($s,{forceMount:void 0}),Xl=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=yt($s,t);return p.jsx(ab,{scope:t,forceMount:n,children:p.jsx(Ze,{present:n||s.open,children:p.jsx(Rn,{asChild:!0,container:o,children:r})})})};Xl.displayName=$s;var Ht="PopoverContent",Zl=x.forwardRef((e,t)=>{const n=cb(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(lb,{...o,ref:t}):p.jsx(ub,{...o,ref:t})})});Zl.displayName=Ht;var lb=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 Ss(i)},[]),p.jsx(zr,{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})})})}),ub=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=Nn(n);return xs(),p.jsx($r,{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(Nr,{"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",db=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))})});db.displayName=Ql;var fb="PopoverArrow",pb=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Nn(n);return p.jsx(kr,{...o,...r,ref:t})});pb.displayName=fb;function eu(e){return e?"open":"closed"}var hb=Ul,gb=ql,mb=Xl,vb=Zl;function yb({...e}){return p.jsx(hb,{"data-slot":"popover",...e})}function bb({...e}){return p.jsx(gb,{"data-slot":"popover-trigger",...e})}function wb({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(mb,{children:p.jsx(vb,{"data-slot":"popover-content",align:t,sideOffset:n,className:ne("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 la(e,[t,n]){return Math.min(n,Math.max(t,e))}function xb(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 Sb=[" ","Enter","ArrowUp","ArrowDown"],Cb=[" ","Enter"],kn="Select",[Yr,Ur,Db]=bs(kn),[Xt,Bw]=mt(kn,[Db,vt]),Kr=vt(),[Eb,bt]=Xt(kn),[Mb,Rb]=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:C}=e,g=Kr(t),[S,m]=x.useState(null),[f,h]=x.useState(null),[D,y]=x.useState(!1),E=ws(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?C||!!S.closest("form"):!0,[H,_]=x.useState(new Set),N=Array.from(H).map(O=>O.props.value).join(";");return p.jsx(Ar,{...g,children:p.jsxs(Eb,{required:b,scope:t,trigger:S,onTriggerChange:m,valueNode:f,onValueNodeChange:h,valueNodeHasChildren:D,onValueNodeHasChildrenChange:y,contentId:ft(),value:A,onValueChange:I,open:w,onOpenChange:R,dir:E,triggerPointerDownPosRef:j,disabled:v,children:[p.jsx(Yr.Provider,{scope:t,children:p.jsx(Mb,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(O=>{_($=>new Set($).add(O))},[]),onNativeOptionRemove:x.useCallback(O=>{_($=>{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:C,children:[A===void 0?p.jsx("option",{value:""}):null,Array.from(H)]},N):null]})})};tu.displayName=kn;var nu="SelectTrigger",ru=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Kr(n),i=bt(nu,n),a=i.disabled||r,c=le(t,i.onTriggerChange),l=Ur(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)}),C=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"&&C(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"&&(C(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===" ")&&Sb.includes(g.key)&&(C(),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 Tb="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=Tb;var Ob="SelectPortal",au=e=>p.jsx(Rn,{asChild:!0,...e});au.displayName=Ob;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?br.createPortal(p.jsx(lu,{scope:e.__scopeSelect,children:p.jsx(Yr.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(uu,{...e,ref:t})});cu.displayName=Mt;var _e=10,[lu,wt]=Xt(Mt),Pb="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:C,hideWhenDetached:g,avoidCollisions:S,...m}=e,f=bt(Mt,n),[h,D]=x.useState(null),[y,E]=x.useState(null),w=le(t,W=>D(W)),[R,A]=x.useState(null),[I,j]=x.useState(null),B=Ur(n),[H,_]=x.useState(!1),N=x.useRef(!1);x.useEffect(()=>{if(h)return Ss(h)},[h]),xs();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=!N.current&&!q;(f.value!==void 0&&f.value===G||z)&&(A(W),z&&(N.current=!0))},[f.value]),U=x.useCallback(()=>h==null?void 0:h.focus(),[h]),Y=x.useCallback((W,G,q)=>{const z=!N.current&&!q;(f.value!==void 0&&f.value===G||z)&&j(W)},[f.value]),Z=r==="popper"?Wo:du,K=Z===Wo?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:v,collisionPadding:b,sticky:C,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(zr,{as:dt,allowPinchZoom:!0,children:p.jsx($r,{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:()=>_(!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=Pb;var Ab="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=Ur(n),b=x.useRef(!1),C=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,oe=w.left-F,de=w.width+oe,Se=Math.max(de,R.width),Ce=window.innerWidth-_e,Je=la(F,[_e,Math.max(_e,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,oe=window.innerWidth-w.right-F,de=w.width+oe,Se=Math.max(de,R.width),Ce=window.innerWidth-_e,Je=la(F,[_e,Math.max(_e,Ce-Se)]);a.style.minWidth=de+"px",a.style.right=Je+"px"}const j=v(),B=window.innerHeight-_e*2,H=g.scrollHeight,_=window.getComputedStyle(l),N=parseInt(_.borderTopWidth,10),O=parseInt(_.paddingTop,10),$=parseInt(_.borderBottomWidth,10),P=parseInt(_.paddingBottom,10),k=N+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-_e,Z=B-Y,K=S.offsetHeight/2,W=S.offsetTop+K,G=N+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,oe=Math.max(Z,K+(X?U:0)+F+$),de=G+oe;a.style.height=de+"px"}else{const X=j.length>0&&S===j[0].ref.current;a.style.top="0px";const oe=Math.max(Y,N+g.offsetTop+(X?V:0)+K)+q;a.style.height=oe+"px",g.scrollTop=G-Y+g.offsetTop}a.style.margin=`${_e}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[D,y]=x.useState();ye(()=>{l&&y(window.getComputedStyle(l).zIndex)},[l]);const E=x.useCallback(w=>{w&&C.current===!0&&(h(),f==null||f(),C.current=!1)},[h,f]);return p.jsx(kb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:b,onScrollButtonChange:E,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:p.jsx(se.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});du.displayName=Ab;var Nb="SelectPopperPosition",Wo=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=_e,...s}=e,i=Kr(n);return p.jsx(Nr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Wo.displayName=Nb;var[kb,Ls]=Xt(Mt,{}),Bo="SelectViewport",fu=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=wt(Bo,n),i=Ls(Bo,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(Yr.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 C=window.innerHeight-_e*2,g=parseFloat(u.style.minHeight),S=parseFloat(u.style.height),m=Math.max(g,S);if(m<C){const f=m+b,h=Math.min(C,f),D=f-h;u.style.height=h+"px",u.style.bottom==="0px"&&(d.scrollTop=D>0?D:0,u.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});fu.displayName=Bo;var pu="SelectGroup",[_b,Ib]=Xt(pu),jb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ft();return p.jsx(_b,{scope:n,id:o,children:p.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});jb.displayName=pu;var hu="SelectLabel",$b=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ib(hu,n);return p.jsx(se.div,{id:o.id,...r,ref:t})});$b.displayName=hu;var yr="SelectItem",[Lb,gu]=Xt(yr),mu=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=bt(yr,n),c=wt(yr,n),l=a.value===r,[d,u]=x.useState(s??""),[v,b]=x.useState(!1),C=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(Lb,{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(Yr.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:C,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 D;((D=c.searchRef)==null?void 0:D.current)!==""&&f.key===" "||(Cb.includes(f.key)&&m(),f.key===" "&&f.preventDefault())})})})})});mu.displayName=yr;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=Rb(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,C=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(C),()=>S(C)),[g,S,C]),p.jsxs(p.Fragment,{children:[p.jsx(se.span,{id:c.textId,...s,ref:v}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?br.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 Ho="SelectScrollUpButton",wu=x.forwardRef((e,t)=>{const n=wt(Ho,e.__scopeSelect),r=Ls(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.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=Ho;var Vo="SelectScrollDownButton",xu=x.forwardRef((e,t)=>{const n=wt(Vo,e.__scopeSelect),r=Ls(Vo,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=Vo;var Su=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=wt("SelectScrollButton",n),i=x.useRef(null),a=Ur(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()})})}),Fb="SelectSeparator",zb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});zb.displayName=Fb;var Yo="SelectArrow",Wb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Kr(n),s=bt(Yo,n),i=wt(Yo,n);return s.open&&i.position==="popper"?p.jsx(kr,{...o,...r,ref:t}):null});Wb.displayName=Yo;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=xb(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(gs,{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=Bb(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 Bb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hb=tu,Vb=ru,Yb=su,Ub=iu,Kb=au,Gb=cu,qb=fu,Xb=mu,Zb=vu,Jb=bu,Qb=wu,ew=xu;function tw({...e}){return p.jsx(Hb,{"data-slot":"select",...e})}function nw({...e}){return p.jsx(Yb,{"data-slot":"select-value",...e})}function rw({className:e,size:t="default",children:n,...r}){return p.jsxs(Vb,{"data-slot":"select-trigger","data-size":t,className:ne("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(Ub,{asChild:!0,children:p.jsx(ec,{className:"size-4 opacity-50"})})]})}function ow({className:e,children:t,position:n="popper",...r}){return p.jsx(Kb,{children:p.jsxs(Gb,{"data-slot":"select-content",className:ne("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(iw,{}),p.jsx(qb,{className:ne("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(aw,{})]})})}function sw({className:e,children:t,...n}){return p.jsxs(Xb,{"data-slot":"select-item",className:ne("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(Jb,{children:p.jsx(Qa,{className:"size-4"})})}),p.jsx(Zb,{children:t})]})}function iw({className:e,...t}){return p.jsx(Qb,{"data-slot":"select-scroll-up-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Vp,{className:"size-4"})})}function aw({className:e,...t}){return p.jsx(ew,{"data-slot":"select-scroll-down-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(ec,{className:"size-4"})})}const cw=({options:e,onChange:t})=>p.jsxs(tw,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[p.jsx(rw,{className:"w-[180px]",children:p.jsx(nw,{placeholder:"view"})}),p.jsx(ow,{children:e.map(n=>p.jsx(sw,{value:n.text,children:n.text},n.text))})]}),Ru=({side:e,booking:t,onOpenChange:n})=>{const[r]=M.useState(70),[o]=M.useState(-150),[s,i]=M.useState({x:0,y:0}),a=An(),{attributes:c,listeners:l,setNodeRef:d,transform:u,setActivatorNodeRef:v}=ns({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)`},C=M.useMemo(()=>[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],[]),g=M.useMemo(()=>`${te.dateAndHourDateToString(t.startAt)} - ${te.dateAndHourDateToString(t.finishAt)}`,[t.startAt,t.finishAt]),S=M.useMemo(()=>{const h=new Date(t.startAt),D=h.getDate(),y=h.getDay(),E=Ge[h.getMonth()];return p.jsx("span",{children:`${Ef[y]}, ${D} ${E}`})},[t.startAt]),m=()=>({backgroundColor:""}),f=async()=>{};return Dr({onDragStart(h){h.active.id&&a.updateIsDragging(!0)},onDragEnd(h){if(h.active.id){const{y:D,x:y}=s;i({x:y+((u==null?void 0:u.x)||0),y:D+((u==null?void 0:u.y)||0)}),a.updateIsDragging(!1)}}}),p.jsxs(yb,{open:!0,onOpenChange:n,children:[p.jsx(bb,{}),p.jsx(wb,{ref:d,updatePositionStrategy:"optimized",className:"w-[25rem]",side:e,align:"start",sticky:"always",sideOffset:r,alignOffset:o,style:b,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(ob,{}),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:f,children:p.jsx(nh,{className:"h-3 w-3"})}),p.jsx(cw,{options:C,onChange:()=>{}})]}),p.jsxs("div",{className:"mb-1 grid grid-cols-[25px_1fr] items-start pb-1 last:mb-0 last:pb-0",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 lw(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 uw=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:lw(t,n,r)},dw=({bookingInit:e,slotData:t,heightStyle:n})=>p.jsx(pf,{modifiers:[uw],dropAnimation:{duration:2e3,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:ne("w-full",vr.Draggable,vr.dragging),children:p.jsx("div",{className:ne("text-white w-full absolute z-10 border rounded-sm overflow-hidden"),style:{height:n},children:p.jsx(zo,{booking:e,slotData:t})})}),ua=600,fw=15,pw=({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"),C=()=>{const _=t.day.split(":")[0].trim();if(r===ce.DAY)b.current="top";else switch(_){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}=ns({id:s.id,data:{type:"booking-slots",booking:s,slotData:t}}),D=h?{transform:`translate3d(${h.x}px, ${h.y}px, 0)`}:void 0,y=M.useCallback(_=>{c(!0);const{constraint:N}=_;"delay"in N&&d(N.delay)},[]),E=M.useCallback(()=>{c(!1)},[]);Dr({onDragPending:_=>y(_),onDragAbort:()=>E(),onDragCancel:()=>E(),onDragEnd:()=>E()});const w=a?{animationDuration:`${l}ms`}:{},R=async _=>{try{i(N=>({...N,finishAt:_}))}catch(N){console.log(N)}},A=async _=>{o(s,_,s.finishAt,t),i(N=>({...N,startAt:_}))},I=async _=>{try{i(N=>({...N,finishAt:_}))}catch(N){console.log(N)}},{state:j,heightStyle:B,onResize:H}=Fs({booking:s,onAddTime:R,onAddStartTime:A,onSubTime:I,starter:!0});return M.useImperativeHandle(n,()=>({bookingId:e.id}),[e.id]),p.jsxs(p.Fragment,{children:[f?p.jsxs(p.Fragment,{children:[p.jsx(dw,{bookingInit:e,slotData:t,heightStyle:`${B}rem`}),p.jsx("div",{className:"w-full h-[2rem] z-100 relative",children:p.jsx(mr,{bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${B}rem`})})]}):p.jsx(mr,{ref:m,resizableParam:{state:j,onResize:H,resizeHandle:["s"]},customClasses:`bg-black ${vr.Draggable} ${a&&vr.pendingDelay}`,bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${B}rem`,onClick:C,pendingStyle:w,style:D,listeners:S,attributes:g}),u&&p.jsx(ts,{children:p.jsx(Ru,{booking:s,onOpenChange:v,side:b.current})})]})},hw=.2,Fs=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=M.useState({height:ua,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 D=h>=8&&h<=10,y=h%2===0;return D&&l(h)&&y},v=async(h=["se","s"])=>{if(h.includes("n")){const D=C(e.startAt,"remove");n&&n(D)}else{const D=C(e.finishAt,"add");c(y=>{const E=Math.round(y)+2;return u(E)||d(E)?E+hw:E}),t&&t(D)}},b=async()=>{const h=C(e.finishAt,"remove");te.timeDiffInSeconds(e.finishAt,e.startAt)!==fw&&(c(y=>(y>10,y-2)),r&&r(h))},C=(h,D)=>{const y=new Date(h),E=y.getMinutes();return D==="add"&&y.setMinutes(E+15),D==="remove"&&y.setMinutes(E-15),y};return{state:s,setState:i,resetState:()=>{i({height:ua,width:600})},resetHeightStyle:()=>{c(2)},heightStyle:a,onResize:(h,{size:D,handle:y})=>{switch(h.stopPropagation(),h.preventDefault(),y){case"se":case"s":{i(E=>(Number(E.height)<Number(D.height)&&v(),Number(E.height)>Number(D.height)&&b(),{...E,height:D.height,width:D.width}));break}case"n":{i(E=>(Number(D.height)>Number(E.height)&&v(["n"]),{...E,height:D.height,width:D.width}));break}}},updateHeightStyle:(h,D)=>{c(te.timeDiffInSeconds(h,D)/7.3)}}},gw=({slotData:e,events:{onClick:t,renderPreviewCard:n,resetPrevView:r}})=>{const{startAt:o}=Wa(N=>N),[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]),C=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(N=>N+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 N=>{c(te.dateTimeAsString(N))},h=async N=>{c(te.dateTimeAsString(N))},{state:D,resetState:y,resetHeightStyle:E,heightStyle:w,onResize:R,updateHeightStyle:A}=Fs({booking:C,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(N=>N.bookingViewType),_=l?"bg-white border-none":"";return p.jsx("div",{className:ne("w-full bg-red-300 h-full z-[-1] content-center border-solid border-[1px] border-black rounded-sm cursor-default",_),children:p.jsx(Bl.Resizable,{className:"slot-resizable ",height:D.height,width:D.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",{style:{height:"100%",alignContent:"center"},children:p.jsx(mr,{customClasses:"dragging-effect",bookingInit:C,bookingViewType:H,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${w}rem`,resizableParam:{state:D,onResize:R,customClass:"show-handle"},events:{onUnmount:I}})}):p.jsx("div",{className:"rounded-sm w-full h-full content-center relative",children:p.jsx("span",{className:"absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]",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:C}=Ct(),{finishAt:g,startAt:S,updateStartAt:m,updateFinishAt:f,updateDate:h}=Wa(z=>z),D=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}=Fs({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&&N(!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),N(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;C({time:X,key:F});const oe=lr({key:F,time:X}),de=u==null?void 0:u.get(oe);v(oe),de&&de.showEvent(),h(F),m(X),V(z||X,z?0:15),H(!0)},[e,h,m,V,u,l,v,d,C]),Y=()=>{l||B||N(!1)},Z=n.length||O?n:"hover:bg-white-50",K=o?"border-b border-solid":"",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||N(!1)},[i]),M.useImperativeHandle(a,()=>({showEvent:()=>{N(!1),c(!1),H(!0),j(!0)},closeEvent:()=>{H(!1),j(!1),N(!1),q()},onOpenCloseChange:z=>{N(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:ne("w-[100%] min-w-32 h-[2rem] relative",K,Z),onMouseOver:k,onMouseLeave:Y,onFocus:()=>{},children:[s,(!i&&_&&!I||O)&&p.jsx(gw,{slotData:e,events:{onClick:U,openOptions:G,renderPreviewCard:W,resetPrevView:q}}),I&&p.jsx("div",{className:"w-full",children:p.jsx(mr,{ref:P,bookingInit:w,bookingViewType:D,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${A}rem`})}),i]},e.key),B&&p.jsx(ts,{children:p.jsx(Xy,{onClose:T,onOpenChange:L,buttonTrigger:p.jsx("div",{},e.key)})})]})};var mw="Separator",da="horizontal",vw=["horizontal","vertical"],Tu=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=da,...o}=e,s=yw(r)?r:da,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=mw;function yw(e){return vw.includes(e)}var bw=Tu;function wo({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(bw,{"data-slot":"separator-root",decorative:n,orientation:t,className:ne("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 ww{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 xw{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 xw,m=()=>{const h=new Date,D=S.normalizeDateNow(h),y=te.dateAndHourDateToString(h);c(y),i(D===g)};let f;return S.is15MinLess(g)||(f=setInterval(()=>m(),1e3)),()=>clearInterval(f)},[n.time]);const d=M.useMemo(()=>new ww().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:ne("absolute right-0 z-100",t?"left-[-18px] w-[102%]":"w-[104%] left-[-3px]",u),children:p.jsxs("div",{className:"relative",children:[p.jsx(wo,{style:{height:"4px"},className:e}),t&&p.jsx("div",{className:"absolute left-0 top-[-3px] cursor-pointer",children:p.jsx(wo,{orientation:"vertical",style:{height:"11px"},className:e})}),p.jsx(fa,{isRendered:t,dateToRender:a})]})}):p.jsxs("div",{style:{top:`${d-1}px`},className:ne("absolute right-0 z-100",t?"left-[-18px]":"left-[-9px]",u),children:[p.jsx(wo,{style:{height:"2px"},className:e}),p.jsx(fa,{isRendered:t,dateToRender:a})]})}):void 0},fa=({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})})})})},pa=({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}),C=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=>C(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=>C(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=>C(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=>C(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(pw,{booking:r,slotData:n})}return null},[t,e,n]),Sw=({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="bg-gray-200 border-none",!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:C}=$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]),D=M.useMemo(()=>({ref:C,style:{backgroundColor:b?"#0066ff":""},key:te.newDateKey(e.day,c),time:c}),[e.day,b,c,C]),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(),_=new Date(R).getDate(),N=A.split(":")[0];return B.split(":")[0]===N&&H===_});return I.length?p.jsx(pa,{dayHour:e,bookings:I,first:h,second:D,third:y,fourth:E,disabledCss:i.current,firstDay:n}):p.jsx(pa,{first:h,second:D,third:y,fourth:E,disabledCss:i.current,firstDay:n})},[r,e,n,h,E,D,y]);return p.jsx("td",{className:ne("bg-white border border-gray-300 min-w-[8rem] w-[80rem] p-0 relative z-[0px]",o===ce.WEEK&&"max-w-[12rem] min-w-[5rem]"),children:w},`${e.day}-${e.hour}-slot`)};function Cw({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:ne("w-full caption-bottom text-sm",e),...t})})}function Dw({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:ne("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const Ew=({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",ne("activateVisibilityTime",a))};return M.useImperativeHandle(t,()=>({setDisabledHour:i,setActivateHour:c})),p.jsxs(As,{children:[p.jsx(Ns,{children:p.jsx("span",{ref:s,className:ne(a),children:e})}),p.jsxs(ks,{children:[p.jsx(Dy,{children:o}),p.jsx(Ey,{}),p.jsx($i,{children:n}),p.jsx($i,{children:r})]})]})},Mw=()=>{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:ne("h-[75vh] overflow-auto",n===ce.WEEK&&"w-max"),children:p.jsx(Cw,{children:e.map(b=>p.jsxs("tr",{children:[p.jsx(Dw,{style:{...d,...l,padding:0,position:"relative"},className:"border border-gray-300 py-2 px-4 text-center w-3 min-w-16",children:p.jsx("div",{className:"absolute top-[-3px] left-0 right-5 bg-white text-end",children:p.jsx(Ew,{ref:C=>c(C,b),hour:b})})},`${b}-hour`),t.map((C,g)=>p.jsx(Sw,{dayHour:{day:String(C),hour:b},lunchTimeBlock:a,firstDay:v(g),bookingBulk:r.booking,bookingViewType:n},`${C}-${b}-slot-content`))]},`${b}-content`))})})},[l,e,a,d,r,c,n,t])},Rw=({bookingViewType:e})=>M.useMemo(()=>{switch(e){case ce.DAY:case ce.WEEK:return p.jsx(Mw,{});default:return null}},[e]),Tw=({children:e,...t})=>{const n=M.useRef(null);return n.current||(n.current=Wu(t)),p.jsx(If,{value:n.current,children:e})},Ow=({children:e,...t})=>p.jsx(rc,{value:{...t},children:e}),Ou={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},Pw=e=>wr(t=>({...e,...Ou,updateMonthMessage:n=>{t(r=>({...r,...n}))}})),Aw=({children:e,...t})=>{const n=M.useRef(null);return n.current||(n.current=Pw(t)),p.jsx(Fa,{value:n.current,children:e})},Nw={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},kw=()=>{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:Nw,booking:t})},[t,r]);const i=ed(qs(Aa,{activationConstraint:n}),qs(Na,{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),D=f%60;return`${h}:${D.toString().padStart(2,"0")}`},u=(g,S)=>{const m=new Date(g),f=S.split(":"),h=Number(f[0]),D=Number(f[1]);return m.setHours(m.getHours()+h),m.setMinutes(m.getMinutes()+D),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)}},C=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:"z-[100] max-w-[1410px]",children:p.jsx(Aw,{...Ou,children:p.jsxs("div",{className:"w-full h-full z-[100]",children:[p.jsx(Py,{}),p.jsxs("div",{className:"flex flex-col z-[100] overflow-auto",children:[p.jsx(Rp,{daysOfWeek:c,bookingViewType:a}),p.jsx(ts,{onDragEnd:C,onDragStart:l,sensors:i,children:p.jsx(Rw,{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(Tw,{...ga,children:p.jsx(Ow,{createBookingModal:t,viewModes:e,onChangeViewType:n,onTodayClick:s,onCardDropCallback:r,onDayChange:o,onSlotClick:i,onModalClose:a,bookings:c,children:p.jsx($f,{...Mo,children:p.jsx(kw,{})})})})),Iw=e=>{console.log("creating a calendar instance");const t=M.useRef(null);return{getCalendar:()=>p.jsx(_w,{ref:t,...e})}};exports.useCalendarInstance=Iw;