@aaravpos/appointment-booking-plugin 1.0.1 → 1.0.2
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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +13 -13
- package/dist/styles.css +28 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21,7 +21,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
21
21
|
${x}px !important;
|
|
22
22
|
}
|
|
23
23
|
`),()=>{s.current?.removeAttribute("data-motion-pop-id"),w.contains($)&&w.removeChild($)}},[t]),(0,d.jsx)(h2,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var p2=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:l,root:c})=>{const u=Lo(y2),f=(0,b.useId)();let h=!0,p=(0,b.useMemo)(()=>(h=!1,{id:f,initial:t,isPresent:r,custom:i,onExitComplete:m=>{u.set(m,!0);for(const y of u.values())if(!y)return;n&&n()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[r,u,n]);return a&&h&&(p={...p}),(0,b.useMemo)(()=>{u.forEach((m,y)=>u.set(y,!1))},[r]),b.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=(0,d.jsx)(m2,{pop:o==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:c,children:e}),(0,d.jsx)(Si.Provider,{value:p,children:e})};function y2(){return new Map}function Ph(e=!0){const t=(0,b.useContext)(Si);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);const o=(0,b.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}var nn=e=>e.key||"";function pd(e){const t=[];return b.Children.forEach(e,r=>{(0,b.isValidElement)(r)&&t.push(r)}),t}var mt=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,f]=Ph(o),h=(0,b.useMemo)(()=>pd(e),[e]),p=o&&!u?[]:h.map(nn),m=(0,b.useRef)(!0),y=(0,b.useRef)(h),g=Lo(()=>new Map),v=(0,b.useRef)(new Set),[x,$]=(0,b.useState)(h),[w,E]=(0,b.useState)(h);Zu(()=>{m.current=!1,y.current=h;for(let S=0;S<w.length;S++){const j=nn(w[S]);p.includes(j)?(g.delete(j),v.current.delete(j)):g.get(j)!==!0&&g.set(j,!1)}},[w,p.length,p.join("-")]);const C=[];if(h!==x){let S=[...h];for(let j=0;j<w.length;j++){const M=w[j],V=nn(M);p.includes(V)||(S.splice(j,0,M),C.push(M))}return a==="wait"&&C.length&&(S=C),E(pd(S)),$(h),null}process.env.NODE_ENV!=="production"&&a==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:_}=(0,b.useContext)(Ro);return(0,d.jsx)(d.Fragment,{children:w.map(S=>{const j=nn(S),M=o&&!u?!1:h===w||p.includes(j),V=()=>{if(v.current.has(j))return;if(g.has(j))v.current.add(j),g.set(j,!0);else return;let P=!0;g.forEach(U=>{U||(P=!1)}),P&&(_?.(),E(y.current),o&&f?.(),n&&n())};return(0,d.jsx)(p2,{isPresent:M,initial:!m.current||r?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:M?void 0:V,anchorX:s,anchorY:l,children:S},j)})})},Eh=(0,b.createContext)({strict:!1}),yd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},gd=!1;function g2(){if(gd)return;const e={};for(const t in yd)e[t]={isEnabled:r=>yd[t].some(n=>!!r[n])};rh(e),gd=!0}function Th(){return g2(),tv()}function v2(e){const t=Th();for(const r in e)t[r]={...t[r],...e[r]};rh(t)}var b2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||b2.has(e)}var $2=Gc({default:()=>jh}),jh,x2=cm((()=>{throw jh={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')})),Oh=e=>!Jn(e);function w2(e){typeof e=="function"&&(Oh=t=>t.startsWith("on")?!Jn(t):e(t))}try{w2((x2(),fm($2)).default)}catch{}function S2(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||xe(e[i])||(Oh(i)||r===!0&&Jn(i)||!t&&!Jn(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}var Ei=(0,b.createContext)({});function C2(e,t){if(Pi(e)){const{initial:r,animate:n}=e;return{initial:r===!1||wr(r)?r:void 0,animate:wr(n)?n:void 0}}return e.inherit!==!1?t:{}}function N2(e){const{initial:t,animate:r}=C2(e,(0,b.useContext)(Ei));return(0,b.useMemo)(()=>({initial:t,animate:r}),[vd(t),vd(r)])}function vd(e){return Array.isArray(e)?e.join(" "):e}var cs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _h(e,t,r){for(const n in t)!xe(t[n])&&!dh(n,r)&&(e[n]=t[n])}function P2({transformTemplate:e},t){return(0,b.useMemo)(()=>{const r=cs();return ss(r,t,e),Object.assign({},r.vars,r.style)},[t])}function E2(e,t){const r=e.style||{},n={};return _h(n,r,e),Object.assign(n,P2(e,t)),n}function T2(e,t){const r={},n=E2(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var Ah=()=>({...cs(),attrs:{}});function j2(e,t,r,n){const i=(0,b.useMemo)(()=>{const a=Ah();return ch(a,t,fh(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};_h(a,e.style,e),i.style={...a,...i.style}}return i}var O2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function us(e){return typeof e!="string"||e.includes("-")?!1:!!(O2.indexOf(e)>-1||/[A-Z]/u.test(e))}function _2(e,t,r,{latestValues:n},i,a=!1,o){const s=(o??us(e)?j2:T2)(t,n,i,e),l=S2(t,typeof e=="string",a),c=e!==b.Fragment?{...l,...s,ref:r}:{},{children:u}=t,f=(0,b.useMemo)(()=>xe(u)?u.get():u,[u]);return(0,b.createElement)(e,{...c,children:f})}function A2({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:I2(r,n,i,e),renderState:t()}}function I2(e,t,r,n){const i={},a=n(e,{});for(const h in a)i[h]=Nn(a[h]);let{initial:o,animate:s}=e;const l=Pi(e),c=eh(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?s:o;if(f&&typeof f!="boolean"&&!Ni(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const m=Qo(e,h[p]);if(m){const{transitionEnd:y,transition:g,...v}=m;for(const x in v){let $=v[x];if(Array.isArray($)){const w=u?$.length-1:0;$=$[w]}$!==null&&(i[x]=$)}for(const x in y)i[x]=y[x]}}}return i}var Ih=e=>(t,r)=>{const n=(0,b.useContext)(Ei),i=(0,b.useContext)(Si),a=()=>A2(e,t,n,i);return r?a():Lo(a)},M2=Ih({scrapeMotionValuesFromProps:ls,createRenderState:cs}),k2=Ih({scrapeMotionValuesFromProps:hh,createRenderState:Ah}),D2=Symbol.for("motionComponentSymbol");function R2(e,t,r){const n=(0,b.useRef)(r);(0,b.useInsertionEffect)(()=>{n.current=r});const i=(0,b.useRef)(null);return(0,b.useCallback)(a=>{a&&e.onMount?.(a);const o=n.current;if(typeof o=="function")if(a){const s=o(a);typeof s=="function"&&(i.current=s)}else i.current?(i.current(),i.current=null):o(a);else o&&(o.current=a);t&&(a?t.mount(a):t.unmount())},[t])}var Mh=(0,b.createContext)({});function Ft(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function L2(e,t,r,n,i,a){const{visualElement:o}=(0,b.useContext)(Ei),s=(0,b.useContext)(Eh),l=(0,b.useContext)(Si),c=(0,b.useContext)(ds),u=c.reducedMotion,f=c.skipAnimations,h=(0,b.useRef)(null),p=(0,b.useRef)(!1);n=n||s.renderer,!h.current&&n&&(h.current=n(e,{visualState:t,parent:o,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=(0,b.useContext)(Mh);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&F2(h.current,r,i,y);const g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(r,l)});const v=r[Bf],x=(0,b.useRef)(!!v&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Zu(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),x.current=!1),m.enteringChildren=void 0)}),m}function F2(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:f}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:kh(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ft(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function kh(e){if(e)return e.options.allowProjection!==!1?e.projection:kh(e.parent)}function aa(e,{forwardMotionProps:t=!1,type:r}={},n,i){n&&v2(n);const a=r?r==="svg":us(e),o=a?k2:M2;function s(c,u){let f;const h={...(0,b.useContext)(ds),...c,layoutId:V2(c)},{isStatic:p}=h,m=N2(c),y=o(c,p);if(!p&&typeof window<"u"){B2(h,n);const g=U2(h);f=g.MeasureLayout,m.visualElement=L2(e,y,h,i,g.ProjectionNode,a)}return(0,d.jsxs)(Ei.Provider,{value:m,children:[f&&m.visualElement?(0,d.jsx)(f,{visualElement:m.visualElement,...h}):null,_2(e,c,R2(y,m.visualElement,u),y,p,t,a)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=(0,b.forwardRef)(s);return l[D2]=e,l}function V2({layoutId:e}){const t=(0,b.useContext)(Ro).id;return t&&e!==void 0?t+"-"+e:e}function B2(e,t){const r=(0,b.useContext)(Eh).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ir(!1,n,"lazy-strict-mode"):it(!1,n,"lazy-strict-mode")}}function U2(e){const{drag:t,layout:r}=Th();if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function z2(e,t){if(typeof Proxy>"u")return aa;const r=new Map,n=(a,o)=>aa(a,o,e,t),i=(a,o)=>(process.env.NODE_ENV!=="production"&&Bo(!1,"motion() is deprecated. Use motion.create() instead."),n(a,o));return new Proxy(i,{get:(a,o)=>o==="create"?n:(r.has(o)||r.set(o,aa(o,void 0,e,t)),r.get(o))})}var W2=(e,t)=>t.isSVG??us(e)?new vv(t):new fv(t,{allowProjection:e!==b.Fragment}),G2=class extends yt{constructor(e){super(e),e.animationState||(e.animationState=Sv(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ni(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},H2=0,K2=class extends yt{constructor(){super(...arguments),this.id=H2++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const o=Tt(this.node,i,a);if(o){const{transition:s,transitionEnd:l,...c}=o;for(const u in c)this.node.getValue(u)?.jump(c[u])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},q2={animation:{Feature:G2},exit:{Feature:K2}};function Kr(e){return{point:{x:e.pageX,y:e.pageY}}}var Y2=e=>t=>ns(t)&&e(t,Kr(t));function pr(e,t,r,n){return Sr(e,t,Y2(r),n)}var Dh=({current:e})=>e?e.ownerDocument.defaultView:null,bd=(e,t)=>Math.abs(e-t);function X2(e,t){const r=bd(e.x,t.x),n=bd(e.y,t.y);return Math.sqrt(r**2+n**2)}var $d=new Set(["auto","scroll"]),Rh=class{constructor(e,t,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=an(this.lastRawMoveEventInfo,this.transformPagePoint));const f=oa(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=X2(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:m}=f,{timestamp:y}=be;this.history.push({...m,timestamp:y});const{onStart:g,onMove:v}=this.handlers;h||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=h,this.lastMoveEventInfo=an(h,this.transformPagePoint),ae.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=oa(f.type==="pointercancel"?this.lastMoveEventInfo:an(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,g),m&&m(f,g)},!ns(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=n||window;const s=an(Kr(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=be;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,oa(s,this.history)),this.removeListeners=Wr(pr(this.contextWindow,"pointermove",this.handlePointerMove),pr(this.contextWindow,"pointerup",this.handlePointerUp),pr(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const r=getComputedStyle(t);($d.has(r.overflowX)||$d.has(r.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const r=e===window,n=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:n.x-t.x,y:n.y-t.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,n),ae.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ht(this.updatePoint)}};function an(e,t){return t?{point:t(e.point)}:e}function xd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oa({point:e},t){return{point:e,delta:xd(e,Lh(t)),offset:xd(e,Z2(t)),velocity:J2(t,.1)}}function Z2(e){return e[0]}function Lh(e){return e[e.length-1]}function J2(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=Lh(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Oe(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>Oe(t)*2&&(n=e[1]);const a=De(i.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Q2(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?le(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?le(r,e,n.max):Math.min(e,r)),e}function wd(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function eb(e,{top:t,left:r,bottom:n,right:i}){return{x:wd(e.x,r,i),y:wd(e.y,t,n)}}function Sd(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function tb(e,t){return{x:Sd(e.x,t.x),y:Sd(e.y,t.y)}}function rb(e,t){let r=.5;const n=Ce(e),i=Ce(t);return i>n?r=$r(t.min,t.max-n,e.min):n>i&&(r=$r(e.min,e.max-i,t.min)),Je(0,1,r)}function nb(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var eo=.35;function ib(e=eo){return e===!1?e=0:e===!0&&(e=eo),{x:Cd(e,"left","right"),y:Cd(e,"top","bottom")}}function Cd(e,t,r){return{min:Nd(e,t),max:Nd(e,r)}}function Nd(e,t){return typeof e=="number"?e:e[t]||0}var ab=new WeakMap,ob=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ge(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=u=>{t&&this.snapToCursor(Kr(u).point),this.stopAnimation()},a=(u,f)=>{const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_g(h),!this.openDragLock))return;this.latestPointerEvent=u,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qe(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Ze.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const $=x.layout.layoutBox[g];$&&(v=Ce($)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&ae.update(()=>m(u,f),!1,!0),Ga(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(u,f)=>{this.latestPointerEvent=u,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:g}=f;if(p&&this.currentDirection===null){this.currentDirection=lb(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&ae.update(()=>y(u,f),!1,!0)},s=(u,f)=>{this.latestPointerEvent=u,this.latestPanInfo=f,this.stop(u,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:u}=this.getProps();(u||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Rh(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Dh(this.visualElement),element:this.visualElement.current})}stop(e,t){const r=e||this.latestPointerEvent,n=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!n||!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&ae.postRender(()=>o(r,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,r){const{drag:n}=this.getProps();if(!r||!on(e,n,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=Q2(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&Ft(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=eb(r.layoutBox,e):this.constraints=!1,this.elastic=ib(t),n!==this.constraints&&!Ft(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&qe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=nb(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ft(e))return!1;const r=e.current;it(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const i=ov(r,n.root,this.visualElement.getTransformPagePoint());let a=tb(n.layout.layoutBox,i);if(t){const o=t(nv(a));this.hasMutatedConstraints=!!o,o&&(a=ih(o))}return a}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=qe(c=>{if(!on(c,t,this.currentDirection))return;let u=s&&s[c]||{};(a===!0||a===c)&&(u={min:0,max:0});const f=n?200:1e6,h=n?40:1e7,p={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(c,p)});return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return Ga(this.visualElement,e),r.start(Jo(e,r,0,t,this.visualElement,!1))}stopAnimation(){qe(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),n=r[t];return n||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){qe(t=>{const{drag:r}=this.getProps();if(!on(t,r,this.currentDirection))return;const{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){const{min:a,max:o}=n.layout.layoutBox[t],s=i.get()||0;i.set(e[t]-le(a,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!Ft(t)||!r||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};qe(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const s=o.get();n[a]=rb({min:s,max:s},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),qe(a=>{if(!on(a,e,null))return;const o=this.getAxisMotionValue(a),{min:s,max:l}=this.constraints[a];o.set(le(s,l,n[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ab.set(this.visualElement,this);const e=this.visualElement.current,t=pr(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),f=l.target,h=f!==e&&Rg(f);c&&u&&!h&&this.start(l)});let r;const n=()=>{const{dragConstraints:l}=this.getProps();Ft(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),r||(r=sb(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ae.read(n);const o=Sr(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(qe(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:a=eo,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Pd(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function sb(e,t,r){const n=Il(e,Pd(r)),i=Il(t,Pd(r));return()=>{n(),i()}}function on(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function lb(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var db=class extends yt{constructor(e){super(e),this.removeGroupControls=Re,this.removeListeners=Re,this.controls=new ob(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Re}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},sa=e=>(t,r)=>{e&&ae.update(()=>e(t,r),!1,!0)},cb=class extends yt{constructor(){super(...arguments),this.removePointerDownListener=Re}onPointerDown(e){this.session=new Rh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Dh(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:sa(e),onStart:sa(t),onMove:sa(r),onEnd:(i,a)=>{delete this.session,n&&ae.postRender(()=>n(i,a))}}}mount(){this.removePointerDownListener=pr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},la=!1,ub=class extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),r&&r.register&&n&&r.register(i),la&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Pn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:n,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),la=!0,n||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||ae.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=t,r.root.didUpdate(),rs.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;la=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Fh(e){const[t,r]=Ph(),n=(0,b.useContext)(Ro);return(0,d.jsx)(ub,{...e,layoutGroup:n,switchLayoutGroup:(0,b.useContext)(Mh),isPresent:t,safeToRemove:r})}var fb={pan:{Feature:cb},drag:{Feature:db,ProjectionNode:Nh,MeasureLayout:Fh}};function Ed(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i=n["onHover"+r];i&&ae.postRender(()=>i(t,Kr(t)))}var hb=class extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=Ig(e,(t,r)=>(Ed(this.node,r,"Start"),n=>Ed(this.node,n,"End"))))}unmount(){}},mb=class extends yt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wr(Sr(this.node.current,"focus",()=>this.onFocus()),Sr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function Td(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i=n["onTap"+(r==="End"?"":r)];i&&ae.postRender(()=>i(t,Kr(t)))}var pb=class extends yt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=Fg(e,(n,i)=>(Td(this.node,i,"Start"),(a,{success:o})=>Td(this.node,a,o?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:r?.tap===!1})}unmount(){}},to=new WeakMap,da=new WeakMap,yb=e=>{const t=to.get(e.target);t&&t(e)},gb=e=>{e.forEach(yb)};function vb({root:e,...t}){const r=e||document;da.has(r)||da.set(r,{});const n=da.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(gb,{root:e,...t})),n[i]}function bb(e,t,r){const n=vb(t);return to.set(e,r),n.observe(e),()=>{to.delete(e),n.unobserve(e)}}var $b={some:0,all:1},xb=class extends yt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:r,threshold:typeof n=="number"?n:$b[n]},o=s=>{const{isIntersecting:l}=s;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:u}=this.node.getProps(),f=l?c:u;f&&f(s)};this.stopObserver=bb(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(wb(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function wb({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var Sb={inView:{Feature:xb},tap:{Feature:pb},focus:{Feature:mb},hover:{Feature:hb}},Cb={layout:{ProjectionNode:Nh,MeasureLayout:Fh}},Nb={...q2,...Sb,...fb,...Cb},at=z2(Nb,W2),Vh=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Pb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),jd=e=>{const t=Eb(e);return t.charAt(0).toUpperCase()+t.slice(1)},ca={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"},Tb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},jb=(0,b.createContext)({}),Ob=()=>(0,b.useContext)(jb),_b=(0,b.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:h="currentColor",className:p=""}=Ob()??{},m=n??f?Number(r??u)*24/Number(t??c):r??u;return(0,b.createElement)("svg",{ref:l,...ca,width:t??c??ca.width,height:t??c??ca.height,stroke:e??h,strokeWidth:m,className:Vh("lucide",p,i),...!a&&!Tb(s)&&{"aria-hidden":"true"},...s},[...o.map(([y,g])=>(0,b.createElement)(y,g)),...Array.isArray(a)?a:[a]])}),ie=(e,t)=>{const r=(0,b.forwardRef)(({className:n,...i},a)=>(0,b.createElement)(_b,{ref:a,iconNode:t,className:Vh(`lucide-${Pb(jd(e))}`,`lucide-${e}`,n),...i}));return r.displayName=jd(e),r},Ab=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],Ib=ie("calendar-1",Ab),Mb=[["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"}]],kb=ie("calendar-days",Mb),Db=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fs=ie("check",Db),Rb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bh=ie("chevron-down",Rb),Lb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Qn=ie("chevron-left",Lb),Fb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mt=ie("chevron-right",Fb),Vb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ro=ie("circle-check",Vb),Bb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Ti=ie("clock-3",Bb),Ub=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],zb=ie("credit-card",Ub),Wb=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],Uh=ie("dollar-sign",Wb),Gb=[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]],Hb=ie("euro",Gb),Kb=[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]],qb=ie("indian-rupee",Kb),Yb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zh=ie("info",Yb),Xb=[["path",{d:"M5 12h14",key:"1ays0h"}]],Wh=ie("minus",Xb),Zb=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Jb=ie("moon",Zb),Qb=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Od=ie("move-left",Qb),e3=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],t3=ie("move-right",e3),r3=[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]],Gh=ie("package-2",r3),n3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],hs=ie("plus",n3),i3=[["path",{d:"M18 7c0-5.333-8-5.333-8 0",key:"1prm2n"}],["path",{d:"M10 7v14",key:"18tmcs"}],["path",{d:"M6 21h12",key:"4dkmi1"}],["path",{d:"M6 13h10",key:"ybwr4a"}]],a3=ie("pound-sterling",i3),o3=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],s3=ie("rotate-cw",o3),l3=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],Hh=ie("scissors",l3),d3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ms=ie("search",d3),c3=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],u3=ie("store",c3),f3=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],h3=ie("sun",f3),m3=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],p3=ie("sunrise",m3),y3=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Kh=ie("user",y3),g3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_t=ie("x",g3),v3={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}},b3=({status:e})=>(0,d.jsx)("span",{className:`inline-flex rounded-tr-md rounded-bl-md items-center px-2 py-0.5 text-[10px] font-bold uppercase tracking-widest border ${e?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-red-100 text-red-400 border-red-200"}`,children:e?"Open":"Closed"}),$3=({item:e,onSelect:t,selected:r})=>(0,d.jsxs)("div",{className:`group cursor-pointer overflow-hidden relative flex flex-col justify-between rounded-md border transition-all duration-300
|
|
24
|
-
${r?"border-btn-bg-hover bg-white shadow-lg":e.isOpen?"border-gray-200 bg-white hover:border-gray-300 hover:shadow-md":"border-red-300 bg-red-50/50"}`,onClick:()=>t(String(e?.id)),children:[(0,d.jsx)("div",{className:"flex items-start justify-end",children:(0,d.jsx)(b3,{status:e.isOpen})}),(0,d.jsx)("div",{className:"px-4 pb-4 pt-1",children:(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h2",{className:"text-lg font-black uppercase tracking-tight text-gray-900 line-clamp-1",children:e.outletName}),(0,d.jsx)("p",{className:"text-sm text-neutral-500 mt-1 break-all line-clamp-2 min-h-10",children:e.address})]})})]});function x3({outlets:e,onSelectOutlet:t}){const[r,n]=(0,b.useState)(null),[i,a]=(0,b.useState)(""),o=l=>{n(l);const c=e.find(u=>u.id==l);c&&setTimeout(()=>{t(c)},100)},s=(0,b.useMemo)(()=>{if(!i.trim())return e;const l=i.toLowerCase();return e.filter(c=>c.outletName?.toLowerCase().includes(l)||c.address?.toLowerCase().includes(l))},[e,i]);return(0,d.jsxs)("div",{className:"min-h-screen bg-[#f3f1ee] px-4 py-10 sm:px-8 lg:px-16",children:[(0,d.jsxs)("div",{className:"mb-8 flex flex-col lg:flex-row lg:items-center gap-4 justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-3xl sm:text-4xl xl:text-5xl font-black uppercase tracking-tight text-gray-900 mb-3",children:"Choose Your Outlet"}),(0,d.jsx)("div",{className:"w-14 h-0.5 bg-btn-bg"})]}),(0,d.jsxs)("div",{className:"relative w-full lg:max-w-md flex items-center",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ms,{size:18})}),(0,d.jsx)("input",{type:"text",placeholder:"Search outlet...",value:i,onChange:l=>a(l.target.value),className:"w-full h-11 rounded-md border border-gray-300 bg-white pl-10 pr-20 text-sm outline-none transition-all focus:border-gray-400"}),(0,d.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-2",children:i&&(0,d.jsx)("button",{onClick:()=>a(""),className:"text-gray-400 hover:text-black transition-all cursor-pointer",children:(0,d.jsx)(_t,{size:16})})})]})]}),(0,d.jsx)("div",{className:"py-2 max-h-[70vh] md:max-h-[80vh] overflow-auto scrollbar-none",children:s.length>0?(0,d.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4",children:(0,d.jsx)(mt,{mode:"popLayout",children:s.map((l,c)=>(0,d.jsx)(at.div,{variants:v3,initial:"hidden",animate:"visible",exit:"exit",custom:c,layout:"position",style:{willChange:"transform, opacity"},children:(0,d.jsx)($3,{item:l,onSelect:o,selected:r===l.id})},l.id))})}):(0,d.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,d.jsxs)("div",{className:"text-center",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"No outlets found"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Try searching with a different keyword"})]})})})]})}var w3={USD:Uh,INR:qb,EUR:Hb,GBP:a3},$e=({size:e=20})=>{const t=(0,K.useSelector)(r=>r.outletDetails?.currency);return(0,d.jsx)(t?w3[t]:Uh,{size:e})},lr=(e="")=>{const t=e.trim().split(" ").filter(Boolean);return t.length===0?"":((t[0]?.[0]??"")+(t.length>1?t[t.length-1]?.[0]??"":"")).toUpperCase()},S3=e=>Number(e.price||e.min_price||0),_d=(e,{perUnit:t=!1}={})=>{const r=S3(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((i,a)=>a.isActive?a.taxType==="FIXED"?i+(a.taxRate||0)*n:a.taxType==="PERCENTAGE"?i+r*n*(a.taxRate||0)/100:i:i,0)};function qr(){const[e,t]=(0,b.useState)({width:0,height:0});return(0,b.useEffect)(()=>{const r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),e}var C3=[{label:"Services",page:"services",icon:(0,d.jsx)(Hh,{size:16})},{label:"Professional",page:"professionals",icon:(0,d.jsx)(Kh,{size:16})},{label:"Time Slot",page:"time",icon:(0,d.jsx)(Ti,{size:16})},{label:"Details",page:"details",icon:(0,d.jsx)(zh,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,d.jsx)(ro,{size:16})}],N3=[{label:"Professional",page:"professionals",icon:(0,d.jsx)(Kh,{size:16})},{label:"Service",page:"services",icon:(0,d.jsx)(Hh,{size:16})},{label:"Time",page:"time",icon:(0,d.jsx)(Ti,{size:16})},{label:"Details",page:"details",icon:(0,d.jsx)(zh,{size:16})},{label:(0,d.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,d.jsx)(ro,{size:13})]}),page:"confirm",icon:(0,d.jsx)(ro,{size:16})}];function kt(){const e=(0,K.useDispatch)(),{width:t}=qr(),{isService:r}=(0,K.useSelector)(f=>f.outletDetails),n=(0,K.useSelector)(f=>f.outletList.outlets),{currentStep:i,completedSteps:a}=(0,K.useSelector)(f=>f.breadcrumbs),o=r?C3:N3,s=o.findIndex(f=>f.page===i),l=()=>{e({type:"RESET_ALL"}),Do.purge()},c=()=>{if(s===0&&n.length>1){l(),e(Jp());return}if(s<=0)return;const f=o[s-1];e(Oa(f.page))},u=o[s];return(0,d.jsx)(d.Fragment,{children:t<480?(0,d.jsxs)("div",{className:"flex items-center flex-row gap-4 font-semibold",children:[(0,d.jsx)("button",{onClick:c,disabled:!1,className:"flex items-center text-xl disabled:text-gray-200 mr-2 cursor-pointer",children:(0,d.jsx)(Qn,{size:20})}),(0,d.jsx)("span",{className:"flex flex-row items-center text-base",children:u?.label})]}):(0,d.jsxs)("div",{className:"hidden md:flex items-center gap-4 w-full",children:[(0,d.jsx)("button",{onClick:c,className:"flex cursor-pointer items-center justify-center h-10 w-10 rounded-full border border-gray-200 hover:bg-gray-100 transition outline-none!",children:(0,d.jsx)(Qn,{size:20})}),(0,d.jsx)("nav",{className:"grid grid-cols-5 w-full overflow-hidden",children:o.map((f,h)=>{const p=i===f.page,m=a?.includes(f.page)||h<=s;return(0,d.jsxs)("button",{onClick:()=>{m&&e(Oa(f.page))},className:["relative h-10 flex items-center justify-center gap-2 uppercase tracking-[1px] text-[11px] font-semibold transition-all border-b-2",m?"cursor-pointer":"cursor-not-allowed opacity-40",p?"border-btn-bg text-black bg-btn-bg-hover/5":"border-transparent text-black/60 hover:text-black"].join(" "),children:[(0,d.jsx)("span",{className:`${p?"text-btn-bg":"text-btn-bg-hover"}`,children:f.icon}),(0,d.jsx)("span",{children:f.label})]},f.page)})})]})})}function Dt({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:i,isSidebarOpen:a=!1}){return(0,d.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,d.jsxs)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-[minmax(0,1fr)_350px] lg:grid-cols-[minmax(0,1fr)_360px] overflow-hidden relative",children:[(0,d.jsxs)("main",{className:"p-4",children:[e,(0,d.jsx)("div",{className:"md:hidden fixed bottom-5 left-0 right-0 flex items-center justify-center z-50 px-4",children:n?(0,d.jsx)("button",{onClick:i,className:"p-3! px-8.5! text-sm relative rounded-full btn-bg text-white hover:text-white border-none font-dm font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-[#ccc] disabled:cursor-not-allowed",children:(0,d.jsx)("span",{children:"View Order"})}):r})]}),(0,d.jsx)("aside",{className:"hidden md:flex flex-col bg-surface border-l border-black/10 p-4 pb-3.5 h-[calc(100dvh)]",children:t})]}),a&&(0,d.jsx)("div",{className:"fixed z-999 bottom-0 left-0 right-0 h-screen bg-white rounded-t-2xl flex flex-col animate-fade-in",children:(0,d.jsx)("div",{className:"flex-1 md:px-6 p-4 fixed top-0 left-0 right-0 bottom-0",children:t})})]})}var qh=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:i})=>{const{outletName:a}=(0,K.useSelector)(l=>l.outletDetails),{isService:o}=(0,K.useSelector)(l=>l.outletDetails),s=t.length>0;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"p-3 border-b border-gray-300",children:[(0,d.jsx)("p",{className:"font-black uppercase tracking-tight text-2xl mb-0",children:"Your Order"}),(0,d.jsxs)("p",{className:"text-xs font-semibold text-black/40 uppercase line-clamp-1",children:[a||"-"," Outlet"]})]}),(0,d.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,d.jsxs)("div",{className:"p-3",children:[e?.id&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase",children:"Selected Professional"}),(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-4 py-2 px-3 border border-black/20 rounded",children:[e.imageUrl?(0,d.jsx)("img",{src:e.imageUrl,alt:e.name,className:"w-10 h-10 rounded-md object-cover"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-md bg-btn-bg/50 text-white flex items-center justify-center",style:{background:e.color||"#111"},children:lr(e.name)}),(0,d.jsxs)("div",{className:"overflow-hidden",children:[(0,d.jsx)("p",{className:"text-sm font-bold uppercase line-clamp-1",children:e.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500 uppercase line-clamp-1",children:e.staff_type})]})]})]}),s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase",children:"Selected Services"}),(0,d.jsx)("ul",{className:"md:h-[calc(100dvh-410px)] h-[calc(100dvh-260px)] overflow-y-auto scrollbar-none",children:t.map((l,c)=>(0,d.jsxs)("li",{className:`flex flex-col items-start text-sm py-2 ${c!==t.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsx)("p",{className:"flex items-center gap-1 line-clamp-1 text-sm font-medium uppercase",children:l.name}),(0,d.jsxs)("div",{className:"grid grid-cols-3 items-center gap-2 w-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-start gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Gh,{size:13}),(0,d.jsx)("span",{children:l.qty})]}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Ti,{size:13}),(0,d.jsxs)("span",{children:[l.min_time||l.estimated_time," min"]})]}),(0,d.jsxs)("p",{className:"flex items-center justify-end gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)($e,{size:12}),l.price||l.min_price]})]})]},l.id))})]})]}),(0,d.jsxs)("div",{className:"p-3 border-t border-gray-300",children:[s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Subtotal"}),(0,d.jsxs)("span",{className:"font-mono font-semibold flex items-center",children:[(0,d.jsx)($e,{size:18}),r]})]}),(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Duration"}),(0,d.jsxs)("span",{className:"font-mono font-semibold",children:[n," mins"]})]})]}),(0,d.jsx)("button",{disabled:o?!t.length:!e,onClick:()=>i("time"),className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover px-2 w-full relative py-3 font-dm text-xs font-bold tracking-[1.5px] uppercase cursor-pointer mt-3.5 transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed max-md:py-3.5 max-md:text-xs",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:[o?"Choose Time":"Choose Services",(0,d.jsx)(Mt,{size:16})]})})]})]})]})},P3={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}};function E3(){const{width:e}=qr(),t=(0,K.useDispatch)(),{staff:r,selectedProfessional:n}=(0,K.useSelector)(o=>o.service),i=e<768,a=!r||r.length===0;return(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(qh,{pro:n,goToStep:()=>t(Ne())}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"font-bebas text-xl md:text-2xl lg:text-4xl",children:"Choose a Professional"}),(0,d.jsx)("p",{className:"text-sm text-black/60 mb-4",children:"Available based on selected services"}),(0,d.jsx)(mt,{mode:"wait",children:a&&(0,d.jsx)(at.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"text-sm text-red-500",children:"No staff available for selected services"},"no-staff")}),(0,d.jsx)("div",{className:"h-[calc(100dvh-210px)] max-md:h-[calc(100dvh-200px)] overflow-y-auto scrollbar-none pb-20 lg:pb-4",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(195px,1fr))] gap-3",children:(0,d.jsx)(mt,{mode:"popLayout",children:r?.map((o,s)=>(0,d.jsxs)(at.div,{variants:P3,initial:"hidden",animate:"visible",exit:"exit",custom:s,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{t(Ku(o)),t(Kt(null)),i&&t(Ne())},className:`pro-card border border-border rounded-sm p-4 cursor-pointer transition flex items-center gap-4 ${n?.id===o.id?"border-red bg-[#fff8f8]":"bg-white hover:border-red"}`,children:[o.imageUrl?(0,d.jsx)("img",{src:o.imageUrl,alt:o.name,className:"w-12 h-12 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg",style:{background:o.color||"#111"},children:lr(o.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:o.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:o.staff_type})]})]},o.id))})})})]})]})}var T3=e=>Number(e.price||e.min_price||0),no=(e,{perUnit:t=!1}={})=>{const r=T3(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((i,a)=>a.isActive?a.taxType==="FIXED"?i+a.taxRate*n:a.taxType==="PERCENTAGE"?i+r*n*a.taxRate/100:i:i,0)},j3={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}};function O3(){const e=(0,K.useDispatch)(),{width:t}=qr(),{staff:r,selectedServices:n,selectedProfessional:i}=(0,K.useSelector)(m=>m.service),[a,o]=(0,b.useState)(!1),s=n.map(m=>m.id),l=(0,b.useMemo)(()=>{if(!i?.id)return[];const m=r.find(y=>y.id===i.id);return m?n.map(y=>{const g=m?.assignments?.find(x=>x.id===y?.id),v={...y,price:g?.price||y.price||y.min_price||0,duration:g?.duration||y.estimated_time||y.min_time||0};return{...v,tax:no(v)}}):[]},[i,r,n]),c=l.reduce((m,y)=>m+Number(y.price||0)*y.qty,0),u=l.reduce((m,y)=>m+(y?.duration||0)*y.qty,0),f=(0,b.useMemo)(()=>s.length?r.filter(m=>{const y=m.assignments??[];return s?.every(g=>y.some(v=>String(v.id)==String(g)&&!!v?.assigned))}):[],[r,s]),h=t<768,p=s.length>0;return(0,b.useEffect)(()=>{if(p&&f.length===0){const m=setTimeout(()=>o(!0),300);return()=>clearTimeout(m)}else o(!1)},[p,f]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(qh,{pro:i,selectedStaffServices:l,totalPrice:c,totalDuration:u,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!n.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed ",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Time ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Choose a Professional"}),(0,d.jsx)("p",{className:"text-sm text-black/60 mb-6",children:"Available based on selected services"}),(0,d.jsx)(mt,{mode:"wait",children:a&&(0,d.jsx)(at.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"text-sm text-red-500",children:"No staff available for selected services"},"no-staff")}),(0,d.jsx)("div",{className:"h-[calc(100dvh-210px)] max-md:h-[calc(100dvh-200px)] overflow-y-auto scrollbar-none pb-20 lg:pb-4",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(195px,1fr))] gap-3",children:(0,d.jsx)(mt,{mode:"popLayout",children:f.map((m,y)=>(0,d.jsxs)(at.div,{variants:j3,initial:"hidden",animate:"visible",exit:"exit",custom:y,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{e(Ku(m)),e(Kt(null)),h&&e(Ne())},className:`pro-card border border-border rounded-sm p-4 cursor-pointer transition flex items-center gap-4 ${i?.id===m.id?"border-red bg-[#fff8f8]":"bg-white hover:border-red"}`,children:[m.imageUrl?(0,d.jsx)("img",{src:m.imageUrl,alt:m.name,className:"w-12 h-12 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg",style:{background:m.color||"#111"},children:lr(m.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:m.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:m.staff_type})]})]},m.id))})})})]})]})}function Yh({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,K.useSelector)(a=>a?.outletDetails),{isService:i}=(0,K.useSelector)(a=>a.outletDetails);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"p-3 border-b border-gray-300",children:[(0,d.jsx)("p",{className:"font-black uppercase tracking-tight text-2xl mb-0",children:"Your Order"}),(0,d.jsxs)("p",{className:"text-xs font-semibold text-black/40 uppercase line-clamp-1",children:[n||"-"," Outlet"]})]}),(0,d.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,d.jsxs)("div",{className:"p-3",children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase line-clamp-1",children:"SELECTED SERVICES"}),e?.length>0&&(0,d.jsx)("ul",{className:"md:h-[calc(100dvh-270px)] h-[calc(100dvh-230px)] overflow-y-scroll scrollbar-none",children:e?.map((a,o)=>(0,d.jsxs)("li",{className:`flex justify-start flex-col items-start text-sm py-2 ${o!==e?.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsx)("p",{className:"flex justify-between flex-row items-center gap-1 line-clamp-1 text-sm font-medium uppercase",children:a.name}),(0,d.jsxs)("div",{className:"grid grid-cols-3 items-center gap-2 w-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-start gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Gh,{size:13}),(0,d.jsx)("span",{children:a.qty})]}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Ti,{size:13}),(0,d.jsxs)("span",{children:[a.min_time||a.estimated_time," min"]})]}),(0,d.jsxs)("p",{className:"flex items-center justify-end gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)($e,{size:12}),a.price||a.min_price]})]})]},a.id))})]}),(0,d.jsxs)("div",{className:"p-3 border-t border-gray-300",children:[(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Subtotal"}),(0,d.jsxs)("span",{className:"font-mono font-semibold flex flex-row items-center",children:[(0,d.jsx)($e,{size:18}),t]})]}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover px-2 w-full relative py-3 font-dm text-xs font-bold tracking-[1.5px] uppercase cursor-pointer mt-3.5 transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed max-md:py-3.5 max-md:text-xs",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:[i?"Choose Professional":"Choose Time",(0,d.jsx)(Mt,{size:16})]})})})]})]})]})}function Xh(){return(0,d.jsx)("div",{className:"h-33.5 rounded-sm relative overflow-hidden bg-[#e0e0e0]",children:(0,d.jsx)("div",{className:"absolute top-0 -left-full h-full w-full",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}var _3={hidden:{opacity:0,y:14},visible:e=>({opacity:1,y:0,transition:{delay:e*.05,duration:.15,ease:[.22,1,.36,1]}}),exit:{opacity:0,y:8,transition:{duration:.2}}};function A3(){const e=(0,K.useDispatch)(),t=(0,b.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,selectedProfessional:o,loading:s}=(0,K.useSelector)(P=>P.service),[l,c]=(0,b.useState)("supercategory"),[u,f]=(0,b.useState)(null),[h,p]=(0,b.useState)(null),[m,y]=(0,b.useState)(""),g=new Set(o?o?.assignments?.map(P=>P.id):[]),v=new Set(o?o?.assignments?.map(P=>P.categoryId):[]),x=n?.filter(P=>v.has(P.id))?.map(P=>({...P,services:P.services.filter(U=>g.has(U.id))})),$=r?.map(P=>({...P,categories:P.categories?.filter(U=>v.has(U.id))?.map(U=>({...U,services:U.services.filter(k=>g.has(k.id))}))?.filter(U=>U.services.length>0)}))?.filter(P=>P.categories.length>0),w=x.flatMap(P=>P.services),E=i?i.services:w,C=(0,b.useMemo)(()=>u?h?h.services||[]:u.categories.flatMap(P=>P.services||[]):[],[u,h]),_=l==="standalone"?E:C,S=(0,b.useMemo)(()=>{const P=x.flatMap(k=>k.services||[]),U=$.flatMap(k=>k.categories.flatMap(W=>W.services||[]));return[...P,...U]},[x,$]),j=(0,b.useMemo)(()=>{const P=m.trim().toLowerCase();return P?S.filter(U=>U.name?.toLowerCase().includes(P)||U.description?.toLowerCase().includes(P)):_},[m,S,_]),M=P=>P.taxRows?.some(U=>U.isActive)||!1,V=a.reduce((P,U)=>P+Number(U.price||0)*U.qty,0);return(0,b.useEffect)(()=>{if(l==="supercategory"&&$?.length>0&&!u){const P=$[0];f(P),p(P?.categories?.[0]||null)}},[l,$,u]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(Yh,{selectedServices:a,totalPrice:V,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!a.length,className:"bg-btn-bg text-btn-bg border-btn-bg hover:text-btn-bg-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Time ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Choose a Service"}),(0,d.jsxs)("p",{className:"text-sm text-black/60 mb-6",children:["Select from ",o?.name,"'s available services"]}),(0,d.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-4 lg:gap-8 mb-5 border-b border-black/40",children:[(0,d.jsxs)("div",{className:"flex items-end gap-8",children:[(0,d.jsx)("button",{onClick:()=>{c("supercategory"),p(null),f(null)},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="supercategory"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Super Category"}),(0,d.jsx)("button",{onClick:()=>{c("standalone")},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="standalone"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Standalone"})]}),(0,d.jsx)("div",{className:"pb-2",children:(0,d.jsxs)("div",{className:"relative w-full",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ms,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:m,onChange:P=>y(P.target.value),className:"w-full border border-black/30 rounded-md pl-9 pr-10 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-black/20"}),m&&(0,d.jsx)("button",{onClick:()=>y(""),className:"absolute cursor-pointer right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black transition",children:(0,d.jsx)(_t,{size:16})})]})})]}),l==="supercategory"&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-3 border border-black/20 p-1",children:$.map(P=>(0,d.jsxs)("button",{onClick:()=>{f(P),p(P?.categories?.[0]||null)},className:`border text-left py-2 px-4 transition-all cursor-pointer min-w-fit ${u?.id===P.id?"border-btn-bg-hover/50 bg-btn-bg-hover/10":"border-black/30 bg-white hover:border-btn-bg/50"}`,children:[(0,d.jsx)("h3",{className:"font-medium text-sm mb-1 font-serif",children:P.name}),(0,d.jsxs)("p",{className:"text-[10px] uppercase tracking-[1px] font-semibold text-black/60",children:[P?.categories?.length||0," Sub Categories"]})]},P.id))}),u&&(0,d.jsxs)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-5",children:[(0,d.jsxs)("button",{onClick:()=>p(null),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",u?.categories?.reduce((P,U)=>P+U.services.length,0),")"]}),u?.categories?.map(P=>(0,d.jsx)("button",{onClick:()=>p(P),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?.id===P.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:P.name},P.id))]})]}),l==="standalone"&&(0,d.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 items-start mb-4",children:(0,d.jsxs)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full",children:[(0,d.jsxs)("button",{onClick:()=>e(Un(null)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",x.reduce((P,U)=>P+U.services.length,0),")"]}),x.map(P=>(0,d.jsxs)("button",{onClick:()=>e(Un(P)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?.id===P.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:[P.name," (",P.services.length,")"]},P.id))]})}),(0,d.jsx)("div",{className:`overflow-y-auto pb-20 lg:pb-4 scrollbar-none ${l==="standalone"?"h-[calc(100dvh-315px)] md:h-[calc(100dvh-300px)]":"h-[calc(100dvh-415px)] lg:h-[calc(100dvh-390px)]"}`,children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-3",children:s?Array.from({length:10}).map((P,U)=>(0,d.jsx)(Xh,{},U)):(0,d.jsx)(mt,{mode:"popLayout",children:j?.map((P,U)=>{const k=a.some(W=>W.id===P.id);return(0,d.jsxs)(at.div,{variants:_3,initial:"hidden",animate:"visible",exit:"exit",custom:U,layout:!0,onClick:()=>{const W=a.find(G=>G.id===P.id);W&&W.qty===1?e(Wn(String(P.id))):e(zn({...P,price:P.price?Number(P.price):void 0}))},className:["relative border rounded-md p-3 cursor-pointer transition-all ",k?"border-btn-bg/80 bg-btn-bg-hover/5":"border-black/30 hover:border-btn-bg-hover/80 bg-white"].join(" "),children:[M(P)&&(0,d.jsx)("span",{className:"absolute top-0 left-0 text-[9px] px-2 py-0.5 bg-green-700 text-white rounded-br-md rounded-tl-md",children:"TAX"}),ko(P)&&(0,d.jsx)("span",{className:"absolute top-0 right-0 text-[9px] px-2 py-0.5 bg-black/80 text-white rounded-bl-md rounded-tr-md",children:"CONSENT"}),(0,d.jsx)("p",{className:"font-bold text-sm mb-1 mt-3 line-clamp-1 uppercase",children:P.name}),(0,d.jsxs)("div",{className:"relative group",children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-black/40 line-clamp-1 uppercase",children:P.description}),P.description?.length>30&&(0,d.jsx)("div",{className:"absolute hidden group-hover:block bg-neutral-100 text-xs p-2 rounded top-3 mt-1 z-10 w-52",children:P.description})]}),(0,d.jsxs)("p",{className:"text-sm font-semibold text-black/60 mb-2 flex justify-between mt-2",children:[(0,d.jsx)("span",{children:P.estimated_time?`${P.estimated_time} min`:`${P.min_time}-${P.max_time} min`}),(0,d.jsxs)("span",{className:"font-mono flex items-center gap-1",children:[(0,d.jsx)($e,{size:14}),P.price?P.price:`${P.min_price}-${P.max_price}`]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-start mt-4 border border-gray-300 max-w-fit",children:[(0,d.jsx)("button",{onClick:W=>{W.stopPropagation(),e(Wn(String(P.id)))},className:"w-10 h-8 flex items-center justify-center hover:bg-stone-100 transition-all",children:(0,d.jsx)(Wh,{size:14})}),(0,d.jsx)("span",{className:"text-sm font-semibold min-w-5 w-10 h-8 border-x border-gray-300 text-center flex items-center justify-center",children:a.find(W=>W.id===P.id)?.qty||0}),(0,d.jsx)("button",{onClick:W=>{W.stopPropagation(),a.find(G=>G.id===P.id)?e(Hu(String(P.id))):e(zn({...P,price:P.price?Number(P.price):void 0}))},className:"w-10 h-8 bg-btn-bg/80 text-white flex items-center justify-center hover:bg-btn-bg-hover/90 transition-all",children:(0,d.jsx)(hs,{size:14})})]})]},P.id)})})})})]})]})}var I3={hidden:{opacity:0,y:14},visible:e=>({opacity:1,y:0,transition:{delay:e*.05,duration:.15,ease:[.22,1,.36,1]}}),exit:{opacity:0,y:8,transition:{duration:.2}}};function M3(){const e=(0,K.useDispatch)(),t=(0,b.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,loading:o}=(0,K.useSelector)(S=>S.service),{outletName:s}=(0,K.useSelector)(S=>S?.outletDetails),[l,c]=(0,b.useState)("supercategory"),[u,f]=(0,b.useState)(null),[h,p]=(0,b.useState)(null),[m,y]=(0,b.useState)(""),g=n.flatMap(S=>S.services),v=i?i.services:g,x=(0,b.useMemo)(()=>u?h?h.services||[]:u.categories.flatMap(S=>S.services||[]):[],[u,h]),$=l==="standalone"?v:x,w=(0,b.useMemo)(()=>{const S=n.flatMap(M=>M.services||[]),j=r.flatMap(M=>M.categories.flatMap(V=>V.services||[]));return[...S,...j]},[n,r]),E=(0,b.useMemo)(()=>{const S=m.trim().toLowerCase();return S?w.filter(j=>j.name?.toLowerCase().includes(S)||j.description?.toLowerCase().includes(S)):$},[m,w,$]),C=S=>S.taxRows?.some(j=>j.isActive)||!1,_=a.reduce((S,j)=>S+Number(j.price||0)*j.qty,0);return(0,b.useEffect)(()=>{if(l==="supercategory"&&r?.length>0&&!u){const S=r[0];f(S),p(S?.categories?.[0]||null)}},[l,r,u]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(Yh,{selectedServices:a,totalPrice:_,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!a.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed ",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Professional ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Book A Service"}),(0,d.jsxs)("p",{className:"text-sm text-black/60 mb-6",children:["Select from ",s," Outlet's available services"]}),(0,d.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-4 lg:gap-8 mb-5 border-b border-black/40",children:[(0,d.jsxs)("div",{className:"flex items-end gap-8 ",children:[(0,d.jsx)("button",{onClick:()=>{c("supercategory"),p(null),f(null)},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="supercategory"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Super Category"}),(0,d.jsx)("button",{onClick:()=>{c("standalone")},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="standalone"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Standalone"})]}),(0,d.jsx)("div",{className:"pb-2",children:(0,d.jsxs)("div",{className:"relative w-full",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ms,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:m,onChange:S=>y(S.target.value),className:"w-full border border-black/30 rounded-md pl-9 pr-10 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-black/20"}),m&&(0,d.jsx)("button",{onClick:()=>y(""),className:"absolute cursor-pointer right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black transition",children:(0,d.jsx)(_t,{size:16})})]})})]}),l==="supercategory"&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-3 border border-black/20 p-1",children:r.map(S=>(0,d.jsxs)("button",{onClick:()=>{f(S),p(S?.categories?.[0]||null)},className:`border text-left py-2 px-4 transition-all cursor-pointer min-w-fit ${u?.id===S.id?"border-btn-bg-hover/50 bg-btn-bg-hover/10":"border-black/30 bg-white hover:border-btn-bg/50"}`,children:[(0,d.jsx)("h3",{className:"font-medium text-sm mb-1 font-serif",children:S.name}),(0,d.jsxs)("p",{className:"text-[10px] uppercase tracking-[1px] font-semibold text-black/60",children:[S?.categories?.length||0," Sub Categories"]})]},S.id))}),u&&(0,d.jsxs)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-5",children:[(0,d.jsxs)("button",{onClick:()=>p(null),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",u?.categories?.reduce((S,j)=>S+j.services.length,0),")"]}),u?.categories?.map(S=>(0,d.jsx)("button",{onClick:()=>p(S),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?.id===S.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:S.name},S.id))]})]}),l==="standalone"&&(0,d.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 items-start mb-4",children:(0,d.jsxs)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full",children:[(0,d.jsxs)("button",{onClick:()=>e(Un(null)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",n.reduce((S,j)=>S+j.services.length,0),")"]}),n.map(S=>(0,d.jsxs)("button",{onClick:()=>e(Un(S)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?.id===S.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:[S.name," (",S.services.length,")"]},S.id))]})}),(0,d.jsx)("div",{className:`overflow-y-auto pb-20 lg:pb-4 scrollbar-none ${l==="standalone"?"h-[calc(100dvh-315px)] md:h-[calc(100dvh-300px)]":"h-[calc(100dvh-415px)] lg:h-[calc(100dvh-390px)]"}`,children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-3",children:o?Array.from({length:10}).map((S,j)=>(0,d.jsx)(Xh,{},j)):(0,d.jsx)(mt,{mode:"popLayout",children:E?.map((S,j)=>{const M=a.some(V=>V.id===S.id);return(0,d.jsxs)(at.div,{variants:I3,initial:"hidden",animate:"visible",exit:"exit",custom:j,layout:!0,onClick:()=>{const V=a.find(P=>P.id===S.id);V&&V.qty===1?e(Wn(String(S.id))):e(zn(S))},className:["relative border rounded-md p-3 cursor-pointer transition-all ",M?"border-btn-bg/80 bg-btn-bg-hover/5":"border-black/30 hover:border-btn-bg-hover/80 bg-white"].join(" "),children:[C(S)&&(0,d.jsx)("span",{className:"absolute top-0 left-0 text-[9px] px-2 py-0.5 bg-green-700 text-white rounded-br-md rounded-tl-md",children:"TAX"}),ko(S)&&(0,d.jsx)("span",{className:"absolute top-0 right-0 text-[9px] px-2 py-0.5 bg-black/80 text-white rounded-bl-md rounded-tr-md",children:"CONSENT"}),(0,d.jsx)("p",{className:"font-bold text-sm mb-1 mt-3 line-clamp-1 uppercase",children:S.name}),(0,d.jsxs)("div",{className:"relative group",children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-black/40 line-clamp-1 uppercase",children:S.description}),S.description?.length>30&&(0,d.jsx)("div",{className:"absolute hidden group-hover:block bg-neutral-100 text-xs p-2 rounded top-3 mt-1 z-10 w-52",children:S.description})]}),(0,d.jsxs)("p",{className:"text-sm font-semibold text-black/60 mb-2 flex justify-between mt-2",children:[(0,d.jsx)("span",{children:S.estimated_time?`${S.estimated_time} min`:`${S.min_time}-${S.max_time} min`}),(0,d.jsxs)("span",{className:"font-mono flex items-center gap-1",children:[(0,d.jsx)($e,{size:14}),S.price?S.price:`${S.min_price}-${S.max_price}`]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-start mt-4 border border-gray-300 max-w-fit",children:[(0,d.jsx)("button",{onClick:V=>{V.stopPropagation(),e(Wn(String(S.id)))},className:"w-10 h-8 flex items-center justify-center hover:bg-stone-100 transition-all",children:(0,d.jsx)(Wh,{size:14})}),(0,d.jsx)("span",{className:"text-sm font-semibold min-w-5 w-10 h-8 border-x border-gray-300 text-center flex items-center justify-center",children:a.find(V=>V.id===S.id)?.qty||0}),(0,d.jsx)("button",{onClick:V=>{V.stopPropagation(),a.find(P=>P.id===S.id)?e(Hu(String(S.id))):e(zn(S))},className:"w-10 h-8 bg-btn-bg/80 text-white flex items-center justify-center hover:bg-btn-bg-hover/90 transition-all",children:(0,d.jsx)(hs,{size:14})})]})]},S.id)})})})})]})]})}var k3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ps({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:i=0,onTipChange:a,consentRequired:o=!1,consentCompleted:s=0,totalConsents:l=0,checkingConsent:c=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:h}){const{selectedSlotIndexes:p,slots:m,selectedDate:y}=(0,K.useSelector)(D=>D.slots),{staff:g,selectedServices:v,selectedProfessional:x}=(0,K.useSelector)(D=>D.service),{timeZone:$}=(0,K.useSelector)(D=>D.outletDetails),w=ke.DateTime.now().setZone($??"UTC"),[E,C]=(0,b.useState)(""),[_,S]=(0,b.useState)(!1),j=(0,b.useRef)(null),M=(0,b.useRef)(null),[V,P]=(0,b.useState)(0),U=[0,5,10,15,20],k=(0,b.useMemo)(()=>[...m?.morning||[],...m?.afternoon||[],...m?.evening||[]],[m]),W=15,G=(0,b.useMemo)(()=>{if(!x?.id)return[];const D=g?.find(A=>A.id===x.id);return D?v.map(A=>{const ne=D.assignments?.find(Ke=>Ke.id===A.id),ye={...A,price:ne?.price||A.price||A.min_price||0,duration:ne?.duration||A.estimated_time||A.min_time||0};return{...ye,tax:no(ye),unitTax:no(ye,{perUnit:!0})}}):[]},[x,g,v]),H=G.reduce((D,A)=>D+Number(A.price)*(A.qty||1),0),te=G.reduce((D,A)=>D+Number(A.duration)*(A.qty||1),0),re=Math.ceil(te/W),ue=D=>{if(!k.length)return"";const A=k[D]?.start_time,ne=k[D+re-1];return!A||!ne?"":`${A} - ${ne.end_time||ne.start_time}`},Ee=y||{day:w.day,month:w.month,year:w.year},N=p?.[0],T=N!==void 0?ue(N):null,F=Ee.month??0,B=T?`${k3[F]} ${Ee.day} at ${T}`:null,z=G.reduce((D,A)=>D+A.tax,0),X=Number(i)||0,q=n?H*X/100:0,Y=H+z+q;(0,b.useEffect)(()=>{n&&i==null&&a?.(0)},[n,i,a]);const J=(0,b.useMemo)(()=>u?"Processing...":c?"Checking consents...":o&&s<l?`Sign Consents (${s}/${l})`:(0,d.jsxs)(d.Fragment,{children:[e||"Book Appointment",(0,d.jsx)(t3,{})]}),[u,c,o,s,l,e]),Z=f||u||c||!T;return(0,b.useEffect)(()=>{const D=()=>{const ne=j.current?.offsetHeight||0,ye=M.current?.offsetHeight||0,Ke=(ne+(_?70:n?68:56)||0)+ye;P(window.innerHeight-Ke)};D();const A=new ResizeObserver(()=>{D()});return M.current&&A.observe(M.current),j.current&&A.observe(j.current),window.addEventListener("resize",D),()=>{A.disconnect(),window.removeEventListener("resize",D)}},[G,n,s,l,_]),(0,d.jsxs)("div",{className:"h-full flex flex-col justify-between",children:[(0,d.jsxs)("div",{className:"first",ref:j,children:[(0,d.jsxs)("p",{className:"font-bebas text-xl mb-3 flex flex-row justify-between items-center",children:["Your Order",h&&(0,d.jsx)("button",{onClick:h,className:"md:hidden block w-auto p-2 text-3xl border-none cursor-pointer rounded",children:(0,d.jsx)(_t,{})})]}),x?.id&&(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-3 p-3 border border-border rounded bg-white",children:[x.imageUrl?(0,d.jsx)("img",{src:x.imageUrl,alt:x.name,className:"w-10 h-10 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-full text-white flex items-center justify-center",style:{background:x.color||"#111"},children:lr(x.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-semibold",children:x.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:x.staff_type})]})]}),(0,d.jsxs)("div",{className:"text-sm mb-3 border-b border-border pb-2 font-bold flex justify-between",children:[(0,d.jsx)("span",{children:"Date & Time:"}),B?(0,d.jsx)("span",{className:"text-red",children:B}):(0,d.jsx)("span",{className:"text-muted",children:"No time selected"})]})]}),(0,d.jsx)("ul",{className:"overflow-y-scroll mb-1 scrollbar-none",style:{height:`${V}px`},children:G?.length>0&&G.map((D,A)=>(0,d.jsxs)("li",{className:`flex justify-between text-sm py-1.5 ${A!==G?.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsxs)("span",{className:"flex justify-between flex-row items-center gap-1",children:[D.name," ",(0,d.jsx)(_t,{size:12})," ",D.qty," (",D.duration," min)"]}),(0,d.jsxs)("span",{className:"flex flex-col items-end",children:[(0,d.jsxs)("span",{className:"flex items-center",children:[(0,d.jsx)($e,{size:12}),D.price]}),D.tax>0&&(0,d.jsxs)("span",{className:"flex items-center text-[11px] text-gray-700",children:["+ Tax:"," ",(0,d.jsx)($e,{size:11}),D.unitTax.toFixed(2)]})]})]},D.id))}),(0,d.jsxs)("div",{className:"third",ref:M,children:[n&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[1.5px] mt-4 mb-2",children:"Add Tip"}),(0,d.jsx)("div",{className:"flex gap-1 mb-2",children:[...U,"custom"].map((D,A)=>{const ne=D==="custom",ye=ne?_:X===D,Ke=A===0,Yr=A===[...U,"custom"].length-1;return(0,d.jsx)("button",{onClick:()=>{ne?(S(!0),a?.(Number(E)||0)):(S(!1),C(""),a?.(Number(D)))},className:`
|
|
24
|
+
${r?"border-btn-bg-hover bg-white shadow-lg":e.isOpen?"border-gray-200 bg-white hover:border-gray-300 hover:shadow-md":"border-red-300 bg-red-50/50"}`,onClick:()=>t(String(e?.id)),children:[(0,d.jsx)("div",{className:"flex items-start justify-end",children:(0,d.jsx)(b3,{status:e.isOpen})}),(0,d.jsx)("div",{className:"px-4 pb-4 pt-1",children:(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h2",{className:"text-lg font-black uppercase tracking-tight text-gray-900 line-clamp-1",children:e.outletName}),(0,d.jsx)("p",{className:"text-sm text-neutral-500 mt-1 break-all line-clamp-2 min-h-10",children:e.address})]})})]});function x3({outlets:e,onSelectOutlet:t}){const[r,n]=(0,b.useState)(null),[i,a]=(0,b.useState)(""),o=l=>{n(l);const c=e.find(u=>u.id==l);c&&setTimeout(()=>{t(c)},100)},s=(0,b.useMemo)(()=>{if(!i.trim())return e;const l=i.toLowerCase();return e.filter(c=>c.outletName?.toLowerCase().includes(l)||c.address?.toLowerCase().includes(l))},[e,i]);return(0,d.jsxs)("div",{className:"min-h-screen bg-[#f3f1ee] px-4 py-10 sm:px-8 lg:px-16",children:[(0,d.jsxs)("div",{className:"mb-8 flex flex-col lg:flex-row lg:items-center gap-4 justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-3xl sm:text-4xl xl:text-5xl font-black uppercase tracking-tight text-gray-900 mb-3",children:"Choose Your Outlet"}),(0,d.jsx)("div",{className:"w-14 h-0.5 bg-btn-bg"})]}),(0,d.jsxs)("div",{className:"relative w-full lg:max-w-md flex items-center",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ms,{size:18})}),(0,d.jsx)("input",{type:"text",placeholder:"Search outlet...",value:i,onChange:l=>a(l.target.value),className:"w-full h-11 rounded-md border border-gray-300 bg-white pl-10 pr-20 text-sm outline-none transition-all focus:border-gray-400"}),(0,d.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-2",children:i&&(0,d.jsx)("button",{onClick:()=>a(""),className:"text-gray-400 hover:text-black transition-all cursor-pointer",children:(0,d.jsx)(_t,{size:16})})})]})]}),(0,d.jsx)("div",{className:"py-2 max-h-[70vh] md:max-h-[80vh] overflow-auto scrollbar-none",children:s.length>0?(0,d.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4",children:(0,d.jsx)(mt,{mode:"popLayout",children:s.map((l,c)=>(0,d.jsx)(at.div,{variants:v3,initial:"hidden",animate:"visible",exit:"exit",custom:c,layout:"position",style:{willChange:"transform, opacity"},children:(0,d.jsx)($3,{item:l,onSelect:o,selected:r===l.id})},l.id))})}):(0,d.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,d.jsxs)("div",{className:"text-center",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"No outlets found"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Try searching with a different keyword"})]})})})]})}var w3={USD:Uh,INR:qb,EUR:Hb,GBP:a3},$e=({size:e=20})=>{const t=(0,K.useSelector)(r=>r.outletDetails?.currency);return(0,d.jsx)(t?w3[t]:Uh,{size:e})},lr=(e="")=>{const t=e.trim().split(" ").filter(Boolean);return t.length===0?"":((t[0]?.[0]??"")+(t.length>1?t[t.length-1]?.[0]??"":"")).toUpperCase()},S3=e=>Number(e.price||e.min_price||0),_d=(e,{perUnit:t=!1}={})=>{const r=S3(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((i,a)=>a.isActive?a.taxType==="FIXED"?i+(a.taxRate||0)*n:a.taxType==="PERCENTAGE"?i+r*n*(a.taxRate||0)/100:i:i,0)};function qr(){const[e,t]=(0,b.useState)({width:0,height:0});return(0,b.useEffect)(()=>{const r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),e}var C3=[{label:"Services",page:"services",icon:(0,d.jsx)(Hh,{size:16})},{label:"Professional",page:"professionals",icon:(0,d.jsx)(Kh,{size:16})},{label:"Time Slot",page:"time",icon:(0,d.jsx)(Ti,{size:16})},{label:"Details",page:"details",icon:(0,d.jsx)(zh,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,d.jsx)(ro,{size:16})}],N3=[{label:"Professional",page:"professionals",icon:(0,d.jsx)(Kh,{size:16})},{label:"Service",page:"services",icon:(0,d.jsx)(Hh,{size:16})},{label:"Time",page:"time",icon:(0,d.jsx)(Ti,{size:16})},{label:"Details",page:"details",icon:(0,d.jsx)(zh,{size:16})},{label:(0,d.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,d.jsx)(ro,{size:13})]}),page:"confirm",icon:(0,d.jsx)(ro,{size:16})}];function kt(){const e=(0,K.useDispatch)(),{width:t}=qr(),{isService:r}=(0,K.useSelector)(f=>f.outletDetails),n=(0,K.useSelector)(f=>f.outletList.outlets),{currentStep:i,completedSteps:a}=(0,K.useSelector)(f=>f.breadcrumbs),o=r?C3:N3,s=o.findIndex(f=>f.page===i),l=()=>{e({type:"RESET_ALL"}),Do.purge()},c=()=>{if(s===0&&n.length>1){l(),e(Jp());return}if(s<=0)return;const f=o[s-1];e(Oa(f.page))},u=o[s];return(0,d.jsx)(d.Fragment,{children:t<480?(0,d.jsxs)("div",{className:"flex items-center flex-row gap-4 font-semibold",children:[(0,d.jsx)("button",{onClick:c,disabled:!1,className:"flex items-center text-xl disabled:text-gray-200 mr-2 cursor-pointer",children:(0,d.jsx)(Qn,{size:20})}),(0,d.jsx)("span",{className:"flex flex-row items-center text-base",children:u?.label})]}):(0,d.jsxs)("div",{className:"hidden md:flex items-center gap-4 w-full",children:[(0,d.jsx)("button",{onClick:c,className:"flex cursor-pointer items-center justify-center h-10 w-10 rounded-full border border-gray-200 hover:bg-gray-100 transition outline-none!",children:(0,d.jsx)(Qn,{size:20})}),(0,d.jsx)("nav",{className:"grid grid-cols-5 w-full overflow-hidden",children:o.map((f,h)=>{const p=i===f.page,m=a?.includes(f.page)||h<=s;return(0,d.jsxs)("button",{onClick:()=>{m&&e(Oa(f.page))},className:["relative h-10 flex items-center justify-center gap-2 uppercase tracking-[1px] text-[11px] font-semibold transition-all border-b-2",m?"cursor-pointer":"cursor-not-allowed opacity-40",p?"border-btn-bg text-black bg-btn-bg-hover/5":"border-transparent text-black/60 hover:text-black"].join(" "),children:[(0,d.jsx)("span",{className:`${p?"text-btn-bg":"text-btn-bg-hover"}`,children:f.icon}),(0,d.jsx)("span",{children:f.label})]},f.page)})})]})})}function Dt({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:i,isSidebarOpen:a=!1}){return(0,d.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,d.jsxs)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-[minmax(0,1fr)_350px] lg:grid-cols-[minmax(0,1fr)_360px] overflow-hidden relative",children:[(0,d.jsxs)("main",{className:"p-4",children:[e,(0,d.jsx)("div",{className:"md:hidden fixed bottom-5 left-0 right-0 flex items-center justify-center z-50 px-4",children:n?(0,d.jsx)("button",{onClick:i,className:"p-3! px-8.5! text-sm relative rounded-full btn-bg text-white hover:text-white border-none font-dm font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-[#ccc] disabled:cursor-not-allowed",children:(0,d.jsx)("span",{children:"View Order"})}):r})]}),(0,d.jsx)("aside",{className:"hidden md:flex flex-col bg-surface border-l border-black/10 p-4 pb-3.5 h-[calc(100dvh)]",children:t})]}),a&&(0,d.jsx)("div",{className:"fixed z-999 bottom-0 left-0 right-0 h-screen bg-white rounded-t-2xl flex flex-col animate-fade-in",children:(0,d.jsx)("div",{className:"flex-1 md:px-6 p-4 fixed top-0 left-0 right-0 bottom-0",children:t})})]})}var qh=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:i})=>{const{outletName:a}=(0,K.useSelector)(l=>l.outletDetails),{isService:o}=(0,K.useSelector)(l=>l.outletDetails),s=t.length>0;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"p-3 border-b border-gray-300",children:[(0,d.jsx)("p",{className:"font-black uppercase tracking-tight text-2xl mb-0",children:"Your Order"}),(0,d.jsxs)("p",{className:"text-xs font-semibold text-black/40 uppercase line-clamp-1",children:[a||"-"," Outlet"]})]}),(0,d.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,d.jsxs)("div",{className:"p-3",children:[e?.id&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase",children:"Selected Professional"}),(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-4 py-2 px-3 border border-black/20 rounded",children:[e.imageUrl?(0,d.jsx)("img",{src:e.imageUrl,alt:e.name,className:"w-10 h-10 rounded-lg object-cover border border-black/10"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-lg bg-btn-bg/50 text-white flex items-center justify-center",style:{background:e.color||"#111"},children:lr(e.name)}),(0,d.jsxs)("div",{className:"overflow-hidden",children:[(0,d.jsx)("p",{className:"text-sm font-bold uppercase line-clamp-1",children:e.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500 uppercase line-clamp-1",children:e.staff_type})]})]})]}),s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase",children:"Selected Services"}),(0,d.jsx)("ul",{className:"md:h-[calc(100dvh-410px)] h-[calc(100dvh-260px)] overflow-y-auto scrollbar-none",children:t.map((l,c)=>(0,d.jsxs)("li",{className:`flex flex-col items-start text-sm py-2 ${c!==t.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsx)("p",{className:"flex items-center gap-1 line-clamp-1 text-sm font-medium uppercase",children:l.name}),(0,d.jsxs)("div",{className:"grid grid-cols-3 items-center gap-2 w-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-start gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Gh,{size:13}),(0,d.jsx)("span",{children:l.qty})]}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Ti,{size:13}),(0,d.jsxs)("span",{children:[l.min_time||l.estimated_time," min"]})]}),(0,d.jsxs)("p",{className:"flex items-center justify-end gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)($e,{size:12}),l.price||l.min_price]})]})]},l.id))})]})]}),(0,d.jsxs)("div",{className:"p-3 border-t border-gray-300",children:[s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Subtotal"}),(0,d.jsxs)("span",{className:"font-mono font-semibold flex items-center",children:[(0,d.jsx)($e,{size:18}),r]})]}),(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Duration"}),(0,d.jsxs)("span",{className:"font-mono font-semibold",children:[n," mins"]})]})]}),(0,d.jsx)("button",{disabled:o?!t.length:!e,onClick:()=>i("time"),className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover px-2 w-full relative py-3 font-dm text-xs font-bold tracking-[1.5px] uppercase cursor-pointer mt-3.5 transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed max-md:py-3.5 max-md:text-xs",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:[o?"Choose Time":"Choose Services",(0,d.jsx)(Mt,{size:16})]})})]})]})]})},P3={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}};function E3(){const{width:e}=qr(),t=(0,K.useDispatch)(),{staff:r,selectedProfessional:n}=(0,K.useSelector)(o=>o.service),i=e<768,a=!r||r.length===0;return(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(qh,{pro:n,goToStep:()=>t(Ne())}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"font-bebas text-xl md:text-2xl lg:text-4xl",children:"Choose a Professional"}),(0,d.jsx)("p",{className:"text-sm text-black/60 mb-4",children:"Available based on selected services"}),(0,d.jsx)(mt,{mode:"wait",children:a&&(0,d.jsx)(at.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"text-sm text-btn-bg/90 font-semibold",children:"No staff available for selected services"},"no-staff")}),(0,d.jsx)("div",{className:"h-[calc(100dvh-210px)] max-md:h-[calc(100dvh-200px)] overflow-y-auto scrollbar-none pb-20 lg:pb-4",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(195px,1fr))] gap-3",children:(0,d.jsx)(mt,{mode:"popLayout",children:r?.map((o,s)=>(0,d.jsxs)(at.div,{variants:P3,initial:"hidden",animate:"visible",exit:"exit",custom:s,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{t(Ku(o)),t(Kt(null)),i&&t(Ne())},className:`pro-card border border-border rounded-sm p-4 cursor-pointer transition flex items-center gap-4 ${n?.id===o.id?"border-red bg-[#fff8f8]":"bg-white hover:border-red"}`,children:[o.imageUrl?(0,d.jsx)("img",{src:o.imageUrl,alt:o.name,className:"w-12 h-12 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg",style:{background:o.color||"#111"},children:lr(o.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:o.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:o.staff_type})]})]},o.id))})})})]})]})}var T3=e=>Number(e.price||e.min_price||0),no=(e,{perUnit:t=!1}={})=>{const r=T3(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((i,a)=>a.isActive?a.taxType==="FIXED"?i+a.taxRate*n:a.taxType==="PERCENTAGE"?i+r*n*a.taxRate/100:i:i,0)},j3={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}};function O3(){const e=(0,K.useDispatch)(),{width:t}=qr(),{staff:r,selectedServices:n,selectedProfessional:i}=(0,K.useSelector)(m=>m.service),[a,o]=(0,b.useState)(!1),s=n.map(m=>m.id),l=(0,b.useMemo)(()=>{if(!i?.id)return[];const m=r.find(y=>y.id===i.id);return m?n.map(y=>{const g=m?.assignments?.find(x=>x.id===y?.id),v={...y,price:g?.price||y.price||y.min_price||0,duration:g?.duration||y.estimated_time||y.min_time||0};return{...v,tax:no(v)}}):[]},[i,r,n]),c=l.reduce((m,y)=>m+Number(y.price||0)*y.qty,0),u=l.reduce((m,y)=>m+(y?.duration||0)*y.qty,0),f=(0,b.useMemo)(()=>s.length?r.filter(m=>{const y=m.assignments??[];return s?.every(g=>y.some(v=>String(v.id)==String(g)&&!!v?.assigned))}):[],[r,s]),h=t<768,p=s.length>0;return(0,b.useEffect)(()=>{if(p&&f.length===0){const m=setTimeout(()=>o(!0),300);return()=>clearTimeout(m)}else o(!1)},[p,f]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(qh,{pro:i,selectedStaffServices:l,totalPrice:c,totalDuration:u,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!n.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed ",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Time ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Choose a Professional"}),(0,d.jsx)("p",{className:"text-sm text-black/60 mb-6",children:"Available based on selected services"}),(0,d.jsx)(mt,{mode:"wait",children:a&&(0,d.jsx)(at.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"text-sm text-btn-bg/90 font-semibold",children:"No staff available for selected services"},"no-staff")}),(0,d.jsx)("div",{className:"h-[calc(100dvh-210px)] max-md:h-[calc(100dvh-200px)] overflow-y-auto scrollbar-none pb-20 lg:pb-4",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(195px,1fr))] gap-3",children:(0,d.jsx)(mt,{mode:"popLayout",children:f.map((m,y)=>(0,d.jsxs)(at.div,{variants:j3,initial:"hidden",animate:"visible",exit:"exit",custom:y,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{e(Ku(m)),e(Kt(null)),h&&e(Ne())},className:`pro-card border-2 border-black/15 rounded p-3 cursor-pointer transition flex items-center gap-4 ${i?.id===m.id?"border-btn-bg-hover/80 bg-btn-bg-hover/5":"bg-white hover:border-btn-bg/80"}`,children:[m.imageUrl?(0,d.jsx)("img",{src:m.imageUrl,alt:m.name,className:"w-12 h-12 rounded-lg object-cover border border-black/10"}):(0,d.jsx)("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center text-white font-bold text-lg",style:{background:m.color||"#111"},children:lr(m.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-md uppercase",children:m.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500 uppercase",children:m.staff_type})]})]},m.id))})})})]})]})}function Yh({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,K.useSelector)(a=>a?.outletDetails),{isService:i}=(0,K.useSelector)(a=>a.outletDetails);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"p-3 border-b border-gray-300",children:[(0,d.jsx)("p",{className:"font-black uppercase tracking-tight text-2xl mb-0",children:"Your Order"}),(0,d.jsxs)("p",{className:"text-xs font-semibold text-black/40 uppercase line-clamp-1",children:[n||"-"," Outlet"]})]}),(0,d.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,d.jsxs)("div",{className:"p-3",children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase line-clamp-1",children:"SELECTED SERVICES"}),e?.length>0&&(0,d.jsx)("ul",{className:"md:h-[calc(100dvh-270px)] h-[calc(100dvh-230px)] overflow-y-scroll scrollbar-none",children:e?.map((a,o)=>(0,d.jsxs)("li",{className:`flex justify-start flex-col items-start text-sm py-2 ${o!==e?.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsx)("p",{className:"flex justify-between flex-row items-center gap-1 line-clamp-1 text-sm font-medium uppercase",children:a.name}),(0,d.jsxs)("div",{className:"grid grid-cols-3 items-center gap-2 w-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-start gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Gh,{size:13}),(0,d.jsx)("span",{children:a.qty})]}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Ti,{size:13}),(0,d.jsxs)("span",{children:[a.min_time||a.estimated_time," min"]})]}),(0,d.jsxs)("p",{className:"flex items-center justify-end gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)($e,{size:12}),a.price||a.min_price]})]})]},a.id))})]}),(0,d.jsxs)("div",{className:"p-3 border-t border-gray-300",children:[(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Subtotal"}),(0,d.jsxs)("span",{className:"font-mono font-semibold flex flex-row items-center",children:[(0,d.jsx)($e,{size:18}),t]})]}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover px-2 w-full relative py-3 font-dm text-xs font-bold tracking-[1.5px] uppercase cursor-pointer mt-3.5 transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed max-md:py-3.5 max-md:text-xs",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:[i?"Choose Professional":"Choose Time",(0,d.jsx)(Mt,{size:16})]})})})]})]})]})}function Xh(){return(0,d.jsx)("div",{className:"h-33.5 rounded-sm relative overflow-hidden bg-[#e0e0e0]",children:(0,d.jsx)("div",{className:"absolute top-0 -left-full h-full w-full",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}var _3={hidden:{opacity:0,y:14},visible:e=>({opacity:1,y:0,transition:{delay:e*.05,duration:.15,ease:[.22,1,.36,1]}}),exit:{opacity:0,y:8,transition:{duration:.2}}};function A3(){const e=(0,K.useDispatch)(),t=(0,b.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,selectedProfessional:o,loading:s}=(0,K.useSelector)(P=>P.service),[l,c]=(0,b.useState)("supercategory"),[u,f]=(0,b.useState)(null),[h,p]=(0,b.useState)(null),[m,y]=(0,b.useState)(""),g=new Set(o?o?.assignments?.map(P=>P.id):[]),v=new Set(o?o?.assignments?.map(P=>P.categoryId):[]),x=n?.filter(P=>v.has(P.id))?.map(P=>({...P,services:P.services.filter(U=>g.has(U.id))})),$=r?.map(P=>({...P,categories:P.categories?.filter(U=>v.has(U.id))?.map(U=>({...U,services:U.services.filter(k=>g.has(k.id))}))?.filter(U=>U.services.length>0)}))?.filter(P=>P.categories.length>0),w=x?.flatMap(P=>P.services),E=i?i.services:w,C=(0,b.useMemo)(()=>u?h?h.services||[]:u.categories?.flatMap(P=>P.services||[]):[],[u,h]),_=l==="standalone"?E:C,S=(0,b.useMemo)(()=>{const P=x?.flatMap(k=>k.services||[]),U=$?.flatMap(k=>k.categories?.flatMap(W=>W.services||[]));return[...P,...U]},[x,$]),j=(0,b.useMemo)(()=>{const P=m.trim().toLowerCase();return P?S.filter(U=>U.name?.toLowerCase().includes(P)||U.description?.toLowerCase().includes(P)):_},[m,S,_]),M=P=>P.taxRows?.some(U=>U.isActive)||!1,V=a.reduce((P,U)=>P+Number(U.price||0)*U.qty,0);return(0,b.useEffect)(()=>{if(l==="supercategory"&&$?.length>0&&!u){const P=$[0];f(P),p(P?.categories?.[0]||null)}},[l,$,u]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(Yh,{selectedServices:a,totalPrice:V,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!a.length,className:"bg-btn-bg text-btn-bg border-btn-bg hover:text-btn-bg-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Time ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Choose a Service"}),(0,d.jsxs)("p",{className:"text-sm text-black/60 mb-6",children:["Select from ",o?.name,"'s available services"]}),(0,d.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-4 lg:gap-8 mb-5 border-b border-black/40",children:[(0,d.jsxs)("div",{className:"flex items-end gap-8",children:[(0,d.jsx)("button",{onClick:()=>{c("supercategory"),p(null),f(null)},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="supercategory"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Super Category"}),(0,d.jsx)("button",{onClick:()=>{c("standalone")},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="standalone"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Standalone"})]}),(0,d.jsx)("div",{className:"pb-2",children:(0,d.jsxs)("div",{className:"relative w-full",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ms,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:m,onChange:P=>y(P.target.value),className:"w-full border border-black/30 rounded-md pl-9 pr-10 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-black/20"}),m&&(0,d.jsx)("button",{onClick:()=>y(""),className:"absolute cursor-pointer right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black transition",children:(0,d.jsx)(_t,{size:16})})]})})]}),l==="supercategory"&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-3 border border-black/20 p-1",children:$.map(P=>(0,d.jsxs)("button",{onClick:()=>{f(P),p(P?.categories?.[0]||null)},className:`border text-left py-2 px-4 transition-all cursor-pointer min-w-fit ${u?.id===P.id?"border-btn-bg-hover/50 bg-btn-bg-hover/10":"border-black/30 bg-white hover:border-btn-bg/50"}`,children:[(0,d.jsx)("h3",{className:"font-medium text-sm mb-1 font-serif",children:P.name}),(0,d.jsxs)("p",{className:"text-[10px] uppercase tracking-[1px] font-semibold text-black/60",children:[P?.categories?.length||0," Sub Categories"]})]},P.id))}),u&&(0,d.jsxs)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-5",children:[(0,d.jsxs)("button",{onClick:()=>p(null),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",u?.categories?.reduce((P,U)=>P+U.services.length,0),")"]}),u?.categories?.map(P=>(0,d.jsx)("button",{onClick:()=>p(P),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?.id===P.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:P.name},P.id))]})]}),l==="standalone"&&(0,d.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 items-start mb-4",children:(0,d.jsxs)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full",children:[(0,d.jsxs)("button",{onClick:()=>e(Un(null)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",x.reduce((P,U)=>P+U.services.length,0),")"]}),x.map(P=>(0,d.jsxs)("button",{onClick:()=>e(Un(P)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?.id===P.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:[P.name," (",P.services.length,")"]},P.id))]})}),(0,d.jsx)("div",{className:`overflow-y-auto pb-20 lg:pb-4 scrollbar-none ${l==="standalone"?"h-[calc(100dvh-315px)] md:h-[calc(100dvh-300px)]":"h-[calc(100dvh-415px)] lg:h-[calc(100dvh-390px)]"}`,children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-3",children:s?Array.from({length:10}).map((P,U)=>(0,d.jsx)(Xh,{},U)):(0,d.jsx)(mt,{mode:"popLayout",children:j?.map((P,U)=>{const k=a.some(W=>W.id===P.id);return(0,d.jsxs)(at.div,{variants:_3,initial:"hidden",animate:"visible",exit:"exit",custom:U,layout:!0,onClick:()=>{const W=a.find(G=>G.id===P.id);W&&W.qty===1?e(Wn(String(P.id))):e(zn({...P,price:P.price?Number(P.price):void 0}))},className:["relative border rounded-md p-3 cursor-pointer transition-all ",k?"border-btn-bg/80 bg-btn-bg-hover/5":"border-black/30 hover:border-btn-bg-hover/80 bg-white"].join(" "),children:[M(P)&&(0,d.jsx)("span",{className:"absolute top-0 left-0 text-[9px] px-2 py-0.5 bg-green-700 text-white rounded-br-md rounded-tl-md",children:"TAX"}),ko(P)&&(0,d.jsx)("span",{className:"absolute top-0 right-0 text-[9px] px-2 py-0.5 bg-black/80 text-white rounded-bl-md rounded-tr-md",children:"CONSENT"}),(0,d.jsx)("p",{className:"font-bold text-sm mb-1 mt-3 line-clamp-1 uppercase",children:P.name}),(0,d.jsxs)("div",{className:"relative group",children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-black/40 line-clamp-1 uppercase",children:P.description}),P.description?.length>30&&(0,d.jsx)("div",{className:"absolute hidden group-hover:block bg-neutral-100 text-xs p-2 rounded top-3 mt-1 z-10 w-52",children:P.description})]}),(0,d.jsxs)("p",{className:"text-sm font-semibold text-black/60 mb-2 flex justify-between mt-2",children:[(0,d.jsx)("span",{children:P.estimated_time?`${P.estimated_time} min`:`${P.min_time}-${P.max_time} min`}),(0,d.jsxs)("span",{className:"font-mono flex items-center gap-1",children:[(0,d.jsx)($e,{size:14}),P.price?P.price:`${P.min_price}-${P.max_price}`]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-start mt-4 border border-gray-300 max-w-fit",children:[(0,d.jsx)("button",{onClick:W=>{W.stopPropagation(),e(Wn(String(P.id)))},className:"w-10 h-8 flex items-center justify-center hover:bg-stone-100 transition-all",children:(0,d.jsx)(Wh,{size:14})}),(0,d.jsx)("span",{className:"text-sm font-semibold min-w-5 w-10 h-8 border-x border-gray-300 text-center flex items-center justify-center",children:a.find(W=>W.id===P.id)?.qty||0}),(0,d.jsx)("button",{onClick:W=>{W.stopPropagation(),a.find(G=>G.id===P.id)?e(Hu(String(P.id))):e(zn({...P,price:P.price?Number(P.price):void 0}))},className:"w-10 h-8 bg-btn-bg/80 text-white flex items-center justify-center hover:bg-btn-bg-hover/90 transition-all",children:(0,d.jsx)(hs,{size:14})})]})]},P.id)})})})})]})]})}var I3={hidden:{opacity:0,y:14},visible:e=>({opacity:1,y:0,transition:{delay:e*.05,duration:.15,ease:[.22,1,.36,1]}}),exit:{opacity:0,y:8,transition:{duration:.2}}};function M3(){const e=(0,K.useDispatch)(),t=(0,b.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,loading:o}=(0,K.useSelector)(S=>S.service),{outletName:s}=(0,K.useSelector)(S=>S?.outletDetails),[l,c]=(0,b.useState)("supercategory"),[u,f]=(0,b.useState)(null),[h,p]=(0,b.useState)(null),[m,y]=(0,b.useState)(""),g=n?.flatMap(S=>S.services),v=i?i.services:g,x=(0,b.useMemo)(()=>u?h?h.services||[]:u?.categories?.flatMap(S=>S.services||[]):[],[u,h]),$=l==="standalone"?v:x,w=(0,b.useMemo)(()=>{const S=n?.flatMap(M=>M.services||[]),j=r?.flatMap(M=>M?.categories?.flatMap(V=>V.services||[]));return[...S,...j]},[n,r]),E=(0,b.useMemo)(()=>{const S=m.trim().toLowerCase();return S?w.filter(j=>j.name?.toLowerCase().includes(S)||j.description?.toLowerCase().includes(S)):$},[m,w,$]),C=S=>S.taxRows?.some(j=>j.isActive)||!1,_=a.reduce((S,j)=>S+Number(j.price||0)*j.qty,0);return(0,b.useEffect)(()=>{if(l==="supercategory"&&r?.length>0&&!u){const S=r[0];f(S),p(S?.categories?.[0]||null)}},[l,r,u]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(Yh,{selectedServices:a,totalPrice:_,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!a.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed ",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Professional ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Book A Service"}),(0,d.jsxs)("p",{className:"text-sm text-black/60 mb-6",children:["Select from ",s," Outlet's available services"]}),(0,d.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-4 lg:gap-8 mb-5 border-b border-black/40",children:[(0,d.jsxs)("div",{className:"flex items-end gap-8 ",children:[(0,d.jsx)("button",{onClick:()=>{c("supercategory"),p(null),f(null)},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="supercategory"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Super Category"}),(0,d.jsx)("button",{onClick:()=>{c("standalone")},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="standalone"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Standalone"})]}),(0,d.jsx)("div",{className:"pb-2",children:(0,d.jsxs)("div",{className:"relative w-full",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ms,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:m,onChange:S=>y(S.target.value),className:"w-full border border-black/30 rounded-md pl-9 pr-10 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-black/20"}),m&&(0,d.jsx)("button",{onClick:()=>y(""),className:"absolute cursor-pointer right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black transition",children:(0,d.jsx)(_t,{size:16})})]})})]}),l==="supercategory"&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-3 border border-black/20 p-1",children:r.map(S=>(0,d.jsxs)("button",{onClick:()=>{f(S),p(S?.categories?.[0]||null)},className:`border text-left py-2 px-4 transition-all cursor-pointer min-w-fit ${u?.id===S.id?"border-btn-bg-hover/50 bg-btn-bg-hover/10":"border-black/30 bg-white hover:border-btn-bg/50"}`,children:[(0,d.jsx)("h3",{className:"font-medium text-sm mb-1 font-serif",children:S.name}),(0,d.jsxs)("p",{className:"text-[10px] uppercase tracking-[1px] font-semibold text-black/60",children:[S?.categories?.length||0," Sub Categories"]})]},S.id))}),u&&(0,d.jsxs)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-5",children:[(0,d.jsxs)("button",{onClick:()=>p(null),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",u?.categories?.reduce((S,j)=>S+j.services.length,0),")"]}),u?.categories?.map(S=>(0,d.jsx)("button",{onClick:()=>p(S),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?.id===S.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:S.name},S.id))]})]}),l==="standalone"&&(0,d.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 items-start mb-4",children:(0,d.jsxs)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full",children:[(0,d.jsxs)("button",{onClick:()=>e(Un(null)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",n.reduce((S,j)=>S+j.services.length,0),")"]}),n.map(S=>(0,d.jsxs)("button",{onClick:()=>e(Un(S)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?.id===S.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:[S.name," (",S.services.length,")"]},S.id))]})}),(0,d.jsx)("div",{className:`overflow-y-auto pb-20 lg:pb-4 scrollbar-none ${l==="standalone"?"h-[calc(100dvh-315px)] md:h-[calc(100dvh-300px)]":"h-[calc(100dvh-415px)] lg:h-[calc(100dvh-390px)]"}`,children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-3",children:o?Array.from({length:10}).map((S,j)=>(0,d.jsx)(Xh,{},j)):(0,d.jsx)(mt,{mode:"popLayout",children:E?.map((S,j)=>{const M=a.some(V=>V.id===S.id);return(0,d.jsxs)(at.div,{variants:I3,initial:"hidden",animate:"visible",exit:"exit",custom:j,layout:!0,onClick:()=>{const V=a.find(P=>P.id===S.id);V&&V.qty===1?e(Wn(String(S.id))):e(zn(S))},className:["relative border rounded-md p-3 cursor-pointer transition-all ",M?"border-btn-bg/80 bg-btn-bg-hover/5":"border-black/30 hover:border-btn-bg-hover/80 bg-white"].join(" "),children:[C(S)&&(0,d.jsx)("span",{className:"absolute top-0 left-0 text-[9px] px-2 py-0.5 bg-green-700 text-white rounded-br-md rounded-tl-md",children:"TAX"}),ko(S)&&(0,d.jsx)("span",{className:"absolute top-0 right-0 text-[9px] px-2 py-0.5 bg-black/80 text-white rounded-bl-md rounded-tr-md",children:"CONSENT"}),(0,d.jsx)("p",{className:"font-bold text-sm mb-1 mt-3 line-clamp-1 uppercase",children:S.name}),(0,d.jsxs)("div",{className:"relative group",children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-black/40 line-clamp-1 uppercase",children:S.description}),S.description?.length>30&&(0,d.jsx)("div",{className:"absolute hidden group-hover:block bg-neutral-100 text-xs p-2 rounded top-3 mt-1 z-10 w-52",children:S.description})]}),(0,d.jsxs)("p",{className:"text-sm font-semibold text-black/60 mb-2 flex justify-between mt-2",children:[(0,d.jsx)("span",{children:S.estimated_time?`${S.estimated_time} min`:`${S.min_time}-${S.max_time} min`}),(0,d.jsxs)("span",{className:"font-mono flex items-center gap-1",children:[(0,d.jsx)($e,{size:14}),S.price?S.price:`${S.min_price}-${S.max_price}`]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-start mt-4 border border-gray-300 max-w-fit",children:[(0,d.jsx)("button",{onClick:V=>{V.stopPropagation(),e(Wn(String(S.id)))},className:"w-10 h-8 flex items-center justify-center hover:bg-stone-100 transition-all",children:(0,d.jsx)(Wh,{size:14})}),(0,d.jsx)("span",{className:"text-sm font-semibold min-w-5 w-10 h-8 border-x border-gray-300 text-center flex items-center justify-center",children:a.find(V=>V.id===S.id)?.qty||0}),(0,d.jsx)("button",{onClick:V=>{V.stopPropagation(),a.find(P=>P.id===S.id)?e(Hu(String(S.id))):e(zn(S))},className:"w-10 h-8 bg-btn-bg/80 text-white flex items-center justify-center hover:bg-btn-bg-hover/90 transition-all",children:(0,d.jsx)(hs,{size:14})})]})]},S.id)})})})})]})]})}var k3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ps({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:i=0,onTipChange:a,consentRequired:o=!1,consentCompleted:s=0,totalConsents:l=0,checkingConsent:c=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:h}){const{selectedSlotIndexes:p,slots:m,selectedDate:y}=(0,K.useSelector)(D=>D.slots),{staff:g,selectedServices:v,selectedProfessional:x}=(0,K.useSelector)(D=>D.service),{timeZone:$}=(0,K.useSelector)(D=>D.outletDetails),w=ke.DateTime.now().setZone($??"UTC"),[E,C]=(0,b.useState)(""),[_,S]=(0,b.useState)(!1),j=(0,b.useRef)(null),M=(0,b.useRef)(null),[V,P]=(0,b.useState)(0),U=[0,5,10,15,20],k=(0,b.useMemo)(()=>[...m?.morning||[],...m?.afternoon||[],...m?.evening||[]],[m]),W=15,G=(0,b.useMemo)(()=>{if(!x?.id)return[];const D=g?.find(A=>A.id===x.id);return D?v.map(A=>{const ne=D.assignments?.find(Ke=>Ke.id===A.id),ye={...A,price:ne?.price||A.price||A.min_price||0,duration:ne?.duration||A.estimated_time||A.min_time||0};return{...ye,tax:no(ye),unitTax:no(ye,{perUnit:!0})}}):[]},[x,g,v]),H=G.reduce((D,A)=>D+Number(A.price)*(A.qty||1),0),te=G.reduce((D,A)=>D+Number(A.duration)*(A.qty||1),0),re=Math.ceil(te/W),ue=D=>{if(!k.length)return"";const A=k[D]?.start_time,ne=k[D+re-1];return!A||!ne?"":`${A} - ${ne.end_time||ne.start_time}`},Ee=y||{day:w.day,month:w.month,year:w.year},N=p?.[0],T=N!==void 0?ue(N):null,F=Ee.month??0,B=T?`${k3[F]} ${Ee.day} at ${T}`:null,z=G.reduce((D,A)=>D+A.tax,0),X=Number(i)||0,q=n?H*X/100:0,Y=H+z+q;(0,b.useEffect)(()=>{n&&i==null&&a?.(0)},[n,i,a]);const J=(0,b.useMemo)(()=>u?"Processing...":c?"Checking consents...":o&&s<l?`Sign Consents (${s}/${l})`:(0,d.jsxs)(d.Fragment,{children:[e||"Book Appointment",(0,d.jsx)(t3,{})]}),[u,c,o,s,l,e]),Z=f||u||c||!T;return(0,b.useEffect)(()=>{const D=()=>{const ne=j.current?.offsetHeight||0,ye=M.current?.offsetHeight||0,Ke=(ne+(_?70:n?68:56)||0)+ye;P(window.innerHeight-Ke)};D();const A=new ResizeObserver(()=>{D()});return M.current&&A.observe(M.current),j.current&&A.observe(j.current),window.addEventListener("resize",D),()=>{A.disconnect(),window.removeEventListener("resize",D)}},[G,n,s,l,_]),(0,d.jsxs)("div",{className:"h-full flex flex-col justify-between",children:[(0,d.jsxs)("div",{className:"first",ref:j,children:[(0,d.jsxs)("p",{className:"font-bebas text-xl mb-3 flex flex-row justify-between items-center",children:["Your Order",h&&(0,d.jsx)("button",{onClick:h,className:"md:hidden block w-auto p-2 text-3xl border-none cursor-pointer rounded",children:(0,d.jsx)(_t,{})})]}),x?.id&&(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-3 p-3 border border-border rounded bg-white",children:[x.imageUrl?(0,d.jsx)("img",{src:x.imageUrl,alt:x.name,className:"w-10 h-10 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-full text-white flex items-center justify-center",style:{background:x.color||"#111"},children:lr(x.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-semibold",children:x.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:x.staff_type})]})]}),(0,d.jsxs)("div",{className:"text-sm mb-3 border-b border-border pb-2 font-bold flex justify-between",children:[(0,d.jsx)("span",{children:"Date & Time:"}),B?(0,d.jsx)("span",{className:"text-red",children:B}):(0,d.jsx)("span",{className:"text-muted",children:"No time selected"})]})]}),(0,d.jsx)("ul",{className:"overflow-y-scroll mb-1 scrollbar-none",style:{height:`${V}px`},children:G?.length>0&&G.map((D,A)=>(0,d.jsxs)("li",{className:`flex justify-between text-sm py-1.5 ${A!==G?.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsxs)("span",{className:"flex justify-between flex-row items-center gap-1",children:[D.name," ",(0,d.jsx)(_t,{size:12})," ",D.qty," (",D.duration," min)"]}),(0,d.jsxs)("span",{className:"flex flex-col items-end",children:[(0,d.jsxs)("span",{className:"flex items-center",children:[(0,d.jsx)($e,{size:12}),D.price]}),D.tax>0&&(0,d.jsxs)("span",{className:"flex items-center text-[11px] text-gray-700",children:["+ Tax:"," ",(0,d.jsx)($e,{size:11}),D.unitTax.toFixed(2)]})]})]},D.id))}),(0,d.jsxs)("div",{className:"third",ref:M,children:[n&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[1.5px] mt-4 mb-2",children:"Add Tip"}),(0,d.jsx)("div",{className:"flex gap-1 mb-2",children:[...U,"custom"].map((D,A)=>{const ne=D==="custom",ye=ne?_:X===D,Ke=A===0,Yr=A===[...U,"custom"].length-1;return(0,d.jsx)("button",{onClick:()=>{ne?(S(!0),a?.(Number(E)||0)):(S(!1),C(""),a?.(Number(D)))},className:`
|
|
25
25
|
px-2 py-1.5 border rounded-sm cursor-pointer text-xs text-center
|
|
26
26
|
${Ke||Yr?"flex-none w-16":"flex-1"}
|
|
27
27
|
${ye?"bg-red text-white border-red":"bg-white border-border"}
|
package/dist/index.js
CHANGED
|
@@ -8186,9 +8186,9 @@ var hp = ({ pro: e, selectedStaffServices: t = [], totalPrice: r = 0, totalDurat
|
|
|
8186
8186
|
children: [e.imageUrl ? /* @__PURE__ */ h("img", {
|
|
8187
8187
|
src: e.imageUrl,
|
|
8188
8188
|
alt: e.name,
|
|
8189
|
-
className: "w-10 h-10 rounded-
|
|
8189
|
+
className: "w-10 h-10 rounded-lg object-cover border border-black/10"
|
|
8190
8190
|
}) : /* @__PURE__ */ h("div", {
|
|
8191
|
-
className: "w-10 h-10 rounded-
|
|
8191
|
+
className: "w-10 h-10 rounded-lg bg-btn-bg/50 text-white flex items-center justify-center",
|
|
8192
8192
|
style: { background: e.color || "#111" },
|
|
8193
8193
|
children: yr(e.name)
|
|
8194
8194
|
}), /* @__PURE__ */ b("div", {
|
|
@@ -8320,7 +8320,7 @@ function d$() {
|
|
|
8320
8320
|
y: 6
|
|
8321
8321
|
},
|
|
8322
8322
|
transition: { duration: 0.25 },
|
|
8323
|
-
className: "text-sm text-
|
|
8323
|
+
className: "text-sm text-btn-bg/90 font-semibold",
|
|
8324
8324
|
children: "No staff available for selected services"
|
|
8325
8325
|
}, "no-staff")
|
|
8326
8326
|
}),
|
|
@@ -8465,7 +8465,7 @@ function f$() {
|
|
|
8465
8465
|
y: 6
|
|
8466
8466
|
},
|
|
8467
8467
|
transition: { duration: 0.25 },
|
|
8468
|
-
className: "text-sm text-
|
|
8468
|
+
className: "text-sm text-btn-bg/90 font-semibold",
|
|
8469
8469
|
children: "No staff available for selected services"
|
|
8470
8470
|
}, "no-staff")
|
|
8471
8471
|
}),
|
|
@@ -8486,20 +8486,20 @@ function f$() {
|
|
|
8486
8486
|
onClick: () => {
|
|
8487
8487
|
e(hf(p)), e(tr(null)), f && e(Ie());
|
|
8488
8488
|
},
|
|
8489
|
-
className: `pro-card border border-
|
|
8489
|
+
className: `pro-card border-2 border-black/15 rounded p-3 cursor-pointer transition flex items-center gap-4 ${i?.id === p.id ? "border-btn-bg-hover/80 bg-btn-bg-hover/5" : "bg-white hover:border-btn-bg/80"}`,
|
|
8490
8490
|
children: [p.imageUrl ? /* @__PURE__ */ h("img", {
|
|
8491
8491
|
src: p.imageUrl,
|
|
8492
8492
|
alt: p.name,
|
|
8493
|
-
className: "w-12 h-12 rounded-
|
|
8493
|
+
className: "w-12 h-12 rounded-lg object-cover border border-black/10"
|
|
8494
8494
|
}) : /* @__PURE__ */ h("div", {
|
|
8495
|
-
className: "w-12 h-12 rounded-
|
|
8495
|
+
className: "w-12 h-12 rounded-lg flex items-center justify-center text-white font-bold text-lg",
|
|
8496
8496
|
style: { background: p.color || "#111" },
|
|
8497
8497
|
children: yr(p.name)
|
|
8498
8498
|
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ h("p", {
|
|
8499
|
-
className: "font-semibold text-
|
|
8499
|
+
className: "font-semibold text-md uppercase",
|
|
8500
8500
|
children: p.name
|
|
8501
8501
|
}), /* @__PURE__ */ h("p", {
|
|
8502
|
-
className: "text-xs text-gray-500",
|
|
8502
|
+
className: "text-xs text-gray-500 uppercase",
|
|
8503
8503
|
children: p.staff_type
|
|
8504
8504
|
})] })]
|
|
8505
8505
|
}, p.id))
|
|
@@ -8624,8 +8624,8 @@ function p$() {
|
|
|
8624
8624
|
...U,
|
|
8625
8625
|
services: U.services.filter((D) => g.has(D.id))
|
|
8626
8626
|
}))?.filter((U) => U.services.length > 0)
|
|
8627
|
-
}))?.filter((P) => P.categories.length > 0), w = x
|
|
8628
|
-
const P = x
|
|
8627
|
+
}))?.filter((P) => P.categories.length > 0), w = x?.flatMap((P) => P.services), E = i ? i.services : w, C = oe(() => c ? f ? f.services || [] : c.categories?.flatMap((P) => P.services || []) : [], [c, f]), A = l === "standalone" ? E : C, S = oe(() => {
|
|
8628
|
+
const P = x?.flatMap((D) => D.services || []), U = $?.flatMap((D) => D.categories?.flatMap((W) => W.services || []));
|
|
8629
8629
|
return [...P, ...U];
|
|
8630
8630
|
}, [x, $]), O = oe(() => {
|
|
8631
8631
|
const P = p.trim().toLowerCase();
|
|
@@ -8900,8 +8900,8 @@ var m$ = {
|
|
|
8900
8900
|
}
|
|
8901
8901
|
};
|
|
8902
8902
|
function y$() {
|
|
8903
|
-
const e = et(), t = ye(null), { superCategories: r, standaloneCategories: n, selectedCategory: i, selectedServices: a, loading: o } = ee((S) => S.service), { outletName: s } = ee((S) => S?.outletDetails), [l, d] = Y("supercategory"), [c, u] = Y(null), [f, m] = Y(null), [p, y] = Y(""), g = n
|
|
8904
|
-
const S = n
|
|
8903
|
+
const e = et(), t = ye(null), { superCategories: r, standaloneCategories: n, selectedCategory: i, selectedServices: a, loading: o } = ee((S) => S.service), { outletName: s } = ee((S) => S?.outletDetails), [l, d] = Y("supercategory"), [c, u] = Y(null), [f, m] = Y(null), [p, y] = Y(""), g = n?.flatMap((S) => S.services), v = i ? i.services : g, x = oe(() => c ? f ? f.services || [] : c?.categories?.flatMap((S) => S.services || []) : [], [c, f]), $ = l === "standalone" ? v : x, w = oe(() => {
|
|
8904
|
+
const S = n?.flatMap((k) => k.services || []), O = r?.flatMap((k) => k?.categories?.flatMap((V) => V.services || []));
|
|
8905
8905
|
return [...S, ...O];
|
|
8906
8906
|
}, [n, r]), E = oe(() => {
|
|
8907
8907
|
const S = p.trim().toLowerCase();
|
package/dist/styles.css
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=DM+Mono:wght@400;500&display=swap');
|
|
3
2
|
@layer properties;
|
|
4
3
|
@layer theme, base, components, utilities;
|
|
5
4
|
@layer theme {
|
|
@@ -801,6 +800,12 @@
|
|
|
801
800
|
border-color: color-mix(in oklab, var(--color-black) 10%, transparent);
|
|
802
801
|
}
|
|
803
802
|
}
|
|
803
|
+
.border-black\/15 {
|
|
804
|
+
border-color: color-mix(in srgb, #000 15%, transparent);
|
|
805
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
806
|
+
border-color: color-mix(in oklab, var(--color-black) 15%, transparent);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
804
809
|
.border-black\/20 {
|
|
805
810
|
border-color: color-mix(in srgb, #000 20%, transparent);
|
|
806
811
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -831,6 +836,12 @@
|
|
|
831
836
|
border-color: color-mix(in oklab, var(--color-btn-bg-hover) 50%, transparent);
|
|
832
837
|
}
|
|
833
838
|
}
|
|
839
|
+
.border-btn-bg-hover\/80 {
|
|
840
|
+
border-color: var(--color-btn-bg-hover);
|
|
841
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
842
|
+
border-color: color-mix(in oklab, var(--color-btn-bg-hover) 80%, transparent);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
834
845
|
.border-btn-bg\/80 {
|
|
835
846
|
border-color: var(--color-btn-bg);
|
|
836
847
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1267,6 +1278,12 @@
|
|
|
1267
1278
|
.text-btn-bg-hover {
|
|
1268
1279
|
color: var(--color-btn-bg-hover);
|
|
1269
1280
|
}
|
|
1281
|
+
.text-btn-bg\/90 {
|
|
1282
|
+
color: var(--color-btn-bg);
|
|
1283
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1284
|
+
color: color-mix(in oklab, var(--color-btn-bg) 90%, transparent);
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1270
1287
|
.text-btn-text {
|
|
1271
1288
|
color: var(--color-btn-text);
|
|
1272
1289
|
}
|
|
@@ -1448,6 +1465,16 @@
|
|
|
1448
1465
|
}
|
|
1449
1466
|
}
|
|
1450
1467
|
}
|
|
1468
|
+
.hover\:border-btn-bg\/80 {
|
|
1469
|
+
&:hover {
|
|
1470
|
+
@media (hover: hover) {
|
|
1471
|
+
border-color: var(--color-btn-bg);
|
|
1472
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1473
|
+
border-color: color-mix(in oklab, var(--color-btn-bg) 80%, transparent);
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1451
1478
|
.hover\:border-gray-300 {
|
|
1452
1479
|
&:hover {
|
|
1453
1480
|
@media (hover: hover) {
|
package/package.json
CHANGED