@progress/kendo-react-scheduler 13.3.0-develop.8 → 13.3.0-develop.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-date-math"),require("@progress/kendo-react-common"),require("@progress/kendo-data-query"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-recurrence")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-date-math","@progress/kendo-react-common","@progress/kendo-data-query","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-svg-icons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-dropdowns","@progress/kendo-recurrence"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScheduler={},e.React,e.PropTypes,e.KendoDateMath,e.KendoReactCommon,e.KendoDataQuery,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactDateinputs,e.KendoReactPopup,e.KendoSvgIcons,e.ReactDOM,e.KendoReactForm,e.KendoReactDialogs,e.KendoReactLabels,e.KendoReactInputs,e.KendoReactDropdowns,e.KendoRecurrence)}(this,(function(e,t,r,a,n,l,o,s,c,i,d,u,m,p,g,E,h,y){"use strict";function v(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var f=v(t),k=v(u);const D=(e,t=0,r=0,a=[])=>{if(e.length<=t)return[a];const n=[];return e[t].data.map((l=>{n.push(...D(e,t+1,r+1,[...a,{...l,field:e[t].field,valueField:e[t].valueField,colorField:e[t].colorField,multiple:e[t].multiple}]))})),n};function S(e,t){const r=[];if(!t||!t.length)return r;if(e&&e.resources&&e.resources.length){const a=e.resources;for(let e=0;e<a.length;e++){const n=t.find((t=>t.name===a[e]));r.push(n)}}return r}const C=(e,t=e.length-1)=>{const r=Math.max(0,t),a=[];e&&e.length||(e=[{}]);const n=(e[r].data||[]).map((t=>({...t,text:t[e[r].textField]})))||[],l=n.length;let o=1;for(let t=0;t<=r;t++)o*=(e[t].data||[]).length||1;for(let e=0;e<o;e++)n[e%l]&&a.push(n[e%l]);return a},b=e=>{if(!e)return{top:0,left:0,width:0,height:0,right:0};return{top:e.offsetTop,left:e.offsetLeft,right:e.offsetParent?e.offsetParent.offsetWidth-(e.offsetLeft+e.offsetWidth):0,width:e.offsetWidth,height:e.offsetHeight}},I=(e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"paddingLeft":"paddingTop"]||"0")+parseFloat(window.getComputedStyle(e)[t?"paddingRight":"paddingBottom"]||"0"),w=(e,t,r=!1)=>{e&&(void 0!==t.top&&(e.style.top=`${t.top}px`),void 0!==t.left&&(e.style.left=`${t.left}px`),void 0!==t.width&&(e.style.width=`${t.width}px`),void 0!==t.height&&!r&&(e.style.height="number"==typeof t.height?`${t.height}px`:t.height),r&&(e.style.minHeight=void 0!==t.height&&t.height>0?`${t.height}px`:""))},T=e=>e[0],R=e=>e[e.length-1],x=e=>{const t=new Set;return e.forEach((e=>{t.add(e.field)})),t.size===e.length};const A=(e,t,r,a=0)=>{if(a===r)return null;let n=null;const l=document.elementFromPoint(e,t);if(!l)return n;if("true"===l.getAttribute("data-slot"))return l;const o=l.style.pointerEvents;return l.style.pointerEvents="none",n=A(e,t,r,a+1),l.style.pointerEvents=o,n},_=(e,t)=>n.getter(t)(e),N=(e,t,r)=>{if(t)return n.setter(t)(e,r)},M=e=>null!=e;function z(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const L=(e,t,r)=>{const a=O(e,t)?_(e,t.id):_(e,t.recurrenceId);return r.find((e=>_(e,t.id)===a))},O=(e,t)=>{const r=_(e,t.id),a=_(e,t.recurrenceId),n=_(e,t.recurrenceRule);return!(!r||!n||null!=a)},F=(e,t)=>Math.max(e.getTime(),t.getTime()),P=(e,t)=>Math.min(e.getTime(),t.getTime()),W=(e,t,r,a,n=!1)=>n?F(t,a)-P(e,r)<=t.getTime()-e.getTime()+(a.getTime()-r.getTime()):F(t,a)-P(e,r)<t.getTime()-e.getTime()+(a.getTime()-r.getTime()),H={id:"id",start:"start",startTimezone:"startTimezone",originalStart:"originalStart",end:"end",endTimezone:"endTimezone",isAllDay:"isAllDay",title:"title",description:"description",recurrenceRule:"recurrenceRule",recurrenceId:"recurrenceId",recurrenceExceptions:"recurrenceExceptions"},K=(e,t,r)=>(t.getHours()<e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()<=e.getMinutes())&&(e.getHours()<r.getHours()||r.getHours()===e.getHours()&&e.getMinutes()<r.getMinutes()),V=(e,t,r)=>t<r?t<=e&&e<=r:e<=r||t<=e,G=e=>{let t=0;const r=e.slice();return r.sort(((e,t)=>e-t)).forEach(((e,a)=>{r[a]===a&&(t=a+1)})),t},B=(e,t,r=!1)=>{t.forEach((e=>e.items.splice(0,e.items.length))),t.forEach((t=>{const a=[];e.forEach((e=>{if((r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&e.group.index===t.group.index&&W(e.start,e.end,t.start,t.end)){const r=G(a);(null===e.order||void 0===e.order||e.order<r)&&(e.order=r),a.splice(e.order,0,e.order),t.items.push(e)}}))}))},U=(e,t,r=!1)=>{e.forEach((e=>e.slots.splice(0,e.slots.length))),e.forEach((e=>{t.forEach((t=>{(r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&e.group.index===t.group.index&&W(e.start,e.end,t.start,t.end)&&e.slots.push(t)}))}))},Z=(...e)=>{},$=(e,t,r=!1,a=!1)=>{const n=e.current;if(!n||!t)return null;const o=t.filter((e=>null!==e.current&&null!==e.current.element)),s=l.orderBy(o,[{field:"current.props.group.index",dir:"asc"},{field:"current.props.range.index",dir:"asc"},r?{field:""}:{field:"current.props.isAllDay",dir:"desc"},{field:"current.props.start",dir:"asc"}]),c=s.findIndex((e=>null!==e.current&&!(e.current.props.uid!==n.props.uid||void 0!==e.current.props.occurrenceId&&e.current.props.occurrenceId!==n.props.occurrenceId||e.current.props.group.index!==n.props.group.index||e.current.props.range.index!==n.props.range.index||!r&&e.current.props.isAllDay!==n.props.isAllDay)));return s[c+(a?-1:1)]},q=(e,t)=>(e.order||0)-(t.order||0),Y=6e4,j=[{}],X=new Date(1900,0,1),Q=new Date(2099,11,31);a.ZonedDate.fromLocalDate(X),a.ZonedDate.fromLocalDate(Q);var J=(e=>(e[e.create=0]="create",e[e.update=1]="update",e[e.remove=2]="remove",e))(J||{});const ee=f.createContext({current:null}),te=()=>f.useContext(ee);ee.displayName="SchedulerElementContext";const re=f.createContext({}),ae=()=>f.useContext(re);re.displayName="SchedulerPropsContext";const ne=f.createContext([]),le=()=>f.useContext(ne);ne.displayName="SchedulerViewsContext";const oe=f.createContext(H),se=()=>f.useContext(oe);oe.displayName="SchedulerFieldsContext";const ce=f.createContext({dateFormat:"{0:D}",shortDateFormat:"{0:d}"});ce.displayName="SchedulerDateFormatContext";const ie=f.createContext([{index:0,resources:[]}]),de=()=>f.useContext(ie);ie.displayName="SchedulerGroupsContext";const ue=f.createContext({start:new Date,end:new Date,zonedStart:a.ZonedDate.fromLocalDate(new Date),zonedEnd:a.ZonedDate.fromLocalDate(new Date)}),me=()=>f.useContext(ue);ue.displayName="SchedulerDateRangeContext";const pe=f.createContext(null),ge=()=>f.useContext(pe);pe.displayName="SchedulerOrientationContext";const Ee=f.createContext([new Date,Z]),he=()=>f.useContext(Ee);Ee.displayName="SchedulerDateContext";const ye=f.createContext([[],Z]),ve=()=>f.useContext(ye);ye.displayName="SchedulerDataContext";const fe=f.createContext(["day",Z]),ke=()=>f.useContext(fe);fe.displayName="SchedulerActiveViewContext";const De=f.createContext([null,()=>{}]);De.displayName="SchedulerItemSelectionContext";const Se=({children:e,element:t,props:r,views:a,fields:n,groups:l,dateRange:o,dateFormat:s,orientation:c,date:i,data:d,activeView:u,selection:m})=>f.createElement(ee.Provider,{value:t},f.createElement(re.Provider,{value:r},f.createElement(ne.Provider,{value:a},f.createElement(oe.Provider,{value:n},f.createElement(ce.Provider,{value:s},f.createElement(ie.Provider,{value:l},f.createElement(ue.Provider,{value:o},f.createElement(pe.Provider,{value:c},f.createElement(Ee.Provider,{value:i},f.createElement(ye.Provider,{value:d},f.createElement(fe.Provider,{value:u},f.createElement(De.Provider,{value:m},e)))))))))))),Ce=(e,t,r)=>{const[a,n]=f.useState(t||e),l=f.useCallback(((e,t)=>{n(e),r&&r.call(void 0,{...t,value:e})}),[r,n]);return[void 0!==t?t:a,l]},be=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,(()=>({element:l.current,props:e}))),f.useImperativeHandle(t,(()=>o.current));const c=f.useMemo((()=>n.classNames("k-scheduler-toolbar",r)),[r]);return f.createElement(s.Toolbar,{id:e.id,ref:e=>{e&&(l.current=e.element)},className:c,...a},e.children)}));be.displayName="KendoReactSchedulerHeader";const Ie=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,(()=>({element:l.current,props:e}))),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames(r),...a},e.children)}));Ie.displayName="KendoReactSchedulerSchedulerNavigation";const we=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,(()=>({element:l.current,props:e}))),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-views",r),...a},e.children)}));we.displayName="KendoReactSchedulerViewSelector";const Te=f.forwardRef(((e,t)=>{const{className:r,style:a,...l}=e,o=f.useRef(null),c=f.useRef(null);f.useImperativeHandle(o,(()=>({element:c.current,props:e}))),f.useImperativeHandle(t,(()=>o.current));const i=f.useMemo((()=>n.classNames("k-scheduler-footer",e.className)),[e.className]);return f.createElement(s.Toolbar,{ref:e=>{e&&(c.current=e.element)},className:i,style:{boxShadow:"none",...a},...l},e.children)}));Te.displayName="KendoReactSchedulerFooter";const Re="scheduler.allEvents",xe="scheduler.allDay",Ae="scheduler.today",_e="scheduler.timelineViewTitle",Ne="scheduler.weekViewTitle",Me="scheduler.workWeekViewTitle",ze="scheduler.agendaViewTitle",Le="scheduler.dayViewTitle",Oe="scheduler.monthViewTitle",Fe="scheduler.deleteTitle",Pe="scheduler.previousTitle",We="scheduler.nextTitle",He="scheduler.showFullDay",Ke="scheduler.showWorkDay",Ve="scheduler.editOccurrence",Ge="scheduler.editSeries",Be="scheduler.editRecurringConfirmation",Ue="scheduler.editRecurringDialogTitle",Ze="scheduler.editSave",$e="scheduler.editCancel",qe="scheduler.editorTitle",Ye="scheduler.editorEventTitle",je="scheduler.editorEventStart",Xe="scheduler.editorEventStartTimeZone",Qe="scheduler.editorEventEnd",Je="scheduler.editorEventEndTimeZone",et="scheduler.editorEventAllDay",tt="scheduler.editorEventDescription",rt="scheduler.editorEventSeparateTimeZones",at="scheduler.editorEventTimeZone",nt="scheduler.recurrenceEditorRepeat",lt="scheduler.recurrenceEditorWeeklyRepeatOn",ot="scheduler.recurrenceEditorMonthlyDay",st="scheduler.recurrenceEditorMonthlyRepeatOn",ct="scheduler.recurrenceEditorYearlyOf",it="scheduler.recurrenceEditorYearlyRepeatOn",dt="scheduler.recurrenceEditorEndAfter",ut="scheduler.recurrenceEditorEndOccurrence",mt="scheduler.recurrenceEditorEndLabel",pt="scheduler.recurrenceEditorEndNever",gt="scheduler.recurrenceEditorEndOn",Et="scheduler.editorDelete",ht="scheduler.deleteConfirmation",yt="scheduler.deleteRecurringConfirmation",vt="scheduler.deleteOccurrence",ft="scheduler.deleteSeries",kt="scheduler.deleteDialogTitle",Dt="scheduler.deleteRecurringDialogTitle",St="scheduler.dateTitle",Ct="scheduler.timeTitle",bt="scheduler.eventTitle",It="scheduler.editorValidationRequired",wt="scheduler.editorValidationStart",Tt="scheduler.editorValidationEnd",Rt="scheduler.noEvents",xt="scheduler.moreEvents",At={[It]:"Field is required.",[wt]:"Start time must be before End time.",[Tt]:"End time must be after Start time.",[Re]:"All events",[xe]:"all day",[Ae]:"Today",[Le]:"Day",[Oe]:"Month",[Ne]:"Week",[Me]:"Work Week",[_e]:"Timeline",[ze]:"Agenda",[Fe]:"Delete",[Pe]:"Previous",[We]:"Next",[He]:"Show full day",[Ke]:"Show business hours",[Ve]:"Edit current occurrence",[Ge]:"Edit the series",[Be]:"Do you want to edit only this event occurrence or the whole series?",[Ue]:"Edit Recurring Item",[Ze]:"Save",[$e]:"Cancel",[Et]:"Delete",[qe]:"Event",[Ye]:"Title",[je]:"Start",[Xe]:"Start Time Zone",[Qe]:"End",[Je]:"End Time Zone",[et]:"All Day Event",[tt]:"Description",[rt]:"End in different Time Zone",[at]:"Specify Time Zone",[nt]:"Repeat","scheduler.recurrenceEditorDailyInterval":"day(s)","scheduler.recurrenceEditorDailyRepeatEvery":"Repeat every","scheduler.recurrenceEditorWeeklyInterval":"week(s)","scheduler.recurrenceEditorWeeklyRepeatEvery":"Repeat every",[lt]:"Repeat on",[ot]:"Day","scheduler.recurrenceEditorMonthlyInterval":"month(s)","scheduler.recurrenceEditorMonthlyRepeatEvery":"Repeat every",[st]:"Repeat on",[ct]:"of","scheduler.recurrenceEditorYearlyRepeatEvery":"Repeat every",[it]:"Repeat on","scheduler.recurrenceEditorYearlyInterval":"year(s)","scheduler.recurrenceEditorFrequenciesDaily":"Daily","scheduler.recurrenceEditorFrequenciesMonthly":"Monthly","scheduler.recurrenceEditorFrequenciesNever":"Never","scheduler.recurrenceEditorFrequenciesWeekly":"Weekly","scheduler.recurrenceEditorFrequenciesYearly":"Yearly","scheduler.recurrenceEditorOffsetPositionsFirst":"First","scheduler.recurrenceEditorOffsetPositionsSecond":"Second","scheduler.recurrenceEditorOffsetPositionsThird":"Third","scheduler.recurrenceEditorOffsetPositionsFourth":"Fourth","scheduler.recurrenceEditorOffsetPositionsLast":"Last","scheduler.recurrenceEditorWeekdaysDay":"Day","scheduler.recurrenceEditorWeekdaysWeekday":"Weekday","scheduler.recurrenceEditorWeekdaysWeekendday":"Weekend Day",[dt]:"After",[ut]:"occurrence(s)",[mt]:"End",[pt]:"Never",[gt]:"On",[ht]:"Are you sure you want to delete this event?",[yt]:"Do you want to delete only this event occurrence or the whole series?",[vt]:"Delete current occurrence",[ft]:"Delete the series",[kt]:"Delete Event",[Dt]:"Delete Recurring Item",[St]:"Date",[Ct]:"Time",[bt]:"Event",[Rt]:"no events",[xt]:"More events"},_t=f.forwardRef(((e,t)=>{var r;const l=f.useRef(null),u=f.useRef(null);f.useImperativeHandle(t,(()=>l.current));const{timezone:m}=ae(),p=a.ZonedDate.fromLocalDate(e.value,m),g=a.getDate(p),E=te(),h=n.useWindow(E),[y,v]=f.useState("desktop"),[k,D]=f.useState(!1),[S,C]=f.useState(!1),b=o.useInternationalization(),{dateFormat:I,shortDateFormat:w}=f.useContext(ce),T=me(),[R]=he(),x=T.end.getTime()-T.start.getTime()>27*a.MS_PER_DAY,A=b.format(I,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),_=b.format(w,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),N=f.useCallback((()=>{D(!k)}),[k]),M=f.useCallback((()=>{C(!0)}),[]),L=f.useCallback((()=>{D(!1),C(!1)}),[]),O=f.useCallback((t=>{if(e.onChange){const r=a.ZonedDate.fromUTCDate(z(t.value),m);e.onChange.call(void 0,{...t,value:r})}D(!1)}),[e.onChange,m]),F=f.useCallback((()=>{h().matchMedia&&v(h().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")}),[h]);f.useEffect((()=>{F();const e=h().ResizeObserver,t=e&&new e(F);return t&&t.observe(E.current),()=>{e&&t.disconnect()}}),[F,E,h]),f.useEffect((()=>{k&&S&&u.current&&u.current.focus()}),[S,k]);const{onFocus:P,onBlur:W}=n.useAsyncFocusBlur({onFocus:M,onBlur:L});return f.createElement(f.Fragment,null,f.createElement(s.Button,{ref:l,onFocus:P,onBlur:W,fillMode:"flat",className:"k-nav-current",icon:"calendar",svgIcon:d.calendarIcon,"aria-live":"polite",tabIndex:-1,onClick:N},"desktop"===y?A:_),f.createElement(i.Popup,{anchor:null==(r=l.current)?void 0:r.element,show:k},f.createElement(c.Calendar,{ref:u,onFocus:P,onBlur:W,onChange:O,value:g})))}));_t.displayName="KendoReactSchedulerNavigationDatePicker";const Nt=e=>{const[t,r]=ke(),a=o.useLocalization(),n=f.useMemo((()=>"function"==typeof e.view.title?e.view.title.call(void 0,a):e.view.title),[e.view.title,a]),l=f.useCallback((()=>{e.view.name&&r(e.view.name)}),[r,e.view.name]);return f.createElement(s.Button,{className:"k-toolbar-button",role:"button",type:"button",tabIndex:-1,togglable:!0,selected:e.view.name===t,onClick:l},n)},Mt=f.forwardRef((()=>{const e=f.useRef(null),[t,r]=f.useState("desktop"),a=le(),l=n.useWindow(e),[c,i]=ke(),u=a.find((e=>e.props.name===c)),m=o.useLocalization(),p=f.useCallback((e=>{i&&(e.syntheticEvent.preventDefault(),i(e.item.name))}),[i]),g=()=>{l().matchMedia&&r(l().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")};return f.useEffect((()=>{g();const t=l().ResizeObserver,r=t&&new t(g);return r&&r.observe(e.current),()=>{r&&r.disconnect()}}),[]),f.createElement("div",{className:n.classNames("k-toolbar-button-group k-button-group k-button-group-solid",{"k-scheduler-views":"desktop"===t,"k-scheduler-tools":"mobile"===t}),role:"group",ref:e},u&&"mobile"===t&&f.createElement(s.DropDownButton,{className:"k-views-dropdown",onItemClick:p,popupSettings:{popupClass:"k-scheduler-toolbar"},textField:"title",items:a.map((e=>({...e.props,selected:e.props.name===c,title:"function"==typeof e.props.title?e.props.title.call(void 0,m):e.props.title}))),text:f.createElement(f.Fragment,null,"function"==typeof u.props.title?u.props.title.call(void 0,m):u.props.title,f.createElement(n.IconWrap,{name:"caret-alt-down",icon:d.caretAltDownIcon}))}),"desktop"===t&&f.createElement(f.Fragment,null,a.map((e=>f.createElement(Nt,{key:e.props.name,view:e.props})))))}));Mt.displayName="KendoReactSchedulerViewSelectorList";const zt=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,(()=>({element:l.current,props:e}))),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-navigation",r),...a},e.children)})),Lt=f.createContext({});Lt.displayName="SchedulerViewPropsContext";const Ot=f.createContext([]),Ft=()=>f.useContext(Ot);Ot.displayName="SchedulerViewRangesContext";const Pt=f.createContext([[],Z]),Wt=()=>f.useContext(Pt);Pt.displayName="SchedulerViewSlotsContext";const Ht=f.createContext([[],Z]),Kt=()=>f.useContext(Ht);Ht.displayName="SchedulerViewItemsContext";const Vt=f.createContext([[],Z]);Vt.displayName="SchedulerViewSelectedSlotsContext";const Gt=f.createContext([[],Z]),Bt=()=>f.useContext(Gt);Gt.displayName="SchedulerViewSelectedItemsContext";const Ut=f.createContext([[],Z]);Ut.displayName="SchedulerViewFocusedItemsContext";const Zt=f.createContext([[],Z]),$t=()=>f.useContext(Zt);Zt.displayName="SchedulerViewFocusedSlotsContext";const qt=({children:e,props:t,ranges:r,slots:a,items:n,selectedSlots:l,selectedItems:o,focusedItems:s,focusedSlots:c})=>f.createElement(Lt.Provider,{value:t},f.createElement(Ot.Provider,{value:r},f.createElement(Pt.Provider,{value:a},f.createElement(Ht.Provider,{value:n},f.createElement(Vt.Provider,{value:l},f.createElement(Gt.Provider,{value:o},f.createElement(Ut.Provider,{value:s},f.createElement(Zt.Provider,{value:c},e))))))));var Yt=(e=>(e.select="ITEMS_SELECT_SELECT",e.selectNext="ITEMS_SELECT_SELECT_NEXT",e.selectPrev="ITEMS_SELECT_SELECT_PREV",e.reset="ITEMS_SELECT_RESET",e.add="ITEMS_SELECT_ADD",e.remove="ITEMS_SELECT_REMOVE",e))(Yt||{});var jt=(e=>(e.select="SLOTS_SELECT_SELECT",e.reset="SLOTS_SELECT_RESET",e.add="SLOTS_SELECT_ADD",e))(jt||{});const Xt=(e,t)=>{const{element:r}=e;n.useIsomorphicLayoutEffect((()=>{if(!r||!r.current)return;const t=[],a=[],n=[],l=r.current.querySelectorAll(e.selector);l.forEach((r=>{const l=r.getBoundingClientRect().width,o=e.explicitDepth&&void 0!==e.attribute?r.getAttribute(e.attribute):0,s=I(r,!0),c=((e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"borderLeftWidth":"borderTopWidth"]||"0")+parseFloat(window.getComputedStyle(e)[t?"borderRightWidth":"borderBottomWidth"]||"0"))(r,!0);null!==o&&((!n[o]||c>n[o])&&(n[o]=c),(!a[o]||s>a[o])&&(a[o]=s),(!t[o]||l>t[o])&&(t[o]=l))})),l.forEach((r=>{const l=e.explicitDepth?r.getAttribute(e.attribute):0;null!==l&&(r.style.minWidth=t[l]-a[l]-n[l]+"px")}))}),t)};var Qt=(e=>(e.next="ITEMS_FOCUS_NEXT",e.prev="ITEMS_FOCUS_PREV",e))(Qt||{});var Jt=(e=>(e.up="SLOT_FOCUS_UP",e.down="SLOT_FOCUS_DOWN",e.left="SLOT_FOCUS_LEFT",e.right="SLOT_FOCUS_RIGHT",e))(Jt||{});const er=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row-1&&t.current.props.col===e.current.props.col)),tr=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col-1)),rr=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col+1)),ar=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row+1&&t.current.props.col===e.current.props.col)),nr=f.forwardRef(((e,t)=>{const r=f.useRef(null);f.useImperativeHandle(t,(()=>r.current));const[a,l]=n.useCollection([]),[o,s]=n.useCollection([]),[c,i]=(e=>[[],(t,r)=>{switch(t.type){case"ITEMS_FOCUS_NEXT":{if(!t.item||!t.item.current||!e)return;const a=$(t.item,e,t.ignoreIsAllDay,!1);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"ITEMS_FOCUS_PREV":{if(!t.item||!t.item.current||!e)return;const a=$(t.item,e,t.ignoreIsAllDay,!0);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(a),[d,u]=(e=>[[],(t,r)=>{switch(t.type){case"SLOT_FOCUS_UP":{if(!t.slot.current||!e)return;const a=er(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_DOWN":{if(!t.slot||!e)return;const a=ar(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_LEFT":{if(!t.slot||!e)return;const a=tr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_RIGHT":{if(!t.slot||!e)return;const a=rr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(o),[m,p]=(e=>{const[t,r]=f.useState([]),a=f.useCallback(((a,n)=>{switch(a.type){case"ITEMS_SELECT_SELECT":if(!a.item)return;r([a.item]);break;case"ITEMS_SELECT_SELECT_NEXT":{if(!a.item||!a.item.current||!e)return;const t=$(a.item,e,a.ignoreIsAllDay,!1);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_SELECT_PREV":{if(!a.item||!a.item.current||!e)return;const t=$(a.item,e,a.ignoreIsAllDay,!0);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_RESET":r([]);break;case"ITEMS_SELECT_ADD":if(!a.item)return;t.some((e=>e===a.item))||r([...t,a.item]);break;case"ITEMS_SELECT_REMOVE":if(!a.item)return;r([...t.filter((e=>e!==a.item))])}}),[e,t]);return[t,a]})(a),[g,E]=(e=>{const[t,r]=f.useState([]),a=f.useCallback((e=>{switch(e.type){case"SLOTS_SELECT_SELECT":if(!e.slot)return;r([e.slot]);break;case"SLOTS_SELECT_RESET":r([]);break;case"SLOTS_SELECT_ADD":if(!e.slot)return;t.some((t=>t===e.slot))||r([...t,e.slot])}}),[t]);return[t,a]})(),h=f.useCallback(((e,t)=>{E({type:jt.reset}),p(e,t)}),[p,E]),y=f.useCallback(((e,t)=>{p({type:Yt.reset},t),E(e)}),[p,E]),v=f.useMemo((()=>n.classNames("k-scheduler-layout k-scheduler-layout-flex",e.className)),[e.className]);return Xt({element:r,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),Xt({element:r,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1}),f.createElement(qt,{props:e.props,ranges:e.ranges,items:[a,l],slots:[o,s],selectedItems:[m,h],selectedSlots:[g,y],focusedItems:[c,i],focusedSlots:[d,u]},f.createElement("div",{ref:r,style:e.style,className:v,role:"presentation"},e.children))}));nr.displayName="KendoReactSchedulerBaseView";const lr=f.createContext({resource:{},groupIndex:0}),or=e=>{const{nested:t,children:r,rowContentProps:a}=e,n=e.rowContent||ir,l=e.childRowContent||n,o=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group k-group-horizontal"},t?sr({resources:o,children:r,nested:t,groupIndex:0,rowContent:n,rowContentProps:a,childRowContent:l}):cr({resources:o,children:r,rowContent:n,nested:!!t,groupIndex:0,rowContentProps:a,childRowContent:l}))},sr=e=>{const{resources:t,rowContent:r,nested:a,children:n,groupIndex:l,rowContentProps:o,childRowContent:s}=e;if(l===t.length)return cr({resources:t,rowContent:r,children:n,nested:a,groupIndex:l,rowContentProps:o,childRowContent:s});const c=C(t,l),i=r;return f.createElement(f.Fragment,null,a?f.createElement("div",{className:"k-scheduler-row"},f.createElement(i,{resources:t,groupIndex:l,...o},c.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text))))):f.createElement(i,{resources:t,groupIndex:l,...o},c.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text)))),sr({resources:t,children:n,nested:a,rowContent:r,childRowContent:s,groupIndex:l+1}))},cr=e=>{const{resources:t,childRowContent:r,children:a,rowContentProps:n}=e,l=C(t,t.length-1),o=r,s=t.length>0;return f.createElement("div",{className:"k-scheduler-row"},f.createElement(o,{resources:t,...n},(l.length?l:j).map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell"},f.createElement(lr.Provider,{value:{resource:e,groupIndex:s?t:0}},a))))))};or.displayName="KendoReactSchedulerHorizontalResourceIterator";const ir=e=>e.children,dr=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-side-cell","data-range-index":e.rangeIndex}),e.children),ur=e=>{const{nested:t,wrapGroup:r,children:a}=e,n=e.cellContent||vr,l=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group"},t?r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},gr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},pr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!1))):pr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!0):r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},mr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},a)):Er({resources:l,children:a,cellContent:n,depth:0,groupIndex:0}))},mr=e=>f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-row"},e.resources.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-resource-cell k-heading-cell","data-depth-index":t}))))),pr=(e,t=!0)=>{const{resources:r,children:a,cellContent:n,groupIndex:l,depth:o}=e,s=r.length>0;if(o===r.length||!s)return f.createElement(lr.Provider,{value:{resource:r[o],groupIndex:s?l:0}},a);const c=r[o].data.length;return r[o].data.map(((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},t&&f.createElement("div",{className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":o},e[r[o].textField]),f.createElement("div",{className:"k-scheduler-cell k-group-content k-resource-row","data-depth-index":o,"data-resource-index":c*l+s},pr({resources:r,children:a,cellContent:n,groupIndex:c*l+s,depth:o+1},t)))))},gr=e=>{const{resources:t,children:r,cellContent:a,groupIndex:n,depth:l}=e,o=t.length?t[l].data.length:0;return t[l]?t[l].data.map(((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-cell k-resource-cell k-resource-row k-heading-cell","data-depth-index":l,"data-resource-index":o*n+s},e[t[l].textField]),l+1!==t.length&&f.createElement("div",{className:"k-scheduler-cell k-resource-content"},gr({resources:t,children:r,cellContent:a,groupIndex:o*n+s,depth:l+1}))))):null},Er=e=>{const{resources:t,children:r,groupIndex:a,cellContent:n}=e;return f.createElement("div",{className:"k-scheduler-row"},yr(t),n,hr(r,t,a))},hr=(e,t,r)=>{const a=t.length>0;return f.createElement("div",{className:"k-scheduler-cell k-group-content"},f.createElement(lr.Provider,{value:{resource:t[r],groupIndex:a?r:void 0}},e))},yr=e=>e.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":t})));ur.displayName="KendoReactSchedulerVerticalResourceIterator";const vr=null,fr=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day"},t.toLanguageString(xe,At[xe])),e.children)},kr=f.forwardRef(((e,t)=>{const{as:r=Dr.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo((()=>n.classNames("k-scheduler-cell k-heading-cell",e.className)),[e.className]);return f.useImperativeHandle(s,(()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e}))),f.useImperativeHandle(t,(()=>s.current)),f.createElement(r,{ref:r!==Dr.as?void 0:l,...a,className:i},c.formatDate(e.date,e.format?e.format:Dr.format))})),Dr={as:f.forwardRef((({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l}))),format:"t"};kr.displayName="KendoReactSchedulerTimeHeaderCell";const Sr=e=>{const{slot:t,children:r}=e;return f.createElement(f.Fragment,null,e.isMaster?f.createElement(kr,{as:e.timeHeaderCell,date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd,className:n.classNames("k-side-cell",{"k-major-cell":!e.isLast})}):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell"}),r)},Cr=e=>{const{onChange:t,data:r,validationMessage:a,visited:n,touched:o,modified:s,...c}=e,[i,d]=f.useState(r),u=f.useCallback((e=>t(e)),[t]),m=f.useCallback((e=>{const t=l.filterBy(r||[],e.filter);d(t)}),[]);return f.createElement(h.ComboBox,{style:{width:"100%"},data:i,filterable:!0,onFilterChange:m,onChange:u,...c})},br=e=>{const{value:t,data:r,onChange:a,...n}=e,l=f.useCallback((e=>{a&&a.call(void 0,e.currentTarget.dataset.value)}),[a]);return f.createElement(s.ButtonGroup,{className:"k-scheduler-recurrence-repeat",width:"100%",...n},r.map((e=>f.createElement(s.Button,{type:"button",key:e.value,selected:e.value===t,onClick:l,"data-value":e.value,togglable:!0},e.text))))},Ir=e=>e.charAt(0).toUpperCase()+e.slice(1),wr=["first","second","third","fourth","last"],Tr=["never","daily","weekly","monthly","yearly"],Rr=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],xr=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],Ar=[{day:0,offset:0},{day:6,offset:0}],_r=e=>{switch(e){case"day":return Rr;case"weekday":return xr;case"weekend":return Ar}},Nr=e=>{const{value:t,data:r,onChange:a,...n}={...Mr,...e},l=r=>{const a=Number(r.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some((e=>e===a))?t.filter((e=>e!==a)):[...t,a])};return f.createElement(s.ButtonGroup,{width:"auto",...n},(e.data||Mr.data).map((e=>f.createElement(s.Button,{type:"button",key:e.value,"data-key":e.value,selected:t.some((t=>t===e.value)),togglable:!0,onClick:l},Ir(e.text)))))},Mr={data:[],value:[]},zr=e=>{const t=o.useInternationalization(),r=o.useLocalization(),{timezone:n}=ae(),[l,s]=f.useState(1),[i,d]=f.useState(a.ZonedDate.fromUTCDate(e.start)),u=f.useCallback(((e,t)=>{const a=t?e:"scheduler.recurrenceEditor"+e;return r.toLanguageString(a,At[a])}),[r]),p=f.useMemo((()=>{var t;return(e=>y.parseRule({recurrenceRule:e})||{})(null!=(t=e.value)?t:Or.value)}),[e.value]),v=f.useMemo((()=>(e=>Tr.map((t=>({value:t,text:e("Frequencies"+Ir(t))}))))(u)),[u]),k=f.useMemo((()=>(e=>M(e)&&!(e=>(e=>null==e)(e)||e.trim&&0===e.trim().length)(e.freq)?e.freq:"never")(p)),[p]),D=f.useMemo((()=>((e,t)=>{const r=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map(((e,t)=>({text:e,value:t}))),n=a.slice(r).concat(a.slice(0,r));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(n)})(t,u)),[t,u]),S=f.useMemo((()=>((e,t,r)=>{var a;let n;if(M(t.byWeekDay))switch(t.byWeekDay.length){case 7:n="day";break;case 5:n="weekday";break;case 2:n="weekend";break;case 1:n=t.byWeekDay[0].day;break;default:n=r.getDay()}else n=r.getDay();return null!=(a=e.find((e=>n===e.value)))?a:e[0]})(D,p,e.start)),[D,p,e.start]),C=f.useMemo((()=>(e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map(((e,t)=>({text:e,value:t+1}))))(t)),[t]),b=f.useMemo((()=>((e,t)=>e.find((e=>(t.byMonth?t.byMonth[0]:null)===e.value))||e[0])(C,p)),[C,p]),I=f.useMemo((()=>(e=>{const t=[1,2,3,4,-1];return wr.map(((r,a)=>({text:e("OffsetPositions"+Ir(r)),value:t[a]})))})(u)),[u]),w=f.useMemo((()=>((e,t)=>e.find((e=>e.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1)))||e[0])(I,p)),[I,p]),T=f.useMemo((()=>(e=>M(e.count)?"count":M(e.until)?"until":"never")(p)),[p]),R=f.useMemo((()=>((e,t)=>M(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate())(p,e.start)),[p,e.start]),x=f.useMemo((()=>(e=>M(e.until)?a.toLocalDate(e.until):null)(p)),[p.until]),A=f.useMemo((()=>(e=>{const t=e.firstDay(),r=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map(((e,t)=>({text:e,value:t})));return r.slice(t).concat(r.slice(0,t))})(t)),[t]),_=f.useMemo((()=>(e=>M(e.byWeekDay)?"weekday":M(e.byMonthDay)?"monthday":void 0)(p)),[p.byWeekDay,p.byMonthDay]),N=f.useCallback((r=>{"never"===r.freq?e.onChange({value:null}):(void 0===r.weekStart&&(r.weekStart=t.firstDay()),e.onChange({value:y.serializeRule(r,e.timezone)}))}),[e.onChange,e.timezone]),z=f.useCallback((t=>{const r={};r.freq=t,r.interval=1,"weekly"===t&&(r.byWeekDay=[{day:a.ZonedDate.fromLocalDate(e.start,n).getDay(),offset:0}]),("monthly"===t||"yearly"===t)&&(r.byMonthDay=[e.start.getDate()]),"yearly"===t&&(r.byMonth=[e.start.getMonth()+1]),N(r)}),[N,e.start,n]),L=f.useCallback((e=>{const t=e.value;N(Object.assign({},p,{interval:t}))}),[N,p]),O=f.useCallback((e=>{const t=e.value;N(Object.assign({},p,{count:t})),null!==t&&s(t)}),[N,p]),F=f.useCallback((t=>{const r=t.value;if(!r)return;const n=a.ZonedDate.fromLocalDate(r,e.timezone);N(Object.assign({},p,{until:n})),d(n)}),[N,p,e.timezone]),P=f.useCallback((e=>{N(Object.assign({},p,{byWeekDay:A.filter((t=>e.some((e=>e===t.value)))).map((e=>({offset:0,day:e.value})))}))}),[N,p,A]),W=f.useCallback((e=>{const t=Object.assign({},p),r=e.target.value;"string"==typeof r.value?(t.byWeekDay=_r(r.value),t.bySetPosition=[w.value]):(t.bySetPosition=void 0,t.byWeekDay=[{day:r.value,offset:w.value}]),N(t)}),[w.value,N,p]),H=f.useCallback((e=>{N(Object.assign({},p,{byMonthDay:[e.value]}))}),[N,p]),K=f.useCallback((e=>{const t=e.value;N(Object.assign({},p,{byMonth:[t.value]}))}),[N,p]),V=f.useCallback((e=>{const t=e.value,r=Object.assign({},p);switch(t){case"never":r.until=void 0,r.count=void 0;break;case"count":r.until=void 0,r.count=l;break;case"until":r.until=i,r.count=void 0}N(r)}),[N,p,e.timezone]),G=f.useCallback((e=>{const t=Object.assign({},p);"monthday"===e.value?(t.byWeekDay=void 0,t.bySetPosition=void 0,t.byMonthDay=[R]):"weekday"===e.value&&(t.byMonthDay=void 0,"string"==typeof S.value?(t.bySetPosition=[w.value],t.byWeekDay=_r(S.value)):t.byWeekDay=[{day:S.value,offset:w.value}]),N(t)}),[N,p,R,S]),B=f.useCallback((e=>{const t=Object.assign({},p),r=e.value;if(t.byWeekDay)switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[r.value];break;case 1:t.byWeekDay[0].offset=r.value}N(t)}),[N,p]);return f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},r.toLanguageString(nt,At[nt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(br,{value:k,data:v,onChange:z}))),"never"!==k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ir(k)+"RepeatEvery")),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.NumericTextBox,{min:1,step:1,defaultValue:1,value:p.interval,onChange:L,id:"interval-editor",className:"k-recur-interval"})," ",f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ir(k)+"Interval")))),"weekly"===k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(lt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Nr,{data:A,value:(p.byWeekDay||[]).map((({day:e})=>e)),onChange:P}))),"monthly"===k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{key:"recurrence-repeat-on-monthly-label",className:"k-form-label"},u(st,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,onChange:G,item:Lr,className:"k-reset",data:[{value:"monthday",label:u(ot,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:"monthday"!==_,value:p&&p.byMonthDay&&p.byMonthDay[0],onChange:H,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(h.DropDownList,{key:"weekday-value",disabled:"weekday"!==_,value:S,data:D,onChange:W,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),"yearly"===k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,null,u(it,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,item:Lr,onChange:G,className:"k-reset",data:[{value:"monthday",label:" ",children:[f.createElement(h.DropDownList,{key:"monthday-month",disabled:"monthday"!==_,value:b,data:C,textField:"text",dataItemKey:"value",onChange:K,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:"monthday"!==_,value:R,onChange:H,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-1"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:S,data:D,onChange:W,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-2"}," "),f.createElement("span",{key:"yearly-weekday-of-label"},u(ct,!0)),f.createElement(f.Fragment,{key:"yearly-separator-3"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:b,data:C,onChange:K,style:{width:"auto"}})]}]}))),"never"!==k&&f.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(mt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{item:Lr,value:T,onChange:V,data:[{value:"never",label:u(pt,!0)},{value:"count",label:u(dt,!0),children:[f.createElement(f.Fragment,{key:"separator-1"}," "),f.createElement(E.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",className:"k-recur-count",min:1,width:"auto",value:"count"===T?p.count:l,onChange:O,disabled:"count"!==T}),f.createElement(f.Fragment,{key:"separator-2"}," "),f.createElement(g.Label,{key:"endrule-after-label",className:"k-radio-label",editorId:"k-endrule-after"},u(ut,!0))]},{value:"until",label:u(gt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(c.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:"until"!==T,min:e.start,value:"until"===T?x:a.toLocalDate(i),onChange:F,width:"auto"})]}]})))))},Lr=e=>f.createElement("li",{...e},e.children),Or={value:""};zr.displayName="KendoReactSchedulerRepeatEditor";const Fr=e=>{const{as:t=Hr.as,value:r,onChange:a,...n}=e,{timezone:l}=ae();return f.createElement(t,{...n,value:Pr(r,l),onChange:e=>{a&&a({value:Wr(e.target.value,l)})}})},Pr=(e,t)=>{if(e){const r=a.toLocalDate(a.ZonedDate.fromLocalDate(e,t).toUTCDate());return r.setUTCFullYear(e.getFullYear()),r}return e},Wr=(e,t)=>{if(e){const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),a.ZonedDate.fromUTCDate(r,t).toLocalDate()}return e},Hr={as:c.DateTimePicker},Kr=f.forwardRef(((e,t)=>{const r=f.useRef(null),l=f.useRef(null),s=a.timezoneNames(),i=o.useLocalization(),d=se(),{resources:u,timezone:p}=ae();f.useImperativeHandle(l,(()=>{var t;return{element:null!=(t=r.current)&&t.element?r.current.element:r.current,props:e}})),f.useImperativeHandle(t,(()=>l.current));const{as:E=Vr.as,...h}=e,{titleLabel:y=Vr.titleLabel,titleError:v=Vr.titleError,titleEditor:k=Vr.titleEditor,startLabel:D=Vr.startLabel,startError:S=Vr.startError,startEditor:C=Vr.startEditor,startTimezoneLabel:b=Vr.startTimezoneLabel,startTimezoneError:I=Vr.startTimezoneError,startTimezoneEditor:w=Vr.startTimezoneEditor,startTimezoneCheckedLabel:T=Vr.startTimezoneCheckedLabel,startTimezoneCheckedEditor:R=Vr.startTimezoneCheckedEditor,endLabel:x=Vr.endLabel,endError:A=Vr.endError,endEditor:_=Vr.endEditor,endTimezoneLabel:N=Vr.endTimezoneLabel,endTimezoneError:M=Vr.endTimezoneError,endTimezoneEditor:z=Vr.endTimezoneEditor,endTimezoneCheckedLabel:L=Vr.endTimezoneCheckedLabel,endTimezoneCheckedEditor:O=Vr.endTimezoneCheckedEditor,allDayLabel:F=Vr.allDayLabel,allDayEditor:P=Vr.allDayEditor,recurrenceEditor:W=Vr.recurrenceEditor,descriptionLabel:H=Vr.descriptionLabel,descriptionEditor:K=Vr.descriptionEditor,descriptionError:V=Vr.descriptionError,resourceLabel:G=Vr.resourceLabel,resourceEditor:B=Vr.resourceEditor}=e,U=e.valueGetter(d.start)||new Date,Z=e.valueGetter(d.startTimezone)||p||"",$=e.valueGetter(d.endTimezone)||p||"",q=f.useMemo((()=>i.toLanguageString(It,At[It])),[i]),[Y,j]=f.useState(!!e.valueGetter(d.startTimezone)),[X,Q]=f.useState(!!e.valueGetter(d.endTimezone)),J=f.useCallback((t=>{t.value||(e.onChange(d.startTimezone,{value:null}),e.onChange(d.endTimezone,{value:null}),Q(t.value)),j(t.value)}),[e.onChange,d.startTimezone,d.endTimezone]),ee=f.useCallback((t=>{t.value||e.onChange(d.endTimezone,{value:null}),Q(t.value)}),[e.onChange]),te=f.useCallback((e=>e?void 0:q),[q]),re=f.useCallback(((e,t)=>Y?te(t(d.startTimezone)):void 0),[te,Y,d.startTimezone]),ne=f.useCallback(((e,t)=>Y&&X?te(t(d.endTimezone))||te(t(d.startTimezone)):void 0),[te,Y,X,d.startTimezone,d.endTimezone]),le=f.useMemo((()=>n.classNames("k-scheduler-edit-form",e.className)),[e.className]);return f.createElement(E,{ref:E===Vr.as?r:void 0,...h,className:le},f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.title,component:y,editorId:"k-scheduler-editor-title",className:"k-form-label"},i.toLanguageString(Ye,At[Ye])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-title",name:d.title,field:d.title,component:k}),e.errors[d.title]&&f.createElement(m.Field,{name:d.title,component:v},e.errors[d.title]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:D,editorId:"k-scheduler-editor-start",className:"k-form-label"},i.toLanguageString(je,At[je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-start",name:d.start,width:"auto",component:C,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.start]&&f.createElement(m.Field,{name:d.start,component:S},e.errors[d.start]))),f.createElement(m.FieldWrapper,null,f.createElement(T,{className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(R,{id:"k-scheduler-editor-set-start-timezone",onChange:J,value:Y}),f.createElement(T,{className:"k-checkbox-label",editorId:"k-scheduler-editor-set-start-timezone"},i.toLanguageString(at,At[at])))),Y&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:b,className:"k-form-label"},i.toLanguageString(Xe,At[Xe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:w,value:Z,validator:re,data:s,name:d.startTimezone}),e.errors[d.startTimezone]&&f.createElement(m.Field,{name:d.startTimezone,component:I},e.errors[d.startTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.end,component:x,editorId:"k-scheduler-editor-end",className:"k-form-label"},i.toLanguageString(Qe,At[Qe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-end",name:d.end,width:"auto",component:_,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.end]&&f.createElement(m.Field,{name:d.end,component:A},e.errors[d.end]))),Y&&f.createElement(m.FieldWrapper,null,f.createElement("div",{className:"k-form-field-wrap"},f.createElement(O,{id:"k-scheduler-editor-set-end-timezone",onChange:ee,value:X})),f.createElement(L,{editorId:"k-scheduler-editor-set-end-timezone",className:"k-form-label"},i.toLanguageString(rt,At[rt]))),X&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.endTimezone,component:N,className:"k-form-label"},i.toLanguageString(Je,At[Je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{value:$,data:s,validator:ne,component:z,name:d.endTimezone}),e.errors[d.endTimezone]&&f.createElement(m.Field,{name:d.endTimezone,component:M},e.errors[d.endTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.isAllDay,component:g.Label,className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-is-allday-checkbox",name:d.isAllDay,component:P}),f.createElement(m.Field,{name:d.isAllDay,field:d.isAllDay,editorId:"k-is-allday-checkbox",className:"k-checkbox-label",component:F},i.toLanguageString(et,At[et])))),f.createElement("div",{className:"k-recurrence-editor"},f.createElement(m.Field,{component:W,field:d.recurrenceRule,name:d.recurrenceRule,start:U})),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.description,component:H,className:"k-form-label"},i.toLanguageString(tt,At[tt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:K,name:d.description,rows:1,id:"k-event-description"}),e.errors[d.description]&&f.createElement(m.Field,{name:d.description,component:V},e.errors[d.description]))),(u||[]).map((e=>f.createElement(m.FieldWrapper,{key:e.field},f.createElement(m.Field,{name:e.field,component:G,className:"k-form-label"}),f.createElement(g.Label,{className:"k-form-label"},e.name),f.createElement(m.Field,{name:e.field,component:B,resource:e,multiple:e.multiple,data:e.data,textField:e.textField,valueField:e.valueField,colorField:e.colorField}))))))})),Vr={as:f.forwardRef(((e,t)=>f.createElement(m.FormElement,{ref:t,id:e.id,style:e.style,tabIndex:e.tabIndex,className:e.className,horizontal:e.horizontal,children:e.children}))),titleLabel:g.Label,titleError:g.Error,titleEditor:E.Input,startLabel:g.Label,startError:g.Error,startEditor:Fr,startTimezoneLabel:g.Label,startTimezoneError:g.Error,startTimezoneEditor:Cr,startTimezoneCheckedLabel:g.Label,startTimezoneCheckedEditor:E.Checkbox,endLabel:g.Label,endError:g.Error,endEditor:Fr,endTimezoneLabel:g.Label,endTimezoneError:g.Error,endTimezoneEditor:Cr,endTimezoneCheckedLabel:g.Label,endTimezoneCheckedEditor:E.Checkbox,allDayLabel:g.Label,allDayEditor:E.Checkbox,recurrenceEditor:zr,descriptionLabel:g.Label,descriptionEditor:E.TextArea,descriptionError:g.Error,resourceLabel:g.Label,resourceEditor:e=>{const t=e.multiple?h.MultiSelect:h.DropDownList,r=f.useCallback((t=>{const r=t.target.props.dataItemKey,a=e.multiple?(t.target.value||[]).map((e=>e[r])):t.target.value[r];e.onChange.call(void 0,{value:a})}),[e.multiple,e.onChange]),a=f.useCallback(((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r.dataItem[e.colorField],marginRight:M(r.dataItem[e.valueField])?"8px":"4px"}}," "),f.createElement("span",{key:2}," ",t.props.children));return f.cloneElement(t,{...t.props},a)}),[e.colorField,e.valueField]),n=f.useCallback(((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&r&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r[e.colorField],marginRight:r[e.valueField]?"8px":"4px"}}," "),t.props.children);return f.cloneElement(t,{},a)}),[e.colorField,e.valueField]),l=Array.isArray(e.value)?e.data.filter((t=>e.value.some((r=>t[e.valueField]===r)))):e.data.find((t=>t[e.valueField]===e.value));return f.createElement(t,{value:l,onChange:r,data:e.data,textField:e.textField,dataItemKey:e.valueField,valid:e.valid,validationMessage:e.validationMessage,itemRender:a,valueRender:n})}};Kr.displayName="KendoReactSchedulerFormEditor";const Gr=f.forwardRef(((e,t)=>{const{onCancel:r,onClose:a,onSubmit:l,editor:c,dialog:i=Br.dialog,validator:u=Br.validator,...g}=e,E=f.useRef(null);f.useImperativeHandle(E,(()=>({props:e}))),f.useImperativeHandle(t,(()=>E.current));const h=o.useLocalization(),y=se(),v=f.useMemo((()=>h.toLanguageString(It,At[It])),[h]),D=f.useMemo((()=>h.toLanguageString(Tt,At[Tt])),[h]),S=f.useMemo((()=>h.toLanguageString(Ze,At[Ze])),[h]),C=f.useMemo((()=>h.toLanguageString($e,At[$e])),[h]),b=f.useMemo((()=>h.toLanguageString(qe,At[qe])),[h]),I=f.useMemo((()=>h.toLanguageString(wt,At[wt])),[h]),w=f.useCallback((e=>{r&&r.call(void 0,{value:null,syntheticEvent:e,target:E.current})}),[r]),T=f.useCallback((({syntheticEvent:e})=>{a&&a.call(void 0,{value:null,syntheticEvent:e,target:E.current})}),[a]),R=f.useCallback(((e,t)=>{l&&l.call(void 0,{value:e,syntheticEvent:t,target:E.current})}),[l]),x=f.useCallback(((e,t)=>e&&t(y.end)&&e.getTime()>t(y.end).getTime()?I:void 0),[y,I]),A=f.useCallback(((e,t)=>e&&t(y.start)&&e.getTime()<t(y.start).getTime()?D:void 0),[y,D]),_=f.useCallback((e=>e?void 0:v),[v]),N=f.useCallback(((e,t)=>{const r={};r[y.start]=[_(t(y.start)),x(t(y.start),t)].filter(Boolean).reduce(((e,t)=>e||t),""),r[y.end]=[_(t(y.start)),A(t(y.start),t)].filter(Boolean).reduce(((e,t)=>e||t),"");const a=u(e,t);return{...r,...a}}),[A,y.end,y.start,_,x,u]);return n.canUseDOM?k.createPortal(f.createElement(m.Form,{initialValues:e.dataItem,onSubmit:R,validator:N,render:e=>f.createElement(i,{title:b,minWidth:400,onClose:T,className:"k-scheduler-edit-dialog"},f.createElement(Kr,{...e,as:c}),f.createElement(p.DialogActionsBar,{layout:"start"},f.createElement(s.Button,{themeColor:"primary",disabled:!e.allowSubmit,onClick:e.onSubmit,icon:"save",svgIcon:d.saveIcon},S),f.createElement(s.Button,{onClick:w,icon:"cancel",svgIcon:d.cancelIcon},C))),...g}),document&&document.body):null})),Br={dialog:p.Dialog,validator:()=>({})};Gr.displayName="KendoReactSchedulerForm";const Ur=f.forwardRef(((e,t)=>{const{onFocus:r,onBlur:a,onClick:l,onMouseEnter:o,onMouseLeave:s,onMouseOut:c,onMouseOver:i,onDoubleClick:d,onKeyDown:u,onKeyPress:m,onKeyUp:p}=e,{slot:g,element:E}=((e,t)=>{const{_ref:r}=e,a=f.useRef(null),l=f.useRef(null),[,o]=Wt();return f.useImperativeHandle(a,(()=>({element:l.current,props:e}))),f.useImperativeHandle(t,(()=>a.current)),f.useImperativeHandle(r,(()=>a.current)),f.useLayoutEffect((()=>(o({type:n.COLLECTION_ACTION.add,item:a}),()=>{o({type:n.COLLECTION_ACTION.remove,item:a})}))),{slot:a,element:l}})(e,t),h=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,y=f.useMemo((()=>{var t,r;const a=null!=(t=e.isWorkHour)?t:Zr.isWorkHour,l=null!=(r=e.isWorkDay)?r:Zr.isWorkDay;return n.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!a||!l,"k-selected":e.selected})}),[e.className,e.selected,e.isWorkHour,e.isWorkDay]),v=f.useMemo((()=>({userSelect:"none",...e.style})),[e.style]),k=f.useCallback((e=>{r&&r.call(void 0,{syntheticEvent:e,target:g.current})}),[r,g]),D=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,target:g.current})}),[a,g]),S=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,target:g.current})}),[l,g]),C=f.useCallback((e=>{i&&i.call(void 0,{syntheticEvent:e,target:g.current})}),[i,g]),b=f.useCallback((e=>{c&&c.call(void 0,{syntheticEvent:e,target:g.current})}),[c,g]),I=f.useCallback((e=>{o&&o.call(void 0,{syntheticEvent:e,target:g.current})}),[o,g]),w=f.useCallback((e=>{s&&s.call(void 0,{syntheticEvent:e,target:g.current})}),[s,g]),T=f.useCallback((e=>{d&&d.call(void 0,{syntheticEvent:e,target:g.current})}),[d,g]),R=f.useCallback((e=>{u&&u.call(void 0,{syntheticEvent:e,target:g.current})}),[u,g]),x=f.useCallback((e=>{m&&m.call(void 0,{syntheticEvent:e,target:g.current})}),[m,g]),A=f.useCallback((e=>{p&&p.call(void 0,{syntheticEvent:e,target:g.current})}),[p,g]);return f.createElement("div",{ref:E,id:e.id,style:v,className:y,tabIndex:h,"aria-selected":e.selected||void 0,onFocus:k,onBlur:D,onClick:S,onMouseEnter:I,onMouseLeave:w,onMouseOver:C,onMouseOut:b,onDoubleClick:T,onKeyDown:R,onKeyPress:x,onKeyUp:A,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)})),Zr={isWorkHour:!0,isWorkDay:!0};Ur.displayName="KendoReactSchedulerSlot";const $r=f.forwardRef(((e,t)=>{var r;const{slot:a,_ref:l,...o}=e,s=a||qr.slot,c=f.useRef(null),i=f.useRef(null);return f.useImperativeHandle(c,(()=>({props:e}))),f.useImperativeHandle(l,(()=>i.current)),f.useImperativeHandle(t,(()=>c.current)),((e,t)=>{const r=f.useRef(void 0),a=f.useRef(0),l=te(),o=f.useCallback((()=>{if(!t||!e.current)return;const r=e.current.element,n=e.current.props;if(!r)return;const l=I(r),o=new Map,s=n.items.filter((e=>e._ref.current));s.forEach((e=>{var t,r,a;if(!e._ref.current)return;const{height:n}=b(e._ref.current.element),l=null!=(r=null==(t=e._ref.current)?void 0:t._order)?r:-1;(null!=(a=o.get(l))?a:0)<n&&o.set(l,n)}));const c=Array.from(o.values()).reduce(((e,t)=>e+t),0),i=1*s.length*2+c-(l||0)+("object"==typeof t&&t.offsetTop?t.offsetTop:0)+("object"==typeof t&&t.offsetBottom?t.offsetBottom:0);s.length?i>a.current-l&&w(r,{height:i},!0):r&&(r.style.minHeight="")}),[t,e]),s=f.useCallback((()=>{void 0!==r.current&&window.cancelAnimationFrame(r.current),r.current=window.requestAnimationFrame((()=>{o()}))}),[o]);n.useIsomorphicLayoutEffect((()=>{if(!e.current)return;const t=e.current.element;t&&(a.current=t.clientHeight)}),[]),f.useEffect(o,[e,e.current&&e.current.props,t]),f.useEffect((()=>{if(!e.current)return;const t=e.current.props.items.filter((e=>e._ref.current)).map((e=>{if(!e._ref.current||!e._ref.current.element||!l.current)return;const t=window.ResizeObserver,r=t&&new t(s);return r&&r.observe(e._ref.current.element),()=>{r&&r.disconnect()}}));return()=>{t.forEach((e=>e&&e()))}}),[s,l,e])})(i,null!=(r=e.expandable)?r:qr.expandable),f.createElement(s,{...o,_ref:i})})),qr={slot:Ur,expandable:!1};$r.displayName="KendoReactSchedulerViewSlot";const Yr=f.createContext([null]);Yr.displayName="SchedulerEditSlotPropsContext";const jr=f.createContext([null]);jr.displayName="SchedulerEditSlotFormItemContext";const Xr=({props:e,form:t,children:r})=>f.createElement(Yr.Provider,{value:e},f.createElement(jr.Provider,{value:t},r)),Qr=e=>{const t=f.useContext(re),r=void 0!==e?e:t.editable||!1,a=!0===r||void 0!==r&&!1!==r&&!0===r.edit,n=!0===r||void 0!==r&&!1!==r&&!0===r.resize,l=!0===r||void 0!==r&&!1!==r&&!0===r.remove,o=!0===r||void 0!==r&&!1!==r&&!0===r.drag;return{add:!0===r||void 0!==r&&!1!==r&&!0===r.add,edit:a,drag:o,remove:l,resize:n,select:!0===r||void 0!==r&&!1!==r&&!0===r.select}},Jr=f.forwardRef(((e,t)=>{const{_ref:r,onDataAction:a,viewSlot:l,form:o,formItem:s,onFormItemChange:c,...i}=e,[d,u]=f.useState(e.tabIndex),m=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(p,(()=>({props:e}))),f.useImperativeHandle(t,(()=>p.current)),f.useImperativeHandle(r,(()=>m.current));const g=Qr(e.editable),E=se(),[h]=Wt(),[y]=Kt(),[v,k]=f.useContext(Vt),[,D]=$t(),S=o||ea.form,C=l||ea.viewSlot,[b,I]=Ce(null,s,e.onFormItemChange),w=v.some((t=>!(!t.current||t.current.props.start.getTime()!==e.start.getTime()||t.current.props.end.getTime()!==e.end.getTime()||t.current.props.index!==e.index||t.current.props.group.index!==e.group.index||t.current.props.range.index!==e.range.index||t.current.props.isAllDay!==e.isAllDay))),T=f.useCallback((()=>{const t={};if(N(t,E.start,new Date(e.start.getTime())),N(t,E.end,new Date(e.end.getTime())),N(t,E.isAllDay,e.isAllDay),e.group.resources.length)for(let r=0;r<e.group.resources.length;r++){const a=e.group.resources[r];if(x(e.group.resources)){const n=_(e.group.resources[r],a.valueField);N(t,a.field,a.multiple?[n]:n)}else N(t,a.field,a.multiple?[]:void 0)}return t}),[E.start,E.end,E.isAllDay,e.start,e.end,e.isAllDay,e.group.resources]),R=f.useCallback((t=>{g.select&&k({type:jt.select,slot:m},t.syntheticEvent),e.onFocus&&e.onFocus.call(void 0,t)}),[k,g.select,e.onFocus]),A=f.useCallback((t=>{if(g.add){const e=T();I(e,t)}e.onDoubleClick&&e.onDoubleClick.call(void 0,t)}),[T,g.add,e.onDoubleClick,I]),M=f.useCallback((e=>{let t;switch(e.syntheticEvent.keyCode){case n.Keys.left:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.left,slot:m},e.syntheticEvent);break;case n.Keys.right:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.right,slot:m},e.syntheticEvent);break;case n.Keys.up:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.up,slot:m},e.syntheticEvent);break;case n.Keys.down:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.down,slot:m},e.syntheticEvent);break;case n.Keys.enter:{if(!h||!g.add)return;const e=T();I(e);break}case n.Keys.tab:t=(e=>{const t=e.props.items.find((e=>0===e.order))||e.props.items[0];return t&&t._ref.current})(e.target)}t&&(e.syntheticEvent.preventDefault(),t.element&&t.element.focus())}),[T,D,g.add,I,h]),z=f.useCallback((e=>{a&&a.call(void 0,{type:J.create,series:!1,dataItem:e.value},e),I(null,e.syntheticEvent)}),[a,I]),L=f.useCallback((e=>{I(null,e.syntheticEvent)}),[I]),O=f.useCallback((e=>{I(null,e)}),[I]),F=f.useCallback(((e,t)=>{I&&I(e,t)}),[I]);return f.useEffect((()=>{const t=h.length&&h[0].current===m.current;u(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===v.length&&t&&0===y.length?0:void 0)}),[y,e.tabIndex,v.length,h]),f.createElement(Xr,{props:e,form:[b,F]},f.createElement(C,{...i,_ref:m,selected:w,tabIndex:d,onFocus:R,onDoubleClick:A,onKeyDown:M}),b&&f.createElement(S,{dataItem:b,onSubmit:z,onClose:O,onCancel:L}))})),ea={viewSlot:$r,form:Gr};Jr.displayName="KendoReactSchedulerEditSlot";const ta=f.forwardRef(((e,t)=>{const{isRemove:r,onClose:a,onSeriesClick:l,onOccurrenceClick:c}=e,i=f.useRef(null);f.useImperativeHandle(i,(()=>({props:e}))),f.useImperativeHandle(t,(()=>i.current));const d=o.useLocalization(),u=e=>d.toLanguageString(e,At[e]),m=u(Ve),g=u(Ge),E=u(Be),h=u(Ue),y=u(vt),v=u(ft),D=u(Dt),S=u(yt),C=r?D:h,b=r?S:E,I=r?y:m,w=r?v:g,T=f.useCallback((({syntheticEvent:e})=>{a&&a.call(void 0,{syntheticEvent:e,value:null,target:i.current})}),[a]),R=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,value:null,target:i.current})}),[l]),x=f.useCallback((e=>{c&&c.call(void 0,{syntheticEvent:e,value:null,target:i.current})}),[c]);return n.canUseDOM?k.createPortal(f.createElement(p.Dialog,{title:C,onClose:T},b,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:x},I),f.createElement(s.Button,{onClick:R},w))),document&&document.body):null}));ta.displayName="KendoReactSchedulerSchedulerOccurrenceDialog";const ra=f.forwardRef(((e,t)=>{const{onClose:r,onCancel:a,onConfirm:l}=e,c=f.useRef(null);f.useImperativeHandle(c,(()=>({props:e}))),f.useImperativeHandle(t,(()=>c.current));const i=o.useLocalization(),d=i.toLanguageString($e,At[$e]),u=i.toLanguageString(Et,At[Et]),m=i.toLanguageString(ht,At[ht]),g=i.toLanguageString(kt,At[kt]),E=f.useCallback((({syntheticEvent:e})=>{if(!r)return;const t={syntheticEvent:e,value:null,target:c.current};r.call(void 0,t)}),[r]),h=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,value:null})}),[a]),y=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,value:null})}),[l]);return n.canUseDOM?k.createPortal(f.createElement(p.Dialog,{title:g,onClose:E},m,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:h},d),f.createElement(s.Button,{onClick:y},u))),document&&document.body):null}));ra.displayName="KendoReactSchedulerRemoveDialog";const aa=f.forwardRef(((e,t)=>{const{onFocus:r,onBlur:a,onMouseDown:l,onClick:s,onMouseUp:c,onMouseOut:i,onMouseOver:u,onMouseEnter:m,onMouseLeave:p,onDoubleClick:g,onRemoveClick:E,onKeyUp:h,onKeyDown:y,onKeyPress:v,onPress:k,onDrag:D,onRelease:S,onResizePress:C,onResizeEndDrag:b,onResizeRelease:I,onResizeStartDrag:w}=e,{item:T,element:R}=((e,t)=>{const{_ref:r,itemRef:a,_maxSiblingsPerSlot:l,_siblings:o,_order:s}=e,c=f.useRef(null),i=f.useRef(null),[,d]=Kt();return f.useImperativeHandle(c,(()=>({element:i.current,props:e,get _maxSiblingsPerSlot(){return null==l?void 0:l.current},set _maxSiblingsPerSlot(e){var t;null!=e&&void 0!==l&&void 0!==l.current&&(l.current=e,null==(t=null==o?void 0:o.current)||t.forEach((t=>{var r;!t||t._maxSiblingsPerSlot===e||e<(null!=(r=t._maxSiblingsPerSlot)?r:0)||(t._maxSiblingsPerSlot=e)})))},get _order(){return null==s?void 0:s.current},set _order(e){void 0!==e&&void 0!==s&&void 0!==s.current&&(s.current=e)}}))),f.useImperativeHandle(t,(()=>c.current)),f.useImperativeHandle(r,(()=>c.current)),f.useImperativeHandle(a,(()=>c.current)),n.useIsomorphicLayoutEffect((()=>(d({type:n.COLLECTION_ACTION.add,item:c}),()=>{d({type:n.COLLECTION_ACTION.remove,item:c})}))),{item:c,element:i}})(e,t),x=n.useDir(R),A=f.useRef(null),_=f.useRef(null),N=f.useRef(null),M=f.useRef(null),z=Qr(e.editable),L=o.useInternationalization(),O=o.useLocalization().toLanguageString(Fe,At[Fe]),F=e.group.resources.find((e=>!(!e.colorField||""===e[e.colorField]||void 0===e[e.colorField]))),P=F&&F.colorField&&F[F.colorField],W=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,H=f.useMemo((()=>n.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&z.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className)),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,z.select]),K=f.useMemo((()=>`${function(e,t,r,a){return a?`${e.formatDate(t,{skeleton:"yMMMMEEEEd"})}`:`${e.formatDate(t,{skeleton:"yMMMMEEEEdhm"})}–${e.formatDate(r,"t")}`}(L,e.zonedStart,e.zonedEnd,e.isAllDay)}, ${e.title}`),[L,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),V=f.useMemo((()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:P,backgroundColor:e.resizeHint?void 0:P,touchAction:"none",...e.style})),[P,e.style,e.resizeHint]),G=f.useCallback((e=>{r&&r.call(void 0,{syntheticEvent:e,target:T.current})}),[r,T]),B=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,target:T.current})}),[a,T]),U=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,target:T.current})}),[l,T]),Z=f.useCallback((e=>{s&&s.call(void 0,{syntheticEvent:e,target:T.current})}),[s,T]),$=f.useCallback((e=>{c&&c.call(void 0,{syntheticEvent:e,target:T.current})}),[c,T]),q=f.useCallback((e=>{u&&u.call(void 0,{syntheticEvent:e,target:T.current})}),[u,T]),Y=f.useCallback((e=>{i&&i.call(void 0,{syntheticEvent:e,target:T.current})}),[i,T]),j=f.useCallback((e=>{m&&m.call(void 0,{syntheticEvent:e,target:T.current})}),[m,T]),X=f.useCallback((e=>{p&&p.call(void 0,{syntheticEvent:e,target:T.current})}),[p,T]),Q=f.useCallback((e=>{g&&g.call(void 0,{syntheticEvent:e,target:T.current})}),[g,T]),J=f.useCallback((e=>{E&&E.call(void 0,{syntheticEvent:e,target:T.current})}),[E,T]),ee=f.useCallback((e=>{y&&y.call(void 0,{syntheticEvent:e,target:T.current})}),[y,T]),te=f.useCallback((e=>{v&&v.call(void 0,{syntheticEvent:e,target:T.current})}),[v,T]),re=f.useCallback((e=>{h&&h.call(void 0,{syntheticEvent:e,target:T.current})}),[h,T]),ae=f.useCallback((e=>{k&&k.call(void 0,{dragEvent:e,target:T.current})}),[k,T]),ne=f.useCallback((e=>{D&&D.call(void 0,{dragEvent:e,target:T.current})}),[D,T]),le=f.useCallback((e=>{S&&S.call(void 0,{dragEvent:e,target:T.current})}),[S,T]),oe=f.useCallback((e=>{C&&C.call(void 0,{dragEvent:e,target:T.current})}),[C,T]),se=f.useCallback((e=>{w&&w.call(void 0,{dragEvent:e,target:T.current})}),[w,T]),ce=f.useCallback((e=>{b&&b.call(void 0,{dragEvent:e,target:T.current})}),[b,T]),ie=f.useCallback((e=>{I&&I.call(void 0,{dragEvent:e,target:T.current})}),[I,T]);return n.useDraggable(R,{onPress:ae,onDrag:ne,onRelease:le}),n.useDraggable(A,{onPress:oe,onDrag:ce,onRelease:ie}),n.useDraggable(_,{onPress:oe,onDrag:se,onRelease:ie}),n.useDraggable(N,{onPress:oe,onDrag:se,onRelease:ie}),n.useDraggable(M,{onPress:oe,onDrag:ce,onRelease:ie}),f.createElement("div",{ref:R,id:e.id,style:V,tabIndex:W,className:H,role:"button","aria-label":K,onFocus:G,onBlur:B,onMouseUp:$,onMouseDown:U,onClick:Z,onMouseOver:q,onMouseOut:Y,onMouseEnter:j,onMouseLeave:X,onDoubleClick:Q,onKeyDown:ee,onKeyPress:te,onKeyUp:re,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},z.remove&&f.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:O,"aria-label":O,onClick:J},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})),e.head&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-left":"caret-alt-right",icon:"rtl"===x?d.caretAltLeftIcon:d.caretAltRightIcon})),z.resize&&e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-n",ref:N}),f.createElement("span",{className:"k-resize-handle k-resize-s",ref:M})),z.resize&&!e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-w",ref:_}),f.createElement("span",{className:"k-resize-handle k-resize-e",ref:A})),e.resizeHint&&f.createElement(f.Fragment,null,f.createElement("div",{className:"k-marquee-color",style:{borderColor:P,backgroundColor:P}}),f.createElement("div",{className:"k-marquee-text"},!e.tail&&f.createElement("div",{className:"k-label-top"},L.formatDate(e.zonedStart,e.format)),!e.head&&f.createElement("div",{className:"k-label-bottom"},L.formatDate(e.zonedEnd,e.format)))))}));aa.displayName="KendoReactSchedulerItem";const na=f.forwardRef(((e,t)=>{const r=f.useMemo((()=>n.classNames("k-event-template",e.className)),[e.className]);return f.createElement("div",{ref:t,...e,className:r})})),la=(e,t)=>{const{element:r}=e;f.useEffect((()=>{if(!r||!e.syncHeight)return;const t=[[]];Array.from(r.querySelectorAll(e.selector)).filter((t=>!t.classList.contains((e=>e.slice(1,e.length))(e.applyTo)))).forEach((r=>{const a=r.clientHeight,n=r.getAttribute(e.horizontalAttribute),l=r.getAttribute(e.verticalAttribute);null===n||null===l||(t[n]||(t[n]=[]),(!t[n][l]||a>t[n][l])&&(t[n][l]=a-1))})),Array.from(r.querySelectorAll(e.applyTo)).forEach((r=>{const a=r.getAttribute(e.horizontalAttribute),n=r.getAttribute(e.verticalAttribute);if(null===a||null===n)return;const l=I(r),o=t[a][n]-l;w(r,{height:o},!0)}))}),t)},oa=f.forwardRef(((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null),p=Qr(e.editable);f.useImperativeHandle(u,(()=>({props:e,element:i.current&&i.current.element}))),f.useImperativeHandle(t,(()=>u.current)),f.useImperativeHandle(a,(()=>i.current)),f.useImperativeHandle(l,(()=>i.current));const g=r||sa.item,E=o.useInternationalization(),[h]=Kt(),[y]=Wt(),v=te(),[k,D]=f.useState(!0),[S,C]=f.useState(!1),I=f.useRef(e.order),R=f.useRef(0),x=n.useDir(v),A=f.useMemo((()=>e.isAllDay?E.toString(e.zonedStart,"t"):E.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)),[E,e.isAllDay,e.zonedEnd,e.zonedStart]),_=f.useMemo((()=>`(${A}): ${e.title}`),[A,e.title]),N=(e,t)=>{let r=1;return e.forEach((e=>{const a=t.filter((t=>M(e.current.props,t.props)));a.length>r&&(r=a.length)})),r},M=(t,r)=>W(t.start,t.end,r.start,r.end)&&t.group.index===r.group.index&&t.range.index===r.range.index&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay),z=()=>{const t=(y||[]).filter((t=>t.current&&M(t.current.props,e))),r=i.current&&i.current.element,a=T(t);if(0===t.length)return void D(!1);if(!a.current||!r)return;const n=b(a.current.element),l=[],o=[],s=[];(h||[]).forEach((e=>{e.current&&(e.current.props.dragHint?o.push(e.current):e.current.props.resizeHint?s.push(e.current):l.push(e.current))})),I.current=e.dragHint||e.resizeHint?((e,t,r,a=!1)=>{let n;return r.forEach((r=>{const l=[];t.sort(((e,t)=>e.props.start.getTime()-t.props.start.getTime())).forEach((t=>{if((a||t.props.isAllDay===r.current.props.isAllDay)&&t.props.range.index===r.current.props.range.index&&t.props.group.index===r.current.props.group.index&&W(t.props.start,t.props.end,r.current.props.start,r.current.props.end)){const r=G(l);t===e&&void 0===n&&(n=r),l.splice(r,0,r)}}))})),n})(i.current,e.dragHint?o:s,t,e.ignoreIsAllDay):e.order||0;let c=e.dragHint||e.resizeHint?N(t,e.dragHint?o:s):N(t,l);const d=((e,t)=>e.map((e=>t.filter((t=>M(e.current.props,t.props))))))(t,l);let u=0;if(d.forEach((t=>{let a=0;t.forEach((t=>{W(t.props.start,t.props.end,e.start,e.end)&&!e.dragHint&&!e.resizeHint&&t._maxSiblingsPerSlot&&t._maxSiblingsPerSlot>c&&t.element!==r&&(c=t._maxSiblingsPerSlot);const l=b(t.element);null!==t.props.order&&t.props.order<I.current&&(a=l.top+l.height-n.top-1*I.current+1)})),a>u&&(u=a)})),0===t.length)return void D(!1);const m=p.add?20:0;n.width=e.vertical?n.width/c-1-m/c:n.width*t.length-1,n.height=e.vertical?n.height*t.length-1:(e.resizeHint||e.dragHint)&&c<=1?n.height:e.style&&e.style.height?e.style.height:25,n.left=e.vertical?n.left+I.current*n.width+1*I.current:n.left,n.top=e.vertical?n.top:n.top+u+1*I.current,R.current=c,w(r,n),C(!0),D(!0)},L=f.useCallback((e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame((()=>{z()}))),m.current={width:t.contentRect.width,height:t.contentRect.height}}),[z]);f.useEffect(z);const O=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return la({element:O,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect((()=>{if(!v.current)return;const e=window.ResizeObserver,t=e&&new e(L);return t&&t.observe(v.current),()=>{t&&t.disconnect()}}),[L,v]),f.createElement(g,{...s,_ref:i,_maxSiblingsPerSlot:R,_order:I,itemRef:i,style:{visibility:S?void 0:"hidden",display:k?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-right":"caret-alt-left",icon:"rtl"===x?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon})),!e.resizeHint&&f.createElement("div",{title:_},!e.isAllDay&&f.createElement(na,{className:"k-event-time"},_),f.createElement(na,null,e.title)))})),sa={item:aa};oa.displayName="KendoReactSchedulerViewItem";const ca=(e,{dateRange:t,fields:r,timezone:a})=>e.map(ia(r)).reduce(da(t,a,r),[]).filter((e=>!O(e.dataItem,r))),ia=e=>t=>({uid:n.getter(e.id||"id")(t),start:n.getter(e.start||"start")(t),startTimezone:n.getter(e.startTimezone||"startTimezone")(t),originalStart:n.getter(e.originalStart||"originalStart")(t),end:n.getter(e.end||"end")(t),endTimezone:n.getter(e.endTimezone||"endTimezone")(t),isAllDay:n.getter(e.isAllDay||"isAllDay")(t),title:n.getter(e.title||"title")(t),description:n.getter(e.description||"description")(t),occurrenceId:n.getter("occurrenceId")(t),recurrenceRule:n.getter(e.recurrenceRule||"recurrenceRule")(t),recurrenceExceptions:n.getter(e.recurrenceExceptions||"recurrenceExceptions")(t),recurrenceId:n.getter(e.recurrenceId||"recurrenceId")(t),dataItem:n.clone(t)}),da=(e,t,r)=>(a,n)=>[...a,...n.recurrenceRule&&(null===n.recurrenceId||void 0===n.recurrenceId)&&O(n.dataItem,r)?[...ua(n,{dateRange:e,timezone:t,fields:r})]:[n]],ua=(e,{dateRange:t,timezone:r,fields:l})=>{const o=e.recurrenceRule,s=y.parseRule({recurrenceRule:o});s.start||(s.start=a.ZonedDate.fromLocalDate(e.start,r)),s.end||(s.end=a.ZonedDate.fromLocalDate(e.end,r));const c=e.recurrenceExceptions;c&&(s.exceptionDates=c.map((e=>a.ZonedDate.fromLocalDate(e,r))));const i=t.zonedStart,d=t.zonedEnd,u=y.expand(s,{rangeStart:i,rangeEnd:d});return u.events.length?u.events.map(((t,r)=>{const a=n.clone(e),o=n.clone(e.dataItem);return a.recurrenceId=a.uid,N(o,l.recurrenceId,e.uid),a.originalStart=t.start.toLocalDate(),N(o,l.originalStart,t.start.toLocalDate()),a.start=t.start.toLocalDate(),N(o,l.start,t.start.toLocalDate()),a.end=t.end.toLocalDate(),N(o,l.end,t.end.toLocalDate()),a.occurrenceId=String(r),N(o,"occurrenceId",String(r)),a.dataItem=o,a})):[]},ma=(e,{timezone:t},{groups:r,ranges:n})=>{const o=[];return l.orderBy(e,[{field:"start",dir:"asc"},{field:"end",dir:"desc"},{field:"isAllDay",dir:"desc"},{field:"title",dir:"asc"},{field:"uid",dir:"asc"}]).forEach((e=>{r.forEach((l=>{const s=1===r.length?pa(e,l):l;Ea(e,s)&&n.forEach((r=>{if(ha(e,r)){const n=f.createRef(),l=f.createRef(),c=r.end<e.end,i=e.start<r.start,d=a.ZonedDate.fromLocalDate(e.start,t),u=a.ZonedDate.fromLocalDate(e.end,t),m={...e,_ref:l,itemRef:n,head:c,tail:i,order:null,zonedStart:d,zonedEnd:u,group:s,range:r,slots:[],isRecurring:!!e.recurrenceRule,isException:!e.recurrenceRule&&null!==e.recurrenceId&&void 0!==e.recurrenceId,isAllDay:!!e.isAllDay};o.push(m)}}))}))})),o},pa=(e,t)=>({index:0,resources:t.resources.filter((t=>ga(e,t)))}),ga=(e,t)=>t.multiple?(e.dataItem[t.field]||[]).some((e=>t[t.valueField]===e)):e.dataItem[t.field]===t[t.valueField],Ea=(e,t)=>!t.resources.some((t=>t.multiple?!e.dataItem[t.field].some((e=>t[t.valueField]===e)):e.dataItem[t.field]!==t[t.valueField])),ha=(e,t)=>W(t.start,t.end,e.start,e.end)&&(void 0===t.isAllDay||!!e.isAllDay==!!t.isAllDay),ya=e=>{const t=Ft(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=Wt(),s=e.viewItem||va.viewItem,c=f.useMemo((()=>ca([e.dataItem],{dateRange:l,fields:n,timezone:r})),[e.dataItem,l,n,r]),i=f.useMemo((()=>ma(c,{timezone:r},{groups:a,ranges:t})),[c,r,a,t]),d=(o||[]).map((e=>e.current.props));return U(i,d),f.createElement(f.Fragment,null,i.map(((t,r)=>f.createElement(s,{key:r,...t,item:e.item,dragHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay}))))},va={viewItem:oa,item:aa};ya.displayName="KendoReactSchedulerDrag";const fa=e=>{const t=Ft(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=Wt(),s=e.viewItem||ka.viewItem,c=f.useMemo((()=>ca([e.dataItem],{dateRange:l,fields:n,timezone:r})),[e.dataItem,l.start.getTime(),l.end.getTime(),n,r]),i=f.useMemo((()=>ma(c,{timezone:r},{groups:a,ranges:t})),[c,r,a,t]),d=(o||[]).map((e=>e.current.props));return U(i,d),f.createElement(f.Fragment,null,i.map(((t,r)=>{var a;return f.createElement(s,{key:r,...t,format:e.format,item:null!=(a=e.item)?a:ka.item,resizeHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})})))},ka={viewItem:oa,item:aa};fa.displayName="KendoReactSchedulerResize";const Da=f.createContext([null]);Da.displayName="SchedulerEditItemPropsContext";const Sa=f.createContext([null,n.noop,n.noop]);Sa.displayName="SchedulerEditItemFormItemContext";const Ca=f.createContext([null,n.noop,n.noop]);Ca.displayName="SchedulerEditItemDragItemContext";const ba=f.createContext([null,n.noop,n.noop]);ba.displayName="SchedulerEditItemResizeItemContext";const Ia=f.createContext([null,n.noop,n.noop]);Ia.displayName="SchedulerEditItemRemoveItemContext";const wa=f.createContext([!1,n.noop,n.noop]);wa.displayName="SchedulerEditItemShowRemoveDialogContext";const Ta=f.createContext([!1,n.noop,n.noop]);Ta.displayName="SchedulerEditItemShowOccurrenceDialogContext";const Ra=({props:e,form:t,drag:r,resize:a,remove:n,showRemoveDialog:l,showOccurrenceDialog:o,children:s})=>f.createElement(Da.Provider,{value:e},f.createElement(Sa.Provider,{value:t},f.createElement(Ca.Provider,{value:r},f.createElement(ba.Provider,{value:a},f.createElement(Ia.Provider,{value:n},f.createElement(wa.Provider,{value:l},f.createElement(Ta.Provider,{value:o},s)))))));var xa=(e=>(e.set="FORM_ITEM_SET",e.setMaster="FORM_ITEM_SET_MASTER",e.reset="FORM_ITEM_RESET",e.complete="FORM_ITEM_COMPLETE",e))(xa||{});var Aa=(e=>(e.set="SHOW_OCCURRENCE_DIALOG_SET",e.open="SHOW_OCCURRENCE_DIALOG_OPEN",e.close="SHOW_OCCURRENCE_DIALOG_CLOSE",e.reset="SHOW_OCCURRENCE_DIALOG_RESET",e.toggle="SHOW_OCCURRENCE_DIALOG_TOGGLE",e))(Aa||{});var _a=(e=>(e.set="REMOVE_ITEM_SET",e.reset="REMOVE_ITEM_RESET",e.complete="REMOVE_ITEM_COMPLETE",e))(_a||{});var Na=(e=>(e.set="SHOW_REMOVE_DIALOG_SET",e.open="SHOW_REMOVE_DIALOG_OPEN",e.close="SHOW_REMOVE_DIALOG_CLOSE",e.reset="SHOW_REMOVE_DIALOG_RESET",e.toggle="SHOW_REMOVE_DIALOG_TOGGLE",e))(Na||{});var Ma=(e=>(e.set="DRAG_ITEM_SET",e.start="DRAG_ITEM_START",e.drag="DRAG_ITEM_DRAG",e.complete="DRAG_ITEM_COMPLETE",e.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="DRAG_ITEM_COMPLETE_SERIES",e.reset="DRAG_ITEM_RESET",e.dragSelected="DRAG_ITEM_DRAG_SELECTED",e))(Ma||{});var za=(e=>(e.set="RESIZE_ITEM_SET",e.start="RESIZE_ITEM_START",e.startDrag="RESIZE_ITEM_START_DRAG",e.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",e.endDrag="RESIZE_ITEM_END_DRAG",e.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",e.complete="RESIZE_ITEM_COMPLETE",e.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",e.reset="RESIZE_ITEM_RESET",e))(za||{});var La=(e=>(e.reset="SERIES_RESET",e.set="SERIES_SET",e.toggle="SERIES_TOGGLE",e))(La||{});const Oa=f.forwardRef(((e,t)=>{const{_ref:r,itemRef:a,onDataAction:l,ignoreIsAllDay:o,viewItem:s,series:c,onSeriesChange:i,form:d,formItem:u,onFormItemChange:m,drag:p,dragItem:g,onDragItemChange:E,resize:h,resizeItem:y,onResizeItemChange:v,removeDialog:k,removeItem:D,onRemoveItemChange:S,occurrenceDialog:C,showOccurrenceDialog:b,onShowOccurrenceDialogChange:I,showRemoveDialog:w,onShowRemoveDialogChange:T,onFocus:R,onFocusAction:x,onMouseDown:M,onMouseDownAction:z,onMouseUp:O,onMouseUpAction:F,onClick:P,onClickAction:W,onDoubleClick:H,onDoubleClickAction:K,onRemoveClick:V,onRemoveClickAction:G,onPress:B,onPressAction:U,onDrag:Z,onDragAction:$,onRelease:q,onReleaseAction:Y,onResizePress:j,onResizePressAction:X,onResizeStartDrag:Q,onResizeStartDragAction:ee,onResizeEndDrag:te,onResizeEndDragAction:re,onResizeRelease:ae,onResizeReleaseAction:ne,onOccurrenceClick:le,onOccurrenceClickAction:oe,onSeriesClick:ce,onSeriesClickAction:ie,onKeyDown:ue,onKeyDownAction:me,onKeyUp:pe,onKeyUpAction:ge,onRemoveConfirm:Ee,onRemoveConfirmAction:he,onFormSubmit:ye,onFormSubmitAction:fe,onCancel:ke,onCancelAction:Se}={...Fa,...e},[be,Ie]=f.useState(e.tabIndex),we=f.useRef(null),Te=f.useRef(null),Re=n.useId();f.useImperativeHandle(we,(()=>({props:e,element:Te.current&&Te.current.element}))),f.useImperativeHandle(t,(()=>we.current)),f.useImperativeHandle(r,(()=>Te.current)),f.useImperativeHandle(a,(()=>Te.current));const xe=s||Fa.viewItem,Ae=p||Fa.drag,_e=h||Fa.resize,Ne=d||Fa.form,Me=C||Fa.occurrenceDialog,ze=k||Fa.removeDialog,Le=Qr(e.editable),[Oe,Fe]=Bt(),[Pe,,We]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SERIES_RESET":return null;case"SERIES_SET":return t.payload;case"SERIES_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(null,c,i),[He,Ke,Ve]=((e,t)=>{const[r,a]=Ce(...t),l=se(),[o]=ve();return[r,a,(t,s)=>{let c;switch(t.type){case"FORM_ITEM_SET":c=t.payload;break;case"FORM_ITEM_RESET":c=null;break;case"FORM_ITEM_SET_MASTER":c=n.clone(L(t.payload,l,o));break;case"FORM_ITEM_COMPLETE":e.onDataAction&&r&&(e.onDataAction.call(void 0,{type:J.update,series:e.series,dataItem:t.payload}),c=null);break;default:c=r}a(c,s)}]})({series:Pe,onDataAction:l},[null,u,m]),[Ge,Be,Ue]=((e,t)=>{const r=f.useRef(0),a=f.useRef(0),l=f.useRef(0),o=f.useRef(null),[s,c]=Ce(...t),[i]=Bt(),d=se(),u=de();return[s,c,t=>{switch(t.type){case"DRAG_ITEM_SET":c(t.payload);break;case"DRAG_ITEM_RESET":c(null);break;case"DRAG_ITEM_DRAG_SELECTED":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const r=A(t.payload.x,t.payload.y,7);if(!r||r===o.current)return;const s=n.clone(e.dataItem),u=r.getAttribute("data-slot-start"),m="true"===r.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&m!==e.isAllDay)return;const p=new Date(_(s,d.start)),g=Number(u)-p.getTime(),E=i.map((e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g),a=new Date(e.current.props.end.getTime()+g);return N(t,d.start,r),N(t,d.end,a),t})).filter(Boolean);o.current=r,c([...E]);break}case"DRAG_ITEM_START":{const o=t.payload.x,s=t.payload.y;a.current=o,l.current=s;const c=A(o,s,7);if(!c)return;const i=n.clone(e.dataItem),u=c.getAttribute("data-slot-start"),m=_(i,d.start);if(null===u)return;r.current=Number(u)-new Date(m).getTime();break}case"DRAG_ITEM_DRAG":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const s=A(t.payload.x,t.payload.y,7);if(!s||s===o.current)return;const i=n.clone(e.dataItem),m=s.getAttribute("data-slot-start"),p=s.getAttribute("data-slot-group"),g="true"===s.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&g!==e.isAllDay)return;const E=new Date(_(i,d.start)),h=new Date(_(i,d.end)).getTime()-E.getTime(),y=new Date(Number(m)-Number(r.current)),v=new Date(Number(m)-Number(r.current)+h),f=u.find((e=>e.index===Number(p)));N(i,d.start,y),N(i,d.end,v),f&&u.length>1&&f.resources.forEach((e=>{e.multiple||N(i,e.field,e[e.valueField])})),o.current=s,i&&c(i);break}case"DRAG_ITEM_COMPLETE":c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:s});break;case"DRAG_ITEM_COMPLETE_OCCURRENCE":{const t=Array.isArray(s)?s.slice():n.clone(s);c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:t});break}case"DRAG_ITEM_COMPLETE_SERIES":{let t;if(Array.isArray(s))t=s.map((e=>{const t=n.clone(e);return N(t,d.start,_(e,d.start)),N(t,d.end,_(e,d.end)),t}));else{const e=n.clone(s);N(e,d.start,_(s,d.start)),N(e,d.end,_(s,d.end)),t=e}c(null),e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}default:c(s)}}]})({dataItem:e.dataItem,ignoreIsAllDay:e.ignoreIsAllDay,isAllDay:e.isAllDay,onDataAction:l},[null,g,E]),[Ze,$e,qe]=((e,t)=>{const r=f.useRef(null),[a,l]=Ce(...t),[o]=Bt(),s=se();return[a,l,(t,c)=>{let i=a;switch(t.type){case"RESIZE_ITEM_SET":i=t.payload;break;case"RESIZE_ITEM_RESET":default:i=null;break;case"RESIZE_ITEM_START":{if(c.stopPropagation(),!i)return;const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const d=o.getAttribute("data-slot-start"),u=new Date(Number(d)),m=n.clone(e.dataItem);if(u>=_(m,s.end))return;N(m,s.start,u),r.current=o,i=m;break}case"RESIZE_ITEM_START_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.start)),g=new Date(Number(m)).getTime()-p.getTime();let E=!1;const h=o.map((e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g);if(!(r>=_(t,s.end)))return N(t,s.start,r),t;E=!0})).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_START_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-start"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d>=u.end)return;N(u,s.start,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-end"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d<=u.start)return;N(u,s.end,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.end)),g=new Date(Number(m)).getTime()-p.getTime();let E;const h=o.map((e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.end.getTime()+g);if(!(r<=_(t,s.start)))return N(t,s.end,r),t;E=!0})).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_COMPLETE":case"RESIZE_ITEM_COMPLETE_OCCURRENCE":i=null,e.onDataAction&&a&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:a});break;case"RESIZE_ITEM_COMPLETE_SERIES":{let t;if(i=null,Array.isArray(a))t=a.map((e=>{const t=n.clone(e);return N(t,s.start,_(e,s.start)),N(t,s.end,_(e,s.end)),t}));else{const e=n.clone(a);N(e,s.start,_(a,s.start)),N(e,s.end,_(a,s.end)),t=e}e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}}l(i)}]})({dataItem:e.dataItem,onDataAction:l},[null,y,v]),[Ye,je,Xe]=((e,t)=>{const[r,a]=Ce(...t);return[r,a,t=>{let n;switch(t.type){case"REMOVE_ITEM_SET":n=t.payload;break;case"REMOVE_ITEM_RESET":n=null;break;case"REMOVE_ITEM_COMPLETE":e.onDataAction&&r&&e.onDataAction.call(void 0,{type:J.remove,series:e.series,dataItem:r}),n=null;break;default:n=r}a(n)}]})({series:Pe,onDataAction:l},[null,D,S]),[Qe,Je,et]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_REMOVE_DIALOG_RESET":case"SHOW_REMOVE_DIALOG_CLOSE":return!1;case"SHOW_REMOVE_DIALOG_SET":return t.payload;case"SHOW_REMOVE_DIALOG_OPEN":return!0;case"SHOW_REMOVE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,w,T),[tt,rt,at]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_OCCURRENCE_DIALOG_RESET":case"SHOW_OCCURRENCE_DIALOG_CLOSE":return!1;case"SHOW_OCCURRENCE_DIALOG_SET":return t.payload;case"SHOW_OCCURRENCE_DIALOG_OPEN":return!0;case"SHOW_OCCURRENCE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,b,I),[nt]=Kt(),[,lt]=f.useContext(Ut),[,ot]=$t(),st=!!(Te.current&&Oe&&Oe.some((e=>e.current===Te.current))),ct=f.useMemo((()=>({selected:st,series:Pe,formItem:He,dragItem:Ge,resizeItem:Ze,removeItem:Ye,showRemoveDialog:Qe,showOccurrenceDialog:tt})),[Ge,He,Ye,Ze,st,Pe,tt,Qe]),it=f.useMemo((()=>({[La.set]:We,[La.toggle]:We,[La.reset]:We,[Yt.select]:Fe,[Yt.add]:Fe,[Yt.remove]:Fe,[Yt.reset]:Fe,[Yt.selectNext]:Fe,[Yt.selectPrev]:Fe,[xa.set]:Ve,[xa.setMaster]:Ve,[xa.reset]:Ve,[xa.complete]:Ve,[_a.set]:Xe,[_a.reset]:Xe,[_a.complete]:Xe,[Aa.close]:at,[Aa.open]:at,[Aa.set]:at,[Aa.toggle]:at,[Aa.reset]:at,[Na.close]:et,[Na.open]:et,[Na.set]:et,[Na.toggle]:et,[Na.reset]:et,[Ma.start]:Ue,[Ma.drag]:Ue,[Ma.complete]:Ue,[Ma.completeOccurrence]:Ue,[Ma.completeSeries]:Ue,[Ma.set]:Ue,[Ma.reset]:Ue,[Ma.dragSelected]:Ue,[za.start]:qe,[za.startDrag]:qe,[za.startDragSelected]:qe,[za.endDrag]:qe,[za.endDragSelected]:qe,[za.complete]:qe,[za.completeOccurrence]:qe,[za.completeSeries]:qe,[za.set]:qe,[za.reset]:qe,[Qt.next]:lt,[Qt.prev]:lt,[Jt.left]:ot,[Jt.right]:ot,[Jt.up]:ot,[Jt.down]:ot,null:()=>{}})),[Ue,Ve,Fe,Xe,qe,We,at,et,lt,ot]),dt=f.useCallback((t=>{if(x){const r=x(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}R&&R.call(void 0,t)}),[it,R,x,e,ct]),ut=f.useCallback((t=>{if(z){const r=z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}M&&M.call(void 0,t)}),[it,M,z,e,ct]),mt=f.useCallback((t=>{if(F){const r=F(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}O&&O.call(void 0,t)}),[it,O,F,e,ct]),[,pt]=f.useContext(De),gt=f.useCallback((t=>{if(W){pt(Te.current);const r=W(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}P&&P.call(void 0,t)}),[it,P,W,e,ct]),Et=f.useCallback((t=>{if(K){const r=K(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}H&&H.call(void 0,t)}),[K,H,e,it,ct]),ht=f.useCallback((t=>{if(G){const r=G(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}V&&V.call(void 0,t)}),[G,V,e,it,ct]),yt=f.useCallback((t=>{if(U){const r=U(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}B&&B.call(void 0,t)}),[U,B,e,it,ct]),vt=f.useCallback((t=>{if($){const r=$(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Z&&Z.call(void 0,t)}),[$,Z,e,it,ct]),ft=f.useCallback((t=>{if(Y){const r=Y(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}q&&q.call(void 0,t)}),[Y,q,e,it,ct]),kt=f.useCallback((t=>{if(X){const r=X(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}j&&j.call(void 0,t)}),[X,j,e,ct,it]),Dt=f.useCallback((t=>{if(ee){const r=ee(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Q&&Q.call(void 0,t)}),[Q,ee,e,it,ct]),St=f.useCallback((t=>{if(re){const r=re(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}te&&te.call(void 0,t)}),[te,re,e,it,ct]),Ct=f.useCallback((t=>{if(ne){const r=ne(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}ae&&ae.call(void 0,t)}),[ne,ae,e,it,ct]),bt=f.useCallback((t=>{if(fe){const r=fe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}ye&&ye.call(void 0,t)}),[fe,ye,e,ct,it]),It=f.useCallback((t=>{if(Se){const r=Se(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}ke&&ke.call(void 0,t)}),[Se,ke,e,ct,it]),wt=f.useCallback((t=>{if(oe){const r=oe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}le&&le.call(void 0,t)}),[oe,le,e,ct,it]),Tt=f.useCallback((t=>{if(ie){const r=ie(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}ce&&ce.call(void 0,t)}),[ie,ce,e,ct,it]),Rt=f.useCallback((t=>{if(me){const r=me(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent))):it[r.type]({...r,item:Te},t.syntheticEvent))}ue&&ue.call(void 0,t)}),[me,ue,e,ct,it]),xt=f.useCallback((t=>{if(ge){const r=ge(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent))):it[r.type]({...r,item:Te},t.syntheticEvent))}pe&&pe.call(void 0,t)}),[ge,pe,e,ct,it]),At=f.useCallback((t=>{if(he){const r=he(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent))):it[r.type]({...r,item:Te},t.syntheticEvent))}Ee&&Ee.call(void 0,t)}),[he,Ee,e,ct,it]);return f.useEffect((()=>{const t=nt.length&&nt[0].current===Te.current;Ie(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===Oe.length&&t?0:void 0)}),[nt,e.tabIndex,Oe.length]),f.createElement(Ra,{props:e,form:[He,Ke,Ve],drag:[Ge,Be,Ue],resize:[Ze,$e,qe],remove:[Ye,je,Xe],showRemoveDialog:[Qe,Je,et],showOccurrenceDialog:[tt,rt,at]},f.createElement(xe,{...e,_ref:Te,itemRef:Te,selected:st,tabIndex:be,id:Re,onKeyDown:Rt,onKeyUp:xt,onFocus:dt,onMouseUp:mt,onMouseDown:ut,onClick:gt,onDoubleClick:Et,onRemoveClick:ht,onPress:yt,onDrag:vt,onRelease:ft,onResizePress:kt,onResizeEndDrag:St,onResizeStartDrag:Dt,onResizeRelease:Ct}),Ge&&Le.drag&&(Array.isArray(Ge)?Ge.map(((t,r)=>f.createElement(Ae,{key:r,ignoreIsAllDay:o,dataItem:t,vertical:e.vertical,viewItem:xe,item:e.item}))):f.createElement(Ae,{ignoreIsAllDay:o,dataItem:Ge,vertical:e.vertical,viewItem:xe,item:e.item})),Ze&&Le.resize&&(Array.isArray(Ze)?Ze.map(((t,r)=>f.createElement(_e,{key:r,format:e.format,ignoreIsAllDay:o,dataItem:t,viewItem:e.viewItem,item:e.item,vertical:e.vertical}))):f.createElement(_e,{format:e.format,ignoreIsAllDay:o,dataItem:Ze,viewItem:e.viewItem,item:e.item,vertical:e.vertical})),He&&!tt&&Le.edit&&f.createElement(Ne,{dataItem:He,onSubmit:bt,onClose:It,onCancel:It}),tt&&f.createElement(Me,{dataItem:He||Ge||Ze||Ye,isRemove:null!==Ye,onClose:It,onOccurrenceClick:wt,onSeriesClick:Tt}),Qe&&Ye&&Le.remove&&f.createElement(ze,{dataItem:Ye,onClose:It,onCancel:It,onConfirm:At}))})),Fa={viewItem:oa,drag:ya,resize:fa,form:Gr,occurrenceDialog:ta,removeDialog:ra,onClickAction:(e,t,r)=>[{type:e.syntheticEvent.metaKey||e.syntheticEvent.ctrlKey?!r.selected||r.dragItem||r.resizeItem?Yt.add:Yt.remove:Yt.select}],onDoubleClickAction:(e,t)=>t.editable?[{type:xa.set,payload:t.dataItem},t.isRecurring&&{type:Aa.open}].filter(Boolean):[],onRemoveClickAction:(e,t)=>t.editable?[{type:_a.set,payload:t.dataItem},t.isRecurring?{type:Aa.open}:{type:Na.open}]:[],onPressAction:(e,t)=>t.editable?{type:Ma.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?Ma.dragSelected:Ma.drag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onReleaseAction:(e,t,r)=>t.editable&&r.dragItem?t.isRecurring&&!t.isException&&null===r.series?{type:Aa.open}:{type:t.isRecurring?r.series?Ma.completeSeries:Ma.completeOccurrence:Ma.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizePressAction:(e,t)=>t.editable?{type:za.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeStartDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?za.startDragSelected:za.startDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeEndDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?za.endDragSelected:za.endDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeReleaseAction:(e,t,r)=>t.editable&&r.resizeItem?t.isRecurring&&!t.isException&&null===r.series?{type:Aa.open}:{type:t.isRecurring?r.series?za.completeSeries:za.completeOccurrence:za.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onOccurrenceClickAction:(e,t,r)=>r.dragItem?[{type:Ma.completeOccurrence},{type:Aa.close}]:r.resizeItem?[{type:za.completeOccurrence},{type:Aa.close}]:r.formItem?[{type:La.set,payload:!1},{type:xa.set,payload:t.dataItem},{type:Aa.close}]:r.removeItem?[{type:La.set,payload:!1},{type:_a.set,payload:t.dataItem},{type:Na.open},{type:Aa.close}]:[],onSeriesClickAction:(e,t,r)=>r.dragItem?[{type:Ma.completeSeries},{type:Aa.close}]:r.resizeItem?[{type:za.completeSeries},{type:Aa.close}]:r.formItem?[{type:La.set,payload:!0},{type:xa.setMaster,payload:t.dataItem},{type:Aa.close}]:r.removeItem?[{type:La.set,payload:!0},{type:_a.set,payload:t.dataItem},{type:Na.open},{type:Aa.close}]:[],onKeyDownAction:(e,t)=>{switch(e.syntheticEvent.keyCode){case n.Keys.enter:return[{type:xa.set,payload:t.dataItem},t.isRecurring&&{type:Aa.open}];case n.Keys.tab:return[{type:e.syntheticEvent.shiftKey?Qt.prev:Qt.next,ignoreIsAllDay:t.ignoreIsAllDay},{type:e.syntheticEvent.shiftKey?Yt.selectPrev:Yt.selectNext,ignoreIsAllDay:t.ignoreIsAllDay}];case n.Keys.up:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:Jt.up,slot:t.slots[0]._ref}];case n.Keys.right:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:Jt.right,slot:t.slots[0]._ref}];case n.Keys.down:return[!(!t.slots.length||!t.slots[t.slots.length-1]._ref.current)&&{type:Jt.down,slot:t.slots[t.slots.length-1]._ref}];case n.Keys.left:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:Jt.left,slot:t.slots[0]._ref}];default:return}},onFormSubmitAction:e=>[{type:xa.complete,payload:e.value}],onRemoveConfirmAction:()=>[{type:_a.complete},{type:Aa.close}],onCancelAction:()=>[{type:La.reset},{type:_a.reset},{type:xa.reset},{type:Ma.reset},{type:za.reset},{type:Na.reset},{type:Aa.reset}]};Oa.displayName="KendoReactSchedulerEditItem";const Pa=e=>{const[t,r]=f.useState(!1),l=te(),o=ae(),s=f.useRef(void 0),c=f.useRef(null),i=f.useRef(null),d=e.updateInterval||Wa.updateInterval,[,u]=f.useState(!1),m=n.useDir(i,!0===o.rtl?"rtl":void 0),[p]=Wt(),g=f.useCallback((()=>{if(!p)return;const t=p.filter((t=>t.current&&(void 0===e.groupIndex||null===e.groupIndex||t.current.props.group.index===e.groupIndex)&&(e.vertical?W(new Date,new Date,t.current.props.start,t.current.props.end,!0):K(new Date,t.current.props.start,t.current.props.end))&&!t.current.props.isAllDay));if(t&&t.length&&c.current&&i.current){const n=T(t);if(!n.current)return;const l=e.vertical?(e=>{let t=0;return e.forEach((e=>{if(e.current){const r=b(e.current.element);t+=r.height}})),t})(t):(e=>{let t=0;return e.forEach((e=>{if(e.current){const r=b(e.current.element);t+=r.width}})),t})(t),o=b(n.current.element),s=b(c.current),d=(e.vertical?o.width:o.height)/(n.current.props.end.getTime()-n.current.props.start.getTime()),u=(Date.now()-((e,t)=>{const r=a.cloneDate(e);return r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r})(new Date,n.current.props.start).getTime())*d,p="rtl"===m,g=e.vertical?o.top:o.top+u-s.height/2,E=p?"right":"left",h=e.vertical?o[E]+u-s.width/2:o[E];e.vertical?c.current.style[E]=`${h}px`:c.current.style.top=`${g}px`,i.current.style[E]=`${h}px`,i.current.style.top=`${g}px`,i.current.style[e.vertical?"height":"width"]=l-1+"px",r(!0)}else r(!1)}),[p,e.groupIndex,e.vertical,m]),E=f.useCallback((()=>{g(),u((e=>!e))}),[g]);f.useEffect((()=>{if(!l.current||!window)return;clearInterval(s.current),s.current=window.setInterval(E,d);const e=window.ResizeObserver,t=e&&new e(E);return t&&t.observe(l.current),()=>{clearInterval(s.current),t&&t.disconnect()}}),[g,E,l,d]),f.useEffect(g);const h=f.createElement("div",{ref:c,className:n.classNames("k-current-time",{"k-current-time-arrow-right":!e.vertical&&"rtl"!==m,"k-current-time-arrow-left":!e.vertical&&"rtl"===m,"k-current-time-arrow-down":e.vertical}),style:{transform:e.vertical?"rtl"===m?"translateX(50%)":"translateX(-50%)":"translateY(-50%)",visibility:t?void 0:"hidden"}});return f.createElement(f.Fragment,null,e.attachArrow&&e.attachArrow.current?k.createPortal(h,e.attachArrow.current):h,f.createElement("div",{className:"k-current-time",ref:i,style:{transform:e.vertical?"translateX(-50%)":"translateY(-50%)",[e.vertical?"width":"height"]:"1px",visibility:t?void 0:"hidden"}}))},Wa={updateInterval:6e4},Ha=f.forwardRef(((e,t)=>{const{as:r=Ka.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo((()=>n.classNames("k-scheduler-cell k-heading-cell",e.className)),[e.className]);return f.useImperativeHandle(s,(()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e}))),f.useImperativeHandle(t,(()=>s.current)),f.createElement(r,{ref:r!==Ka.as?void 0:l,...a,className:i},f.createElement("span",{className:"k-link k-nav-day"},c.formatDate(e.date,e.format?e.format:Ka.format)))})),Ka={as:f.forwardRef((({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l}))),format:"d"};Ha.displayName="KendoReactSchedulerDateHeaderCell";const Va=(e,{step:t,timezone:r})=>{const n=[],l=a.ZonedDate.fromLocalDate(e.start,r),o=a.ZonedDate.fromLocalDate(e.end,r);for(let e=l.clone(),r=0;e.getTime()<o.getTime();r++,e=e.addTime(t)){const a=e.clone(),l=a.clone().addTime(t),o=new Date(a.getTime()),s={index:r,end:new Date(l.getTime()),start:o,zonedStart:a,zonedEnd:l};n.push(s)}return n},Ga=(e,{step:t},{groups:r,ranges:n})=>{const l=[];return r.forEach((e=>{n.forEach((r=>{const n=r.zonedStart,o=r.zonedEnd,s=o.timezoneOffset-n.timezoneOffset;for(let c=n.clone(),i=0,d=s<0?s*Y*-1:0;c.getTime()<o.getTime();){const n=f.createRef(),o=c.clone(),s=c.addTime(t),u=(s.timezoneOffset-o.timezoneOffset)*Y,m=t<=Math.abs(u);d&&m&&(d-=t,c=c.addTime(-t));const p=new Date(o.getTime()),g={_ref:n,index:i,end:new Date(s.getTime()),start:p,zonedStart:o,zonedEnd:s,range:r,group:e,items:[],isAllDay:a.MS_PER_DAY<=t};l.push(g),c=c.addTime(t),i++}}))})),l},Ba=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),Ua=e=>{var t,r,l,s,c,i,d,u,m,p,g;const{group:E,timezone:h,resources:y}=ae(),v=o.useInternationalization(),k=e.editItem||Oa,D=e.editSlot||Jr,S=e.showWorkHours,C=null!=(t=e.numberOfDays)?t:Za.numberOfDays,b=null!=(r=e.slotDivisions)?r:Za.slotDivisions,I=null!=(l=e.slotDuration)?l:Za.slotDuration,w=null!=(s=e.workWeekStart)?s:Za.workWeekStart,x=null!=(c=e.workWeekEnd)?c:Za.workWeekEnd,A=!1!==e.currentTimeMarker&&Za.currentTimeMarker,_=v.parseDate(null!=(d=null!=(i=e.workDayStart)?i:e.isWorkDayStart)?d:Za.isWorkDayStart),N=v.parseDate(null!=(m=null!=(u=e.workDayEnd)?u:e.isWorkDayEnd)?m:Za.isWorkDayEnd),M=v.parseDate(null!=(p=e.startTime)?p:Za.startTime),z=v.parseDate(null!=(g=e.endTime)?g:Za.endTime),[L]=ve(),O=de(),F=ge(),P=se(),H=me(),G=f.useMemo((()=>S?_:M),[S,_,M]),Z=f.useMemo((()=>S?N:z),[S,N,z]),$=f.useMemo((()=>Va(H,{step:a.MS_PER_DAY*C,timezone:h}).map((e=>({...e,isAllDay:!0})))),[H.start.getTime(),H.end.getTime(),C]),q=f.useMemo((()=>Va(H,{step:a.MS_PER_DAY,timezone:h}).map((e=>({...e,isAllDay:!1})))),[H.start.getTime(),H.end.getTime(),h]),j=f.useMemo((()=>Ga(0,{step:a.MS_PER_DAY},{groups:O,ranges:$})),[H.start.getTime(),H.end.getTime(),h,$,O]),X=f.useMemo((()=>Ga(0,{step:I*Y/b},{groups:O,ranges:q}).filter((e=>Z.getTime()===G.getTime()||K(e.zonedStart,G,Z)))),[H.start.getTime(),H.end.getTime(),I,b,G.getTime(),Z.getTime(),O,q]),Q=f.useMemo((()=>ca(L,{dateRange:H,fields:P,timezone:h})),[L,H.start.getTime(),H.end.getTime(),P,h]),J=f.useMemo((()=>Q.filter((e=>e.isAllDay))),[Q]),ee=f.useMemo((()=>Q.filter((e=>!e.isAllDay))),[Q]),te=f.useMemo((()=>ma(J,{timezone:h},{groups:O,ranges:$})),[Q,h,O,$]),re=f.useMemo((()=>ma(ee,{timezone:h},{groups:O,ranges:q}).filter((e=>G.getTime()===Z.getTime()||K(e.zonedStart,G,Z)||K(e.zonedEnd,G,Z)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),G,Z)))),[Q,h,O,q,G.getTime(),Z.getTime()]);f.useMemo((()=>U(te,j,!1)),[te,j]),f.useMemo((()=>B(te,j,!1)),[te,j]),f.useMemo((()=>U(re,X,!1)),[re,X]),f.useMemo((()=>B(re,X,!1)),[re,X]);const ne=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},q.map(((t,r)=>f.createElement(Ha,{as:e.dateHeaderCell,key:r,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),h),start:t.start,end:t.end,format:{skeleton:"MEd"}})))))),le=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{key:t,className:"k-scheduler-row"},$.map(((r,a)=>j.filter((e=>e.group.index===t&&e.range.index===a)).map(((r,a,n)=>f.createElement(D,{...r,onDataAction:e.onDataAction,form:e.form,slot:e.slot,viewSlot:e.viewSlot,key:`${r.start.getTime()}:${r.group.index}`,row:0,col:"horizontal"===F?n.length*(t||0)+a:a,isWorkDay:0<=r.zonedStart.getDay()+(C-w)&&(r.zonedStart.getDay()+(C-w))%C<=x+(C-w),expandable:!0})))))))),oe=f.useMemo((()=>n.classNames("week"===e.name?"k-scheduler-weekview":"k-scheduler-dayview",e.className)),[e.name,e.className]),ce=f.useCallback(((t,r,a)=>q.map(((n,l)=>X.filter((e=>e.index===t.index&&e.range.index===l&&e.group.index===a)).map((t=>f.createElement(D,{key:`${t.start.getTime()}:${t.group.index}`,...t,onDataAction:e.onDataAction,slot:e.slot,viewSlot:e.viewSlot,form:e.form,row:r+1,col:q.length*(a||0)+l,isWorkHour:K(t.zonedStart,_,N),isWorkDay:V(t.zonedEnd.getDay(),w,x),editable:e.editable})))))),[q,D,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,X,N,_,x,w]),ie=f.useCallback(((t,r,a)=>j.filter((e=>e.group.index===r&&e.range.index===a)).map(((a,n)=>f.createElement(D,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,...a,onDataAction:e.onDataAction,key:`${a.start.getTime()}:${a.group.index}`,className:"k-scheduler-alldays-slot",row:t*(r||0)+1*(r||0),col:n,expandable:!0})))),[D,j,e.form,e.onDataAction,e.slot,e.viewSlot]),ue=f.useCallback(((t,r,a,n)=>q.map(((l,o)=>X.filter((e=>e.index===t.index&&e.group.index===a&&e.range.index===o)).map((t=>f.createElement(D,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,onDataAction:e.onDataAction,...t,key:`${t.start.getTime()}:${t.group.index}`,row:r.length*(a||0)+n+1*(a||0)+1,col:o,editable:e.editable,isWorkHour:K(t.zonedStart,_,N),isWorkDay:0<=t.zonedStart.getDay()+(C-w)&&(t.zonedStart.getDay()+(C-w))%C<=x+(C-w)})))))),[D,C,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,q,X,N,_,x,w]);return f.createElement(nr,{id:e.id,props:e,style:e.style,className:oe,ranges:[...$,...q],slots:[...j,...X]},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===F?f.createElement(f.Fragment,null,f.createElement(or,{nested:!0,group:E,resources:y,rowContent:dr,childRowContent:dr},ne),f.createElement(or,{group:E,resources:y,rowContent:fr,childRowContent:fr},le),te.map((t=>f.createElement(k,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,vertical:!1})))):f.createElement(ur,{group:E,resources:y,cellContent:Ba},ne)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===F?f.createElement(f.Fragment,null,X.filter((e=>0===e.group.index&&0===e.range.index)).map(((t,r)=>f.createElement(f.Fragment,{key:t.index},f.createElement(or,{nested:!1,group:E,resources:y,rowContent:Sr,rowContentProps:{timeHeaderCell:e.timeHeaderCell,isMaster:r%b==0,isLast:(r+1)%b==0,slot:t}},f.createElement(lr.Consumer,null,(({groupIndex:e})=>f.createElement("div",{className:n.classNames("k-scheduler-row",{"k-middle-row":(r+1)%b!=0})},ce(t,r,e)))))))),!1!==A&&W(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(Pa,null)):f.createElement(f.Fragment,null,f.createElement(ur,{nested:!0,group:E,resources:y},f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement(f.Fragment,{key:t},f.createElement("div",{className:"k-scheduler-row"},f.createElement(fr,{groupIndex:t},$.map(((e,r)=>{const a=X.filter((e=>e.group.index===t&&0===e.range.index)).length;return ie(a,t,r)})))),X.filter((e=>e.group.index===t&&0===e.range.index)).map(((r,a,n)=>f.createElement("div",{className:"k-scheduler-row",key:r.index},f.createElement(Sr,{slot:r,isMaster:a%b==0,isLast:(a+1)%b==0,timeHeaderCell:e.timeHeaderCell},ue(r,n,t,a))))),!1!==A&&W(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(Pa,{groupIndex:t}))))),te.map((t=>f.createElement(k,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!1})))),re.map((t=>f.createElement(k,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!0})))))},Za={name:"multi-day",title:"Multi Day",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"23:59",isWorkDayStart:"08:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,showCurrentTime:!0,defaultShowWorkHours:!0};Ua.propTypes={currentTimeMarker:r.bool,name:r.string,numberOfDays:r.number,startTime:r.string,endTime:r.string,workDayStart:r.string,workDayEnd:r.string,workWeekStart:r.number,workWeekEnd:r.any,slotDivisions:r.number,slotDuration:r.number,showWorkHours:r.bool,selectedDateFormat:r.string,selectedShortDateFormat:r.string},Ua.displayName="KendoReactSchedulerMultiDayView";const $a=e=>f.createElement(Ua,{...e}),qa={...Za,name:"day",title:e=>e.toLanguageString(Le,At[Le]),numberOfDays:1,slotDuration:60,slotDivisions:2,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};$a.displayName="KendoReactSchedulerDayView";const Ya=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1607496606,version:"13.3.0-develop.8",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"}),ja=f.forwardRef(((e,t)=>{const{_ref:r,onRemoveClick:a}=e,l=f.useRef(null),s=f.useRef(null);f.useImperativeHandle(l,(()=>({props:e,element:s.current}))),f.useImperativeHandle(t,(()=>l.current)),f.useImperativeHandle(r,(()=>l.current));const c=Qr(e.editable),i=o.useLocalization().toLanguageString(Fe,At[Fe]),u=e.group.resources.find((e=>!(!e.colorField||void 0===e[e.colorField]))),m=u&&u.colorField&&u[u.colorField],p=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,target:l.current})}),[a,l]),g=f.useMemo((()=>n.classNames("k-task",e.className)),[e.className]);return f.createElement("div",{id:e.id,ref:s,style:e.style,className:g,tabIndex:e.tabIndex||void 0},m&&f.createElement("span",{className:"k-scheduler-mark",style:{color:m,backgroundColor:m}}),e.isRecurring&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon}),e.title,c.remove&&f.createElement("a",{className:"k-link k-event-delete",title:i,"aria-label":i,onClick:p},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})))}));ja.displayName="KendoReactSchedulerTask";const Xa=f.forwardRef(((e,t)=>{const{task:r,_ref:a,...n}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,(()=>({props:e,element:l.current&&l.current.element}))),f.useImperativeHandle(a,(()=>l.current)),f.useImperativeHandle(t,(()=>o.current));const s=r||Qa.task;return f.createElement(s,{...n,_ref:l})})),Qa={task:ja};Xa.displayName="KendoReactSchedulerViewTask";const Ja=f.createContext([null]),en=f.createContext([!1]),tn=f.createContext([!1]),rn=e=>f.createElement(Ja.Provider,{value:e.remove},f.createElement(en.Provider,{value:e.showRemoveDialog},f.createElement(tn.Provider,{value:e.showOccurrenceDialog},e.children))),an=f.forwardRef(((e,t)=>{const{_ref:r,onDataAction:a,viewTask:n,removeDialog:l,removeItem:o,onRemoveItemChange:s,occurrenceDialog:c,showOccurrenceDialog:i,onShowOccurrenceDialogChange:d,showRemoveDialog:u,onShowRemoveDialogChange:m,...p}=e,g=f.useRef(null);f.useImperativeHandle(g,(()=>({props:e,element:g.current&&g.current.element}))),f.useImperativeHandle(r,(()=>g.current)),f.useImperativeHandle(t,(()=>g.current));const E=n||nn.viewTask,h=c||nn.occurrenceDialog,y=l||nn.removeDialog,v=Qr(e.editable),k=se(),[D,S]=ve(),[C,b]=f.useState(null),[I,w]=Ce(null,o,s),[T,R]=Ce(!1,u,m),[x,A]=Ce(!1,i,d),_=f.useCallback((t=>{v.remove&&(w(e.dataItem,t),e.isRecurring?A(!0,t):R(!0,t))}),[w,e.dataItem,e.isRecurring,A,R]),N=f.useCallback((e=>{b(null),w(null,e),R(!1,e),A(!1,e)}),[b,w,R,A]),M=f.useCallback((e=>{a&&I&&a.call(void 0,{type:J.remove,series:C,dataItem:I}),w(null,e),R(!1,e)}),[I,S,R]),z=f.useCallback(((e,t)=>{w&&w(e,t)}),[w]),O=f.useCallback(((e,t)=>{R&&R(e,t)}),[R]),F=f.useCallback(((e,t)=>{A&&A(e,t)}),[A]),P=f.useCallback((t=>{I&&(b(!1),w(e.dataItem,t),R(!0,t)),A(!1,t)}),[b,e.dataItem,I,w,R]),W=f.useCallback((e=>{if(I){b(!0);const t=L(I,k,D);w(t,e),R(!0,e)}A(!1,e)}),[k,I,b,w,R,A]);return f.createElement(rn,{remove:[I,z],showRemoveDialog:[T,O],showOccurrenceDialog:[x,F]},f.createElement(E,{_ref:g,...p,onRemoveClick:_}),x&&f.createElement(h,{dataItem:I,isRemove:null!==I,onClose:N,onOccurrenceClick:P,onSeriesClick:W}),T&&f.createElement(y,{dataItem:I,onClose:N,onCancel:N,onConfirm:M}))})),nn={viewTask:Xa,occurrenceDialog:ta,removeDialog:ra};an.displayName="KendoReactSchedulerEditTask";const ln=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editTask||an,c=e.editSlot||Jr,i=f.useRef(null),u=n.useDir(i),m=o.useInternationalization(),p=o.useLocalization(),[g]=ve(),E=de(),h=se(),y=me(),v=f.useMemo((()=>Va(y,{step:a.MS_PER_DAY,timezone:r})),[y.start.getTime(),y.end.getTime(),r]),k=f.useMemo((()=>Ga(0,{step:a.MS_PER_DAY},{groups:E,ranges:v})),[y.start.getTime(),y.end.getTime(),r,E,v]),D=f.useMemo((()=>ca(g,{dateRange:y,fields:h,timezone:r})),[g,y.start.getTime(),y.end.getTime(),h,r]),S=f.useMemo((()=>ma(D,{timezone:r},{groups:E,ranges:v})),[D,r,E,v]),C=f.useMemo((()=>n.classNames("k-scheduler-agendaview",e.className)),[e.className]);return Xt({element:i,selector:".k-scheduler-datecolumn",explicitDepth:!1}),Xt({element:i,selector:".k-scheduler-timecolumn",explicitDepth:!1}),f.useMemo((()=>U(S,k,!0)),[S,k]),f.useMemo((()=>B(S,k,!0)),[S,k]),f.createElement(nr,{ref:i,id:e.id,style:e.style,className:C,props:e,slots:S,ranges:v},f.createElement("div",{className:"k-scheduler-head"},f.createElement(ur,{resources:l,group:t},f.createElement(lr.Consumer,null,(({groupIndex:e})=>f.createElement("div",{className:"k-scheduler-row",key:e},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},p.toLanguageString(St,At[St])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},p.toLanguageString(Ct,At[Ct])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},p.toLanguageString(bt,At[bt]))))))),f.createElement("div",{className:"k-scheduler-body"},f.createElement(ur,{resources:l,group:t,nested:!0},f.createElement(lr.Consumer,null,(({groupIndex:t})=>k.filter((e=>e.group.index===(t||0))).map(((r,a,l)=>f.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${t}:${a}`},f.createElement(c,{...r,editable:e.editable,row:l.length*(t||0)+a,col:0,slot:e.slot,viewSlot:e.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},f.createElement("div",null,f.createElement("strong",{className:"k-scheduler-agendaday"},m.formatDate(r.zonedStart,"dd")),f.createElement("em",{className:"k-scheduler-agendaweek"},m.formatDate(r.zonedStart,"EEEE")),f.createElement("span",{className:"k-scheduler-agendadate"},m.formatDate(r.zonedStart,"y")))),f.createElement("div",{className:"k-scheduler-cell k-group-content"},r.items.length?r.items.map(((t,r)=>f.createElement("div",{className:"k-scheduler-row",key:r},f.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},f.createElement("div",null,t.tail&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-right":"caret-alt-left",icon:"rtl"===u?d.caretAltRightIcon:d.caretAltLeftIcon}),t.isAllDay?p.toLanguageString(xe,At[xe]):on(m,t),t.head&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-left":"caret-alt-right",icon:"rtl"===u?d.caretAltLeftIcon:d.caretAltRightIcon}))),f.createElement("div",{className:"k-scheduler-cell"},f.createElement(s,{key:`${a}:${r}`,...t,onDataAction:e.onDataAction,task:e.task,viewTask:e.viewTask,editable:e.editable}))))):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},p.toLanguageString(Rt,At[Rt])))))))))))},on=(e,t)=>{let r="{0:t}-{1:t}";return t.head?r="{0:t}":t.tail&&(r="{1:t}"),e.format(r,t.zonedStart,t.zonedEnd)},sn={name:"agenda",title:e=>e.toLanguageString(ze,At[ze]),dateRange:({intl:e,date:t,numberOfDays:r=1,timezone:n})=>{const l=a.ZonedDate.fromLocalDate(t,n),o=(e=>a.getDate(e))(7===r?a.firstDayInWeek(l,e.firstDay()):l),s=((e,t)=>a.getDate(a.addDays(e,t||1)))(o,r),c=a.ZonedDate.fromUTCDate(z(o),n),i=a.ZonedDate.fromUTCDate(z(s),n);return{start:new Date(c.getTime()),end:new Date(i.getTime()),zonedStart:c,zonedEnd:i}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:1440,slotDivision:1,numberOfDays:7},cn={title:r.any};ln.propTypes=cn,ln.displayName="KendoReactSchedulerAgendaView";const dn=f.forwardRef(((e,t)=>{const r=f.useRef(null),a=f.useRef(null),n=o.useLocalization();f.useImperativeHandle(r,(()=>({element:a.current&&a.current.element,...e}))),f.useImperativeHandle(t,(()=>r.current));const l=f.useCallback((t=>{!e.onClick||!r.current||e.onClick.call(void 0,{target:r.current,syntheticEvent:t})}),[r,e.slot,e.onClick]),c=n.toLanguageString(xt,At[xt]);return f.createElement(s.Button,{ref:a,tabIndex:-1,className:"k-more-events",onClick:l,"aria-label":c,icon:"more-horizontal",svgIcon:d.moreHorizontalIcon})}));dn.displayName="KendoReactSchedulerShowMoreItemsButton";const un={skeleton:"dd"},mn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editItem||Oa,c=e.editSlot||Jr,[i]=ve(),[d,u]=he(),[,m]=ke(),p=le(),g=de(),E=ge(),h=me(),y=o.useInternationalization(),v=se(),k=e.itemsPerSlot||pn.itemsPerSlot,D=f.useMemo((()=>Va(h,{step:7*a.MS_PER_DAY,timezone:r})),[h.start.getTime(),h.end.getTime(),r]),S=f.useMemo((()=>Ga(0,{step:a.MS_PER_DAY},{groups:g,ranges:D})),[h.start.getTime(),h.end.getTime(),g,D]),C=f.useMemo((()=>ca(i,{dateRange:h,fields:v,timezone:r})),[i,h.start.getTime(),h.end.getTime(),v,r]),b=f.useMemo((()=>ma(C,{timezone:r},{groups:g,ranges:D})),[C,r,g,D]),I=f.useCallback((e=>{const t=p.find((e=>"day"===e.props.name));!m||!t||!t.props.name||!e.target.slot||(m(t.props.name,e),u(e.target.slot.start,e))}),[m,p]);f.useMemo((()=>U(b,S,!0)),[b,S]),f.useMemo((()=>B(b,S,!0)),[b,S]);const w=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},S.filter((e=>e.group.index===t&&0===e.range.index)).map(((t,n)=>f.createElement(Ha,{as:e.dateHeaderCell,key:n,"data-dayslot-index":n,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),r),start:t.start,end:t.end,format:{skeleton:"EEEE"}})))))),T=f.createElement(lr.Consumer,null,(({groupIndex:t})=>D.map(((r,a)=>f.createElement("div",{className:"k-scheduler-row",key:a},S.filter((e=>e.group.index===t&&e.range.index===a)).map(((r,l,o)=>f.createElement(c,{slot:e.slot,viewSlot:e.viewSlot,key:l,form:e.form,...r,expandable:{offsetTop:30,offsetBottom:k<r.items.length?15:0},onDataAction:e.onDataAction,col:"horizontal"===E?o.length*(t||0)+l:l,row:"horizontal"===E?a:D.length*(t||0)+a,editable:e.editable,className:n.classNames({"k-other-month":r.start.getMonth()<d.getMonth()||r.start.getMonth()>d.getMonth()})},f.createElement("span",{className:"k-link k-nav-day"},y.formatDate(new Date(r.end.getTime()-(r.end.getTime()-r.start.getTime())/2),un)),k<r.items.length&&f.createElement(dn,{slot:r,onClick:I})))))))));return f.createElement(nr,{props:e,slots:S,ranges:D,className:n.classNames("k-scheduler-monthview",e.className)},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===E?f.createElement(or,{nested:!0,resources:l,group:t},w):f.createElement(ur,{resources:l,group:t},w)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===E?f.createElement(or,{resources:l,group:t},T):f.createElement(ur,{nested:!0,resources:l,group:t},T),b.filter((e=>null===e.order||e.order<k)).sort(q).map((t=>f.createElement(s,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0})))))},pn={name:"month",dateRange:({intl:e,date:t,timezone:r})=>{const n=a.firstDayInWeek(a.firstDayOfMonth(a.getDate(t)),e.firstDay()),l=a.addDays(a.firstDayInWeek(a.lastDayOfMonth(a.getDate(t)),e.firstDay()),7),o=a.ZonedDate.fromUTCDate(z(n),r),s=a.ZonedDate.fromUTCDate(z(l),r);return{start:new Date(o.getTime()),end:new Date(s.getTime()),zonedStart:o,zonedEnd:s}},slotDuration:1440,slotDivision:1,itemsPerSlot:2,numberOfDays:31,title:e=>e.toLanguageString(Oe,At[Oe]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},gn={itemsPerSlot:r.number};mn.propTypes=gn,mn.displayName="KendoReactSchedulerMonthView";const En=e=>f.createElement(Ua,{...e,step:7,numberOfDays:7}),hn={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(t,r),l=(e=>a.getDate(e))(a.firstDayInWeek(n,e.firstDay())),o=((e,t)=>a.getDate(a.addDays(e,t)))(l,7),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},title:e=>e.toLanguageString(Ne,At[Ne]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};En.displayName="KendoReactSchedulerWeekView";const yn=e=>{const t=me(),r=Math.round((t.end.getTime()-t.start.getTime())/a.MS_PER_DAY);return f.createElement(Ua,{...e,step:7,numberOfDays:r})},vn={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r,...n})=>{const l=a.ZonedDate.fromLocalDate(t,r),o=void 0!==n.workWeekStart?n.workWeekStart:a.Day.Monday,s=void 0!==n.workWeekEnd?n.workWeekEnd:a.Day.Friday,c=s<o?7+s-o+1:s-o+1,i=a.getDate(((e,t=a.Day.Sunday)=>{let r=e.clone();for(;r.getDay()!==t;)r=r.addDays(-1);return r})(l,o)),d=a.addDays(i,c),u=a.ZonedDate.fromUTCDate(z(i),r),m=a.ZonedDate.fromUTCDate(z(d),r);return{start:new Date(u.getTime()),end:new Date(m.getTime()),zonedStart:u,zonedEnd:m}},title:e=>e.toLanguageString(Me,At[Me]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};yn.displayName="KendoReactSchedulerWorkWeekView";const fn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),kn=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},fn),e.children),Dn=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day","data-range-index":0},t.toLanguageString(Re,At[Re]))),e.children)},Sn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=f.useRef(null),c=f.useRef(null),i=e.editItem||Oa,d=e.editSlot||Jr,u=f.useRef(null),[m]=ve(),p=ge(),g=de(),E=me(),h=se(),y=o.useInternationalization(),v=e.showWorkHours,k=e.slotDivisions||Cn.slotDivisions,D=e.slotDuration||Cn.slotDuration,S=e.workWeekStart||Cn.workWeekStart,C=e.workWeekEnd||Cn.workWeekEnd,b=y.parseDate(e.workDayStart||e.isWorkDayStart||Cn.isWorkDayStart),I=y.parseDate(e.workDayEnd||e.isWorkDayEnd||Cn.isWorkDayEnd),w=y.parseDate(e.startTime||Cn.startTime),x=y.parseDate(e.endTime||Cn.endTime),A=f.useMemo((()=>v?b:w),[v,b,w]),_=f.useMemo((()=>v?I:x),[v,I,x]),N=f.useMemo((()=>Va(E,{step:a.MS_PER_DAY,timezone:r})),[E.start.getTime(),E.end.getTime(),r]),M=f.useMemo((()=>Ga(0,{step:D/k*a.MS_PER_MINUTE},{groups:g,ranges:N}).filter((e=>K(e.zonedStart,A,_)||A.getTime()===_.getTime()))),[g,N,E.start.getTime(),E.end.getTime(),r,D,k,A.getTime(),_.getTime()]),L=f.useMemo((()=>ca(m,{dateRange:E,fields:h,timezone:r})),[m,E.start.getTime(),E.end.getTime(),h,r]),O=f.useMemo((()=>ma(L,{timezone:r},{groups:g,ranges:N}).filter((e=>A.getTime()===_.getTime()||K(e.zonedStart,A,_)||K(e.zonedEnd,A,_)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),A,_)))),[L,r,g,N,A.getTime(),_.getTime()]);f.useMemo((()=>U(O,M,!0)),[O,M]),f.useMemo((()=>B(O,M,!0)),[O,M]);const F=("horizontal"===p?M.length:M.length/g.length)*((e.columnWidth||Cn.columnWidth)+1),P=f.createElement(lr.Consumer,null,(()=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-row"},N.map(((t,r)=>f.createElement(Ha,{as:e.dateHeaderCell,key:r,date:t.zonedStart,start:t.start,end:t.end,format:"m"})))),f.createElement("div",{className:"k-scheduler-row",ref:s},N.map(((t,r)=>M.filter((e=>0===e.group.index&&e.range.index===r)).map((t=>t.zonedStart.getMinutes()%D==0?f.createElement(kr,{key:t.index,as:e.timeHeaderCell,format:"t",date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd}):null)))))))),H=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row"},N.map(((n,l)=>M.filter((e=>e.group.index===t&&e.range.index===l)).map(((n,o,s)=>{const c=a.ZonedDate.fromUTCDate(z(n.zonedStart),r),i=V(c.getDay(),S,C);return f.createElement(d,{key:`${n.start.getTime()}:${n.group.index}`,slot:e.slot,viewSlot:e.viewSlot,...n,form:e.form,onDataAction:e.onDataAction,isWorkHour:K(n.zonedStart,b,I),isWorkDay:i,col:"horizontal"===p?l*s.length+o+s.length*N.length*(t||0):l*s.length+o,row:"horizontal"===p?0:t||0,expandable:!0,editable:e.editable})}))))))),G=f.useMemo((()=>n.classNames("k-scheduler-timelineview",e.className)),[e.className]);Xt({element:u,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0});const Z=u.current?u.current.closest(".k-scheduler-layout"):null;return la({element:Z,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:O&&!O.length}),f.createElement(nr,{ref:u,id:e.id,style:{...e.style},className:G,props:e,slots:M,ranges:N},f.createElement("div",{className:"k-scheduler-head",style:{width:F}},"horizontal"===p?f.createElement(or,{nested:!0,group:t,resources:l,rowContent:kn},P):f.createElement(ur,{wrapGroup:!0,group:t,resources:l},P)),f.createElement("div",{className:"k-scheduler-body",style:{width:F},ref:c},"horizontal"===p?f.createElement(or,{group:t,resources:l,rowContent:Dn},H,f.createElement(lr.Consumer,null,(({groupIndex:t})=>e.currentTimeMarker&&W(T(N).start,R(N).end,new Date,new Date,!0)&&f.createElement(Pa,{groupIndex:t,attachArrow:s,vertical:!0})))):f.createElement(ur,{nested:!0,wrapGroup:!0,group:t,resources:l},H),"vertical"===p&&e.currentTimeMarker&&W(T(N).start,R(N).end,new Date,new Date,!0)&&f.createElement(Pa,{attachArrow:s,vertical:!0}),O.sort(q).map(((t,r)=>f.createElement(i,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,ignoreIsAllDay:!0,vertical:!1,isLast:r===O.length-1})))))},Cn={name:"multi-day-timeline",title:"Multi Day Timeline",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"00:00",isWorkDayStart:"8:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,defaultShowWorkHours:!0,columnWidth:100},bn=e=>f.createElement(Sn,{...e}),In={...Cn,name:"timeline",title:e=>e.toLanguageString(_e,At[_e]),slotDuration:60,slotDivisions:2,numberOfDays:1,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};bn.displayName="KendoReactSchedulerTimelineView";const wn=new Map;wn.set(ln,sn),wn.set($a,qa),wn.set(mn,pn),wn.set(En,hn),wn.set(yn,vn),wn.set(bn,In);const Tn=f.forwardRef(((e,t)=>{var r,l,c;const i=!n.validatePackage(Ya,{component:"Scheduler"}),u=n.getLicenseMessage(Ya),{timezone:m,onDataChange:p}=e,g=f.useRef(null),E=f.useRef(null);f.useImperativeHandle(E,(()=>({props:e,element:g.current}))),f.useImperativeHandle(t,(()=>E.current));const h=n.useRtl(g),y=o.useInternationalization(),v=o.useLocalization(),{fields:k}=f.useMemo((()=>(e=>({fields:{...H,...e}}))(e.modelFields)),[e.modelFields]),[C,b]=Ce(e.defaultDate||Rn.defaultDate,e.date,e.onDateChange),I=f.Children.toArray(e.children||[]).map((e=>{var t;return f.isValidElement(e)?f.cloneElement(e,{...wn.get(e.type),...null!=(t=e.props)?t:{}}):e})),w=f.cloneElement(f.createElement($a,null),wn.get($a)),[T,R]=Ce(e.defaultView||I[0]&&I[0].props.name||"day",e.view,e.onViewChange),[x,A]=Ce(!0),M=I.find((e=>e.props.name===T))||I[0]||w,z=(null!=(r=e.data)?r:Rn.data)||Rn.data,O=((e,t)=>{const r=S(e,t),a=D(r);return 1===a.length?[{index:0,resources:(t||[]).reduce(((e,t)=>[...e,...t.data.map((e=>({...e,field:t.field,valueField:t.valueField,colorField:t.colorField,multiple:t.multiple})))]),[])}]:a.map(((e,t)=>({index:t,resources:e})))})(e.group,e.resources),F=e.group&&e.group.orientation?e.group.orientation:"horizontal",P=M.props.selectedDateFormat||"{0:D}",W=M.props.selectedShortDateFormat||"{0:d}",K=M.props.slotDuration,V=void 0!==M.props.dateRange?"function"==typeof M.props.dateRange?M.props.dateRange.call(void 0,{intl:y,date:C,timezone:m,numberOfDays:M.props.numberOfDays,workWeekStart:M.props.workWeekStart||y.firstDay(),workWeekEnd:M.props.workWeekEnd||(y.firstDay()+M.props.numberOfDays)%6}):M.props.dateRange:{start:Rn.defaultDate,end:Rn.defaultDate},G=f.useCallback((({created:e=[],updated:t=[],deleted:r=[]})=>{if(p){const a={created:e,updated:t,deleted:r};p.call(void 0,a)}}),[p]),B=f.useCallback((e=>{const t=[e.dataItem];G({created:t})}),[G]),U=f.useCallback((e=>{const t=[],r=[];if(e.series)if(Array.isArray(e.dataItem))e.dataItem.forEach((t=>{const a=n.clone(L(e.dataItem,k,z)),l=n.clone(t);N(l,k.originalStart,_(a,k.originalStart)),N(l,k.recurrenceId,_(a,k.recurrenceId)),N(l,k.recurrenceExceptions,_(a,k.recurrenceExceptions)),r.push(l)}));else{const t=n.clone(L(e.dataItem,k,z)),a=n.clone(e.dataItem);N(a,k.originalStart,_(t,k.originalStart)),N(a,k.recurrenceId,_(t,k.recurrenceId)),N(a,k.recurrenceExceptions,_(t,k.recurrenceExceptions)),r.push(a)}else if(Array.isArray(e.dataItem))e.dataItem.forEach((e=>{const a=null!==_(e,k.recurrenceRule)&&void 0!==_(e,k.recurrenceRule);if(null!==_(e,k.recurrenceId)&&void 0!==_(e,k.recurrenceId)&&a){const a=n.clone(L(e,k,z)),l=_(e,k.originalStart),o=_(a,k.recurrenceExceptions)||[];N(a,k.recurrenceExceptions,[...o,l]),N(e,k.recurrenceRule,null),r.push(a),t.push(e)}else r.push(e)}));else{const a=null!==_(e.dataItem,k.recurrenceRule)&&void 0!==_(e.dataItem,k.recurrenceRule);if(null!==_(e.dataItem,k.recurrenceId)&&void 0!==_(e.dataItem,k.recurrenceId)&&a){const a=n.clone(L(e.dataItem,k,z)),l=_(e.dataItem,k.originalStart),o=_(a,k.recurrenceExceptions)||[];N(a,k.recurrenceExceptions,[...o,l]),N(e.dataItem,k.recurrenceRule,null),r.push(a),t.push(e.dataItem)}else r.push(e.dataItem)}G({updated:r,created:t})}),[G,k,z]),Z=f.useCallback((e=>{const t=[],r=[];if(e.series){const t=n.clone(L(e.dataItem,k,z)),a=n.clone(e.dataItem);N(a,k.originalStart,_(t,k.originalStart)),N(a,k.recurrenceId,_(t,k.recurrenceId)),N(a,k.recurrenceRule,_(t,k.recurrenceRule)),N(a,k.recurrenceExceptions,_(t,k.recurrenceExceptions)),r.push(a)}else if(null===_(e.dataItem,k.recurrenceRule)||void 0===_(e.dataItem,k.recurrenceRule))r.push(e.dataItem);else{const r=n.clone(L(e.dataItem,k,z)),a=_(e.dataItem,k.originalStart),l=_(r,k.recurrenceExceptions)||[];N(r,k.recurrenceExceptions,[...l,a]),N(e.dataItem,k.recurrenceRule,null),t.push(r)}G({updated:t,deleted:r})}),[G,k,z]),$=f.useCallback((e=>{switch(e.type){case J.create:B(e);break;case J.update:U(e);break;case J.remove:Z(e)}}),[B,Z,U]),q=f.useCallback(((e,t)=>{R(e,{...t,target:E.current})}),[R,E]),Y=f.useCallback(((e,t)=>{b(e,{...t,target:E.current})}),[b,E]),j=f.useCallback((e=>{e.value&&b(e.value,{...e,target:E.current,nativeEvent:e.nativeEvent})}),[b,E]),X=f.useCallback((e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=M.props.step)?t:M.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,Math.round(n/27)):a.addDays(C,n);b(l,e)}),[C,b,M.props.numberOfDays,M.props.step]),Q=f.useCallback((e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=M.props.step)?t:M.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,-Math.round(n/27)):a.addDays(C,-n);b(l,e)}),[C,b,M.props.numberOfDays,M.props.step]),ee=f.useCallback((e=>{e.preventDefault();const t=a.ZonedDate.fromLocalDate(new Date,m);b(new Date(t.getTime()),e)}),[b,m]),te=f.useCallback((()=>{A(!x)}),[A,x]),re=f.useCallback((()=>{g.current&&(g.current.style.boxShadow="0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)")}),[g]),ae=f.useCallback((()=>{g.current&&(g.current.style.boxShadow="")}),[g]),ne=f.useMemo((()=>{var t;return{...e.style,height:null!=(t=e.height)?t:Rn.height}}),[e.height,e.style]),le=f.useMemo((()=>n.classNames({"k-rtl":void 0!==e.rtl?e.rtl:"rtl"===h},"k-scheduler",e.className)),[e.className,e.rtl,h]),oe=v.toLanguageString(Ae,At[Ae]),se=v.toLanguageString(Pe,At[Pe]),ce=v.toLanguageString(We,At[We]),ie=M.props.header||e.header||Rn.header,de=M.props.footer||e.footer||Rn.footer,ue=Ie,[me,pe]=f.useState(null);return f.createElement(Se,{element:g,props:e,views:I,fields:k,groups:O,dateRange:V,orientation:F,dateFormat:{dateFormat:P,shortDateFormat:W},date:[C,Y],activeView:[T,q],selection:[me,pe],data:[z,$]},f.createElement("div",{ref:g,id:e.id,style:ne,className:le,tabIndex:null!=(l=e.tabIndex)?l:Rn.tabIndex,dir:h,role:e.role||"application","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":me&&me.props.id||void 0,onFocus:re,onBlur:ae},f.createElement(ie,null,f.createElement(ue,null,f.createElement(s.ButtonGroup,{className:"k-scheduler-navigation"},f.createElement(s.Button,{role:"button",tabIndex:-1,title:oe,"aria-label":oe,onClick:ee},oe),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-right":"caret-alt-left",svgIcon:"rtl"===h?d.caretAltRightIcon:d.caretAltLeftIcon,title:se,"aria-label":se,onClick:Q}),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-left":"caret-alt-right",svgIcon:"rtl"===h?d.caretAltLeftIcon:d.caretAltRightIcon,title:ce,"aria-label":ce,onClick:X}))),f.createElement(_t,{value:C,onChange:j}),f.createElement(s.ToolbarSpacer,null),f.createElement(Mt,null)),M&&f.createElement(M.type,{editable:null!=(c=e.editable)?c:Rn.editable,key:M.props.name,item:e.item,viewItem:e.viewItem,editItem:e.editItem,task:e.task,viewTask:e.viewTask,editTask:e.viewTask,slot:e.slot,viewSlot:e.viewSlot,editSlot:e.editSlot,form:e.form,onDataAction:$,showWorkHours:x,...M.props}),f.createElement(de,null,K&&K<1440&&f.createElement(zt,null,f.createElement(s.Button,{tabIndex:-1,onClick:te,icon:"clock",svgIcon:d.clockIcon},v.toLanguageString(x?He:Ke,At[x?He:Ke])))),i&&f.createElement(n.WatermarkOverlay,{message:u})))})),Rn={data:[],height:600,tabIndex:-1,editable:!1,defaultDate:new Date,header:be,footer:Te,navigation:Ie,viewSelector:we};Tn.propTypes={data:r.array,editable:r.oneOfType([r.bool,r.shape({add:r.bool,drag:r.bool,edit:r.bool,remove:r.bool,resize:r.bool})]),view:r.string,defaultView:r.string,date:r.any,defaultDate:r.any,rtl:r.bool,height:r.oneOfType([r.number,r.string]),children:r.any,timezone:r.string,group:r.any,resources:r.any,modelFields:r.shape({id:r.string,start:r.string,startTimezone:r.string,end:r.string,endTimezone:r.string,isAllDay:r.string,title:r.string,description:r.string,recurrenceRule:r.string,recurrenceId:r.string,recurrenceException:r.string})},Tn.displayName="KendoReactScheduler";const xn=f.forwardRef(((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null);f.useImperativeHandle(u,(()=>({props:e,element:i.current&&i.current.element}))),f.useImperativeHandle(t,(()=>u.current)),f.useImperativeHandle(a,(()=>i.current)),f.useImperativeHandle(l,(()=>i.current));const p=r||An.item,g=o.useInternationalization(),[E]=Kt(),[h]=Wt(),y=te(),[v,k]=f.useState(!0),[D,S]=f.useState(!1),C=f.useRef(0),I=f.useRef(null),x=f.useRef([]),A=n.useDir(y),_=f.useMemo((()=>e.isAllDay?g.toString(e.zonedStart,"t"):g.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)),[g,e.isAllDay,e.zonedEnd,e.zonedStart]),N=f.useMemo((()=>`(${_}): ${e.title}`),[_,e.title]),M=()=>{var t,r,a;const n=h.filter((t=>t.current&&((t,r)=>t.group.index===r.group.index&&t.range.index===r.range.index&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay))(t.current.props,e))).sort(((e,t)=>e.current.props.start.getTime()-t.current.props.start.getTime())),l=n.filter((t=>W(t.current.props.start,t.current.props.end,e.start,e.end))),o=i.current&&i.current.element;if(!o||!l.length)return;const s=T(n),c=R(n),d=T(l),u=R(l);if(!(d.current&&i.current&&u.current&&s.current&&c.current))return;if(!W(d.current.props.start,u.current.props.end,e.start,e.end))return void k(!1);const m=[],p=[],g=[],y=b(d.current.element),v=(e.vertical?y.height:y.width)/(d.current.props.end.getTime()-d.current.props.start.getTime()),f=(e.vertical?25:8)/v,D=(Math.min(e.start.getTime(),u.current.props.end.getTime()-f)-d.current.props.start.getTime())*v,A=Math.floor(Math.min(e.end.getTime(),u.current.props.end.getTime())-Math.max(e.start.getTime(),d.current.props.start.getTime()))*v;(E||[]).forEach((e=>{e.current&&(e.current.props.dragHint?p.push(e.current):e.current.props.resizeHint?g.push(e.current):m.push(e.current))})),x.current=((t,r,a)=>{const[n,l]=r,o=new Date(Math.min(l.props.end.getTime()-a,Math.max(e.start.getTime(),n.props.start.getTime()))),s=new Date(Math.max(o.getTime()+a,Math.min(e.end.getTime(),l.props.end.getTime())));return t.filter((t=>{const r=Math.max(Math.min(l.props.end.getTime()-a,t.props.start.getTime()),n.props.start.getTime()),c=Math.min(Math.max(r+a,t.props.end.getTime()),l.props.end.getTime());return t.props.id!==e.id&&t.props.group.index===e.group.index&&t.props.range.index===e.range.index&&(e.ignoreIsAllDay||t.props.isAllDay===e.isAllDay)&&W(new Date(r),new Date(c),o,s)&&W(n.props.start,l.props.end,t.props.start,t.props.end)}))})(m,[s.current,c.current],f),I.current=e.resizeHint||e.dragHint?0:((e,t)=>{const r=new Set;return t.forEach((e=>{void 0!==e._order&&null!==e._order&&r.add(e._order)})),G(Array.from(r))})(i.current,x.current);let _=1;e.resizeHint||e.dragHint||(_=((e,t)=>{let r=0;return t.forEach((e=>{void 0!==e._order&&null!==e._order&&r<e._order&&(r=e._order)})),r+1})(i.current,x.current),x.current.forEach((e=>{e._maxSiblingsPerSlot&&_<e._maxSiblingsPerSlot&&(_=e._maxSiblingsPerSlot)})),x.current.forEach((e=>{void 0!==e._maxSiblingsPerSlot&&null!==e._maxSiblingsPerSlot&&e._maxSiblingsPerSlot<_&&(e._maxSiblingsPerSlot=_)})));let N=0;const M=y;x.current.forEach((e=>{let t=0;void 0!==e._order&&null!==e._order&&e._order<I.current&&(t=b(e.element).top+b(e.element).height-M.top-1*I.current+1),t>N&&(N=t)}));M.width=e.vertical?M.width/_-1-20/_:A-1,M.height=e.vertical?A-1:(e.resizeHint||e.dragHint)&&_<=1?M.height:e.style&&e.style.height?e.style.height:25,M.left=e.vertical?M.left+(null!=(t=I.current)?t:0)+1*(null!=(r=I.current)?r:0)*M.width:M.left+(D<0?0:D),M.top=e.vertical?M.top+(D<0?0:D):M.top+N+1*(null!=(a=I.current)?a:0),C.current=_,w(o,M),S(!0),k(!0)},z=f.useCallback((e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame((()=>{M()}))),m.current={width:t.contentRect.width,height:t.contentRect.height}}),[M]);f.useEffect(M);const L=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return la({element:L,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect((()=>{if(!y.current)return;const e=window.ResizeObserver,t=e&&new e(z);return t&&t.observe(y.current),()=>{t&&t.disconnect()}}),[z,y]),f.createElement(p,{...s,_ref:i,_order:I,_maxSiblingsPerSlot:C,_siblings:x,itemRef:i,style:{visibility:D?void 0:"hidden",display:v?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===A?"caret-alt-right":"caret-alt-left",icon:"rtl"===A?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"reload",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"non-recurrence",icon:d.nonRecurrenceIcon})),!e.resizeHint&&f.createElement("div",{title:N},!e.isAllDay&&f.createElement(na,{className:"k-event-time"},N),f.createElement(na,null,e.title)))})),An={item:aa};xn.displayName="KendoReactSchedulerProportionalViewItem",e.AgendaView=ln,e.DATA_ACTION=J,e.DRAG_ITEM_ACTION=Ma,e.DateHeaderCell=Ha,e.DayView=$a,e.ITEMS_FOCUS_ACTION=Qt,e.ITEMS_SELECT_ACTION=Yt,e.MonthView=mn,e.REMOVE_ITEM_ACTION=_a,e.RESIZE_ITEM_ACTION=za,e.SERIES_ACTION=La,e.SHOW_OCCURRENCE_DIALOG_ACTION=Aa,e.SHOW_REMOVE_DIALOG_ACTION=Na,e.SLOTS_FOCUS_ACTION=Jt,e.SLOTS_SELECT_ACTION=jt,e.Scheduler=Tn,e.SchedulerActiveViewContext=fe,e.SchedulerDataContext=ye,e.SchedulerDateContext=Ee,e.SchedulerDateRangeContext=ue,e.SchedulerDrag=ya,e.SchedulerEditItem=Oa,e.SchedulerEditItemDragItemContext=Ca,e.SchedulerEditItemFormItemContext=Sa,e.SchedulerEditItemPropsContext=Da,e.SchedulerEditItemRemoveItemContext=Ia,e.SchedulerEditItemResizeItemContext=ba,e.SchedulerEditItemShowOccurrenceDialogContext=Ta,e.SchedulerEditItemShowRemoveDialogContext=wa,e.SchedulerEditSlot=Jr,e.SchedulerEditSlotFormItemContext=jr,e.SchedulerEditSlotPropsContext=Yr,e.SchedulerEditTask=an,e.SchedulerFieldsContext=oe,e.SchedulerFooter=Te,e.SchedulerForm=Gr,e.SchedulerFormEditor=Kr,e.SchedulerGroupsContext=ie,e.SchedulerHeader=be,e.SchedulerItem=aa,e.SchedulerItemContent=na,e.SchedulerOccurrenceDialog=ta,e.SchedulerOrientationContext=pe,e.SchedulerProportionalViewItem=xn,e.SchedulerPropsContext=re,e.SchedulerRemoveDialog=ra,e.SchedulerResize=fa,e.SchedulerSlot=Ur,e.SchedulerTask=ja,e.SchedulerViewItem=oa,e.SchedulerViewSlot=$r,e.SchedulerViewTask=Xa,e.SchedulerViewsContext=ne,e.TimeHeaderCell=kr,e.TimelineView=bn,e.WeekView=En,e.WorkWeekView=yn,e.agendaViewDefaultProps=sn,e.dateHeaderCellDefaultProps=Ka,e.dayViewDefaultProps=qa,e.monthViewDefaultProps=pn,e.schedulerDefaultProps=Rn,e.schedulerDragDefaultProps=va,e.schedulerEditItemDefaultProps=Fa,e.schedulerEditSlotDefaultProps=ea,e.schedulerEditTaskDefaultProps=nn,e.schedulerFormDefaultProps=Br,e.schedulerFormEditorDefaultProps=Vr,e.schedulerProportionalViewItemDefaultProps=An,e.schedulerResizeDefaultProps=ka,e.schedulerSlotDefaultProps=Zr,e.schedulerViewItemDefaultProps=sa,e.schedulerViewSlotDefaultProps=qr,e.schedulerViewTaskDefaultProps=Qa,e.timeHeaderCellDefaultProps=Dr,e.timeLineViewDefaultProps=In,e.useSchedulerActiveViewContext=ke,e.useSchedulerDataContext=ve,e.useSchedulerDateContext=he,e.useSchedulerDateRangeContext=me,e.useSchedulerEditItemDragItemContext=()=>f.useContext(Ca),e.useSchedulerEditItemFormItemContext=()=>f.useContext(Sa),e.useSchedulerEditItemPropsContext=()=>f.useContext(Da),e.useSchedulerEditItemRemoveItemContext=()=>f.useContext(Ia),e.useSchedulerEditItemResizeItemContext=()=>f.useContext(ba),e.useSchedulerEditItemShowOccurrenceDialogContext=()=>f.useContext(Ta),e.useSchedulerEditItemShowRemoveDialogContext=()=>f.useContext(wa),e.useSchedulerEditSlotFormItemContext=()=>f.useContext(jr),e.useSchedulerEditSlotPropsContext=()=>f.useContext(Yr),e.useSchedulerFieldsContext=se,e.useSchedulerGroupsContext=de,e.useSchedulerOrientationContext=ge,e.useSchedulerPropsContext=ae,e.useSchedulerViewsContext=le,e.weekViewDefaultProps=hn,e.workWeekDefaultProps=vn}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-date-math"),require("@progress/kendo-react-common"),require("@progress/kendo-data-query"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-recurrence")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-date-math","@progress/kendo-react-common","@progress/kendo-data-query","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-svg-icons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-dropdowns","@progress/kendo-recurrence"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScheduler={},e.React,e.PropTypes,e.KendoDateMath,e.KendoReactCommon,e.KendoDataQuery,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactDateinputs,e.KendoReactPopup,e.KendoSvgIcons,e.ReactDOM,e.KendoReactForm,e.KendoReactDialogs,e.KendoReactLabels,e.KendoReactInputs,e.KendoReactDropdowns,e.KendoRecurrence)}(this,(function(e,t,r,a,n,l,o,s,c,i,d,u,m,p,g,E,h,y){"use strict";function v(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var f=v(t),k=v(u);const D=(e,t=0,r=0,a=[])=>{if(e.length<=t)return[a];const n=[];return e[t].data.map((l=>{n.push(...D(e,t+1,r+1,[...a,{...l,field:e[t].field,valueField:e[t].valueField,colorField:e[t].colorField,multiple:e[t].multiple}]))})),n};function S(e,t){const r=[];if(!t||!t.length)return r;if(e&&e.resources&&e.resources.length){const a=e.resources;for(let e=0;e<a.length;e++){const n=t.find((t=>t.name===a[e]));r.push(n)}}return r}const C=(e,t=e.length-1)=>{const r=Math.max(0,t),a=[];e&&e.length||(e=[{}]);const n=(e[r].data||[]).map((t=>({...t,text:t[e[r].textField]})))||[],l=n.length;let o=1;for(let t=0;t<=r;t++)o*=(e[t].data||[]).length||1;for(let e=0;e<o;e++)n[e%l]&&a.push(n[e%l]);return a},b=e=>{if(!e)return{top:0,left:0,width:0,height:0,right:0};return{top:e.offsetTop,left:e.offsetLeft,right:e.offsetParent?e.offsetParent.offsetWidth-(e.offsetLeft+e.offsetWidth):0,width:e.offsetWidth,height:e.offsetHeight}},I=(e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"paddingLeft":"paddingTop"]||"0")+parseFloat(window.getComputedStyle(e)[t?"paddingRight":"paddingBottom"]||"0"),w=(e,t,r=!1)=>{e&&(void 0!==t.top&&(e.style.top=`${t.top}px`),void 0!==t.left&&(e.style.left=`${t.left}px`),void 0!==t.width&&(e.style.width=`${t.width}px`),void 0!==t.height&&!r&&(e.style.height="number"==typeof t.height?`${t.height}px`:t.height),r&&(e.style.minHeight=void 0!==t.height&&t.height>0?`${t.height}px`:""))},T=e=>e[0],R=e=>e[e.length-1],x=e=>{const t=new Set;return e.forEach((e=>{t.add(e.field)})),t.size===e.length};const A=(e,t,r,a=0)=>{if(a===r)return null;let n=null;const l=document.elementFromPoint(e,t);if(!l)return n;if("true"===l.getAttribute("data-slot"))return l;const o=l.style.pointerEvents;return l.style.pointerEvents="none",n=A(e,t,r,a+1),l.style.pointerEvents=o,n},_=(e,t)=>n.getter(t)(e),N=(e,t,r)=>{if(t)return n.setter(t)(e,r)},M=e=>null!=e;function z(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const L=(e,t,r)=>{const a=O(e,t)?_(e,t.id):_(e,t.recurrenceId);return r.find((e=>_(e,t.id)===a))},O=(e,t)=>{const r=_(e,t.id),a=_(e,t.recurrenceId),n=_(e,t.recurrenceRule);return!(!r||!n||null!=a)},F=(e,t)=>Math.max(e.getTime(),t.getTime()),P=(e,t)=>Math.min(e.getTime(),t.getTime()),W=(e,t,r,a,n=!1)=>n?F(t,a)-P(e,r)<=t.getTime()-e.getTime()+(a.getTime()-r.getTime()):F(t,a)-P(e,r)<t.getTime()-e.getTime()+(a.getTime()-r.getTime()),H={id:"id",start:"start",startTimezone:"startTimezone",originalStart:"originalStart",end:"end",endTimezone:"endTimezone",isAllDay:"isAllDay",title:"title",description:"description",recurrenceRule:"recurrenceRule",recurrenceId:"recurrenceId",recurrenceExceptions:"recurrenceExceptions"},K=(e,t,r)=>(t.getHours()<e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()<=e.getMinutes())&&(e.getHours()<r.getHours()||r.getHours()===e.getHours()&&e.getMinutes()<r.getMinutes()),V=(e,t,r)=>t<r?t<=e&&e<=r:e<=r||t<=e,G=e=>{let t=0;const r=e.slice();return r.sort(((e,t)=>e-t)).forEach(((e,a)=>{r[a]===a&&(t=a+1)})),t},B=(e,t,r=!1)=>{t.forEach((e=>e.items.splice(0,e.items.length))),t.forEach((t=>{const a=[];e.forEach((e=>{if((r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&e.group.index===t.group.index&&W(e.start,e.end,t.start,t.end)){const r=G(a);(null===e.order||void 0===e.order||e.order<r)&&(e.order=r),a.splice(e.order,0,e.order),t.items.push(e)}}))}))},U=(e,t,r=!1)=>{e.forEach((e=>e.slots.splice(0,e.slots.length))),e.forEach((e=>{t.forEach((t=>{(r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&e.group.index===t.group.index&&W(e.start,e.end,t.start,t.end)&&e.slots.push(t)}))}))},Z=(...e)=>{},$=(e,t,r=!1,a=!1)=>{const n=e.current;if(!n||!t)return null;const o=t.filter((e=>null!==e.current&&null!==e.current.element)),s=l.orderBy(o,[{field:"current.props.group.index",dir:"asc"},{field:"current.props.range.index",dir:"asc"},r?{field:""}:{field:"current.props.isAllDay",dir:"desc"},{field:"current.props.start",dir:"asc"}]),c=s.findIndex((e=>null!==e.current&&!(e.current.props.uid!==n.props.uid||void 0!==e.current.props.occurrenceId&&e.current.props.occurrenceId!==n.props.occurrenceId||e.current.props.group.index!==n.props.group.index||e.current.props.range.index!==n.props.range.index||!r&&e.current.props.isAllDay!==n.props.isAllDay)));return s[c+(a?-1:1)]},q=(e,t)=>(e.order||0)-(t.order||0),Y=6e4,j=[{}],X=new Date(1900,0,1),Q=new Date(2099,11,31);a.ZonedDate.fromLocalDate(X),a.ZonedDate.fromLocalDate(Q);var J=(e=>(e[e.create=0]="create",e[e.update=1]="update",e[e.remove=2]="remove",e))(J||{});const ee=f.createContext({current:null}),te=()=>f.useContext(ee);ee.displayName="SchedulerElementContext";const re=f.createContext({}),ae=()=>f.useContext(re);re.displayName="SchedulerPropsContext";const ne=f.createContext([]),le=()=>f.useContext(ne);ne.displayName="SchedulerViewsContext";const oe=f.createContext(H),se=()=>f.useContext(oe);oe.displayName="SchedulerFieldsContext";const ce=f.createContext({dateFormat:"{0:D}",shortDateFormat:"{0:d}"});ce.displayName="SchedulerDateFormatContext";const ie=f.createContext([{index:0,resources:[]}]),de=()=>f.useContext(ie);ie.displayName="SchedulerGroupsContext";const ue=f.createContext({start:new Date,end:new Date,zonedStart:a.ZonedDate.fromLocalDate(new Date),zonedEnd:a.ZonedDate.fromLocalDate(new Date)}),me=()=>f.useContext(ue);ue.displayName="SchedulerDateRangeContext";const pe=f.createContext(null),ge=()=>f.useContext(pe);pe.displayName="SchedulerOrientationContext";const Ee=f.createContext([new Date,Z]),he=()=>f.useContext(Ee);Ee.displayName="SchedulerDateContext";const ye=f.createContext([[],Z]),ve=()=>f.useContext(ye);ye.displayName="SchedulerDataContext";const fe=f.createContext(["day",Z]),ke=()=>f.useContext(fe);fe.displayName="SchedulerActiveViewContext";const De=f.createContext([null,()=>{}]);De.displayName="SchedulerItemSelectionContext";const Se=({children:e,element:t,props:r,views:a,fields:n,groups:l,dateRange:o,dateFormat:s,orientation:c,date:i,data:d,activeView:u,selection:m})=>f.createElement(ee.Provider,{value:t},f.createElement(re.Provider,{value:r},f.createElement(ne.Provider,{value:a},f.createElement(oe.Provider,{value:n},f.createElement(ce.Provider,{value:s},f.createElement(ie.Provider,{value:l},f.createElement(ue.Provider,{value:o},f.createElement(pe.Provider,{value:c},f.createElement(Ee.Provider,{value:i},f.createElement(ye.Provider,{value:d},f.createElement(fe.Provider,{value:u},f.createElement(De.Provider,{value:m},e)))))))))))),Ce=(e,t,r)=>{const[a,n]=f.useState(t||e),l=f.useCallback(((e,t)=>{n(e),r&&r.call(void 0,{...t,value:e})}),[r,n]);return[void 0!==t?t:a,l]},be=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,(()=>({element:l.current,props:e}))),f.useImperativeHandle(t,(()=>o.current));const c=f.useMemo((()=>n.classNames("k-scheduler-toolbar",r)),[r]);return f.createElement(s.Toolbar,{id:e.id,ref:e=>{e&&(l.current=e.element)},className:c,...a},e.children)}));be.displayName="KendoReactSchedulerHeader";const Ie=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,(()=>({element:l.current,props:e}))),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames(r),...a},e.children)}));Ie.displayName="KendoReactSchedulerSchedulerNavigation";const we=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,(()=>({element:l.current,props:e}))),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-views",r),...a},e.children)}));we.displayName="KendoReactSchedulerViewSelector";const Te=f.forwardRef(((e,t)=>{const{className:r,style:a,...l}=e,o=f.useRef(null),c=f.useRef(null);f.useImperativeHandle(o,(()=>({element:c.current,props:e}))),f.useImperativeHandle(t,(()=>o.current));const i=f.useMemo((()=>n.classNames("k-scheduler-footer",e.className)),[e.className]);return f.createElement(s.Toolbar,{ref:e=>{e&&(c.current=e.element)},className:i,style:{boxShadow:"none",...a},...l},e.children)}));Te.displayName="KendoReactSchedulerFooter";const Re="scheduler.allEvents",xe="scheduler.allDay",Ae="scheduler.today",_e="scheduler.timelineViewTitle",Ne="scheduler.weekViewTitle",Me="scheduler.workWeekViewTitle",ze="scheduler.agendaViewTitle",Le="scheduler.dayViewTitle",Oe="scheduler.monthViewTitle",Fe="scheduler.deleteTitle",Pe="scheduler.previousTitle",We="scheduler.nextTitle",He="scheduler.showFullDay",Ke="scheduler.showWorkDay",Ve="scheduler.editOccurrence",Ge="scheduler.editSeries",Be="scheduler.editRecurringConfirmation",Ue="scheduler.editRecurringDialogTitle",Ze="scheduler.editSave",$e="scheduler.editCancel",qe="scheduler.editorTitle",Ye="scheduler.editorEventTitle",je="scheduler.editorEventStart",Xe="scheduler.editorEventStartTimeZone",Qe="scheduler.editorEventEnd",Je="scheduler.editorEventEndTimeZone",et="scheduler.editorEventAllDay",tt="scheduler.editorEventDescription",rt="scheduler.editorEventSeparateTimeZones",at="scheduler.editorEventTimeZone",nt="scheduler.recurrenceEditorRepeat",lt="scheduler.recurrenceEditorWeeklyRepeatOn",ot="scheduler.recurrenceEditorMonthlyDay",st="scheduler.recurrenceEditorMonthlyRepeatOn",ct="scheduler.recurrenceEditorYearlyOf",it="scheduler.recurrenceEditorYearlyRepeatOn",dt="scheduler.recurrenceEditorEndAfter",ut="scheduler.recurrenceEditorEndOccurrence",mt="scheduler.recurrenceEditorEndLabel",pt="scheduler.recurrenceEditorEndNever",gt="scheduler.recurrenceEditorEndOn",Et="scheduler.editorDelete",ht="scheduler.deleteConfirmation",yt="scheduler.deleteRecurringConfirmation",vt="scheduler.deleteOccurrence",ft="scheduler.deleteSeries",kt="scheduler.deleteDialogTitle",Dt="scheduler.deleteRecurringDialogTitle",St="scheduler.dateTitle",Ct="scheduler.timeTitle",bt="scheduler.eventTitle",It="scheduler.editorValidationRequired",wt="scheduler.editorValidationStart",Tt="scheduler.editorValidationEnd",Rt="scheduler.noEvents",xt="scheduler.moreEvents",At={[It]:"Field is required.",[wt]:"Start time must be before End time.",[Tt]:"End time must be after Start time.",[Re]:"All events",[xe]:"all day",[Ae]:"Today",[Le]:"Day",[Oe]:"Month",[Ne]:"Week",[Me]:"Work Week",[_e]:"Timeline",[ze]:"Agenda",[Fe]:"Delete",[Pe]:"Previous",[We]:"Next",[He]:"Show full day",[Ke]:"Show business hours",[Ve]:"Edit current occurrence",[Ge]:"Edit the series",[Be]:"Do you want to edit only this event occurrence or the whole series?",[Ue]:"Edit Recurring Item",[Ze]:"Save",[$e]:"Cancel",[Et]:"Delete",[qe]:"Event",[Ye]:"Title",[je]:"Start",[Xe]:"Start Time Zone",[Qe]:"End",[Je]:"End Time Zone",[et]:"All Day Event",[tt]:"Description",[rt]:"End in different Time Zone",[at]:"Specify Time Zone",[nt]:"Repeat","scheduler.recurrenceEditorDailyInterval":"day(s)","scheduler.recurrenceEditorDailyRepeatEvery":"Repeat every","scheduler.recurrenceEditorWeeklyInterval":"week(s)","scheduler.recurrenceEditorWeeklyRepeatEvery":"Repeat every",[lt]:"Repeat on",[ot]:"Day","scheduler.recurrenceEditorMonthlyInterval":"month(s)","scheduler.recurrenceEditorMonthlyRepeatEvery":"Repeat every",[st]:"Repeat on",[ct]:"of","scheduler.recurrenceEditorYearlyRepeatEvery":"Repeat every",[it]:"Repeat on","scheduler.recurrenceEditorYearlyInterval":"year(s)","scheduler.recurrenceEditorFrequenciesDaily":"Daily","scheduler.recurrenceEditorFrequenciesMonthly":"Monthly","scheduler.recurrenceEditorFrequenciesNever":"Never","scheduler.recurrenceEditorFrequenciesWeekly":"Weekly","scheduler.recurrenceEditorFrequenciesYearly":"Yearly","scheduler.recurrenceEditorOffsetPositionsFirst":"First","scheduler.recurrenceEditorOffsetPositionsSecond":"Second","scheduler.recurrenceEditorOffsetPositionsThird":"Third","scheduler.recurrenceEditorOffsetPositionsFourth":"Fourth","scheduler.recurrenceEditorOffsetPositionsLast":"Last","scheduler.recurrenceEditorWeekdaysDay":"Day","scheduler.recurrenceEditorWeekdaysWeekday":"Weekday","scheduler.recurrenceEditorWeekdaysWeekendday":"Weekend Day",[dt]:"After",[ut]:"occurrence(s)",[mt]:"End",[pt]:"Never",[gt]:"On",[ht]:"Are you sure you want to delete this event?",[yt]:"Do you want to delete only this event occurrence or the whole series?",[vt]:"Delete current occurrence",[ft]:"Delete the series",[kt]:"Delete Event",[Dt]:"Delete Recurring Item",[St]:"Date",[Ct]:"Time",[bt]:"Event",[Rt]:"no events",[xt]:"More events"},_t=f.forwardRef(((e,t)=>{var r;const l=f.useRef(null),u=f.useRef(null);f.useImperativeHandle(t,(()=>l.current));const{timezone:m}=ae(),p=a.ZonedDate.fromLocalDate(e.value,m),g=a.getDate(p),E=te(),h=n.useWindow(E),[y,v]=f.useState("desktop"),[k,D]=f.useState(!1),[S,C]=f.useState(!1),b=o.useInternationalization(),{dateFormat:I,shortDateFormat:w}=f.useContext(ce),T=me(),[R]=he(),x=T.end.getTime()-T.start.getTime()>27*a.MS_PER_DAY,A=b.format(I,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),_=b.format(w,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),N=f.useCallback((()=>{D(!k)}),[k]),M=f.useCallback((()=>{C(!0)}),[]),L=f.useCallback((()=>{D(!1),C(!1)}),[]),O=f.useCallback((t=>{if(e.onChange){const r=a.ZonedDate.fromUTCDate(z(t.value),m);e.onChange.call(void 0,{...t,value:r})}D(!1)}),[e.onChange,m]),F=f.useCallback((()=>{h().matchMedia&&v(h().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")}),[h]);f.useEffect((()=>{F();const e=h().ResizeObserver,t=e&&new e(F);return t&&t.observe(E.current),()=>{e&&t.disconnect()}}),[F,E,h]),f.useEffect((()=>{k&&S&&u.current&&u.current.focus()}),[S,k]);const{onFocus:P,onBlur:W}=n.useAsyncFocusBlur({onFocus:M,onBlur:L});return f.createElement(f.Fragment,null,f.createElement(s.Button,{ref:l,onFocus:P,onBlur:W,fillMode:"flat",className:"k-nav-current",icon:"calendar",svgIcon:d.calendarIcon,"aria-live":"polite",tabIndex:-1,onClick:N},"desktop"===y?A:_),f.createElement(i.Popup,{anchor:null==(r=l.current)?void 0:r.element,show:k},f.createElement(c.Calendar,{ref:u,onFocus:P,onBlur:W,onChange:O,value:g})))}));_t.displayName="KendoReactSchedulerNavigationDatePicker";const Nt=e=>{const[t,r]=ke(),a=o.useLocalization(),n=f.useMemo((()=>"function"==typeof e.view.title?e.view.title.call(void 0,a):e.view.title),[e.view.title,a]),l=f.useCallback((()=>{e.view.name&&r(e.view.name)}),[r,e.view.name]);return f.createElement(s.Button,{className:"k-toolbar-button",role:"button",type:"button",tabIndex:-1,togglable:!0,selected:e.view.name===t,onClick:l},n)},Mt=f.forwardRef((()=>{const e=f.useRef(null),[t,r]=f.useState("desktop"),a=le(),l=n.useWindow(e),[c,i]=ke(),u=a.find((e=>e.props.name===c)),m=o.useLocalization(),p=f.useCallback((e=>{i&&(e.syntheticEvent.preventDefault(),i(e.item.name))}),[i]),g=()=>{l().matchMedia&&r(l().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")};return f.useEffect((()=>{g();const t=l().ResizeObserver,r=t&&new t(g);return r&&r.observe(e.current),()=>{r&&r.disconnect()}}),[]),f.createElement("div",{className:n.classNames("k-toolbar-button-group k-button-group k-button-group-solid",{"k-scheduler-views":"desktop"===t,"k-scheduler-tools":"mobile"===t}),role:"group",ref:e},u&&"mobile"===t&&f.createElement(s.DropDownButton,{className:"k-views-dropdown",onItemClick:p,popupSettings:{popupClass:"k-scheduler-toolbar"},textField:"title",items:a.map((e=>({...e.props,selected:e.props.name===c,title:"function"==typeof e.props.title?e.props.title.call(void 0,m):e.props.title}))),text:f.createElement(f.Fragment,null,"function"==typeof u.props.title?u.props.title.call(void 0,m):u.props.title,f.createElement(n.IconWrap,{name:"caret-alt-down",icon:d.caretAltDownIcon}))}),"desktop"===t&&f.createElement(f.Fragment,null,a.map((e=>f.createElement(Nt,{key:e.props.name,view:e.props})))))}));Mt.displayName="KendoReactSchedulerViewSelectorList";const zt=f.forwardRef(((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,(()=>({element:l.current,props:e}))),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-navigation",r),...a},e.children)})),Lt=f.createContext({});Lt.displayName="SchedulerViewPropsContext";const Ot=f.createContext([]),Ft=()=>f.useContext(Ot);Ot.displayName="SchedulerViewRangesContext";const Pt=f.createContext([[],Z]),Wt=()=>f.useContext(Pt);Pt.displayName="SchedulerViewSlotsContext";const Ht=f.createContext([[],Z]),Kt=()=>f.useContext(Ht);Ht.displayName="SchedulerViewItemsContext";const Vt=f.createContext([[],Z]);Vt.displayName="SchedulerViewSelectedSlotsContext";const Gt=f.createContext([[],Z]),Bt=()=>f.useContext(Gt);Gt.displayName="SchedulerViewSelectedItemsContext";const Ut=f.createContext([[],Z]);Ut.displayName="SchedulerViewFocusedItemsContext";const Zt=f.createContext([[],Z]),$t=()=>f.useContext(Zt);Zt.displayName="SchedulerViewFocusedSlotsContext";const qt=({children:e,props:t,ranges:r,slots:a,items:n,selectedSlots:l,selectedItems:o,focusedItems:s,focusedSlots:c})=>f.createElement(Lt.Provider,{value:t},f.createElement(Ot.Provider,{value:r},f.createElement(Pt.Provider,{value:a},f.createElement(Ht.Provider,{value:n},f.createElement(Vt.Provider,{value:l},f.createElement(Gt.Provider,{value:o},f.createElement(Ut.Provider,{value:s},f.createElement(Zt.Provider,{value:c},e))))))));var Yt=(e=>(e.select="ITEMS_SELECT_SELECT",e.selectNext="ITEMS_SELECT_SELECT_NEXT",e.selectPrev="ITEMS_SELECT_SELECT_PREV",e.reset="ITEMS_SELECT_RESET",e.add="ITEMS_SELECT_ADD",e.remove="ITEMS_SELECT_REMOVE",e))(Yt||{});var jt=(e=>(e.select="SLOTS_SELECT_SELECT",e.reset="SLOTS_SELECT_RESET",e.add="SLOTS_SELECT_ADD",e))(jt||{});const Xt=(e,t)=>{const{element:r}=e;n.useIsomorphicLayoutEffect((()=>{if(!r||!r.current)return;const t=[],a=[],n=[],l=r.current.querySelectorAll(e.selector);l.forEach((r=>{const l=r.getBoundingClientRect().width,o=e.explicitDepth&&void 0!==e.attribute?r.getAttribute(e.attribute):0,s=I(r,!0),c=((e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"borderLeftWidth":"borderTopWidth"]||"0")+parseFloat(window.getComputedStyle(e)[t?"borderRightWidth":"borderBottomWidth"]||"0"))(r,!0);null!==o&&((!n[o]||c>n[o])&&(n[o]=c),(!a[o]||s>a[o])&&(a[o]=s),(!t[o]||l>t[o])&&(t[o]=l))})),l.forEach((r=>{const l=e.explicitDepth?r.getAttribute(e.attribute):0;null!==l&&(r.style.minWidth=t[l]-a[l]-n[l]+"px")}))}),t)};var Qt=(e=>(e.next="ITEMS_FOCUS_NEXT",e.prev="ITEMS_FOCUS_PREV",e))(Qt||{});var Jt=(e=>(e.up="SLOT_FOCUS_UP",e.down="SLOT_FOCUS_DOWN",e.left="SLOT_FOCUS_LEFT",e.right="SLOT_FOCUS_RIGHT",e))(Jt||{});const er=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row-1&&t.current.props.col===e.current.props.col)),tr=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col-1)),rr=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col+1)),ar=(e,t)=>t.find((t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row+1&&t.current.props.col===e.current.props.col)),nr=f.forwardRef(((e,t)=>{const r=f.useRef(null);f.useImperativeHandle(t,(()=>r.current));const[a,l]=n.useCollection([]),[o,s]=n.useCollection([]),[c,i]=(e=>[[],(t,r)=>{switch(t.type){case"ITEMS_FOCUS_NEXT":{if(!t.item||!t.item.current||!e)return;const a=$(t.item,e,t.ignoreIsAllDay,!1);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"ITEMS_FOCUS_PREV":{if(!t.item||!t.item.current||!e)return;const a=$(t.item,e,t.ignoreIsAllDay,!0);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(a),[d,u]=(e=>[[],(t,r)=>{switch(t.type){case"SLOT_FOCUS_UP":{if(!t.slot.current||!e)return;const a=er(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_DOWN":{if(!t.slot||!e)return;const a=ar(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_LEFT":{if(!t.slot||!e)return;const a=tr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_RIGHT":{if(!t.slot||!e)return;const a=rr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(o),[m,p]=(e=>{const[t,r]=f.useState([]),a=f.useCallback(((a,n)=>{switch(a.type){case"ITEMS_SELECT_SELECT":if(!a.item)return;r([a.item]);break;case"ITEMS_SELECT_SELECT_NEXT":{if(!a.item||!a.item.current||!e)return;const t=$(a.item,e,a.ignoreIsAllDay,!1);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_SELECT_PREV":{if(!a.item||!a.item.current||!e)return;const t=$(a.item,e,a.ignoreIsAllDay,!0);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_RESET":r([]);break;case"ITEMS_SELECT_ADD":if(!a.item)return;t.some((e=>e===a.item))||r([...t,a.item]);break;case"ITEMS_SELECT_REMOVE":if(!a.item)return;r([...t.filter((e=>e!==a.item))])}}),[e,t]);return[t,a]})(a),[g,E]=(e=>{const[t,r]=f.useState([]),a=f.useCallback((e=>{switch(e.type){case"SLOTS_SELECT_SELECT":if(!e.slot)return;r([e.slot]);break;case"SLOTS_SELECT_RESET":r([]);break;case"SLOTS_SELECT_ADD":if(!e.slot)return;t.some((t=>t===e.slot))||r([...t,e.slot])}}),[t]);return[t,a]})(),h=f.useCallback(((e,t)=>{E({type:jt.reset}),p(e,t)}),[p,E]),y=f.useCallback(((e,t)=>{p({type:Yt.reset},t),E(e)}),[p,E]),v=f.useMemo((()=>n.classNames("k-scheduler-layout k-scheduler-layout-flex",e.className)),[e.className]);return Xt({element:r,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),Xt({element:r,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1}),f.createElement(qt,{props:e.props,ranges:e.ranges,items:[a,l],slots:[o,s],selectedItems:[m,h],selectedSlots:[g,y],focusedItems:[c,i],focusedSlots:[d,u]},f.createElement("div",{ref:r,style:e.style,className:v,role:"presentation"},e.children))}));nr.displayName="KendoReactSchedulerBaseView";const lr=f.createContext({resource:{},groupIndex:0}),or=e=>{const{nested:t,children:r,rowContentProps:a}=e,n=e.rowContent||ir,l=e.childRowContent||n,o=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group k-group-horizontal"},t?sr({resources:o,children:r,nested:t,groupIndex:0,rowContent:n,rowContentProps:a,childRowContent:l}):cr({resources:o,children:r,rowContent:n,nested:!!t,groupIndex:0,rowContentProps:a,childRowContent:l}))},sr=e=>{const{resources:t,rowContent:r,nested:a,children:n,groupIndex:l,rowContentProps:o,childRowContent:s}=e;if(l===t.length)return cr({resources:t,rowContent:r,children:n,nested:a,groupIndex:l,rowContentProps:o,childRowContent:s});const c=C(t,l),i=r;return f.createElement(f.Fragment,null,a?f.createElement("div",{className:"k-scheduler-row"},f.createElement(i,{resources:t,groupIndex:l,...o},c.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text))))):f.createElement(i,{resources:t,groupIndex:l,...o},c.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text)))),sr({resources:t,children:n,nested:a,rowContent:r,childRowContent:s,groupIndex:l+1}))},cr=e=>{const{resources:t,childRowContent:r,children:a,rowContentProps:n}=e,l=C(t,t.length-1),o=r,s=t.length>0;return f.createElement("div",{className:"k-scheduler-row"},f.createElement(o,{resources:t,...n},(l.length?l:j).map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell"},f.createElement(lr.Provider,{value:{resource:e,groupIndex:s?t:0}},a))))))};or.displayName="KendoReactSchedulerHorizontalResourceIterator";const ir=e=>e.children,dr=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-side-cell","data-range-index":e.rangeIndex}),e.children),ur=e=>{const{nested:t,wrapGroup:r,children:a}=e,n=e.cellContent||vr,l=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group"},t?r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},gr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},pr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!1))):pr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!0):r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},mr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},a)):Er({resources:l,children:a,cellContent:n,depth:0,groupIndex:0}))},mr=e=>f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-row"},e.resources.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-resource-cell k-heading-cell","data-depth-index":t}))))),pr=(e,t=!0)=>{const{resources:r,children:a,cellContent:n,groupIndex:l,depth:o}=e,s=r.length>0;if(o===r.length||!s)return f.createElement(lr.Provider,{value:{resource:r[o],groupIndex:s?l:0}},a);const c=r[o].data.length;return r[o].data.map(((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},t&&f.createElement("div",{className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":o},e[r[o].textField]),f.createElement("div",{className:"k-scheduler-cell k-group-content k-resource-row","data-depth-index":o,"data-resource-index":c*l+s},pr({resources:r,children:a,cellContent:n,groupIndex:c*l+s,depth:o+1},t)))))},gr=e=>{const{resources:t,children:r,cellContent:a,groupIndex:n,depth:l}=e,o=t.length?t[l].data.length:0;return t[l]?t[l].data.map(((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-cell k-resource-cell k-resource-row k-heading-cell","data-depth-index":l,"data-resource-index":o*n+s},e[t[l].textField]),l+1!==t.length&&f.createElement("div",{className:"k-scheduler-cell k-resource-content"},gr({resources:t,children:r,cellContent:a,groupIndex:o*n+s,depth:l+1}))))):null},Er=e=>{const{resources:t,children:r,groupIndex:a,cellContent:n}=e;return f.createElement("div",{className:"k-scheduler-row"},yr(t),n,hr(r,t,a))},hr=(e,t,r)=>{const a=t.length>0;return f.createElement("div",{className:"k-scheduler-cell k-group-content"},f.createElement(lr.Provider,{value:{resource:t[r],groupIndex:a?r:void 0}},e))},yr=e=>e.map(((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":t})));ur.displayName="KendoReactSchedulerVerticalResourceIterator";const vr=null,fr=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day"},t.toLanguageString(xe,At[xe])),e.children)},kr=f.forwardRef(((e,t)=>{const{as:r=Dr.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo((()=>n.classNames("k-scheduler-cell k-heading-cell",e.className)),[e.className]);return f.useImperativeHandle(s,(()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e}))),f.useImperativeHandle(t,(()=>s.current)),f.createElement(r,{ref:r!==Dr.as?void 0:l,...a,className:i},c.formatDate(e.date,e.format?e.format:Dr.format))})),Dr={as:f.forwardRef((({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l}))),format:"t"};kr.displayName="KendoReactSchedulerTimeHeaderCell";const Sr=e=>{const{slot:t,children:r}=e;return f.createElement(f.Fragment,null,e.isMaster?f.createElement(kr,{as:e.timeHeaderCell,date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd,className:n.classNames("k-side-cell",{"k-major-cell":!e.isLast})}):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell"}),r)},Cr=e=>{const{onChange:t,data:r,validationMessage:a,visited:n,touched:o,modified:s,...c}=e,[i,d]=f.useState(r),u=f.useCallback((e=>t(e)),[t]),m=f.useCallback((e=>{const t=l.filterBy(r||[],e.filter);d(t)}),[]);return f.createElement(h.ComboBox,{style:{width:"100%"},data:i,filterable:!0,onFilterChange:m,onChange:u,...c})},br=e=>{const{value:t,data:r,onChange:a,...n}=e,l=f.useCallback((e=>{a&&a.call(void 0,e.currentTarget.dataset.value)}),[a]);return f.createElement(s.ButtonGroup,{className:"k-scheduler-recurrence-repeat",width:"100%",...n},r.map((e=>f.createElement(s.Button,{type:"button",key:e.value,selected:e.value===t,onClick:l,"data-value":e.value,togglable:!0},e.text))))},Ir=e=>e.charAt(0).toUpperCase()+e.slice(1),wr=["first","second","third","fourth","last"],Tr=["never","daily","weekly","monthly","yearly"],Rr=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],xr=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],Ar=[{day:0,offset:0},{day:6,offset:0}],_r=e=>{switch(e){case"day":return Rr;case"weekday":return xr;case"weekend":return Ar}},Nr=e=>{const{value:t,data:r,onChange:a,...n}={...Mr,...e},l=r=>{const a=Number(r.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some((e=>e===a))?t.filter((e=>e!==a)):[...t,a])};return f.createElement(s.ButtonGroup,{width:"auto",...n},(e.data||Mr.data).map((e=>f.createElement(s.Button,{type:"button",key:e.value,"data-key":e.value,selected:t.some((t=>t===e.value)),togglable:!0,onClick:l},Ir(e.text)))))},Mr={data:[],value:[]},zr=e=>{const t=o.useInternationalization(),r=o.useLocalization(),{timezone:n}=ae(),[l,s]=f.useState(1),[i,d]=f.useState(a.ZonedDate.fromUTCDate(e.start)),u=f.useCallback(((e,t)=>{const a=t?e:"scheduler.recurrenceEditor"+e;return r.toLanguageString(a,At[a])}),[r]),p=f.useMemo((()=>{var t;return(e=>y.parseRule({recurrenceRule:e})||{})(null!=(t=e.value)?t:Or.value)}),[e.value]),v=f.useMemo((()=>(e=>Tr.map((t=>({value:t,text:e("Frequencies"+Ir(t))}))))(u)),[u]),k=f.useMemo((()=>(e=>M(e)&&!(e=>(e=>null==e)(e)||e.trim&&0===e.trim().length)(e.freq)?e.freq:"never")(p)),[p]),D=f.useMemo((()=>((e,t)=>{const r=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map(((e,t)=>({text:e,value:t}))),n=a.slice(r).concat(a.slice(0,r));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(n)})(t,u)),[t,u]),S=f.useMemo((()=>((e,t,r)=>{var a;let n;if(M(t.byWeekDay))switch(t.byWeekDay.length){case 7:n="day";break;case 5:n="weekday";break;case 2:n="weekend";break;case 1:n=t.byWeekDay[0].day;break;default:n=r.getDay()}else n=r.getDay();return null!=(a=e.find((e=>n===e.value)))?a:e[0]})(D,p,e.start)),[D,p,e.start]),C=f.useMemo((()=>(e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map(((e,t)=>({text:e,value:t+1}))))(t)),[t]),b=f.useMemo((()=>((e,t)=>e.find((e=>(t.byMonth?t.byMonth[0]:null)===e.value))||e[0])(C,p)),[C,p]),I=f.useMemo((()=>(e=>{const t=[1,2,3,4,-1];return wr.map(((r,a)=>({text:e("OffsetPositions"+Ir(r)),value:t[a]})))})(u)),[u]),w=f.useMemo((()=>((e,t)=>e.find((e=>e.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1)))||e[0])(I,p)),[I,p]),T=f.useMemo((()=>(e=>M(e.count)?"count":M(e.until)?"until":"never")(p)),[p]),R=f.useMemo((()=>((e,t)=>M(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate())(p,e.start)),[p,e.start]),x=f.useMemo((()=>(e=>M(e.until)?a.toLocalDate(e.until):null)(p)),[p.until]),A=f.useMemo((()=>(e=>{const t=e.firstDay(),r=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map(((e,t)=>({text:e,value:t})));return r.slice(t).concat(r.slice(0,t))})(t)),[t]),_=f.useMemo((()=>(e=>M(e.byWeekDay)?"weekday":M(e.byMonthDay)?"monthday":void 0)(p)),[p.byWeekDay,p.byMonthDay]),N=f.useCallback((r=>{"never"===r.freq?e.onChange({value:null}):(void 0===r.weekStart&&(r.weekStart=t.firstDay()),e.onChange({value:y.serializeRule(r,e.timezone)}))}),[e.onChange,e.timezone]),z=f.useCallback((t=>{const r={};r.freq=t,r.interval=1,"weekly"===t&&(r.byWeekDay=[{day:a.ZonedDate.fromLocalDate(e.start,n).getDay(),offset:0}]),("monthly"===t||"yearly"===t)&&(r.byMonthDay=[e.start.getDate()]),"yearly"===t&&(r.byMonth=[e.start.getMonth()+1]),N(r)}),[N,e.start,n]),L=f.useCallback((e=>{const t=e.value;N(Object.assign({},p,{interval:t}))}),[N,p]),O=f.useCallback((e=>{const t=e.value;N(Object.assign({},p,{count:t})),null!==t&&s(t)}),[N,p]),F=f.useCallback((t=>{const r=t.value;if(!r)return;const n=a.ZonedDate.fromLocalDate(r,e.timezone);N(Object.assign({},p,{until:n})),d(n)}),[N,p,e.timezone]),P=f.useCallback((e=>{N(Object.assign({},p,{byWeekDay:A.filter((t=>e.some((e=>e===t.value)))).map((e=>({offset:0,day:e.value})))}))}),[N,p,A]),W=f.useCallback((e=>{const t=Object.assign({},p),r=e.target.value;"string"==typeof r.value?(t.byWeekDay=_r(r.value),t.bySetPosition=[w.value]):(t.bySetPosition=void 0,t.byWeekDay=[{day:r.value,offset:w.value}]),N(t)}),[w.value,N,p]),H=f.useCallback((e=>{N(Object.assign({},p,{byMonthDay:[e.value]}))}),[N,p]),K=f.useCallback((e=>{const t=e.value;N(Object.assign({},p,{byMonth:[t.value]}))}),[N,p]),V=f.useCallback((e=>{const t=e.value,r=Object.assign({},p);switch(t){case"never":r.until=void 0,r.count=void 0;break;case"count":r.until=void 0,r.count=l;break;case"until":r.until=i,r.count=void 0}N(r)}),[N,p,e.timezone]),G=f.useCallback((e=>{const t=Object.assign({},p);"monthday"===e.value?(t.byWeekDay=void 0,t.bySetPosition=void 0,t.byMonthDay=[R]):"weekday"===e.value&&(t.byMonthDay=void 0,"string"==typeof S.value?(t.bySetPosition=[w.value],t.byWeekDay=_r(S.value)):t.byWeekDay=[{day:S.value,offset:w.value}]),N(t)}),[N,p,R,S]),B=f.useCallback((e=>{const t=Object.assign({},p),r=e.value;if(t.byWeekDay)switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[r.value];break;case 1:t.byWeekDay[0].offset=r.value}N(t)}),[N,p]);return f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},r.toLanguageString(nt,At[nt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(br,{value:k,data:v,onChange:z}))),"never"!==k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ir(k)+"RepeatEvery")),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.NumericTextBox,{min:1,step:1,defaultValue:1,value:p.interval,onChange:L,id:"interval-editor",className:"k-recur-interval"})," ",f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ir(k)+"Interval")))),"weekly"===k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(lt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Nr,{data:A,value:(p.byWeekDay||[]).map((({day:e})=>e)),onChange:P}))),"monthly"===k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{key:"recurrence-repeat-on-monthly-label",className:"k-form-label"},u(st,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,onChange:G,item:Lr,className:"k-reset",data:[{value:"monthday",label:u(ot,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:"monthday"!==_,value:p&&p.byMonthDay&&p.byMonthDay[0],onChange:H,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(h.DropDownList,{key:"weekday-value",disabled:"weekday"!==_,value:S,data:D,onChange:W,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),"yearly"===k&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,null,u(it,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,item:Lr,onChange:G,className:"k-reset",data:[{value:"monthday",label:" ",children:[f.createElement(h.DropDownList,{key:"monthday-month",disabled:"monthday"!==_,value:b,data:C,textField:"text",dataItemKey:"value",onChange:K,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:"monthday"!==_,value:R,onChange:H,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-1"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:S,data:D,onChange:W,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-2"}," "),f.createElement("span",{key:"yearly-weekday-of-label"},u(ct,!0)),f.createElement(f.Fragment,{key:"yearly-separator-3"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:b,data:C,onChange:K,style:{width:"auto"}})]}]}))),"never"!==k&&f.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(mt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{item:Lr,value:T,onChange:V,data:[{value:"never",label:u(pt,!0)},{value:"count",label:u(dt,!0),children:[f.createElement(f.Fragment,{key:"separator-1"}," "),f.createElement(E.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",className:"k-recur-count",min:1,width:"auto",value:"count"===T?p.count:l,onChange:O,disabled:"count"!==T}),f.createElement(f.Fragment,{key:"separator-2"}," "),f.createElement(g.Label,{key:"endrule-after-label",className:"k-radio-label",editorId:"k-endrule-after"},u(ut,!0))]},{value:"until",label:u(gt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(c.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:"until"!==T,min:e.start,value:"until"===T?x:a.toLocalDate(i),onChange:F,width:"auto"})]}]})))))},Lr=e=>f.createElement("li",{...e},e.children),Or={value:""};zr.displayName="KendoReactSchedulerRepeatEditor";const Fr=e=>{const{as:t=Hr.as,value:r,onChange:a,...n}=e,{timezone:l}=ae();return f.createElement(t,{...n,value:Pr(r,l),onChange:e=>{a&&a({value:Wr(e.target.value,l)})}})},Pr=(e,t)=>{if(e){const r=a.toLocalDate(a.ZonedDate.fromLocalDate(e,t).toUTCDate());return r.setUTCFullYear(e.getFullYear()),r}return e},Wr=(e,t)=>{if(e){const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),a.ZonedDate.fromUTCDate(r,t).toLocalDate()}return e},Hr={as:c.DateTimePicker},Kr=f.forwardRef(((e,t)=>{const r=f.useRef(null),l=f.useRef(null),s=a.timezoneNames(),i=o.useLocalization(),d=se(),{resources:u,timezone:p}=ae();f.useImperativeHandle(l,(()=>{var t;return{element:null!=(t=r.current)&&t.element?r.current.element:r.current,props:e}})),f.useImperativeHandle(t,(()=>l.current));const{as:E=Vr.as,...h}=e,{titleLabel:y=Vr.titleLabel,titleError:v=Vr.titleError,titleEditor:k=Vr.titleEditor,startLabel:D=Vr.startLabel,startError:S=Vr.startError,startEditor:C=Vr.startEditor,startTimezoneLabel:b=Vr.startTimezoneLabel,startTimezoneError:I=Vr.startTimezoneError,startTimezoneEditor:w=Vr.startTimezoneEditor,startTimezoneCheckedLabel:T=Vr.startTimezoneCheckedLabel,startTimezoneCheckedEditor:R=Vr.startTimezoneCheckedEditor,endLabel:x=Vr.endLabel,endError:A=Vr.endError,endEditor:_=Vr.endEditor,endTimezoneLabel:N=Vr.endTimezoneLabel,endTimezoneError:M=Vr.endTimezoneError,endTimezoneEditor:z=Vr.endTimezoneEditor,endTimezoneCheckedLabel:L=Vr.endTimezoneCheckedLabel,endTimezoneCheckedEditor:O=Vr.endTimezoneCheckedEditor,allDayLabel:F=Vr.allDayLabel,allDayEditor:P=Vr.allDayEditor,recurrenceEditor:W=Vr.recurrenceEditor,descriptionLabel:H=Vr.descriptionLabel,descriptionEditor:K=Vr.descriptionEditor,descriptionError:V=Vr.descriptionError,resourceLabel:G=Vr.resourceLabel,resourceEditor:B=Vr.resourceEditor}=e,U=e.valueGetter(d.start)||new Date,Z=e.valueGetter(d.startTimezone)||p||"",$=e.valueGetter(d.endTimezone)||p||"",q=f.useMemo((()=>i.toLanguageString(It,At[It])),[i]),[Y,j]=f.useState(!!e.valueGetter(d.startTimezone)),[X,Q]=f.useState(!!e.valueGetter(d.endTimezone)),J=f.useCallback((t=>{t.value||(e.onChange(d.startTimezone,{value:null}),e.onChange(d.endTimezone,{value:null}),Q(t.value)),j(t.value)}),[e.onChange,d.startTimezone,d.endTimezone]),ee=f.useCallback((t=>{t.value||e.onChange(d.endTimezone,{value:null}),Q(t.value)}),[e.onChange]),te=f.useCallback((e=>e?void 0:q),[q]),re=f.useCallback(((e,t)=>Y?te(t(d.startTimezone)):void 0),[te,Y,d.startTimezone]),ne=f.useCallback(((e,t)=>Y&&X?te(t(d.endTimezone))||te(t(d.startTimezone)):void 0),[te,Y,X,d.startTimezone,d.endTimezone]),le=f.useMemo((()=>n.classNames("k-scheduler-edit-form",e.className)),[e.className]);return f.createElement(E,{ref:E===Vr.as?r:void 0,...h,className:le},f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.title,component:y,editorId:"k-scheduler-editor-title",className:"k-form-label"},i.toLanguageString(Ye,At[Ye])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-title",name:d.title,field:d.title,component:k}),e.errors[d.title]&&f.createElement(m.Field,{name:d.title,component:v},e.errors[d.title]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:D,editorId:"k-scheduler-editor-start",className:"k-form-label"},i.toLanguageString(je,At[je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-start",name:d.start,width:"auto",component:C,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.start]&&f.createElement(m.Field,{name:d.start,component:S},e.errors[d.start]))),f.createElement(m.FieldWrapper,null,f.createElement(T,{className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(R,{id:"k-scheduler-editor-set-start-timezone",onChange:J,value:Y}),f.createElement(T,{className:"k-checkbox-label",editorId:"k-scheduler-editor-set-start-timezone"},i.toLanguageString(at,At[at])))),Y&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:b,className:"k-form-label"},i.toLanguageString(Xe,At[Xe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:w,value:Z,validator:re,data:s,name:d.startTimezone}),e.errors[d.startTimezone]&&f.createElement(m.Field,{name:d.startTimezone,component:I},e.errors[d.startTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.end,component:x,editorId:"k-scheduler-editor-end",className:"k-form-label"},i.toLanguageString(Qe,At[Qe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-end",name:d.end,width:"auto",component:_,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.end]&&f.createElement(m.Field,{name:d.end,component:A},e.errors[d.end]))),Y&&f.createElement(m.FieldWrapper,null,f.createElement("div",{className:"k-form-field-wrap"},f.createElement(O,{id:"k-scheduler-editor-set-end-timezone",onChange:ee,value:X})),f.createElement(L,{editorId:"k-scheduler-editor-set-end-timezone",className:"k-form-label"},i.toLanguageString(rt,At[rt]))),X&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.endTimezone,component:N,className:"k-form-label"},i.toLanguageString(Je,At[Je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{value:$,data:s,validator:ne,component:z,name:d.endTimezone}),e.errors[d.endTimezone]&&f.createElement(m.Field,{name:d.endTimezone,component:M},e.errors[d.endTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.isAllDay,component:g.Label,className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-is-allday-checkbox",name:d.isAllDay,component:P}),f.createElement(m.Field,{name:d.isAllDay,field:d.isAllDay,editorId:"k-is-allday-checkbox",className:"k-checkbox-label",component:F},i.toLanguageString(et,At[et])))),f.createElement("div",{className:"k-recurrence-editor"},f.createElement(m.Field,{component:W,field:d.recurrenceRule,name:d.recurrenceRule,start:U})),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.description,component:H,className:"k-form-label"},i.toLanguageString(tt,At[tt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:K,name:d.description,rows:1,id:"k-event-description"}),e.errors[d.description]&&f.createElement(m.Field,{name:d.description,component:V},e.errors[d.description]))),(u||[]).map((e=>f.createElement(m.FieldWrapper,{key:e.field},f.createElement(m.Field,{name:e.field,component:G,className:"k-form-label"}),f.createElement(g.Label,{className:"k-form-label"},e.name),f.createElement(m.Field,{name:e.field,component:B,resource:e,multiple:e.multiple,data:e.data,textField:e.textField,valueField:e.valueField,colorField:e.colorField}))))))})),Vr={as:f.forwardRef(((e,t)=>f.createElement(m.FormElement,{ref:t,id:e.id,style:e.style,tabIndex:e.tabIndex,className:e.className,horizontal:e.horizontal,children:e.children}))),titleLabel:g.Label,titleError:g.Error,titleEditor:E.Input,startLabel:g.Label,startError:g.Error,startEditor:Fr,startTimezoneLabel:g.Label,startTimezoneError:g.Error,startTimezoneEditor:Cr,startTimezoneCheckedLabel:g.Label,startTimezoneCheckedEditor:E.Checkbox,endLabel:g.Label,endError:g.Error,endEditor:Fr,endTimezoneLabel:g.Label,endTimezoneError:g.Error,endTimezoneEditor:Cr,endTimezoneCheckedLabel:g.Label,endTimezoneCheckedEditor:E.Checkbox,allDayLabel:g.Label,allDayEditor:E.Checkbox,recurrenceEditor:zr,descriptionLabel:g.Label,descriptionEditor:E.TextArea,descriptionError:g.Error,resourceLabel:g.Label,resourceEditor:e=>{const t=e.multiple?h.MultiSelect:h.DropDownList,r=f.useCallback((t=>{const r=t.target.props.dataItemKey,a=e.multiple?(t.target.value||[]).map((e=>e[r])):t.target.value[r];e.onChange.call(void 0,{value:a})}),[e.multiple,e.onChange]),a=f.useCallback(((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r.dataItem[e.colorField],marginRight:M(r.dataItem[e.valueField])?"8px":"4px"}}," "),f.createElement("span",{key:2}," ",t.props.children));return f.cloneElement(t,{...t.props},a)}),[e.colorField,e.valueField]),n=f.useCallback(((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&r&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r[e.colorField],marginRight:r[e.valueField]?"8px":"4px"}}," "),t.props.children);return f.cloneElement(t,{},a)}),[e.colorField,e.valueField]),l=Array.isArray(e.value)?e.data.filter((t=>e.value.some((r=>t[e.valueField]===r)))):e.data.find((t=>t[e.valueField]===e.value));return f.createElement(t,{value:l,onChange:r,data:e.data,textField:e.textField,dataItemKey:e.valueField,valid:e.valid,validationMessage:e.validationMessage,itemRender:a,valueRender:n})}};Kr.displayName="KendoReactSchedulerFormEditor";const Gr=f.forwardRef(((e,t)=>{const{onCancel:r,onClose:a,onSubmit:l,editor:c,dialog:i=Br.dialog,validator:u=Br.validator,...g}=e,E=f.useRef(null);f.useImperativeHandle(E,(()=>({props:e}))),f.useImperativeHandle(t,(()=>E.current));const h=o.useLocalization(),y=se(),v=f.useMemo((()=>h.toLanguageString(It,At[It])),[h]),D=f.useMemo((()=>h.toLanguageString(Tt,At[Tt])),[h]),S=f.useMemo((()=>h.toLanguageString(Ze,At[Ze])),[h]),C=f.useMemo((()=>h.toLanguageString($e,At[$e])),[h]),b=f.useMemo((()=>h.toLanguageString(qe,At[qe])),[h]),I=f.useMemo((()=>h.toLanguageString(wt,At[wt])),[h]),w=f.useCallback((e=>{r&&r.call(void 0,{value:null,syntheticEvent:e,target:E.current})}),[r]),T=f.useCallback((({syntheticEvent:e})=>{a&&a.call(void 0,{value:null,syntheticEvent:e,target:E.current})}),[a]),R=f.useCallback(((e,t)=>{l&&l.call(void 0,{value:e,syntheticEvent:t,target:E.current})}),[l]),x=f.useCallback(((e,t)=>e&&t(y.end)&&e.getTime()>t(y.end).getTime()?I:void 0),[y,I]),A=f.useCallback(((e,t)=>e&&t(y.start)&&e.getTime()<t(y.start).getTime()?D:void 0),[y,D]),_=f.useCallback((e=>e?void 0:v),[v]),N=f.useCallback(((e,t)=>{const r={};r[y.start]=[_(t(y.start)),x(t(y.start),t)].filter(Boolean).reduce(((e,t)=>e||t),""),r[y.end]=[_(t(y.start)),A(t(y.start),t)].filter(Boolean).reduce(((e,t)=>e||t),"");const a=u(e,t);return{...r,...a}}),[A,y.end,y.start,_,x,u]);return n.canUseDOM?k.createPortal(f.createElement(m.Form,{initialValues:e.dataItem,onSubmit:R,validator:N,render:e=>f.createElement(i,{title:b,minWidth:400,onClose:T,className:"k-scheduler-edit-dialog"},f.createElement(Kr,{...e,as:c}),f.createElement(p.DialogActionsBar,{layout:"start"},f.createElement(s.Button,{themeColor:"primary",disabled:!e.allowSubmit,onClick:e.onSubmit,icon:"save",svgIcon:d.saveIcon},S),f.createElement(s.Button,{onClick:w,icon:"cancel",svgIcon:d.cancelIcon},C))),...g}),document&&document.body):null})),Br={dialog:p.Dialog,validator:()=>({})};Gr.displayName="KendoReactSchedulerForm";const Ur=f.forwardRef(((e,t)=>{const{onFocus:r,onBlur:a,onClick:l,onMouseEnter:o,onMouseLeave:s,onMouseOut:c,onMouseOver:i,onDoubleClick:d,onKeyDown:u,onKeyPress:m,onKeyUp:p}=e,{slot:g,element:E}=((e,t)=>{const{_ref:r}=e,a=f.useRef(null),l=f.useRef(null),[,o]=Wt();return f.useImperativeHandle(a,(()=>({element:l.current,props:e}))),f.useImperativeHandle(t,(()=>a.current)),f.useImperativeHandle(r,(()=>a.current)),f.useLayoutEffect((()=>(o({type:n.COLLECTION_ACTION.add,item:a}),()=>{o({type:n.COLLECTION_ACTION.remove,item:a})}))),{slot:a,element:l}})(e,t),h=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,y=f.useMemo((()=>{var t,r;const a=null!=(t=e.isWorkHour)?t:Zr.isWorkHour,l=null!=(r=e.isWorkDay)?r:Zr.isWorkDay;return n.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!a||!l,"k-selected":e.selected})}),[e.className,e.selected,e.isWorkHour,e.isWorkDay]),v=f.useMemo((()=>({userSelect:"none",...e.style})),[e.style]),k=f.useCallback((e=>{r&&r.call(void 0,{syntheticEvent:e,target:g.current})}),[r,g]),D=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,target:g.current})}),[a,g]),S=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,target:g.current})}),[l,g]),C=f.useCallback((e=>{i&&i.call(void 0,{syntheticEvent:e,target:g.current})}),[i,g]),b=f.useCallback((e=>{c&&c.call(void 0,{syntheticEvent:e,target:g.current})}),[c,g]),I=f.useCallback((e=>{o&&o.call(void 0,{syntheticEvent:e,target:g.current})}),[o,g]),w=f.useCallback((e=>{s&&s.call(void 0,{syntheticEvent:e,target:g.current})}),[s,g]),T=f.useCallback((e=>{d&&d.call(void 0,{syntheticEvent:e,target:g.current})}),[d,g]),R=f.useCallback((e=>{u&&u.call(void 0,{syntheticEvent:e,target:g.current})}),[u,g]),x=f.useCallback((e=>{m&&m.call(void 0,{syntheticEvent:e,target:g.current})}),[m,g]),A=f.useCallback((e=>{p&&p.call(void 0,{syntheticEvent:e,target:g.current})}),[p,g]);return f.createElement("div",{ref:E,id:e.id,style:v,className:y,tabIndex:h,"aria-selected":e.selected||void 0,onFocus:k,onBlur:D,onClick:S,onMouseEnter:I,onMouseLeave:w,onMouseOver:C,onMouseOut:b,onDoubleClick:T,onKeyDown:R,onKeyPress:x,onKeyUp:A,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)})),Zr={isWorkHour:!0,isWorkDay:!0};Ur.displayName="KendoReactSchedulerSlot";const $r=f.forwardRef(((e,t)=>{var r;const{slot:a,_ref:l,...o}=e,s=a||qr.slot,c=f.useRef(null),i=f.useRef(null);return f.useImperativeHandle(c,(()=>({props:e}))),f.useImperativeHandle(l,(()=>i.current)),f.useImperativeHandle(t,(()=>c.current)),((e,t)=>{const r=f.useRef(void 0),a=f.useRef(0),l=te(),o=f.useCallback((()=>{if(!t||!e.current)return;const r=e.current.element,n=e.current.props;if(!r)return;const l=I(r),o=new Map,s=n.items.filter((e=>e._ref.current));s.forEach((e=>{var t,r,a;if(!e._ref.current)return;const{height:n}=b(e._ref.current.element),l=null!=(r=null==(t=e._ref.current)?void 0:t._order)?r:-1;(null!=(a=o.get(l))?a:0)<n&&o.set(l,n)}));const c=Array.from(o.values()).reduce(((e,t)=>e+t),0),i=1*s.length*2+c-(l||0)+("object"==typeof t&&t.offsetTop?t.offsetTop:0)+("object"==typeof t&&t.offsetBottom?t.offsetBottom:0);s.length?i>a.current-l&&w(r,{height:i},!0):r&&(r.style.minHeight="")}),[t,e]),s=f.useCallback((()=>{void 0!==r.current&&window.cancelAnimationFrame(r.current),r.current=window.requestAnimationFrame((()=>{o()}))}),[o]);n.useIsomorphicLayoutEffect((()=>{if(!e.current)return;const t=e.current.element;t&&(a.current=t.clientHeight)}),[]),f.useEffect(o,[e,e.current&&e.current.props,t]),f.useEffect((()=>{if(!e.current)return;const t=e.current.props.items.filter((e=>e._ref.current)).map((e=>{if(!e._ref.current||!e._ref.current.element||!l.current)return;const t=window.ResizeObserver,r=t&&new t(s);return r&&r.observe(e._ref.current.element),()=>{r&&r.disconnect()}}));return()=>{t.forEach((e=>e&&e()))}}),[s,l,e])})(i,null!=(r=e.expandable)?r:qr.expandable),f.createElement(s,{...o,_ref:i})})),qr={slot:Ur,expandable:!1};$r.displayName="KendoReactSchedulerViewSlot";const Yr=f.createContext([null]);Yr.displayName="SchedulerEditSlotPropsContext";const jr=f.createContext([null]);jr.displayName="SchedulerEditSlotFormItemContext";const Xr=({props:e,form:t,children:r})=>f.createElement(Yr.Provider,{value:e},f.createElement(jr.Provider,{value:t},r)),Qr=e=>{const t=f.useContext(re),r=void 0!==e?e:t.editable||!1,a=!0===r||void 0!==r&&!1!==r&&!0===r.edit,n=!0===r||void 0!==r&&!1!==r&&!0===r.resize,l=!0===r||void 0!==r&&!1!==r&&!0===r.remove,o=!0===r||void 0!==r&&!1!==r&&!0===r.drag;return{add:!0===r||void 0!==r&&!1!==r&&!0===r.add,edit:a,drag:o,remove:l,resize:n,select:!0===r||void 0!==r&&!1!==r&&!0===r.select}},Jr=f.forwardRef(((e,t)=>{const{_ref:r,onDataAction:a,viewSlot:l,form:o,formItem:s,onFormItemChange:c,...i}=e,[d,u]=f.useState(e.tabIndex),m=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(p,(()=>({props:e}))),f.useImperativeHandle(t,(()=>p.current)),f.useImperativeHandle(r,(()=>m.current));const g=Qr(e.editable),E=se(),[h]=Wt(),[y]=Kt(),[v,k]=f.useContext(Vt),[,D]=$t(),S=o||ea.form,C=l||ea.viewSlot,[b,I]=Ce(null,s,e.onFormItemChange),w=v.some((t=>!(!t.current||t.current.props.start.getTime()!==e.start.getTime()||t.current.props.end.getTime()!==e.end.getTime()||t.current.props.index!==e.index||t.current.props.group.index!==e.group.index||t.current.props.range.index!==e.range.index||t.current.props.isAllDay!==e.isAllDay))),T=f.useCallback((()=>{const t={};if(N(t,E.start,new Date(e.start.getTime())),N(t,E.end,new Date(e.end.getTime())),N(t,E.isAllDay,e.isAllDay),e.group.resources.length)for(let r=0;r<e.group.resources.length;r++){const a=e.group.resources[r];if(x(e.group.resources)){const n=_(e.group.resources[r],a.valueField);N(t,a.field,a.multiple?[n]:n)}else N(t,a.field,a.multiple?[]:void 0)}return t}),[E.start,E.end,E.isAllDay,e.start,e.end,e.isAllDay,e.group.resources]),R=f.useCallback((t=>{g.select&&k({type:jt.select,slot:m},t.syntheticEvent),e.onFocus&&e.onFocus.call(void 0,t)}),[k,g.select,e.onFocus]),A=f.useCallback((t=>{if(g.add){const e=T();I(e,t)}e.onDoubleClick&&e.onDoubleClick.call(void 0,t)}),[T,g.add,e.onDoubleClick,I]),M=f.useCallback((e=>{let t;switch(e.syntheticEvent.keyCode){case n.Keys.left:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.left,slot:m},e.syntheticEvent);break;case n.Keys.right:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.right,slot:m},e.syntheticEvent);break;case n.Keys.up:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.up,slot:m},e.syntheticEvent);break;case n.Keys.down:if(!h)return;e.syntheticEvent.preventDefault(),D({type:Jt.down,slot:m},e.syntheticEvent);break;case n.Keys.enter:{if(!h||!g.add)return;const e=T();I(e);break}case n.Keys.tab:t=(e=>{const t=e.props.items.find((e=>0===e.order))||e.props.items[0];return t&&t._ref.current})(e.target)}t&&(e.syntheticEvent.preventDefault(),t.element&&t.element.focus())}),[T,D,g.add,I,h]),z=f.useCallback((e=>{a&&a.call(void 0,{type:J.create,series:!1,dataItem:e.value},e),I(null,e.syntheticEvent)}),[a,I]),L=f.useCallback((e=>{I(null,e.syntheticEvent)}),[I]),O=f.useCallback((e=>{I(null,e)}),[I]),F=f.useCallback(((e,t)=>{I&&I(e,t)}),[I]);return f.useEffect((()=>{const t=h.length&&h[0].current===m.current;u(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===v.length&&t&&0===y.length?0:void 0)}),[y,e.tabIndex,v.length,h]),f.createElement(Xr,{props:e,form:[b,F]},f.createElement(C,{...i,_ref:m,selected:w,tabIndex:d,onFocus:R,onDoubleClick:A,onKeyDown:M}),b&&f.createElement(S,{dataItem:b,onSubmit:z,onClose:O,onCancel:L}))})),ea={viewSlot:$r,form:Gr};Jr.displayName="KendoReactSchedulerEditSlot";const ta=f.forwardRef(((e,t)=>{const{isRemove:r,onClose:a,onSeriesClick:l,onOccurrenceClick:c}=e,i=f.useRef(null);f.useImperativeHandle(i,(()=>({props:e}))),f.useImperativeHandle(t,(()=>i.current));const d=o.useLocalization(),u=e=>d.toLanguageString(e,At[e]),m=u(Ve),g=u(Ge),E=u(Be),h=u(Ue),y=u(vt),v=u(ft),D=u(Dt),S=u(yt),C=r?D:h,b=r?S:E,I=r?y:m,w=r?v:g,T=f.useCallback((({syntheticEvent:e})=>{a&&a.call(void 0,{syntheticEvent:e,value:null,target:i.current})}),[a]),R=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,value:null,target:i.current})}),[l]),x=f.useCallback((e=>{c&&c.call(void 0,{syntheticEvent:e,value:null,target:i.current})}),[c]);return n.canUseDOM?k.createPortal(f.createElement(p.Dialog,{title:C,onClose:T},b,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:x},I),f.createElement(s.Button,{onClick:R},w))),document&&document.body):null}));ta.displayName="KendoReactSchedulerSchedulerOccurrenceDialog";const ra=f.forwardRef(((e,t)=>{const{onClose:r,onCancel:a,onConfirm:l}=e,c=f.useRef(null);f.useImperativeHandle(c,(()=>({props:e}))),f.useImperativeHandle(t,(()=>c.current));const i=o.useLocalization(),d=i.toLanguageString($e,At[$e]),u=i.toLanguageString(Et,At[Et]),m=i.toLanguageString(ht,At[ht]),g=i.toLanguageString(kt,At[kt]),E=f.useCallback((({syntheticEvent:e})=>{if(!r)return;const t={syntheticEvent:e,value:null,target:c.current};r.call(void 0,t)}),[r]),h=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,value:null})}),[a]),y=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,value:null})}),[l]);return n.canUseDOM?k.createPortal(f.createElement(p.Dialog,{title:g,onClose:E},m,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:h},d),f.createElement(s.Button,{onClick:y},u))),document&&document.body):null}));ra.displayName="KendoReactSchedulerRemoveDialog";const aa=f.forwardRef(((e,t)=>{const{onFocus:r,onBlur:a,onMouseDown:l,onClick:s,onMouseUp:c,onMouseOut:i,onMouseOver:u,onMouseEnter:m,onMouseLeave:p,onDoubleClick:g,onRemoveClick:E,onKeyUp:h,onKeyDown:y,onKeyPress:v,onPress:k,onDrag:D,onRelease:S,onResizePress:C,onResizeEndDrag:b,onResizeRelease:I,onResizeStartDrag:w}=e,{item:T,element:R}=((e,t)=>{const{_ref:r,itemRef:a,_maxSiblingsPerSlot:l,_siblings:o,_order:s}=e,c=f.useRef(null),i=f.useRef(null),[,d]=Kt();return f.useImperativeHandle(c,(()=>({element:i.current,props:e,get _maxSiblingsPerSlot(){return null==l?void 0:l.current},set _maxSiblingsPerSlot(e){var t;null!=e&&void 0!==l&&void 0!==l.current&&(l.current=e,null==(t=null==o?void 0:o.current)||t.forEach((t=>{var r;!t||t._maxSiblingsPerSlot===e||e<(null!=(r=t._maxSiblingsPerSlot)?r:0)||(t._maxSiblingsPerSlot=e)})))},get _order(){return null==s?void 0:s.current},set _order(e){void 0!==e&&void 0!==s&&void 0!==s.current&&(s.current=e)}}))),f.useImperativeHandle(t,(()=>c.current)),f.useImperativeHandle(r,(()=>c.current)),f.useImperativeHandle(a,(()=>c.current)),n.useIsomorphicLayoutEffect((()=>(d({type:n.COLLECTION_ACTION.add,item:c}),()=>{d({type:n.COLLECTION_ACTION.remove,item:c})}))),{item:c,element:i}})(e,t),x=n.useDir(R),A=f.useRef(null),_=f.useRef(null),N=f.useRef(null),M=f.useRef(null),z=Qr(e.editable),L=o.useInternationalization(),O=o.useLocalization().toLanguageString(Fe,At[Fe]),F=e.group.resources.find((e=>!(!e.colorField||""===e[e.colorField]||void 0===e[e.colorField]))),P=F&&F.colorField&&F[F.colorField],W=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,H=f.useMemo((()=>n.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&z.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className)),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,z.select]),K=f.useMemo((()=>`${function(e,t,r,a){return a?`${e.formatDate(t,{skeleton:"yMMMMEEEEd"})}`:`${e.formatDate(t,{skeleton:"yMMMMEEEEdhm"})}–${e.formatDate(r,"t")}`}(L,e.zonedStart,e.zonedEnd,e.isAllDay)}, ${e.title}`),[L,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),V=f.useMemo((()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:P,backgroundColor:e.resizeHint?void 0:P,touchAction:"none",...e.style})),[P,e.style,e.resizeHint]),G=f.useCallback((e=>{r&&r.call(void 0,{syntheticEvent:e,target:T.current})}),[r,T]),B=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,target:T.current})}),[a,T]),U=f.useCallback((e=>{l&&l.call(void 0,{syntheticEvent:e,target:T.current})}),[l,T]),Z=f.useCallback((e=>{s&&s.call(void 0,{syntheticEvent:e,target:T.current})}),[s,T]),$=f.useCallback((e=>{c&&c.call(void 0,{syntheticEvent:e,target:T.current})}),[c,T]),q=f.useCallback((e=>{u&&u.call(void 0,{syntheticEvent:e,target:T.current})}),[u,T]),Y=f.useCallback((e=>{i&&i.call(void 0,{syntheticEvent:e,target:T.current})}),[i,T]),j=f.useCallback((e=>{m&&m.call(void 0,{syntheticEvent:e,target:T.current})}),[m,T]),X=f.useCallback((e=>{p&&p.call(void 0,{syntheticEvent:e,target:T.current})}),[p,T]),Q=f.useCallback((e=>{g&&g.call(void 0,{syntheticEvent:e,target:T.current})}),[g,T]),J=f.useCallback((e=>{E&&E.call(void 0,{syntheticEvent:e,target:T.current})}),[E,T]),ee=f.useCallback((e=>{y&&y.call(void 0,{syntheticEvent:e,target:T.current})}),[y,T]),te=f.useCallback((e=>{v&&v.call(void 0,{syntheticEvent:e,target:T.current})}),[v,T]),re=f.useCallback((e=>{h&&h.call(void 0,{syntheticEvent:e,target:T.current})}),[h,T]),ae=f.useCallback((e=>{k&&k.call(void 0,{dragEvent:e,target:T.current})}),[k,T]),ne=f.useCallback((e=>{D&&D.call(void 0,{dragEvent:e,target:T.current})}),[D,T]),le=f.useCallback((e=>{S&&S.call(void 0,{dragEvent:e,target:T.current})}),[S,T]),oe=f.useCallback((e=>{C&&C.call(void 0,{dragEvent:e,target:T.current})}),[C,T]),se=f.useCallback((e=>{w&&w.call(void 0,{dragEvent:e,target:T.current})}),[w,T]),ce=f.useCallback((e=>{b&&b.call(void 0,{dragEvent:e,target:T.current})}),[b,T]),ie=f.useCallback((e=>{I&&I.call(void 0,{dragEvent:e,target:T.current})}),[I,T]);return n.useDraggable(R,{onPress:ae,onDrag:ne,onRelease:le}),n.useDraggable(A,{onPress:oe,onDrag:ce,onRelease:ie}),n.useDraggable(_,{onPress:oe,onDrag:se,onRelease:ie}),n.useDraggable(N,{onPress:oe,onDrag:se,onRelease:ie}),n.useDraggable(M,{onPress:oe,onDrag:ce,onRelease:ie}),f.createElement("div",{ref:R,id:e.id,style:V,tabIndex:W,className:H,role:"button","aria-label":K,onFocus:G,onBlur:B,onMouseUp:$,onMouseDown:U,onClick:Z,onMouseOver:q,onMouseOut:Y,onMouseEnter:j,onMouseLeave:X,onDoubleClick:Q,onKeyDown:ee,onKeyPress:te,onKeyUp:re,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},z.remove&&f.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:O,"aria-label":O,onClick:J},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})),e.head&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-left":"caret-alt-right",icon:"rtl"===x?d.caretAltLeftIcon:d.caretAltRightIcon})),z.resize&&e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-n",ref:N}),f.createElement("span",{className:"k-resize-handle k-resize-s",ref:M})),z.resize&&!e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-w",ref:_}),f.createElement("span",{className:"k-resize-handle k-resize-e",ref:A})),e.resizeHint&&f.createElement(f.Fragment,null,f.createElement("div",{className:"k-marquee-color",style:{borderColor:P,backgroundColor:P}}),f.createElement("div",{className:"k-marquee-text"},!e.tail&&f.createElement("div",{className:"k-label-top"},L.formatDate(e.zonedStart,e.format)),!e.head&&f.createElement("div",{className:"k-label-bottom"},L.formatDate(e.zonedEnd,e.format)))))}));aa.displayName="KendoReactSchedulerItem";const na=f.forwardRef(((e,t)=>{const r=f.useMemo((()=>n.classNames("k-event-template",e.className)),[e.className]);return f.createElement("div",{ref:t,...e,className:r})})),la=(e,t)=>{const{element:r}=e;f.useEffect((()=>{if(!r||!e.syncHeight)return;const t=[[]];Array.from(r.querySelectorAll(e.selector)).filter((t=>!t.classList.contains((e=>e.slice(1,e.length))(e.applyTo)))).forEach((r=>{const a=r.clientHeight,n=r.getAttribute(e.horizontalAttribute),l=r.getAttribute(e.verticalAttribute);null===n||null===l||(t[n]||(t[n]=[]),(!t[n][l]||a>t[n][l])&&(t[n][l]=a-1))})),Array.from(r.querySelectorAll(e.applyTo)).forEach((r=>{const a=r.getAttribute(e.horizontalAttribute),n=r.getAttribute(e.verticalAttribute);if(null===a||null===n)return;const l=I(r),o=t[a][n]-l;w(r,{height:o},!0)}))}),t)},oa=f.forwardRef(((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null),p=Qr(e.editable);f.useImperativeHandle(u,(()=>({props:e,element:i.current&&i.current.element}))),f.useImperativeHandle(t,(()=>u.current)),f.useImperativeHandle(a,(()=>i.current)),f.useImperativeHandle(l,(()=>i.current));const g=r||sa.item,E=o.useInternationalization(),[h]=Kt(),[y]=Wt(),v=te(),[k,D]=f.useState(!0),[S,C]=f.useState(!1),I=f.useRef(e.order),R=f.useRef(0),x=n.useDir(v),A=f.useMemo((()=>e.isAllDay?E.toString(e.zonedStart,"t"):E.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)),[E,e.isAllDay,e.zonedEnd,e.zonedStart]),_=f.useMemo((()=>`(${A}): ${e.title}`),[A,e.title]),N=(e,t)=>{let r=1;return e.forEach((e=>{const a=t.filter((t=>M(e.current.props,t.props)));a.length>r&&(r=a.length)})),r},M=(t,r)=>W(t.start,t.end,r.start,r.end)&&t.group.index===r.group.index&&t.range.index===r.range.index&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay),z=()=>{const t=(y||[]).filter((t=>t.current&&M(t.current.props,e))),r=i.current&&i.current.element,a=T(t);if(0===t.length)return void D(!1);if(!a.current||!r)return;const n=b(a.current.element),l=[],o=[],s=[];(h||[]).forEach((e=>{e.current&&(e.current.props.dragHint?o.push(e.current):e.current.props.resizeHint?s.push(e.current):l.push(e.current))})),I.current=e.dragHint||e.resizeHint?((e,t,r,a=!1)=>{let n;return r.forEach((r=>{const l=[];t.sort(((e,t)=>e.props.start.getTime()-t.props.start.getTime())).forEach((t=>{if((a||t.props.isAllDay===r.current.props.isAllDay)&&t.props.range.index===r.current.props.range.index&&t.props.group.index===r.current.props.group.index&&W(t.props.start,t.props.end,r.current.props.start,r.current.props.end)){const r=G(l);t===e&&void 0===n&&(n=r),l.splice(r,0,r)}}))})),n})(i.current,e.dragHint?o:s,t,e.ignoreIsAllDay):e.order||0;let c=e.dragHint||e.resizeHint?N(t,e.dragHint?o:s):N(t,l);const d=((e,t)=>e.map((e=>t.filter((t=>M(e.current.props,t.props))))))(t,l);let u=0;if(d.forEach((t=>{let a=0;t.forEach((t=>{W(t.props.start,t.props.end,e.start,e.end)&&!e.dragHint&&!e.resizeHint&&t._maxSiblingsPerSlot&&t._maxSiblingsPerSlot>c&&t.element!==r&&(c=t._maxSiblingsPerSlot);const l=b(t.element);null!==t.props.order&&t.props.order<I.current&&(a=l.top+l.height-n.top-1*I.current+1)})),a>u&&(u=a)})),0===t.length)return void D(!1);const m=p.add?20:0;n.width=e.vertical?n.width/c-1-m/c:n.width*t.length-1,n.height=e.vertical?n.height*t.length-1:(e.resizeHint||e.dragHint)&&c<=1?n.height:e.style&&e.style.height?e.style.height:25,n.left=e.vertical?n.left+I.current*n.width+1*I.current:n.left,n.top=e.vertical?n.top:n.top+u+1*I.current,R.current=c,w(r,n),C(!0),D(!0)},L=f.useCallback((e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame((()=>{z()}))),m.current={width:t.contentRect.width,height:t.contentRect.height}}),[z]);f.useEffect(z);const O=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return la({element:O,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect((()=>{if(!v.current)return;const e=window.ResizeObserver,t=e&&new e(L);return t&&t.observe(v.current),()=>{t&&t.disconnect()}}),[L,v]),f.createElement(g,{...s,_ref:i,_maxSiblingsPerSlot:R,_order:I,itemRef:i,style:{visibility:S?void 0:"hidden",display:k?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-right":"caret-alt-left",icon:"rtl"===x?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon})),!e.resizeHint&&f.createElement("div",{title:_},!e.isAllDay&&f.createElement(na,{className:"k-event-time"},_),f.createElement(na,null,e.title)))})),sa={item:aa};oa.displayName="KendoReactSchedulerViewItem";const ca=(e,{dateRange:t,fields:r,timezone:a})=>e.map(ia(r)).reduce(da(t,a,r),[]).filter((e=>!O(e.dataItem,r))),ia=e=>t=>({uid:n.getter(e.id||"id")(t),start:n.getter(e.start||"start")(t),startTimezone:n.getter(e.startTimezone||"startTimezone")(t),originalStart:n.getter(e.originalStart||"originalStart")(t),end:n.getter(e.end||"end")(t),endTimezone:n.getter(e.endTimezone||"endTimezone")(t),isAllDay:n.getter(e.isAllDay||"isAllDay")(t),title:n.getter(e.title||"title")(t),description:n.getter(e.description||"description")(t),occurrenceId:n.getter("occurrenceId")(t),recurrenceRule:n.getter(e.recurrenceRule||"recurrenceRule")(t),recurrenceExceptions:n.getter(e.recurrenceExceptions||"recurrenceExceptions")(t),recurrenceId:n.getter(e.recurrenceId||"recurrenceId")(t),dataItem:n.clone(t)}),da=(e,t,r)=>(a,n)=>[...a,...n.recurrenceRule&&(null===n.recurrenceId||void 0===n.recurrenceId)&&O(n.dataItem,r)?[...ua(n,{dateRange:e,timezone:t,fields:r})]:[n]],ua=(e,{dateRange:t,timezone:r,fields:l})=>{const o=e.recurrenceRule,s=y.parseRule({recurrenceRule:o});s.start||(s.start=a.ZonedDate.fromLocalDate(e.start,r)),s.end||(s.end=a.ZonedDate.fromLocalDate(e.end,r));const c=e.recurrenceExceptions;c&&(s.exceptionDates=c.map((e=>a.ZonedDate.fromLocalDate(e,r))));const i=t.zonedStart,d=t.zonedEnd,u=y.expand(s,{rangeStart:i,rangeEnd:d});return u.events.length?u.events.map(((t,r)=>{const a=n.clone(e),o=n.clone(e.dataItem);return a.recurrenceId=a.uid,N(o,l.recurrenceId,e.uid),a.originalStart=t.start.toLocalDate(),N(o,l.originalStart,t.start.toLocalDate()),a.start=t.start.toLocalDate(),N(o,l.start,t.start.toLocalDate()),a.end=t.end.toLocalDate(),N(o,l.end,t.end.toLocalDate()),a.occurrenceId=String(r),N(o,"occurrenceId",String(r)),a.dataItem=o,a})):[]},ma=(e,{timezone:t},{groups:r,ranges:n})=>{const o=[];return l.orderBy(e,[{field:"start",dir:"asc"},{field:"end",dir:"desc"},{field:"isAllDay",dir:"desc"},{field:"title",dir:"asc"},{field:"uid",dir:"asc"}]).forEach((e=>{r.forEach((l=>{const s=1===r.length?pa(e,l):l;Ea(e,s)&&n.forEach((r=>{if(ha(e,r)){const n=f.createRef(),l=f.createRef(),c=r.end<e.end,i=e.start<r.start,d=a.ZonedDate.fromLocalDate(e.start,t),u=a.ZonedDate.fromLocalDate(e.end,t),m={...e,_ref:l,itemRef:n,head:c,tail:i,order:null,zonedStart:d,zonedEnd:u,group:s,range:r,slots:[],isRecurring:!!e.recurrenceRule,isException:!e.recurrenceRule&&null!==e.recurrenceId&&void 0!==e.recurrenceId,isAllDay:!!e.isAllDay};o.push(m)}}))}))})),o},pa=(e,t)=>({index:0,resources:t.resources.filter((t=>ga(e,t)))}),ga=(e,t)=>t.multiple?(e.dataItem[t.field]||[]).some((e=>t[t.valueField]===e)):e.dataItem[t.field]===t[t.valueField],Ea=(e,t)=>!t.resources.some((t=>t.multiple?!e.dataItem[t.field].some((e=>t[t.valueField]===e)):e.dataItem[t.field]!==t[t.valueField])),ha=(e,t)=>W(t.start,t.end,e.start,e.end)&&(void 0===t.isAllDay||!!e.isAllDay==!!t.isAllDay),ya=e=>{const t=Ft(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=Wt(),s=e.viewItem||va.viewItem,c=f.useMemo((()=>ca([e.dataItem],{dateRange:l,fields:n,timezone:r})),[e.dataItem,l,n,r]),i=f.useMemo((()=>ma(c,{timezone:r},{groups:a,ranges:t})),[c,r,a,t]),d=(o||[]).map((e=>e.current.props));return U(i,d),f.createElement(f.Fragment,null,i.map(((t,r)=>f.createElement(s,{key:r,...t,item:e.item,dragHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay}))))},va={viewItem:oa,item:aa};ya.displayName="KendoReactSchedulerDrag";const fa=e=>{const t=Ft(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=Wt(),s=e.viewItem||ka.viewItem,c=f.useMemo((()=>ca([e.dataItem],{dateRange:l,fields:n,timezone:r})),[e.dataItem,l.start.getTime(),l.end.getTime(),n,r]),i=f.useMemo((()=>ma(c,{timezone:r},{groups:a,ranges:t})),[c,r,a,t]),d=(o||[]).map((e=>e.current.props));return U(i,d),f.createElement(f.Fragment,null,i.map(((t,r)=>{var a;return f.createElement(s,{key:r,...t,format:e.format,item:null!=(a=e.item)?a:ka.item,resizeHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})})))},ka={viewItem:oa,item:aa};fa.displayName="KendoReactSchedulerResize";const Da=f.createContext([null]);Da.displayName="SchedulerEditItemPropsContext";const Sa=f.createContext([null,n.noop,n.noop]);Sa.displayName="SchedulerEditItemFormItemContext";const Ca=f.createContext([null,n.noop,n.noop]);Ca.displayName="SchedulerEditItemDragItemContext";const ba=f.createContext([null,n.noop,n.noop]);ba.displayName="SchedulerEditItemResizeItemContext";const Ia=f.createContext([null,n.noop,n.noop]);Ia.displayName="SchedulerEditItemRemoveItemContext";const wa=f.createContext([!1,n.noop,n.noop]);wa.displayName="SchedulerEditItemShowRemoveDialogContext";const Ta=f.createContext([!1,n.noop,n.noop]);Ta.displayName="SchedulerEditItemShowOccurrenceDialogContext";const Ra=({props:e,form:t,drag:r,resize:a,remove:n,showRemoveDialog:l,showOccurrenceDialog:o,children:s})=>f.createElement(Da.Provider,{value:e},f.createElement(Sa.Provider,{value:t},f.createElement(Ca.Provider,{value:r},f.createElement(ba.Provider,{value:a},f.createElement(Ia.Provider,{value:n},f.createElement(wa.Provider,{value:l},f.createElement(Ta.Provider,{value:o},s)))))));var xa=(e=>(e.set="FORM_ITEM_SET",e.setMaster="FORM_ITEM_SET_MASTER",e.reset="FORM_ITEM_RESET",e.complete="FORM_ITEM_COMPLETE",e))(xa||{});var Aa=(e=>(e.set="SHOW_OCCURRENCE_DIALOG_SET",e.open="SHOW_OCCURRENCE_DIALOG_OPEN",e.close="SHOW_OCCURRENCE_DIALOG_CLOSE",e.reset="SHOW_OCCURRENCE_DIALOG_RESET",e.toggle="SHOW_OCCURRENCE_DIALOG_TOGGLE",e))(Aa||{});var _a=(e=>(e.set="REMOVE_ITEM_SET",e.reset="REMOVE_ITEM_RESET",e.complete="REMOVE_ITEM_COMPLETE",e))(_a||{});var Na=(e=>(e.set="SHOW_REMOVE_DIALOG_SET",e.open="SHOW_REMOVE_DIALOG_OPEN",e.close="SHOW_REMOVE_DIALOG_CLOSE",e.reset="SHOW_REMOVE_DIALOG_RESET",e.toggle="SHOW_REMOVE_DIALOG_TOGGLE",e))(Na||{});var Ma=(e=>(e.set="DRAG_ITEM_SET",e.start="DRAG_ITEM_START",e.drag="DRAG_ITEM_DRAG",e.complete="DRAG_ITEM_COMPLETE",e.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="DRAG_ITEM_COMPLETE_SERIES",e.reset="DRAG_ITEM_RESET",e.dragSelected="DRAG_ITEM_DRAG_SELECTED",e))(Ma||{});var za=(e=>(e.set="RESIZE_ITEM_SET",e.start="RESIZE_ITEM_START",e.startDrag="RESIZE_ITEM_START_DRAG",e.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",e.endDrag="RESIZE_ITEM_END_DRAG",e.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",e.complete="RESIZE_ITEM_COMPLETE",e.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",e.reset="RESIZE_ITEM_RESET",e))(za||{});var La=(e=>(e.reset="SERIES_RESET",e.set="SERIES_SET",e.toggle="SERIES_TOGGLE",e))(La||{});const Oa=f.forwardRef(((e,t)=>{const{_ref:r,itemRef:a,onDataAction:l,ignoreIsAllDay:o,viewItem:s,series:c,onSeriesChange:i,form:d,formItem:u,onFormItemChange:m,drag:p,dragItem:g,onDragItemChange:E,resize:h,resizeItem:y,onResizeItemChange:v,removeDialog:k,removeItem:D,onRemoveItemChange:S,occurrenceDialog:C,showOccurrenceDialog:b,onShowOccurrenceDialogChange:I,showRemoveDialog:w,onShowRemoveDialogChange:T,onFocus:R,onFocusAction:x,onMouseDown:M,onMouseDownAction:z,onMouseUp:O,onMouseUpAction:F,onClick:P,onClickAction:W,onDoubleClick:H,onDoubleClickAction:K,onRemoveClick:V,onRemoveClickAction:G,onPress:B,onPressAction:U,onDrag:Z,onDragAction:$,onRelease:q,onReleaseAction:Y,onResizePress:j,onResizePressAction:X,onResizeStartDrag:Q,onResizeStartDragAction:ee,onResizeEndDrag:te,onResizeEndDragAction:re,onResizeRelease:ae,onResizeReleaseAction:ne,onOccurrenceClick:le,onOccurrenceClickAction:oe,onSeriesClick:ce,onSeriesClickAction:ie,onKeyDown:ue,onKeyDownAction:me,onKeyUp:pe,onKeyUpAction:ge,onRemoveConfirm:Ee,onRemoveConfirmAction:he,onFormSubmit:ye,onFormSubmitAction:fe,onCancel:ke,onCancelAction:Se}={...Fa,...e},[be,Ie]=f.useState(e.tabIndex),we=f.useRef(null),Te=f.useRef(null),Re=n.useId();f.useImperativeHandle(we,(()=>({props:e,element:Te.current&&Te.current.element}))),f.useImperativeHandle(t,(()=>we.current)),f.useImperativeHandle(r,(()=>Te.current)),f.useImperativeHandle(a,(()=>Te.current));const xe=s||Fa.viewItem,Ae=p||Fa.drag,_e=h||Fa.resize,Ne=d||Fa.form,Me=C||Fa.occurrenceDialog,ze=k||Fa.removeDialog,Le=Qr(e.editable),[Oe,Fe]=Bt(),[Pe,,We]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SERIES_RESET":return null;case"SERIES_SET":return t.payload;case"SERIES_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(null,c,i),[He,Ke,Ve]=((e,t)=>{const[r,a]=Ce(...t),l=se(),[o]=ve();return[r,a,(t,s)=>{let c;switch(t.type){case"FORM_ITEM_SET":c=t.payload;break;case"FORM_ITEM_RESET":c=null;break;case"FORM_ITEM_SET_MASTER":c=n.clone(L(t.payload,l,o));break;case"FORM_ITEM_COMPLETE":e.onDataAction&&r&&(e.onDataAction.call(void 0,{type:J.update,series:e.series,dataItem:t.payload}),c=null);break;default:c=r}a(c,s)}]})({series:Pe,onDataAction:l},[null,u,m]),[Ge,Be,Ue]=((e,t)=>{const r=f.useRef(0),a=f.useRef(0),l=f.useRef(0),o=f.useRef(null),[s,c]=Ce(...t),[i]=Bt(),d=se(),u=de();return[s,c,t=>{switch(t.type){case"DRAG_ITEM_SET":c(t.payload);break;case"DRAG_ITEM_RESET":c(null);break;case"DRAG_ITEM_DRAG_SELECTED":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const r=A(t.payload.x,t.payload.y,7);if(!r||r===o.current)return;const s=n.clone(e.dataItem),u=r.getAttribute("data-slot-start"),m="true"===r.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&m!==e.isAllDay)return;const p=new Date(_(s,d.start)),g=Number(u)-p.getTime(),E=i.map((e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g),a=new Date(e.current.props.end.getTime()+g);return N(t,d.start,r),N(t,d.end,a),t})).filter(Boolean);o.current=r,c([...E]);break}case"DRAG_ITEM_START":{const o=t.payload.x,s=t.payload.y;a.current=o,l.current=s;const c=A(o,s,7);if(!c)return;const i=n.clone(e.dataItem),u=c.getAttribute("data-slot-start"),m=_(i,d.start);if(null===u)return;r.current=Number(u)-new Date(m).getTime();break}case"DRAG_ITEM_DRAG":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const s=A(t.payload.x,t.payload.y,7);if(!s||s===o.current)return;const i=n.clone(e.dataItem),m=s.getAttribute("data-slot-start"),p=s.getAttribute("data-slot-group"),g="true"===s.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&g!==e.isAllDay)return;const E=new Date(_(i,d.start)),h=new Date(_(i,d.end)).getTime()-E.getTime(),y=new Date(Number(m)-Number(r.current)),v=new Date(Number(m)-Number(r.current)+h),f=u.find((e=>e.index===Number(p)));N(i,d.start,y),N(i,d.end,v),f&&u.length>1&&f.resources.forEach((e=>{e.multiple||N(i,e.field,e[e.valueField])})),o.current=s,i&&c(i);break}case"DRAG_ITEM_COMPLETE":c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:s});break;case"DRAG_ITEM_COMPLETE_OCCURRENCE":{const t=Array.isArray(s)?s.slice():n.clone(s);c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:t});break}case"DRAG_ITEM_COMPLETE_SERIES":{let t;if(Array.isArray(s))t=s.map((e=>{const t=n.clone(e);return N(t,d.start,_(e,d.start)),N(t,d.end,_(e,d.end)),t}));else{const e=n.clone(s);N(e,d.start,_(s,d.start)),N(e,d.end,_(s,d.end)),t=e}c(null),e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}default:c(s)}}]})({dataItem:e.dataItem,ignoreIsAllDay:e.ignoreIsAllDay,isAllDay:e.isAllDay,onDataAction:l},[null,g,E]),[Ze,$e,qe]=((e,t)=>{const r=f.useRef(null),[a,l]=Ce(...t),[o]=Bt(),s=se();return[a,l,(t,c)=>{let i=a;switch(t.type){case"RESIZE_ITEM_SET":i=t.payload;break;case"RESIZE_ITEM_RESET":default:i=null;break;case"RESIZE_ITEM_START":{if(c.stopPropagation(),!i)return;const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const d=o.getAttribute("data-slot-start"),u=new Date(Number(d)),m=n.clone(e.dataItem);if(u>=_(m,s.end))return;N(m,s.start,u),r.current=o,i=m;break}case"RESIZE_ITEM_START_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.start)),g=new Date(Number(m)).getTime()-p.getTime();let E=!1;const h=o.map((e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g);if(!(r>=_(t,s.end)))return N(t,s.start,r),t;E=!0})).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_START_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-start"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d>=u.end)return;N(u,s.start,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-end"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d<=u.start)return;N(u,s.end,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.end)),g=new Date(Number(m)).getTime()-p.getTime();let E;const h=o.map((e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.end.getTime()+g);if(!(r<=_(t,s.start)))return N(t,s.end,r),t;E=!0})).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_COMPLETE":case"RESIZE_ITEM_COMPLETE_OCCURRENCE":i=null,e.onDataAction&&a&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:a});break;case"RESIZE_ITEM_COMPLETE_SERIES":{let t;if(i=null,Array.isArray(a))t=a.map((e=>{const t=n.clone(e);return N(t,s.start,_(e,s.start)),N(t,s.end,_(e,s.end)),t}));else{const e=n.clone(a);N(e,s.start,_(a,s.start)),N(e,s.end,_(a,s.end)),t=e}e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}}l(i)}]})({dataItem:e.dataItem,onDataAction:l},[null,y,v]),[Ye,je,Xe]=((e,t)=>{const[r,a]=Ce(...t);return[r,a,t=>{let n;switch(t.type){case"REMOVE_ITEM_SET":n=t.payload;break;case"REMOVE_ITEM_RESET":n=null;break;case"REMOVE_ITEM_COMPLETE":e.onDataAction&&r&&e.onDataAction.call(void 0,{type:J.remove,series:e.series,dataItem:r}),n=null;break;default:n=r}a(n)}]})({series:Pe,onDataAction:l},[null,D,S]),[Qe,Je,et]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_REMOVE_DIALOG_RESET":case"SHOW_REMOVE_DIALOG_CLOSE":return!1;case"SHOW_REMOVE_DIALOG_SET":return t.payload;case"SHOW_REMOVE_DIALOG_OPEN":return!0;case"SHOW_REMOVE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,w,T),[tt,rt,at]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_OCCURRENCE_DIALOG_RESET":case"SHOW_OCCURRENCE_DIALOG_CLOSE":return!1;case"SHOW_OCCURRENCE_DIALOG_SET":return t.payload;case"SHOW_OCCURRENCE_DIALOG_OPEN":return!0;case"SHOW_OCCURRENCE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,b,I),[nt]=Kt(),[,lt]=f.useContext(Ut),[,ot]=$t(),st=!!(Te.current&&Oe&&Oe.some((e=>e.current===Te.current))),ct=f.useMemo((()=>({selected:st,series:Pe,formItem:He,dragItem:Ge,resizeItem:Ze,removeItem:Ye,showRemoveDialog:Qe,showOccurrenceDialog:tt})),[Ge,He,Ye,Ze,st,Pe,tt,Qe]),it=f.useMemo((()=>({[La.set]:We,[La.toggle]:We,[La.reset]:We,[Yt.select]:Fe,[Yt.add]:Fe,[Yt.remove]:Fe,[Yt.reset]:Fe,[Yt.selectNext]:Fe,[Yt.selectPrev]:Fe,[xa.set]:Ve,[xa.setMaster]:Ve,[xa.reset]:Ve,[xa.complete]:Ve,[_a.set]:Xe,[_a.reset]:Xe,[_a.complete]:Xe,[Aa.close]:at,[Aa.open]:at,[Aa.set]:at,[Aa.toggle]:at,[Aa.reset]:at,[Na.close]:et,[Na.open]:et,[Na.set]:et,[Na.toggle]:et,[Na.reset]:et,[Ma.start]:Ue,[Ma.drag]:Ue,[Ma.complete]:Ue,[Ma.completeOccurrence]:Ue,[Ma.completeSeries]:Ue,[Ma.set]:Ue,[Ma.reset]:Ue,[Ma.dragSelected]:Ue,[za.start]:qe,[za.startDrag]:qe,[za.startDragSelected]:qe,[za.endDrag]:qe,[za.endDragSelected]:qe,[za.complete]:qe,[za.completeOccurrence]:qe,[za.completeSeries]:qe,[za.set]:qe,[za.reset]:qe,[Qt.next]:lt,[Qt.prev]:lt,[Jt.left]:ot,[Jt.right]:ot,[Jt.up]:ot,[Jt.down]:ot,null:()=>{}})),[Ue,Ve,Fe,Xe,qe,We,at,et,lt,ot]),dt=f.useCallback((t=>{if(x){const r=x(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}R&&R.call(void 0,t)}),[it,R,x,e,ct]),ut=f.useCallback((t=>{if(z){const r=z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}M&&M.call(void 0,t)}),[it,M,z,e,ct]),mt=f.useCallback((t=>{if(F){const r=F(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}O&&O.call(void 0,t)}),[it,O,F,e,ct]),[,pt]=f.useContext(De),gt=f.useCallback((t=>{if(W){pt(Te.current);const r=W(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}P&&P.call(void 0,t)}),[it,P,W,e,ct]),Et=f.useCallback((t=>{if(K){const r=K(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}H&&H.call(void 0,t)}),[K,H,e,it,ct]),ht=f.useCallback((t=>{if(G){const r=G(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te}))}V&&V.call(void 0,t)}),[G,V,e,it,ct]),yt=f.useCallback((t=>{if(U){const r=U(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}B&&B.call(void 0,t)}),[U,B,e,it,ct]),vt=f.useCallback((t=>{if($){const r=$(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Z&&Z.call(void 0,t)}),[$,Z,e,it,ct]),ft=f.useCallback((t=>{if(Y){const r=Y(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}q&&q.call(void 0,t)}),[Y,q,e,it,ct]),kt=f.useCallback((t=>{if(X){const r=X(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}j&&j.call(void 0,t)}),[X,j,e,ct,it]),Dt=f.useCallback((t=>{if(ee){const r=ee(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Q&&Q.call(void 0,t)}),[Q,ee,e,it,ct]),St=f.useCallback((t=>{if(re){const r=re(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}te&&te.call(void 0,t)}),[te,re,e,it,ct]),Ct=f.useCallback((t=>{if(ne){const r=ne(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent))):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}ae&&ae.call(void 0,t)}),[ne,ae,e,it,ct]),bt=f.useCallback((t=>{if(fe){const r=fe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}ye&&ye.call(void 0,t)}),[fe,ye,e,ct,it]),It=f.useCallback((t=>{if(Se){const r=Se(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}ke&&ke.call(void 0,t)}),[Se,ke,e,ct,it]),wt=f.useCallback((t=>{if(oe){const r=oe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}le&&le.call(void 0,t)}),[oe,le,e,ct,it]),Tt=f.useCallback((t=>{if(ie){const r=ie(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t))):it[r.type]({...r,item:Te},t))}ce&&ce.call(void 0,t)}),[ie,ce,e,ct,it]),Rt=f.useCallback((t=>{if(me){const r=me(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent))):it[r.type]({...r,item:Te},t.syntheticEvent))}ue&&ue.call(void 0,t)}),[me,ue,e,ct,it]),xt=f.useCallback((t=>{if(ge){const r=ge(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent))):it[r.type]({...r,item:Te},t.syntheticEvent))}pe&&pe.call(void 0,t)}),[ge,pe,e,ct,it]),At=f.useCallback((t=>{if(he){const r=he(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map((e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent))):it[r.type]({...r,item:Te},t.syntheticEvent))}Ee&&Ee.call(void 0,t)}),[he,Ee,e,ct,it]);return f.useEffect((()=>{const t=nt.length&&nt[0].current===Te.current;Ie(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===Oe.length&&t?0:void 0)}),[nt,e.tabIndex,Oe.length]),f.createElement(Ra,{props:e,form:[He,Ke,Ve],drag:[Ge,Be,Ue],resize:[Ze,$e,qe],remove:[Ye,je,Xe],showRemoveDialog:[Qe,Je,et],showOccurrenceDialog:[tt,rt,at]},f.createElement(xe,{...e,_ref:Te,itemRef:Te,selected:st,tabIndex:be,id:Re,onKeyDown:Rt,onKeyUp:xt,onFocus:dt,onMouseUp:mt,onMouseDown:ut,onClick:gt,onDoubleClick:Et,onRemoveClick:ht,onPress:yt,onDrag:vt,onRelease:ft,onResizePress:kt,onResizeEndDrag:St,onResizeStartDrag:Dt,onResizeRelease:Ct}),Ge&&Le.drag&&(Array.isArray(Ge)?Ge.map(((t,r)=>f.createElement(Ae,{key:r,ignoreIsAllDay:o,dataItem:t,vertical:e.vertical,viewItem:xe,item:e.item}))):f.createElement(Ae,{ignoreIsAllDay:o,dataItem:Ge,vertical:e.vertical,viewItem:xe,item:e.item})),Ze&&Le.resize&&(Array.isArray(Ze)?Ze.map(((t,r)=>f.createElement(_e,{key:r,format:e.format,ignoreIsAllDay:o,dataItem:t,viewItem:e.viewItem,item:e.item,vertical:e.vertical}))):f.createElement(_e,{format:e.format,ignoreIsAllDay:o,dataItem:Ze,viewItem:e.viewItem,item:e.item,vertical:e.vertical})),He&&!tt&&Le.edit&&f.createElement(Ne,{dataItem:He,onSubmit:bt,onClose:It,onCancel:It}),tt&&f.createElement(Me,{dataItem:He||Ge||Ze||Ye,isRemove:null!==Ye,onClose:It,onOccurrenceClick:wt,onSeriesClick:Tt}),Qe&&Ye&&Le.remove&&f.createElement(ze,{dataItem:Ye,onClose:It,onCancel:It,onConfirm:At}))})),Fa={viewItem:oa,drag:ya,resize:fa,form:Gr,occurrenceDialog:ta,removeDialog:ra,onClickAction:(e,t,r)=>[{type:e.syntheticEvent.metaKey||e.syntheticEvent.ctrlKey?!r.selected||r.dragItem||r.resizeItem?Yt.add:Yt.remove:Yt.select}],onDoubleClickAction:(e,t)=>t.editable?[{type:xa.set,payload:t.dataItem},t.isRecurring&&{type:Aa.open}].filter(Boolean):[],onRemoveClickAction:(e,t)=>t.editable?[{type:_a.set,payload:t.dataItem},t.isRecurring?{type:Aa.open}:{type:Na.open}]:[],onPressAction:(e,t)=>t.editable?{type:Ma.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?Ma.dragSelected:Ma.drag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onReleaseAction:(e,t,r)=>t.editable&&r.dragItem?t.isRecurring&&!t.isException&&null===r.series?{type:Aa.open}:{type:t.isRecurring?r.series?Ma.completeSeries:Ma.completeOccurrence:Ma.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizePressAction:(e,t)=>t.editable?{type:za.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeStartDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?za.startDragSelected:za.startDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeEndDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?za.endDragSelected:za.endDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeReleaseAction:(e,t,r)=>t.editable&&r.resizeItem?t.isRecurring&&!t.isException&&null===r.series?{type:Aa.open}:{type:t.isRecurring?r.series?za.completeSeries:za.completeOccurrence:za.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onOccurrenceClickAction:(e,t,r)=>r.dragItem?[{type:Ma.completeOccurrence},{type:Aa.close}]:r.resizeItem?[{type:za.completeOccurrence},{type:Aa.close}]:r.formItem?[{type:La.set,payload:!1},{type:xa.set,payload:t.dataItem},{type:Aa.close}]:r.removeItem?[{type:La.set,payload:!1},{type:_a.set,payload:t.dataItem},{type:Na.open},{type:Aa.close}]:[],onSeriesClickAction:(e,t,r)=>r.dragItem?[{type:Ma.completeSeries},{type:Aa.close}]:r.resizeItem?[{type:za.completeSeries},{type:Aa.close}]:r.formItem?[{type:La.set,payload:!0},{type:xa.setMaster,payload:t.dataItem},{type:Aa.close}]:r.removeItem?[{type:La.set,payload:!0},{type:_a.set,payload:t.dataItem},{type:Na.open},{type:Aa.close}]:[],onKeyDownAction:(e,t)=>{switch(e.syntheticEvent.keyCode){case n.Keys.enter:return[{type:xa.set,payload:t.dataItem},t.isRecurring&&{type:Aa.open}];case n.Keys.tab:return[{type:e.syntheticEvent.shiftKey?Qt.prev:Qt.next,ignoreIsAllDay:t.ignoreIsAllDay},{type:e.syntheticEvent.shiftKey?Yt.selectPrev:Yt.selectNext,ignoreIsAllDay:t.ignoreIsAllDay}];case n.Keys.up:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:Jt.up,slot:t.slots[0]._ref}];case n.Keys.right:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:Jt.right,slot:t.slots[0]._ref}];case n.Keys.down:return[!(!t.slots.length||!t.slots[t.slots.length-1]._ref.current)&&{type:Jt.down,slot:t.slots[t.slots.length-1]._ref}];case n.Keys.left:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:Jt.left,slot:t.slots[0]._ref}];default:return}},onFormSubmitAction:e=>[{type:xa.complete,payload:e.value}],onRemoveConfirmAction:()=>[{type:_a.complete},{type:Aa.close}],onCancelAction:()=>[{type:La.reset},{type:_a.reset},{type:xa.reset},{type:Ma.reset},{type:za.reset},{type:Na.reset},{type:Aa.reset}]};Oa.displayName="KendoReactSchedulerEditItem";const Pa=e=>{const[t,r]=f.useState(!1),l=te(),o=ae(),s=f.useRef(void 0),c=f.useRef(null),i=f.useRef(null),d=e.updateInterval||Wa.updateInterval,[,u]=f.useState(!1),m=n.useDir(i,!0===o.rtl?"rtl":void 0),[p]=Wt(),g=f.useCallback((()=>{if(!p)return;const t=p.filter((t=>t.current&&(void 0===e.groupIndex||null===e.groupIndex||t.current.props.group.index===e.groupIndex)&&(e.vertical?W(new Date,new Date,t.current.props.start,t.current.props.end,!0):K(new Date,t.current.props.start,t.current.props.end))&&!t.current.props.isAllDay));if(t&&t.length&&c.current&&i.current){const n=T(t);if(!n.current)return;const l=e.vertical?(e=>{let t=0;return e.forEach((e=>{if(e.current){const r=b(e.current.element);t+=r.height}})),t})(t):(e=>{let t=0;return e.forEach((e=>{if(e.current){const r=b(e.current.element);t+=r.width}})),t})(t),o=b(n.current.element),s=b(c.current),d=(e.vertical?o.width:o.height)/(n.current.props.end.getTime()-n.current.props.start.getTime()),u=(Date.now()-((e,t)=>{const r=a.cloneDate(e);return r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r})(new Date,n.current.props.start).getTime())*d,p="rtl"===m,g=e.vertical?o.top:o.top+u-s.height/2,E=p?"right":"left",h=e.vertical?o[E]+u-s.width/2:o[E];e.vertical?c.current.style[E]=`${h}px`:c.current.style.top=`${g}px`,i.current.style[E]=`${h}px`,i.current.style.top=`${g}px`,i.current.style[e.vertical?"height":"width"]=l-1+"px",r(!0)}else r(!1)}),[p,e.groupIndex,e.vertical,m]),E=f.useCallback((()=>{g(),u((e=>!e))}),[g]);f.useEffect((()=>{if(!l.current||!window)return;clearInterval(s.current),s.current=window.setInterval(E,d);const e=window.ResizeObserver,t=e&&new e(E);return t&&t.observe(l.current),()=>{clearInterval(s.current),t&&t.disconnect()}}),[g,E,l,d]),f.useEffect(g);const h=f.createElement("div",{ref:c,className:n.classNames("k-current-time",{"k-current-time-arrow-right":!e.vertical&&"rtl"!==m,"k-current-time-arrow-left":!e.vertical&&"rtl"===m,"k-current-time-arrow-down":e.vertical}),style:{transform:e.vertical?"rtl"===m?"translateX(50%)":"translateX(-50%)":"translateY(-50%)",visibility:t?void 0:"hidden"}});return f.createElement(f.Fragment,null,e.attachArrow&&e.attachArrow.current?k.createPortal(h,e.attachArrow.current):h,f.createElement("div",{className:"k-current-time",ref:i,style:{transform:e.vertical?"translateX(-50%)":"translateY(-50%)",[e.vertical?"width":"height"]:"1px",visibility:t?void 0:"hidden"}}))},Wa={updateInterval:6e4},Ha=f.forwardRef(((e,t)=>{const{as:r=Ka.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo((()=>n.classNames("k-scheduler-cell k-heading-cell",e.className)),[e.className]);return f.useImperativeHandle(s,(()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e}))),f.useImperativeHandle(t,(()=>s.current)),f.createElement(r,{ref:r!==Ka.as?void 0:l,...a,className:i},f.createElement("span",{className:"k-link k-nav-day"},c.formatDate(e.date,e.format?e.format:Ka.format)))})),Ka={as:f.forwardRef((({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l}))),format:"d"};Ha.displayName="KendoReactSchedulerDateHeaderCell";const Va=(e,{step:t,timezone:r})=>{const n=[],l=a.ZonedDate.fromLocalDate(e.start,r),o=a.ZonedDate.fromLocalDate(e.end,r);for(let e=l.clone(),r=0;e.getTime()<o.getTime();r++,e=e.addTime(t)){const a=e.clone(),l=a.clone().addTime(t),o=new Date(a.getTime()),s={index:r,end:new Date(l.getTime()),start:o,zonedStart:a,zonedEnd:l};n.push(s)}return n},Ga=(e,{step:t},{groups:r,ranges:n})=>{const l=[];return r.forEach((e=>{n.forEach((r=>{const n=r.zonedStart,o=r.zonedEnd,s=o.timezoneOffset-n.timezoneOffset;for(let c=n.clone(),i=0,d=s<0?s*Y*-1:0;c.getTime()<o.getTime();){const n=f.createRef(),o=c.clone(),s=c.addTime(t),u=(s.timezoneOffset-o.timezoneOffset)*Y,m=t<=Math.abs(u);d&&m&&(d-=t,c=c.addTime(-t));const p=new Date(o.getTime()),g={_ref:n,index:i,end:new Date(s.getTime()),start:p,zonedStart:o,zonedEnd:s,range:r,group:e,items:[],isAllDay:a.MS_PER_DAY<=t};l.push(g),c=c.addTime(t),i++}}))})),l},Ba=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),Ua=e=>{var t,r,l,s,c,i,d,u,m,p,g;const{group:E,timezone:h,resources:y}=ae(),v=o.useInternationalization(),k=e.editItem||Oa,D=e.editSlot||Jr,S=e.showWorkHours,C=null!=(t=e.numberOfDays)?t:Za.numberOfDays,b=null!=(r=e.slotDivisions)?r:Za.slotDivisions,I=null!=(l=e.slotDuration)?l:Za.slotDuration,w=null!=(s=e.workWeekStart)?s:Za.workWeekStart,x=null!=(c=e.workWeekEnd)?c:Za.workWeekEnd,A=!1!==e.currentTimeMarker&&Za.currentTimeMarker,_=v.parseDate(null!=(d=null!=(i=e.workDayStart)?i:e.isWorkDayStart)?d:Za.isWorkDayStart),N=v.parseDate(null!=(m=null!=(u=e.workDayEnd)?u:e.isWorkDayEnd)?m:Za.isWorkDayEnd),M=v.parseDate(null!=(p=e.startTime)?p:Za.startTime),z=v.parseDate(null!=(g=e.endTime)?g:Za.endTime),[L]=ve(),O=de(),F=ge(),P=se(),H=me(),G=f.useMemo((()=>S?_:M),[S,_,M]),Z=f.useMemo((()=>S?N:z),[S,N,z]),$=f.useMemo((()=>Va(H,{step:a.MS_PER_DAY*C,timezone:h}).map((e=>({...e,isAllDay:!0})))),[H.start.getTime(),H.end.getTime(),C]),q=f.useMemo((()=>Va(H,{step:a.MS_PER_DAY,timezone:h}).map((e=>({...e,isAllDay:!1})))),[H.start.getTime(),H.end.getTime(),h]),j=f.useMemo((()=>Ga(0,{step:a.MS_PER_DAY},{groups:O,ranges:$})),[H.start.getTime(),H.end.getTime(),h,$,O]),X=f.useMemo((()=>Ga(0,{step:I*Y/b},{groups:O,ranges:q}).filter((e=>Z.getTime()===G.getTime()||K(e.zonedStart,G,Z)))),[H.start.getTime(),H.end.getTime(),I,b,G.getTime(),Z.getTime(),O,q]),Q=f.useMemo((()=>ca(L,{dateRange:H,fields:P,timezone:h})),[L,H.start.getTime(),H.end.getTime(),P,h]),J=f.useMemo((()=>Q.filter((e=>e.isAllDay))),[Q]),ee=f.useMemo((()=>Q.filter((e=>!e.isAllDay))),[Q]),te=f.useMemo((()=>ma(J,{timezone:h},{groups:O,ranges:$})),[Q,h,O,$]),re=f.useMemo((()=>ma(ee,{timezone:h},{groups:O,ranges:q}).filter((e=>G.getTime()===Z.getTime()||K(e.zonedStart,G,Z)||K(e.zonedEnd,G,Z)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),G,Z)))),[Q,h,O,q,G.getTime(),Z.getTime()]);f.useMemo((()=>U(te,j,!1)),[te,j]),f.useMemo((()=>B(te,j,!1)),[te,j]),f.useMemo((()=>U(re,X,!1)),[re,X]),f.useMemo((()=>B(re,X,!1)),[re,X]);const ne=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},q.map(((t,r)=>f.createElement(Ha,{as:e.dateHeaderCell,key:r,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),h),start:t.start,end:t.end,format:{skeleton:"MEd"}})))))),le=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{key:t,className:"k-scheduler-row"},$.map(((r,a)=>j.filter((e=>e.group.index===t&&e.range.index===a)).map(((r,a,n)=>f.createElement(D,{...r,onDataAction:e.onDataAction,form:e.form,slot:e.slot,viewSlot:e.viewSlot,key:`${r.start.getTime()}:${r.group.index}`,row:0,col:"horizontal"===F?n.length*(t||0)+a:a,isWorkDay:0<=r.zonedStart.getDay()+(C-w)&&(r.zonedStart.getDay()+(C-w))%C<=x+(C-w),expandable:!0})))))))),oe=f.useMemo((()=>n.classNames("week"===e.name?"k-scheduler-weekview":"k-scheduler-dayview",e.className)),[e.name,e.className]),ce=f.useCallback(((t,r,a)=>q.map(((n,l)=>X.filter((e=>e.index===t.index&&e.range.index===l&&e.group.index===a)).map((t=>f.createElement(D,{key:`${t.start.getTime()}:${t.group.index}`,...t,onDataAction:e.onDataAction,slot:e.slot,viewSlot:e.viewSlot,form:e.form,row:r+1,col:q.length*(a||0)+l,isWorkHour:K(t.zonedStart,_,N),isWorkDay:V(t.zonedEnd.getDay(),w,x),editable:e.editable})))))),[q,D,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,X,N,_,x,w]),ie=f.useCallback(((t,r,a)=>j.filter((e=>e.group.index===r&&e.range.index===a)).map(((a,n)=>f.createElement(D,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,...a,onDataAction:e.onDataAction,key:`${a.start.getTime()}:${a.group.index}`,className:"k-scheduler-alldays-slot",row:t*(r||0)+1*(r||0),col:n,expandable:!0})))),[D,j,e.form,e.onDataAction,e.slot,e.viewSlot]),ue=f.useCallback(((t,r,a,n)=>q.map(((l,o)=>X.filter((e=>e.index===t.index&&e.group.index===a&&e.range.index===o)).map((t=>f.createElement(D,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,onDataAction:e.onDataAction,...t,key:`${t.start.getTime()}:${t.group.index}`,row:r.length*(a||0)+n+1*(a||0)+1,col:o,editable:e.editable,isWorkHour:K(t.zonedStart,_,N),isWorkDay:0<=t.zonedStart.getDay()+(C-w)&&(t.zonedStart.getDay()+(C-w))%C<=x+(C-w)})))))),[D,C,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,q,X,N,_,x,w]);return f.createElement(nr,{id:e.id,props:e,style:e.style,className:oe,ranges:[...$,...q],slots:[...j,...X]},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===F?f.createElement(f.Fragment,null,f.createElement(or,{nested:!0,group:E,resources:y,rowContent:dr,childRowContent:dr},ne),f.createElement(or,{group:E,resources:y,rowContent:fr,childRowContent:fr},le),te.map((t=>f.createElement(k,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,vertical:!1})))):f.createElement(ur,{group:E,resources:y,cellContent:Ba},ne)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===F?f.createElement(f.Fragment,null,X.filter((e=>0===e.group.index&&0===e.range.index)).map(((t,r)=>f.createElement(f.Fragment,{key:t.index},f.createElement(or,{nested:!1,group:E,resources:y,rowContent:Sr,rowContentProps:{timeHeaderCell:e.timeHeaderCell,isMaster:r%b==0,isLast:(r+1)%b==0,slot:t}},f.createElement(lr.Consumer,null,(({groupIndex:e})=>f.createElement("div",{className:n.classNames("k-scheduler-row",{"k-middle-row":(r+1)%b!=0})},ce(t,r,e)))))))),!1!==A&&W(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(Pa,null)):f.createElement(f.Fragment,null,f.createElement(ur,{nested:!0,group:E,resources:y},f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement(f.Fragment,{key:t},f.createElement("div",{className:"k-scheduler-row"},f.createElement(fr,{groupIndex:t},$.map(((e,r)=>{const a=X.filter((e=>e.group.index===t&&0===e.range.index)).length;return ie(a,t,r)})))),X.filter((e=>e.group.index===t&&0===e.range.index)).map(((r,a,n)=>f.createElement("div",{className:"k-scheduler-row",key:r.index},f.createElement(Sr,{slot:r,isMaster:a%b==0,isLast:(a+1)%b==0,timeHeaderCell:e.timeHeaderCell},ue(r,n,t,a))))),!1!==A&&W(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(Pa,{groupIndex:t}))))),te.map((t=>f.createElement(k,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!1})))),re.map((t=>f.createElement(k,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!0})))))},Za={name:"multi-day",title:"Multi Day",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"23:59",isWorkDayStart:"08:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,showCurrentTime:!0,defaultShowWorkHours:!0};Ua.propTypes={currentTimeMarker:r.bool,name:r.string,numberOfDays:r.number,startTime:r.string,endTime:r.string,workDayStart:r.string,workDayEnd:r.string,workWeekStart:r.number,workWeekEnd:r.any,slotDivisions:r.number,slotDuration:r.number,showWorkHours:r.bool,selectedDateFormat:r.string,selectedShortDateFormat:r.string},Ua.displayName="KendoReactSchedulerMultiDayView";const $a=e=>f.createElement(Ua,{...e}),qa={...Za,name:"day",title:e=>e.toLanguageString(Le,At[Le]),numberOfDays:1,slotDuration:60,slotDivisions:2,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};$a.displayName="KendoReactSchedulerDayView";const Ya=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1607496606,version:"13.3.0-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"}),ja=f.forwardRef(((e,t)=>{const{_ref:r,onRemoveClick:a}=e,l=f.useRef(null),s=f.useRef(null);f.useImperativeHandle(l,(()=>({props:e,element:s.current}))),f.useImperativeHandle(t,(()=>l.current)),f.useImperativeHandle(r,(()=>l.current));const c=Qr(e.editable),i=o.useLocalization().toLanguageString(Fe,At[Fe]),u=e.group.resources.find((e=>!(!e.colorField||void 0===e[e.colorField]))),m=u&&u.colorField&&u[u.colorField],p=f.useCallback((e=>{a&&a.call(void 0,{syntheticEvent:e,target:l.current})}),[a,l]),g=f.useMemo((()=>n.classNames("k-task",e.className)),[e.className]);return f.createElement("div",{id:e.id,ref:s,style:e.style,className:g,tabIndex:e.tabIndex||void 0},m&&f.createElement("span",{className:"k-scheduler-mark",style:{color:m,backgroundColor:m}}),e.isRecurring&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon}),e.title,c.remove&&f.createElement("a",{className:"k-link k-event-delete",title:i,"aria-label":i,onClick:p},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})))}));ja.displayName="KendoReactSchedulerTask";const Xa=f.forwardRef(((e,t)=>{const{task:r,_ref:a,...n}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,(()=>({props:e,element:l.current&&l.current.element}))),f.useImperativeHandle(a,(()=>l.current)),f.useImperativeHandle(t,(()=>o.current));const s=r||Qa.task;return f.createElement(s,{...n,_ref:l})})),Qa={task:ja};Xa.displayName="KendoReactSchedulerViewTask";const Ja=f.createContext([null]),en=f.createContext([!1]),tn=f.createContext([!1]),rn=e=>f.createElement(Ja.Provider,{value:e.remove},f.createElement(en.Provider,{value:e.showRemoveDialog},f.createElement(tn.Provider,{value:e.showOccurrenceDialog},e.children))),an=f.forwardRef(((e,t)=>{const{_ref:r,onDataAction:a,viewTask:n,removeDialog:l,removeItem:o,onRemoveItemChange:s,occurrenceDialog:c,showOccurrenceDialog:i,onShowOccurrenceDialogChange:d,showRemoveDialog:u,onShowRemoveDialogChange:m,...p}=e,g=f.useRef(null);f.useImperativeHandle(g,(()=>({props:e,element:g.current&&g.current.element}))),f.useImperativeHandle(r,(()=>g.current)),f.useImperativeHandle(t,(()=>g.current));const E=n||nn.viewTask,h=c||nn.occurrenceDialog,y=l||nn.removeDialog,v=Qr(e.editable),k=se(),[D,S]=ve(),[C,b]=f.useState(null),[I,w]=Ce(null,o,s),[T,R]=Ce(!1,u,m),[x,A]=Ce(!1,i,d),_=f.useCallback((t=>{v.remove&&(w(e.dataItem,t),e.isRecurring?A(!0,t):R(!0,t))}),[w,e.dataItem,e.isRecurring,A,R]),N=f.useCallback((e=>{b(null),w(null,e),R(!1,e),A(!1,e)}),[b,w,R,A]),M=f.useCallback((e=>{a&&I&&a.call(void 0,{type:J.remove,series:C,dataItem:I}),w(null,e),R(!1,e)}),[I,S,R]),z=f.useCallback(((e,t)=>{w&&w(e,t)}),[w]),O=f.useCallback(((e,t)=>{R&&R(e,t)}),[R]),F=f.useCallback(((e,t)=>{A&&A(e,t)}),[A]),P=f.useCallback((t=>{I&&(b(!1),w(e.dataItem,t),R(!0,t)),A(!1,t)}),[b,e.dataItem,I,w,R]),W=f.useCallback((e=>{if(I){b(!0);const t=L(I,k,D);w(t,e),R(!0,e)}A(!1,e)}),[k,I,b,w,R,A]);return f.createElement(rn,{remove:[I,z],showRemoveDialog:[T,O],showOccurrenceDialog:[x,F]},f.createElement(E,{_ref:g,...p,onRemoveClick:_}),x&&f.createElement(h,{dataItem:I,isRemove:null!==I,onClose:N,onOccurrenceClick:P,onSeriesClick:W}),T&&f.createElement(y,{dataItem:I,onClose:N,onCancel:N,onConfirm:M}))})),nn={viewTask:Xa,occurrenceDialog:ta,removeDialog:ra};an.displayName="KendoReactSchedulerEditTask";const ln=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editTask||an,c=e.editSlot||Jr,i=f.useRef(null),u=n.useDir(i),m=o.useInternationalization(),p=o.useLocalization(),[g]=ve(),E=de(),h=se(),y=me(),v=f.useMemo((()=>Va(y,{step:a.MS_PER_DAY,timezone:r})),[y.start.getTime(),y.end.getTime(),r]),k=f.useMemo((()=>Ga(0,{step:a.MS_PER_DAY},{groups:E,ranges:v})),[y.start.getTime(),y.end.getTime(),r,E,v]),D=f.useMemo((()=>ca(g,{dateRange:y,fields:h,timezone:r})),[g,y.start.getTime(),y.end.getTime(),h,r]),S=f.useMemo((()=>ma(D,{timezone:r},{groups:E,ranges:v})),[D,r,E,v]),C=f.useMemo((()=>n.classNames("k-scheduler-agendaview",e.className)),[e.className]);return Xt({element:i,selector:".k-scheduler-datecolumn",explicitDepth:!1}),Xt({element:i,selector:".k-scheduler-timecolumn",explicitDepth:!1}),f.useMemo((()=>U(S,k,!0)),[S,k]),f.useMemo((()=>B(S,k,!0)),[S,k]),f.createElement(nr,{ref:i,id:e.id,style:e.style,className:C,props:e,slots:S,ranges:v},f.createElement("div",{className:"k-scheduler-head"},f.createElement(ur,{resources:l,group:t},f.createElement(lr.Consumer,null,(({groupIndex:e})=>f.createElement("div",{className:"k-scheduler-row",key:e},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},p.toLanguageString(St,At[St])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},p.toLanguageString(Ct,At[Ct])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},p.toLanguageString(bt,At[bt]))))))),f.createElement("div",{className:"k-scheduler-body"},f.createElement(ur,{resources:l,group:t,nested:!0},f.createElement(lr.Consumer,null,(({groupIndex:t})=>k.filter((e=>e.group.index===(t||0))).map(((r,a,l)=>f.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${t}:${a}`},f.createElement(c,{...r,editable:e.editable,row:l.length*(t||0)+a,col:0,slot:e.slot,viewSlot:e.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},f.createElement("div",null,f.createElement("strong",{className:"k-scheduler-agendaday"},m.formatDate(r.zonedStart,"dd")),f.createElement("em",{className:"k-scheduler-agendaweek"},m.formatDate(r.zonedStart,"EEEE")),f.createElement("span",{className:"k-scheduler-agendadate"},m.formatDate(r.zonedStart,"y")))),f.createElement("div",{className:"k-scheduler-cell k-group-content"},r.items.length?r.items.map(((t,r)=>f.createElement("div",{className:"k-scheduler-row",key:r},f.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},f.createElement("div",null,t.tail&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-right":"caret-alt-left",icon:"rtl"===u?d.caretAltRightIcon:d.caretAltLeftIcon}),t.isAllDay?p.toLanguageString(xe,At[xe]):on(m,t),t.head&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-left":"caret-alt-right",icon:"rtl"===u?d.caretAltLeftIcon:d.caretAltRightIcon}))),f.createElement("div",{className:"k-scheduler-cell"},f.createElement(s,{key:`${a}:${r}`,...t,onDataAction:e.onDataAction,task:e.task,viewTask:e.viewTask,editable:e.editable}))))):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},p.toLanguageString(Rt,At[Rt])))))))))))},on=(e,t)=>{let r="{0:t}-{1:t}";return t.head?r="{0:t}":t.tail&&(r="{1:t}"),e.format(r,t.zonedStart,t.zonedEnd)},sn={name:"agenda",title:e=>e.toLanguageString(ze,At[ze]),dateRange:({intl:e,date:t,numberOfDays:r=1,timezone:n})=>{const l=a.ZonedDate.fromLocalDate(t,n),o=(e=>a.getDate(e))(7===r?a.firstDayInWeek(l,e.firstDay()):l),s=((e,t)=>a.getDate(a.addDays(e,t||1)))(o,r),c=a.ZonedDate.fromUTCDate(z(o),n),i=a.ZonedDate.fromUTCDate(z(s),n);return{start:new Date(c.getTime()),end:new Date(i.getTime()),zonedStart:c,zonedEnd:i}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:1440,slotDivision:1,numberOfDays:7},cn={title:r.any};ln.propTypes=cn,ln.displayName="KendoReactSchedulerAgendaView";const dn=f.forwardRef(((e,t)=>{const r=f.useRef(null),a=f.useRef(null),n=o.useLocalization();f.useImperativeHandle(r,(()=>({element:a.current&&a.current.element,...e}))),f.useImperativeHandle(t,(()=>r.current));const l=f.useCallback((t=>{!e.onClick||!r.current||e.onClick.call(void 0,{target:r.current,syntheticEvent:t})}),[r,e.slot,e.onClick]),c=n.toLanguageString(xt,At[xt]);return f.createElement(s.Button,{ref:a,tabIndex:-1,className:"k-more-events",onClick:l,"aria-label":c,icon:"more-horizontal",svgIcon:d.moreHorizontalIcon})}));dn.displayName="KendoReactSchedulerShowMoreItemsButton";const un={skeleton:"dd"},mn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editItem||Oa,c=e.editSlot||Jr,[i]=ve(),[d,u]=he(),[,m]=ke(),p=le(),g=de(),E=ge(),h=me(),y=o.useInternationalization(),v=se(),k=e.itemsPerSlot||pn.itemsPerSlot,D=f.useMemo((()=>Va(h,{step:7*a.MS_PER_DAY,timezone:r})),[h.start.getTime(),h.end.getTime(),r]),S=f.useMemo((()=>Ga(0,{step:a.MS_PER_DAY},{groups:g,ranges:D})),[h.start.getTime(),h.end.getTime(),g,D]),C=f.useMemo((()=>ca(i,{dateRange:h,fields:v,timezone:r})),[i,h.start.getTime(),h.end.getTime(),v,r]),b=f.useMemo((()=>ma(C,{timezone:r},{groups:g,ranges:D})),[C,r,g,D]),I=f.useCallback((e=>{const t=p.find((e=>"day"===e.props.name));!m||!t||!t.props.name||!e.target.slot||(m(t.props.name,e),u(e.target.slot.start,e))}),[m,p]);f.useMemo((()=>U(b,S,!0)),[b,S]),f.useMemo((()=>B(b,S,!0)),[b,S]);const w=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},S.filter((e=>e.group.index===t&&0===e.range.index)).map(((t,n)=>f.createElement(Ha,{as:e.dateHeaderCell,key:n,"data-dayslot-index":n,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),r),start:t.start,end:t.end,format:{skeleton:"EEEE"}})))))),T=f.createElement(lr.Consumer,null,(({groupIndex:t})=>D.map(((r,a)=>f.createElement("div",{className:"k-scheduler-row",key:a},S.filter((e=>e.group.index===t&&e.range.index===a)).map(((r,l,o)=>f.createElement(c,{slot:e.slot,viewSlot:e.viewSlot,key:l,form:e.form,...r,expandable:{offsetTop:30,offsetBottom:k<r.items.length?15:0},onDataAction:e.onDataAction,col:"horizontal"===E?o.length*(t||0)+l:l,row:"horizontal"===E?a:D.length*(t||0)+a,editable:e.editable,className:n.classNames({"k-other-month":r.start.getMonth()<d.getMonth()||r.start.getMonth()>d.getMonth()})},f.createElement("span",{className:"k-link k-nav-day"},y.formatDate(new Date(r.end.getTime()-(r.end.getTime()-r.start.getTime())/2),un)),k<r.items.length&&f.createElement(dn,{slot:r,onClick:I})))))))));return f.createElement(nr,{props:e,slots:S,ranges:D,className:n.classNames("k-scheduler-monthview",e.className)},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===E?f.createElement(or,{nested:!0,resources:l,group:t},w):f.createElement(ur,{resources:l,group:t},w)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===E?f.createElement(or,{resources:l,group:t},T):f.createElement(ur,{nested:!0,resources:l,group:t},T),b.filter((e=>null===e.order||e.order<k)).sort(q).map((t=>f.createElement(s,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0})))))},pn={name:"month",dateRange:({intl:e,date:t,timezone:r})=>{const n=a.firstDayInWeek(a.firstDayOfMonth(a.getDate(t)),e.firstDay()),l=a.addDays(a.firstDayInWeek(a.lastDayOfMonth(a.getDate(t)),e.firstDay()),7),o=a.ZonedDate.fromUTCDate(z(n),r),s=a.ZonedDate.fromUTCDate(z(l),r);return{start:new Date(o.getTime()),end:new Date(s.getTime()),zonedStart:o,zonedEnd:s}},slotDuration:1440,slotDivision:1,itemsPerSlot:2,numberOfDays:31,title:e=>e.toLanguageString(Oe,At[Oe]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},gn={itemsPerSlot:r.number};mn.propTypes=gn,mn.displayName="KendoReactSchedulerMonthView";const En=e=>f.createElement(Ua,{...e,step:7,numberOfDays:7}),hn={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(t,r),l=(e=>a.getDate(e))(a.firstDayInWeek(n,e.firstDay())),o=((e,t)=>a.getDate(a.addDays(e,t)))(l,7),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},title:e=>e.toLanguageString(Ne,At[Ne]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};En.displayName="KendoReactSchedulerWeekView";const yn=e=>{const t=me(),r=Math.round((t.end.getTime()-t.start.getTime())/a.MS_PER_DAY);return f.createElement(Ua,{...e,step:7,numberOfDays:r})},vn={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r,...n})=>{const l=a.ZonedDate.fromLocalDate(t,r),o=void 0!==n.workWeekStart?n.workWeekStart:a.Day.Monday,s=void 0!==n.workWeekEnd?n.workWeekEnd:a.Day.Friday,c=s<o?7+s-o+1:s-o+1,i=a.getDate(((e,t=a.Day.Sunday)=>{let r=e.clone();for(;r.getDay()!==t;)r=r.addDays(-1);return r})(l,o)),d=a.addDays(i,c),u=a.ZonedDate.fromUTCDate(z(i),r),m=a.ZonedDate.fromUTCDate(z(d),r);return{start:new Date(u.getTime()),end:new Date(m.getTime()),zonedStart:u,zonedEnd:m}},title:e=>e.toLanguageString(Me,At[Me]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};yn.displayName="KendoReactSchedulerWorkWeekView";const fn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),kn=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},fn),e.children),Dn=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day","data-range-index":0},t.toLanguageString(Re,At[Re]))),e.children)},Sn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=f.useRef(null),c=f.useRef(null),i=e.editItem||Oa,d=e.editSlot||Jr,u=f.useRef(null),[m]=ve(),p=ge(),g=de(),E=me(),h=se(),y=o.useInternationalization(),v=e.showWorkHours,k=e.slotDivisions||Cn.slotDivisions,D=e.slotDuration||Cn.slotDuration,S=e.workWeekStart||Cn.workWeekStart,C=e.workWeekEnd||Cn.workWeekEnd,b=y.parseDate(e.workDayStart||e.isWorkDayStart||Cn.isWorkDayStart),I=y.parseDate(e.workDayEnd||e.isWorkDayEnd||Cn.isWorkDayEnd),w=y.parseDate(e.startTime||Cn.startTime),x=y.parseDate(e.endTime||Cn.endTime),A=f.useMemo((()=>v?b:w),[v,b,w]),_=f.useMemo((()=>v?I:x),[v,I,x]),N=f.useMemo((()=>Va(E,{step:a.MS_PER_DAY,timezone:r})),[E.start.getTime(),E.end.getTime(),r]),M=f.useMemo((()=>Ga(0,{step:D/k*a.MS_PER_MINUTE},{groups:g,ranges:N}).filter((e=>K(e.zonedStart,A,_)||A.getTime()===_.getTime()))),[g,N,E.start.getTime(),E.end.getTime(),r,D,k,A.getTime(),_.getTime()]),L=f.useMemo((()=>ca(m,{dateRange:E,fields:h,timezone:r})),[m,E.start.getTime(),E.end.getTime(),h,r]),O=f.useMemo((()=>ma(L,{timezone:r},{groups:g,ranges:N}).filter((e=>A.getTime()===_.getTime()||K(e.zonedStart,A,_)||K(e.zonedEnd,A,_)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),A,_)))),[L,r,g,N,A.getTime(),_.getTime()]);f.useMemo((()=>U(O,M,!0)),[O,M]),f.useMemo((()=>B(O,M,!0)),[O,M]);const F=("horizontal"===p?M.length:M.length/g.length)*((e.columnWidth||Cn.columnWidth)+1),P=f.createElement(lr.Consumer,null,(()=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-row"},N.map(((t,r)=>f.createElement(Ha,{as:e.dateHeaderCell,key:r,date:t.zonedStart,start:t.start,end:t.end,format:"m"})))),f.createElement("div",{className:"k-scheduler-row",ref:s},N.map(((t,r)=>M.filter((e=>0===e.group.index&&e.range.index===r)).map((t=>t.zonedStart.getMinutes()%D==0?f.createElement(kr,{key:t.index,as:e.timeHeaderCell,format:"t",date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd}):null)))))))),H=f.createElement(lr.Consumer,null,(({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row"},N.map(((n,l)=>M.filter((e=>e.group.index===t&&e.range.index===l)).map(((n,o,s)=>{const c=a.ZonedDate.fromUTCDate(z(n.zonedStart),r),i=V(c.getDay(),S,C);return f.createElement(d,{key:`${n.start.getTime()}:${n.group.index}`,slot:e.slot,viewSlot:e.viewSlot,...n,form:e.form,onDataAction:e.onDataAction,isWorkHour:K(n.zonedStart,b,I),isWorkDay:i,col:"horizontal"===p?l*s.length+o+s.length*N.length*(t||0):l*s.length+o,row:"horizontal"===p?0:t||0,expandable:!0,editable:e.editable})}))))))),G=f.useMemo((()=>n.classNames("k-scheduler-timelineview",e.className)),[e.className]);Xt({element:u,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0});const Z=u.current?u.current.closest(".k-scheduler-layout"):null;return la({element:Z,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:O&&!O.length}),f.createElement(nr,{ref:u,id:e.id,style:{...e.style},className:G,props:e,slots:M,ranges:N},f.createElement("div",{className:"k-scheduler-head",style:{width:F}},"horizontal"===p?f.createElement(or,{nested:!0,group:t,resources:l,rowContent:kn},P):f.createElement(ur,{wrapGroup:!0,group:t,resources:l},P)),f.createElement("div",{className:"k-scheduler-body",style:{width:F},ref:c},"horizontal"===p?f.createElement(or,{group:t,resources:l,rowContent:Dn},H,f.createElement(lr.Consumer,null,(({groupIndex:t})=>e.currentTimeMarker&&W(T(N).start,R(N).end,new Date,new Date,!0)&&f.createElement(Pa,{groupIndex:t,attachArrow:s,vertical:!0})))):f.createElement(ur,{nested:!0,wrapGroup:!0,group:t,resources:l},H),"vertical"===p&&e.currentTimeMarker&&W(T(N).start,R(N).end,new Date,new Date,!0)&&f.createElement(Pa,{attachArrow:s,vertical:!0}),O.sort(q).map(((t,r)=>f.createElement(i,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,ignoreIsAllDay:!0,vertical:!1,isLast:r===O.length-1})))))},Cn={name:"multi-day-timeline",title:"Multi Day Timeline",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"00:00",isWorkDayStart:"8:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,defaultShowWorkHours:!0,columnWidth:100},bn=e=>f.createElement(Sn,{...e}),In={...Cn,name:"timeline",title:e=>e.toLanguageString(_e,At[_e]),slotDuration:60,slotDivisions:2,numberOfDays:1,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};bn.displayName="KendoReactSchedulerTimelineView";const wn=new Map;wn.set(ln,sn),wn.set($a,qa),wn.set(mn,pn),wn.set(En,hn),wn.set(yn,vn),wn.set(bn,In);const Tn=f.forwardRef(((e,t)=>{var r,l,c;const i=!n.validatePackage(Ya,{component:"Scheduler"}),u=n.getLicenseMessage(Ya),{timezone:m,onDataChange:p}=e,g=f.useRef(null),E=f.useRef(null);f.useImperativeHandle(E,(()=>({props:e,element:g.current}))),f.useImperativeHandle(t,(()=>E.current));const h=n.useRtl(g),y=o.useInternationalization(),v=o.useLocalization(),{fields:k}=f.useMemo((()=>(e=>({fields:{...H,...e}}))(e.modelFields)),[e.modelFields]),[C,b]=Ce(e.defaultDate||Rn.defaultDate,e.date,e.onDateChange),I=f.Children.toArray(e.children||[]).map((e=>{var t;return f.isValidElement(e)?f.cloneElement(e,{...wn.get(e.type),...null!=(t=e.props)?t:{}}):e})),w=f.cloneElement(f.createElement($a,null),wn.get($a)),[T,R]=Ce(e.defaultView||I[0]&&I[0].props.name||"day",e.view,e.onViewChange),[x,A]=Ce(!0),M=I.find((e=>e.props.name===T))||I[0]||w,z=(null!=(r=e.data)?r:Rn.data)||Rn.data,O=((e,t)=>{const r=S(e,t),a=D(r);return 1===a.length?[{index:0,resources:(t||[]).reduce(((e,t)=>[...e,...t.data.map((e=>({...e,field:t.field,valueField:t.valueField,colorField:t.colorField,multiple:t.multiple})))]),[])}]:a.map(((e,t)=>({index:t,resources:e})))})(e.group,e.resources),F=e.group&&e.group.orientation?e.group.orientation:"horizontal",P=M.props.selectedDateFormat||"{0:D}",W=M.props.selectedShortDateFormat||"{0:d}",K=M.props.slotDuration,V=void 0!==M.props.dateRange?"function"==typeof M.props.dateRange?M.props.dateRange.call(void 0,{intl:y,date:C,timezone:m,numberOfDays:M.props.numberOfDays,workWeekStart:M.props.workWeekStart||y.firstDay(),workWeekEnd:M.props.workWeekEnd||(y.firstDay()+M.props.numberOfDays)%6}):M.props.dateRange:{start:Rn.defaultDate,end:Rn.defaultDate},G=f.useCallback((({created:e=[],updated:t=[],deleted:r=[]})=>{if(p){const a={created:e,updated:t,deleted:r};p.call(void 0,a)}}),[p]),B=f.useCallback((e=>{const t=[e.dataItem];G({created:t})}),[G]),U=f.useCallback((e=>{const t=[],r=[];if(e.series)if(Array.isArray(e.dataItem))e.dataItem.forEach((t=>{const a=n.clone(L(e.dataItem,k,z)),l=n.clone(t);N(l,k.originalStart,_(a,k.originalStart)),N(l,k.recurrenceId,_(a,k.recurrenceId)),N(l,k.recurrenceExceptions,_(a,k.recurrenceExceptions)),r.push(l)}));else{const t=n.clone(L(e.dataItem,k,z)),a=n.clone(e.dataItem);N(a,k.originalStart,_(t,k.originalStart)),N(a,k.recurrenceId,_(t,k.recurrenceId)),N(a,k.recurrenceExceptions,_(t,k.recurrenceExceptions)),r.push(a)}else if(Array.isArray(e.dataItem))e.dataItem.forEach((e=>{const a=null!==_(e,k.recurrenceRule)&&void 0!==_(e,k.recurrenceRule);if(null!==_(e,k.recurrenceId)&&void 0!==_(e,k.recurrenceId)&&a){const a=n.clone(L(e,k,z)),l=_(e,k.originalStart),o=_(a,k.recurrenceExceptions)||[];N(a,k.recurrenceExceptions,[...o,l]),N(e,k.recurrenceRule,null),r.push(a),t.push(e)}else r.push(e)}));else{const a=null!==_(e.dataItem,k.recurrenceRule)&&void 0!==_(e.dataItem,k.recurrenceRule);if(null!==_(e.dataItem,k.recurrenceId)&&void 0!==_(e.dataItem,k.recurrenceId)&&a){const a=n.clone(L(e.dataItem,k,z)),l=_(e.dataItem,k.originalStart),o=_(a,k.recurrenceExceptions)||[];N(a,k.recurrenceExceptions,[...o,l]),N(e.dataItem,k.recurrenceRule,null),r.push(a),t.push(e.dataItem)}else r.push(e.dataItem)}G({updated:r,created:t})}),[G,k,z]),Z=f.useCallback((e=>{const t=[],r=[];if(e.series){const t=n.clone(L(e.dataItem,k,z)),a=n.clone(e.dataItem);N(a,k.originalStart,_(t,k.originalStart)),N(a,k.recurrenceId,_(t,k.recurrenceId)),N(a,k.recurrenceRule,_(t,k.recurrenceRule)),N(a,k.recurrenceExceptions,_(t,k.recurrenceExceptions)),r.push(a)}else if(null===_(e.dataItem,k.recurrenceRule)||void 0===_(e.dataItem,k.recurrenceRule))r.push(e.dataItem);else{const r=n.clone(L(e.dataItem,k,z)),a=_(e.dataItem,k.originalStart),l=_(r,k.recurrenceExceptions)||[];N(r,k.recurrenceExceptions,[...l,a]),N(e.dataItem,k.recurrenceRule,null),t.push(r)}G({updated:t,deleted:r})}),[G,k,z]),$=f.useCallback((e=>{switch(e.type){case J.create:B(e);break;case J.update:U(e);break;case J.remove:Z(e)}}),[B,Z,U]),q=f.useCallback(((e,t)=>{R(e,{...t,target:E.current})}),[R,E]),Y=f.useCallback(((e,t)=>{b(e,{...t,target:E.current})}),[b,E]),j=f.useCallback((e=>{e.value&&b(e.value,{...e,target:E.current,nativeEvent:e.nativeEvent})}),[b,E]),X=f.useCallback((e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=M.props.step)?t:M.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,Math.round(n/27)):a.addDays(C,n);b(l,e)}),[C,b,M.props.numberOfDays,M.props.step]),Q=f.useCallback((e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=M.props.step)?t:M.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,-Math.round(n/27)):a.addDays(C,-n);b(l,e)}),[C,b,M.props.numberOfDays,M.props.step]),ee=f.useCallback((e=>{e.preventDefault();const t=a.ZonedDate.fromLocalDate(new Date,m);b(new Date(t.getTime()),e)}),[b,m]),te=f.useCallback((()=>{A(!x)}),[A,x]),re=f.useCallback((()=>{g.current&&(g.current.style.boxShadow="0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)")}),[g]),ae=f.useCallback((()=>{g.current&&(g.current.style.boxShadow="")}),[g]),ne=f.useMemo((()=>{var t;return{...e.style,height:null!=(t=e.height)?t:Rn.height}}),[e.height,e.style]),le=f.useMemo((()=>n.classNames({"k-rtl":void 0!==e.rtl?e.rtl:"rtl"===h},"k-scheduler",e.className)),[e.className,e.rtl,h]),oe=v.toLanguageString(Ae,At[Ae]),se=v.toLanguageString(Pe,At[Pe]),ce=v.toLanguageString(We,At[We]),ie=M.props.header||e.header||Rn.header,de=M.props.footer||e.footer||Rn.footer,ue=Ie,[me,pe]=f.useState(null);return f.createElement(Se,{element:g,props:e,views:I,fields:k,groups:O,dateRange:V,orientation:F,dateFormat:{dateFormat:P,shortDateFormat:W},date:[C,Y],activeView:[T,q],selection:[me,pe],data:[z,$]},f.createElement("div",{ref:g,id:e.id,style:ne,className:le,tabIndex:null!=(l=e.tabIndex)?l:Rn.tabIndex,dir:h,role:e.role||"application","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":me&&me.props.id||void 0,onFocus:re,onBlur:ae},f.createElement(ie,null,f.createElement(ue,null,f.createElement(s.ButtonGroup,{className:"k-scheduler-navigation"},f.createElement(s.Button,{role:"button",tabIndex:-1,title:oe,"aria-label":oe,onClick:ee},oe),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-right":"caret-alt-left",svgIcon:"rtl"===h?d.caretAltRightIcon:d.caretAltLeftIcon,title:se,"aria-label":se,onClick:Q}),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-left":"caret-alt-right",svgIcon:"rtl"===h?d.caretAltLeftIcon:d.caretAltRightIcon,title:ce,"aria-label":ce,onClick:X}))),f.createElement(_t,{value:C,onChange:j}),f.createElement(s.ToolbarSpacer,null),f.createElement(Mt,null)),M&&f.createElement(M.type,{editable:null!=(c=e.editable)?c:Rn.editable,key:M.props.name,item:e.item,viewItem:e.viewItem,editItem:e.editItem,task:e.task,viewTask:e.viewTask,editTask:e.viewTask,slot:e.slot,viewSlot:e.viewSlot,editSlot:e.editSlot,form:e.form,onDataAction:$,showWorkHours:x,...M.props}),f.createElement(de,null,K&&K<1440&&f.createElement(zt,null,f.createElement(s.Button,{tabIndex:-1,onClick:te,icon:"clock",svgIcon:d.clockIcon},v.toLanguageString(x?He:Ke,At[x?He:Ke])))),i&&f.createElement(n.WatermarkOverlay,{message:u})))})),Rn={data:[],height:600,tabIndex:-1,editable:!1,defaultDate:new Date,header:be,footer:Te,navigation:Ie,viewSelector:we};Tn.propTypes={data:r.array,editable:r.oneOfType([r.bool,r.shape({add:r.bool,drag:r.bool,edit:r.bool,remove:r.bool,resize:r.bool})]),view:r.string,defaultView:r.string,date:r.any,defaultDate:r.any,rtl:r.bool,height:r.oneOfType([r.number,r.string]),children:r.any,timezone:r.string,group:r.any,resources:r.any,modelFields:r.shape({id:r.string,start:r.string,startTimezone:r.string,end:r.string,endTimezone:r.string,isAllDay:r.string,title:r.string,description:r.string,recurrenceRule:r.string,recurrenceId:r.string,recurrenceException:r.string})},Tn.displayName="KendoReactScheduler";const xn=f.forwardRef(((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null);f.useImperativeHandle(u,(()=>({props:e,element:i.current&&i.current.element}))),f.useImperativeHandle(t,(()=>u.current)),f.useImperativeHandle(a,(()=>i.current)),f.useImperativeHandle(l,(()=>i.current));const p=r||An.item,g=o.useInternationalization(),[E]=Kt(),[h]=Wt(),y=te(),[v,k]=f.useState(!0),[D,S]=f.useState(!1),C=f.useRef(0),I=f.useRef(null),x=f.useRef([]),A=n.useDir(y),_=f.useMemo((()=>e.isAllDay?g.toString(e.zonedStart,"t"):g.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)),[g,e.isAllDay,e.zonedEnd,e.zonedStart]),N=f.useMemo((()=>`(${_}): ${e.title}`),[_,e.title]),M=()=>{var t,r,a;const n=h.filter((t=>t.current&&((t,r)=>t.group.index===r.group.index&&t.range.index===r.range.index&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay))(t.current.props,e))).sort(((e,t)=>e.current.props.start.getTime()-t.current.props.start.getTime())),l=n.filter((t=>W(t.current.props.start,t.current.props.end,e.start,e.end))),o=i.current&&i.current.element;if(!o||!l.length)return;const s=T(n),c=R(n),d=T(l),u=R(l);if(!(d.current&&i.current&&u.current&&s.current&&c.current))return;if(!W(d.current.props.start,u.current.props.end,e.start,e.end))return void k(!1);const m=[],p=[],g=[],y=b(d.current.element),v=(e.vertical?y.height:y.width)/(d.current.props.end.getTime()-d.current.props.start.getTime()),f=(e.vertical?25:8)/v,D=(Math.min(e.start.getTime(),u.current.props.end.getTime()-f)-d.current.props.start.getTime())*v,A=Math.floor(Math.min(e.end.getTime(),u.current.props.end.getTime())-Math.max(e.start.getTime(),d.current.props.start.getTime()))*v;(E||[]).forEach((e=>{e.current&&(e.current.props.dragHint?p.push(e.current):e.current.props.resizeHint?g.push(e.current):m.push(e.current))})),x.current=((t,r,a)=>{const[n,l]=r,o=new Date(Math.min(l.props.end.getTime()-a,Math.max(e.start.getTime(),n.props.start.getTime()))),s=new Date(Math.max(o.getTime()+a,Math.min(e.end.getTime(),l.props.end.getTime())));return t.filter((t=>{const r=Math.max(Math.min(l.props.end.getTime()-a,t.props.start.getTime()),n.props.start.getTime()),c=Math.min(Math.max(r+a,t.props.end.getTime()),l.props.end.getTime());return t.props.id!==e.id&&t.props.group.index===e.group.index&&t.props.range.index===e.range.index&&(e.ignoreIsAllDay||t.props.isAllDay===e.isAllDay)&&W(new Date(r),new Date(c),o,s)&&W(n.props.start,l.props.end,t.props.start,t.props.end)}))})(m,[s.current,c.current],f),I.current=e.resizeHint||e.dragHint?0:((e,t)=>{const r=new Set;return t.forEach((e=>{void 0!==e._order&&null!==e._order&&r.add(e._order)})),G(Array.from(r))})(i.current,x.current);let _=1;e.resizeHint||e.dragHint||(_=((e,t)=>{let r=0;return t.forEach((e=>{void 0!==e._order&&null!==e._order&&r<e._order&&(r=e._order)})),r+1})(i.current,x.current),x.current.forEach((e=>{e._maxSiblingsPerSlot&&_<e._maxSiblingsPerSlot&&(_=e._maxSiblingsPerSlot)})),x.current.forEach((e=>{void 0!==e._maxSiblingsPerSlot&&null!==e._maxSiblingsPerSlot&&e._maxSiblingsPerSlot<_&&(e._maxSiblingsPerSlot=_)})));let N=0;const M=y;x.current.forEach((e=>{let t=0;void 0!==e._order&&null!==e._order&&e._order<I.current&&(t=b(e.element).top+b(e.element).height-M.top-1*I.current+1),t>N&&(N=t)}));M.width=e.vertical?M.width/_-1-20/_:A-1,M.height=e.vertical?A-1:(e.resizeHint||e.dragHint)&&_<=1?M.height:e.style&&e.style.height?e.style.height:25,M.left=e.vertical?M.left+(null!=(t=I.current)?t:0)+1*(null!=(r=I.current)?r:0)*M.width:M.left+(D<0?0:D),M.top=e.vertical?M.top+(D<0?0:D):M.top+N+1*(null!=(a=I.current)?a:0),C.current=_,w(o,M),S(!0),k(!0)},z=f.useCallback((e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame((()=>{M()}))),m.current={width:t.contentRect.width,height:t.contentRect.height}}),[M]);f.useEffect(M);const L=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return la({element:L,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect((()=>{if(!y.current)return;const e=window.ResizeObserver,t=e&&new e(z);return t&&t.observe(y.current),()=>{t&&t.disconnect()}}),[z,y]),f.createElement(p,{...s,_ref:i,_order:I,_maxSiblingsPerSlot:C,_siblings:x,itemRef:i,style:{visibility:D?void 0:"hidden",display:v?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===A?"caret-alt-right":"caret-alt-left",icon:"rtl"===A?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"reload",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"non-recurrence",icon:d.nonRecurrenceIcon})),!e.resizeHint&&f.createElement("div",{title:N},!e.isAllDay&&f.createElement(na,{className:"k-event-time"},N),f.createElement(na,null,e.title)))})),An={item:aa};xn.displayName="KendoReactSchedulerProportionalViewItem",e.AgendaView=ln,e.DATA_ACTION=J,e.DRAG_ITEM_ACTION=Ma,e.DateHeaderCell=Ha,e.DayView=$a,e.ITEMS_FOCUS_ACTION=Qt,e.ITEMS_SELECT_ACTION=Yt,e.MonthView=mn,e.REMOVE_ITEM_ACTION=_a,e.RESIZE_ITEM_ACTION=za,e.SERIES_ACTION=La,e.SHOW_OCCURRENCE_DIALOG_ACTION=Aa,e.SHOW_REMOVE_DIALOG_ACTION=Na,e.SLOTS_FOCUS_ACTION=Jt,e.SLOTS_SELECT_ACTION=jt,e.Scheduler=Tn,e.SchedulerActiveViewContext=fe,e.SchedulerDataContext=ye,e.SchedulerDateContext=Ee,e.SchedulerDateRangeContext=ue,e.SchedulerDrag=ya,e.SchedulerEditItem=Oa,e.SchedulerEditItemDragItemContext=Ca,e.SchedulerEditItemFormItemContext=Sa,e.SchedulerEditItemPropsContext=Da,e.SchedulerEditItemRemoveItemContext=Ia,e.SchedulerEditItemResizeItemContext=ba,e.SchedulerEditItemShowOccurrenceDialogContext=Ta,e.SchedulerEditItemShowRemoveDialogContext=wa,e.SchedulerEditSlot=Jr,e.SchedulerEditSlotFormItemContext=jr,e.SchedulerEditSlotPropsContext=Yr,e.SchedulerEditTask=an,e.SchedulerFieldsContext=oe,e.SchedulerFooter=Te,e.SchedulerForm=Gr,e.SchedulerFormEditor=Kr,e.SchedulerGroupsContext=ie,e.SchedulerHeader=be,e.SchedulerItem=aa,e.SchedulerItemContent=na,e.SchedulerOccurrenceDialog=ta,e.SchedulerOrientationContext=pe,e.SchedulerProportionalViewItem=xn,e.SchedulerPropsContext=re,e.SchedulerRemoveDialog=ra,e.SchedulerResize=fa,e.SchedulerSlot=Ur,e.SchedulerTask=ja,e.SchedulerViewItem=oa,e.SchedulerViewSlot=$r,e.SchedulerViewTask=Xa,e.SchedulerViewsContext=ne,e.TimeHeaderCell=kr,e.TimelineView=bn,e.WeekView=En,e.WorkWeekView=yn,e.agendaViewDefaultProps=sn,e.dateHeaderCellDefaultProps=Ka,e.dayViewDefaultProps=qa,e.monthViewDefaultProps=pn,e.schedulerDefaultProps=Rn,e.schedulerDragDefaultProps=va,e.schedulerEditItemDefaultProps=Fa,e.schedulerEditSlotDefaultProps=ea,e.schedulerEditTaskDefaultProps=nn,e.schedulerFormDefaultProps=Br,e.schedulerFormEditorDefaultProps=Vr,e.schedulerProportionalViewItemDefaultProps=An,e.schedulerResizeDefaultProps=ka,e.schedulerSlotDefaultProps=Zr,e.schedulerViewItemDefaultProps=sa,e.schedulerViewSlotDefaultProps=qr,e.schedulerViewTaskDefaultProps=Qa,e.timeHeaderCellDefaultProps=Dr,e.timeLineViewDefaultProps=In,e.useSchedulerActiveViewContext=ke,e.useSchedulerDataContext=ve,e.useSchedulerDateContext=he,e.useSchedulerDateRangeContext=me,e.useSchedulerEditItemDragItemContext=()=>f.useContext(Ca),e.useSchedulerEditItemFormItemContext=()=>f.useContext(Sa),e.useSchedulerEditItemPropsContext=()=>f.useContext(Da),e.useSchedulerEditItemRemoveItemContext=()=>f.useContext(Ia),e.useSchedulerEditItemResizeItemContext=()=>f.useContext(ba),e.useSchedulerEditItemShowOccurrenceDialogContext=()=>f.useContext(Ta),e.useSchedulerEditItemShowRemoveDialogContext=()=>f.useContext(wa),e.useSchedulerEditSlotFormItemContext=()=>f.useContext(jr),e.useSchedulerEditSlotPropsContext=()=>f.useContext(Yr),e.useSchedulerFieldsContext=se,e.useSchedulerGroupsContext=de,e.useSchedulerOrientationContext=ge,e.useSchedulerPropsContext=ae,e.useSchedulerViewsContext=le,e.weekViewDefaultProps=hn,e.workWeekDefaultProps=vn}));
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1768491547,version:"13.3.0-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "13.3.0-develop.
|
|
13
|
+
publishDate: 1768491547,
|
|
14
|
+
version: "13.3.0-develop.9",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-scheduler",
|
|
3
|
-
"version": "13.3.0-develop.
|
|
3
|
+
"version": "13.3.0-develop.9",
|
|
4
4
|
"description": "React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"@progress/kendo-date-math": "^1.4.1",
|
|
30
30
|
"@progress/kendo-drawing": "^1.21.2",
|
|
31
31
|
"@progress/kendo-licensing": "^1.7.2",
|
|
32
|
-
"@progress/kendo-react-buttons": "13.3.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "13.3.0-develop.
|
|
34
|
-
"@progress/kendo-react-dateinputs": "13.3.0-develop.
|
|
35
|
-
"@progress/kendo-react-dialogs": "13.3.0-develop.
|
|
36
|
-
"@progress/kendo-react-dropdowns": "13.3.0-develop.
|
|
37
|
-
"@progress/kendo-react-form": "13.3.0-develop.
|
|
38
|
-
"@progress/kendo-react-inputs": "13.3.0-develop.
|
|
39
|
-
"@progress/kendo-react-intl": "13.3.0-develop.
|
|
40
|
-
"@progress/kendo-react-popup": "13.3.0-develop.
|
|
32
|
+
"@progress/kendo-react-buttons": "13.3.0-develop.9",
|
|
33
|
+
"@progress/kendo-react-common": "13.3.0-develop.9",
|
|
34
|
+
"@progress/kendo-react-dateinputs": "13.3.0-develop.9",
|
|
35
|
+
"@progress/kendo-react-dialogs": "13.3.0-develop.9",
|
|
36
|
+
"@progress/kendo-react-dropdowns": "13.3.0-develop.9",
|
|
37
|
+
"@progress/kendo-react-form": "13.3.0-develop.9",
|
|
38
|
+
"@progress/kendo-react-inputs": "13.3.0-develop.9",
|
|
39
|
+
"@progress/kendo-react-intl": "13.3.0-develop.9",
|
|
40
|
+
"@progress/kendo-react-popup": "13.3.0-develop.9",
|
|
41
41
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
42
42
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
43
43
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"package": {
|
|
68
68
|
"productName": "KendoReact",
|
|
69
69
|
"productCode": "KENDOUIREACT",
|
|
70
|
-
"publishDate":
|
|
70
|
+
"publishDate": 1768491547,
|
|
71
71
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui"
|
|
72
72
|
}
|
|
73
73
|
},
|