1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AppointmentAnalytics-C1fuoZVi.js","assets/vendor-react-zwv87yMD.js","assets/vendor-charts-CtrTLS4K.js","assets/vendor-i18n-BdYkS11p.js","assets/vendor-ui-CfDMlrKu.js","assets/vendor-pdf-DQuePnfN.js","assets/vendor-state-ByI9XJey.js","assets/vendor-editor-C_dhmuey.js","assets/vendor-react-Co1bl94l.css","assets/vendor-query-DYq8g7OI.js","assets/appointments-Dx2i2tVF.js","assets/api-client-wl3SCNAO.js","assets/authStore-Bv6p2Ne2.js","assets/i18n-CwjSIy0a.js","assets/vendor-icons-bLSWzydc.js"])))=>i.map(i=>d[i]); 2import{_ as Zt}from"./vendor-i18n-BdYkS11p.js";import{u as it,j as g,a5 as z,a6 as I,a7 as h,a8 as st,a9 as R,aa as Y,ab as P,ac as He,ad as te,ae as Ae,af as Jt,ag as ei,ah as nt,ai as rt,aj as B,ak as lt,al as at,am as ot,an as ti,ao as _e,ap as dt,aq as $,ar as Ce,as as ct,at as ht,au as O,av as ii,aw as si,ax as ni,ay as gt,az as ut,aA as re,aB as ri,aC as ft,aD as li,aE as pt,aF as mt,aG as ai,aH as vt,aI as Ye,aJ as oi,aK as me,aL as yt,aM as ve,aN as bt,aO as Te,aP as St,aQ as Et,aR as Le,aS as di,aT as Oe,aU as We,aV as ci,aW as hi,aX as ie,aY as Z,aZ as ze,a_ as gi,a$ as Me,b0 as ui,b1 as fi,b2 as pi,b3 as mi,b4 as vi,b5 as ke,b6 as yi,b7 as bi,b8 as Si,b9 as L,ba as Ei,bb as xi,bc as wi,bd as Di,be as Ri,bf as Ci,bg as K,bh as Ee,bi as Fe,bj as Ti,bk as Be,bl as Ge,bm as Mi,bn as Ne,bo as xt,bp as X,bq as wt,br as Dt,bs as ue,bt as fe,bu as ki,bv as Rt,bw as De,bx as Ni,by as Pi,bz as ji,bA as Ct,bB as Ii,bC as Hi,bD as Ai,bE as Li,bF as Oi,bG as Wi,bH as Tt,bI as Ue,bJ as zi,bK as Fi,bL as Bi,bM as Gi,bN as Ui,bO as qi,bP as Vi,r as M,bQ as _i}from"./vendor-react-zwv87yMD.js";import{u as Mt,a as ye,b as Pe}from"./vendor-query-DYq8g7OI.js";import{u as qe}from"./authStore-Bv6p2Ne2.js";import{u as kt}from"./useOrgTimezone-C1UagyKl.js";import{d as be,g as Yi,j as Xi,t as Xe}from"./timezoneFormatters-Lg56xFv0.js";import{p as $i,a as Ki}from"./api-client-wl3SCNAO.js";import{a as J}from"./appointments-Dx2i2tVF.js";import{A as Qi}from"./AppointmentForm-CxkHeeYe.js";import{A as Zi}from"./AppointmentStatusBadge-DYmwvXH1.js";import{T as Ji,a as es,b as $e,c as V,d as ts,e as _}from"./table-BLRYsg93.js";import{bg as Nt,D as is,n as ss,X as ns,bb as rs,H as ls,au as as,aq as os}from"./vendor-icons-bLSWzydc.js";import{a as ds}from"./appointment-settings-D08T_URC.js";import{B as se}from"./button-DlBDuKbo.js";import{I as cs}from"./input-C9cRIRX4.js";import{T as hs,a as gs,b as ce,c as he}from"./tabs-Dd8Qm6LV.js";import{r as us}from"./recurring-appointments-CRaDDvS_.js";import{B as fs}from"./badge-QivbhJml.js";import{c as ps}from"./vendor-router-DimZLiZb.js";import"./vendor-charts-CtrTLS4K.js";import"./vendor-ui-CfDMlrKu.js";import"./vendor-pdf-DQuePnfN.js";import"./vendor-state-ByI9XJey.js";import"./vendor-editor-C_dhmuey.js";import"./i18n-CwjSIy0a.js";import"./employeeAuthStore-lYSKMuhw.js";import"./appointment-service-types-hhBy6662.js";import"./contacts-DebKsgyA.js";import"./employees-BPFguWOi.js";import"./dialog-CCoQRIQ_.js";import"./utils-BXSzAfFa.js";import"./label-CSUA9GMO.js";import"./textarea-CfTUtQow.js";import"./checkbox-Ka5qdjOo.js";import"./select-D2pLZtG9.js";import"./searchable-select-BdQV6JVs.js";import"./ContactFormDialog-B0MqWVGg.js";import"./phoneUtils-CLDOdnrv.js";function ms({appointments:l,onRowClick:e,selectable:t,selectedIds:i=[],onSelectToggle:s,onSelectAll:r}){const{t:n}=it("appointments"),{currentOrganization:a}=qe(),o=(a==null?void 0:a.timezone)||Intl.DateTimeFormat().resolvedOptions().timeZone;if(l.length===0)return g.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-gray-500",children:[g.jsx("p",{className:"text-lg font-medium",children:n("table.empty.title")}),g.jsx("p",{className:"text-sm",children:n("table.empty.subtitle")})]});const d=l.length>0&&i.length===l.length;return g.jsxs(Ji,{children:[g.jsx(es,{children:g.jsxs($e,{children:[t&&g.jsx(V,{className:"w-10",children:g.jsx("input",{type:"checkbox",checked:d,onChange:()=>r==null?void 0:r(),className:"rounded"})}),g.jsx(V,{children:n("table.col.dateTime")}),g.jsx(V,{children:n("table.col.customer")}),g.jsx(V,{children:n("table.col.service")}),g.jsx(V,{children:n("table.col.assignedTo")}),g.jsx(V,{children:n("table.col.status")}),g.jsx(V,{children:n("table.col.location")})]})}),g.jsx(ts,{children:l.map(c=>g.jsxs($e,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>e(c),children:[t&&g.jsx(_,{children:g.jsx("input",{type:"checkbox",checked:i.includes(c.id),onChange:u=>{u.stopPropagation(),s==null||s(c.id)},onClick:u=>u.stopPropagation(),className:"rounded"})}),g.jsxs(_,{className:"whitespace-nowrap",children:[g.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[new Date(c.scheduledStart).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:o}),c.recurringAppointmentId&&g.jsx("span",{title:n("table.recurring"),children:g.jsx(Nt,{className:"h-3.5 w-3.5 text-blue-500"})})]}),g.jsxs("div",{className:"text-sm text-gray-500",children:[new Date(c.scheduledStart).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:o})," ","-"," ",new Date(c.scheduledEnd).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:o})]})]}),g.jsxs(_,{children:[g.jsx("div",{className:"font-medium",children:c.contact.name}),c.contact.phone&&g.jsx("div",{className:"text-sm text-gray-500",children:c.contact.phone})]}),g.jsx(_,{children:c.serviceType?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"inline-block h-3 w-3 rounded-full",style:{backgroundColor:c.serviceType.color}}),c.serviceType.name]}):g.jsx("span",{className:"text-gray-400",children:"-"})}),g.jsx(_,{children:c.employees.length>0?g.jsx("div",{className:"flex flex-col gap-0.5",children:c.employees.map(u=>g.jsxs("span",{className:"text-sm",children:[u.employee.firstName," ",u.employee.lastName,u.isPrimary&&g.jsx("span",{className:"ml-1 text-xs text-blue-600",children:n("table.primary")})]},u.id))}):g.jsx("span",{className:"text-gray-400",children:n("table.unassigned")})}),g.jsx(_,{children:g.jsx(Zi,{status:c.status})}),g.jsx(_,{children:g.jsx("span",{className:"text-sm text-gray-600",children:c.location||"-"})})]},c.id))})]})}class vs extends z{constructor(){super(...arguments),this.headerElRef
vendor: 4,170 bytes, line 2
2=I()}renderSimpleLayout(e,t){let{props:i,context:s}=this,r=[],n=me(s.options);return e&&r.push({type:"header",key:"header",isSticky:n,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),r.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),h(ve,{elClasses:["fc-daygrid"],viewSpec:s.viewSpec},h(yt,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[],sections:r}))}renderHScrollLayout(e,t,i,s){let r=this.context.pluginHooks.scrollGridImpl;if(!r)throw new Error("No ScrollGrid implementation");let{props:n,context:a}=this,o=!n.forPrint&&me(a.options),d=!n.forPrint&&bt(a.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:o,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),d&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Te}]}),h(ve,{elClasses:["fc-daygrid"],viewSpec:a.viewSpec},h(r,{liquid:!n.isHeightAuto&&!n.forPrint,forPrint:n.forPrint,collapsibleWidth:n.forPrint,colGroups:[{cols:[{span:i,minWidth:s}]}],sections:c}))}}function pe(l,e){let t=[];for(let i=0;i<e;i+=1)t[i]=[];for(let i of l)t[i.row].push(i);return t}function ge(l,e){let t=[];for(let i=0;i<e;i+=1)t[i]=[];for(let i of l)t[i.firstCol].push(i);return t}function Ke(l,e){let t=[];if(l){for(let i=0;i<e;i+=1)t[i]={affectedInstances:l.affectedInstances,isEvent:l.isEvent,segs:[]};for(let i of l.segs)t[i.row].segs.push(i)}else for(let i=0;i<e;i+=1)t[i]=null;return t}const Pt=$({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function jt(l){let{display:e}=l.eventRange.ui;return e==="list-item"||e==="auto"&&!l.eventRange.def.allDay&&l.firstCol===l.lastCol&&l.isStart&&l.isEnd}class It extends O{render(){let{props:e}=this;return h(gt,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Pt,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class Ht extends O{render(){let{props:e,context:t}=this,{options:i}=t,{seg:s}=e,r=i.eventTimeFormat||Pt,n=ii(s,r,t,!0,e.defaultDisplayEventEnd);return h(ni,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:si(e.seg,t),defaultGenerator:ys,timeText:n,isResizing:!1,isDateSelecting:!1}))}}function ys(l){return h(P,null,h("div",{className:"fc-daygrid-event-dot",style:{borderColor:l.borderColor||l.backgroundColor}}),l.timeText&&h("div",{className:"fc-event-time"},l.timeText),h("div",{className:"fc-event-title"},l.event.title||h(P,null,"Â ")))}class bs extends O{constructor(){super(...arguments),this.compileSegs=R(Ss)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:i}=this.compileSegs(e.singlePlacements);return h(pt,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:i,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let s=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return h(P,null,t.map(r=>{let n=r.eventRange.instance.instanceId;return h("div",{className:"fc-daygrid-event-harness",key:n,style:{visibility:s[n]?"hidden":""}},jt(r)?h(Ht,Object.assign({seg:r,isDragging:!1,isSelected:n===e.eventSelection,defaultDisplayEventEnd:!1},B(r,e.todayRange))):h(It,Object.assign({seg:r,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:n===e.eventSelection,defaultDisplayEventEnd:!1},B(r,e.todayRange))))}))}})}}function Ss(l){let e=[],t=[];for(let i of l)e.push(i.seg),i.isVisible||t.push(i.seg);return{allSegs:e,invisibleSegs:t}}const Es=$({week:"narrow"});class xs extends z{constructor(){super(...arguments),this.rootElRef=I(),this.state={dayNumberId:ti()},this.handleRootEl=e=>{_e(this.rootElRef,e),_e(this.props.elRef,e)}}render(){let{context:e,props:t,state:i,rootElRef:s}=this,{options:r,dateEnv:n}=e,{date:a,dateProfile:o}=t;const d=t.showDayNumber&&Ds(a,o.currentRange,n);return h(ht,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygri
2d-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":i.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:ws,date:a,dateProfile:o,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:d,extraRenderProps:t.extraRenderProps},(c,u)=>h("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&h(dt,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Ce(e,a,"week"),date:a,defaultFormat:Es}),!u.isDisabled&&(t.showDayNumber||ct(r)||t.forceDayTop)?h("div",{className:"fc-daygrid-day-top"},h(c,{elTag:"a",elClasses:["fc-daygrid-day-number",d&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Ce(e,a)),{id:i.dayNumberId})})):t.showDayNumber?h("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},h("a",{className:"fc-daygrid-day-number"},"Â ")):void 0,h("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,h("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},h(bs,{allDayDate:a,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:s,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),h("div",{className:"fc-daygrid-day-bg"},t.bgContent)))}}function ws(l){return l.dayNumberText||h(P,null,"Â ")}function Ds(l,e,t){const{start:i,end:s}=e,r=li(s,-1),n=t.getYear(i),a=t.getMonth(i),o=t.getYear(r),d=t.getMonth(r);return!(n===o&&a===d)&&(l.valueOf()===i.valueOf()||t.getDay(l)===1&&l.valueOf()<s.valueOf())}function At(l){return l.eventRange.instance.instanceId+":"+l.firstCol}function Lt(l){return At(l)+":"+l.lastCol}function Rs(l,e,t,i,s,r,n){let a=new Ms(E=>{let x=l[E.index].eventRange.instance.instanceId+":"+E.span.start+":"+(E.span.end-1);return s[x]||1});a.allowReslicing=!0,a.strictOrder=i,e===!0||t===!0?(a.maxCoord=r,a.hiddenConsumes=!0):typeof e=="number"?a.maxStackCnt=e:typeof t=="number"&&(a.maxStackCnt=t,a.hiddenConsumes=!0);let o=[],d=[];for(let E=0;E<l.length;E+=1){let x=l[E],v=Lt(x);s[v]!=null?o.push({index:E,span:{start:x.firstCol,end:x.lastCol+1}}):d.push(x)}let c=a.addSegs(o),u=a.toRects(),{singleColPlacements:m,multiColPlacements:f,leftoverMargins:y}=Cs(u,l,n),p=[],b=[];for(let E of d){f[E.firstCol].push({seg:E,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let x=E.firstCol;x<=E.lastCol;x+=1)m[x].push({seg:ee(E,x,x+1,n),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let E=0;E<n.length;E+=1)p.push(0);for(let E of c){let x=l[E.index],v=E.span;f[v.start].push({seg:ee(x,v.start,v.end,n),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let w=v.start;w<v.end;w+=1)p[w]+=1,m[w].push({seg:ee(x,w,w+1,n),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let E=0;E<n.length;E+=1)b.push(y[E]);return{singleColPlacements:m,multiColPlacements:f,moreCnts:p,moreMarginTops:b}}function Cs(l,e,t){let i=Ts(l,t.length),s=[],r=[],n=[];for(let a=0;a<t.length;a+=1){let o=i[a],d=[],c=0,u=0;for(let f of o){let y=e[f.index];d.push({seg:ee(y,a,a+1,t),isVisible:!0,isAbsolute:!1,absoluteTop:f.levelCoord,marginTop:f.levelCoord-c}),c=f.levelCoord+f.thickness}let m=[];c=0,u=0;for(let f of o){let y=e[f.index],p=f.span.end-f.span.start>1,b=f.span.start===a;u+=f.levelCoord-c,c=f.levelCoord+f.thickness,p?(u+=f.thickness,b&&m.push({seg:ee(y,f.span.start,f.span.end,t),isVisible:!0,isAbsolute:!0,absoluteTop:f.levelCoord,marginTop:0})):b&&(m.push({seg:ee(y,f.span.start,f.span.end,t),isVisible:!0,isAbsolute:!1,absoluteTop:f.levelCoord,marginTop:u}),u=0)}s.push(d),r.push(m),n.push(u)}return{singleColPlacements:s,multiColPlacements:r,leftoverMargins:n}}function Ts(l,e){let t=[];for(let i=0;i<e;i+=1)t.push([]);for(let i of l)for(let s=i.span.start;s<i.span.end;s+=1)t[s].push(i);return t}function ee(l,e,t,i){if(l.firstCol===e&&l.lastCol===t-1)return l;let s=l.eventRange,r=s.range,n=ft(r,{start:i[e].date,end:Ae(i[t-1].date,1)});return Object.assign(Object.assign({}
vendor: 8,459 bytes, line 2
2,l),{firstCol:e,lastCol:t-1,eventRange:{def:s.def,ui:Object.assign(Object.assign({},s.ui),{durationEditable:!1}),instance:s.instance,range:n},isStart:l.isStart&&n.start.valueOf()===r.start.valueOf(),isEnd:l.isEnd&&n.end.valueOf()===r.end.valueOf()})}class Ms extends ut{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:i}=this,s=r=>!this.forceHidden[re(r)];for(let r=0;r<i.length;r+=1)i[r]=i[r].filter(s);return t}handleInvalidInsertion(e,t,i){const{entriesByLevel:s,forceHidden:r}=this,{touchingEntry:n,touchingLevel:a,touchingLateral:o}=e;if(this.hiddenConsumes&&n){const d=re(n);if(!r[d])if(this.allowReslicing){const c=Object.assign(Object.assign({},n),{span:ri(n.span,t.span)}),u=re(c);r[u]=!0,s[a][o]=c,i.push(c),this.splitEntry(n,t,i)}else r[d]=!0,i.push(n)}super.handleInvalidInsertion(e,t,i)}}class Ot extends z{constructor(){super(...arguments),this.cellElRefs=new Y,this.frameElRefs=new Y,this.fgElRefs=new Y,this.segHarnessRefs=new Y,this.rootElRef=I(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:i}=this,{options:s}=i,r=e.cells.length,n=ge(e.businessHourSegs,r),a=ge(e.bgEventSegs,r),o=ge(this.getHighlightSegs(),r),d=ge(this.getMirrorSegs(),r),{singleColPlacements:c,multiColPlacements:u,moreCnts:m,moreMarginTops:f}=Rs(nt(e.fgEventSegs,s.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,s.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),y=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return h("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((p,b)=>{let E=this.renderFgSegs(b,e.forPrint?c[b]:u[b],e.todayRange,y),x=this.renderFgSegs(b,ks(d[b],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return h(xs,{key:p.key,elRef:this.cellElRefs.createRef(p.key),innerElRef:this.frameElRefs.createRef(p.key),dateProfile:e.dateProfile,date:p.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&b===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:p.extraRenderProps,extraDataAttrs:p.extraDataAttrs,extraClassNames:p.extraClassNames,extraDateSpan:p.extraDateSpan,moreCnt:m[b],moreMarginTop:f[b],singlePlacements:c[b],fgContentElRef:this.fgElRefs.createRef(p.key),fgContent:h(P,null,h(P,null,E),h(P,null,x)),bgContent:h(P,null,this.renderFillSegs(o[b],"highlight"),this.renderFillSegs(n[b],"non-business"),this.renderFillSegs(a[b],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let i=this.props;this.updateSizing(!rt(e,i))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,i,s,r,n,a){let{context:o}=this,{eventSelection:d}=this.props,{framePositions:c}=this.state,u=this.props.cells.length===1,m=r||n||a,f=[];if(c)for(let y of t){let{seg:p}=y,{instanceId:b}=p.eventRange.instance,E=y.isVisible&&!s[b],x=y.isAbsolute,v="",w="";x&&(o.isRtl?(w=0,v=c.lefts[p.lastCol]-c.lefts[p.firstCol]):(v=0,w=c.rights[p.firstCol]-c.rights[p.lastCol])),f.push(h("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:At(p),ref:m?null:this.segHarnessRefs.createRef(Lt(p)),style:{visibility:E?"":"hidden",marginTop:x?"":y.marginTop,top:x?y.absoluteTop:"",left:v,right:w}},jt(p)?h(Ht,Object.assign({seg:p,isDragging:r,isSelected:b===d,defaultDisplayEventEnd:u},B(p,i))):h(It,Object.assign({seg:p,isDragging:r,isResizing:n,isDateSelecting:a,isSelected:b===d,defaultDisplayEventEnd:u},B(p,i)))))}return f}renderFillSegs(e,t){let{isRtl:i}=this.context,{todayRange:s}=this.props,{framePositions:r}=this.state,n=[];if(r)for(let a of e){let o=i?{right:0,left:r.lefts[a.lastCol]-r.lefts[a.firstCol]}:{left:0,right:r.rights[a.firstCol]-r.rights[a.lastCol]};n.push(h("div",{key:ot(a.eventRange),className:"fc-daygrid-bg-harness",style:o},t==="bg-event"?h(at,Object.assign({seg:a},B(a,s))):lt(t)))}return h(P,{},...n)}updateSizing(e){let{props:t,state:i,frameElRefs:s}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let o=t.cells.map(d=>s.currentMap[d.key]);if(o.length){let d=this.rootElRef.current,c=new te(d,o,!0,!1);(!i.framePositions||!i.framePositions.similarTo(c))&&this.setState({framePositions:new te(d,o,!0,!1)})}}const r=this.state.segHeights,n=this.querySegHeights(),a=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},r),n),maxContentHeight:a?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let i in e){let s=Math.round(e[i].getBoundingClientRect().height);t[i]=Math.max(t[i]||0,s)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],i=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-i.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}}Ot.addStateEquality({segHeights:rt});function ks(l,e){if(!l.length)return[];let t=Ns(e);return l.map(i=>({seg:i,isVisible:!0,isAbsolute:!0,absoluteTop:t[i.eventRange.instance.instanceId],marginTop:0}))}function Ns(l){let e={};for(let t of l)for(let i of t)e[i.seg.eventRange.instance.instanceId]=i.absoluteTop;return e}class Ps extends z{constructor(){super(...arguments),this.splitBusinessHourSegs=R(pe),this.splitBgEventSegs=R(js),this.splitFgEventSegs=R(pe),this.splitDateSelectionSegs=R(pe),this.splitEventDrag=R(Ke),this.splitEventResize=R(Ke),this.rowRefs=new Y}render(){let{props:e,context:t}=this,i=e.cells.length,s=this.splitBusinessHourSegs(e.businessHourSegs,i),r=this.splitBgEventSegs(e.bgEventSegs,i),n=this.splitFgEventSegs(e.fgEventSegs,i),a=this.splitDateSelectionSegs(e.dateSelectionSegs,i),o=this.splitEventDrag(e.eventDrag,i),d=this.splitEventResize(e.eventResize,i),c=i>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return h(He,{unit:"day"},(u,m)=>h(P,null,e.cells.map((f,y)=>h(Ot,{ref:this.rowRefs.createRef(y),key:f.length?f[0].date.toISOString():y,showDayNumbers:i>1,showWeekNumbers:e.showWeekNumbers,todayRange:m,dateProfile:e.dateProfile,cells:f,renderIntro:e.renderRowIntro,businessHourSegs:s[y],eventSelection:e.eventSelection,bgEventSegs:r[y],fgEventSegs:n[y],dateSelectionSegs:a[y],eventDrag:o[y],eventResize:d[y],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new te(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new te(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:i,rowPositions:s}=this,r=i.leftToIndex(e),n=s.topToIndex(t);if(n!=null&&r!=null){let a=this.props.cells[n][r];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(n,r),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(n,r),rect:{left:i.lefts[r],right:i.rights[r],top:s.tops[n],bottom:s.bottoms[n]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let i=this.props.cells[e][t].date,s=Ae(i,1);return{start:i,end:s}}}function js(l,e){return pe(l.filter(Is),e)}function Is(l){return l.eventRange.def.allDay}class Hs extends z{constructor(){super(...arguments),this.elRef=I(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:i,expandRows:s}=e,r=i===!0||t===!0;r&&!s&&(r=!1,t=null,i=null);
2let n=["fc-daygrid-body",r?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",s?"":"fc-daygrid-body-natural"];return h("div",{ref:this.elRef,className:n.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},h("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:s?e.clientHeight:""}},e.colGroupNode,h("tbody",{role:"presentation"},h(Ps,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:i,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=As(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),i=t.closest(".fc-scroller"),s=e.getBoundingClientRect().top-t.getBoundingClientRect().top;i.scrollTop=s?s+1:0}this.needsScrollReset=!1}}}function As(l,e){let t;return e.currentRangeUnit.match(/year|month/)&&(t=l.querySelector(`[data-date="${Jt(e.currentDate)}-01"]`)),t||(t=l.querySelector(`[data-date="${ei(e.currentDate)}"]`)),t}class Ls extends st{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class Wt extends z{constructor(){super(...arguments),this.slicer=new Ls,this.tableRef=I()}render(){let{props:e,context:t}=this;return h(Hs,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class Os extends vs{constructor(){super(...arguments),this.buildDayTableModel=R(Ws),this.headerRef=I(),this.tableRef=I()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:i}=this,s=this.buildDayTableModel(i.dateProfile,t),r=e.dayHeaders&&h(vt,{ref:this.headerRef,dateProfile:i.dateProfile,dates:s.headerDates,datesRepDistinctDays:s.rowCnt===1}),n=a=>h(Wt,{ref:this.tableRef,dateProfile:i.dateProfile,dayTableModel:s,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:a.tableColGroupNode,tableMinWidth:a.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:a.clientWidth,clientHeight:a.clientHeight,forPrint:i.forPrint});return e.dayMinWidth?this.renderHScrollLayout(r,n,s.colCnt,e.dayMinWidth):this.renderSimpleLayout(r,n)}}function Ws(l,e){let t=new St(l.renderRange,e);return new Et(t,/year|month|week/.test(l.currentRangeUnit))}class zs extends ai{buildRenderRange(e,t,i){let s=super.buildRenderRange(e,t,i),{props:r}=this;return Fs({currentRange:s,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:r.fixedWeekCount,dateEnv:r.dateEnv})}}function Fs(l){let{dateEnv:e,currentRange:t}=l,{start:i,end:s}=t,r;if(l.snapToWeek&&(i=e.startOfWeek(i),r=e.startOfWeek(s),r.valueOf()!==s.valueOf()&&(s=Ye(r,1))),l.fixedWeekCount){let n=e.startOfWeek(e.startOfMonth(Ae(t.end,-1))),a=Math.ceil(oi(n,s));s=Ye(s,6-a)}return{start:i,end:s}}var Bs
vendor: 3,524 bytes, line 2
2=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';
vendor: 24,676 bytes, line 2
2mt(Bs);var Gs=Le({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:Os,dateProfileGeneratorClass:zs},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class Us extends ci{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?hi(e)?["timed","allDay"]:["allDay"]:["timed"]}}const qs=$({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function zt(l){let e=["fc-timegrid-slot","fc-timegrid-slot-label",l.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return h(ui.Consumer,null,t=>{if(!l.isLabeled)return h("td",{className:e.join(" "),"data-time":l.isoTimeStr});let{dateEnv:i,options:s,viewApi:r}=t,n=s.slotLabelFormat==null?qs:Array.isArray(s.slotLabelFormat)?$(s.slotLabelFormat[0]):$(s.slotLabelFormat),a={level:0,time:l.time,date:i.toDate(l.date),view:r,text:i.format(l.date,n)};return h(Oe,{elTag:"td",elClasses:e,elAttrs:{"data-time":l.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:s.slotLabelContent,defaultGenerator:Vs,classNameGenerator:s.slotLabelClassNames,didMount:s.slotLabelDidMount,willUnmount:s.slotLabelWillUnmount},o=>h("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},h(o,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function Vs(l){return l.text}class _s extends O{render(){return this.props.slatMetas.map(e=>h("tr",{key:e.key},h(zt,Object.assign({},e))))}}const Ys=$({week:"short"}),Xs=5;class $s extends z{constructor(){super(...arguments),this.allDaySplitter=new Us,this.headerElRef=I(),this.rootElRef=I(),this.scrollerElRef=I(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:i}=this.context,{dateProfile:s}=this.props,r=s.renderRange,a=di(r.start,r.end)===1?Ce(this.context,r.start,"week"):{};return i.weekNumbers&&e==="day"?h(dt,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:r.start,defaultFormat:Ys},o=>h("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},h(o,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a}))):h("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},h("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:i}=this.context,s={text:t.allDayText,view:i};return h(Oe,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:s,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:Ks,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},r=>h("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},h(r,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,i){let{context:s,props:r}=this,n=[],a=me(s.options);return e&&n.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(n.push({type:"body",key:"all-day",chunk:{content:t}}),n.push({type:"body",key:"all-day-divider",outerContent:h("tr",{role:"presentation",className:"fc-scrollgrid-section"},h("td",{className:"fc-timegrid-divider "+s.theme.getClass("tableCellShaded")}))})),n.push({type:"body",key:"body",liquid:!0,expandRows:!!s.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:i}}),h(ve,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:s.viewSpec},h(yt,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[{width:"shrink"}],sections:n}))}renderHScrollLayout(e,t,i,s,r,n,a){let o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");let{context:d,props:c}=this,u=!c.forPrint&&me(d.options),m=!c.forPrint&&bt(d.options),f=[];e&&f.push({type:"header",key:"header",isSticky:u,syncRowHeights:!0,chunks:[{key:"axis",rowContent:p=>h("tr",{role:"presentation"},this.renderHeadAxis("day",p.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:p=>h("tr",{role:"presentation"},this.renderTableRowAxis(p.rowSyncHeights[0]))},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:h("tr",{role:"presentation",className:"fc-scrollgrid-section"},h("td",{colSpan:2,className:"fc-timegrid-divider "+d.theme.getClass("tableCellShaded")}))}));let y=d.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:!!d.options.expandRows,chunks:[{key:"axis",content:p=>h("div",{className:"fc-timegrid-axis-chunk"},h("table",{"aria-hidden":!0,style:{height:p.expandRows?p.clientHeight:""}},p.tableColGroupNode,h("tbody",null,h(_s,{slatMetas:n}))),h("div",{className:"fc-timegrid-now-indicator-container"},h(He,{unit:y?"minute":"day"},b=>{let E=y&&a&&a.safeComputeTop(b);return typeof E=="number"?h(We,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:E},isAxis:!0,date:b}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:i}]}),m&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Te},{key:"cols",content:Te}]}),h(ve,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:d.viewSpec},h(o,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:s,minWidth:r}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return(e===!0||t===!0)&&(e=void 0,t=Xs),{dayMaxEvents:e,dayMaxEventRows:t}}}function Ks(l){return l.text}class Qs{constructor(e,t,i){this.positions=e,this.dateProfile=t,this.slotDuration=i}safeComputeTop(e){let{dateProfile:t}=this;if(vi(t.currentRange,e)){let i=ke(e),s=e.valueOf()-i.valueOf();if(s>=Z(t.slotMinTime)&&s<Z(t.slotMaxTime))return this.computeTimeTop(ie(s))}return null}computeDateTop(e,t){return t||(t=ke(e)),this.computeTimeTop(ie(e.valueOf()-t.valueOf()))}computeTimeTop(e){let{positions:t,dateProfile:i}=this,s=t.els.length,r=(e.milliseconds-Z(i.slotMinTime))/Z(this.slotDuration),n,a;return r=Math.max(0,r),r=Math.min(s,r),n=Math.floor(r),n=Math.min(n,s-1),a=r-n,t.tops[n]+t.getHeight(n)*a}}class Zs extends O{render(){let{props:e,context:t}=this,{options:i}=t,{slatElRefs:s}=e;return h("tbody",null,e.slatMetas.map((r,n)=>{let a={time:r.time,date:t.dateEnv.toDate(r.date),view:t.viewApi};return h("tr",{key:r.key,ref:s.createRef(r.key)},e.axis&&h(zt,Object.assign({},r)),h(Oe,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!r.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":r.isoTimeStr},renderProps:a,generatorName:"slotLaneContent",customGenerator:i.slotLaneContent,classNameGenerator:i.slotLaneClassNames,didMount:i.slotLaneDidMount,willUnmount:i.slotLaneWillUnmount}))}))}}class Js extends O{constructor(){super(...arguments),this.rootElRef=I(),this.slatElRefs=new Y}render(){let{props:e,context:t}=this;return h("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},h("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,h(Zs,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;t.onCoords&&t.clientWidth!==null&&this.rootElRef.current.offsetHeight&&t.onCoords(new Qs(new te(this.rootElRef.current,en(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function en(l,e){return e.map(t=>l[t.key])}function ne(l,e){let t=[],i;for(i=0;i<e;i+=1)t.push([]);if(l)for(i=0;i<l.length;i+=1)t[l[i].col].push(l[i]);return t}function Qe(l,e){let t=[];if(l){for(let i=0;i<e;i+=1)t[i]={affectedInstances:l.affectedInstances,isEvent:l.isEvent,segs:[]};for(let i of l.segs)t[i.col].segs.push(i)}else for(let i=0;i<e;i+=1)t[i]=null;return t}class tn extends O{render(){let{props:e}=this;return h(pt,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>Bt(e.hiddenSegs,e),defaultGenerator:sn,forceTimed:!0},t=>h(t,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function sn(l){return l.shortText}function nn(l,e,t){let i=new ut;e!=null&&(i.strictOrder=e),t!=null&&(i.maxStackCnt=t);let s=i.addSegs(l),r=yi(s),n=rn(i);return n=dn(n,1),{segRects:cn(n),hiddenGroups:r}}function rn(l){const{entriesByLevel:e}=l,t=Ve((i,s)=>i+":"+s,(i,s)=>{let r=on(l,i,s),n=Ze(r,t),a=e[i][s];return[Object.assign(Object.assign({},a),{nextLevelNodes:n[0]}),a.thickness+n[1]]});return Ze(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,t)[0]}function Ze(l,e){if(!l)return[[],0];let{level:t,lateralStart:i,lateralEnd:s}=l,r=i,n=[];for(;r<s;)n.push(e(t,r)),r+=1;return n.sort(ln),[n.map(an),n[0][1]]}function ln(l,e){return e[1]-l[1]}function an(l){return l[0]}function on(l,e,t){let{levelCoords:i,entriesByLevel:s}=l,r=s[e][t],n=i[e]+r.thickness,a=i.length,o=e;for(;o<a&&i[o]<n;o+=1);for(;o<a;o+=1){let d=s[o],c,u=bi(d,r.span.start,Si),m=u[0]+u[1],f=m;for(;(c=d[f])&&c.span.start<r.span.end;)f+=1;if(m<f)return{level:o,lateralStart:m,lateralEnd:f}}return null}function dn(l,e){const t=Ve((i,s,r)=>re(i),(i,s,r)=>{let{nextLevelNodes:n,thickness:a}=i,o=a+r,d=a/o,c,u=[];if(!n.length)c=e;else for(let f of n)if(c===void 0){let y=t(f,s,o);c=y[0],u.push(y[1])}else{let y=t(f,c,0);u.push(y[1])}let m=(c-s)*d;return[c-m,Object.assign(Object.assign({},i),{thickness:m,nextLevelNodes:u})]});return l.map(i=>t(i,0,0)[1])}function cn(l){let e=[];const t=Ve((s,r,n)=>re(s),(s,r,n)=>{let a=Object.assign(Object.assign({},s),{levelCoord:r,stackDepth:n,stackForward:0});return e.push(a),a.stackForward=i(s.nextLevelNodes,r+s.thickness,n+1)+1});function i(s,r,n){let a=0;for(let o of s)a=Math.max(t(o,r,n),a);return a}return i(l,0,0),e}function Ve(l,e){const t={};return(...i)=>{let s=l(...i);return s in t?t[s]:t[s]=e(...i)}}function Je(l,e,t=null,i=0){let s=[];if(t)for(let r=0;r<l.length;r+=1){let n=l[r],a=t.computeDateTop(n.start,e),o=Math.max(a+(i||0),t.computeDateTop(n.end,e));s.push({start:Math.round(a),end:Math.round(o)})}return s}function hn(l,e,t,i){let s=[],r=[];for(let d=0;d<l.length;d+=1){let c=e[d];c?s.push({index:d,thickness:1,span:c}):r.push(l[d])}let{segRects:n,hiddenGroups:a}=nn(s,t,i),o=[];for(let d of n)o.push({seg:l[d.index],rect:d});for(let d of r)o.push({seg:d,rect:null});return{segPlacements:o,hiddenGroups:a}}const gn=$({hour:"numeric",minute:"2-digit",meridiem:!1});class Ft extends O{render(){return h(gt,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:gn}))}}class un extends O{constructor(){super(...arguments),this.sortEventSegs=R(nt)}render(){let{props:e,context:t}=this,{options:i}=t,s=i.selectMirror,r=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||s&&e.dateSelectionSegs||[],n=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},a=this.sortEventSegs(e.fgEventSegs,i.eventOrder);return h(ht,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},o=>h("div",{className:"fc-timegrid-col-frame"},h("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),h("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(a,n,!1,!1,!1)),h("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(r,{},!!e.eventDrag,!!e.eventResize,!!s,"mirror")),h("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),ct(i)&&h(o,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,t,i,s,r,n){let{props:a}=this;return a.forPrint?Bt(e,a):this.renderPositionedFgSegs(e,t,i,s,r,n)}renderPositionedFgSegs(e,t,i,s,r,n){let{eventMaxStack:a,eventShortHeight:o,eventOrderStrict:d,eventMinHeight:c}=this.context.options,{date:u,slatCoords:m,eventSelection:f,todayRange:y,nowDate:p}=this.props,b=i||s||r,E=Je(e,u,m,c),{segPlacements:x,hiddenGroups:v}=hn(e,E,d,a);return h(P,null,this.renderHiddenGroups(v,e),x.map(w=>{let{seg:T,rect:D}=w,k=T.eventRange.instance.instanceId,C=b||!!(!t[k]&&D),N=Re(D&&D.span),G=!b&&D?this.computeSegHStyle(D):{left:0,right:0},Q=!!D&&D.stackForward>0,oe=!!D&&D.span.end-D.span.start<o;return h("div",{className:"fc-timegrid-event-harness"+(Q?" fc-timegrid-event-harness-inset":""),key:n||k,style:Object.assign(Object.assign({visibility:C?"":"hidden"},N),G)},h(Ft,Object.assign({seg:T,isDragging:i,isResizing:s,isDateSelecting:r,isSelected:k===f,isShort:oe},B(T,y,p))))}))}renderHiddenGroups(e,t){let{extraDateSpan:i,dateProfile:s,todayRange:r,nowDate:n,eventSelection:a,eventDrag:o,eventResize:d}=this.props;return h(P,null,e.map(c=>{let u=Re(c.span),m=fn(c.entries,t);return h(tn,{key:pi(mi(m)),hiddenSegs:m,top:u.top,bottom:u.bottom,extraDateSpan:i,dateProfile:s,todayRange:r,nowDate:n,eventSelection:a,eventDrag:o,eventResize:d})}))}renderFillSegs(e,t){let{props:i,context:s}=this,n=Je(e,i.date,i.slatCoords,s.options.eventMinHeight).map((a,o)=>{let d=e[o];return h("div",{key:ot(d.eventRange),className:"fc-timegrid-bg-harness",style:Re(a)},t==="bg-event"?h(at,Object.assign({seg:d},B(d,i.todayRange,i.nowDate))):lt(t))});return h(P,null,n)}renderNowIndicator(e){let{slatCoords:t,date:i}=this.props;return t?e.map((s,r)=>h(We,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(s.start,i)},isAxis:!1,date:i})):null}computeSegHStyle(e){let{isRtl:t,options:i}=this.context,s=i.slotEventOverlap,r=e.levelCoord,n=e.levelCoord+e.thickness,a,o;s&&(n=Math.min(1,r+(n-r)*2)),t?(a=1-n,o=r):(a=r,o=1-n);let d={zIndex:e.stackDepth+1,left:a*100+"%",right:o*100+"%"};return s&&!e.stackForward&&(d[t?"marginLeft":"marginRight"]=20),d}}function Bt(l,{todayRange:e,nowDate:t,eventSelection:i,eventDrag:s,eventResize:r}){let n=(s?s.affectedInstances:null)||(r?r.affectedInstances:null)||{};return h(P,null,l.map(a=>{let o=a.eventRange.instance.instanceId;return h("div",{key:o,style:{visibility:n[o]?"hidden":""}},h(Ft,Object.assign({seg:a,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===i,isShort:!1},B(a,e,t))))}))}function Re(l){return l?{top:l.start,bottom:-l.end}:{top:"",bottom:""}}function fn(l,e){return l.map(t=>e[t.index])}class pn extends O{constructor(){super(...arguments),this.splitFgEventSegs=R(ne),this.splitBgEventSegs=R(ne),this.splitBusinessHourSegs=R(ne),this.splitNowIndicatorSegs=R(ne),this.splitDateSelectionSegs=R(ne),this.splitEventDrag=R(Qe),this.splitEventResize=R(Qe),this.rootElRef=I(),this.cellElRefs=new Y}render(){let{props:e,context:t}=this,i=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),s=e.cells.length,r=this.splitFgEventSegs(e.fgEventSegs,s),n=this.splitBgEventSegs(e.bgEventSegs,s),a=this.splitBusinessHourSegs(e.businessHourSegs,s),o=this.splitNowIndicatorSegs(e.nowIndicatorSegs,s),d=this.splitDateSelectionSegs(e.dateSelectionSegs,s),c=this.splitEventDrag(e.eventDrag,s),u=this.splitEventResize(e.eventResize,s);return h("div",{className:"fc-timegrid-cols",ref:this.rootElRef},h("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,h("tbody",{role:"presentation"},h("tr",{role:"row"},e.axis&&h("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},h("div",{className:"fc-timegrid-col-frame"},h("div",{className:"fc-timegrid-now-indicator-container"},typeof i=="number"&&h(We,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:i},isAxis:!0,date:e.nowDate})))),e.cells.map((m,f)=>h(un,{key:m.key,elRef:this.cellElRefs.createRef(m.key),dateProfile:e.dateProfile,date:m.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:m.extraRenderProps,extraDataAttrs:m.extraDataAttrs,extraClassNames:m.extraClassNames,extraDateSpan:m.extraDateSpan,fgEventSegs:r[f],bgEventSegs:n[f],businessHourSegs:a[f],nowIndicatorSegs:o[f],dateSelectionSegs:d[f],eventDrag:c[f],eventResize:u[f],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new te(this.rootElRef.current,mn(this.cellElRefs.currentMap,e.cells),!0,!1))}}function mn(l,e){return e.map(t=>l[t.key])}class vn extends z{constructor(){super(...arguments),this.processSlotOptions=R(yn),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:i}=this.state;if(t&&i){if(e.time){let s=i.computeTimeTop(e.time);s=Math.ceil(s),s&&(s+=1),t(s)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return h("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},h(Js,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),h(pn,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:i,options:s}=this.context,{colCoords:r}=this,{dateProfile:n}=this.props,{slatCoords:a}=this.state,{snapDuration:o,snapsPerSlot:d}=this.processSlotOptions(this.props.slotDuration,s.snapDuration),c=r.leftToIndex(e),u=a.positions.topToIndex(t);if(c!=null&&u!=null){let m=this.props.cells[c],f=a.positions.tops[u],y=a.positions.getHeight(u),p=(t-f)/y,b=Math.floor(p*d),E=u*d+b,x=this.props.cells[c].date,v=Me(n.slotMinTime,fi(o,E)),w=i.add(x,v),T=i.add(w,o);return{dateProfile:n,dateSpan:Object.assign({range:{start:w,end:T},allDay:!1},m.extraDateSpan),dayEl:r.els[c],rect:{left:r.lefts[c],right:r.rights[c],top:f,bottom:f+y},layer:0}}return null}}function yn(l,e){let t=e||l,i=ze(l,t);return i===null&&(t=l,i=1),{snapDuration:t,snapsPerSlot:i}}class bn extends st{sliceRange(e,t){let i=[];for(let s=0;s<t.length;s+=1){let r=ft(e,t[s]);r&&i.push({start:r.start,end:r.end,isStart:r.start.valueOf()===e.start.valueOf(),isEnd:r.end.valueOf()===e.end.valueOf(),col:s})}return i}}class Sn extends z{constructor(){super(...arguments),this.buildDayRanges=R(En),this.slicer=new bn,this.timeColsRef=I()}render(){let{props:e,context:t}=this,{dateProfile:i,dayTableModel:s}=e,{nowIndicator:r,nextDayThreshold:n}=t.options,a=this.buildDayRanges(s,i,t.dateEnv);return h(He,{unit:r?"minute":"day"},(o,d)=>h(vn,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,i,null,t,a),{forPrint:e.forPrint,axis:e.axis,dateProfile:i,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:s.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:o,nowIndicatorSegs:r&&this.slicer.sliceNowDate(o,i,n,t,a),todayRange:d,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function En(l,e,t){let i=[];for(let s of l.headerDates)i.push({start:t.add(s,e.slotMinTime),end:t.add(s,e.slotMaxTime)});return i}const et=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function xn(l,e,t,i,s){let r=new Date(0),n=l,a=ie(0),o=t||wn(i),d=[];for(;Z(n)<Z(e);){let c=s.add(r,n),u=ze(a,o)!==null;d.push({date:c,time:n,key:c.toISOString(),isoTimeStr:gi(c),isLabeled:u}),n=Me(n,i),a=Me(a,i)}return d}function wn(l){let e,t,i;for(e=et.length-1;e>=0;e-=1)if(t=ie(et[e]),i=ze(t,l),i!==null&&i>1)return t;return l}class Dn extends $s{constructor(){super(...arguments),this.buildTimeColsModel=R(Rn),this.buildSlatMetas=R(xn)}render(){let{options:e,dateEnv:t,dateProfileGenerator:i}=this.context,{props:s}=this,{dateProfile:r}=s,n=this.buildTimeColsModel(r,i),a=this.allDaySplitter.splitProps(s),o=this.buildSlatMetas(r.slotMinTime,r.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:d}=e,c=!d,u=d,m=e.dayHeaders&&h(vt,{dates:n.headerDates,dateProfile:r,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=e.allDaySlot!==!1&&(p=>h(Wt,Object.assign({},a.allDay,{dateProfile:r,dayTableModel:n,nextDayThreshold:e.nextDayThreshold,tableMinWidth:p.tableMinWidth,colGroupNode:p.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:p.clientWidth,clientHeight:p.clientHeight,forPrint:s.forPrint},this.getAllDayMaxEventProps()))),y=p=>h(Sn,Object.assign({},a.timed,{dayTableModel:n,dateProfile:r,axis:c,slotDuration:e.slotDuration,slatMetas:o,forPrint:s.forPrint,tableColGroupNode:p.tableColGroupNode,tableMinWidth:p.tableMinWidth,clientWidth:p.clientWidth,clientHeight:p.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:p.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return u?this.renderHScrollLayout(m,f,y,n.colCnt,d,o,this.state.slatCoords):this.renderSimpleLayout(m,f,y)}}function Rn(l,e){let t=new St(l.renderRange,e);return new Et(t,!1)}var Cn='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}
2.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';mt(Cn);const Tn={allDaySlot:Boolean};var Mn=Le({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:Tn,views:{timeGrid:{component:Dn,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});Ue.touchMouseIgnoreWait=500;let je=0,Se=0,Ie=!1;class Gt{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=t=>{if(!this.shouldIgnoreMouse()&&kn(t)&&this.tryStart(t)){let i=this.createEventFromMouse(t,!0);this.emitter.trigger("pointerdown",i),this.initScrollWatch(i),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=t=>{let i=this.createEventFromMouse(t);this.recordCoords(i),this.emitter.trigger("pointermove",i)},this.handleMouseUp=t=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(t)),this.cleanup()},this.handleTouchStart=t=>{if(this.tryStart(t)){this.isTouchDragging=!0;let i=this.createEventFromTouch(t,!0);this.emitter.trigger("pointerdown",i),this.initScrollWatch(i);let s=t.target;this.shouldIgnoreMove||s.addEventListener("touchmove",this.handleTouchMove),s.addEventListener("touchend",this.handleTouchEnd),s.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=t=>{let i=this.createEventFromTouch(t);this.recordCoords(i),this.emitter.trigger("pointermove",i)},this.handleTouchEnd=t=>{if(this.isDragging){let i=t.target;i.removeEventListener("touchmove",this.handleTouchMove),i.removeEventListener("touchend",this.handleTouchEnd),i.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(t)),this.cleanup(),this.isTouchDragging=!1,Nn()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=t=>{if(!this.shouldIgnoreMove){let i=window.scrollX-this.prevScrollX+this.prevPageX,s=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:t,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:i,pageY:s,deltaX:i-this.origPageX,deltaY:s-this.origPageY})}},this.containerEl=e,this.emitter=new Rt,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Pn()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),jn()}
vendor: 21,848 bytes, line 2
2tryStart(e){let t=this.querySubjectEl(e),i=e.target;return t&&(!this.handleSelector||K(i,this.handleSelector))?(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Ie=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?K(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return je||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Ie=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,t){let i=0,s=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(i=e.pageX-this.origPageX,s=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:i,deltaY:s}}createEventFromTouch(e,t){let i=e.touches,s,r,n=0,a=0;return i&&i.length?(s=i[0].pageX,r=i[0].pageY):(s=e.pageX,r=e.pageY),t?(this.origPageX=s,this.origPageY=r):(n=s-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:s,pageY:r,deltaX:n,deltaY:a}}}function kn(l){return l.button===0&&!l.ctrlKey}function Nn(){je+=1,setTimeout(()=>{je-=1},Ue.touchMouseIgnoreWait)}function Pn(){Se+=1,Se===1&&window.addEventListener("touchmove",Ut,{passive:!1})}function jn(){Se-=1,Se||window.removeEventListener("touchmove",Ut,{passive:!1})}function Ut(l){Ie&&l.preventDefault()}class In{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,t,i){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.scrollX,this.origScreenY=i-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,t){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=t-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,t){let i=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(i,this.revertDuration):setTimeout(i,0)}doRevertAnimation(e,t){let i=this.mirrorEl,s=this.sourceEl.getBoundingClientRect();i.style.transition="top "+t+"ms,left "+t+"ms",De(i,{left:s.left,top:s.top}),Ni(i,()=>{i.style.transition="",e()})}cleanup(){this.mirrorEl&&(Pi(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&De(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,t=this.mirrorEl;return t||(t=this.mirrorEl=this.sourceEl.cloneNode(!0),t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.pointerEvents="none",t.classList.add("fc-event-dragging"),De(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t}}class qt extends Gi{constructor(e,t){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=t,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class Vt extends qt{constructor(e,t){super(new Fi(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return Bi(this.scrollController.el)}}class Hn extends qt{constructor(e){super(new zi,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const tt=typeof performance=="function"?performance.now:Date.now;class An{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let t=tt();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,i){this.isEnabled&&(this.scrollCaches=this.buildCaches(i),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))}handleMove(e,t){if(this.isEnabled){let i=e-window.scrollX,s=t-window.scrollY,r=this.pointerScreenY===null?0:s-this.pointerScreenY,n=this.pointerScreenX===null?0:i-this.pointerScreenX;r<0?this.everMovedUp=!0:r>0&&(this.everMovedDown=!0),n<0?this.everMovedLeft=!0:n>0&&(this.everMovedRight=!0),this.pointerScreenX=i,this.pointerScreenY=s,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(tt()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,t){let{scrollCache:i}=e,{edgeThreshold:s}=this,r=s-e.distance,n=r*r/(s*s)*this.maxVelocity*t,a=1;switch(e.name){case"left":a=-1;case"right":i.setScrollLeft(i.getScrollLeft()+n*a);break;case"top":a=-1;case"bottom":i.setScrollTop(i.getScrollTop()+n*a);break}}computeBestEdge(e,t){let{edgeThreshold:i}=this,s=null,r=this.scrollCaches||[];for(let n of r){let a=n.clientRect,o=e-a.left,d=a.right-e,c=t-a.top,u=a.bottom-t;o>=0&&d>=0&&c>=0&&u>=0&&(c<=i&&this.everMovedUp&&n.canScrollUp()&&(!s||s.distance>c)&&(s={scrollCache:n,name:"top",distance:c}),u<=i&&this.everMovedDown&&n.canScrollDown()&&(!s||s.distance>u)&&(s={scrollCache:n,name:"bottom",distance:u}),o<=i&&this.everMovedLeft&&n.canScrollLeft()&&(!s||s.distance>o)&&(s={scrollCache:n,name:"left",distance:o}),d<=i&&this.everMovedRight&&n.canScrollRight()&&(!s||s.distance>d)&&(s={scrollCache:n,name:"right",distance:d}))}return s}buildCaches(e){return this.queryScrollEls(e).map(t=>t===window?new Hn(!1):new Vt(t,!1))}queryScrollEls(e){let t=[];for(let i of this.scrollQuery)typeof i=="object"?t.push(i):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(i)));return t}}class le extends Ei{constructor(e,t){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=s=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,xi(document.body),wi(document.body),s.isTouch||s.origEvent.preventDefault(),this.emitter.trigger("pointerdown",s),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(s.subjectEl,s.pageX,s.pageY),this.startDelay(s),this.minDistance||this.handleDistanceSurpassed(s)))},this.onPointerMove=s=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",s),!this.isDistanceSurpassed){let r=this.minDistance,n,{deltaX:a,deltaY:o}=s;n=a*a+o*o,n>=r*r&&this.handleDistanceSurpassed(s)}this.isDragging&&(s.origEvent.type!=="scroll"&&(this.mirror.handleMove(s.pageX,s.pageY),this.autoScroller.handleMove(s.pageX,s.pageY)),this.emitter.trigger("dragmove",s))}},this.onPointerUp=s=>{this.isInteracting&&(this.isInteracting=!1,Di(document.body),Ri(document.body),this.emitter.trigger("pointerup",s),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(s)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let i=this.pointer=new Gt(e);i.emitter.on("pointerdown",this.onPointerDown),i.emitter.on("pointermove",this.onPointerMove),i.emitter.on("pointerup",this.onPointerUp),t&&(i.selector=t),this.mirror=new In,this.autoScroller=new An}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class Ln{constructor(e){this.el=e,this.origRect=Ct(e),this.scrollCaches=Ui(e).map(t=>new Vt(t,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let t of this.scrollCaches)e+=t.origScrollLeft-t.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let t of this.scrollCaches)e+=t.origScrollTop-t.getScrollTop();return e}isWithinClipping(e,t){let i={left:e,top:t};for(let s of this.scrollCaches)if(!On(s.getEventTarget())&&!qi(i,s.clientRect))return!1;return!0}}function On(l){let e=l.tagName;return e==="HTML"||e==="BODY"}class xe{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=i=>{let{dragging:s}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(i),this.initialHit||!this.requireInitial?(s.setIgnoreMove(!1),this.emitter.trigger("pointerdown",i)):s.setIgnoreMove(!0)},this.handleDragStart=i=>{this.emitter.trigger("dragstart",i),this.handleMove(i,!0)},this.handleDragMove=i=>{this.emitter.trigger("dragmove",i),this.handleMove(i)},this.handlePointerUp=i=>{this.releaseHits(),this.emitter.trigger("pointerup",i)},this.handleDragEnd=i=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,i),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",i)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Rt}processFirstCoord(e){let t={left:e.pageX,top:e.pageY},i=t,s=e.subjectEl,r;s instanceof HTMLElement&&(r=Ct(s),i=Ii(i,r));let n=this.initialHit=this.queryHitForOffset(i.left,i.top);if(n){if(this.useSubjectCenter&&r){let a=Hi(r,n.rect);a&&(i=Ai(a))}this.coordAdjust=Li(i,t)}else this.coordAdjust={left:0,top:0}}handleMove(e,t){let i=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(t||!we(this.movingHit,i))&&(this.movingHit=i,this.emitter.trigger("hitupdate",i,!1,e))}prepareHits(){this.offsetTrackers=Oi(this.droppableStore,e=>(e.component.prepareHits(),new Ln(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:i,offsetTrackers:s}=this,r=null;for(let n in i){let a=i[n].component,o=s[n];if(o&&o.isWithinClipping(e,t)){let d=o.computeLeft(),c=o.computeTop(),u=e-d,m=t-c,{origRect:f}=o,y=f.right-f.left,p=f.bottom-f.top;if(u>=0&&u<y&&m>=0&&m<p){let b=a.queryHit(u,m,y,p);b&&Wi(b.dateProfile.activeRange,b.dateSpan.range)&&(this.disablePointCheck||o.el.contains(o.el.getRootNode().elementFromPoint(u+d-window.scrollX,m+c-window.scrollY)))&&(!r||b.layer>r.layer)&&(b.componentId=n,b.context=a.context,b.rect.left+=d,b.rect.right+=d,b.rect.top+=c,b.rect.bottom+=c,r=b)}}}return r}}function we(l,e){return!l&&!e?!0:!!l!=!!e?!1:ji(l.dateSpan,e.dateSpan)}function _t(l,e){let t={};for(let i of e.pluginHooks.datePointTransforms)Object.assign(t,i(l,e));return Object.assign(t,Wn(l,e.dateEnv)),t}function Wn(l,e){return{date:e.toDate(l.range.start),dateStr:e.formatIso(l.range.start,{omitTime:l.allDay}),allDay:l.allDay}}class zn extends Ee{constructor(e){super(e),this.handlePointerDown=i=>{let{dragging:s}=this,r=i.origEvent.target;s.setIgnoreMove(!this.component.isValidDateDownEl(r))},this.handleDragEnd=i=>{let{component:s}=this,{pointer:r}=this.dragging;if(!r.wasTouchScroll){let{initialHit:n,finalHit:a}=this.hitDragging;if(n&&a&&we(n,a)){let{context:o}=s,d=Object.assign(Object.assign({},_t(n.dateSpan,o)),{dayEl:n.dayEl,jsEvent:i.origEvent,view:o.viewApi||o.calendarApi.view});o.emitter.trigger("dateClick",d)}}},this.dragging=new le(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new xe(this.dragging,Fe(e));t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class Fn extends Ee{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=n=>{let{component:a,dragging:o}=this,{options:d}=a.context,c=d.selectable&&a.isValidDateDownEl(n.origEvent.target);o.setIgnoreMove(!c),o.delay=n.isTouch?Bn(a):null},this.handleDragStart=n=>{this.component.context.calendarApi.unselect(n)},this.handleHitUpdate=(n,a)=>{let{context:o}=this.component,d=null,c=!1;if(n){let u=this.hitDragging.initialHit;n.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,n)||(d=Gn(u,n,o.pluginHooks.dateSelectionTransformers)),(!d||!Ti(d,n.dateProfile,o))&&(c=!0,d=null)}d?o.dispatch({type:"SELECT_DATES",selection:d}):a||o.dispatch({type:"UNSELECT_DATES"}),c?Ge():Be(),a||(this.dragSelection=d)},this.handlePointerUp=n=>{this.dragSelection&&(Mi(this.dragSelection,n,this.component.context),this.dragSelection=null)};let{component:t}=e,{options:i}=t.context,s=this.dragging=new le(e.el);s.touchScrollAllowed=!1,s.minDistance=i.selectMinDistance||0,s.autoScroller.isEnabled=i.dragScroll;let r=this.hitDragging=new xe(this.dragging,Fe(e));r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Bn(l){let{options:e}=l.context,t=e.selectLongPressDelay;return t==null&&(t=e.longPressDelay),t}function Gn(l,e,t){let i=l.dateSpan,s=e.dateSpan,r=[i.range.start,i.range.end,s.range.start,s.range.end];r.sort(Vi);let n={};for(let a of t){let o=a(l,e);if(o===!1)return null;o&&Object.assign(n,o)}return n.range={start:r[0],end:r[3]},n.allDay=i.allDay,n}class ae extends Ee{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=n=>{let a=n.origEvent.target,{component:o,dragging:d}=this,{mirror:c}=d,{options:u}=o.context,m=o.context;this.subjectEl=n.subjectEl;let f=this.subjectSeg=Ne(n.subjectEl),p=(this.eventRange=f.eventRange).instance.instanceId;this.relevantEvents=xt(m.getCurrentData().eventStore,p),d.minDistance=n.isTouch?0:u.eventDragMinDistance,d.delay=n.isTouch&&p!==o.props.eventSelection?qn(o):null,u.fixedMirrorParent?c.parentNode=u.fixedMirrorParent:c.parentNode=K(a,".fc"),c.revertDuration=u.dragRevertDuration;let b=o.isValidSegDownEl(a)&&!K(a,".fc-event-resizer");d.setIgnoreMove(!b),this.isDragging=b&&n.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=n=>{let a=this.component.context,o=this.eventRange,d=o.instance.instanceId;n.isTouch?d!==this.component.props.eventSelection&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:d}):a.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(a.calendarApi.unselect(n),a.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new X(a,o.def,o.instance),jsEvent:n.origEvent,view:a.viewApi}))},this.handleHitUpdate=(n,a)=>{if(!this.isDragging)return;let o=this.relevantEvents,d=this.hitDragging.initialHit,c=this.component.context,u=null,m=null,f=null,y=!1,p={affectedEvents:o,mutatedEvents:ue(),isEvent:!0};if(n){u=n.context;let b=u.options;c===u||b.editable&&b.droppable?(m=Un(d,n,this.eventRange.instance.range.start,u.getCurrentData().pluginHooks.eventDragMutationMassagers),m&&(f=wt(o,u.getCurrentData().eventUiBases,m,u),p.mutatedEvents=f,Dt(p,n.dateProfile,u)||(y=!0,m=null,f=null,p.mutatedEvents=ue()))):u=null}this.displayDrag(u,p),y?Ge():Be(),a||(c===u&&we(d,n)&&(m=null),this.dragging.setMirrorNeedsRevert(!m),this.dragging.setMirrorIsVisible(!n||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=u,this.validMutation=m,this.mutatedRelevantEvents=f)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=n=>{if(this.isDragging){let a=this.component.context,o=a.viewApi,{receivingContext:d,validMutation:c}=this,u=this.eventRange.def,m=this.eventRange.instance,f=new X(a,u,m),y=this.relevantEvents,p=this.mutatedRelevantEvents,{finalHit:b}=this.hitDragging;if(this.clearDrag(),a.emitter.trigger("eventDragStop",{el:this.subjectEl,event:f,jsEvent:n.origEvent,view:o}),c){if(d===a){let E=new X(a,p.defs[u.defId],m?p.instances[m.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:p});let x={oldEvent:f,event:E,relatedEvents:fe(p,a,m),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:y})}},v={};for(let w of a.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(v,w(c,a));a.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},x),v),{el:n.subjectEl,delta:c.datesDelta,jsEvent:n.origEvent,view:o})),a.emitter.trigger("eventChange",x)}else if(d){let E={event:f,relatedEvents:fe(y,a,m),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:y})}};a.emitter.trigger("eventLeave",Object.assign(Object.assign({},E),{draggedEl:n.subjectEl,view:o})),a.dispatch({type:"REMOVE_EVENTS",eventStore:y}),a.emitter.trigger("eventRemove",E);let x=p.defs[u.defId],v=p.instances[m.instanceId],w=new X(d,x,v);d.dispatch({type:"MERGE_EVENTS",eventStore:p});let T={event:w,relatedEvents:fe(p,d,v),revert(){d.dispatch({type:"REMOVE_EVENTS",eventStore:p})}};d.emitter.trigger("eventAdd",T),n.isTouch&&d.dispatch({type:"SELECT_EVENT",eventInstanceId:m.instanceId}),d.emitter.trigger("drop",Object.assign(Object.assign({},_t(b.dateSpan,d)),{draggedEl:n.subjectEl,jsEvent:n.origEvent,view:b.context.viewApi})),d.emitter.trigger("eventReceive",Object.assign(Object.assign({},T),{draggedEl:n.subjectEl,view:b.context.viewApi}))}}else a.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:t}=this,{options:i}=t.context,s=this.dragging=new le(e.el);s.pointer.selector=ae.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=i.dragScroll;let r=this.hitDragging=new xe(this.dragging,ki);r.useSubjectCenter=e.useEventCenter,r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("pointerup",this.handlePointerUp),r.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let i=this.component.context,s=this.receivingContext;s&&s!==e&&(s===i?s.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:ue(),isEvent:!0}}):s.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){let e=this.component.context,{receivingContext:t}=this;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}ae.SELECTOR=".fc-event-draggable, .fc-event-resizable";function Un(l,e,t,i){let s=l.dateSpan,r=e.dateSpan,n=s.range.start,a=r.range.start,o={};s.allDay!==r.allDay&&(o.allDay=r.allDay,o.hasEnd=e.context.options.allDayMaintainDuration,r.allDay?n=ke(t):n=t);let d=Tt(n,a,l.context.dateEnv,l.componentId===e.componentId?l.largeUnit:null);d.milliseconds&&(o.allDay=!1);let c={datesDelta:d,standardProps:o};for(let u of i)u(c,l,e);return c}function qn(l){let{options:e}=l.context,t=e.eventLongPressDelay;return t==null&&(t=e.longPressDelay),t}
2class Vn extends Ee{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=r=>{let{component:n}=this,a=this.querySegEl(r),o=Ne(a),d=this.eventRange=o.eventRange;this.dragging.minDistance=n.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(r.origEvent.target)||r.isTouch&&this.component.props.eventSelection!==d.instance.instanceId)},this.handleDragStart=r=>{let{context:n}=this.component,a=this.eventRange;this.relevantEvents=xt(n.getCurrentData().eventStore,this.eventRange.instance.instanceId);let o=this.querySegEl(r);this.draggingSegEl=o,this.draggingSeg=Ne(o),n.calendarApi.unselect(),n.emitter.trigger("eventResizeStart",{el:o,event:new X(n,a.def,a.instance),jsEvent:r.origEvent,view:n.viewApi})},this.handleHitUpdate=(r,n,a)=>{let{context:o}=this.component,d=this.relevantEvents,c=this.hitDragging.initialHit,u=this.eventRange.instance,m=null,f=null,y=!1,p={affectedEvents:d,mutatedEvents:ue(),isEvent:!0};r&&(r.componentId===c.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(c,r)||(m=_n(c,r,a.subjectEl.classList.contains("fc-event-resizer-start"),u.range))),m&&(f=wt(d,o.getCurrentData().eventUiBases,m,o),p.mutatedEvents=f,Dt(p,r.dateProfile,o)||(y=!0,m=null,f=null,p.mutatedEvents=null)),f?o.dispatch({type:"SET_EVENT_RESIZE",state:p}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),y?Ge():Be(),n||(m&&we(c,r)&&(m=null),this.validMutation=m,this.mutatedRelevantEvents=f)},this.handleDragEnd=r=>{let{context:n}=this.component,a=this.eventRange.def,o=this.eventRange.instance,d=new X(n,a,o),c=this.relevantEvents,u=this.mutatedRelevantEvents;if(n.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:d,jsEvent:r.origEvent,view:n.viewApi}),this.validMutation){let m=new X(n,u.defs[a.defId],o?u.instances[o.instanceId]:null);n.dispatch({type:"MERGE_EVENTS",eventStore:u});let f={oldEvent:d,event:m,relatedEvents:fe(u,n,o),revert(){n.dispatch({type:"MERGE_EVENTS",eventStore:c})}};n.emitter.trigger("eventResize",Object.assign(Object.assign({},f),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||ie(0),endDelta:this.validMutation.endDelta||ie(0),jsEvent:r.origEvent,view:n.viewApi})),n.emitter.trigger("eventChange",f)}else n.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,i=this.dragging=new le(e.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=t.context.options.dragScroll;let s=this.hitDragging=new xe(this.dragging,Fe(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return K(e.subjectEl,".fc-event")}}function _n(l,e,t,i){let s=l.context.dateEnv,r=l.dateSpan.range.start,n=e.dateSpan.range.start,a=Tt(r,n,s,l.largeUnit);if(t){if(s.add(i.start,a)<i.end)return{startDelta:a}}else if(s.add(i.end,a)>i.start)return{endDelta:a};return null}class Yn{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=i=>{i.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=i=>{let s=this.context.options.unselectCancel,r=Ci(i.origEvent);this.matchesCancel=!!K(r,s),this.matchesEvent=!!K(r,ae.SELECTOR)},this.onDocumentPointerUp=i=>{let{context:s}=this,{documentPointer:r}=this,n=s.getCurrentData();if(!r.wasTouchScroll){if(n.dateSelection&&!this.isRecentPointerDateSelect){let a=s.options.unselectAuto;a&&(!a||!this.matchesCancel)&&s.calendarApi.unselect(i)}n.eventSelection&&!this.matchesEvent&&s.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new Gt(document);t.shouldIgnoreMove=!0,t.shouldWatchScroll=!1,t.emitter.on("pointerdown",this.onDocumentPointerDown),t.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const Xn={fixedMirrorParent:L},$n={dateClick:L,eventDragStart:L,eventDragStop:L,eventDrop:L,eventResizeStart:L,eventResizeStop:L,eventResize:L,drop:L,eventReceive:L,eventLeave:L};Ue.dataAttrPrefix="";var Kn=Le({name:"@fullcalendar/interaction",componentInteractions:[zn,Fn,ae,Vn],calendarInteractions:[Yn],elementDraggingImpl:le,optionRefiners:Xn,listenerRefiners:$n});const Qn={COMPLETED:"80",CANCELLED:"40",NO_SHOW:"60"};function Zn({onEventClick:l,onDateSelect:e}){const{currentOrganizationId:t}=qe(),i=kt(),s="local",r=Mt(),[n,a]=M.useState({start:new Date().toISOString(),end:new Date(Date.now()+720*60*60*1e3).toISOString()}),{data:o=[]}=ye({queryKey:["appointments-calendar",t,n.start,n.end],queryFn:()=>J.getCalendar(n.start,n.end),enabled:!!t}),{data:d}=ye({queryKey:["appointment-settings",t],queryFn:()=>ds.get(),enabled:!!t,staleTime:300*1e3}),{slotMinTime:c,slotMaxTime:u,businessHours:m}=M.useMemo(()=>{const v=d==null?void 0:d.businessHours;if(!v)return{slotMinTime:"07:00:00",slotMaxTime:"21:00:00",businessHours:void 0};const w=[];let T="09:00",D="17:00";for(let C=0;C<=6;C++){const N=v[String(C)];N&&(w.push({daysOfWeek:[C],startTime:N.open,endTime:N.close}
2),N.open<T&&(T=N.open),N.close>D&&(D=N.close))}const k=o.map(C=>{const N=be(C.scheduledStart,i),G=be(C.scheduledEnd,i);return{startHHMM:`${String(N.hours).padStart(2,"0")}:${String(N.minutes).padStart(2,"0")}`,endHHMM:`${String(G.hours).padStart(2,"0")}:${String(G.minutes).padStart(2,"0")}`}});for(const C of k)C.startHHMM<T&&(T=C.startHHMM),C.endHHMM>D&&(D=C.endHHMM);return{slotMinTime:`${T}:00`,slotMaxTime:`${D}:00`,businessHours:w.length>0?w:void 0}},[d,o,i]),f=Pe({mutationFn:v=>J.update(v.id,{scheduledStart:v.scheduledStart,scheduledEnd:v.scheduledEnd}),onSuccess:()=>{r.invalidateQueries({queryKey:["appointments-calendar"]}),r.invalidateQueries({queryKey:["appointments"]})}}),y=o.map(v=>{var k;const w=((k=v.serviceType)==null?void 0:k.color)||"#3b82f6",T=Qn[v.status]||"ff",D=v.recurringAppointmentId?"â» ":"";return{id:v.id,title:D+(v.title||`${v.contact.name}${v.serviceType?` - ${v.serviceType.name}`:""}`),start:v.scheduledStart,end:v.scheduledEnd,backgroundColor:`${w}${T}`,borderColor:w,extendedProps:{appointment:v}}}),p=M.useCallback(v=>{l(v.event.id)},[l]),b=M.useCallback(v=>{e(v.start.toISOString())},[e]),E=M.useCallback(v=>{a({start:v.start.toISOString(),end:v.end.toISOString()})},[]),x=M.useCallback(v=>{if(!v.event.start)return;const w=v.event.end||new Date(v.event.start.getTime()+3600*1e3);f.mutate({id:v.event.id,scheduledStart:v.event.start.toISOString(),scheduledEnd:w.toISOString()},{onError:()=>v.revert()})},[f]);return g.jsx("div",{className:"appointment-calendar",children:g.jsx(_i,{plugins:[Gs,Mn,Kn],timeZone:s,initialView:"dayGridMonth",headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay"},events:y,eventClick:p,select:b,datesSet:E,eventDrop:x,slotMinTime:c,slotMaxTime:u,businessHours:m,editable:!0,selectable:!0,selectMirror:!0,dayMaxEvents:!0,height:"auto",nowIndicator:!0,scrollTime:c})})}const Jn=M.lazy(()=>Zt(()=>import("./AppointmentAnalytics-C1fuoZVi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),er=[{value:"ALL",labelKey:"filters.statuses.all"},{value:"SCHEDULED",labelKey:"filters.statuses.scheduled"},{value:"CONFIRMED",labelKey:"filters.statuses.confirmed"},{value:"IN_PROGRESS",labelKey:"filters.statuses.inProgress"},{value:"COMPLETED",labelKey:"filters.statuses.completed"},{value:"CANCELLED",labelKey:"filters.statuses.cancelled"},{value:"NO_SHOW",labelKey:"filters.statuses.noShow"}];function zr(){const{t:l}=it("appointments"),e=ps(),t=Mt(),{currentOrganizationId:i,permissions:s}=qe(),r=s.includes("MANAGE_APPOINTMENTS"),n=kt(),[a,o]=M.useState(!1),[d,c]=M.useState(""),[u,m]=M.useState(""),[f,y]=M.useState("ALL"),[p,b]=M.useState("all"),[E,x]=M.useState(!1),[v,w]=M.useState([]),D=(S=>{if(S==="all")return{};const A=Yi(n),j=$i(A),H=Xi(new Date,n),W=be(new Date,n),U=(F,q)=>{const de=new Date(F);return de.setDate(de.getDate()+q),Xe(de,n)};if(S==="today")return{startDate:A,endDate:U(j,1)};if(S==="tomorrow")return{startDate:U(j,1),endDate:U(j,2)};if(S==="this-week"){const F=U(j,-H),q=U(j,7-H);return{startDate:F,endDate:q}}if(S==="next-week"){const F=U(j,7-H),q=U(j,14-H);return{startDate:F,endDate:q}}if(S==="this-month"){const F=`${W.year}-${String(W.month).padStart(2,"0")}-01`,q=W.month===12?1:W.month+1,Qt=`${W.month===12?W.year+1:W.year}-${String(q).padStart(2,"0")}-01`;return{startDate:F,endDate:Qt}}return{}})(p),k={...u?{search:u}:{},...f!=="ALL"?{status:f}:{},...D},{data:C=[],isLoading:N}=ye({queryKey:["appointments",i,k],queryFn:()=>J.getAll(k),enabled:!!i}),G=Pe({mutationFn:S=>J.create(S),onSuccess:()=>{t.invalidateQueries({queryKey:["appointments"]}),t.invalidateQueries({queryKey:["appointments-calendar"]}),t.invalidateQueries({queryKey:["appointments-upcoming"]}),o(!1)}}),Q=Pe({mutationFn:S=>J.bulkUpdateStatus(S),onSuccess:()=>{t.invalidateQueries({queryKey:["appointments"]}),w([])}}),{data:oe=[]}=ye({queryKey:["recurring-appointments",i,E],queryFn:()=>us.getAll(!E),enabled:!!i}),Yt=S=>{if(!r)return;const A=new Date(S),j=Xe(A,n),H=be(A,n),W=`${String(H.hours).padStart(2,"0")}:${String(H.minutes).padStart(2,"0")}`;c(`${j}T${W}`),o(!0)},Xt=async()=>
2{const S=J.getExportUrl({startDate:k.startDate,endDate:k.endDate,status:k.status}),A=await Ki.get(S,{responseType:"blob"}),j=new Blob([A.data],{type:"text/csv"}),H=document.createElement("a");H.href=URL.createObjectURL(j),H.download="appointments-export.csv",H.click(),URL.revokeObjectURL(H.href)},$t=S=>{w(A=>A.includes(S)?A.filter(j=>j!==S):[...A,S])},Kt=()=>{v.length===C.length?w([]):w(C.map(S=>S.id))};return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold",children:l("header.title")}),g.jsx("p",{className:"text-gray-500",children:l("header.subtitle")})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs(se,{variant:"outline",size:"sm",onClick:Xt,children:[g.jsx(is,{className:"mr-1 h-4 w-4"}),l("actions.exportCsv")]}),r&&g.jsxs(se,{onClick:()=>{c(""),o(!0)},children:[g.jsx(ss,{className:"mr-2 h-4 w-4"}),l("actions.newAppointment")]})]})]}),v.length>0&&r&&g.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-blue-200 bg-blue-50 p-3",children:[g.jsx("span",{className:"text-sm font-medium",children:l("bulk.selected",{count:v.length})}),g.jsx(se,{size:"sm",variant:"outline",onClick:()=>Q.mutate({appointmentIds:v,status:"CANCELLED",reason:"Bulk cancelled"}),disabled:Q.isPending,children:l("bulk.cancelSelected")}),g.jsx(se,{size:"sm",variant:"outline",onClick:()=>Q.mutate({appointmentIds:v,status:"COMPLETED"}),disabled:Q.isPending,children:l("bulk.markCompleted")}),g.jsx(se,{size:"sm",variant:"ghost",onClick:()=>w([]),children:g.jsx(ns,{className:"h-4 w-4"})})]}),g.jsxs(hs,{defaultValue:"list",children:[g.jsxs(gs,{children:[g.jsxs(ce,{value:"list",className:"flex items-center gap-1",children:[g.jsx(rs,{className:"h-4 w-4"}),l("tabs.list")]}),g.jsxs(ce,{value:"calendar",className:"flex items-center gap-1",children:[g.jsx(ls,{className:"h-4 w-4"}),l("tabs.calendar")]}),g.jsxs(ce,{value:"recurring",className:"flex items-center gap-1",children:[g.jsx(Nt,{className:"h-4 w-4"}),l("tabs.recurring")]}),g.jsxs(ce,{value:"analytics",className:"flex items-center gap-1",children:[g.jsx(as,{className:"h-4 w-4"}),l("tabs.analytics")]})]}),g.jsxs(he,{value:"list",className:"mt-4",children:[g.jsxs("div",{className:"mb-4 flex gap-3",children:[g.jsxs("div",{className:"relative flex-1",children:[g.jsx(os,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),g.jsx(cs,{value:u,onChange:S=>m(S.target.value),placeholder:l("filters.searchPlaceholder"),className:"pl-9"})]}),g.jsx("select",{value:f,onChange:S=>y(S.target.value),className:"h-10 w-[180px] shrink-0 rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:er.map(S=>g.jsx("option",{value:S.value,children:l(S.labelKey)},S.value))})]}),g.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:[{value:"all",label:l("dateFilters.all")},{value:"today",label:l("dateFilters.today")},{value:"tomorrow",label:l("dateFilters.tomorrow")},{value:"this-week",label:l("dateFilters.thisWeek")},{value:"next-week",label:l("dateFilters.nextWeek")},{value:"this-month",label:l("dateFilters.thisMonth")}].map(S=>g.jsx("button",{onClick:()=>b(S.value),className:`px-3 py-1.5 text-sm rounded-full border transition-colors ${p===S.value?"bg-primary text-primary-foreground border-primary":"bg-background hover:bg-accent border-input"}`,children:S.label},S.value))}),N?g.jsx("div",{className:"space-y-3 py-8",children:[1,2,3,4,5].map(S=>g.jsx("div",{className:"h-16 animate-pulse rounded bg-gray-100"},S))}):g.jsx(ms,{appointments:C,onRowClick:S=>e(`/dashboard/appointments/${S.id}`),selectable:r,selectedIds:v,onSelectToggle:$t,onSelectAll:Kt})]}),g.jsx(he,{value:"calendar",className:"mt-4",children:g.jsx(Zn,{onEventClick:S=>e(`/dashboard/appointments/${S}`),onDateSelect:Yt})}),g.jsxs(he,{value:"recurring",className:"mt-4",children:[g.jsx("div",{className:"mb-4 flex items-center justify-between",children:g.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-600",children:[g.jsx("input",{type:"checkbox",checked:E,onChange:S=>x(S.target.checked),className:"rounded"}),l("recurring.showInactive")]})}),oe.length===0?g.jsx("div",{className:"py-8 text-center text-gray-500",children:l("recurring.empty")}):g.jsx("div",{className:"overflow-x-auto rounded-lg border",children:g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b bg-gray-50 text-left text-sm text-gray-500",children:[g.jsx("th",{className:"px-4 py-3",children:l("recurring.columns.contact")}),g.jsx("th",{className:"px-4 py-3",children:l("recurring.columns.service")}),g.jsx("th",{className:"px-4 py-3",children:l("recurring.columns.frequency")}),g.jsx("th",{className:"px-4 py-3",children:l("recurring.columns.time")}
2),g.jsx("th",{className:"px-4 py-3",children:l("recurring.columns.next")}),g.jsx("th",{className:"px-4 py-3",children:l("recurring.columns.status")})]})}),g.jsx("tbody",{children:oe.map(S=>g.jsxs("tr",{className:"cursor-pointer border-b hover:bg-gray-50",onClick:()=>e(`/dashboard/appointments/recurring/${S.id}`),children:[g.jsx("td",{className:"px-4 py-3 text-sm",children:S.contact.name}),g.jsx("td",{className:"px-4 py-3 text-sm",children:S.serviceType?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{backgroundColor:S.serviceType.color}}),S.serviceType.name]}):S.title||"â"}),g.jsx("td",{className:"px-4 py-3 text-sm capitalize",children:S.frequency.toLowerCase()}),g.jsx("td",{className:"px-4 py-3 text-sm",children:S.scheduledTime}),g.jsx("td",{className:"px-4 py-3 text-sm",children:S.nextOccurrenceDate}),g.jsx("td",{className:"px-4 py-3",children:g.jsx(fs,{variant:S.isActive?"default":"secondary",children:S.isActive?l("recurring.active"):l("recurring.inactive")})})]},S.id))})]})})]}),g.jsx(he,{value:"analytics",className:"mt-4",children:g.jsx(M.Suspense,{fallback:g.jsx("div",{className:"py-8 text-center text-gray-500",children:l("loading.analytics")}),children:g.jsx(Jn,{})})})]}),g.jsx(Qi,{open:a,onOpenChange:o,onSubmit:S=>G.mutate(S),isLoading:G.isPending,defaultDate:d})]})}export{zr as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.