react-beauty-calendar 1.0.0 → 1.0.3

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,4 +1,4 @@
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,ba={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},Gu=e=>Sr(t=>({...ba,...e,clearDraggingBookings:()=>t(n=>({...n,draggingBooking:null})),changeNewBookingStateModal:()=>t({bookingModalState:!0}),openNewBookingModal:(n,r)=>{n&&t({selectedDate:n}),r&&t({selectedHour:r})},setIsBookingLoading:()=>t({isBookingLoading:!0}),setSelectedDate:n=>t(r=>({...r,selectedDate:n})),setSelectedHour:n=>t(r=>({...r,selectedHour:n})),setCardRef:(n,r)=>t(o=>({...o,cardsRef:o.cardsRef.set(n,r)}))}));function wa(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={};/**
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
2
  * @license React
3
3
  * react-dom.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Js;function Xu(){if(Js)return ye;Js=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={};/**
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
10
  * @license React
11
11
  * react-dom.development.js
12
12
  *
@@ -14,127 +14,111 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Zs;function Ju(){return Zs||(Zs=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:
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
18
  1. You might have mismatching versions of React and the renderer (such as React DOM)
19
19
  2. You might be breaking the Rules of Hooks
20
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=Ju(),Fn.exports}var Ve=Xo();const Zu=wa(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 Jo(e){return"nodeType"in e}function xe(e){var t,n;return e?Yt(e)?e:Jo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Zo(e){const{Document:t}=xe(e);return e instanceof t}function Sn(e){return Yt(e)?!1:e instanceof xe(e).HTMLElement}function xa(e){return e instanceof xe(e).SVGElement}function Kt(e){return e?Yt(e)?e.document:Jo(e)?Zo(e)?e:Sn(e)||xa(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 Zr={};function Er(e,t){return R.useMemo(()=>{if(t)return t;const n=Zr[e]==null?0:Zr[e]+1;return Zr[e]=n,e+"-"+n},[e,t])}function Sa(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=Sa(1),cr=Sa(-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 Ca=R.createContext(null);function Rr(e){const t=R.useContext(Ca);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:`
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:`
22
22
  To pick up a draggable item, press the space bar.
23
23
  While dragging, use the arrow keys to move the item.
24
24
  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 Da(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 Ea(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=Ea(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(Zo(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Sn(o)||xa(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 Ra(e){const[t]=es(e,1);return t??null}function Qr(e){return!Cr||!e?null:Yt(e)?e:Jo(e)?Zo(e)||e===Kt(e).scrollingElement?window:Sn(e)?e:null:null}function Ta(e){return Yt(e)?e.scrollX:e.scrollLeft}function Ma(e){return Yt(e)?e.scrollY:e.scrollTop}function Co(e){return{x:Ta(e),y:Ma(e)}}var ge;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ge||(ge={}));function Oa(e){return!Cr||!e?!1:e===document.scrollingElement}function Pa(e){const t={x:0,y:0},n=Oa(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}=Pa(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 Aa(e){return e.reduce((t,n)=>$t(t,Co(n)),Le)}function Md(e){return e.reduce((t,n)=>t+Ta(n),0)}function Od(e){return e.reduce((t,n)=>t+Ma(n),0)}function _a(e,t){if(t===void 0&&(t=Dn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Ra(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=Aa(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 le;(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"})(le||(le={}));const Na={start:[le.Space,le.Enter],cancel:[le.Esc],end:[le.Space,le.Enter,le.Tab]},Nd=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case le.Right:return{...n,x:n.x+25};case le.Left:return{...n,x:n.x-25};case le.Down:return{...n,y:n.y+25};case le.Up:return{...n,y:n.y-25}}};class ka{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&&_a(r),n(Le)}handleKeyDown(t){if(Qo(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Na,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}=Pa(v),w=Td(v),T={x:Math.min(S===le.Right?w.right-w.width/2:w.right,Math.max(S===le.Right?w.left:w.left+w.width/2,u.x)),y:Math.min(S===le.Down?w.bottom-w.height/2:w.bottom,Math.max(S===le.Down?w.top:w.top+w.height/2,u.y))},A=S===le.Right&&!p||S===le.Left&&!m,I=S===le.Down&&!D||S===le.Up&&!y;if(A&&T.x!==u.x){const j=v.scrollLeft+f.x,B=S===le.Right&&j<=b.x||S===le.Left&&j>=E.x;if(B&&!f.y){v.scrollTo({left:j,behavior:a});return}B?g.x=v.scrollLeft-j:g.x=S===le.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===le.Down&&j<=b.y||S===le.Up&&j>=E.y;if(B&&!f.x){v.scrollTo({top:j,behavior:a});return}B?g.y=v.scrollTop-j:g.y=S===le.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()}}ka.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Na,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===le.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 Ia extends ns{constructor(t){const{event:n}=t,r=Kt(n.target);super(t,kd,r)}}Ia.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 ja extends ns{constructor(t){super(t,Id,Kt(t.event.target))}}ja.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 La 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(){}}}La.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 Da(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):Aa(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 $a(e){return R.useMemo(()=>e?Sd(e):null,[e])}const ui=[];function Xd(e,t){t===void 0&&(t=Dn);const[n]=e,r=$a(n?xe(n):null),[o,s]=R.useState(ui);function i(){s(()=>e.length?e.map(c=>Oa(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 Fa(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Sn(t)?t:e}function Jd(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=Fa(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 Zd=[{sensor:Ia,options:{}},{sensor:ka,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},za={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ur,draggableNodes:new Map,over:null,measureDroppableContainers:ur},En=R.createContext(za),Wa=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 Ba(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=Da(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=Ra(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=Zd,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:J}=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),ue=Jd({measure:V.dragOverlay.measure}),Ce=(r=ue.nodeRef.current)!=null?r:K,Ee=E?(o=ue.rect)!=null?o:z:null,et=!!(ue.nodeRef.current&&ue.rect),jn=Ud(et?null:z),tt=$a(Ce?xe(Ce):null),nt=Yd(E?oe??K:null),Ln=Xd(nt),$n=Ba(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:ue.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 Jr=N.current[nn];Jr==null||Jr(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:Ce,draggingNodeRect:Ee,droppableContainers:I,over:rt,scrollableAncestors:nt,scrollAdjustedTranslate:At},B.current={initial:Ee,translated:_t}},[H,K,Qt,_t,T,Ce,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:ue,draggableNodes:T,droppableContainers:I,droppableRects:Y,over:rt,measureDroppableContainers:U,scrollableAncestors:nt,scrollableAncestorRects:Ln,measuringConfiguration:V,measuringScheduled:J,windowRect:tt}),[H,K,z,L,Qt,X,ue,T,I,Y,rt,U,nt,Ln,V,J,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(Ca.Provider,{value:m},R.createElement(En.Provider,{value:Bu},R.createElement(Wa.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(Wa)}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:za},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=Fa(i);if(!l)return;const{transform:d}=xe(i).getComputedStyle(i),u=Ea(d);if(!u)return;const f=typeof t=="function"?t:Sf(t);return _a(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=Ba(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))}),de={DAY:"DAY",WEEK:"WEEK",TABLE:"TABLE",MONTH:"MONTH"},Xe=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Ha=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*Ha),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)/Ha;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,J=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?J-G:J+(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 J=I(N);return j.w(J.date(J.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,J=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,J,3);case"MMMM":return W(J,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,J=function(){return j.m(M,V)};switch($){case g:N=J()/12;break;case u:N=J();break;case f:N=J()/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=wa(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,n]=e.split(":"),r=new Date;return r.setHours(Number(t),Number(n)),r},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)})),Va=R.createContext(null),is=e=>{const t=R.use(Va);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 de.DAY:{if(e(de.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 de.WEEK:{e(de.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 de.TABLE:{if(e(de.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)})),Ua=R.createContext(null),Yf=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Uf(t)),h.jsx(Ua,{value:n.current,children:e})},Ya=e=>{const t=R.use(Ua);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Go(t,e)};function Ka(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ka(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ga(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ka(e))&&(r&&(r+=" "),r+=t);return r}const 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(),qa(a,t)||Gf(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},qa=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?qa(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(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,Jf=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=":",Zf=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+Zf;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:Jf(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=Xa(t))&&(r&&(r+=" "),r+=n);return r}const Xa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Xa(e[r]))&&(n&&(n+=" "),n+=t);return n};function ip(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((d,u)=>u(d),e());return n=np(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const d=op(c,n);return o(c,d),d}return function(){return s(sp.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Za=/^\((?:(\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=>!Z(e)&&!Q(e),yp=e=>Gt(e,tc,cs),Z=e=>Ja.test(e),Dt=e=>Gt(e,nc,hp),ro=e=>Gt(e,Op,re),bp=e=>Gt(e,Qa,cs),wp=e=>Gt(e,ec,mp),xp=e=>Gt(e,cs,gp),Q=e=>Za.test(e),Wn=e=>qt(e,nc),Sp=e=>qt(e,Pp),Cp=e=>qt(e,Qa),Dp=e=>qt(e,tc),Ep=e=>qt(e,ec),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=Za.exec(e);return r?r[1]?t(r[1]):n:!1},Qa=e=>e==="position",Tp=new Set(["image","url"]),ec=e=>Tp.has(e),Mp=new Set(["length","size","percentage"]),tc=e=>Mp.has(e),nc=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,Z,c],w=()=>[kt,"full","auto",...E()],T=()=>[Ct,"none","subgrid",Q,Z],A=()=>["auto",{span:["full",Ct,Q,Z]},Q,Z],I=()=>[Ct,"auto",Q,Z],j=()=>["auto","min","max","fr",Q,Z],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,Z],L=()=>[yi,Dt],P=()=>["","none","full",l,Q,Z],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,Z],Y=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q,Z],U=()=>["none",re,Q,Z],J=()=>["none",re,Q,Z],K=()=>[re,Q,Z],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,Z,Q,v]}],container:["container"],columns:[{columns:[re,Z,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(),Z,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,Z]}],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",Z]}],grow:[{grow:["",re,Q,Z]}],shrink:[{shrink:["",re,Q,Z]}],order:[{order:[Ct,"first","last","none",Q,Z]}],"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,Z]}],"font-family":[{font:[Sp,Z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,Z]}],"line-clamp":[{"line-clamp":[re,"none",Q,ro]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",Q,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Q,Dt]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[re,"auto",Q,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,Z]}],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,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...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,Z],radial:["",Q,Z],conic:[Ct,Q,Z]},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,Z]}],"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,Z,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,Z]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",Q,Z]}],blur:[{blur:V()}],brightness:[{brightness:[re,Q,Z]}],contrast:[{contrast:[re,Q,Z]}],"drop-shadow":[{"drop-shadow":["","none",f,Q,Z]}],grayscale:[{grayscale:["",re,Q,Z]}],"hue-rotate":[{"hue-rotate":[re,Q,Z]}],invert:[{invert:["",re,Q,Z]}],saturate:[{saturate:[re,Q,Z]}],sepia:[{sepia:["",re,Q,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,Z]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[re,Q,Z]}],"backdrop-contrast":[{"backdrop-contrast":[re,Q,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,Q,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,Q,Z]}],"backdrop-invert":[{"backdrop-invert":["",re,Q,Z]}],"backdrop-opacity":[{"backdrop-opacity":[re,Q,Z]}],"backdrop-saturate":[{"backdrop-saturate":[re,Q,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",re,Q,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",Q,Z]}],ease:[{ease:["linear","initial",S,Q,Z]}],delay:[{delay:[re,Q,Z]}],animate:[{animate:["none",y,Q,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Q,Z]}],"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:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[Q,Z,"","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,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,Z]}],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(Ga(e))}const kp="_calendarHeader_1dbzv_1",Ip={calendarHeader:kp},jp=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=Ae(),{updateMonthMessage:o}=is(l=>l),s=t===de.DAY?"text-start":"text-center",i=t===de.TABLE&&"justify-self-start",a=R.useCallback(l=>{const d=n(l);if(!d)return;const u={month:d.getMonth(),fullYear:d.getFullYear(),monthMessage:Xe[d.getMonth()]};o(u),r(de.DAY)},[n,o,r]),c=R.useMemo(()=>{const l=d=>new Date(d).toDateString()===new Date().toDateString();return e.map(d=>{const u=To[new Date(d).getDay()];return h.jsx("th",{className:"min-w-[8rem] w-[100vw]",children:h.jsxs("div",{className:ne("flex flex-col gap-[3px] text-gray-500 ",s,i),children:[h.jsx("span",{className:ne(l(d)&&"text-purple-500"),children:u}),h.jsx("div",{className:"w-full",children:h.jsx("button",{type:"button",className:ne("hover:cursor-pointer",l(d)?"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(d),children:te.formatDate(d.toDateString())})})]})},u)})},[e,s,a,i]);return h.jsx("table",{className:"min-w-full w-full bg-white no-border-sides",children:h.jsx("tbody",{children:h.jsxs("tr",{children:[h.jsx("th",{className:ne(Ip.calendarHeader,i)},"emptyBlocks"),c]})})})};function Lp({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"relative w-full z-10",children:h.jsx("table",{"data-slot":"table",className:ne("w-full caption-bottom text-sm",e),...t})})}function $p({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 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}`},Wt=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:""}))})),_o=({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 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:{}},oo={},Bn={exports:{}},Hn={exports:{}},ie={};/** @license React v16.13.1
26
- * react-is.production.min.js
27
- *
28
- * Copyright (c) Facebook, Inc. and its affiliates.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- */var bi;function Fp(){if(bi)return ie;bi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,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
33
- * react-is.development.js
34
- *
35
- * Copyright (c) Facebook, Inc. and its affiliates.
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]})})})};/**
26
+ * @license lucide-react v0.483.0 - ISC
36
27
  *
37
- * This source code is licensed under the MIT license found in the
38
- * LICENSE file in the root directory of this source tree.
39
- */var wi;function zp(){return wi||(wi=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,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 ue=F.type;switch(ue){case c:case l:case r:case s:case o:case u:return ue;default:var Ce=ue&&ue.$$typeof;switch(Ce){case a:case d:case C:case g:case i:return Ce;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 J(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=J,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 xi;function rc(){return xi||(xi=1,process.env.NODE_ENV==="production"?Hn.exports=Fp():Hn.exports=zp()),Hn.exports}/*
40
- object-assign
41
- (c) Sindre Sorhus
42
- @license MIT
43
- */var so,Si;function Wp(){if(Si)return so;Si=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return so=o()?Object.assign:function(s,i){for(var a,c=r(s),l,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var u in a)t.call(a,u)&&(c[u]=a[u]);if(e){l=e(a);for(var f=0;f<l.length;f++)n.call(a,l[f])&&(c[l[f]]=a[l[f]])}}return c},so}var io,Ci;function ls(){if(Ci)return io;Ci=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return io=e,io}var ao,Di;function oc(){return Di||(Di=1,ao=Function.call.bind(Object.prototype.hasOwnProperty)),ao}var co,Ei;function Bp(){if(Ei)return co;Ei=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ls(),n={},r=oc();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={})},co=o,co}var lo,Ri;function Hp(){if(Ri)return lo;Ri=1;var e=rc(),t=Wp(),n=ls(),r=oc(),o=Bp(),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 lo=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(J,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?J?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,J,K,W){var G=V[Y],q=O(G);if(q!==M){var z=L(G);return new v("Invalid "+J+" `"+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,J,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 "+J+" `"+K+"` of type "+("`"+G+"` supplied to `"+U+"`, expected an array."))}for(var q=0;q<W.length;q++){var z=M(W,q,U,J,K+"["+q+"]",n);if(z instanceof Error)return z}return null}return S($)}function D(){function M($,V,Y,U,J){var K=$[V];if(!a(K)){var W=O(K);return new v("Invalid "+U+" `"+J+"` of type "+("`"+W+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return S(M)}function b(){function M($,V,Y,U,J){var K=$[V];if(!e.isValidElementType(K)){var W=O(K);return new v("Invalid "+U+" `"+J+"` of type "+("`"+W+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return S(M)}function E(M){function $(V,Y,U,J,K){if(!(V[Y]instanceof M)){var W=M.name||f,G=N(V[Y]);return new v("Invalid "+J+" `"+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,J,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 "+J+" `"+K+"` of value `"+String(W)+"` "+("supplied to `"+U+"`, expected one of "+q+"."))}return S($)}function T(M){function $(V,Y,U,J,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 "+J+" `"+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,J,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,J,K,W,G){for(var q=[],z=0;z<M.length;z++){var X=M[z],F=X(U,J,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,J){return k($[V])?null:new v("Invalid "+U+" `"+J+"` 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,J,K){var W=V[Y],G=O(W);if(G!=="object")return new v("Invalid "+J+" `"+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,J,K,q,L(z));var X=z(W,q,U,J,K+"."+q,n);if(X)return X}return null}return S($)}function H(M){function $(V,Y,U,J,K){var W=V[Y],G=O(W);if(G!=="object")return new v("Invalid "+J+" `"+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,J,K,z,L(X));if(!X)return new v("Invalid "+J+" `"+K+"` key `"+z+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(V[Y],null," ")+`
44
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var F=X(W,z,U,J,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},lo}var uo,Ti;function Vp(){if(Ti)return uo;Ti=1;var e=ls();function t(){}function n(){}return n.resetWarningCache=t,uo=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},uo}var Mi;function Or(){if(Mi)return Bn.exports;if(Mi=1,process.env.NODE_ENV!=="production"){var e=rc(),t=!0;Bn.exports=Hp()(e.isElement,t)}else Bn.exports=Vp()();return Bn.exports}function sc(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=sc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Oi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=sc(e))&&(r&&(r+=" "),r+=t);return r}const Up=Object.freeze(Object.defineProperty({__proto__:null,clsx:Oi,default:Oi},Symbol.toStringTag,{value:"Module"})),Yp=qu(Up);var fe={},lt={},Pi;function Pr(){if(Pi)return lt;Pi=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={},Ai;function Kp(){if(Ai)return ut;Ai=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 _i;function us(){if(_i)return fe;_i=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=Pr(),t=r(Kp());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;}
45
- `,T.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
46
- `,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={},Ni;function ic(){if(Ni)return Be;Ni=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=Pr(),t=us();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={},Vn={},ki;function ac(){if(ki)return Vn;ki=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.default=e;function e(){}return Vn}var Ii;function Gp(){if(Ii)return an;Ii=1,Object.defineProperty(an,"__esModule",{value:!0}),an.default=void 0;var e=l(R),t=a(Or()),n=a(Xo()),r=us(),o=ic(),s=Pr(),i=a(ac());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 ji;function qp(){return ji||(ji=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(Or()),r=d(Xo()),o=d(Yp),s=us(),i=ic(),a=Pr(),c=d(Gp()),l=d(ac());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})}(oo)),oo}var Li;function cc(){if(Li)return sn.exports;Li=1;const{default:e,DraggableCore:t}=qp();return sn.exports=e,sn.exports.default=e,sn.exports.DraggableCore=t,sn.exports}var Un={},$i;function Xp(){if($i)return Un;$i=1,Un.__esModule=!0,Un.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 Un}var cn={},Fi;function lc(){if(Fi)return cn;Fi=1,cn.__esModule=!0,cn.resizableProps=void 0;var e=t(Or());cc();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 zi;function uc(){if(zi)return on;zi=1,on.__esModule=!0,on.default=void 0;var e=i(R),t=cc(),n=Xp(),r=lc(),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,J=b==="onResize"&&!Y;U&&!J&&(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={},Wi;function Jp(){if(Wi)return ln;Wi=1,ln.__esModule=!0,ln.default=void 0;var e=a(R),t=s(Or()),n=s(uc()),r=lc(),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 Bi;function Zp(){return Bi||(Bi=1,rn.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},rn.exports.Resizable=uc().default,rn.exports.ResizableBox=Jp().default),rn.exports}var dc=Zp();const Rn=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}))})),pr=({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}=Rn(E=>E),y=R.useMemo(()=>l===de.DAY?"w-[99%]":"w-full",[l]),p=R.useMemo(()=>l===de.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(dc.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(_o,{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(_o,{booking:e,slotData:t})})})};/**
28
+ * This source code is licensed under the ISC license.
29
+ * 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();/**
47
31
  * @license lucide-react v0.483.0 - ISC
48
32
  *
49
33
  * This source code is licensed under the ISC license.
50
34
  * See the LICENSE file in the root directory of this source tree.
51
- */const Qp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
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"};/**
52
36
  * @license lucide-react v0.483.0 - ISC
53
37
  *
54
38
  * This source code is licensed under the ISC license.
55
39
  * See the LICENSE file in the root directory of this source tree.
56
- */var eh={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"};/**
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]]));/**
57
41
  * @license lucide-react v0.483.0 - ISC
58
42
  *
59
43
  * This source code is licensed under the ISC license.
60
44
  * See the LICENSE file in the root directory of this source tree.
61
- */const th=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,...eh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fc("lucide",o),...a},[...i.map(([l,d])=>R.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
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};/**
62
46
  * @license lucide-react v0.483.0 - ISC
63
47
  *
64
48
  * This source code is licensed under the ISC license.
65
49
  * See the LICENSE file in the root directory of this source tree.
66
- */const De=(e,t)=>{const n=R.forwardRef(({className:r,...o},s)=>R.createElement(th,{ref:s,iconNode:t,className:fc(`lucide-${Qp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
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);/**
67
51
  * @license lucide-react v0.483.0 - ISC
68
52
  *
69
53
  * This source code is licensed under the ISC license.
70
54
  * See the LICENSE file in the root directory of this source tree.
71
- */const nh=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],rh=De("Bookmark",nh);/**
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);/**
72
56
  * @license lucide-react v0.483.0 - ISC
73
57
  *
74
58
  * This source code is licensed under the ISC license.
75
59
  * See the LICENSE file in the root directory of this source tree.
76
- */const oh=[["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"}]],sh=De("CalendarCog",oh);/**
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);/**
77
61
  * @license lucide-react v0.483.0 - ISC
78
62
  *
79
63
  * This source code is licensed under the ISC license.
80
64
  * See the LICENSE file in the root directory of this source tree.
81
- */const ih=[["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"}]],ah=De("CalendarDays",ih);/**
65
+ */const Yp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sc=Se("Check",Yp);/**
82
66
  * @license lucide-react v0.483.0 - ISC
83
67
  *
84
68
  * This source code is licensed under the ISC license.
85
69
  * See the LICENSE file in the root directory of this source tree.
86
- */const ch=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pc=De("Check",ch);/**
70
+ */const Kp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ic=Se("ChevronDown",Kp);/**
87
71
  * @license lucide-react v0.483.0 - ISC
88
72
  *
89
73
  * This source code is licensed under the ISC license.
90
74
  * See the LICENSE file in the root directory of this source tree.
91
- */const lh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hc=De("ChevronDown",lh);/**
75
+ */const Gp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qp=Se("ChevronLeft",Gp);/**
92
76
  * @license lucide-react v0.483.0 - ISC
93
77
  *
94
78
  * This source code is licensed under the ISC license.
95
79
  * See the LICENSE file in the root directory of this source tree.
96
- */const uh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],dh=De("ChevronLeft",uh);/**
80
+ */const Xp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Zp=Se("ChevronRight",Xp);/**
97
81
  * @license lucide-react v0.483.0 - ISC
98
82
  *
99
83
  * This source code is licensed under the ISC license.
100
84
  * See the LICENSE file in the root directory of this source tree.
101
- */const fh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ph=De("ChevronRight",fh);/**
85
+ */const Jp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Qp=Se("ChevronUp",Jp);/**
102
86
  * @license lucide-react v0.483.0 - ISC
103
87
  *
104
88
  * This source code is licensed under the ISC license.
105
89
  * See the LICENSE file in the root directory of this source tree.
106
- */const hh=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],gh=De("ChevronUp",hh);/**
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);/**
107
91
  * @license lucide-react v0.483.0 - ISC
108
92
  *
109
93
  * This source code is licensed under the ISC license.
110
94
  * See the LICENSE file in the root directory of this source tree.
111
- */const mh=[["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"}]],vh=De("Columns4",mh);/**
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);/**
112
96
  * @license lucide-react v0.483.0 - ISC
113
97
  *
114
98
  * This source code is licensed under the ISC license.
115
99
  * See the LICENSE file in the root directory of this source tree.
116
- */const yh=[["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"}]],bh=De("GalleryVertical",yh);/**
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);/**
117
101
  * @license lucide-react v0.483.0 - ISC
118
102
  *
119
103
  * This source code is licensed under the ISC license.
120
104
  * See the LICENSE file in the root directory of this source tree.
121
- */const wh=[["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"}]],xh=De("Grid3x3",wh);/**
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);/**
122
106
  * @license lucide-react v0.483.0 - ISC
123
107
  *
124
108
  * This source code is licensed under the ISC license.
125
109
  * See the LICENSE file in the root directory of this source tree.
126
- */const Sh=[["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"}]],Ch=De("Pencil",Sh);/**
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);/**
127
111
  * @license lucide-react v0.483.0 - ISC
128
112
  *
129
113
  * This source code is licensed under the ISC license.
130
114
  * See the LICENSE file in the root directory of this source tree.
131
- */const Dh=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Eh=De("Trash2",Dh);/**
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);/**
132
116
  * @license lucide-react v0.483.0 - ISC
133
117
  *
134
118
  * This source code is licensed under the ISC license.
135
119
  * See the LICENSE file in the root directory of this source tree.
136
- */const Rh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Th=De("X",Rh);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 Hi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ar(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Hi(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Hi(e[o],null)}}}}function ce(...e){return x.useCallback(Ar(...e),e)}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,Mh(o,...t)]}function Mh(...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}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 Et({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Oh({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 Oh({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 pt=x.forwardRef((e,t)=>{const{children:n,...r}=e,o=x.Children.toArray(n),s=o.find(Ph);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(No,{...r,ref:t,children:x.isValidElement(i)?x.cloneElement(i,void 0,a):null})}return h.jsx(No,{...r,ref:t,children:n})});pt.displayName="Slot";var No=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const o=_h(n),s=Ah(r,n.props);return n.type!==x.Fragment&&(s.ref=t?Ar(t,o):o),x.cloneElement(n,s)}return x.Children.count(n)>1?x.Children.only(null):null});No.displayName="SlotClone";var gc=({children:e})=>h.jsx(h.Fragment,{children:e});function Ph(e){return x.isValidElement(e)&&e.type===gc}function Ah(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 _h(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)}var Nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=Nh.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 mc(e,t){e&&Ve.flushSync(()=>e.dispatchEvent(t))}function ds(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=ce(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=ce(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 kh=x.createContext(void 0);function fs(e){const t=x.useContext(kh);return e||t||"ltr"}function Ih(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 jh="DismissableLayer",ko="dismissableLayer.update",Lh="dismissableLayer.pointerDownOutside",$h="dismissableLayer.focusOutside",Vi,vc=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tn=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=x.useContext(vc),[d,u]=x.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=x.useState({}),C=ce(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=Wh(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=Bh(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 Ih(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&&(Vi=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Ui(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Vi)}},[d,f,n,l]),x.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Ui())},[d,l]),x.useEffect(()=>{const w=()=>g({});return document.addEventListener(ko,w),()=>document.removeEventListener(ko,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)})});Tn.displayName=jh;var Fh="DismissableLayerBranch",zh=x.forwardRef((e,t)=>{const n=x.useContext(vc),r=x.useRef(null),o=ce(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})});zh.displayName=Fh;function Wh(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(){yc(Lh,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 Bh(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&&yc($h,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 Ui(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function yc(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?mc(o,s):o.dispatchEvent(s)}var fo=0;function ps(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Yi()),document.body.insertAdjacentElement("beforeend",e[1]??Yi()),fo++,()=>{fo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fo--}},[])}function Yi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var po="focusScope.autoFocusOnMount",ho="focusScope.autoFocusOnUnmount",Ki={bubbles:!1,cancelable:!0},Hh="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=Ie(o),d=Ie(s),u=x.useRef(null),f=ce(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){qi.add(g);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(po,Ki);a.addEventListener(po,l),a.dispatchEvent(y),y.defaultPrevented||(Vh(qh(bc(a)),{select:!0}),document.activeElement===v&&dt(a))}return()=>{a.removeEventListener(po,l),setTimeout(()=>{const y=new CustomEvent(ho,Ki);a.addEventListener(ho,d),a.dispatchEvent(y),y.defaultPrevented||dt(v??document.body,{select:!0}),a.removeEventListener(ho,d),qi.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]=Uh(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})});_r.displayName=Hh;function Vh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(dt(r,{select:t}),document.activeElement!==n)return}function Uh(e){const t=bc(e),n=Gi(t,e),r=Gi(t.reverse(),e);return[n,r]}function bc(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 Gi(e,t){for(const n of e)if(!Yh(n,{upTo:t}))return n}function Yh(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 Kh(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&&Kh(e)&&t&&e.select()}}var qi=Gh();function Gh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Xi(e,t),e.unshift(t)},remove(t){var n;e=Xi(e,t),(n=e[0])==null||n.resume()}}}function Xi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qh(e){return e.filter(t=>t.tagName!=="A")}var we=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},Xh=x.useId||(()=>{}),Jh=0;function ht(e){const[t,n]=x.useState(Xh());return we(()=>{n(r=>r??String(Jh++))},[e]),e||(t?`radix-${t}`:"")}const Zh=["top","right","bottom","left"],gt=Math.min,Oe=Math.max,hr=Math.round,Yn=Math.floor,Ue=e=>({x:e,y:e}),Qh={left:"right",right:"left",bottom:"top",top:"bottom"},eg={start:"end",end:"start"};function Io(e,t,n){return Oe(e,gt(t,n))}function Je(e,t){return typeof e=="function"?e(t):e}function Ze(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function hs(e){return e==="x"?"y":"x"}function gs(e){return e==="y"?"height":"width"}function mt(e){return["top","bottom"].includes(Ze(e))?"y":"x"}function ms(e){return hs(mt(e))}function tg(e,t,n){n===void 0&&(n=!1);const r=Xt(e),o=ms(e),s=gs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=gr(i)),[i,gr(i)]}function ng(e){const t=gr(e);return[jo(e),t,jo(t)]}function jo(e){return e.replace(/start|end/g,t=>eg[t])}function rg(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 og(e,t,n,r){const o=Xt(e);let s=rg(Ze(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(jo)))),s}function gr(e){return e.replace(/left|right|bottom|top/g,t=>Qh[t])}function sg(e){return{top:0,right:0,bottom:0,left:0,...e}}function wc(e){return typeof e!="number"?sg(e):{top:e,right:e,bottom:e,left:e}}function mr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ji(e,t,n){let{reference:r,floating:o}=e;const s=mt(t),i=ms(t),a=gs(i),c=Ze(t),l=s==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,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 ig=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}=Ji(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}=Ji(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}=Je(t,e),C=wc(g),S=a[f?u==="floating"?"reference":"floating":u],y=mr(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=mr(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 ag=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}=Je(e,t)||{};if(l==null)return{};const u=wc(d),f={x:n,y:r},g=ms(o),C=gs(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,_=Io(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}}}),cg=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}=Je(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Ze(o),p=mt(a),m=Ze(a)===a,D=await(c.isRTL==null?void 0:c.isRTL(l.floating)),b=f||(m||!v?[gr(a)]:ng(a)),E=C!=="none";!f&&E&&b.push(...og(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=tg(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 Zi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qi(e){return Zh.some(t=>e[t]>=0)}const lg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Je(e,t);switch(r){case"referenceHidden":{const s=await yn(t,{...o,elementContext:"reference"}),i=Zi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Qi(i)}}}case"escaped":{const s=await yn(t,{...o,altBoundary:!0}),i=Zi(s,n.floating);return{data:{escapedOffsets:i,escaped:Qi(i)}}}default:return{}}}}};async function ug(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ze(n),a=Xt(n),c=mt(n)==="y",l=["left","top"].includes(i)?-1:1,d=s&&c?-1:1,u=Je(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 dg=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 ug(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}}}}},fg=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}=Je(e,t),l={x:n,y:r},d=await yn(t,c),u=mt(Ze(o)),f=hs(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=Io(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=Io(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}}}}}},pg=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}=Je(e,t),d={x:n,y:r},u=mt(o),f=hs(u);let g=d[f],C=d[u];const v=Je(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(Ze(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}}}},hg=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}=Je(e,t),d=await yn(t,l),u=Ze(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 Nr(){return typeof window<"u"}function Jt(e){return xc(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=(xc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xc(e){return Nr()?e instanceof Node||e instanceof Pe(e).Node:!1}function $e(e){return Nr()?e instanceof Element||e instanceof Pe(e).Element:!1}function Ye(e){return Nr()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function ea(e){return!Nr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Mn(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 gg(e){return["table","td","th"].includes(Jt(e))}function kr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function vs(e){const t=ys(),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 mg(e){let t=vt(e);for(;Ye(t)&&!Bt(t);){if(vs(t))return t;if(kr(t))return null;t=vt(t)}return null}function ys(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bt(e){return["html","body","#document"].includes(Jt(e))}function Fe(e){return Pe(e).getComputedStyle(e)}function Ir(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vt(e){if(Jt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ea(e)&&e.host||Ke(e);return ea(t)?t.host:t}function Sc(e){const t=vt(e);return Bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&Mn(t)?t:Sc(t)}function bn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Sc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pe(o);if(s){const a=Lo(i);return t.concat(i,i.visualViewport||[],Mn(o)?o:[],a&&n?bn(a):[])}return t.concat(o,bn(o,[],n))}function Lo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cc(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=hr(n)!==s||hr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function bs(e){return $e(e)?e:e.contextElement}function Ft(e){const t=bs(e);if(!Ye(t))return Ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Cc(t);let i=(s?hr(n.width):n.width)/r,a=(s?hr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const vg=Ue(0);function Dc(e){const t=Pe(e);return!ys()||!t.visualViewport?vg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yg(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=bs(e);let i=Ue(1);t&&(r?$e(r)&&(i=Ft(r)):i=Ft(e));const a=yg(s,n,r)?Dc(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=Lo(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=Lo(C)}}return mr({width:d,height:u,x:c,y:l})}function ws(e,t){const n=Ir(e).scrollLeft;return t?t.left+n:Rt(Ke(e)).left+n}function Ec(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ws(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function bg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ke(r),a=t?kr(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)&&((Jt(r)!=="body"||Mn(i))&&(c=Ir(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?Ec(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 wg(e){return Array.from(e.getClientRects())}function xg(e){const t=Ke(e),n=Ir(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+ws(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 Sg(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=ys();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function Cg(e,t){const n=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 ta(e,t,n){let r;if(t==="viewport")r=Sg(e,n);else if(t==="document")r=xg(Ke(e));else if($e(t))r=Cg(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 mr(r)}function Rc(e,t){const n=vt(e);return n===t||!$e(n)||Bt(n)?!1:Fe(n).position==="fixed"||Rc(n,t)}function Dg(e,t){const n=t.get(e);if(n)return n;let r=bn(e,[],!1).filter(a=>$e(a)&&Jt(a)!=="body"),o=null;const s=Fe(e).position==="fixed";let i=s?vt(e):e;for(;$e(i)&&!Bt(i);){const a=Fe(i),c=vs(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Mn(i)&&!c&&Rc(e,i))?r=r.filter(d=>d!==i):o=a,i=vt(i)}return t.set(e,r),r}function Eg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?kr(t)?[]:Dg(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const u=ta(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},ta(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Rg(e){const{width:t,height:n}=Cc(e);return{width:t,height:n}}function Tg(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((Jt(t)!=="body"||Mn(o))&&(a=Ir(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=ws(o));const l=o&&!r&&!s?Ec(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 go(e){return Fe(e).position==="static"}function na(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 Tc(e,t){const n=Pe(e);if(kr(e))return n;if(!Ye(e)){let o=vt(e);for(;o&&!Bt(o);){if($e(o)&&!go(o))return o;o=vt(o)}return n}let r=na(e,t);for(;r&&gg(r)&&go(r);)r=na(r,t);return r&&Bt(r)&&go(r)&&!vs(r)?n:r||mg(e)||n}const Mg=async function(e){const t=this.getOffsetParent||Tc,n=this.getDimensions,r=await n(e.floating);return{reference:Tg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Og(e){return Fe(e).direction==="rtl"}const Pg={convertOffsetParentRelativeRectToViewportRelativeRect:bg,getDocumentElement:Ke,getClippingRect:Eg,getOffsetParent:Tc,getElementRects:Mg,getClientRects:wg,getDimensions:Rg,getScale:Ft,isElement:$e,isRTL:Og};function Mc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ag(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=Yn(u),v=Yn(o.clientWidth-(d+f)),S=Yn(o.clientHeight-(u+g)),y=Yn(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&&!Mc(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 _g(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=bs(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?Ag(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&&!Mc(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 Ng=dg,kg=fg,Ig=cg,jg=hg,Lg=lg,ra=ag,$g=pg,Fg=(e,t,n)=>{const r=new Map,o={platform:Pg,...n},s={...o.platform,_c:r};return ig(e,t,{...o,platform:s})};var rr=typeof document<"u"?R.useLayoutEffect:R.useEffect;function vr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!vr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!vr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Oc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oa(e,t){const n=Oc(e);return Math.round(t*n)/n}function mo(e){const t=x.useRef(e);return rr(()=>{t.current=e}),t}function zg(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);vr(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=mo(c),j=mo(o),B=mo(l),H=x.useCallback(()=>{if(!E.current||!w.current)return;const P={placement:t,strategy:n,middleware:f};j.current&&(P.platform=j.current),Fg(E.current,w.current,P).then(N=>{const M={...N,isPositioned:B.current!==!1};k.current&&!vr(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=oa(O.floating,d.x),M=oa(O.floating,d.y);return a?{...P,transform:"translate("+N+"px, "+M+"px)",...Oc(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 Wg=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?ra({element:r.current,padding:o}).fn(n):{}:r?ra({element:r,padding:o}).fn(n):{}}}},Bg=(e,t)=>({...Ng(e),options:[e,t]}),Hg=(e,t)=>({...kg(e),options:[e,t]}),Vg=(e,t)=>({...$g(e),options:[e,t]}),Ug=(e,t)=>({...Ig(e),options:[e,t]}),Yg=(e,t)=>({...jg(e),options:[e,t]}),Kg=(e,t)=>({...Lg(e),options:[e,t]}),Gg=(e,t)=>({...Wg(e),options:[e,t]});var qg="Arrow",Pc=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"})})});Pc.displayName=qg;var Xg=Pc;function Jg(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 xs="Popper",[Ac,bt]=yt(xs),[Zg,_c]=Ac(xs),Nc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return h.jsx(Zg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Nc.displayName=xs;var kc="PopperAnchor",Ic=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=_c(kc,n),i=x.useRef(null),a=ce(t,i);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:h.jsx(se.div,{...o,ref:a})});Ic.displayName=kc;var Ss="PopperContent",[Qg,em]=Ac(Ss),jc=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=_c(Ss,n),[y,p]=x.useState(null),m=ce(t,oe=>p(oe)),[D,b]=x.useState(null),E=Jg(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(nm),altBoundary:B},{refs:k,floatingStyles:_,placement:O,isPositioned:L,middlewareData:P}=zg({strategy:"fixed",placement:A,whileElementsMounted:(...oe)=>_g(...oe,{animationFrame:g==="always"}),elements:{reference:S.anchor},middleware:[Bg({mainAxis:o+T,alignmentAxis:i}),c&&Hg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Vg():void 0,...H}),c&&Ug({...H}),Yg({...H,apply:({elements:oe,rects:ue,availableWidth:Ce,availableHeight:Ee})=>{const{width:et,height:jn}=ue.reference,tt=oe.floating.style;tt.setProperty("--radix-popper-available-width",`${Ce}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&&Gg({element:D,padding:a}),rm({arrowWidth:w,arrowHeight:T}),f&&Kg({strategy:"referenceHidden",...H})]}),[N,M]=Fc(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,[J,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:J,"--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(Qg,{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"}})})})});jc.displayName=Ss;var Lc="PopperArrow",tm={top:"bottom",right:"left",bottom:"top",left:"right"},$c=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=em(Lc,r),i=tm[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(Xg,{...o,ref:n,style:{...o.style,display:"block"}})})});$c.displayName=Lc;function nm(e){return e!==null}var rm=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]=Fc(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 Fc(e){const[t,n="center"]=e.split("-");return[t,n]}var jr=Nc,On=Ic,Lr=jc,$r=$c,om="Portal",Pn=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?Zu.createPortal(h.jsx(se.div,{...r,ref:t}),i):null});Pn.displayName=om;function sm(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Qe=e=>{const{present:t,children:n}=e,r=im(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=ce(r.ref,am(o));return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:s}):null};Qe.displayName="Presence";function im(e){const[t,n]=x.useState(),r=x.useRef({}),o=x.useRef(e),s=x.useRef("none"),i=e?"mounted":"unmounted",[a,c]=sm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=Kn(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=Kn(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=Kn(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=Kn(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 Kn(e){return(e==null?void 0:e.animationName)||"none"}function am(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)}var vo="rovingFocusGroup.onEntryFocus",cm={bubbles:!1,cancelable:!0},Fr="RovingFocusGroup",[$o,zc,lm]=ds(Fr),[um,Wc]=yt(Fr,[lm]),[dm,fm]=um(Fr),Bc=x.forwardRef((e,t)=>h.jsx($o.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx($o.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(pm,{...e,ref:t})})}));Bc.displayName=Fr;var pm=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=ce(t,f),C=fs(s),[v=null,S]=Et({prop:i,defaultProp:a,onChange:c}),[y,p]=x.useState(!1),m=Ie(l),D=zc(n),b=x.useRef(!1),[E,w]=x.useState(0);return x.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(vo,m),()=>T.removeEventListener(vo,m)},[m]),h.jsx(dm,{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(vo,cm);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);Uc(_,d)}}b.current=!1}),onBlur:ee(e.onBlur,()=>p(!1))})})}),Hc="RovingFocusGroupItem",Vc=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=ht(),c=s||a,l=fm(Hc,n),d=l.currentTabStopId===c,u=zc(n),{onFocusableItemAdd:f,onFocusableItemRemove:g}=l;return x.useEffect(()=>{if(r)return f(),()=>g()},[r,f,g]),h.jsx($o.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=mm(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?vm(y,p+1):y.slice(p+1)}setTimeout(()=>Uc(y))}})})})});Vc.displayName=Hc;var hm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mm(e,t,n){const r=gm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return hm[r]}function Uc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ym=Bc,bm=Vc,wm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},It=new WeakMap,Gn=new WeakMap,qn={},yo=0,Yc=function(e){return e&&(e.host||Yc(e.parentNode))},xm=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})},Sm=function(e,t,n,r){var o=xm(t,Array.isArray(e)?e:[e]);qn[n]||(qn[n]=new WeakMap);var s=qn[n],i=[],a=new Set,c=new Set(o),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};o.forEach(l);var d=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(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&&Gn.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(),yo++,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||(Gn.has(u)||u.removeAttribute(r),Gn.delete(u)),g||u.removeAttribute(n)}),yo--,yo||(It=new WeakMap,It=new WeakMap,Gn=new WeakMap,qn={})}},Cs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=wm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Sm(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 Kc(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 Cm(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",Dm="with-scroll-bars-hidden",Em="--removed-body-scroll-bar-size";function bo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rm(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 Tm=typeof window<"u"?x.useLayoutEffect:x.useEffect,sa=new WeakMap;function Mm(e,t){var n=Rm(null,function(r){return e.forEach(function(o){return bo(o,r)})});return Tm(function(){var r=sa.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||bo(a,null)}),s.forEach(function(a){o.has(a)||bo(a,i)})}sa.set(n,e)},[e]),n}function Om(e){return e}function Pm(e,t){t===void 0&&(t=Om);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 Am(e){e===void 0&&(e={});var t=Pm(null);return t.options=He({async:!0,ssr:!1},e),t}var Gc=function(e){var t=e.sideCar,n=Kc(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))};Gc.isSideCarExport=!0;function _m(e,t){return e.useMedium(t),Gc}var qc=Am(),wo=function(){},zr=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:wo,onWheelCapture:wo,onTouchMoveCapture:wo}),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=Kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=f,b=Mm([n,t]),E=He(He({},m),o);return x.createElement(x.Fragment,null,d&&x.createElement(D,{sideCar:qc,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))});zr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zr.classNames={fullWidth:sr,zeroRight:or};var Nm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function km(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Nm();return t&&e.setAttribute("nonce",t),e}function Im(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function jm(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=km())&&(Im(t,n),jm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$m=function(){var e=Lm();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xc=function(){var e=$m(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Fm={left:0,top:0,right:0,gap:0},xo=function(e){return parseInt(e||"",10)||0},zm=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[xo(n),xo(r),xo(o)]},Wm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Fm;var t=zm(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])}},Bm=Xc(),zt="data-scroll-locked",Hm=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
137
- .`.concat(Dm,` {
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,` {
138
122
  overflow: hidden `).concat(r,`;
139
123
  padding-right: `).concat(a,"px ").concat(r,`;
140
124
  }
@@ -168,9 +152,30 @@ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var F=X(W,z,U,J,K+"."+z,
168
152
  }
169
153
 
170
154
  body[`).concat(zt,`] {
171
- `).concat(Em,": ").concat(a,`px;
155
+ `).concat(Im,": ").concat(a,`px;
172
156
  }
173
- `)},ia=function(){var e=parseInt(document.body.getAttribute(zt)||"0",10);return isFinite(e)?e:0},Vm=function(){x.useEffect(function(){return document.body.setAttribute(zt,(ia()+1).toString()),function(){var e=ia()-1;e<=0?document.body.removeAttribute(zt):document.body.setAttribute(zt,e.toString())}},[])},Um=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Vm();var s=x.useMemo(function(){return Wm(o)},[o]);return x.createElement(Bm,{styles:Hm(s,!t,o,n?"":"!important")})},Fo=!1;if(typeof window<"u")try{var Xn=Object.defineProperty({},"passive",{get:function(){return Fo=!0,!0}});window.addEventListener("test",Xn,Xn),window.removeEventListener("test",Xn,Xn)}catch{Fo=!1}var jt=Fo?{passive:!1}:!1,Ym=function(e){return e.tagName==="TEXTAREA"},Jc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ym(e)&&n[t]==="visible")},Km=function(e){return Jc(e,"overflowY")},Gm=function(e){return Jc(e,"overflowX")},aa=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=Qc(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qm=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Xm=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Zc=function(e,t){return e==="v"?Km(t):Gm(t)},Qc=function(e,t){return e==="v"?qm(t):Xm(t)},Jm=function(e,t){return e==="h"&&t==="rtl"?-1:1},Zm=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,f=0;do{var g=Qc(e,a),C=g[0],v=g[1],S=g[2],y=v-S-s*C;(C||y)&&Zc(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},Jn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ca=function(e){return[e.deltaX,e.deltaY]},la=function(e){return e&&"current"in e?e.current:e},Qm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ev=function(e){return`
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`
174
158
  .block-interactivity-`.concat(e,` {pointer-events: none;}
175
159
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
176
- `)},tv=0,Lt=[];function nv(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(tv++)[0],s=x.useState(Xc)[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=Cm([e.lockRef.current],(e.shards||[]).map(la),!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=Jn(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=aa(w,E);if(!T)return!0;if(T?b=w:(b=w==="v"?"h":"v",T=aa(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 Zm(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?ca(S):Jn(S),p=t.current.filter(function(b){return b.name===S.type&&(b.target===S.target||S.target===b.shadowParent)&&Qm(b.delta,y)})[0];if(p&&p.should){S.cancelable&&S.preventDefault();return}if(!p){var m=(i.current.shards||[]).map(la).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:rv(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=Jn(v),r.current=void 0},[]),u=x.useCallback(function(v){l(v.type,ca(v),v.target,a(v,e.lockRef.current))},[]),f=x.useCallback(function(v){l(v.type,Jn(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:ev(o)}):null,g?x.createElement(Um,{gapMode:e.gapMode}):null)}function rv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ov=_m(qc,nv);var Wr=x.forwardRef(function(e,t){return x.createElement(zr,He({},e,{ref:t,sideCar:ov}))});Wr.classNames=zr.classNames;var zo=["Enter"," "],sv=["ArrowDown","PageUp","Home"],el=["ArrowUp","PageDown","End"],iv=[...sv,...el],av={ltr:[...zo,"ArrowRight"],rtl:[...zo,"ArrowLeft"]},cv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},An="Menu",[wn,lv,uv]=ds(An),[Ot,tl]=yt(An,[uv,bt,Wc]),Br=bt(),nl=Wc(),[dv,Pt]=Ot(An),[fv,_n]=Ot(An),rl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Br(t),[c,l]=x.useState(null),d=x.useRef(!1),u=Ie(s),f=fs(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(jr,{...a,children:h.jsx(dv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:h.jsx(fv,{scope:t,onClose:x.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})};rl.displayName=An;var pv="MenuAnchor",Ds=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Br(n);return h.jsx(On,{...o,...r,ref:t})});Ds.displayName=pv;var Es="MenuPortal",[hv,ol]=Ot(Es,{forceMount:void 0}),sl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Pt(Es,t);return h.jsx(hv,{scope:t,forceMount:n,children:h.jsx(Qe,{present:n||s.open,children:h.jsx(Pn,{asChild:!0,container:o,children:r})})})};sl.displayName=Es;var ke="MenuContent",[gv,Rs]=Ot(ke),il=x.forwardRef((e,t)=>{const n=ol(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(mv,{...o,ref:t}):h.jsx(vv,{...o,ref:t})})})})}),mv=x.forwardRef((e,t)=>{const n=Pt(ke,e.__scopeMenu),r=x.useRef(null),o=ce(t,r);return x.useEffect(()=>{const s=r.current;if(s)return Cs(s)},[]),h.jsx(Ts,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),vv=x.forwardRef((e,t)=>{const n=Pt(ke,e.__scopeMenu);return h.jsx(Ts,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ts=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=Br(n),m=nl(n),D=lv(n),[b,E]=x.useState(null),w=x.useRef(null),T=ce(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?Wr: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),J=Ov(U,M,Y),K=(G=$.find(q=>q.textValue===J))==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),[]),ps();const P=x.useCallback(N=>{var $,V;return H.current===(($=B.current)==null?void 0:$.side)&&Av(N,(V=B.current)==null?void 0:V.area)},[]);return h.jsx(gv,{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(_r,{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(Tn,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,onDismiss:g,children:h.jsx(ym,{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(Lr,{role:"menu","aria-orientation":"vertical","data-state":Sl(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||!iv.includes(N.key))return;N.preventDefault();const K=D().filter(W=>!W.disabled).map(W=>W.ref.current);el.includes(N.key)&&K.reverse(),Tv(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}}))})})})})})})});il.displayName=ke;var yv="MenuGroup",Ms=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"group",...r,ref:t})});Ms.displayName=yv;var bv="MenuLabel",al=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{...r,ref:t})});al.displayName=bv;var yr="MenuItem",ua="menu.itemSelect",Hr=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=x.useRef(null),i=_n(yr,e.__scopeMenu),a=Rs(yr,e.__scopeMenu),c=ce(t,s),l=x.useRef(!1),d=()=>{const u=s.current;if(!n&&u){const f=new CustomEvent(ua,{bubbles:!0,cancelable:!0});u.addEventListener(ua,g=>r==null?void 0:r(g),{once:!0}),mc(u,f),f.defaultPrevented?l.current=!1:i.onClose()}};return h.jsx(cl,{...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===" "||zo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Hr.displayName=yr;var cl=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Rs(yr,n),a=nl(n),c=x.useRef(null),l=ce(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(bm,{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))})})})}),wv="MenuCheckboxItem",ll=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(hl,{scope:e.__scopeMenu,checked:n,children:h.jsx(Hr,{role:"menuitemcheckbox","aria-checked":br(n)?"mixed":n,...o,ref:t,"data-state":Ps(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(br(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ll.displayName=wv;var ul="MenuRadioGroup",[xv,Sv]=Ot(ul,{value:void 0,onValueChange:()=>{}}),dl=x.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ie(r);return h.jsx(xv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(Ms,{...o,ref:t})})});dl.displayName=ul;var fl="MenuRadioItem",pl=x.forwardRef((e,t)=>{const{value:n,...r}=e,o=Sv(fl,e.__scopeMenu),s=n===o.value;return h.jsx(hl,{scope:e.__scopeMenu,checked:s,children:h.jsx(Hr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ps(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});pl.displayName=fl;var Os="MenuItemIndicator",[hl,Cv]=Ot(Os,{checked:!1}),gl=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Cv(Os,n);return h.jsx(Qe,{present:r||br(s.checked)||s.checked===!0,children:h.jsx(se.span,{...o,ref:t,"data-state":Ps(s.checked)})})});gl.displayName=Os;var Dv="MenuSeparator",ml=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ml.displayName=Dv;var Ev="MenuArrow",vl=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Br(n);return h.jsx($r,{...o,...r,ref:t})});vl.displayName=Ev;var Rv="MenuSub",[Uw,yl]=Ot(Rv),un="MenuSubTrigger",bl=x.forwardRef((e,t)=>{const n=Pt(un,e.__scopeMenu),r=_n(un,e.__scopeMenu),o=yl(un,e.__scopeMenu),s=Rs(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(Ds,{asChild:!0,...l,children:h.jsx(cl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Sl(n.open),...e,ref:Ar(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===" "||av[r.dir].includes(u.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),u.preventDefault())})})})});bl.displayName=un;var wl="MenuSubContent",xl=x.forwardRef((e,t)=>{const n=ol(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Pt(ke,e.__scopeMenu),i=_n(ke,e.__scopeMenu),a=yl(wl,e.__scopeMenu),c=x.useRef(null),l=ce(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(Ts,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus: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=cv[i.dir].includes(d.key);u&&f&&(s.onOpenChange(!1),(g=a.trigger)==null||g.focus(),d.preventDefault())})})})})})});xl.displayName=wl;function Sl(e){return e?"open":"closed"}function br(e){return e==="indeterminate"}function Ps(e){return br(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 Mv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ov(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=Mv(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 Pv(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 Av(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Pv(n,t)}function xn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _v=rl,Nv=Ds,kv=sl,Iv=il,jv=Ms,Lv=al,$v=Hr,Fv=ll,zv=dl,Wv=pl,Bv=gl,Hv=ml,Vv=vl,Uv=bl,Yv=xl,As="DropdownMenu",[Kv,Yw]=yt(As,[tl]),Se=tl(),[Gv,Cl]=Kv(As),Dl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=Se(t),l=x.useRef(null),[d=!1,u]=Et({prop:o,defaultProp:s,onChange:i});return h.jsx(Gv,{scope:t,triggerId:ht(),triggerRef:l,contentId:ht(),open:d,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(f=>!f),[u]),modal:a,children:h.jsx(_v,{...c,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Dl.displayName=As;var El="DropdownMenuTrigger",Rl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Cl(El,n),i=Se(n);return h.jsx(Nv,{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:Ar(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())})})})});Rl.displayName=El;var qv="DropdownMenuPortal",Tl=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Se(t);return h.jsx(kv,{...r,...n})};Tl.displayName=qv;var Ml="DropdownMenuContent",Ol=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Cl(Ml,n),s=Se(n),i=x.useRef(!1);return h.jsx(Iv,{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)"}})});Ol.displayName=Ml;var Xv="DropdownMenuGroup",Jv=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(jv,{...o,...r,ref:t})});Jv.displayName=Xv;var Zv="DropdownMenuLabel",Pl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Lv,{...o,...r,ref:t})});Pl.displayName=Zv;var Qv="DropdownMenuItem",Al=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx($v,{...o,...r,ref:t})});Al.displayName=Qv;var ey="DropdownMenuCheckboxItem",_l=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Fv,{...o,...r,ref:t})});_l.displayName=ey;var ty="DropdownMenuRadioGroup",ny=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(zv,{...o,...r,ref:t})});ny.displayName=ty;var ry="DropdownMenuRadioItem",oy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Wv,{...o,...r,ref:t})});oy.displayName=ry;var sy="DropdownMenuItemIndicator",Nl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Bv,{...o,...r,ref:t})});Nl.displayName=sy;var iy="DropdownMenuSeparator",kl=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Hv,{...o,...r,ref:t})});kl.displayName=iy;var ay="DropdownMenuArrow",cy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Vv,{...o,...r,ref:t})});cy.displayName=ay;var ly="DropdownMenuSubTrigger",uy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Uv,{...o,...r,ref:t})});uy.displayName=ly;var dy="DropdownMenuSubContent",fy=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsx(Yv,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fy.displayName=dy;var py=Dl,hy=Rl,gy=Tl,my=Ol,vy=Pl,yy=Al,by=_l,wy=Nl,xy=kl;function _s({...e}){return h.jsx(py,{"data-slot":"dropdown-menu",...e})}function Ns({...e}){return h.jsx(hy,{"data-slot":"dropdown-menu-trigger",...e})}function ks({className:e,sideOffset:t=4,...n}){return h.jsx(gy,{children:h.jsx(my,{"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 da({className:e,inset:t,variant:n="default",...r}){return h.jsx(yy,{"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 Sy({className:e,children:t,checked:n,...r}){return h.jsxs(by,{"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(wy,{children:h.jsx(pc,{className:"size-4"})})}),t]})}function Cy({className:e,inset:t,...n}){return h.jsx(vy,{"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 Dy({className:e,...t}){return h.jsx(xy,{"data-slot":"dropdown-menu-separator",className:ne("bg-border -mx-1 my-1 h-px",e),...t})}var Ey="Label",Il=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())}}));Il.displayName=Ey;var Ry=Il;function Ty({className:e,...t}){return h.jsx(Ry,{"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 jl=R.createContext(void 0),Tt=()=>{const e=R.use(jl);if(!e)throw new Error("useBookingModal must be used within a BookingModalProvider");return e},My=({onClose:e,onOpenChange:t,buttonTrigger:n})=>{const[r,o]=R.useState({x:0,y:0}),s=Tt(),{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(_s,{dir:"ltr",modal:!1,open:!0,defaultOpen:!1,onOpenChange:t,children:[h.jsx(Ns,{asChild:!0,children:n}),h.jsxs(ks,{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(Ty,{ref:d,className:"w-full hover:cursor-move p-4",...a,children:"Appointment"}),h.jsx(Th,{className:"hover:cursor-pointer hover:text-gray-500",onClick:e})]}),s.createBookingModal]})]})},Oy="_Draggable_1rwnc_7",Py="_pendingDelay_1rwnc_22",Ay="_dragging_1rwnc_59",wr={Draggable:Oy,pendingDelay:Py,dragging:Ay};var _y="Toggle",Ll=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 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)})})});Ll.displayName=_y;var Ny=Ll;const fa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pa=Ga,$l=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pa(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=fa(d)||fa(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 pa(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},ky=$l("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 Iy({className:e,variant:t,size:n,...r}){return h.jsx(Ny,{"data-slot":"toggle",className:ne(ky({variant:t,size:n,className:e})),...r})}var jy="VisuallyHidden",Is=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}}));Is.displayName=jy;var Ly=Is,[Vr,Kw]=yt("Tooltip",[bt]),Ur=bt(),Fl="TooltipProvider",$y=700,Wo="tooltip.open",[Fy,js]=Vr(Fl),zl=e=>{const{__scopeTooltip:t,delayDuration:n=$y,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(Fy,{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})};zl.displayName=Fl;var Yr="Tooltip",[zy,Nn]=Vr(Yr),Wl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=js(Yr,e.__scopeTooltip),l=Ur(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]=Et({prop:r,defaultProp:o,onChange:w=>{w?(c.onOpen(),document.dispatchEvent(new CustomEvent(Wo))):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(jr,{...l,children:h.jsx(zy,{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})})};Wl.displayName=Yr;var Bo="TooltipTrigger",Bl=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Nn(Bo,n),s=js(Bo,n),i=Ur(n),a=x.useRef(null),c=ce(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(On,{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)})})});Bl.displayName=Bo;var Ls="TooltipPortal",[Wy,By]=Vr(Ls,{forceMount:void 0}),Hl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Nn(Ls,t);return h.jsx(Wy,{scope:t,forceMount:n,children:h.jsx(Qe,{present:n||s.open,children:h.jsx(Pn,{asChild:!0,container:o,children:r})})})};Hl.displayName=Ls;var Ht="TooltipContent",Vl=x.forwardRef((e,t)=>{const n=By(Ht,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Nn(Ht,e.__scopeTooltip);return h.jsx(Qe,{present:r||i.open,children:i.disableHoverableContent?h.jsx(Ul,{side:o,...s,ref:t}):h.jsx(Hy,{side:o,...s,ref:t})})}),Hy=x.forwardRef((e,t)=>{const n=Nn(Ht,e.__scopeTooltip),r=js(Ht,e.__scopeTooltip),o=x.useRef(null),s=ce(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=Yy(y,S.getBoundingClientRect()),m=Ky(y,p),D=Gy(v.getBoundingClientRect()),b=Xy([...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=!qy(y,i);p?f():m&&(f(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,d,i,l,f]),h.jsx(Ul,{...e,ref:s})}),[Vy,Uy]=Vr(Yr,{isInside:!1}),Ul=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Nn(Ht,n),l=Ur(n),{onClose:d}=c;return x.useEffect(()=>(document.addEventListener(Wo,d),()=>document.removeEventListener(Wo,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(Tn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:h.jsxs(Lr,{"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(gc,{children:r}),h.jsx(Vy,{scope:n,isInside:!0,children:h.jsx(Ly,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Vl.displayName=Ht;var Yl="TooltipArrow",Kl=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ur(n);return Uy(Yl,n).isInside?null:h.jsx($r,{...o,...r,ref:t})});Kl.displayName=Yl;function Yy(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 Ky(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 Gy(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 qy(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 Xy(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),Jy(t)}function Jy(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 Zy=zl,Qy=Wl,eb=Bl,tb=Hl,nb=Vl,rb=Kl;function $s({delayDuration:e=0,...t}){return h.jsx(Zy,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Gl({...e}){return h.jsx($s,{children:h.jsx(Qy,{"data-slot":"tooltip",...e})})}function ql({...e}){return h.jsx(eb,{"data-slot":"tooltip-trigger",...e})}function Xl({className:e,sideOffset:t=0,children:n,...r}){return h.jsx(tb,{children:h.jsxs(nb,{"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,h.jsx(rb,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const ob=()=>{const[e,t]=R.useState(!1);return h.jsx($s,{children:h.jsxs(Gl,{children:[h.jsx(ql,{asChild:!0,children:h.jsx("div",{children:h.jsx(Iy,{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(rh,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),h.jsx(Xl,{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"})})]})})},sb=$l("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 Vt({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?pt:"button";return h.jsx(s,{"data-slot":"button",className:ne(sb({variant:t,size:n,className:e})),...o})}var Fs="Popover",[Jl,Gw]=yt(Fs,[bt]),kn=bt(),[ib,wt]=Jl(Fs),Zl=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]=Et({prop:r,defaultProp:o,onChange:s});return h.jsx(jr,{...a,children:h.jsx(ib,{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})})};Zl.displayName=Fs;var Ql="PopoverAnchor",ab=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(On,{...s,...r,ref:t})});ab.displayName=Ql;var eu="PopoverTrigger",tu=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(eu,n),s=kn(n),i=ce(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(On,{asChild:!0,...s,children:a})});tu.displayName=eu;var zs="PopoverPortal",[cb,lb]=Jl(zs,{forceMount:void 0}),nu=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=wt(zs,t);return h.jsx(cb,{scope:t,forceMount:n,children:h.jsx(Qe,{present:n||s.open,children:h.jsx(Pn,{asChild:!0,container:o,children:r})})})};nu.displayName=zs;var Ut="PopoverContent",ru=x.forwardRef((e,t)=>{const n=lb(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(ub,{...o,ref:t}):h.jsx(db,{...o,ref:t})})});ru.displayName=Ut;var ub=x.forwardRef((e,t)=>{const n=wt(Ut,e.__scopePopover),r=x.useRef(null),o=ce(t,r),s=x.useRef(!1);return x.useEffect(()=>{const i=r.current;if(i)return Cs(i)},[]),h.jsx(Wr,{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})})})}),db=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 ps(),h.jsx(_r,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(Tn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:h.jsx(Lr,{"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",fb=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))})});fb.displayName=su;var pb="PopoverArrow",hb=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kn(n);return h.jsx($r,{...o,...r,ref:t})});hb.displayName=pb;function iu(e){return e?"open":"closed"}var gb=Zl,mb=tu,vb=nu,yb=ru;function bb({...e}){return h.jsx(gb,{"data-slot":"popover",...e})}function wb({...e}){return h.jsx(mb,{"data-slot":"popover-trigger",...e})}function xb({className:e,align:t="center",sideOffset:n=4,...r}){return h.jsx(vb,{children:h.jsx(yb,{"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 ha(e,[t,n]){return Math.min(n,Math.max(t,e))}function Sb(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 Cb=[" ","Enter","ArrowUp","ArrowDown"],Db=[" ","Enter"],In="Select",[Kr,Gr,Eb]=ds(In),[Zt,qw]=yt(In,[Eb,bt]),qr=bt(),[Rb,xt]=Zt(In),[Tb,Mb]=Zt(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=fs(l),[w=!1,T]=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,k]=x.useState(new Set),_=Array.from(H).map(O=>O.props.value).join(";");return h.jsx(jr,{...v,children:h.jsxs(Rb,{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(Tb,{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=ce(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(On,{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===" ")&&Cb.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=ce(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 Ob="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=Ob;var Pb="SelectPortal",pu=e=>h.jsx(Pn,{asChild:!0,...e});pu.displayName=Pb;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]=Zt(Mt),Ab="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=ce(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 Cs(m)},[m]),ps();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]),J=r==="popper"?Ho:vu,K=J===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(Wr,{as:pt,allowPinchZoom:!0,children:h.jsx(_r,{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(Tn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:h.jsx(J,{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=Ab;var _b="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=ce(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,ue=w.width+oe,Ce=Math.max(ue,T.width),Ee=window.innerWidth-je,et=ha(F,[je,Math.max(je,Ee-Ce)]);a.style.minWidth=ue+"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,ue=w.width+oe,Ce=Math.max(ue,T.width),Ee=window.innerWidth-je,et=ha(F,[je,Math.max(je,Ee-Ce)]);a.style.minWidth=ue+"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,J=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(J,K+(X?Y:0)+F+L),ue=G+oe;a.style.height=ue+"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(kb,{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=_b;var Nb="SelectPopperPosition",Ho=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=je,...s}=e,i=qr(n);return h.jsx(Lr,{...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=Nb;var[kb,Ws]=Zt(Mt,{}),Vo="SelectViewport",yu=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=St(Vo,n),i=Ws(Vo,n),a=ce(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",[Ib,jb]=Zt(bu),Lb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ht();return h.jsx(Ib,{scope:n,id:o,children:h.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Lb.displayName=bu;var wu="SelectLabel",$b=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=jb(wu,n);return h.jsx(se.div,{id:o.id,...r,ref:t})});$b.displayName=wu;var xr="SelectItem",[Fb,xu]=Zt(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=ce(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(Fb,{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===" "||(Db.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=Mb(dn,n),[d,u]=x.useState(null),f=ce(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=ce(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=ce(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()})})}),zb="SelectSeparator",Wb=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});Wb.displayName=zb;var Ko="SelectArrow",Bb=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($r,{...o,...r,ref:t}):null});Bb.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=ce(t,o),i=Sb(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(Is,{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=Hb(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 Hb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Vb=au,Ub=lu,Yb=du,Kb=fu,Gb=pu,qb=hu,Xb=yu,Jb=Su,Zb=Cu,Qb=Eu,ew=Ru,tw=Tu;function nw({...e}){return h.jsx(Vb,{"data-slot":"select",...e})}function rw({...e}){return h.jsx(Yb,{"data-slot":"select-value",...e})}function ow({className:e,size:t="default",children:n,...r}){return h.jsxs(Ub,{"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(Kb,{asChild:!0,children:h.jsx(hc,{className:"size-4 opacity-50"})})]})}function sw({className:e,children:t,position:n="popper",...r}){return h.jsx(Gb,{children:h.jsxs(qb,{"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(aw,{}),h.jsx(Xb,{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(cw,{})]})})}function iw({className:e,children:t,...n}){return h.jsxs(Jb,{"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(Qb,{children:h.jsx(pc,{className:"size-4"})})}),h.jsx(Zb,{children:t})]})}function aw({className:e,...t}){return h.jsx(ew,{"data-slot":"select-scroll-up-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(gh,{className:"size-4"})})}function cw({className:e,...t}){return h.jsx(tw,{"data-slot":"select-scroll-down-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(hc,{className:"size-4"})})}const lw=({options:e,onChange:t})=>h.jsxs(nw,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[h.jsx(ow,{className:"w-[180px]",children:h.jsx(rw,{placeholder:"view"})}),h.jsx(sw,{children:e.map(n=>h.jsx(iw,{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=Rn(),{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(bb,{open:!0,onOpenChange:n,children:[h.jsx(wb,{}),h.jsx(xb,{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(ob,{}),h.jsx(Vt,{type:"button",variant:"outline",size:"icon",children:h.jsx(Ch,{className:"h-3 w-3"})}),h.jsx(Vt,{type:"button",variant:"outline",size:"icon",onClick:p,children:h.jsx(Eh,{className:"h-3 w-3"})}),h.jsx(lw,{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 uw(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 dw=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:uw(t,n,r)},fw=({bookingInit:e,slotData:t,heightStyle:n})=>h.jsx(Df,{modifiers:[dw],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(_o,{booking:e,slotData:t})})}),ga=600,pw=15,hw=({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===de.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(fw,{bookingInit:e,slotData:t,heightStyle:`${B}rem`}),h.jsx("div",{className:"w-full h-[2rem] z-100 relative",children:h.jsx(pr,{bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${B}rem`})})]}):h.jsx(pr,{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})})]})},gw=.2,Bs=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=R.useState({height:ga,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+gw:E}),t&&t(D)}},g=async()=>{const m=C(e.finishAt,"remove");te.timeDiffInSeconds(e.finishAt,e.startAt)!==pw&&(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:ga,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)}}},mw=({slotData:e,events:{onClick:t,renderPreviewCard:n,resetPrevView:r}})=>{const{startAt:o}=Ya(_=>_),[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(dc.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(pr,{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 h-full w-full content-center",children:e.time})})})},Zn=({slotData:e,slotPosition:t,disabledCss:n,events:r,border:o,actualTimerIndicatorChildren:s,children:i,ref:a})=>{const{updateIsDelayActive:c,isDragging:l,updateIsDragging:d}=Rn(z=>z),{emptySlotNodes:u,setSelectedNode:f}=Wt(),{onModalClose:g,onSlotClick:C}=Tt(),{finishAt:v,startAt:S,updateStartAt:y,updateFinishAt:p,updateDate:m}=Ya(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}),ue=u==null?void 0:u.get(oe);f(oe),ue&&ue.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)},J=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,J),onMouseOver:N,onMouseLeave:U,onFocus:()=>{},children:[s,(!i&&k&&!I||O)&&h.jsx(mw,{slotData:e,events:{onClick:Y,openOptions:G,renderPreviewCard:W,resetPrevView:q}}),I&&h.jsx("div",{className:"w-full",children:h.jsx(pr,{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(My,{onClose:M,onOpenChange:$,buttonTrigger:h.jsx("div",{className:"w-[8rem]"},e.key)})})]})};var vw="Separator",ma="horizontal",yw=["horizontal","vertical"],ku=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=ma,...o}=e,s=bw(r)?r:ma,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=vw;function bw(e){return yw.includes(e)}var ww=ku;function So({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return h.jsx(ww,{"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 xw{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 Sw{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 Sw,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 xw().positionBasedOnSeconds(n.time,a,r),[n.time,a,r]),u=R.useMemo(()=>t?o==="DAY"?"w-[101%]":"w-[117%]":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(va,{isRendered:t,dateToRender:a})]})}):h.jsxs("div",{style:{top:`${d-1}px`},className:ne("absolute right-0 z-100",t?"left-[-18px]":"left-[-7px]",u),children:[h.jsx(So,{style:{height:"2px"},className:e}),h.jsx(va,{isRendered:t,dateToRender:a})]})}):void 0},va=({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})})})})},ya=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=Wt(),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(Zn,{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(Zn,{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(Zn,{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(Zn,{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(hw,{booking:r,slotData:n})}return null},[t,e,n]),Cw=({dayHour:e,lunchTimeBlock:t,firstDay:n,bookingBulk:r,bookingViewType:o})=>{const s=Rn(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(ya,{dayHour:e,bookings:I,first:m,second:D,third:b,fourth:E,disabledCss:i.current,firstDay:n}):h.jsx(ya,{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 w-[80rem] p-0 relative z-[0px]",o===de.WEEK&&"max-w-[10rem]"),children:w},`${e.day}-${e.hour}-slot`)},Dw=({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(_s,{children:[h.jsx(Ns,{children:h.jsx("span",{ref:s,className:ne(a),children:e})}),h.jsxs(ks,{children:[h.jsx(Cy,{children:o}),h.jsx(Dy,{}),h.jsx(da,{children:n}),h.jsx(da,{children:r})]})]})},Ew=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=Ae(),{selectedNode:s,emptySlotNodes:i}=Wt(),[a]=R.useState({startAt:"12:00",finishAt:"12:30"}),c=R.useCallback((f,g)=>{f&&o(f,g)},[o]),l=R.useMemo(()=>n===de.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(h.Fragment,{children:e.map(g=>h.jsxs("tr",{children:[h.jsx($p,{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] bg-white",children:h.jsx(Dw,{ref:C=>c(C,g),hour:g})})},`${g}-hour`),t.map((C,v)=>h.jsx(Cw,{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])},Rw=({bookingViewType:e})=>R.useMemo(()=>{switch(e){case de.DAY:case de.WEEK:return h.jsx("div",{className:"w-full",children:h.jsx("div",{className:"w-full flex flex-row",children:h.jsx(Lp,{children:h.jsx(Ew,{})})})});default:return null}},[e]),Tw=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Gu(t)),h.jsx(Vf,{value:n.current,children:e})},Mw=({children:e,...t})=>h.jsx(jl,{value:{...t},children:e}),Iu={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},Ow=e=>Sr(t=>({...e,...Iu,updateMonthMessage:n=>{t(r=>({...r,...n}))}})),Pw=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Ow(t)),h.jsx(Va,{value:n.current,children:e})},Aw={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},_w=({children:e,content:t})=>h.jsx($s,{children:h.jsxs(Gl,{children:[h.jsx(ql,{asChild:!0,children:e}),h.jsx(Xl,{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})})]})}),Nw={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},kw=({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]})}),Iw={[de.DAY]:h.jsx(bh,{size:"20px"}),[de.WEEK]:h.jsx(vh,{size:"20px"}),[de.TABLE]:h.jsx(ah,{size:"20px"}),[de.MONTH]:h.jsx(xh,{size:"20px"})},jw=()=>{const{bookingViewType:e}=Ae(),{onViewTypeChange:t}=Hf(),{resetNodes:n,resetSelectedNode:r}=Wt(),{viewModes:o,onChangeViewType:s}=Tt(),[i,a]=R.useState(de.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:Iw[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(_s,{children:[h.jsx(Ns,{children:h.jsx(Vt,{variant:"ghost",className:"w-8 h-8",asChild:!0,children:h.jsx(_w,{content:"Calendar Modes",children:u||h.jsx(sh,{color:"gray",className:"w-full h-full"})})})}),h.jsx(ks,{className:"z-100",children:d.map(f=>h.jsxs(Sy,{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:Nw.capitalize(f.label)})]}),h.jsx(kw,{code:"o"})]},f.label))})]})},Lw=()=>{const{todayWeek:e}=Ae(),{fullYear:t,monthMessage:n,updateMonthMessage:r}=is(s=>s),o=s=>{r({month:s.getMonth(),fullYear:s.getFullYear(),monthMessage:Xe[s.getMonth()]})};return R.useEffect(()=>{const{lastDayOfWeek:s,firstDayOfWeek:i}=e(),a=i.getMonth(),c=a!==s.getMonth()?te.shortMonthDescription(i,s):Xe[a];r({monthMessage:c})},[e,r]),h.jsxs("div",{className:"w-full grid grid-cols-11 items-center pt-[0.5rem] px-3 bg-white",children:[h.jsx("div",{className:"col-start-1 gap-2 z-50",children:h.jsx($w,{updateMonthMessage:r,updateDateInfo:o})}),h.jsx("div",{className:"col-start-2 gap-2 z-50",children:h.jsx(Fw,{updateMonthMessage:r,updateDateInfo:o})}),h.jsx("div",{className:"col-start-6 content-center z-50 col-span-3",children:h.jsxs("span",{className:" text-gray-800 font-bold",children:[n," ",t]})}),h.jsx("div",{className:"col-start-12 content-center z-50",children:h.jsx(jw,{})})]})},$w=({updateMonthMessage:e,updateDateInfo:t})=>{const{nextWeek:n,previousWeek:r,bookingViewType:o,setDays:s}=Ae(),i=Wt(y=>y.resetSelectedNode),a=Wt(y=>y.resetNodes),{onDayChange:c}=Tt(),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 de.TABLE:case de.DAY:{const p=f(y);c(p,y),C(p);break}case de.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(Vt,{className:"bg-white hover:bg-gray-100 border-none rounded-full py-3 px-3 flex focus:bg-gray-200 focus:outline-0 ",variant:"default",size:"lg",onClick:()=>S("previous"),children:h.jsx(dh,{className:"h-4 w-4 text-gray-500"})}),h.jsx(Vt,{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:"default",size:"lg",onClick:()=>S("next"),children:h.jsx(ph,{className:"h-4 w-4 text-gray-500"})})]})},Fw=({updateMonthMessage:e,updateDateInfo:t})=>{const{todayWeek:n,bookingViewType:r,setTodayDay:o}=Ae(),{onTodayClick:s}=Tt(),i=()=>{const a=new Date;switch(s(a),r){case de.TABLE:case de.DAY:{o(a),t(a);break}default:{const{lastDayOfWeek:c,firstDayOfWeek:l}=n(),d=l.getMonth(),u=d!==c.getMonth()?te.shortMonthDescription(l,c):Xe[d];e({monthMessage:u});break}}};return h.jsx("div",{className:"flex flex-row justify-center",children:h.jsx(Vt,{variant:"outline",onClick:i,children:"Today"})})},zw=()=>{const{isDelayActive:e}=Rn(v=>v),{bookings:t}=Tt(),n=R.useMemo(()=>({delay:e?500:0,tolerance:100}),[e]),{setBookingBulkData:r,optimisticCardUpdate:o}=Ae(),{onCardDropCallback:s}=Tt();R.useEffect(()=>{r({user:Aw,booking:t})},[t,r]);const i=dd(ti(ja,{activationConstraint:n}),ti(La,{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.jsxs("div",{className:" z-[100]",children:[h.jsx("div",{className:"sticky top-0 w-full h-full z-[100]",children:h.jsx("div",{className:"z-[100]",children:h.jsxs(Pw,{...Iu,children:[h.jsx(Lw,{}),h.jsx(jp,{daysOfWeek:c,bookingViewType:a})]})})}),h.jsx(os,{onDragEnd:C,onDragStart:l,sensors:i,children:h.jsx(Rw,{bookingViewType:a})})]})},Ww=({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(Tw,{...ba,children:h.jsx(Mw,{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(zw,{})})})})),Bw=e=>{console.log("creating a calendar instance");const t=R.useRef(null);return{getCalendar:()=>h.jsx(Ww,{ref:t,...e})}};exports.useCalendarInstance=Bw;
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
161
+ * react-is.production.min.js
162
+ *
163
+ * Copyright (c) Facebook, Inc. and its affiliates.
164
+ *
165
+ * This source code is licensed under the MIT license found in the
166
+ * 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
168
+ * react-is.development.js
169
+ *
170
+ * Copyright (c) Facebook, Inc. and its affiliates.
171
+ *
172
+ * This source code is licensed under the MIT license found in the
173
+ * 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}/*
175
+ object-assign
176
+ (c) Sindre Sorhus
177
+ @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;