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3I,KAAOD,EACdC,EAAI/rJ,iBAAiB,SAAUI,IAC7B,MAAM4rJ,EAAWD,EAAI90I,UAAUg1I,OAAO,UAChC3wH,EAAK/Z,SAASwqI,EAAI/zB,aAAa,WAAY,IAEjD,IAAK,IAAIk0B,KAAOvwJ,KAAKkuJ,UAAUl+G,YACzBugH,EAAIvwH,cAAcwwH,WAAa7wH,GACjC4wH,EAAIt/G,QAAQ,UAAWo/G,EAAW,OAAS,QAI/CrwJ,KAAK8uJ,0BACLrqJ,EAAEyV,gBAAc,GAGtB,CACF,EAGFjF,OAAO5Q,iBAAiB,QAAQ,KAC9B,GAAI,kBAAmB4Q,OACrB,IAAK,MAAMw7I,KAAWx7I,OAAOy7I,cAAe,CAC1C,MAAM99I,EAAK69I,EAAQ9wH,UACZ8wH,EAAQ9wH,GAEd,IAAIkuH,GAAiB4C,EAAS79I,GAAKnJ,QACtC,CAGmBoB,SAASgO,iBAAiB,mBAElCzO,SAAQy6D,IACnB,MAAM3lE,EAAIksJ,GAASvmF,EAAK8rF,aAClBxzI,EAAY,kBAAmB0nD,EAAK+rF,QAAU/rF,EAAK+rF,QAAQC,cAAgB,OAEjFhsF,EAAK8rF,YAAc5G,GAAO7qJ,EAAGie,GAC7B0nD,EAAKxsD,cAAciD,UAAUlE,OAAO,gBAGhBvM,SAASgO,iBAAiB,oBAElCzO,SAAQy6D,IACpB,MAAM2iE,EAAQ2R,GAASt0E,EAAK+rF,QAAQE,UAEpCjsF,EAAK8rF,YAAc,WAAWnpB,EAAM+P,WACpC1yE,EAAKxsD,cAAciD,UAAUlE,OAAO,eACtC,G","sources":["node_modules/tslib/tslib.es6.js","node_modules/preact/src/util.js","node_modules/preact/src/options.js","node_modules/preact/src/create-element.js","node_modules/preact/src/diff/props.js","node_modules/preact/src/component.js","node_modules/preact/src/create-context.js","node_modules/preact/src/constants.js","node_modules/preact/src/diff/children.js","node_modules/preact/src/diff/index.js","node_modules/preact/src/render.js","node_modules/preact/src/diff/catch-error.js","node_modules/preact/hooks/src/index.js","node_modules/preact/compat/src/util.js","node_modules/preact/compat/src/PureComponent.js","node_modules/preact/compat/src/forwardRef.js","node_modules/preact/compat/src/Children.js","node_modules/preact/compat/src/suspense.js","node_modules/preact/compat/src/suspense-list.js","node_modules/preact/compat/src/portals.js","node_modules/preact/compat/src/render.js","node_modules/preact/compat/src/index.js","node_modules/@fullcalendar/core/vdom.js","node_modules/@fullcalendar/common/vdom.js","node_modules/@fullcalendar/common/src/api/EventSourceApi.ts","node_modules/@fullcalendar/common/src/util/dom-manip.ts","node_modules/@fullcalendar/common/src/util/dom-event.ts","node_modules/@fullcalendar/common/src/util/misc.ts","node_modules/@fullcalendar/common/src/datelib/marker.ts","node_modules/@fullcalendar/common/src/structs/event-instance.ts","node_modules/@fullcalendar/common/src/util/object.ts","node_modules/@fullcalendar/common/src/structs/recurring-event.ts","node_modules/@fullcalendar/common/src/datelib/duration.ts","node_modules/@fullcalendar/common/src/datelib/formatting-utils.ts","node_modules/@fullcalendar/common/src/util/array.ts","node_modules/@fullcalendar/common/src/util/memoize.ts","node_modules/@fullcalendar/common/src/datelib/formatting-native.ts","node_modules/@fullcalendar/common/src/datelib/zoned-marker.ts","node_modules/@fullcalendar/common/src/datelib/DateFormatter.ts","node_modules/@fullcalendar/common/src/datelib/formatting-cmd.ts","node_modules/@fullcalendar/common/src/datelib/formatting-func.ts","node_modules/@fullcalendar/common/src/datelib/formatting.ts","node_modules/@fullcalendar/common/src/options.ts","node_modules/@fullcalendar/common/src/structs/event-store.ts","node_modules/@fullcalendar/common/src/util/html.ts","node_modules/@fullcalendar/common/src/component/event-ui.ts","node_modules/@fullcalendar/common/src/structs/constraint.ts","node_modules/@fullcalendar/common/src/structs/event-parse.ts","node_modules/@fullcalendar/common/src/util/date.ts","node_modules/@fullcalendar/common/src/datelib/date-range.ts","node_modules/@fullcalendar/common/src/component/event-rendering.ts","node_modules/@fullcalendar/common/src/structs/date-span.ts","node_modules/@fullcalendar/common/src/calendar-utils.ts","node_modules/@fullcalendar/common/src/structs/event-mutation.ts","node_modules/@fullcalendar/common/src/ViewApi.ts","node_modules/@fullcalendar/common/src/structs/event-source-parse.ts","node_modules/@fullcalendar/common/src/reducers/current-date.ts","node_modules/@fullcalendar/common/src/CalendarApi.tsx","node_modules/@fullcalendar/common/src/api/EventApi.ts","node_modules/@fullcalendar/common/src/datelib/calendar-system.ts","node_modules/@fullcalendar/common/src/datelib/parsing.ts","node_modules/@fullcalendar/common/src/datelib/env.ts","node_modules/@fullcalendar/common/src/global-locales.ts","node_modules/@fullcalendar/common/src/datelib/locale.ts","node_modules/@fullcalendar/common/src/structs/business-hours.ts","node_modules/@fullcalendar/common/src/util/table-styling.tsx","node_modules/@fullcalendar/common/src/util/geom.ts","node_modules/@fullcalendar/common/src/component/event-splitting.ts","node_modules/@fullcalendar/common/src/component/date-rendering.tsx","node_modules/@fullcalendar/common/src/common/nav-link.ts","node_modules/@fullcalendar/common/src/util/scrollbar-side.ts","node_modules/@fullcalendar/common/src/util/scrollbar-width.ts","node_modules/@fullcalendar/common/src/util/dom-geom.ts","node_modules/@fullcalendar/common/src/util/promise.ts","node_modules/@fullcalendar/common/src/common/Emitter.ts","node_modules/@fullcalendar/common/src/common/PositionCache.ts","node_modules/@fullcalendar/common/src/common/scroll-controller.ts","node_modules/@fullcalendar/common/src/theme/Theme.ts","node_modules/@fullcalendar/common/src/ScrollResponder.ts","node_modules/@fullcalendar/common/src/ViewContext.ts","node_modules/@fullcalendar/common/src/vdom-util.tsx","node_modules/@fullcalendar/common/src/component/DateComponent.ts","node_modules/@fullcalendar/common/src/plugin-system.ts","node_modules/@fullcalendar/common/src/theme/StandardTheme.ts","node_modules/@fullcalendar/common/src/structs/view-def.ts","node_modules/@fullcalendar/common/src/common/render-hook.tsx","node_modules/@fullcalendar/common/src/common/ViewRoot.tsx","node_modules/@fullcalendar/common/src/structs/view-config.tsx","node_modules/@fullcalendar/common/src/structs/view-spec.ts","node_modules/@fullcalendar/common/src/DateProfileGenerator.ts","node_modules/@fullcalendar/common/src/reducers/eventSources.ts","node_modules/@fullcalendar/common/src/reducers/eventStore.ts","node_modules/@fullcalendar/common/src/reducers/date-selection.ts","node_modules/@fullcalendar/common/src/reducers/selected-event.ts","node_modules/@fullcalendar/common/src/reducers/event-drag.ts","node_modules/@fullcalendar/common/src/reducers/event-resize.ts","node_modules/@fullcalendar/common/src/toolbar-parse.ts","node_modules/@fullcalendar/common/src/util/requestJson.ts","node_modules/@fullcalendar/common/src/option-change-handlers.ts","node_modules/@fullcalendar/common/src/global-plugins.ts","node_modules/@fullcalendar/common/src/event-sources/array-event-source.ts","node_modules/@fullcalendar/common/src/event-sources/func-event-source.ts","node_modules/@fullcalendar/common/src/event-sources/json-feed-event-source.ts","node_modules/@fullcalendar/common/src/event-sources/json-feed-event-source-refiners.ts","node_modules/@fullcalendar/common/src/structs/recurring-event-simple.ts","node_modules/@fullcalendar/common/src/structs/recurring-event-simple-refiners.ts","node_modules/@fullcalendar/common/src/dates-set.ts","node_modules/@fullcalendar/common/src/event-crud.ts","node_modules/@fullcalendar/common/src/util/DelayedRunner.ts","node_modules/@fullcalendar/common/src/util/TaskRunner.ts","node_modules/@fullcalendar/common/src/reducers/title-formatting.ts","node_modules/@fullcalendar/common/src/reducers/CalendarDataManager.ts","node_modules/@fullcalendar/common/src/reducers/options.ts","node_modules/@fullcalendar/common/src/reducers/view-type.ts","node_modules/@fullcalendar/common/src/reducers/date-profile.ts","node_modules/@fullcalendar/common/src/component/CalendarDataProvider.ts","node_modules/@fullcalendar/common/src/seg-hierarchy.ts","node_modules/@fullcalendar/common/src/interactions/interaction.ts","node_modules/@fullcalendar/common/src/interactions/ElementDragging.ts","node_modules/@fullcalendar/common/src/global-config.ts","node_modules/@fullcalendar/common/src/structs/drag-meta.ts","node_modules/@fullcalendar/common/src/ToolbarSection.tsx","node_modules/@fullcalendar/common/src/Toolbar.tsx","node_modules/@fullcalendar/common/src/ViewContainer.tsx","node_modules/@fullcalendar/common/src/interactions/EventClicking.ts","node_modules/@fullcalendar/common/src/interactions/EventHovering.ts","node_modules/@fullcalendar/common/src/CalendarContent.tsx","node_modules/@fullcalendar/common/src/CalendarRoot.tsx","node_modules/@fullcalendar/common/src/common/table-utils.ts","node_modules/@fullcalendar/common/src/common/table-cell-util.tsx","node_modules/@fullcalendar/common/src/common/TableDateCell.tsx","node_modules/@fullcalendar/common/src/common/TableDowCell.tsx","node_modules/@fullcalendar/common/src/NowTimer.ts","node_modules/@fullcalendar/common/src/common/DayHeader.tsx","node_modules/@fullcalendar/common/src/common/DaySeriesModel.ts","node_modules/@fullcalendar/common/src/common/DayTableModel.ts","node_modules/@fullcalendar/common/src/common/slicing-utils.ts","node_modules/@fullcalendar/common/src/validation.ts","node_modules/@fullcalendar/common/src/scrollgrid/Scroller.tsx","node_modules/@fullcalendar/common/src/util/RefMap.ts","node_modules/@fullcalendar/common/src/scrollgrid/util.tsx","node_modules/@fullcalendar/common/src/scrollgrid/SimpleScrollGrid.tsx","node_modules/@fullcalendar/common/src/common/EventRoot.tsx","node_modules/@fullcalendar/common/src/common/StandardEvent.tsx","node_modules/@fullcalendar/common/src/common/NowIndicatorRoot.tsx","node_modules/@fullcalendar/common/src/common/DayCellContent.tsx","node_modules/@fullcalendar/common/src/common/DayCellRoot.tsx","node_modules/@fullcalendar/common/src/common/bg-fill.tsx","node_modules/@fullcalendar/common/src/common/WeekNumberRoot.tsx","node_modules/@fullcalendar/common/src/common/Popover.tsx","node_modules/@fullcalendar/common/src/common/MorePopover.tsx","node_modules/@fullcalendar/common/src/common/MoreLinkRoot.tsx","node_modules/@fullcalendar/common/src/main.ts","node_modules/@fullcalendar/core/src/Calendar.tsx","node_modules/@fullcalendar/daygrid/src/TableView.tsx","node_modules/@fullcalendar/daygrid/src/TableSeg.ts","node_modules/@fullcalendar/daygrid/src/TableCellTop.tsx","node_modules/@fullcalendar/daygrid/src/event-rendering.ts","node_modules/@fullcalendar/daygrid/src/TableBlockEvent.tsx","node_modules/@fullcalendar/daygrid/src/TableListItemEvent.tsx","node_modules/@fullcalendar/daygrid/src/TableCellMoreLink.tsx","node_modules/@fullcalendar/daygrid/src/TableCell.tsx","node_modules/@fullcalendar/daygrid/src/event-placement.ts","node_modules/@fullcalendar/daygrid/src/TableRow.tsx","node_modules/@fullcalendar/daygrid/src/Table.tsx","node_modules/@fullcalendar/daygrid/src/DayTableSlicer.tsx","node_modules/@fullcalendar/daygrid/src/DayTable.tsx","node_modules/@fullcalendar/daygrid/src/DayTableView.tsx","node_modules/@fullcalendar/daygrid/src/TableDateProfileGenerator.ts","node_modules/@fullcalendar/daygrid/src/main.ts","node_modules/@fullcalendar/timegrid/src/AllDaySplitter.ts","node_modules/@fullcalendar/timegrid/src/TimeColsAxisCell.tsx","node_modules/@fullcalendar/timegrid/src/TimeBodyAxis.tsx","node_modules/@fullcalendar/timegrid/src/TimeColsView.tsx","node_modules/@fullcalendar/timegrid/src/TimeColsSlatsCoords.ts","node_modules/@fullcalendar/timegrid/src/TimeColsSlatsBody.tsx","node_modules/@fullcalendar/timegrid/src/TimeColsSlats.tsx","node_modules/@fullcalendar/timegrid/src/TimeColsSeg.ts","node_modules/@fullcalendar/timegrid/src/TimeColMoreLink.tsx","node_modules/@fullcalendar/timegrid/src/seg-web.ts","node_modules/@fullcalendar/timegrid/src/event-placement.ts","node_modules/@fullcalendar/timegrid/src/TimeColEvent.tsx","node_modules/@fullcalendar/timegrid/src/TimeColMisc.tsx","node_modules/@fullcalendar/timegrid/src/TimeCol.tsx","node_modules/@fullcalendar/timegrid/src/TimeColsContent.tsx","node_modules/@fullcalendar/timegrid/src/TimeCols.tsx","node_modules/@fullcalendar/timegrid/src/DayTimeColsSlicer.ts","node_modules/@fullcalendar/timegrid/src/DayTimeCols.tsx","node_modules/@fullcalendar/timegrid/src/time-slat-meta.ts","node_modules/@fullcalendar/timegrid/src/DayTimeColsView.tsx","node_modules/@fullcalendar/timegrid/src/options.ts","node_modules/@fullcalendar/timegrid/src/main.ts","node_modules/@fullcalendar/premium-common/src/license.tsx","node_modules/@fullcalendar/premium-common/src/options.ts","node_modules/@fullcalendar/scrollgrid/src/scroll-left-norm.tsx","node_modules/@fullcalendar/premium-common/src/main.ts","node_modules/@fullcalendar/scrollgrid/src/ScrollListener.ts","node_modules/@fullcalendar/scrollgrid/src/StickyScrolling.ts","node_modules/@fullcalendar/scrollgrid/src/ClippedScroller.tsx","node_modules/@fullcalendar/scrollgrid/src/ScrollSyncer.ts","node_modules/@fullcalendar/scrollgrid/src/ScrollGrid.tsx","node_modules/@fullcalendar/scrollgrid/src/main.ts","node_modules/@fullcalendar/timeline/src/timeline-date-profile.ts","node_modules/@fullcalendar/timeline/src/TimelineHeaderThInner.tsx","node_modules/@fullcalendar/timeline/src/TimelineHeaderTh.tsx","node_modules/@fullcalendar/timeline/src/TimelineHeaderRows.tsx","node_modules/@fullcalendar/timeline/src/TimelineCoords.ts","node_modules/@fullcalendar/timeline/src/TimelineHeader.tsx","node_modules/@fullcalendar/timeline/src/TimelineSlatCell.tsx","node_modules/@fullcalendar/timeline/src/TimelineSlatsBody.tsx","node_modules/@fullcalendar/timeline/src/TimelineSlats.tsx","node_modules/@fullcalendar/timeline/src/event-placement.ts","node_modules/@fullcalendar/timeline/src/TimelineLaneBg.tsx","node_modules/@fullcalendar/timeline/src/TimelineLaneSlicer.ts","node_modules/@fullcalendar/timeline/src/TimelineEvent.tsx","node_modules/@fullcalendar/timeline/src/TimelineLaneMoreLink.tsx","node_modules/@fullcalendar/timeline/src/TimelineLane.tsx","node_modules/@fullcalendar/timeline/src/TimelineGrid.tsx","node_modules/@fullcalendar/timeline/src/TimelineView.tsx","node_modules/@fullcalendar/timeline/src/main.ts","node_modules/@fullcalendar/resource-common/src/EventDragging.ts","node_modules/@fullcalendar/resource-common/src/View.ts","node_modules/@fullcalendar/resource-common/src/ResourceEventConfigAdder.ts","node_modules/@fullcalendar/resource-common/src/structs/resource-source-def.ts","node_modules/@fullcalendar/resource-common/src/structs/resource-source-parse.ts","node_modules/@fullcalendar/resource-common/src/reducers/resourceSource.ts","node_modules/@fullcalendar/resource-common/src/structs/resource.ts","node_modules/@fullcalendar/resource-common/src/reducers/resourceStore.ts","node_modules/@fullcalendar/resource-common/src/structs/event-parse.ts","node_modules/@fullcalendar/resource-common/src/api/ResourceApi.ts","node_modules/@fullcalendar/resource-common/src/api/CalendarApi-extend.ts","node_modules/@fullcalendar/resource-common/src/common/ResourceSplitter.ts","node_modules/@fullcalendar/resource-common/src/validation.ts","node_modules/@fullcalendar/resource-common/src/api/EventApi-extend.ts","node_modules/@fullcalendar/resource-common/src/option-change-handlers.ts","node_modules/@fullcalendar/resource-common/src/resources-crud.ts","node_modules/@fullcalendar/resource-common/src/options.ts","node_modules/@fullcalendar/resource-common/src/common/ResourceLabelRoot.tsx","node_modules/@fullcalendar/resource-common/src/resource-sources/resource-array.ts","node_modules/@fullcalendar/resource-common/src/resource-sources/resource-func.ts","node_modules/@fullcalendar/resource-common/src/resource-sources/resource-json-feed.ts","node_modules/@fullcalendar/resource-common/src/common/ResourceCell.tsx","node_modules/@fullcalendar/resource-common/src/common/ResourceDayHeader.tsx","node_modules/@fullcalendar/resource-common/src/common/ResourceIndex.ts","node_modules/@fullcalendar/resource-common/src/common/AbstractResourceDayTableModel.tsx","node_modules/@fullcalendar/resource-common/src/common/VResourceJoiner.ts","node_modules/@fullcalendar/resource-common/src/common/ResourceDayTableModel.ts","node_modules/@fullcalendar/resource-common/src/common/DayResourceTableModel.ts","node_modules/@fullcalendar/resource-common/src/common/VResourceSplitter.ts","node_modules/@fullcalendar/resource-common/src/common/resource-hierarchy.ts","node_modules/@fullcalendar/resource-common/src/main.ts","node_modules/@fullcalendar/resource-common/src/reducers/resources.ts","node_modules/@fullcalendar/resource-common/src/reducers/resourceEntityExpansions.ts","node_modules/@fullcalendar/resource-common/src/DateSelecting.ts","node_modules/@fullcalendar/resource-common/src/ExternalElementDragging.ts","node_modules/@fullcalendar/resource-timeline/src/ExpanderIcon.tsx","node_modules/@fullcalendar/resource-timeline/src/spreadsheet-cell-util.ts","node_modules/@fullcalendar/resource-timeline/src/SpreadsheetIndividualCellInner.tsx","node_modules/@fullcalendar/resource-timeline/src/SpreadsheetIndividualCell.tsx","node_modules/@fullcalendar/resource-timeline/src/SpreadsheetGroupCell.tsx","node_modules/@fullcalendar/resource-timeline/src/SpreadsheetRow.tsx","node_modules/@fullcalendar/resource-timeline/src/SpreadsheetGroupRow.tsx","node_modules/@fullcalendar/resource-timeline/src/SpreadsheetHeader.tsx","node_modules/@fullcalendar/resource-timeline/src/ResourceTimelineLaneMisc.tsx","node_modules/@fullcalendar/resource-timeline/src/ResourceTimelineLane.tsx","node_modules/@fullcalendar/resource-timeline/src/DividerRow.tsx","node_modules/@fullcalendar/resource-timeline/src/ResourceTimelineLanesBody.tsx","node_modules/@fullcalendar/resource-timeline/src/ResourceTimelineLanes.tsx","node_modules/@fullcalendar/resource-timeline/src/ResourceTimelineGrid.tsx","node_modules/@fullcalendar/resource-timeline/src/ResourceTimelineViewLayout.tsx","node_modules/@fullcalendar/resource-timeline/src/ResourceTimelineView.tsx","node_modules/@fullcalendar/resource-timeline/src/main.ts","node_modules/@fullcalendar/interaction/src/dnd/PointerDragging.ts","node_modules/@fullcalendar/interaction/src/dnd/ElementMirror.ts","node_modules/@fullcalendar/interaction/src/ScrollGeomCache.ts","node_modules/@fullcalendar/interaction/src/ElementScrollGeomCache.ts","node_modules/@fullcalendar/interaction/src/WindowScrollGeomCache.ts","node_modules/@fullcalendar/interaction/src/dnd/AutoScroller.ts","node_modules/@fullcalendar/interaction/src/dnd/FeaturefulElementDragging.ts","node_modules/@fullcalendar/interaction/src/OffsetTracker.ts","node_modules/@fullcalendar/interaction/src/interactions/HitDragging.ts","node_modules/@fullcalendar/interaction/src/utils.ts","node_modules/@fullcalendar/interaction/src/interactions/DateClicking.ts","node_modules/@fullcalendar/interaction/src/interactions/DateSelecting.ts","node_modules/@fullcalendar/interaction/src/interactions/EventDragging.ts","node_modules/@fullcalendar/interaction/src/interactions/EventResizing.ts","node_modules/@fullcalendar/interaction/src/interactions/UnselectAuto.ts","node_modules/@fullcalendar/interaction/src/options.ts","node_modules/@fullcalendar/interaction/src/interactions-external/ExternalElementDragging.ts","node_modules/@fullcalendar/interaction/src/interactions-external/ExternalDraggable.ts","node_modules/@fullcalendar/interaction/src/interactions-external/InferredElementDragging.ts","node_modules/@fullcalendar/interaction/src/interactions-external/ThirdPartyDraggable.ts","node_modules/@fullcalendar/interaction/src/main.ts","node_modules/@fullcalendar/list/src/ListViewHeaderRow.tsx","node_modules/@fullcalendar/list/src/ListViewEventRow.tsx","node_modules/@fullcalendar/list/src/ListView.tsx","node_modules/@fullcalendar/list/src/options.ts","node_modules/@fullcalendar/list/src/main.ts","node_modules/rrule/src/weekday.ts","node_modules/rrule/src/helpers.ts","node_modules/rrule/src/types.ts","node_modules/rrule/src/dateutil.ts","node_modules/rrule/src/iterresult.ts","node_modules/rrule/src/callbackiterresult.ts","node_modules/rrule/src/nlp/i18n.ts","node_modules/rrule/src/nlp/totext.ts","node_modules/rrule/src/nlp/parsetext.ts","node_modules/rrule/src/nlp/index.ts","node_modules/rrule/src/datetime.ts","node_modules/rrule/src/parseoptions.ts","node_modules/rrule/src/parsestring.ts","node_modules/rrule/src/datewithzone.ts","node_modules/rrule/src/optionstostring.ts","node_modules/rrule/src/cache.ts","node_modules/rrule/src/masks.ts","node_modules/rrule/src/iterinfo/yearinfo.ts","node_modules/rrule/src/iterinfo/monthinfo.ts","node_modules/rrule/src/iterinfo/easter.ts","node_modules/rrule/src/iterinfo/index.ts","node_modules/rrule/src/iter/poslist.ts","node_modules/rrule/src/iter/index.ts","node_modules/rrule/src/rrule.ts","node_modules/rrule/src/iterset.ts","node_modules/rrule/src/rrulestr.ts","node_modules/rrule/src/rruleset.ts","node_modules/@fullcalendar/rrule/src/main.ts","node_modules/@fullcalendar/rrule/src/event-refiners.ts","node_modules/@fullcalendar/adaptive/src/main.ts","node_modules/@babel/runtime/helpers/esm/typeof.js","node_modules/date-fns/esm/_lib/requiredArgs/index.js","node_modules/date-fns/esm/isDate/index.js","node_modules/date-fns/esm/toDate/index.js","node_modules/date-fns/esm/isValid/index.js","node_modules/date-fns/esm/_lib/toInteger/index.js","node_modules/date-fns/esm/addMilliseconds/index.js","node_modules/date-fns/esm/subMilliseconds/index.js","node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","node_modules/date-fns/esm/_lib/defaultOptions/index.js","node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","node_modules/date-fns/esm/_lib/getUTCWeek/index.js","node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","node_modules/date-fns/esm/_lib/format/formatters/index.js","node_modules/date-fns/esm/_lib/format/longFormatters/index.js","node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","node_modules/date-fns/esm/_lib/protectedTokens/index.js","node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","node_modules/date-fns/esm/_lib/defaultLocale/index.js","node_modules/date-fns/esm/locale/en-US/index.js","node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","node_modules/date-fns/esm/format/index.js","node_modules/date-fns/esm/constants/index.js","node_modules/date-fns/esm/parseISO/index.js","src/calendar/main.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n    function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n    var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n    var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n    var _, done = false;\r\n    for (var i = decorators.length - 1; i >= 0; i--) {\r\n        var context = {};\r\n        for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n        for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n        context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n        var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n        if (kind === \"accessor\") {\r\n            if (result === void 0) continue;\r\n            if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n            if (_ = accept(result.get)) descriptor.get = _;\r\n            if (_ = accept(result.set)) descriptor.set = _;\r\n            if (_ = accept(result.init)) initializers.push(_);\r\n        }\r\n        else if (_ = accept(result)) {\r\n            if (kind === \"field\") initializers.push(_);\r\n            else descriptor[key] = _;\r\n        }\r\n    }\r\n    if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n    done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n    var useValue = arguments.length > 2;\r\n    for (var i = 0; i < initializers.length; i++) {\r\n        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n    }\r\n    return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n    return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n    if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n    return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    var desc = Object.getOwnPropertyDescriptor(m, k);\r\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n        desc = { enumerable: true, get: function() { return m[k]; } };\r\n    }\r\n    Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n    if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n    return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { EMPTY_ARR } from \"./constants\";\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array<import('.').ComponentChildren>} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name.indexOf('-') != -1)) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\nexport let inEvent = false;\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tinEvent = true;\n\ttry {\n\t\treturn this._listeners[e.type + false](\n\t\t\toptions.event ? options.event(e) : e\n\t\t);\n\t} finally {\n\t\tinEvent = false;\n\t}\n}\n\nfunction eventProxyCapture(e) {\n\tinEvent = true;\n\ttry {\n\t\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n\t} finally {\n\t\tinEvent = false;\n\t}\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { inEvent } from './diff/props';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Component>}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst microTick =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\nfunction defer(cb) {\n\tif (inEvent) {\n\t\tsetTimeout(cb);\n\t} else {\n\t\tmicroTick(cb);\n\t}\n}\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function(_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\n}\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < renderResult.length; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (Array.isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t//   const reuse = <div />\n\t\t\t//   <div>{reuse}<span />{reuse}</div>\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Check if we find a corresponding element in oldChildren.\n\t\t// If found, delete the array item by setting to `undefined`.\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t// (holes).\n\t\toldVNode = oldChildren[i];\n\n\t\tif (\n\t\t\toldVNode === null ||\n\t\t\t(oldVNode &&\n\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t) {\n\t\t\toldChildren[i] = undefined;\n\t\t} else {\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t// We always match by type (in either case).\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toldVNode = null;\n\t\t\t}\n\t\t}\n\n\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (!refs) refs = [];\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\tchildVNode._children === oldVNode._children\n\t\t\t) {\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldDom,\n\t\t\t\t\tparentDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\toldChildren,\n\t\t\t\t\tnewDom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t} else if (\n\t\t\toldDom &&\n\t\t\toldVNode._dom == oldDom &&\n\t\t\toldDom.parentNode != parentDom\n\t\t) {\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\n\t\t\toldDom = getDomSibling(oldVNode);\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\t\t\t\tnewParentVNode._nextDom = getLastDom(oldParentVNode).nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tif (refs) {\n\t\tfor (i = 0; i < refs.length; i++) {\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode, vnode, c, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(\n\tparentDom,\n\tchildVNode,\n\toldVNode,\n\toldChildren,\n\tnewDom,\n\toldDom\n) {\n\tlet nextDom;\n\tif (childVNode._nextDom !== undefined) {\n\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t// of last DOM child of this child VNode\n\t\tnextDom = childVNode._nextDom;\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t// can clean up the property\n\t\tchildVNode._nextDom = undefined;\n\t} else if (\n\t\toldVNode == null ||\n\t\tnewDom != oldDom ||\n\t\tnewDom.parentNode == null\n\t) {\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\tparentDom.appendChild(newDom);\n\t\t\tnextDom = null;\n\t\t} else {\n\t\t\t// `j<oldChildrenLength; j+=2` is an alternative to `j++<oldChildrenLength/2`\n\t\t\tfor (\n\t\t\t\tlet sibDom = oldDom, j = 0;\n\t\t\t\t(sibDom = sibDom.nextSibling) && j < oldChildren.length;\n\t\t\t\tj += 1\n\t\t\t) {\n\t\t\t\tif (sibDom == newDom) {\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t\tparentDom.insertBefore(newDom, oldDom);\n\t\t\tnextDom = oldDom;\n\t\t}\n\t}\n\n\t// If we have pre-calculated the nextDOM node, use it. Else calculate it now\n\t// Strictly check for `undefined` here cuz `null` is a valid value of `nextDom`.\n\t// See more detail in create-element.js:createVNode\n\tif (nextDom !== undefined) {\n\t\toldDom = nextDom;\n\t} else {\n\t\toldDom = newDom.nextSibling;\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * @param {import('../internal').VNode} vnode\n */\nfunction getLastDom(vnode) {\n\tif (vnode.type == null || typeof vnode.type === 'string') {\n\t\treturn vnode._dom;\n\t}\n\n\tif (vnode._children) {\n\t\tfor (let i = vnode._children.length - 1; i >= 0; i--) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child) {\n\t\t\t\tlet lastDom = getLastDom(child);\n\t\t\t\tif (lastDom) {\n\t\t\t\t\treturn lastDom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original === oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\tnewVNode._dom = oldDom;\n\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t// ^ could possibly be simplified to:\n\t\t\t// excessDomChildren.length = 0;\n\t\t}\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n}\n\n/**\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tArray.isArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the <progress>-element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix <select> value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType === 'option' && i !== oldProps.value))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) {\n\t\t\tapplyRef(r, null, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t\tvnode._component = undefined;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type !== 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && vnode._dom != null) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._parent = vnode._dom = vnode._nextDom = undefined;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n","import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = (\n\t\t(!isHydrating && replaceNode) ||\n\t\tparentDom\n\t)._children = createElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component, ctor, handled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {import('./internal').Component} */\nlet previousComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array<import('./internal').Component>} */\nlet afterPaintEffects = [];\n\nlet EMPTY = [];\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\noptions._diff = vnode => {\n\tcurrentComponent = null;\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n};\n\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tconst hooks = currentComponent.__hooks;\n\tif (hooks) {\n\t\tif (previousComponent === currentComponent) {\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentComponent._renderCallbacks = [];\n\t\t\thooks._list.forEach(hookItem => {\n\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t}\n\t\t\t\thookItem._pendingValue = EMPTY;\n\t\t\t\thookItem._nextValue = hookItem._pendingArgs = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\thooks._pendingEffects.forEach(invokeCleanup);\n\t\t\thooks._pendingEffects.forEach(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t}\n\t}\n\tpreviousComponent = currentComponent;\n};\n\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tif (c.__hooks._pendingEffects.length) afterPaint(afterPaintEffects.push(c));\n\t\tc.__hooks._list.forEach(hookItem => {\n\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t}\n\t\t\tif (hookItem._pendingValue !== EMPTY) {\n\t\t\t\thookItem._value = hookItem._pendingValue;\n\t\t\t}\n\t\t\thookItem._pendingArgs = undefined;\n\t\t\thookItem._pendingValue = EMPTY;\n\t\t});\n\t}\n\tpreviousComponent = currentComponent = null;\n};\n\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tlet hasErrored;\n\t\tc.__hooks._list.forEach(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tc.__hooks = undefined;\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({ _pendingValue: EMPTY });\n\t}\n\treturn hooks._list[index];\n}\n\n/**\n * @param {import('./index').StateUpdater<any>} [initialState]\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @param {import('./index').Reducer<any, any>} reducer\n * @param {import('./index').StateUpdater<any>} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ any, (state: any) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._component) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst currentValue = hookState._nextValue\n\t\t\t\t\t? hookState._nextValue[0]\n\t\t\t\t\t: hookState._value[0];\n\t\t\t\tconst nextValue = hookState._reducer(currentValue, action);\n\n\t\t\t\tif (currentValue !== nextValue) {\n\t\t\t\t\thookState._nextValue = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._component = currentComponent;\n\n\t\tif (!currentComponent._hasScuFromHooks) {\n\t\t\tcurrentComponent._hasScuFromHooks = true;\n\t\t\tconst prevScu = currentComponent.shouldComponentUpdate;\n\n\t\t\t// This SCU has the purpose of bailing out after repeated updates\n\t\t\t// to stateful hooks.\n\t\t\t// we store the next value in _nextValue[0] and keep doing that for all\n\t\t\t// state setters, if we have next states and\n\t\t\t// all next states within a component end up being equal to their original state\n\t\t\t// we are safe to bail out for this specific component.\n\t\t\tcurrentComponent.shouldComponentUpdate = function(p, s, c) {\n\t\t\t\tif (!hookState._component.__hooks) return true;\n\n\t\t\t\tconst stateHooks = hookState._component.__hooks._list.filter(\n\t\t\t\t\tx => x._component\n\t\t\t\t);\n\t\t\t\tconst allHooksEmpty = stateHooks.every(x => !x._nextValue);\n\t\t\t\t// When we have no updated hooks in the component we invoke the previous SCU or\n\t\t\t\t// traverse the VDOM tree further.\n\t\t\t\tif (allHooksEmpty) {\n\t\t\t\t\treturn prevScu ? prevScu.call(this, p, s, c) : true;\n\t\t\t\t}\n\n\t\t\t\t// We check whether we have components with a nextValue set that\n\t\t\t\t// have values that aren't equal to one another this pushes\n\t\t\t\t// us to update further down the tree\n\t\t\t\tlet shouldUpdate = false;\n\t\t\t\tstateHooks.forEach(hookItem => {\n\t\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\t\tconst currentValue = hookItem._value[0];\n\t\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t\t\thookItem._nextValue = undefined;\n\t\t\t\t\t\tif (currentValue !== hookItem._value[0]) shouldUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn shouldUpdate || hookState._component.props !== p\n\t\t\t\t\t? prevScu\n\t\t\t\t\t\t? prevScu.call(this, p, s, c)\n\t\t\t\t\t\t: true\n\t\t\t\t\t: false;\n\t\t\t};\n\t\t}\n\t}\n\n\treturn hookState._nextValue || hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {any[]} args\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tref(createHandle());\n\t\t\t\treturn () => ref(null);\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @param {() => any} factory\n * @param {any[]} args\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._pendingValue = factory();\n\t\tstate._pendingArgs = args;\n\t\tstate._factory = factory;\n\t\treturn state._pendingValue;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {any[]} args\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\n\t}\n}\n\n/**\n * @param {(error: any, errorInfo: import('preact').ErrorInfo) => void} cb\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = (err, errorInfo) => {\n\t\t\tif (state._value) state._value(err, errorInfo);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\nexport function useId() {\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._value) {\n\t\t// Grab either the root node or the nearest async boundary node.\n\t\t/** @type {import('./internal.d').VNode} */\n\t\tlet root = currentComponent._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\tlet mask = root._mask || (root._mask = [0, 0]);\n\t\tstate._value = 'P' + mask[0] + '-' + mask[1]++;\n\t}\n\n\treturn state._value;\n}\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet component;\n\twhile ((component = afterPaintEffects.shift())) {\n\t\tif (!component._parentDom || !component.__hooks) continue;\n\t\ttry {\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t} catch (e) {\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\n\tcurrentComponent = comp;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\thook._cleanup = hook._value();\n\tcurrentComponent = comp;\n}\n\n/**\n * @param {any[]} oldArgs\n * @param {any[]} newArgs\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n","/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function(props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { toChildArray } from 'preact';\n\nconst mapFn = (children, fn) => {\n\tif (children == null) return null;\n\treturn toChildArray(toChildArray(children).map(fn));\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nexport const Children = {\n\tmap: mapFn,\n\tforEach: mapFn,\n\tcount(children) {\n\t\treturn children ? toChildArray(children).length : 0;\n\t},\n\tonly(children) {\n\t\tconst normalized = toChildArray(children);\n\t\tif (normalized.length !== 1) throw 'Children.only';\n\t\treturn normalized[0];\n\t},\n\ttoArray: toChildArray\n};\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function(error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function(vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._hydrating === true) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function(promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tconst wasHydrating = suspendingVNode._hydrating === true;\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function() {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function(props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._hydrating = null;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\t/** @type {import('./internal').Component} */\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function(child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function(props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate = SuspenseList.prototype.componentDidMount = function() {\n\t// Iterate through all children after mounting for two reasons:\n\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t//    each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t//    The nodes can now be completely consumed from the linked list.\n\t// 2. Handle nodes that might have gotten resolved between render and\n\t//    componentDidMount.\n\tthis._map.forEach((node, child) => {\n\t\tresolve(this, child, node);\n\t});\n};\n","import { createElement, render } from 'preact';\n\n/**\n * @param {import('../../src/index').RenderableProps<{ context: any }>} props\n */\nfunction ContextProvider(props) {\n\tthis.getChildContext = () => props.context;\n\treturn props.children;\n}\n\n/**\n * Portal component\n * @this {import('./internal').Component}\n * @param {object | null | undefined} props\n *\n * TODO: use createRoot() instead of fake root\n */\nfunction Portal(props) {\n\tconst _this = this;\n\tlet container = props._container;\n\n\t_this.componentWillUnmount = function() {\n\t\trender(null, _this._temp);\n\t\t_this._temp = null;\n\t\t_this._container = null;\n\t};\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif (_this._container && _this._container !== container) {\n\t\t_this.componentWillUnmount();\n\t}\n\n\t// When props.vnode is undefined/false/null we are dealing with some kind of\n\t// conditional vnode. This should not trigger a render.\n\tif (props._vnode) {\n\t\tif (!_this._temp) {\n\t\t\t_this._container = container;\n\n\t\t\t// Create a fake DOM parent node that manages a subset of `container`'s children:\n\t\t\t_this._temp = {\n\t\t\t\tnodeType: 1,\n\t\t\t\tparentNode: container,\n\t\t\t\tchildNodes: [],\n\t\t\t\tappendChild(child) {\n\t\t\t\t\tthis.childNodes.push(child);\n\t\t\t\t\t_this._container.appendChild(child);\n\t\t\t\t},\n\t\t\t\tinsertBefore(child, before) {\n\t\t\t\t\tthis.childNodes.push(child);\n\t\t\t\t\t_this._container.appendChild(child);\n\t\t\t\t},\n\t\t\t\tremoveChild(child) {\n\t\t\t\t\tthis.childNodes.splice(this.childNodes.indexOf(child) >>> 1, 1);\n\t\t\t\t\t_this._container.removeChild(child);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// Render our wrapping element into temp.\n\t\trender(\n\t\t\tcreateElement(ContextProvider, { context: _this.context }, props._vnode),\n\t\t\t_this._temp\n\t\t);\n\t}\n\t// When we come from a conditional render, on a mounted\n\t// portal we should clear the DOM.\n\telse if (_this._temp) {\n\t\t_this.componentWillUnmount();\n\t}\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nexport function createPortal(vnode, container) {\n\tconst el = createElement(Portal, { _vnode: vnode, _container: container });\n\tel.containerInfo = container;\n\treturn el;\n}\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\n\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/i\n\t\t: /fil|che|ra/i\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\te.persist = empty;\n\te.isPropagationStopped = isPropagationStopped;\n\te.isDefaultPrevented = isDefaultPrevented;\n\treturn (e.nativeEvent = e);\n};\n\nfunction empty() {}\n\nfunction isPropagationStopped() {\n\treturn this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n\treturn this.defaultPrevented;\n}\n\nlet classNameDescriptor = {\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\tlet type = vnode.type;\n\tlet props = vnode.props;\n\tlet normalizedProps = props;\n\n\t// only normalize props on Element nodes\n\tif (typeof type === 'string') {\n\t\tconst nonCustomElement = type.indexOf('-') === -1;\n\t\tnormalizedProps = {};\n\n\t\tfor (let i in props) {\n\t\t\tlet value = props[i];\n\n\t\t\tif (IS_DOM && i === 'children' && type === 'noscript') {\n\t\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t\tcontinue;\n\t\t\t} else if (i === 'value' && 'defaultValue' in props && value == null) {\n\t\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t\t// a default value\n\t\t\t\tcontinue;\n\t\t\t} else if (\n\t\t\t\ti === 'defaultValue' &&\n\t\t\t\t'value' in props &&\n\t\t\t\tprops.value == null\n\t\t\t) {\n\t\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\t\ti = 'value';\n\t\t\t} else if (i === 'download' && value === true) {\n\t\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t\t// value will be used as the file name and the file will be called\n\t\t\t\t// \"true\" upon downloading it.\n\t\t\t\tvalue = '';\n\t\t\t} else if (/ondoubleclick/i.test(i)) {\n\t\t\t\ti = 'ondblclick';\n\t\t\t} else if (\n\t\t\t\t/^onchange(textarea|input)/i.test(i + type) &&\n\t\t\t\t!onChangeInputType(props.type)\n\t\t\t) {\n\t\t\t\ti = 'oninput';\n\t\t\t} else if (/^onfocus$/i.test(i)) {\n\t\t\t\ti = 'onfocusin';\n\t\t\t} else if (/^onblur$/i.test(i)) {\n\t\t\t\ti = 'onfocusout';\n\t\t\t} else if (/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)) {\n\t\t\t\ti = i.toLowerCase();\n\t\t\t} else if (nonCustomElement && CAMEL_PROPS.test(i)) {\n\t\t\t\ti = i.replace(/[A-Z0-9]/g, '-$&').toLowerCase();\n\t\t\t} else if (value === null) {\n\t\t\t\tvalue = undefined;\n\t\t\t}\n\n\t\t\t// Add support for onInput and onChange, see #3561\n\t\t\t// if we have an oninput prop already change it to oninputCapture\n\t\t\tif (/^oninput$/i.test(i)) {\n\t\t\t\ti = i.toLowerCase();\n\t\t\t\tif (normalizedProps[i]) {\n\t\t\t\t\ti = 'oninputCapture';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnormalizedProps[i] = value;\n\t\t}\n\n\t\t// Add support for array select values: <select multiple value={[]} />\n\t\tif (\n\t\t\ttype == 'select' &&\n\t\t\tnormalizedProps.multiple &&\n\t\t\tArray.isArray(normalizedProps.value)\n\t\t) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvnode.props = normalizedProps;\n\n\t\tif (props.class != props.className) {\n\t\t\tclassNameDescriptor.enumerable = 'className' in props;\n\t\t\tif (props.className != null) normalizedProps.class = props.className;\n\t\t\tObject.defineProperty(normalizedProps, 'className', classNameDescriptor);\n\t\t}\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function(vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport { is } from './util';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '17.0.2'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (!is(_instance._value, getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n","import { __extends } from 'tslib';\nimport * as preact from 'preact';\nimport * as preactCompat from 'preact/compat';\n\nvar globalObj = typeof globalThis !== 'undefined' ? globalThis : window; // // TODO: streamline when killing IE11 support\nif (globalObj.FullCalendarVDom) {\n    console.warn('FullCalendar VDOM already loaded');\n}\nelse {\n    globalObj.FullCalendarVDom = {\n        Component: preact.Component,\n        createElement: preact.createElement,\n        render: preact.render,\n        createRef: preact.createRef,\n        Fragment: preact.Fragment,\n        createContext: createContext,\n        createPortal: preactCompat.createPortal,\n        flushSync: flushSync,\n        unmountComponentAtNode: unmountComponentAtNode,\n    };\n}\n// HACKS...\n// TODO: lock version\n// TODO: link gh issues\nfunction flushSync(runBeforeFlush) {\n    runBeforeFlush();\n    var oldDebounceRendering = preact.options.debounceRendering; // orig\n    var callbackQ = [];\n    function execCallbackSync(callback) {\n        callbackQ.push(callback);\n    }\n    preact.options.debounceRendering = execCallbackSync;\n    preact.render(preact.createElement(FakeComponent, {}), document.createElement('div'));\n    while (callbackQ.length) {\n        callbackQ.shift()();\n    }\n    preact.options.debounceRendering = oldDebounceRendering;\n}\nvar FakeComponent = /** @class */ (function (_super) {\n    __extends(FakeComponent, _super);\n    function FakeComponent() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    FakeComponent.prototype.render = function () { return preact.createElement('div', {}); };\n    FakeComponent.prototype.componentDidMount = function () { this.setState({}); };\n    return FakeComponent;\n}(preact.Component));\nfunction createContext(defaultValue) {\n    var ContextType = preact.createContext(defaultValue);\n    var origProvider = ContextType.Provider;\n    ContextType.Provider = function () {\n        var _this = this;\n        var isNew = !this.getChildContext;\n        var children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params\n        if (isNew) {\n            var subs_1 = [];\n            this.shouldComponentUpdate = function (_props) {\n                if (_this.props.value !== _props.value) {\n                    subs_1.forEach(function (c) {\n                        c.context = _props.value;\n                        c.forceUpdate();\n                    });\n                }\n            };\n            this.sub = function (c) {\n                subs_1.push(c);\n                var old = c.componentWillUnmount;\n                c.componentWillUnmount = function () {\n                    subs_1.splice(subs_1.indexOf(c), 1);\n                    old && old.call(c);\n                };\n            };\n        }\n        return children;\n    };\n    return ContextType;\n}\nfunction unmountComponentAtNode(node) {\n    preact.render(null, node);\n}\n","/// <reference types=\"@fullcalendar/core-preact\" />\nif (typeof FullCalendarVDom === 'undefined') {\n    throw new Error('Please import the top-level fullcalendar lib before attempting to import a plugin.');\n}\nvar Component = FullCalendarVDom.Component;\nvar createElement = FullCalendarVDom.createElement;\nvar render = FullCalendarVDom.render;\nvar createRef = FullCalendarVDom.createRef;\nvar Fragment = FullCalendarVDom.Fragment;\nvar createContext = FullCalendarVDom.createContext;\nvar createPortal = FullCalendarVDom.createPortal;\nvar flushSync = FullCalendarVDom.flushSync;\nvar unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode;\n/* eslint-enable */\n\nexport { Component, Fragment, createContext, createElement, createPortal, createRef, flushSync, render, unmountComponentAtNode };\n","import { EventSource } from '../structs/event-source'\nimport { CalendarContext } from '../CalendarContext'\n\n// no public types yet. when there are, export from:\n// import {} from './api-type-deps'\n\nexport class EventSourceApi {\n  constructor(\n    private context: CalendarContext,\n    public internalEventSource: EventSource<any>, // rename?\n  ) {\n  }\n\n  remove() {\n    this.context.dispatch({\n      type: 'REMOVE_EVENT_SOURCE',\n      sourceId: this.internalEventSource.sourceId,\n    })\n  }\n\n  refetch() {\n    this.context.dispatch({\n      type: 'FETCH_EVENT_SOURCES',\n      sourceIds: [this.internalEventSource.sourceId],\n      isRefetch: true,\n    })\n  }\n\n  get id(): string {\n    return this.internalEventSource.publicId\n  }\n\n  get url(): string {\n    return this.internalEventSource.meta.url\n  }\n\n  get format(): string {\n    return this.internalEventSource.meta.format // TODO: bad. not guaranteed\n  }\n}\n","import { Dictionary } from '../options'\n\nexport function removeElement(el: HTMLElement) { // removes nodes in addition to elements. bad name\n  if (el.parentNode) {\n    el.parentNode.removeChild(el)\n  }\n}\n\n// Querying\n// ----------------------------------------------------------------------------------------------------------------\n\nexport function elementClosest(el: HTMLElement, selector: string): HTMLElement {\n  if (el.closest) {\n    return el.closest(selector)\n\n  // really bad fallback for IE\n  // from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\n  }\n  if (!document.documentElement.contains(el)) {\n    return null\n  }\n  do {\n    if (elementMatches(el, selector)) {\n      return el\n    }\n    el = (el.parentElement || el.parentNode) as HTMLElement\n  } while (el !== null && el.nodeType === 1)\n  return null\n}\n\nexport function elementMatches(el: HTMLElement, selector: string): HTMLElement {\n  let method = el.matches || (el as any).matchesSelector || (el as any).msMatchesSelector\n\n  return method.call(el, selector)\n}\n\n// accepts multiple subject els\n// returns a real array. good for methods like forEach\n// TODO: accept the document\nexport function findElements(container: HTMLElement[] | HTMLElement | NodeListOf<HTMLElement>, selector: string): HTMLElement[] {\n  let containers = container instanceof HTMLElement ? [container] : container\n  let allMatches: HTMLElement[] = []\n\n  for (let i = 0; i < containers.length; i += 1) {\n    let matches = containers[i].querySelectorAll(selector)\n\n    for (let j = 0; j < matches.length; j += 1) {\n      allMatches.push(matches[j] as HTMLElement)\n    }\n  }\n\n  return allMatches\n}\n\n// accepts multiple subject els\n// only queries direct child elements // TODO: rename to findDirectChildren!\nexport function findDirectChildren(parent: HTMLElement[] | HTMLElement, selector?: string): HTMLElement[] {\n  let parents = parent instanceof HTMLElement ? [parent] : parent\n  let allMatches = []\n\n  for (let i = 0; i < parents.length; i += 1) {\n    let childNodes = parents[i].children // only ever elements\n\n    for (let j = 0; j < childNodes.length; j += 1) {\n      let childNode = childNodes[j]\n\n      if (!selector || elementMatches(childNode as HTMLElement, selector)) {\n        allMatches.push(childNode)\n      }\n    }\n  }\n\n  return allMatches\n}\n\n// Style\n// ----------------------------------------------------------------------------------------------------------------\n\nconst PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i\n\nexport function applyStyle(el: HTMLElement, props: Dictionary) {\n  for (let propName in props) {\n    applyStyleProp(el, propName, props[propName])\n  }\n}\n\nexport function applyStyleProp(el: HTMLElement, name: string, val) {\n  if (val == null) {\n    el.style[name] = ''\n  } else if (typeof val === 'number' && PIXEL_PROP_RE.test(name)) {\n    el.style[name] = `${val}px`\n  } else {\n    el.style[name] = val\n  }\n}\n\n// Event Handling\n// ----------------------------------------------------------------------------------------------------------------\n\n// if intercepting bubbled events at the document/window/body level,\n// and want to see originating element (the 'target'), use this util instead\n// of `ev.target` because it goes within web-component boundaries.\nexport function getEventTargetViaRoot(ev: Event) {\n  return ev.composedPath?.()[0] ?? ev.target\n}\n\n// Shadow DOM consuderations\n// ----------------------------------------------------------------------------------------------------------------\n\nexport function getElRoot(el: HTMLElement): ShadowRoot | Document {\n  return el.getRootNode ? el.getRootNode() as ShadowRoot : document\n}\n\n// Unique ID for DOM attribute\n\nlet guid = 0\n\nexport function getUniqueDomId() {\n  guid += 1\n  return 'fc-dom-' + guid\n}\n","import { elementClosest } from './dom-manip'\nimport { VUIEvent } from '../vdom'\n\n// Stops a mouse/touch event from doing it's native browser action\nexport function preventDefault(ev) {\n  ev.preventDefault()\n}\n\n// Event Delegation\n// ----------------------------------------------------------------------------------------------------------------\n\nexport function buildDelegationHandler<EventType extends (Event | VUIEvent)>(\n  selector: string,\n  handler: (ev: EventType, matchedTarget: HTMLElement) => void,\n) {\n  return (ev: EventType) => {\n    let matchedChild = elementClosest(ev.target as HTMLElement, selector)\n\n    if (matchedChild) {\n      handler.call(matchedChild, ev, matchedChild)\n    }\n  }\n}\n\nexport function listenBySelector(\n  container: HTMLElement,\n  eventType: string,\n  selector: string,\n  handler: (ev: Event, matchedTarget: HTMLElement) => void,\n) {\n  let attachedHandler = buildDelegationHandler(selector, handler)\n\n  container.addEventListener(eventType, attachedHandler)\n\n  return () => {\n    container.removeEventListener(eventType, attachedHandler)\n  }\n}\n\nexport function listenToHoverBySelector(\n  container: HTMLElement,\n  selector: string,\n  onMouseEnter: (ev: Event, matchedTarget: HTMLElement) => void,\n  onMouseLeave: (ev: Event, matchedTarget: HTMLElement) => void,\n) {\n  let currentMatchedChild\n\n  return listenBySelector(container, 'mouseover', selector, (mouseOverEv, matchedChild) => {\n    if (matchedChild !== currentMatchedChild) {\n      currentMatchedChild = matchedChild\n      onMouseEnter(mouseOverEv, matchedChild)\n\n      let realOnMouseLeave = (mouseLeaveEv) => {\n        currentMatchedChild = null\n        onMouseLeave(mouseLeaveEv, matchedChild)\n        matchedChild.removeEventListener('mouseleave', realOnMouseLeave)\n      }\n\n      // listen to the next mouseleave, and then unattach\n      matchedChild.addEventListener('mouseleave', realOnMouseLeave)\n    }\n  })\n}\n\n// Animation\n// ----------------------------------------------------------------------------------------------------------------\n\nconst transitionEventNames = [\n  'webkitTransitionEnd',\n  'otransitionend',\n  'oTransitionEnd',\n  'msTransitionEnd',\n  'transitionend',\n]\n\n// triggered only when the next single subsequent transition finishes\nexport function whenTransitionDone(el: HTMLElement, callback: (ev: Event) => void) {\n  let realCallback = (ev) => {\n    callback(ev)\n    transitionEventNames.forEach((eventName) => {\n      el.removeEventListener(eventName, realCallback)\n    })\n  }\n\n  transitionEventNames.forEach((eventName) => {\n    el.addEventListener(eventName, realCallback) // cross-browser way to determine when the transition finishes\n  })\n}\n\n// ARIA workarounds\n// ----------------------------------------------------------------------------------------------------------------\n\nexport function createAriaClickAttrs(handler: ((ev: UIEvent) => void)) {\n  return {\n    onClick: handler,\n    ...createAriaKeyboardAttrs(handler),\n  }\n}\n\nexport function createAriaKeyboardAttrs(handler: ((ev: UIEvent) => void)) {\n  return {\n    tabIndex: 0,\n    onKeyDown(ev: KeyboardEvent) {\n      if (ev.key === 'Enter' || ev.key === ' ') {\n        handler(ev)\n        ev.preventDefault() // if space, don't scroll down page\n      }\n    },\n  }\n}\n","import { preventDefault } from './dom-event'\n\nexport type GenericHash = { [key: string]: any } // already did this somewhere\n\nlet guidNumber = 0\n\nexport function guid() {\n  guidNumber += 1\n  return String(guidNumber)\n}\n\n/* FullCalendar-specific DOM Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\n// Make the mouse cursor express that an event is not allowed in the current area\nexport function disableCursor() {\n  document.body.classList.add('fc-not-allowed')\n}\n\n// Returns the mouse cursor to its original look\nexport function enableCursor() {\n  document.body.classList.remove('fc-not-allowed')\n}\n\n/* Selection\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport function preventSelection(el: HTMLElement) {\n  el.classList.add('fc-unselectable')\n  el.addEventListener('selectstart', preventDefault)\n}\n\nexport function allowSelection(el: HTMLElement) {\n  el.classList.remove('fc-unselectable')\n  el.removeEventListener('selectstart', preventDefault)\n}\n\n/* Context Menu\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport function preventContextMenu(el: HTMLElement) {\n  el.addEventListener('contextmenu', preventDefault)\n}\n\nexport function allowContextMenu(el: HTMLElement) {\n  el.removeEventListener('contextmenu', preventDefault)\n}\n\n/* Object Ordering by Field\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport interface OrderSpec<Subject> {\n  field?: string\n  order?: number\n  func?: FieldSpecInputFunc<Subject>\n}\n\nexport type FieldSpecInput<Subject> = string | string[] | FieldSpecInputFunc<Subject> | FieldSpecInputFunc<Subject>[]\nexport type FieldSpecInputFunc<Subject> = (a: Subject, b: Subject) => number\n\nexport function parseFieldSpecs<Subject>(input: FieldSpecInput<Subject>): OrderSpec<Subject>[] {\n  let specs: OrderSpec<Subject>[] = []\n  let tokens = []\n  let i\n  let token\n\n  if (typeof input === 'string') {\n    tokens = input.split(/\\s*,\\s*/)\n  } else if (typeof input === 'function') {\n    tokens = [input]\n  } else if (Array.isArray(input)) {\n    tokens = input\n  }\n\n  for (i = 0; i < tokens.length; i += 1) {\n    token = tokens[i]\n\n    if (typeof token === 'string') {\n      specs.push(\n        token.charAt(0) === '-' ?\n          { field: token.substring(1), order: -1 } :\n          { field: token, order: 1 },\n      )\n    } else if (typeof token === 'function') {\n      specs.push({ func: token })\n    }\n  }\n\n  return specs\n}\n\nexport function compareByFieldSpecs<Subject>(obj0: Subject, obj1: Subject, fieldSpecs: OrderSpec<Subject>[]): number {\n  let i\n  let cmp\n\n  for (i = 0; i < fieldSpecs.length; i += 1) {\n    cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i])\n    if (cmp) {\n      return cmp\n    }\n  }\n\n  return 0\n}\n\nexport function compareByFieldSpec<Subject>(obj0: Subject, obj1: Subject, fieldSpec: OrderSpec<Subject>): number {\n  if (fieldSpec.func) {\n    return fieldSpec.func(obj0, obj1)\n  }\n\n  return flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field])\n    * (fieldSpec.order || 1)\n}\n\nexport function flexibleCompare(a, b) {\n  if (!a && !b) {\n    return 0\n  }\n  if (b == null) {\n    return -1\n  }\n  if (a == null) {\n    return 1\n  }\n  if (typeof a === 'string' || typeof b === 'string') {\n    return String(a).localeCompare(String(b))\n  }\n  return a - b\n}\n\n/* String Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport function padStart(val, len) { // doesn't work with total length more than 3\n  let s = String(val)\n  return '000'.substr(0, len - s.length) + s\n}\n\nexport function formatWithOrdinals<Args extends any[]>(\n  formatter: string | ((...formatterArgs: Args) => string),\n  args: Args,\n  fallbackText: string,\n) {\n  if (typeof formatter === 'function') {\n    return formatter(...args)\n  }\n  if (typeof formatter === 'string') { // non-blank string\n    return args.reduce((str, arg, index) => (\n      str.replace('$' + index, arg || '')\n    ), formatter)\n  }\n  return fallbackText\n}\n\n/* Number Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport function compareNumbers(a, b) { // for .sort()\n  return a - b\n}\n\nexport function isInt(n) {\n  return n % 1 === 0\n}\n\n/* Weird Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport function firstDefined(...args) {\n  for (let i = 0; i < args.length; i += 1) {\n    if (args[i] !== undefined) {\n      return args[i]\n    }\n  }\n  return undefined\n}\n\n/* FC-specific DOM dimension stuff\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport function computeSmallestCellWidth(cellEl: HTMLElement) {\n  let allWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-frame')\n  let contentWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-cushion')\n\n  if (!allWidthEl) {\n    throw new Error('needs fc-scrollgrid-shrink-frame className') // TODO: use const\n  }\n  if (!contentWidthEl) {\n    throw new Error('needs fc-scrollgrid-shrink-cushion className')\n  }\n\n  return cellEl.getBoundingClientRect().width - allWidthEl.getBoundingClientRect().width + // the cell padding+border\n    contentWidthEl.getBoundingClientRect().width\n}\n","import { Duration } from './duration'\n\nexport type DateMarker = Date\n\nexport const DAY_IDS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']\n\n// Adding\n\nexport function addWeeks(m: DateMarker, n: number) {\n  let a = dateToUtcArray(m)\n  a[2] += n * 7\n  return arrayToUtcDate(a)\n}\n\nexport function addDays(m: DateMarker, n: number) {\n  let a = dateToUtcArray(m)\n  a[2] += n\n  return arrayToUtcDate(a)\n}\n\nexport function addMs(m: DateMarker, n: number) {\n  let a = dateToUtcArray(m)\n  a[6] += n\n  return arrayToUtcDate(a)\n}\n\n// Diffing (all return floats)\n// TODO: why not use ranges?\n\nexport function diffWeeks(m0, m1) {\n  return diffDays(m0, m1) / 7\n}\n\nexport function diffDays(m0, m1) {\n  return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60 * 24)\n}\n\nexport function diffHours(m0, m1) {\n  return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60)\n}\n\nexport function diffMinutes(m0, m1) {\n  return (m1.valueOf() - m0.valueOf()) / (1000 * 60)\n}\n\nexport function diffSeconds(m0, m1) {\n  return (m1.valueOf() - m0.valueOf()) / 1000\n}\n\nexport function diffDayAndTime(m0: DateMarker, m1: DateMarker): Duration {\n  let m0day = startOfDay(m0)\n  let m1day = startOfDay(m1)\n\n  return {\n    years: 0,\n    months: 0,\n    days: Math.round(diffDays(m0day, m1day)),\n    milliseconds: (m1.valueOf() - m1day.valueOf()) - (m0.valueOf() - m0day.valueOf()),\n  }\n}\n\n// Diffing Whole Units\n\nexport function diffWholeWeeks(m0: DateMarker, m1: DateMarker): number {\n  let d = diffWholeDays(m0, m1)\n\n  if (d !== null && d % 7 === 0) {\n    return d / 7\n  }\n\n  return null\n}\n\nexport function diffWholeDays(m0: DateMarker, m1: DateMarker): number {\n  if (timeAsMs(m0) === timeAsMs(m1)) {\n    return Math.round(diffDays(m0, m1))\n  }\n  return null\n}\n\n// Start-Of\n\nexport function startOfDay(m: DateMarker): DateMarker {\n  return arrayToUtcDate([\n    m.getUTCFullYear(),\n    m.getUTCMonth(),\n    m.getUTCDate(),\n  ])\n}\n\nexport function startOfHour(m: DateMarker) {\n  return arrayToUtcDate([\n    m.getUTCFullYear(),\n    m.getUTCMonth(),\n    m.getUTCDate(),\n    m.getUTCHours(),\n  ])\n}\n\nexport function startOfMinute(m: DateMarker) {\n  return arrayToUtcDate([\n    m.getUTCFullYear(),\n    m.getUTCMonth(),\n    m.getUTCDate(),\n    m.getUTCHours(),\n    m.getUTCMinutes(),\n  ])\n}\n\nexport function startOfSecond(m: DateMarker) {\n  return arrayToUtcDate([\n    m.getUTCFullYear(),\n    m.getUTCMonth(),\n    m.getUTCDate(),\n    m.getUTCHours(),\n    m.getUTCMinutes(),\n    m.getUTCSeconds(),\n  ])\n}\n\n// Week Computation\n\nexport function weekOfYear(marker, dow, doy) {\n  let y = marker.getUTCFullYear()\n  let w = weekOfGivenYear(marker, y, dow, doy)\n\n  if (w < 1) {\n    return weekOfGivenYear(marker, y - 1, dow, doy)\n  }\n\n  let nextW = weekOfGivenYear(marker, y + 1, dow, doy)\n  if (nextW >= 1) {\n    return Math.min(w, nextW)\n  }\n\n  return w\n}\n\nfunction weekOfGivenYear(marker, year, dow, doy) {\n  let firstWeekStart = arrayToUtcDate([year, 0, 1 + firstWeekOffset(year, dow, doy)])\n  let dayStart = startOfDay(marker)\n  let days = Math.round(diffDays(firstWeekStart, dayStart))\n\n  return Math.floor(days / 7) + 1 // zero-indexed\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n  // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n  let fwd = 7 + dow - doy\n\n  // first-week day local weekday -- which local weekday is fwd\n  let fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7\n\n  return -fwdlw + fwd - 1\n}\n\n// Array Conversion\n\nexport function dateToLocalArray(date) {\n  return [\n    date.getFullYear(),\n    date.getMonth(),\n    date.getDate(),\n    date.getHours(),\n    date.getMinutes(),\n    date.getSeconds(),\n    date.getMilliseconds(),\n  ]\n}\n\nexport function arrayToLocalDate(a) {\n  return new Date(\n    a[0],\n    a[1] || 0,\n    a[2] == null ? 1 : a[2], // day of month\n    a[3] || 0,\n    a[4] || 0,\n    a[5] || 0,\n  )\n}\n\nexport function dateToUtcArray(date) {\n  return [\n    date.getUTCFullYear(),\n    date.getUTCMonth(),\n    date.getUTCDate(),\n    date.getUTCHours(),\n    date.getUTCMinutes(),\n    date.getUTCSeconds(),\n    date.getUTCMilliseconds(),\n  ]\n}\n\nexport function arrayToUtcDate(a) {\n  // according to web standards (and Safari), a month index is required.\n  // massage if only given a year.\n  if (a.length === 1) {\n    a = a.concat([0])\n  }\n\n  return new Date(Date.UTC(...(a as [any, any])))\n}\n\n// Other Utils\n\nexport function isValidDate(m: DateMarker) {\n  return !isNaN(m.valueOf())\n}\n\nexport function timeAsMs(m: DateMarker) {\n  return m.getUTCHours() * 1000 * 60 * 60 +\n    m.getUTCMinutes() * 1000 * 60 +\n    m.getUTCSeconds() * 1000 +\n    m.getUTCMilliseconds()\n}\n","import { DateRange } from '../datelib/date-range'\nimport { guid } from '../util/misc'\n\nexport interface EventInstance {\n  instanceId: string\n  defId: string\n  range: DateRange\n  forcedStartTzo: number | null\n  forcedEndTzo: number | null\n}\n\nexport type EventInstanceHash = { [instanceId: string]: EventInstance }\n\nexport function createEventInstance(\n  defId: string,\n  range: DateRange,\n  forcedStartTzo?: number,\n  forcedEndTzo?: number,\n): EventInstance {\n  return {\n    instanceId: guid(),\n    defId,\n    range,\n    forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo,\n    forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo,\n  }\n}\n","const { hasOwnProperty } = Object.prototype\n\n// Merges an array of objects into a single object.\n// The second argument allows for an array of property names who's object values will be merged together.\nexport function mergeProps(propObjs, complexPropsMap?): any {\n  let dest = {}\n\n  if (complexPropsMap) {\n    for (let name in complexPropsMap) {\n      let complexObjs = []\n\n      // collect the trailing object values, stopping when a non-object is discovered\n      for (let i = propObjs.length - 1; i >= 0; i -= 1) {\n        let val = propObjs[i][name]\n\n        if (typeof val === 'object' && val) { // non-null object\n          complexObjs.unshift(val)\n        } else if (val !== undefined) {\n          dest[name] = val // if there were no objects, this value will be used\n          break\n        }\n      }\n\n      // if the trailing values were objects, use the merged value\n      if (complexObjs.length) {\n        dest[name] = mergeProps(complexObjs)\n      }\n    }\n  }\n\n  // copy values into the destination, going from last to first\n  for (let i = propObjs.length - 1; i >= 0; i -= 1) {\n    let props = propObjs[i]\n\n    for (let name in props) {\n      if (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign\n        dest[name] = props[name]\n      }\n    }\n  }\n\n  return dest\n}\n\nexport function filterHash(hash, func) {\n  let filtered = {}\n\n  for (let key in hash) {\n    if (func(hash[key], key)) {\n      filtered[key] = hash[key]\n    }\n  }\n\n  return filtered\n}\n\nexport function mapHash<InputItem, OutputItem>(\n  hash: { [key: string]: InputItem },\n  func: (input: InputItem, key: string) => OutputItem,\n): { [key: string]: OutputItem } {\n  let newHash = {}\n\n  for (let key in hash) {\n    newHash[key] = func(hash[key], key)\n  }\n\n  return newHash\n}\n\nexport function arrayToHash(a): { [key: string]: true } { // TODO: rename to strinArrayToHash or something\n  let hash = {}\n\n  for (let item of a) {\n    hash[item] = true\n  }\n\n  return hash\n}\n\nexport function buildHashFromArray<Item, ItemRes>(a: Item[], func: (item: Item, index: number) => [ string, ItemRes ]) {\n  let hash: { [key: string]: ItemRes } = {}\n\n  for (let i = 0; i < a.length; i += 1) {\n    let tuple = func(a[i], i)\n\n    hash[tuple[0]] = tuple[1]\n  }\n\n  return hash\n}\n\nexport function hashValuesToArray(obj) { // can't use Object.values yet because of no IE support\n  let a = []\n\n  for (let key in obj) {\n    a.push(obj[key])\n  }\n\n  return a\n}\n\nexport function isPropsEqual(obj0, obj1) { // TODO: merge with compareObjs\n  if (obj0 === obj1) {\n    return true\n  }\n\n  for (let key in obj0) {\n    if (hasOwnProperty.call(obj0, key)) {\n      if (!(key in obj1)) {\n        return false\n      }\n    }\n  }\n\n  for (let key in obj1) {\n    if (hasOwnProperty.call(obj1, key)) {\n      if (obj0[key] !== obj1[key]) {\n        return false\n      }\n    }\n  }\n\n  return true\n}\n\nexport function getUnequalProps(obj0, obj1) {\n  let keys: string[] = []\n\n  for (let key in obj0) {\n    if (hasOwnProperty.call(obj0, key)) {\n      if (!(key in obj1)) {\n        keys.push(key)\n      }\n    }\n  }\n\n  for (let key in obj1) {\n    if (hasOwnProperty.call(obj1, key)) {\n      if (obj0[key] !== obj1[key]) {\n        keys.push(key)\n      }\n    }\n  }\n\n  return keys\n}\n\nexport type EqualityFunc<T> = (a: T, b: T) => boolean\nexport type EqualityThing<T> = EqualityFunc<T> | true\n\nexport type EqualityFuncs<ObjType> = { // not really just a \"func\" anymore\n  [K in keyof ObjType]?: EqualityThing<ObjType[K]>\n}\n\nexport function compareObjs(oldProps, newProps, equalityFuncs: EqualityFuncs<any> = {}) {\n  if (oldProps === newProps) {\n    return true\n  }\n\n  for (let key in newProps) {\n    if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) {\n      // equal\n    } else {\n      return false\n    }\n  }\n\n  // check for props that were omitted in the new\n  for (let key in oldProps) {\n    if (!(key in newProps)) {\n      return false\n    }\n  }\n\n  return true\n}\n\n/*\nassumed \"true\" equality for handler names like \"onReceiveSomething\"\n*/\nfunction isObjValsEqual<T>(val0: T, val1: T, comparator: EqualityThing<T>) {\n  if (val0 === val1 || comparator === true) {\n    return true\n  }\n  if (comparator) {\n    return comparator(val0, val1)\n  }\n  return false\n}\n\nexport function collectFromHash<Item>(\n  hash: { [key: string]: Item },\n  startIndex = 0,\n  endIndex?: number,\n  step = 1,\n) {\n  let res: Item[] = []\n\n  if (endIndex == null) {\n    endIndex = Object.keys(hash).length\n  }\n\n  for (let i = startIndex; i < endIndex; i += step) {\n    let val = hash[i]\n\n    if (val !== undefined) { // will disregard undefined for sparse arrays\n      res.push(val)\n    }\n  }\n\n  return res\n}\n","import { EventDef } from './event-def'\nimport { EventInstance, createEventInstance } from './event-instance'\nimport { DateRange } from '../datelib/date-range'\nimport { DateEnv } from '../datelib/env'\nimport { Duration } from '../datelib/duration'\nimport { DateMarker, startOfDay } from '../datelib/marker'\nimport { EventStore } from './event-store'\nimport { CalendarContext } from '../CalendarContext'\nimport { filterHash } from '../util/object'\nimport { EventRefined } from './event-parse'\n\n/*\nThe plugin system for defining how a recurring event is expanded into individual instances.\n*/\n\nexport interface ParsedRecurring<RecurringData> {\n  typeData: RecurringData\n  allDayGuess: boolean | null\n  duration: Duration | null // signals hasEnd\n}\n\nexport interface RecurringType<RecurringData> {\n  parse: (refined: EventRefined, dateEnv: DateEnv) => ParsedRecurring<RecurringData> | null // TODO: rename to post-process or something\n  expand: (typeData: any, framingRange: DateRange, dateEnv: DateEnv) => DateMarker[]\n}\n\nexport function parseRecurring(\n  refined: EventRefined,\n  defaultAllDay: boolean | null,\n  dateEnv: DateEnv,\n  recurringTypes: RecurringType<any>[],\n) {\n  for (let i = 0; i < recurringTypes.length; i += 1) {\n    let parsed = recurringTypes[i].parse(refined, dateEnv)\n\n    if (parsed) {\n      let { allDay } = refined\n      if (allDay == null) {\n        allDay = defaultAllDay\n        if (allDay == null) {\n          allDay = parsed.allDayGuess\n          if (allDay == null) {\n            allDay = false\n          }\n        }\n      }\n\n      return {\n        allDay,\n        duration: parsed.duration,\n        typeData: parsed.typeData,\n        typeId: i,\n      }\n    }\n  }\n\n  return null\n}\n\nexport function expandRecurring(eventStore: EventStore, framingRange: DateRange, context: CalendarContext): EventStore {\n  let { dateEnv, pluginHooks, options } = context\n  let { defs, instances } = eventStore\n\n  // remove existing recurring instances\n  // TODO: bad. always expand events as a second step\n  instances = filterHash(instances, (instance: EventInstance) => !defs[instance.defId].recurringDef)\n\n  for (let defId in defs) {\n    let def = defs[defId]\n\n    if (def.recurringDef) {\n      let { duration } = def.recurringDef\n\n      if (!duration) {\n        duration = def.allDay ?\n          options.defaultAllDayEventDuration :\n          options.defaultTimedEventDuration\n      }\n\n      let starts = expandRecurringRanges(def, duration, framingRange, dateEnv, pluginHooks.recurringTypes)\n\n      for (let start of starts) {\n        let instance = createEventInstance(defId, {\n          start,\n          end: dateEnv.add(start, duration),\n        })\n        instances[instance.instanceId] = instance\n      }\n    }\n  }\n\n  return { defs, instances }\n}\n\n/*\nEvent MUST have a recurringDef\n*/\nfunction expandRecurringRanges(\n  eventDef: EventDef,\n  duration: Duration,\n  framingRange: DateRange,\n  dateEnv: DateEnv,\n  recurringTypes: RecurringType<any>[],\n): DateMarker[] {\n  let typeDef = recurringTypes[eventDef.recurringDef.typeId]\n  let markers = typeDef.expand(\n    eventDef.recurringDef.typeData,\n    {\n      start: dateEnv.subtract(framingRange.start, duration), // for when event starts before framing range and goes into\n      end: framingRange.end,\n    },\n    dateEnv,\n  )\n\n  // the recurrence plugins don't guarantee that all-day events are start-of-day, so we have to\n  if (eventDef.allDay) {\n    markers = markers.map(startOfDay)\n  }\n\n  return markers\n}\n","import { isInt } from '../util/misc'\n\nexport type DurationInput = DurationObjectInput | string | number\n\nexport interface DurationObjectInput {\n  years?: number\n  year?: number\n  months?: number\n  month?: number\n  weeks?: number\n  week?: number\n  days?: number\n  day?: number\n  hours?: number\n  hour?: number\n  minutes?: number\n  minute?: number\n  seconds?: number\n  second?: number\n  milliseconds?: number\n  millisecond?: number\n  ms?: number\n}\n\nexport interface Duration {\n  years: number\n  months: number\n  days: number\n  milliseconds: number\n  specifiedWeeks?: boolean\n}\n\nconst INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds']\nconst PARSE_RE = /^(-?)(?:(\\d+)\\.)?(\\d+):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?/\n\n// Parsing and Creation\n\nexport function createDuration(input: DurationInput, unit?: string): Duration | null {\n  if (typeof input === 'string') {\n    return parseString(input)\n  }\n\n  if (typeof input === 'object' && input) { // non-null object\n    return parseObject(input)\n  }\n\n  if (typeof input === 'number') {\n    return parseObject({ [unit || 'milliseconds']: input })\n  }\n  return null\n}\n\nfunction parseString(s: string): Duration {\n  let m = PARSE_RE.exec(s)\n  if (m) {\n    let sign = m[1] ? -1 : 1\n    return {\n      years: 0,\n      months: 0,\n      days: sign * (m[2] ? parseInt(m[2], 10) : 0),\n      milliseconds: sign * (\n        (m[3] ? parseInt(m[3], 10) : 0) * 60 * 60 * 1000 + // hours\n        (m[4] ? parseInt(m[4], 10) : 0) * 60 * 1000 + // minutes\n        (m[5] ? parseInt(m[5], 10) : 0) * 1000 + // seconds\n        (m[6] ? parseInt(m[6], 10) : 0) // ms\n      ),\n    }\n  }\n  return null\n}\n\nfunction parseObject(obj: DurationObjectInput): Duration {\n  let duration: Duration = {\n    years: obj.years || obj.year || 0,\n    months: obj.months || obj.month || 0,\n    days: obj.days || obj.day || 0,\n    milliseconds:\n      (obj.hours || obj.hour || 0) * 60 * 60 * 1000 + // hours\n      (obj.minutes || obj.minute || 0) * 60 * 1000 + // minutes\n      (obj.seconds || obj.second || 0) * 1000 + // seconds\n      (obj.milliseconds || obj.millisecond || obj.ms || 0), // ms\n  }\n\n  let weeks = obj.weeks || obj.week\n  if (weeks) {\n    duration.days += weeks * 7\n    duration.specifiedWeeks = true\n  }\n\n  return duration\n}\n\n// Equality\n\nexport function durationsEqual(d0: Duration, d1: Duration): boolean {\n  return d0.years === d1.years &&\n    d0.months === d1.months &&\n    d0.days === d1.days &&\n    d0.milliseconds === d1.milliseconds\n}\n\nexport function asCleanDays(dur: Duration) {\n  if (!dur.years && !dur.months && !dur.milliseconds) {\n    return dur.days\n  }\n  return 0\n}\n\n// Simple Math\n\nexport function addDurations(d0: Duration, d1: Duration) {\n  return {\n    years: d0.years + d1.years,\n    months: d0.months + d1.months,\n    days: d0.days + d1.days,\n    milliseconds: d0.milliseconds + d1.milliseconds,\n  }\n}\n\nexport function subtractDurations(d1: Duration, d0: Duration): Duration {\n  return {\n    years: d1.years - d0.years,\n    months: d1.months - d0.months,\n    days: d1.days - d0.days,\n    milliseconds: d1.milliseconds - d0.milliseconds,\n  }\n}\n\nexport function multiplyDuration(d: Duration, n: number) {\n  return {\n    years: d.years * n,\n    months: d.months * n,\n    days: d.days * n,\n    milliseconds: d.milliseconds * n,\n  }\n}\n\n// Conversions\n// \"Rough\" because they are based on average-case Gregorian months/years\n\nexport function asRoughYears(dur: Duration) {\n  return asRoughDays(dur) / 365\n}\n\nexport function asRoughMonths(dur: Duration) {\n  return asRoughDays(dur) / 30\n}\n\nexport function asRoughDays(dur: Duration) {\n  return asRoughMs(dur) / 864e5\n}\n\nexport function asRoughHours(dur: Duration) {\n  return asRoughMs(dur) / (1000 * 60 * 60)\n}\n\nexport function asRoughMinutes(dur: Duration) {\n  return asRoughMs(dur) / (1000 * 60)\n}\n\nexport function asRoughSeconds(dur: Duration) {\n  return asRoughMs(dur) / 1000\n}\n\nexport function asRoughMs(dur: Duration) {\n  return dur.years * (365 * 864e5) +\n    dur.months * (30 * 864e5) +\n    dur.days * 864e5 +\n    dur.milliseconds\n}\n\n// Advanced Math\n\nexport function wholeDivideDurations(numerator: Duration, denominator: Duration): number {\n  let res = null\n\n  for (let i = 0; i < INTERNAL_UNITS.length; i += 1) {\n    let unit = INTERNAL_UNITS[i]\n\n    if (denominator[unit]) {\n      let localRes = numerator[unit] / denominator[unit]\n\n      if (!isInt(localRes) || (res !== null && res !== localRes)) {\n        return null\n      }\n\n      res = localRes\n    } else if (numerator[unit]) {\n      // needs to divide by something but can't!\n      return null\n    }\n  }\n\n  return res\n}\n\nexport function greatestDurationDenominator(dur: Duration) {\n  let ms = dur.milliseconds\n  if (ms) {\n    if (ms % 1000 !== 0) {\n      return { unit: 'millisecond', value: ms }\n    }\n    if (ms % (1000 * 60) !== 0) {\n      return { unit: 'second', value: ms / 1000 }\n    }\n    if (ms % (1000 * 60 * 60) !== 0) {\n      return { unit: 'minute', value: ms / (1000 * 60) }\n    }\n    if (ms) {\n      return { unit: 'hour', value: ms / (1000 * 60 * 60) }\n    }\n  }\n  if (dur.days) {\n    if (dur.specifiedWeeks && dur.days % 7 === 0) {\n      return { unit: 'week', value: dur.days / 7 }\n    }\n    return { unit: 'day', value: dur.days }\n  }\n  if (dur.months) {\n    return { unit: 'month', value: dur.months }\n  }\n  if (dur.years) {\n    return { unit: 'year', value: dur.years }\n  }\n  return { unit: 'millisecond', value: 0 }\n}\n","import { DateMarker } from './marker'\nimport { padStart } from '../util/misc'\n\n// timeZoneOffset is in minutes\nexport function buildIsoString(marker: DateMarker, timeZoneOffset?: number, stripZeroTime: boolean = false) {\n  let s = marker.toISOString()\n\n  s = s.replace('.000', '')\n\n  if (stripZeroTime) {\n    s = s.replace('T00:00:00Z', '')\n  }\n\n  if (s.length > 10) { // time part wasn't stripped, can add timezone info\n    if (timeZoneOffset == null) {\n      s = s.replace('Z', '')\n    } else if (timeZoneOffset !== 0) {\n      s = s.replace('Z', formatTimeZoneOffset(timeZoneOffset, true))\n    }\n    // otherwise, its UTC-0 and we want to keep the Z\n  }\n\n  return s\n}\n\n// formats the date, but with no time part\n// TODO: somehow merge with buildIsoString and stripZeroTime\n// TODO: rename. omit \"string\"\nexport function formatDayString(marker: DateMarker) {\n  return marker.toISOString().replace(/T.*$/, '')\n}\n\n// TODO: use Date::toISOString and use everything after the T?\nexport function formatIsoTimeString(marker: DateMarker) {\n  return padStart(marker.getUTCHours(), 2) + ':' +\n    padStart(marker.getUTCMinutes(), 2) + ':' +\n    padStart(marker.getUTCSeconds(), 2)\n}\n\nexport function formatTimeZoneOffset(minutes: number, doIso = false) {\n  let sign = minutes < 0 ? '-' : '+'\n  let abs = Math.abs(minutes)\n  let hours = Math.floor(abs / 60)\n  let mins = Math.round(abs % 60)\n\n  if (doIso) {\n    return `${sign + padStart(hours, 2)}:${padStart(mins, 2)}`\n  }\n  return `GMT${sign}${hours}${mins ? `:${padStart(mins, 2)}` : ''}`\n}\n","// TODO: new util arrayify?\n// Array.prototype.slice.call(\n\nexport function removeMatching(array, testFunc) {\n  let removeCnt = 0\n  let i = 0\n\n  while (i < array.length) {\n    if (testFunc(array[i])) { // truthy value means *remove*\n      array.splice(i, 1)\n      removeCnt += 1\n    } else {\n      i += 1\n    }\n  }\n\n  return removeCnt\n}\n\nexport function removeExact(array, exactVal) {\n  let removeCnt = 0\n  let i = 0\n\n  while (i < array.length) {\n    if (array[i] === exactVal) {\n      array.splice(i, 1)\n      removeCnt += 1\n    } else {\n      i += 1\n    }\n  }\n\n  return removeCnt\n}\n\nexport function isArraysEqual(a0, a1, equalityFunc?: (v0, v1) => boolean) { // TODO: better typing\n  if (a0 === a1) {\n    return true\n  }\n\n  let len = a0.length\n  let i\n\n  if (len !== a1.length) { // not array? or not same length?\n    return false\n  }\n\n  for (i = 0; i < len; i += 1) {\n    if (!(equalityFunc ? equalityFunc(a0[i], a1[i]) : a0[i] === a1[i])) {\n      return false\n    }\n  }\n\n  return true\n}\n","import { isArraysEqual } from './array'\nimport { isPropsEqual } from './object'\nimport { Dictionary } from '../options'\n\nexport function memoize<Args extends any[], Res>(\n  workerFunc: (...args: Args) => Res,\n  resEquality?: (res0: Res, res1: Res) => boolean,\n  teardownFunc?: (res: Res) => void,\n): (...args: Args) => Res {\n  let currentArgs: Args | undefined\n  let currentRes: Res | undefined\n\n  return function (...newArgs: Args) { // eslint-disable-line func-names\n    if (!currentArgs) {\n      currentRes = workerFunc.apply(this, newArgs)\n    } else if (!isArraysEqual(currentArgs, newArgs)) {\n      if (teardownFunc) {\n        teardownFunc(currentRes)\n      }\n\n      let res = workerFunc.apply(this, newArgs)\n\n      if (!resEquality || !resEquality(res, currentRes)) {\n        currentRes = res\n      }\n    }\n\n    currentArgs = newArgs\n\n    return currentRes\n  }\n}\n\nexport function memoizeObjArg<Arg extends Dictionary, Res>(\n  workerFunc: (arg: Arg) => Res,\n  resEquality?: (res0: Res, res1: Res) => boolean,\n  teardownFunc?: (res: Res) => void,\n): (arg: Arg) => Res {\n  let currentArg: Arg | undefined\n  let currentRes: Res | undefined\n\n  return (newArg: Arg) => {\n    if (!currentArg) {\n      currentRes = workerFunc.call(this, newArg)\n    } else if (!isPropsEqual(currentArg, newArg)) {\n      if (teardownFunc) {\n        teardownFunc(currentRes)\n      }\n\n      let res = workerFunc.call(this, newArg)\n\n      if (!resEquality || !resEquality(res, currentRes)) {\n        currentRes = res\n      }\n    }\n\n    currentArg = newArg\n\n    return currentRes\n  }\n}\n\nexport type MemoiseArrayFunc<Args extends any[], Res> =\n  (argSets: Args[]) => Res[]\n\nexport function memoizeArraylike<Args extends any[], Res>( // used at all?\n  workerFunc: (...args: Args) => Res,\n  resEquality?: (res0: Res, res1: Res) => boolean,\n  teardownFunc?: (res: Res) => void,\n): MemoiseArrayFunc<Args, Res> {\n  let currentArgSets: Args[] = []\n  let currentResults: Res[] = []\n\n  return (newArgSets: Args[]) => {\n    let currentLen = currentArgSets.length\n    let newLen = newArgSets.length\n    let i = 0\n\n    for (; i < currentLen; i += 1) {\n      if (!newArgSets[i]) { // one of the old sets no longer exists\n        if (teardownFunc) {\n          teardownFunc(currentResults[i])\n        }\n      } else if (!isArraysEqual(currentArgSets[i], newArgSets[i])) {\n        if (teardownFunc) {\n          teardownFunc(currentResults[i])\n        }\n\n        let res = workerFunc.apply(this, newArgSets[i])\n\n        if (!resEquality || !resEquality(res, currentResults[i])) {\n          currentResults[i] = res\n        }\n      }\n    }\n\n    for (; i < newLen; i += 1) {\n      currentResults[i] = workerFunc.apply(this, newArgSets[i])\n    }\n\n    currentArgSets = newArgSets\n    currentResults.splice(newLen) // remove excess\n\n    return currentResults\n  }\n}\n\nexport type MemoizeHashFunc<Args extends any[], Res> =\n  (argHash: { [key: string]: Args }) => { [key: string]: Res }\n\nexport function memoizeHashlike<Args extends any[], Res>(\n  workerFunc: (...args: Args) => Res,\n  resEquality?: (res0: Res, res1: Res) => boolean,\n  teardownFunc?: (res: Res) => void, // TODO: change arg order\n): MemoizeHashFunc<Args, Res> {\n  let currentArgHash: { [key: string]: Args } = {}\n  let currentResHash: { [key: string]: Res } = {}\n\n  return (newArgHash: { [key: string]: Args }) => {\n    let newResHash: { [key: string]: Res } = {}\n\n    for (let key in newArgHash) {\n      if (!currentResHash[key]) {\n        newResHash[key] = workerFunc.apply(this, newArgHash[key])\n      } else if (!isArraysEqual(currentArgHash[key], newArgHash[key])) {\n        if (teardownFunc) {\n          teardownFunc(currentResHash[key])\n        }\n\n        let res = workerFunc.apply(this, newArgHash[key])\n\n        newResHash[key] = (resEquality && resEquality(res, currentResHash[key]))\n          ? currentResHash[key]\n          : res\n      } else {\n        newResHash[key] = currentResHash[key]\n      }\n    }\n\n    currentArgHash = newArgHash\n    currentResHash = newResHash\n\n    return newResHash\n  }\n}\n","import { DateMarker, timeAsMs } from './marker'\nimport { CalendarSystem } from './calendar-system'\nimport { Locale } from './locale'\nimport { DateFormatter, DateFormattingContext } from './DateFormatter'\nimport { ZonedMarker } from './zoned-marker'\nimport { formatTimeZoneOffset } from './formatting-utils'\nimport { memoize } from '../util/memoize'\n\nconst EXTENDED_SETTINGS_AND_SEVERITIES = {\n  week: 3,\n  separator: 0, // 0 = not applicable\n  omitZeroMinute: 0,\n  meridiem: 0, // like am/pm\n  omitCommas: 0,\n}\n\nconst STANDARD_DATE_PROP_SEVERITIES = {\n  timeZoneName: 7,\n  era: 6,\n  year: 5,\n  month: 4,\n  day: 2,\n  weekday: 2,\n  hour: 1,\n  minute: 1,\n  second: 1,\n}\n\nconst MERIDIEM_RE = /\\s*([ap])\\.?m\\.?/i // eats up leading spaces too\nconst COMMA_RE = /,/g // we need re for globalness\nconst MULTI_SPACE_RE = /\\s+/g\nconst LTR_RE = /\\u200e/g // control character\nconst UTC_RE = /UTC|GMT/\n\nexport interface NativeFormatterOptions extends Intl.DateTimeFormatOptions {\n  week?: 'long' | 'short' | 'narrow' | 'numeric'\n  meridiem?: 'lowercase' | 'short' | 'narrow' | boolean\n  omitZeroMinute?: boolean\n  omitCommas?: boolean\n  separator?: string\n}\n\nexport class NativeFormatter implements DateFormatter {\n  standardDateProps: any\n  extendedSettings: any\n  severity: number\n  private buildFormattingFunc: typeof buildFormattingFunc // caching for efficiency with same date env\n\n  constructor(formatSettings: NativeFormatterOptions) {\n    let standardDateProps: any = {}\n    let extendedSettings: any = {}\n    let severity = 0\n\n    for (let name in formatSettings) {\n      if (name in EXTENDED_SETTINGS_AND_SEVERITIES) {\n        extendedSettings[name] = formatSettings[name]\n        severity = Math.max(EXTENDED_SETTINGS_AND_SEVERITIES[name], severity)\n      } else {\n        standardDateProps[name] = formatSettings[name]\n\n        if (name in STANDARD_DATE_PROP_SEVERITIES) { // TODO: what about hour12? no severity\n          severity = Math.max(STANDARD_DATE_PROP_SEVERITIES[name], severity)\n        }\n      }\n    }\n\n    this.standardDateProps = standardDateProps\n    this.extendedSettings = extendedSettings\n    this.severity = severity\n\n    this.buildFormattingFunc = memoize(buildFormattingFunc)\n  }\n\n  format(date: ZonedMarker, context: DateFormattingContext) {\n    return this.buildFormattingFunc(this.standardDateProps, this.extendedSettings, context)(date)\n  }\n\n  formatRange(start: ZonedMarker, end: ZonedMarker, context: DateFormattingContext, betterDefaultSeparator?: string) {\n    let { standardDateProps, extendedSettings } = this\n\n    let diffSeverity = computeMarkerDiffSeverity(start.marker, end.marker, context.calendarSystem)\n    if (!diffSeverity) {\n      return this.format(start, context)\n    }\n\n    let biggestUnitForPartial = diffSeverity\n    if (\n      biggestUnitForPartial > 1 && // the two dates are different in a way that's larger scale than time\n      (standardDateProps.year === 'numeric' || standardDateProps.year === '2-digit') &&\n      (standardDateProps.month === 'numeric' || standardDateProps.month === '2-digit') &&\n      (standardDateProps.day === 'numeric' || standardDateProps.day === '2-digit')\n    ) {\n      biggestUnitForPartial = 1 // make it look like the dates are only different in terms of time\n    }\n\n    let full0 = this.format(start, context)\n    let full1 = this.format(end, context)\n\n    if (full0 === full1) {\n      return full0\n    }\n\n    let partialDateProps = computePartialFormattingOptions(standardDateProps, biggestUnitForPartial)\n    let partialFormattingFunc = buildFormattingFunc(partialDateProps, extendedSettings, context)\n    let partial0 = partialFormattingFunc(start)\n    let partial1 = partialFormattingFunc(end)\n\n    let insertion = findCommonInsertion(full0, partial0, full1, partial1)\n    let separator = extendedSettings.separator || betterDefaultSeparator || context.defaultSeparator || ''\n\n    if (insertion) {\n      return insertion.before + partial0 + separator + partial1 + insertion.after\n    }\n\n    return full0 + separator + full1\n  }\n\n  getLargestUnit() {\n    switch (this.severity) {\n      case 7:\n      case 6:\n      case 5:\n        return 'year'\n      case 4:\n        return 'month'\n      case 3:\n        return 'week'\n      case 2:\n        return 'day'\n      default:\n        return 'time' // really?\n    }\n  }\n}\n\nfunction buildFormattingFunc(\n  standardDateProps,\n  extendedSettings,\n  context: DateFormattingContext,\n): (date: ZonedMarker) => string {\n  let standardDatePropCnt = Object.keys(standardDateProps).length\n\n  if (standardDatePropCnt === 1 && standardDateProps.timeZoneName === 'short') {\n    return (date: ZonedMarker) => (\n      formatTimeZoneOffset(date.timeZoneOffset)\n    )\n  }\n\n  if (standardDatePropCnt === 0 && extendedSettings.week) {\n    return (date: ZonedMarker) => (\n      formatWeekNumber(\n        context.computeWeekNumber(date.marker),\n        context.weekText,\n        context.weekTextLong,\n        context.locale,\n        extendedSettings.week,\n      )\n    )\n  }\n\n  return buildNativeFormattingFunc(standardDateProps, extendedSettings, context)\n}\n\nfunction buildNativeFormattingFunc(\n  standardDateProps,\n  extendedSettings,\n  context: DateFormattingContext,\n): (date: ZonedMarker) => string {\n  standardDateProps = { ...standardDateProps } // copy\n  extendedSettings = { ...extendedSettings } // copy\n\n  sanitizeSettings(standardDateProps, extendedSettings)\n\n  standardDateProps.timeZone = 'UTC' // we leverage the only guaranteed timeZone for our UTC markers\n\n  let normalFormat = new Intl.DateTimeFormat(context.locale.codes, standardDateProps)\n  let zeroFormat // needed?\n\n  if (extendedSettings.omitZeroMinute) {\n    let zeroProps = { ...standardDateProps }\n    delete zeroProps.minute // seconds and ms were already considered in sanitizeSettings\n    zeroFormat = new Intl.DateTimeFormat(context.locale.codes, zeroProps)\n  }\n\n  return (date: ZonedMarker) => {\n    let { marker } = date\n    let format\n\n    if (zeroFormat && !marker.getUTCMinutes()) {\n      format = zeroFormat\n    } else {\n      format = normalFormat\n    }\n\n    let s = format.format(marker)\n\n    return postProcess(s, date, standardDateProps, extendedSettings, context)\n  }\n}\n\nfunction sanitizeSettings(standardDateProps, extendedSettings) {\n  // deal with a browser inconsistency where formatting the timezone\n  // requires that the hour/minute be present.\n  if (standardDateProps.timeZoneName) {\n    if (!standardDateProps.hour) {\n      standardDateProps.hour = '2-digit'\n    }\n    if (!standardDateProps.minute) {\n      standardDateProps.minute = '2-digit'\n    }\n  }\n\n  // only support short timezone names\n  if (standardDateProps.timeZoneName === 'long') {\n    standardDateProps.timeZoneName = 'short'\n  }\n\n  // if requesting to display seconds, MUST display minutes\n  if (extendedSettings.omitZeroMinute && (standardDateProps.second || standardDateProps.millisecond)) {\n    delete extendedSettings.omitZeroMinute\n  }\n}\n\nfunction postProcess(s: string, date: ZonedMarker, standardDateProps, extendedSettings, context: DateFormattingContext): string {\n  s = s.replace(LTR_RE, '') // remove left-to-right control chars. do first. good for other regexes\n\n  if (standardDateProps.timeZoneName === 'short') {\n    s = injectTzoStr(\n      s,\n      (context.timeZone === 'UTC' || date.timeZoneOffset == null) ?\n        'UTC' : // important to normalize for IE, which does \"GMT\"\n        formatTimeZoneOffset(date.timeZoneOffset),\n    )\n  }\n\n  if (extendedSettings.omitCommas) {\n    s = s.replace(COMMA_RE, '').trim()\n  }\n\n  if (extendedSettings.omitZeroMinute) {\n    s = s.replace(':00', '') // zeroFormat doesn't always achieve this\n  }\n\n  // ^ do anything that might create adjacent spaces before this point,\n  // because MERIDIEM_RE likes to eat up loading spaces\n\n  if (extendedSettings.meridiem === false) {\n    s = s.replace(MERIDIEM_RE, '').trim()\n  } else if (extendedSettings.meridiem === 'narrow') { // a/p\n    s = s.replace(MERIDIEM_RE, (m0, m1) => m1.toLocaleLowerCase())\n  } else if (extendedSettings.meridiem === 'short') { // am/pm\n    s = s.replace(MERIDIEM_RE, (m0, m1) => `${m1.toLocaleLowerCase()}m`)\n  } else if (extendedSettings.meridiem === 'lowercase') { // other meridiem transformers already converted to lowercase\n    s = s.replace(MERIDIEM_RE, (m0) => m0.toLocaleLowerCase())\n  }\n\n  s = s.replace(MULTI_SPACE_RE, ' ')\n  s = s.trim()\n\n  return s\n}\n\nfunction injectTzoStr(s: string, tzoStr: string): string {\n  let replaced = false\n\n  s = s.replace(UTC_RE, () => {\n    replaced = true\n    return tzoStr\n  })\n\n  // IE11 doesn't include UTC/GMT in the original string, so append to end\n  if (!replaced) {\n    s += ` ${tzoStr}`\n  }\n\n  return s\n}\n\nfunction formatWeekNumber(\n  num: number,\n  weekText: string,\n  weekTextLong: string,\n  locale: Locale,\n  display?: 'numeric' | 'narrow' | 'short' | 'long',\n): string {\n  let parts = []\n\n  if (display === 'long') {\n    parts.push(weekTextLong)\n  } else if (display === 'short' || display === 'narrow') {\n    parts.push(weekText)\n  }\n\n  if (display === 'long' || display === 'short') {\n    parts.push(' ')\n  }\n\n  parts.push(locale.simpleNumberFormat.format(num))\n\n  if (locale.options.direction === 'rtl') { // TODO: use control characters instead?\n    parts.reverse()\n  }\n\n  return parts.join('')\n}\n\n// Range Formatting Utils\n\n// 0 = exactly the same\n// 1 = different by time\n// and bigger\nfunction computeMarkerDiffSeverity(d0: DateMarker, d1: DateMarker, ca: CalendarSystem) {\n  if (ca.getMarkerYear(d0) !== ca.getMarkerYear(d1)) {\n    return 5\n  }\n  if (ca.getMarkerMonth(d0) !== ca.getMarkerMonth(d1)) {\n    return 4\n  }\n  if (ca.getMarkerDay(d0) !== ca.getMarkerDay(d1)) {\n    return 2\n  }\n  if (timeAsMs(d0) !== timeAsMs(d1)) {\n    return 1\n  }\n  return 0\n}\n\nfunction computePartialFormattingOptions(options, biggestUnit) {\n  let partialOptions = {}\n\n  for (let name in options) {\n    if (\n      !(name in STANDARD_DATE_PROP_SEVERITIES) || // not a date part prop (like timeZone)\n      STANDARD_DATE_PROP_SEVERITIES[name] <= biggestUnit\n    ) {\n      partialOptions[name] = options[name]\n    }\n  }\n\n  return partialOptions\n}\n\nfunction findCommonInsertion(full0, partial0, full1, partial1) {\n  let i0 = 0\n  while (i0 < full0.length) {\n    let found0 = full0.indexOf(partial0, i0)\n    if (found0 === -1) {\n      break\n    }\n\n    let before0 = full0.substr(0, found0)\n    i0 = found0 + partial0.length\n    let after0 = full0.substr(i0)\n\n    let i1 = 0\n    while (i1 < full1.length) {\n      let found1 = full1.indexOf(partial1, i1)\n      if (found1 === -1) {\n        break\n      }\n\n      let before1 = full1.substr(0, found1)\n      i1 = found1 + partial1.length\n      let after1 = full1.substr(i1)\n\n      if (before0 === before1 && after0 === after1) {\n        return {\n          before: before0,\n          after: after0,\n        }\n      }\n    }\n  }\n\n  return null\n}\n","import { DateMarker } from './marker'\nimport { CalendarSystem } from './calendar-system'\n\nexport interface ZonedMarker {\n  marker: DateMarker,\n  timeZoneOffset: number\n}\n\nexport interface ExpandedZonedMarker extends ZonedMarker {\n  array: number[],\n  year: number,\n  month: number,\n  day: number,\n  hour: number,\n  minute: number,\n  second: number,\n  millisecond: number\n}\n\nexport function expandZonedMarker(dateInfo: ZonedMarker, calendarSystem: CalendarSystem): ExpandedZonedMarker {\n  let a = calendarSystem.markerToArray(dateInfo.marker)\n\n  return {\n    marker: dateInfo.marker,\n    timeZoneOffset: dateInfo.timeZoneOffset,\n    array: a,\n    year: a[0],\n    month: a[1],\n    day: a[2],\n    hour: a[3],\n    minute: a[4],\n    second: a[5],\n    millisecond: a[6],\n  }\n}\n","import { DateMarker } from './marker'\nimport { CalendarSystem } from './calendar-system'\nimport { Locale } from './locale'\nimport { ZonedMarker, ExpandedZonedMarker, expandZonedMarker } from './zoned-marker'\n\nexport interface VerboseFormattingArg { // TODO: kill this\n  date: ExpandedZonedMarker\n  start: ExpandedZonedMarker\n  end?: ExpandedZonedMarker\n  timeZone: string\n  localeCodes: string[],\n  defaultSeparator: string\n}\n\nexport function createVerboseFormattingArg(\n  start: ZonedMarker,\n  end: ZonedMarker,\n  context: DateFormattingContext,\n  betterDefaultSeparator?: string,\n): VerboseFormattingArg {\n  let startInfo = expandZonedMarker(start, context.calendarSystem)\n  let endInfo = end ? expandZonedMarker(end, context.calendarSystem) : null\n\n  return {\n    date: startInfo,\n    start: startInfo,\n    end: endInfo,\n    timeZone: context.timeZone,\n    localeCodes: context.locale.codes,\n    defaultSeparator: betterDefaultSeparator || context.defaultSeparator,\n  }\n}\n\nexport type CmdFormatterFunc = (cmd: string, arg: VerboseFormattingArg) => string\n\nexport interface DateFormattingContext {\n  timeZone: string,\n  locale: Locale,\n  calendarSystem: CalendarSystem\n  computeWeekNumber: (d: DateMarker) => number\n  weekText: string\n  weekTextLong: string\n  cmdFormatter?: CmdFormatterFunc\n  defaultSeparator: string\n}\n\nexport interface DateFormatter {\n  format(date: ZonedMarker, context: DateFormattingContext): string\n  formatRange(start: ZonedMarker, end: ZonedMarker, context: DateFormattingContext, betterDefaultSeparator?: string): string\n}\n","import { DateFormatter, DateFormattingContext, createVerboseFormattingArg } from './DateFormatter'\nimport { ZonedMarker } from './zoned-marker'\n\n/*\nTODO: fix the terminology of \"formatter\" vs \"formatting func\"\n*/\n\n/*\nAt the time of instantiation, this object does not know which cmd-formatting system it will use.\nIt receives this at the time of formatting, as a setting.\n*/\nexport class CmdFormatter implements DateFormatter {\n  cmdStr: string\n\n  constructor(cmdStr: string) {\n    this.cmdStr = cmdStr\n  }\n\n  format(date: ZonedMarker, context: DateFormattingContext, betterDefaultSeparator?: string) {\n    return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(date, null, context, betterDefaultSeparator))\n  }\n\n  formatRange(start: ZonedMarker, end: ZonedMarker, context: DateFormattingContext, betterDefaultSeparator?: string) {\n    return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(start, end, context, betterDefaultSeparator))\n  }\n}\n","import { DateFormatter, DateFormattingContext, createVerboseFormattingArg, VerboseFormattingArg } from './DateFormatter'\nimport { ZonedMarker } from './zoned-marker'\n\nexport type FuncFormatterFunc = (arg: VerboseFormattingArg) => string\n\nexport class FuncFormatter implements DateFormatter {\n  func: FuncFormatterFunc\n\n  constructor(func: FuncFormatterFunc) {\n    this.func = func\n  }\n\n  format(date: ZonedMarker, context: DateFormattingContext, betterDefaultSeparator?: string) {\n    return this.func(createVerboseFormattingArg(date, null, context, betterDefaultSeparator))\n  }\n\n  formatRange(start: ZonedMarker, end: ZonedMarker, context: DateFormattingContext, betterDefaultSeparator?: string) {\n    return this.func(createVerboseFormattingArg(start, end, context, betterDefaultSeparator))\n  }\n}\n","import { NativeFormatter, NativeFormatterOptions } from './formatting-native'\nimport { CmdFormatter } from './formatting-cmd'\nimport { FuncFormatter, FuncFormatterFunc } from './formatting-func'\nimport { DateFormatter } from './DateFormatter'\n\nexport type FormatterInput = NativeFormatterOptions | string | FuncFormatterFunc\n\nexport function createFormatter(input: FormatterInput): DateFormatter {\n  if (typeof input === 'object' && input) { // non-null object\n    return new NativeFormatter(input)\n  }\n\n  if (typeof input === 'string') {\n    return new CmdFormatter(input)\n  }\n\n  if (typeof input === 'function') {\n    return new FuncFormatter(input as FuncFormatterFunc)\n  }\n\n  return null\n}\n","import { createDuration } from './datelib/duration'\nimport { mergeProps, isPropsEqual } from './util/object'\nimport { createFormatter } from './datelib/formatting'\nimport { parseFieldSpecs } from './util/misc'\nimport { DateProfileGeneratorClass } from './DateProfileGenerator'\n\n// public\nimport {\n  CssDimValue,\n  DateInput,\n  DateRangeInput,\n  BusinessHoursInput,\n  EventSourceInput,\n  ViewApi,\n  LocaleSingularArg, LocaleInput,\n  EventInput, EventInputTransformer,\n  OverlapFunc, ConstraintInput, AllowFunc,\n  PluginDef,\n  ViewComponentType,\n  SpecificViewContentArg, SpecificViewMountArg,\n  ClassNamesGenerator, CustomContentGenerator, DidMountHandler, WillUnmountHandler,\n  NowIndicatorContentArg, NowIndicatorMountArg,\n  WeekNumberContentArg, WeekNumberMountArg,\n  SlotLaneContentArg, SlotLaneMountArg,\n  SlotLabelContentArg, SlotLabelMountArg,\n  AllDayContentArg, AllDayMountArg,\n  DayHeaderContentArg, DayHeaderMountArg,\n  DayCellContentArg, DayCellMountArg,\n  ViewContentArg, ViewMountArg,\n  EventClickArg,\n  EventHoveringArg,\n  DateSelectArg, DateUnselectArg,\n  CalendarApi,\n  VUIEvent,\n  WeekNumberCalculation,\n  FormatterInput,\n  ToolbarInput, CustomButtonInput, ButtonIconsInput, ButtonTextCompoundInput,\n  EventContentArg, EventMountArg,\n  DatesSetArg,\n  EventApi, EventAddArg, EventChangeArg, EventRemoveArg,\n  MoreLinkContentArg,\n  MoreLinkMountArg,\n  MoreLinkAction,\n  ButtonHintCompoundInput,\n} from './api-type-deps'\n\n// base options\n// ------------\n\nexport const BASE_OPTION_REFINERS = {\n  navLinkDayClick: identity as Identity<string | ((this: CalendarApi, date: Date, jsEvent: VUIEvent) => void)>,\n  navLinkWeekClick: identity as Identity<string | ((this: CalendarApi, weekStart: Date, jsEvent: VUIEvent) => void)>,\n  duration: createDuration,\n  bootstrapFontAwesome: identity as Identity<ButtonIconsInput | false>, // TODO: move to bootstrap plugin\n  buttonIcons: identity as Identity<ButtonIconsInput | false>,\n  customButtons: identity as Identity<{ [name: string]: CustomButtonInput }>,\n  defaultAllDayEventDuration: createDuration,\n  defaultTimedEventDuration: createDuration,\n  nextDayThreshold: createDuration,\n  scrollTime: createDuration,\n  scrollTimeReset: Boolean,\n  slotMinTime: createDuration,\n  slotMaxTime: createDuration,\n  dayPopoverFormat: createFormatter,\n  slotDuration: createDuration,\n  snapDuration: createDuration,\n  headerToolbar: identity as Identity<ToolbarInput | false>,\n  footerToolbar: identity as Identity<ToolbarInput | false>,\n  defaultRangeSeparator: String,\n  titleRangeSeparator: String,\n  forceEventDuration: Boolean,\n\n  dayHeaders: Boolean,\n  dayHeaderFormat: createFormatter,\n  dayHeaderClassNames: identity as Identity<ClassNamesGenerator<DayHeaderContentArg>>,\n  dayHeaderContent: identity as Identity<CustomContentGenerator<DayHeaderContentArg>>,\n  dayHeaderDidMount: identity as Identity<DidMountHandler<DayHeaderMountArg>>,\n  dayHeaderWillUnmount: identity as Identity<WillUnmountHandler<DayHeaderMountArg>>,\n\n  dayCellClassNames: identity as Identity<ClassNamesGenerator<DayCellContentArg>>,\n  dayCellContent: identity as Identity<CustomContentGenerator<DayCellContentArg>>,\n  dayCellDidMount: identity as Identity<DidMountHandler<DayCellMountArg>>,\n  dayCellWillUnmount: identity as Identity<WillUnmountHandler<DayCellMountArg>>,\n\n  initialView: String,\n  aspectRatio: Number,\n  weekends: Boolean,\n\n  weekNumberCalculation: identity as Identity<WeekNumberCalculation>,\n  weekNumbers: Boolean,\n  weekNumberClassNames: identity as Identity<ClassNamesGenerator<WeekNumberContentArg>>,\n  weekNumberContent: identity as Identity<CustomContentGenerator<WeekNumberContentArg>>,\n  weekNumberDidMount: identity as Identity<DidMountHandler<WeekNumberMountArg>>,\n  weekNumberWillUnmount: identity as Identity<WillUnmountHandler<WeekNumberMountArg>>,\n\n  editable: Boolean,\n\n  viewClassNames: identity as Identity<ClassNamesGenerator<ViewContentArg>>,\n  viewDidMount: identity as Identity<DidMountHandler<ViewMountArg>>,\n  viewWillUnmount: identity as Identity<WillUnmountHandler<ViewMountArg>>,\n\n  nowIndicator: Boolean,\n  nowIndicatorClassNames: identity as Identity<ClassNamesGenerator<NowIndicatorContentArg>>,\n  nowIndicatorContent: identity as Identity<CustomContentGenerator<NowIndicatorContentArg>>,\n  nowIndicatorDidMount: identity as Identity<DidMountHandler<NowIndicatorMountArg>>,\n  nowIndicatorWillUnmount: identity as Identity<WillUnmountHandler<NowIndicatorMountArg>>,\n\n  showNonCurrentDates: Boolean,\n  lazyFetching: Boolean,\n  startParam: String,\n  endParam: String,\n  timeZoneParam: String,\n  timeZone: String,\n  locales: identity as Identity<LocaleInput[]>,\n  locale: identity as Identity<LocaleSingularArg>,\n  themeSystem: String as Identity<'standard' | string>,\n  dragRevertDuration: Number,\n  dragScroll: Boolean,\n  allDayMaintainDuration: Boolean,\n  unselectAuto: Boolean,\n  dropAccept: identity as Identity<string | ((this: CalendarApi, draggable: any) => boolean)>, // TODO: type draggable\n  eventOrder: parseFieldSpecs,\n  eventOrderStrict: Boolean,\n\n  handleWindowResize: Boolean,\n  windowResizeDelay: Number,\n  longPressDelay: Number,\n  eventDragMinDistance: Number,\n  expandRows: Boolean,\n  height: identity as Identity<CssDimValue>,\n  contentHeight: identity as Identity<CssDimValue>,\n  direction: String as Identity<'ltr' | 'rtl'>,\n  weekNumberFormat: createFormatter,\n  eventResizableFromStart: Boolean,\n  displayEventTime: Boolean,\n  displayEventEnd: Boolean,\n  weekText: String, // the short version\n  weekTextLong: String, // falls back to weekText\n  progressiveEventRendering: Boolean,\n  businessHours: identity as Identity<BusinessHoursInput>,\n  initialDate: identity as Identity<DateInput>,\n  now: identity as Identity<DateInput | ((this: CalendarApi) => DateInput)>,\n  eventDataTransform: identity as Identity<EventInputTransformer>,\n  stickyHeaderDates: identity as Identity<boolean | 'auto'>,\n  stickyFooterScrollbar: identity as Identity<boolean | 'auto'>,\n  viewHeight: identity as Identity<CssDimValue>,\n  defaultAllDay: Boolean,\n  eventSourceFailure: identity as Identity<(this: CalendarApi, error: any) => void>,\n  eventSourceSuccess: identity as Identity<(this: CalendarApi, eventsInput: EventInput[], xhr?: XMLHttpRequest) => EventInput[] | void>,\n\n  eventDisplay: String, // TODO: give more specific\n  eventStartEditable: Boolean,\n  eventDurationEditable: Boolean,\n  eventOverlap: identity as Identity<boolean | OverlapFunc>,\n  eventConstraint: identity as Identity<ConstraintInput>,\n  eventAllow: identity as Identity<AllowFunc>,\n  eventBackgroundColor: String,\n  eventBorderColor: String,\n  eventTextColor: String,\n  eventColor: String,\n  eventClassNames: identity as Identity<ClassNamesGenerator<EventContentArg>>,\n  eventContent: identity as Identity<CustomContentGenerator<EventContentArg>>,\n  eventDidMount: identity as Identity<DidMountHandler<EventMountArg>>,\n  eventWillUnmount: identity as Identity<WillUnmountHandler<EventMountArg>>,\n\n  selectConstraint: identity as Identity<ConstraintInput>,\n  selectOverlap: identity as Identity<boolean | OverlapFunc>,\n  selectAllow: identity as Identity<AllowFunc>,\n\n  droppable: Boolean,\n  unselectCancel: String,\n\n  slotLabelFormat: identity as Identity<FormatterInput | FormatterInput[]>,\n\n  slotLaneClassNames: identity as Identity<ClassNamesGenerator<SlotLaneContentArg>>,\n  slotLaneContent: identity as Identity<CustomContentGenerator<SlotLaneContentArg>>,\n  slotLaneDidMount: identity as Identity<DidMountHandler<SlotLaneMountArg>>,\n  slotLaneWillUnmount: identity as Identity<WillUnmountHandler<SlotLaneMountArg>>,\n\n  slotLabelClassNames: identity as Identity<ClassNamesGenerator<SlotLabelContentArg>>,\n  slotLabelContent: identity as Identity<CustomContentGenerator<SlotLabelContentArg>>,\n  slotLabelDidMount: identity as Identity<DidMountHandler<SlotLabelMountArg>>,\n  slotLabelWillUnmount: identity as Identity<WillUnmountHandler<SlotLabelMountArg>>,\n\n  dayMaxEvents: identity as Identity<boolean | number>,\n  dayMaxEventRows: identity as Identity<boolean | number>,\n  dayMinWidth: Number,\n  slotLabelInterval: createDuration,\n\n  allDayText: String,\n  allDayClassNames: identity as Identity<ClassNamesGenerator<AllDayContentArg>>,\n  allDayContent: identity as Identity<CustomContentGenerator<AllDayContentArg>>,\n  allDayDidMount: identity as Identity<DidMountHandler<AllDayMountArg>>,\n  allDayWillUnmount: identity as Identity<WillUnmountHandler<AllDayMountArg>>,\n\n  slotMinWidth: Number, // move to timeline?\n  navLinks: Boolean,\n  eventTimeFormat: createFormatter,\n  rerenderDelay: Number, // TODO: move to @fullcalendar/core right? nah keep here\n  moreLinkText: identity as Identity<string | ((this: CalendarApi, num: number) => string)>, // this not enforced :( check others too\n  moreLinkHint: identity as Identity<string | ((this: CalendarApi, num: number) => string)>,\n  selectMinDistance: Number,\n  selectable: Boolean,\n  selectLongPressDelay: Number,\n  eventLongPressDelay: Number,\n\n  selectMirror: Boolean,\n  eventMaxStack: Number,\n  eventMinHeight: Number,\n  eventMinWidth: Number,\n  eventShortHeight: Number,\n  slotEventOverlap: Boolean,\n  plugins: identity as Identity<PluginDef[]>,\n  firstDay: Number,\n  dayCount: Number,\n  dateAlignment: String,\n  dateIncrement: createDuration,\n  hiddenDays: identity as Identity<number[]>,\n  monthMode: Boolean,\n  fixedWeekCount: Boolean,\n  validRange: identity as Identity<DateRangeInput | ((this: CalendarApi, nowDate: Date) => DateRangeInput)>, // `this` works?\n  visibleRange: identity as Identity<DateRangeInput | ((this: CalendarApi, currentDate: Date) => DateRangeInput)>, // `this` works?\n  titleFormat: identity as Identity<FormatterInput>, // DONT parse just yet. we need to inject titleSeparator\n\n  eventInteractive: Boolean,\n\n  // only used by list-view, but languages define the value, so we need it in base options\n  noEventsText: String,\n\n  viewHint: identity as Identity<string | ((...args: any[]) => string)>,\n  navLinkHint: identity as Identity<string | ((...args: any[]) => string)>,\n  closeHint: String,\n  timeHint: String,\n  eventHint: String,\n\n  moreLinkClick: identity as Identity<MoreLinkAction>,\n  moreLinkClassNames: identity as Identity<ClassNamesGenerator<MoreLinkContentArg>>,\n  moreLinkContent: identity as Identity<CustomContentGenerator<MoreLinkContentArg>>,\n  moreLinkDidMount: identity as Identity<DidMountHandler<MoreLinkMountArg>>,\n  moreLinkWillUnmount: identity as Identity<WillUnmountHandler<MoreLinkMountArg>>,\n}\n\ntype BuiltInBaseOptionRefiners = typeof BASE_OPTION_REFINERS\n\nexport interface BaseOptionRefiners extends BuiltInBaseOptionRefiners {\n  // for ambient-extending\n}\n\nexport type BaseOptions = RawOptionsFromRefiners< // as RawOptions\n  Required<BaseOptionRefiners> // Required is a hack for \"Index signature is missing\"\n>\n\n// do NOT give a type here. need `typeof BASE_OPTION_DEFAULTS` to give real results.\n// raw values.\nexport const BASE_OPTION_DEFAULTS = {\n  eventDisplay: 'auto',\n  defaultRangeSeparator: ' - ',\n  titleRangeSeparator: ' \\u2013 ', // en dash\n  defaultTimedEventDuration: '01:00:00',\n  defaultAllDayEventDuration: { day: 1 },\n  forceEventDuration: false,\n  nextDayThreshold: '00:00:00',\n  dayHeaders: true,\n  initialView: '',\n  aspectRatio: 1.35,\n  headerToolbar: {\n    start: 'title',\n    center: '',\n    end: 'today prev,next',\n  },\n  weekends: true,\n  weekNumbers: false,\n  weekNumberCalculation: 'local' as WeekNumberCalculation,\n  editable: false,\n  nowIndicator: false,\n  scrollTime: '06:00:00',\n  scrollTimeReset: true,\n  slotMinTime: '00:00:00',\n  slotMaxTime: '24:00:00',\n  showNonCurrentDates: true,\n  lazyFetching: true,\n  startParam: 'start',\n  endParam: 'end',\n  timeZoneParam: 'timeZone',\n  timeZone: 'local', // TODO: throw error if given falsy value?\n  locales: [],\n  locale: '', // blank values means it will compute based off locales[]\n  themeSystem: 'standard',\n  dragRevertDuration: 500,\n  dragScroll: true,\n  allDayMaintainDuration: false,\n  unselectAuto: true,\n  dropAccept: '*',\n  eventOrder: 'start,-duration,allDay,title',\n  dayPopoverFormat: { month: 'long', day: 'numeric', year: 'numeric' },\n  handleWindowResize: true,\n  windowResizeDelay: 100, // milliseconds before an updateSize happens\n  longPressDelay: 1000,\n  eventDragMinDistance: 5, // only applies to mouse\n  expandRows: false,\n  navLinks: false,\n  selectable: false,\n  eventMinHeight: 15,\n  eventMinWidth: 30,\n  eventShortHeight: 30,\n}\n\nexport type BaseOptionsRefined = DefaultedRefinedOptions<\n  RefinedOptionsFromRefiners<Required<BaseOptionRefiners>>, // Required is a hack for \"Index signature is missing\"\n  keyof typeof BASE_OPTION_DEFAULTS\n>\n\n// calendar listeners\n// ------------------\n\nexport const CALENDAR_LISTENER_REFINERS = {\n  datesSet: identity as Identity<(arg: DatesSetArg) => void>,\n  eventsSet: identity as Identity<(events: EventApi[]) => void>,\n  eventAdd: identity as Identity<(arg: EventAddArg) => void>,\n  eventChange: identity as Identity<(arg: EventChangeArg) => void>,\n  eventRemove: identity as Identity<(arg: EventRemoveArg) => void>,\n  windowResize: identity as Identity<(arg: { view: ViewApi }) => void>,\n  eventClick: identity as Identity<(arg: EventClickArg) => void>, // TODO: resource for scheduler????\n  eventMouseEnter: identity as Identity<(arg: EventHoveringArg) => void>,\n  eventMouseLeave: identity as Identity<(arg: EventHoveringArg) => void>,\n  select: identity as Identity<(arg: DateSelectArg) => void>, // resource for scheduler????\n  unselect: identity as Identity<(arg: DateUnselectArg) => void>,\n  loading: identity as Identity<(isLoading: boolean) => void>,\n\n  // internal\n  _unmount: identity as Identity<() => void>,\n  _beforeprint: identity as Identity<() => void>,\n  _afterprint: identity as Identity<() => void>,\n  _noEventDrop: identity as Identity<() => void>,\n  _noEventResize: identity as Identity<() => void>,\n  _resize: identity as Identity<(forced: boolean) => void>,\n  _scrollRequest: identity as Identity<(arg: any) => void>,\n}\n\ntype BuiltInCalendarListenerRefiners = typeof CALENDAR_LISTENER_REFINERS\n\nexport interface CalendarListenerRefiners extends BuiltInCalendarListenerRefiners {\n  // for ambient extending\n}\n\ntype CalendarListenersLoose = RefinedOptionsFromRefiners<Required<CalendarListenerRefiners>> // Required hack\nexport type CalendarListeners = Required<CalendarListenersLoose> // much more convenient for Emitters and whatnot\n\n// calendar-specific options\n// -------------------------\n\nexport const CALENDAR_OPTION_REFINERS = { // does not include base nor calendar listeners\n  buttonText: identity as Identity<ButtonTextCompoundInput>,\n  buttonHints: identity as Identity<ButtonHintCompoundInput>,\n  views: identity as Identity<{ [viewId: string]: ViewOptions }>,\n  plugins: identity as Identity<PluginDef[]>,\n  initialEvents: identity as Identity<EventSourceInput>,\n  events: identity as Identity<EventSourceInput>,\n  eventSources: identity as Identity<EventSourceInput[]>,\n}\n\ntype BuiltInCalendarOptionRefiners = typeof CALENDAR_OPTION_REFINERS\n\nexport interface CalendarOptionRefiners extends BuiltInCalendarOptionRefiners {\n  // for ambient-extending\n}\n\nexport type CalendarOptions =\n  BaseOptions &\n  CalendarListenersLoose &\n  RawOptionsFromRefiners<Required<CalendarOptionRefiners>> // Required hack https://github.com/microsoft/TypeScript/issues/15300\n\nexport type CalendarOptionsRefined =\n  BaseOptionsRefined &\n  CalendarListenersLoose &\n  RefinedOptionsFromRefiners<Required<CalendarOptionRefiners>> // Required hack\n\nexport const COMPLEX_OPTION_COMPARATORS: {\n  [optionName in keyof CalendarOptions]: (a: CalendarOptions[optionName], b: CalendarOptions[optionName]) => boolean\n} = {\n  headerToolbar: isMaybeObjectsEqual,\n  footerToolbar: isMaybeObjectsEqual,\n  buttonText: isMaybeObjectsEqual,\n  buttonHints: isMaybeObjectsEqual,\n  buttonIcons: isMaybeObjectsEqual,\n  dateIncrement: isMaybeObjectsEqual,\n}\n\nfunction isMaybeObjectsEqual(a, b) {\n  if (typeof a === 'object' && typeof b === 'object' && a && b) { // both non-null objects\n    return isPropsEqual(a, b)\n  }\n  return a === b\n}\n\n// view-specific options\n// ---------------------\n\nexport const VIEW_OPTION_REFINERS: {\n  [name: string]: any\n} = {\n  type: String,\n  component: identity as Identity<ViewComponentType>,\n  buttonText: String,\n  buttonTextKey: String, // internal only\n  dateProfileGeneratorClass: identity as Identity<DateProfileGeneratorClass>,\n  usesMinMaxTime: Boolean, // internal only\n  classNames: identity as Identity<ClassNamesGenerator<SpecificViewContentArg>>,\n  content: identity as Identity<CustomContentGenerator<SpecificViewContentArg>>,\n  didMount: identity as Identity<DidMountHandler<SpecificViewMountArg>>,\n  willUnmount: identity as Identity<WillUnmountHandler<SpecificViewMountArg>>,\n}\n\ntype BuiltInViewOptionRefiners = typeof VIEW_OPTION_REFINERS\n\nexport interface ViewOptionRefiners extends BuiltInViewOptionRefiners {\n  // for ambient-extending\n}\n\nexport type ViewOptions =\n  BaseOptions &\n  CalendarListenersLoose &\n  RawOptionsFromRefiners<Required<ViewOptionRefiners>> // Required hack\n\nexport type ViewOptionsRefined =\n  BaseOptionsRefined &\n  CalendarListenersLoose &\n  RefinedOptionsFromRefiners<Required<ViewOptionRefiners>> // Required hack\n\n// util funcs\n// ----------------------------------------------------------------------------------------------------\n\nexport function mergeRawOptions(optionSets: Dictionary[]) {\n  return mergeProps(optionSets, COMPLEX_OPTION_COMPARATORS)\n}\n\nexport function refineProps<Refiners extends GenericRefiners, Raw extends RawOptionsFromRefiners<Refiners>>(\n  input: Raw,\n  refiners: Refiners,\n): {\n  refined: RefinedOptionsFromRefiners<Refiners>,\n  extra: Dictionary,\n} {\n  let refined = {} as any\n  let extra = {} as any\n\n  for (let propName in refiners) {\n    if (propName in input) {\n      refined[propName] = refiners[propName](input[propName])\n    }\n  }\n\n  for (let propName in input) {\n    if (!(propName in refiners)) {\n      extra[propName] = input[propName]\n    }\n  }\n\n  return { refined, extra }\n}\n\n// definition utils\n// ----------------------------------------------------------------------------------------------------\n\nexport type GenericRefiners = {\n  [propName: string]: (input: any) => any\n}\n\nexport type GenericListenerRefiners = {\n  [listenerName: string]: Identity<(this: CalendarApi, ...args: any[]) => void>\n}\n\nexport type RawOptionsFromRefiners<Refiners extends GenericRefiners> = {\n  [Prop in keyof Refiners]?: // all optional\n    Refiners[Prop] extends ((input: infer RawType) => infer RefinedType)\n      ? (any extends RawType ? RefinedType : RawType) // if input type `any`, use output (for Boolean/Number/String)\n      : never\n}\n\nexport type RefinedOptionsFromRefiners<Refiners extends GenericRefiners> = {\n  [Prop in keyof Refiners]?: // all optional\n    Refiners[Prop] extends ((input: any) => infer RefinedType) ? RefinedType : never\n}\n\nexport type DefaultedRefinedOptions<RefinedOptions extends Dictionary, DefaultKey extends keyof RefinedOptions> =\n  Required<Pick<RefinedOptions, DefaultKey>> &\n  Partial<Omit<RefinedOptions, DefaultKey>>\n\nexport type Dictionary = Record<string, any>\n\nexport type Identity<T = any> = (raw: T) => T\n\nexport function identity<T>(raw: T): T {\n  return raw\n}\n","import { EventDef, EventDefHash } from './event-def'\nimport { EventInstance, EventInstanceHash } from './event-instance'\nimport { EventInput, parseEvent, EventTuple, buildEventRefiners } from './event-parse'\nimport { filterHash } from '../util/object'\nimport { CalendarContext } from '../CalendarContext'\nimport { EventSource } from './event-source'\n\n/*\nA data structure that encapsulates EventDefs and EventInstances.\nUtils for parsing this data from raw EventInputs.\nUtils for manipulating an EventStore.\n*/\n\nexport interface EventStore {\n  defs: EventDefHash\n  instances: EventInstanceHash\n}\n\nexport function parseEvents(\n  rawEvents: EventInput[],\n  eventSource: EventSource<any> | null,\n  context: CalendarContext,\n  allowOpenRange?: boolean,\n): EventStore {\n  let eventStore = createEmptyEventStore()\n  let eventRefiners = buildEventRefiners(context)\n\n  for (let rawEvent of rawEvents) {\n    let tuple = parseEvent(rawEvent, eventSource, context, allowOpenRange, eventRefiners)\n\n    if (tuple) {\n      eventTupleToStore(tuple, eventStore)\n    }\n  }\n\n  return eventStore\n}\n\nexport function eventTupleToStore(tuple: EventTuple, eventStore: EventStore = createEmptyEventStore()) {\n  eventStore.defs[tuple.def.defId] = tuple.def\n\n  if (tuple.instance) {\n    eventStore.instances[tuple.instance.instanceId] = tuple.instance\n  }\n\n  return eventStore\n}\n\n// retrieves events that have the same groupId as the instance specified by `instanceId`\n// or they are the same as the instance.\n// why might instanceId not be in the store? an event from another calendar?\nexport function getRelevantEvents(eventStore: EventStore, instanceId: string): EventStore {\n  let instance = eventStore.instances[instanceId]\n\n  if (instance) {\n    let def = eventStore.defs[instance.defId]\n\n    // get events/instances with same group\n    let newStore = filterEventStoreDefs(eventStore, (lookDef) => isEventDefsGrouped(def, lookDef))\n\n    // add the original\n    // TODO: wish we could use eventTupleToStore or something like it\n    newStore.defs[def.defId] = def\n    newStore.instances[instance.instanceId] = instance\n\n    return newStore\n  }\n\n  return createEmptyEventStore()\n}\n\nfunction isEventDefsGrouped(def0: EventDef, def1: EventDef): boolean {\n  return Boolean(def0.groupId && def0.groupId === def1.groupId)\n}\n\nexport function createEmptyEventStore(): EventStore {\n  return { defs: {}, instances: {} }\n}\n\nexport function mergeEventStores(store0: EventStore, store1: EventStore): EventStore {\n  return {\n    defs: { ...store0.defs, ...store1.defs },\n    instances: { ...store0.instances, ...store1.instances },\n  }\n}\n\nexport function filterEventStoreDefs(eventStore: EventStore, filterFunc: (eventDef: EventDef) => boolean): EventStore {\n  let defs = filterHash(eventStore.defs, filterFunc)\n  let instances = filterHash(eventStore.instances, (instance: EventInstance) => (\n    defs[instance.defId] // still exists?\n  ))\n  return { defs, instances }\n}\n\nexport function excludeSubEventStore(master: EventStore, sub: EventStore): EventStore {\n  let { defs, instances } = master\n  let filteredDefs: { [defId: string]: EventDef } = {}\n  let filteredInstances: { [instanceId: string]: EventInstance } = {}\n\n  for (let defId in defs) {\n    if (!sub.defs[defId]) { // not explicitly excluded\n      filteredDefs[defId] = defs[defId]\n    }\n  }\n\n  for (let instanceId in instances) {\n    if (\n      !sub.instances[instanceId] && // not explicitly excluded\n      filteredDefs[instances[instanceId].defId] // def wasn't filtered away\n    ) {\n      filteredInstances[instanceId] = instances[instanceId]\n    }\n  }\n\n  return {\n    defs: filteredDefs,\n    instances: filteredInstances,\n  }\n}\n","export type ClassNamesInput = string | string[]\n\nexport function parseClassNames(raw: ClassNamesInput) {\n  if (Array.isArray(raw)) {\n    return raw\n  }\n\n  if (typeof raw === 'string') {\n    return raw.split(/\\s+/)\n  }\n\n  return []\n}\n","import { Constraint, AllowFunc, normalizeConstraint } from '../structs/constraint'\nimport { parseClassNames } from '../util/html'\nimport { CalendarContext } from '../CalendarContext'\nimport { RawOptionsFromRefiners, RefinedOptionsFromRefiners, identity, Identity } from '../options'\n\n// TODO: better called \"EventSettings\" or \"EventConfig\"\n// TODO: move this file into structs\n// TODO: separate constraint/overlap/allow, because selection uses only that, not other props\n\nexport const EVENT_UI_REFINERS = {\n  display: String,\n  editable: Boolean,\n  startEditable: Boolean,\n  durationEditable: Boolean,\n  constraint: identity as Identity<any>, // Identity<ConstraintInput>, // circular reference. ts dies. event->constraint->event\n  overlap: identity as Identity<boolean>,\n  allow: identity as Identity<AllowFunc>,\n  className: parseClassNames, // will both end up as array of strings\n  classNames: parseClassNames, // \"\n  color: String,\n  backgroundColor: String,\n  borderColor: String,\n  textColor: String,\n}\n\nconst EMPTY_EVENT_UI: EventUi = {\n  display: null,\n  startEditable: null,\n  durationEditable: null,\n  constraints: [],\n  overlap: null,\n  allows: [],\n  backgroundColor: '',\n  borderColor: '',\n  textColor: '',\n  classNames: [],\n}\n\ntype BuiltInEventUiRefiners = typeof EVENT_UI_REFINERS\n\ninterface EventUiRefiners extends BuiltInEventUiRefiners {\n  // to prevent circular reference (and give is the option for ambient modification for later)\n}\n\nexport type EventUiInput = RawOptionsFromRefiners<Required<EventUiRefiners>> // Required hack\nexport type EventUiRefined = RefinedOptionsFromRefiners<Required<EventUiRefiners>> // Required hack\n\nexport interface EventUi {\n  display: string | null\n  startEditable: boolean | null\n  durationEditable: boolean | null\n  constraints: Constraint[]\n  overlap: boolean | null\n  allows: AllowFunc[] // crappy name to indicate plural\n  backgroundColor: string\n  borderColor: string\n  textColor: string,\n  classNames: string[]\n}\n\nexport type EventUiHash = { [defId: string]: EventUi }\n\nexport function createEventUi(refined: EventUiRefined, context: CalendarContext): EventUi {\n  let constraint = normalizeConstraint(refined.constraint, context)\n\n  return {\n    display: refined.display || null,\n    startEditable: refined.startEditable != null ? refined.startEditable : refined.editable,\n    durationEditable: refined.durationEditable != null ? refined.durationEditable : refined.editable,\n    constraints: constraint != null ? [constraint] : [],\n    overlap: refined.overlap != null ? refined.overlap : null,\n    allows: refined.allow != null ? [refined.allow] : [],\n    backgroundColor: refined.backgroundColor || refined.color || '',\n    borderColor: refined.borderColor || refined.color || '',\n    textColor: refined.textColor || '',\n    classNames: (refined.className || []).concat(refined.classNames || []), // join singular and plural\n  }\n}\n\n// TODO: prevent against problems with <2 args!\nexport function combineEventUis(uis: EventUi[]): EventUi {\n  return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI)\n}\n\nfunction combineTwoEventUis(item0: EventUi, item1: EventUi): EventUi { // hash1 has higher precedence\n  return {\n    display: item1.display != null ? item1.display : item0.display,\n    startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable,\n    durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable,\n    constraints: item0.constraints.concat(item1.constraints),\n    overlap: typeof item1.overlap === 'boolean' ? item1.overlap : item0.overlap,\n    allows: item0.allows.concat(item1.allows),\n    backgroundColor: item1.backgroundColor || item0.backgroundColor,\n    borderColor: item1.borderColor || item0.borderColor,\n    textColor: item1.textColor || item0.textColor,\n    classNames: item0.classNames.concat(item1.classNames),\n  }\n}\n","import { EventStore, parseEvents } from './event-store'\nimport { EventInput } from './event-parse'\nimport { DateSpanApi } from './date-span'\nimport { EventApi } from '../api/EventApi'\nimport { SplittableProps } from '../component/event-splitting'\nimport { CalendarContext } from '../CalendarContext'\n\n// TODO: rename to \"criteria\" ?\nexport type ConstraintInput = 'businessHours' | string | EventInput | EventInput[]\nexport type Constraint = 'businessHours' | string | EventStore | false // false means won't pass at all\nexport type OverlapFunc = ((stillEvent: EventApi, movingEvent: EventApi | null) => boolean)\nexport type AllowFunc = (span: DateSpanApi, movingEvent: EventApi | null) => boolean\nexport type isPropsValidTester = (props: SplittableProps, context: CalendarContext) => boolean\n\nexport function normalizeConstraint(input: ConstraintInput, context: CalendarContext): Constraint | null {\n  if (Array.isArray(input)) {\n    return parseEvents(input, null, context, true) // allowOpenRange=true\n  } if (typeof input === 'object' && input) { // non-null object\n    return parseEvents([input], null, context, true) // allowOpenRange=true\n  } if (input != null) {\n    return String(input)\n  }\n  return null\n}\n","import { __assign } from 'tslib'\nimport { guid } from '../util/misc'\nimport { DateInput } from '../datelib/env'\nimport { startOfDay } from '../datelib/marker'\nimport { parseRecurring } from './recurring-event'\nimport { CalendarContext } from '../CalendarContext'\nimport { EventDef } from './event-def'\nimport { createEventInstance, EventInstance } from './event-instance'\nimport { EventSource } from './event-source'\nimport { RefinedOptionsFromRefiners, RawOptionsFromRefiners, identity, Identity, Dictionary, refineProps } from '../options'\nimport { EVENT_UI_REFINERS, createEventUi, EventUiInput, EventUiRefined } from '../component/event-ui'\n\nexport const EVENT_NON_DATE_REFINERS = {\n  id: String,\n  groupId: String,\n  title: String,\n  url: String,\n  interactive: Boolean,\n}\n\nexport const EVENT_DATE_REFINERS = {\n  start: identity as Identity<DateInput>,\n  end: identity as Identity<DateInput>,\n  date: identity as Identity<DateInput>,\n  allDay: Boolean,\n}\n\nconst EVENT_REFINERS = { // does NOT include EVENT_UI_REFINERS\n  ...EVENT_NON_DATE_REFINERS,\n  ...EVENT_DATE_REFINERS,\n  extendedProps: identity as Identity<Dictionary>,\n}\n\ntype BuiltInEventRefiners = typeof EVENT_REFINERS\n\nexport interface EventRefiners extends BuiltInEventRefiners {\n  // for ambient\n}\n\nexport type EventInput =\n  EventUiInput &\n  RawOptionsFromRefiners<Required<EventRefiners>> & // Required hack\n  { [extendedProp: string]: any }\n\nexport type EventRefined =\n  EventUiRefined &\n  RefinedOptionsFromRefiners<Required<EventRefiners>> // Required hack\n\nexport interface EventTuple {\n  def: EventDef\n  instance: EventInstance | null\n}\n\nexport type EventInputTransformer = (input: EventInput) => EventInput\nexport type EventDefMemberAdder = (refined: EventRefined) => Partial<EventDef>\n\nexport function parseEvent(\n  raw: EventInput,\n  eventSource: EventSource<any> | null,\n  context: CalendarContext,\n  allowOpenRange: boolean,\n  refiners = buildEventRefiners(context),\n): EventTuple | null {\n  let { refined, extra } = refineEventDef(raw, context, refiners)\n\n  let defaultAllDay = computeIsDefaultAllDay(eventSource, context)\n  let recurringRes = parseRecurring(\n    refined,\n    defaultAllDay,\n    context.dateEnv,\n    context.pluginHooks.recurringTypes,\n  )\n\n  if (recurringRes) {\n    let def = parseEventDef(\n      refined,\n      extra,\n      eventSource ? eventSource.sourceId : '',\n      recurringRes.allDay,\n      Boolean(recurringRes.duration),\n      context,\n    )\n\n    def.recurringDef = { // don't want all the props from recurringRes. TODO: more efficient way to do this\n      typeId: recurringRes.typeId,\n      typeData: recurringRes.typeData,\n      duration: recurringRes.duration,\n    }\n\n    return { def, instance: null }\n  }\n  let singleRes = parseSingle(refined, defaultAllDay, context, allowOpenRange)\n\n  if (singleRes) {\n    let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', singleRes.allDay, singleRes.hasEnd, context)\n    let instance = createEventInstance(def.defId, singleRes.range, singleRes.forcedStartTzo, singleRes.forcedEndTzo)\n\n    return { def, instance }\n  }\n\n  return null\n}\n\nexport function refineEventDef(raw: EventInput, context: CalendarContext, refiners = buildEventRefiners(context)) {\n  return refineProps(raw, refiners)\n}\n\nexport function buildEventRefiners(context: CalendarContext) {\n  return { ...EVENT_UI_REFINERS, ...EVENT_REFINERS, ...context.pluginHooks.eventRefiners }\n}\n\n/*\nWill NOT populate extendedProps with the leftover properties.\nWill NOT populate date-related props.\n*/\nexport function parseEventDef(\n  refined: EventRefined,\n  extra: Dictionary,\n  sourceId: string,\n  allDay: boolean,\n  hasEnd: boolean,\n  context: CalendarContext,\n): EventDef {\n  let def: EventDef = {\n    title: refined.title || '',\n    groupId: refined.groupId || '',\n    publicId: refined.id || '',\n    url: refined.url || '',\n    recurringDef: null,\n    defId: guid(),\n    sourceId,\n    allDay,\n    hasEnd,\n    interactive: refined.interactive,\n    ui: createEventUi(refined, context),\n    extendedProps: {\n      ...(refined.extendedProps || {}),\n      ...extra,\n    },\n  }\n\n  for (let memberAdder of context.pluginHooks.eventDefMemberAdders) {\n    __assign(def, memberAdder(refined))\n  }\n\n  // help out EventApi from having user modify props\n  Object.freeze(def.ui.classNames)\n  Object.freeze(def.extendedProps)\n\n  return def\n}\n\nfunction parseSingle(refined: EventRefined, defaultAllDay: boolean | null, context: CalendarContext, allowOpenRange?: boolean) {\n  let { allDay } = refined\n  let startMeta\n  let startMarker = null\n  let hasEnd = false\n  let endMeta\n  let endMarker = null\n\n  let startInput = refined.start != null ? refined.start : refined.date\n  startMeta = context.dateEnv.createMarkerMeta(startInput)\n\n  if (startMeta) {\n    startMarker = startMeta.marker\n  } else if (!allowOpenRange) {\n    return null\n  }\n\n  if (refined.end != null) {\n    endMeta = context.dateEnv.createMarkerMeta(refined.end)\n  }\n\n  if (allDay == null) {\n    if (defaultAllDay != null) {\n      allDay = defaultAllDay\n    } else {\n      // fall back to the date props LAST\n      allDay = (!startMeta || startMeta.isTimeUnspecified) &&\n        (!endMeta || endMeta.isTimeUnspecified)\n    }\n  }\n\n  if (allDay && startMarker) {\n    startMarker = startOfDay(startMarker)\n  }\n\n  if (endMeta) {\n    endMarker = endMeta.marker\n\n    if (allDay) {\n      endMarker = startOfDay(endMarker)\n    }\n\n    if (startMarker && endMarker <= startMarker) {\n      endMarker = null\n    }\n  }\n\n  if (endMarker) {\n    hasEnd = true\n  } else if (!allowOpenRange) {\n    hasEnd = context.options.forceEventDuration || false\n\n    endMarker = context.dateEnv.add(\n      startMarker,\n      allDay ?\n        context.options.defaultAllDayEventDuration :\n        context.options.defaultTimedEventDuration,\n    )\n  }\n\n  return {\n    allDay,\n    hasEnd,\n    range: { start: startMarker, end: endMarker },\n    forcedStartTzo: startMeta ? startMeta.forcedTzo : null,\n    forcedEndTzo: endMeta ? endMeta.forcedTzo : null,\n  }\n}\n\nfunction computeIsDefaultAllDay(eventSource: EventSource<any> | null, context: CalendarContext): boolean | null {\n  let res = null\n\n  if (eventSource) {\n    res = eventSource.defaultAllDay\n  }\n\n  if (res == null) {\n    res = context.options.defaultAllDay\n  }\n\n  return res\n}\n","import { DateMarker, startOfDay, addDays, diffDays, diffDayAndTime } from '../datelib/marker'\nimport { Duration, asRoughMs, createDuration } from '../datelib/duration'\nimport { DateEnv } from '../datelib/env'\nimport { DateRange, OpenDateRange } from '../datelib/date-range'\n\n/* Date stuff that doesn't belong in datelib core\n----------------------------------------------------------------------------------------------------------------------*/\n\n// given a timed range, computes an all-day range that has the same exact duration,\n// but whose start time is aligned with the start of the day.\nexport function computeAlignedDayRange(timedRange: DateRange): DateRange {\n  let dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1\n  let start = startOfDay(timedRange.start)\n  let end = addDays(start, dayCnt)\n  return { start, end }\n}\n\n// given a timed range, computes an all-day range based on how for the end date bleeds into the next day\n// TODO: give nextDayThreshold a default arg\nexport function computeVisibleDayRange(timedRange: OpenDateRange, nextDayThreshold: Duration = createDuration(0)): OpenDateRange {\n  let startDay: DateMarker = null\n  let endDay: DateMarker = null\n\n  if (timedRange.end) {\n    endDay = startOfDay(timedRange.end)\n\n    let endTimeMS: number = timedRange.end.valueOf() - endDay.valueOf() // # of milliseconds into `endDay`\n\n    // If the end time is actually inclusively part of the next day and is equal to or\n    // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.\n    // Otherwise, leaving it as inclusive will cause it to exclude `endDay`.\n    if (endTimeMS && endTimeMS >= asRoughMs(nextDayThreshold)) {\n      endDay = addDays(endDay, 1)\n    }\n  }\n\n  if (timedRange.start) {\n    startDay = startOfDay(timedRange.start) // the beginning of the day the range starts\n\n    // If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day.\n    if (endDay && endDay <= startDay) {\n      endDay = addDays(startDay, 1)\n    }\n  }\n\n  return { start: startDay, end: endDay }\n}\n\n// spans from one day into another?\nexport function isMultiDayRange(range: DateRange) {\n  let visibleRange = computeVisibleDayRange(range)\n\n  return diffDays(visibleRange.start, visibleRange.end) > 1\n}\n\nexport function diffDates(date0: DateMarker, date1: DateMarker, dateEnv: DateEnv, largeUnit?: string) {\n  if (largeUnit === 'year') {\n    return createDuration(dateEnv.diffWholeYears(date0, date1), 'year')!\n  }\n\n  if (largeUnit === 'month') {\n    return createDuration(dateEnv.diffWholeMonths(date0, date1), 'month')!\n  }\n\n  return diffDayAndTime(date0, date1) // returns a duration\n}\n","import { DateMarker } from './marker'\nimport { DateEnv, DateInput } from './env'\n\nexport interface DateRangeInput {\n  start?: DateInput\n  end?: DateInput\n}\n\nexport interface OpenDateRange {\n  start: DateMarker | null\n  end: DateMarker | null\n}\n\nexport interface DateRange {\n  start: DateMarker\n  end: DateMarker\n}\n\nexport function parseRange(input: DateRangeInput, dateEnv: DateEnv): OpenDateRange {\n  let start = null\n  let end = null\n\n  if (input.start) {\n    start = dateEnv.createMarker(input.start)\n  }\n\n  if (input.end) {\n    end = dateEnv.createMarker(input.end)\n  }\n\n  if (!start && !end) {\n    return null\n  }\n\n  if (start && end && end < start) {\n    return null\n  }\n\n  return { start, end }\n}\n\n// SIDE-EFFECT: will mutate ranges.\n// Will return a new array result.\nexport function invertRanges(ranges: DateRange[], constraintRange: DateRange): DateRange[] {\n  let invertedRanges: DateRange[] = []\n  let { start } = constraintRange // the end of the previous range. the start of the new range\n  let i\n  let dateRange\n\n  // ranges need to be in order. required for our date-walking algorithm\n  ranges.sort(compareRanges)\n\n  for (i = 0; i < ranges.length; i += 1) {\n    dateRange = ranges[i]\n\n    // add the span of time before the event (if there is any)\n    if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n      invertedRanges.push({ start, end: dateRange.start })\n    }\n\n    if (dateRange.end > start) {\n      start = dateRange.end\n    }\n  }\n\n  // add the span of time after the last event (if there is any)\n  if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n    invertedRanges.push({ start, end: constraintRange.end })\n  }\n\n  return invertedRanges\n}\n\nfunction compareRanges(range0: DateRange, range1: DateRange) {\n  return range0.start.valueOf() - range1.start.valueOf() // earlier ranges go first\n}\n\nexport function intersectRanges(range0: OpenDateRange, range1: OpenDateRange): OpenDateRange {\n  let { start, end } = range0\n  let newRange = null\n\n  if (range1.start !== null) {\n    if (start === null) {\n      start = range1.start\n    } else {\n      start = new Date(Math.max(start.valueOf(), range1.start.valueOf()))\n    }\n  }\n\n  if (range1.end != null) {\n    if (end === null) {\n      end = range1.end\n    } else {\n      end = new Date(Math.min(end.valueOf(), range1.end.valueOf()))\n    }\n  }\n\n  if (start === null || end === null || start < end) {\n    newRange = { start, end }\n  }\n\n  return newRange\n}\n\nexport function rangesEqual(range0: OpenDateRange, range1: OpenDateRange): boolean {\n  return (range0.start === null ? null : range0.start.valueOf()) === (range1.start === null ? null : range1.start.valueOf()) &&\n    (range0.end === null ? null : range0.end.valueOf()) === (range1.end === null ? null : range1.end.valueOf())\n}\n\nexport function rangesIntersect(range0: OpenDateRange, range1: OpenDateRange): boolean {\n  return (range0.end === null || range1.start === null || range0.end > range1.start) &&\n    (range0.start === null || range1.end === null || range0.start < range1.end)\n}\n\nexport function rangeContainsRange(outerRange: OpenDateRange, innerRange: OpenDateRange): boolean {\n  return (outerRange.start === null || (innerRange.start !== null && innerRange.start >= outerRange.start)) &&\n    (outerRange.end === null || (innerRange.end !== null && innerRange.end <= outerRange.end))\n}\n\nexport function rangeContainsMarker(range: OpenDateRange, date: DateMarker | number): boolean { // date can be a millisecond time\n  return (range.start === null || date >= range.start) &&\n    (range.end === null || date < range.end)\n}\n\n// If the given date is not within the given range, move it inside.\n// (If it's past the end, make it one millisecond before the end).\nexport function constrainMarkerToRange(date: DateMarker, range: DateRange): DateMarker {\n  if (range.start != null && date < range.start) {\n    return range.start\n  }\n\n  if (range.end != null && date >= range.end) {\n    return new Date(range.end.valueOf() - 1)\n  }\n\n  return date\n}\n","import { EventDef, EventDefHash } from '../structs/event-def'\nimport { EventTuple } from '../structs/event-parse'\nimport { EventStore } from '../structs/event-store'\nimport { DateRange, invertRanges, intersectRanges, rangeContainsMarker } from '../datelib/date-range'\nimport { Duration } from '../datelib/duration'\nimport { compareByFieldSpecs, OrderSpec } from '../util/misc'\nimport { computeVisibleDayRange } from '../util/date'\nimport { Seg } from './DateComponent'\nimport { EventApi } from '../api/EventApi'\nimport { EventUi, EventUiHash, combineEventUis } from './event-ui'\nimport { mapHash } from '../util/object'\nimport { ViewContext } from '../ViewContext'\nimport { DateFormatter } from '../datelib/DateFormatter'\nimport { addMs, DateMarker, startOfDay } from '../datelib/marker'\nimport { ViewApi } from '../ViewApi'\nimport { MountArg } from '../common/render-hook'\nimport { createAriaKeyboardAttrs } from '../util/dom-event'\n\nexport interface EventRenderRange extends EventTuple {\n  ui: EventUi\n  range: DateRange\n  isStart: boolean\n  isEnd: boolean\n}\n\n/*\nSpecifying nextDayThreshold signals that all-day ranges should be sliced.\n*/\nexport function sliceEventStore(eventStore: EventStore, eventUiBases: EventUiHash, framingRange: DateRange, nextDayThreshold?: Duration) {\n  let inverseBgByGroupId: { [groupId: string]: DateRange[] } = {}\n  let inverseBgByDefId: { [defId: string]: DateRange[] } = {}\n  let defByGroupId: { [groupId: string]: EventDef } = {}\n  let bgRanges: EventRenderRange[] = []\n  let fgRanges: EventRenderRange[] = []\n  let eventUis = compileEventUis(eventStore.defs, eventUiBases)\n\n  for (let defId in eventStore.defs) {\n    let def = eventStore.defs[defId]\n    let ui = eventUis[def.defId]\n\n    if (ui.display === 'inverse-background') {\n      if (def.groupId) {\n        inverseBgByGroupId[def.groupId] = []\n\n        if (!defByGroupId[def.groupId]) {\n          defByGroupId[def.groupId] = def\n        }\n      } else {\n        inverseBgByDefId[defId] = []\n      }\n    }\n  }\n\n  for (let instanceId in eventStore.instances) {\n    let instance = eventStore.instances[instanceId]\n    let def = eventStore.defs[instance.defId]\n    let ui = eventUis[def.defId]\n    let origRange = instance.range\n\n    let normalRange = (!def.allDay && nextDayThreshold) ?\n      computeVisibleDayRange(origRange, nextDayThreshold) :\n      origRange\n\n    let slicedRange = intersectRanges(normalRange, framingRange)\n\n    if (slicedRange) {\n      if (ui.display === 'inverse-background') {\n        if (def.groupId) {\n          inverseBgByGroupId[def.groupId].push(slicedRange)\n        } else {\n          inverseBgByDefId[instance.defId].push(slicedRange)\n        }\n      } else if (ui.display !== 'none') {\n        (ui.display === 'background' ? bgRanges : fgRanges).push({\n          def,\n          ui,\n          instance,\n          range: slicedRange,\n          isStart: normalRange.start && normalRange.start.valueOf() === slicedRange.start.valueOf(),\n          isEnd: normalRange.end && normalRange.end.valueOf() === slicedRange.end.valueOf(),\n        })\n      }\n    }\n  }\n\n  for (let groupId in inverseBgByGroupId) { // BY GROUP\n    let ranges = inverseBgByGroupId[groupId]\n    let invertedRanges = invertRanges(ranges, framingRange)\n\n    for (let invertedRange of invertedRanges) {\n      let def = defByGroupId[groupId]\n      let ui = eventUis[def.defId]\n\n      bgRanges.push({\n        def,\n        ui,\n        instance: null,\n        range: invertedRange,\n        isStart: false,\n        isEnd: false,\n      })\n    }\n  }\n\n  for (let defId in inverseBgByDefId) {\n    let ranges = inverseBgByDefId[defId]\n    let invertedRanges = invertRanges(ranges, framingRange)\n\n    for (let invertedRange of invertedRanges) {\n      bgRanges.push({\n        def: eventStore.defs[defId],\n        ui: eventUis[defId],\n        instance: null,\n        range: invertedRange,\n        isStart: false,\n        isEnd: false,\n      })\n    }\n  }\n\n  return { bg: bgRanges, fg: fgRanges }\n}\n\nexport function hasBgRendering(def: EventDef) {\n  return def.ui.display === 'background' || def.ui.display === 'inverse-background'\n}\n\nexport function setElSeg(el: HTMLElement, seg: Seg) {\n  (el as any).fcSeg = seg\n}\n\nexport function getElSeg(el: HTMLElement): Seg | null {\n  return (el as any).fcSeg ||\n    (el.parentNode as any).fcSeg || // for the harness\n    null\n}\n\n// event ui computation\n\nexport function compileEventUis(eventDefs: EventDefHash, eventUiBases: EventUiHash) {\n  return mapHash(eventDefs, (eventDef: EventDef) => compileEventUi(eventDef, eventUiBases))\n}\n\nexport function compileEventUi(eventDef: EventDef, eventUiBases: EventUiHash) {\n  let uis = []\n\n  if (eventUiBases['']) {\n    uis.push(eventUiBases[''])\n  }\n\n  if (eventUiBases[eventDef.defId]) {\n    uis.push(eventUiBases[eventDef.defId])\n  }\n\n  uis.push(eventDef.ui)\n\n  return combineEventUis(uis)\n}\n\nexport function sortEventSegs(segs, eventOrderSpecs: OrderSpec<EventApi>[]): Seg[] {\n  let objs = segs.map(buildSegCompareObj)\n\n  objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs))\n\n  return objs.map((c) => c._seg)\n}\n\n// returns a object with all primitive props that can be compared\nexport function buildSegCompareObj(seg: Seg) {\n  let { eventRange } = seg\n  let eventDef = eventRange.def\n  let range = eventRange.instance ? eventRange.instance.range : eventRange.range\n  let start = range.start ? range.start.valueOf() : 0 // TODO: better support for open-range events\n  let end = range.end ? range.end.valueOf() : 0 // \"\n\n  return {\n    ...eventDef.extendedProps,\n    ...eventDef,\n    id: eventDef.publicId,\n    start,\n    end,\n    duration: end - start,\n    allDay: Number(eventDef.allDay),\n    _seg: seg, // for later retrieval\n  }\n}\n\n// other stuff\n\nexport interface EventContentArg { // for *Content handlers\n  event: EventApi\n  timeText: string\n  backgroundColor: string // TODO: add other EventUi props?\n  borderColor: string //\n  textColor: string //\n  isDraggable: boolean\n  isStartResizable: boolean\n  isEndResizable: boolean\n  isMirror: boolean\n  isStart: boolean\n  isEnd: boolean\n  isPast: boolean\n  isFuture: boolean\n  isToday: boolean\n  isSelected: boolean\n  isDragging: boolean\n  isResizing: boolean\n  view: ViewApi // specifically for the API\n}\n\nexport type EventMountArg = MountArg<EventContentArg>\n\nexport function computeSegDraggable(seg: Seg, context: ViewContext) {\n  let { pluginHooks } = context\n  let transformers = pluginHooks.isDraggableTransformers\n  let { def, ui } = seg.eventRange\n  let val = ui.startEditable\n\n  for (let transformer of transformers) {\n    val = transformer(val, def, ui, context)\n  }\n\n  return val\n}\n\nexport function computeSegStartResizable(seg: Seg, context: ViewContext) {\n  return seg.isStart && seg.eventRange.ui.durationEditable && context.options.eventResizableFromStart\n}\n\nexport function computeSegEndResizable(seg: Seg, context: ViewContext) {\n  return seg.isEnd && seg.eventRange.ui.durationEditable\n}\n\nexport function buildSegTimeText(\n  seg: Seg,\n  timeFormat: DateFormatter,\n  context: ViewContext,\n  defaultDisplayEventTime?: boolean, // defaults to true\n  defaultDisplayEventEnd?: boolean, // defaults to true\n  startOverride?: DateMarker,\n  endOverride?: DateMarker,\n) {\n  let { dateEnv, options } = context\n  let { displayEventTime, displayEventEnd } = options\n  let eventDef = seg.eventRange.def\n  let eventInstance = seg.eventRange.instance\n\n  if (displayEventTime == null) { displayEventTime = defaultDisplayEventTime !== false }\n  if (displayEventEnd == null) { displayEventEnd = defaultDisplayEventEnd !== false }\n\n  let wholeEventStart = eventInstance.range.start\n  let wholeEventEnd = eventInstance.range.end\n  let segStart = startOverride || seg.start || seg.eventRange.range.start\n  let segEnd = endOverride || seg.end || seg.eventRange.range.end\n  let isStartDay = startOfDay(wholeEventStart).valueOf() === startOfDay(segStart).valueOf()\n  let isEndDay = startOfDay(addMs(wholeEventEnd, -1)).valueOf() === startOfDay(addMs(segEnd, -1)).valueOf()\n\n  if (displayEventTime && !eventDef.allDay && (isStartDay || isEndDay)) {\n    segStart = isStartDay ? wholeEventStart : segStart\n    segEnd = isEndDay ? wholeEventEnd : segEnd\n\n    if (displayEventEnd && eventDef.hasEnd) {\n      return dateEnv.formatRange(segStart, segEnd, timeFormat, {\n        forcedStartTzo: startOverride ? null : eventInstance.forcedStartTzo, // nooooooooooooo, give tzo if same date\n        forcedEndTzo: endOverride ? null : eventInstance.forcedEndTzo,\n      })\n    }\n    return dateEnv.format(segStart, timeFormat, {\n      forcedTzo: startOverride ? null : eventInstance.forcedStartTzo, // nooooo, same\n    })\n  }\n\n  return ''\n}\n\nexport function getSegMeta(seg: Seg, todayRange: DateRange, nowDate?: DateMarker) { // TODO: make arg order consistent with date util\n  let segRange = seg.eventRange.range\n\n  return {\n    isPast: segRange.end < (nowDate || todayRange.start),\n    isFuture: segRange.start >= (nowDate || todayRange.end),\n    isToday: todayRange && rangeContainsMarker(todayRange, segRange.start),\n  }\n}\n\nexport function getEventClassNames(props: EventContentArg) { // weird that we use this interface, but convenient\n  let classNames: string[] = ['fc-event']\n\n  if (props.isMirror) {\n    classNames.push('fc-event-mirror')\n  }\n\n  if (props.isDraggable) {\n    classNames.push('fc-event-draggable')\n  }\n\n  if (props.isStartResizable || props.isEndResizable) {\n    classNames.push('fc-event-resizable')\n  }\n\n  if (props.isDragging) {\n    classNames.push('fc-event-dragging')\n  }\n\n  if (props.isResizing) {\n    classNames.push('fc-event-resizing')\n  }\n\n  if (props.isSelected) {\n    classNames.push('fc-event-selected')\n  }\n\n  if (props.isStart) {\n    classNames.push('fc-event-start')\n  }\n\n  if (props.isEnd) {\n    classNames.push('fc-event-end')\n  }\n\n  if (props.isPast) {\n    classNames.push('fc-event-past')\n  }\n\n  if (props.isToday) {\n    classNames.push('fc-event-today')\n  }\n\n  if (props.isFuture) {\n    classNames.push('fc-event-future')\n  }\n\n  return classNames\n}\n\nexport function buildEventRangeKey(eventRange: EventRenderRange) {\n  return eventRange.instance\n    ? eventRange.instance.instanceId\n    : `${eventRange.def.defId}:${eventRange.range.start.toISOString()}`\n  // inverse-background events don't have specific instances. TODO: better solution\n}\n\nexport function getSegAnchorAttrs(seg: Seg, context: ViewContext) {\n  let { def, instance } = seg.eventRange\n  let { url } = def\n\n  if (url) {\n    return { href: url }\n  }\n\n  let { emitter, options } = context\n  let { eventInteractive } = options\n\n  if (eventInteractive == null) {\n    eventInteractive = def.interactive\n    if (eventInteractive == null) {\n      eventInteractive = Boolean(emitter.hasHandlers('eventClick'))\n    }\n  }\n\n  // mock what happens in EventClicking\n  if (eventInteractive) {\n    // only attach keyboard-related handlers because click handler is already done in EventClicking\n    return createAriaKeyboardAttrs((ev: UIEvent) => {\n      emitter.trigger('eventClick', {\n        el: ev.target as HTMLElement,\n        event: new EventApi(context, def, instance),\n        jsEvent: ev as MouseEvent,\n        view: context.viewApi,\n      })\n    })\n  }\n\n  return {}\n}\n","import { DateRange, rangesEqual, OpenDateRange } from '../datelib/date-range'\nimport { DateInput, DateEnv } from '../datelib/env'\nimport { Duration } from '../datelib/duration'\nimport { createEventInstance } from './event-instance'\nimport { parseEventDef, refineEventDef } from './event-parse'\nimport { EventRenderRange, compileEventUi } from '../component/event-rendering'\nimport { EventUiHash } from '../component/event-ui'\nimport { CalendarContext } from '../CalendarContext'\nimport { refineProps, identity, Identity } from '../options'\n\n/*\nA data-structure for a date-range that will be visually displayed.\nContains other metadata like allDay, and anything else Components might like to store.\n\nTODO: in future, put otherProps in own object.\n*/\n\nexport interface OpenDateSpanInput {\n  start?: DateInput\n  end?: DateInput\n  allDay?: boolean\n  [otherProp: string]: any\n}\n\nexport interface DateSpanInput extends OpenDateSpanInput {\n  start: DateInput\n  end: DateInput\n}\n\nexport interface OpenDateSpan {\n  range: OpenDateRange\n  allDay: boolean\n  [otherProp: string]: any\n}\n\nexport interface DateSpan extends OpenDateSpan {\n  range: DateRange\n}\n\nexport interface RangeApi {\n  start: Date\n  end: Date\n  startStr: string\n  endStr: string\n}\n\nexport interface DateSpanApi extends RangeApi {\n  allDay: boolean\n}\n\nexport interface RangeApiWithTimeZone extends RangeApi {\n  timeZone: string\n}\n\nexport interface DatePointApi {\n  date: Date\n  dateStr: string\n  allDay: boolean\n}\n\nconst STANDARD_PROPS = {\n  start: identity as Identity<DateInput>,\n  end: identity as Identity<DateInput>,\n  allDay: Boolean,\n}\n\nexport function parseDateSpan(raw: DateSpanInput, dateEnv: DateEnv, defaultDuration?: Duration): DateSpan | null {\n  let span = parseOpenDateSpan(raw, dateEnv)\n  let { range } = span\n\n  if (!range.start) {\n    return null\n  }\n\n  if (!range.end) {\n    if (defaultDuration == null) {\n      return null\n    }\n    range.end = dateEnv.add(range.start, defaultDuration)\n  }\n\n  return span as DateSpan\n}\n\n/*\nTODO: somehow combine with parseRange?\nWill return null if the start/end props were present but parsed invalidly.\n*/\nexport function parseOpenDateSpan(raw: OpenDateSpanInput, dateEnv: DateEnv): OpenDateSpan | null {\n  let { refined: standardProps, extra } = refineProps(raw, STANDARD_PROPS)\n  let startMeta = standardProps.start ? dateEnv.createMarkerMeta(standardProps.start) : null\n  let endMeta = standardProps.end ? dateEnv.createMarkerMeta(standardProps.end) : null\n  let { allDay } = standardProps\n\n  if (allDay == null) {\n    allDay = (startMeta && startMeta.isTimeUnspecified) &&\n      (!endMeta || endMeta.isTimeUnspecified)\n  }\n\n  return {\n    range: {\n      start: startMeta ? startMeta.marker : null,\n      end: endMeta ? endMeta.marker : null,\n    },\n    allDay,\n    ...extra,\n  }\n}\n\nexport function isDateSpansEqual(span0: DateSpan, span1: DateSpan): boolean {\n  return rangesEqual(span0.range, span1.range) &&\n    span0.allDay === span1.allDay &&\n    isSpanPropsEqual(span0, span1)\n}\n\n// the NON-DATE-RELATED props\nfunction isSpanPropsEqual(span0: DateSpan, span1: DateSpan): boolean {\n  for (let propName in span1) {\n    if (propName !== 'range' && propName !== 'allDay') {\n      if (span0[propName] !== span1[propName]) {\n        return false\n      }\n    }\n  }\n\n  // are there any props that span0 has that span1 DOESN'T have?\n  // both have range/allDay, so no need to special-case.\n  for (let propName in span0) {\n    if (!(propName in span1)) {\n      return false\n    }\n  }\n\n  return true\n}\n\nexport function buildDateSpanApi(span: DateSpan, dateEnv: DateEnv): DateSpanApi {\n  return {\n    ...buildRangeApi(span.range, dateEnv, span.allDay),\n    allDay: span.allDay,\n  }\n}\n\nexport function buildRangeApiWithTimeZone(range: DateRange, dateEnv: DateEnv, omitTime?: boolean): RangeApiWithTimeZone {\n  return {\n    ...buildRangeApi(range, dateEnv, omitTime),\n    timeZone: dateEnv.timeZone,\n  }\n}\n\nexport function buildRangeApi(range: DateRange, dateEnv: DateEnv, omitTime?: boolean): RangeApi {\n  return {\n    start: dateEnv.toDate(range.start),\n    end: dateEnv.toDate(range.end),\n    startStr: dateEnv.formatIso(range.start, { omitTime }),\n    endStr: dateEnv.formatIso(range.end, { omitTime }),\n  }\n}\n\nexport function fabricateEventRange(dateSpan: DateSpan, eventUiBases: EventUiHash, context: CalendarContext): EventRenderRange {\n  let res = refineEventDef({ editable: false }, context)\n  let def = parseEventDef(\n    res.refined,\n    res.extra,\n    '', // sourceId\n    dateSpan.allDay,\n    true, // hasEnd\n    context,\n  )\n\n  return {\n    def,\n    ui: compileEventUi(def, eventUiBases),\n    instance: createEventInstance(def.defId, dateSpan.range),\n    range: dateSpan.range,\n    isStart: true,\n    isEnd: true,\n  }\n}\n","import { __assign } from 'tslib'\nimport { PointerDragEvent } from './interactions/pointer'\nimport { buildDateSpanApi, DateSpanApi, DatePointApi, DateSpan } from './structs/date-span'\nimport { CalendarContext } from './CalendarContext'\nimport { ViewApi } from './ViewApi'\nimport { DateMarker, startOfDay } from './datelib/marker'\n\nexport interface DateClickApi extends DatePointApi {\n  dayEl: HTMLElement\n  jsEvent: UIEvent\n  view: ViewApi\n}\n\nexport interface DateSelectionApi extends DateSpanApi {\n  jsEvent: UIEvent\n  view: ViewApi\n}\n\nexport type DatePointTransform = (dateSpan: DateSpan, context: CalendarContext) => any\nexport type DateSpanTransform = (dateSpan: DateSpan, context: CalendarContext) => any\n\nexport type CalendarInteraction = { destroy: () => void }\nexport type CalendarInteractionClass = { new(context: CalendarContext): CalendarInteraction }\n\nexport type OptionChangeHandler = (propValue: any, context: CalendarContext) => void\nexport type OptionChangeHandlerMap = { [propName: string]: OptionChangeHandler }\n\nexport interface DateSelectArg extends DateSpanApi {\n  jsEvent: MouseEvent | null\n  view: ViewApi\n}\n\nexport function triggerDateSelect(selection: DateSpan, pev: PointerDragEvent | null, context: CalendarContext & { viewApi?: ViewApi }) {\n  context.emitter.trigger('select', {\n    ...buildDateSpanApiWithContext(selection, context),\n    jsEvent: pev ? pev.origEvent as MouseEvent : null, // Is this always a mouse event? See #4655\n    view: context.viewApi || context.calendarApi.view,\n  } as DateSelectArg)\n}\n\nexport interface DateUnselectArg {\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\nexport function triggerDateUnselect(pev: PointerDragEvent | null, context: CalendarContext & { viewApi?: ViewApi }) {\n  context.emitter.trigger('unselect', {\n    jsEvent: pev ? pev.origEvent : null,\n    view: context.viewApi || context.calendarApi.view,\n  } as DateUnselectArg)\n}\n\nexport function buildDateSpanApiWithContext(dateSpan: DateSpan, context: CalendarContext) {\n  let props = {} as DateSpanApi\n\n  for (let transform of context.pluginHooks.dateSpanTransforms) {\n    __assign(props, transform(dateSpan, context))\n  }\n\n  __assign(props, buildDateSpanApi(dateSpan, context.dateEnv))\n\n  return props\n}\n\n// Given an event's allDay status and start date, return what its fallback end date should be.\n// TODO: rename to computeDefaultEventEnd\nexport function getDefaultEventEnd(allDay: boolean, marker: DateMarker, context: CalendarContext): DateMarker {\n  let { dateEnv, options } = context\n  let end = marker\n\n  if (allDay) {\n    end = startOfDay(end)\n    end = dateEnv.add(end, options.defaultAllDayEventDuration)\n  } else {\n    end = dateEnv.add(end, options.defaultTimedEventDuration)\n  }\n\n  return end\n}\n","import { Duration } from '../datelib/duration'\nimport { EventStore, createEmptyEventStore } from './event-store'\nimport { EventDef } from './event-def'\nimport { EventInstance } from './event-instance'\nimport { computeAlignedDayRange } from '../util/date'\nimport { startOfDay } from '../datelib/marker'\nimport { EventUiHash, EventUi } from '../component/event-ui'\nimport { compileEventUis } from '../component/event-rendering'\nimport { CalendarContext } from '../CalendarContext'\nimport { getDefaultEventEnd } from '../calendar-utils'\n\n/*\nA data structure for how to modify an EventDef/EventInstance within an EventStore\n*/\n\nexport interface EventMutation {\n  datesDelta?: Duration // body start+end moving together. for dragging\n  startDelta?: Duration // for resizing\n  endDelta?: Duration // for resizing\n  standardProps?: any // for the def. should not include extendedProps\n  extendedProps?: any // for the def\n}\n\n// applies the mutation to ALL defs/instances within the event store\nexport function applyMutationToEventStore(\n  eventStore: EventStore,\n  eventConfigBase: EventUiHash,\n  mutation: EventMutation,\n  context: CalendarContext,\n): EventStore {\n  let eventConfigs = compileEventUis(eventStore.defs, eventConfigBase)\n  let dest = createEmptyEventStore()\n\n  for (let defId in eventStore.defs) {\n    let def = eventStore.defs[defId]\n\n    dest.defs[defId] = applyMutationToEventDef(def, eventConfigs[defId], mutation, context)\n  }\n\n  for (let instanceId in eventStore.instances) {\n    let instance = eventStore.instances[instanceId]\n    let def = dest.defs[instance.defId] // important to grab the newly modified def\n\n    dest.instances[instanceId] = applyMutationToEventInstance(instance, def, eventConfigs[instance.defId], mutation, context)\n  }\n\n  return dest\n}\n\nexport type eventDefMutationApplier = (eventDef: EventDef, mutation: EventMutation, context: CalendarContext) => void\n\nfunction applyMutationToEventDef(eventDef: EventDef, eventConfig: EventUi, mutation: EventMutation, context: CalendarContext): EventDef {\n  let standardProps = mutation.standardProps || {}\n\n  // if hasEnd has not been specified, guess a good value based on deltas.\n  // if duration will change, there's no way the default duration will persist,\n  // and thus, we need to mark the event as having a real end\n  if (\n    standardProps.hasEnd == null &&\n    eventConfig.durationEditable &&\n    (mutation.startDelta || mutation.endDelta)\n  ) {\n    standardProps.hasEnd = true // TODO: is this mutation okay?\n  }\n\n  let copy: EventDef = {\n    ...eventDef,\n    ...standardProps,\n    ui: { ...eventDef.ui, ...standardProps.ui }, // the only prop we want to recursively overlay\n  }\n\n  if (mutation.extendedProps) {\n    copy.extendedProps = { ...copy.extendedProps, ...mutation.extendedProps }\n  }\n\n  for (let applier of context.pluginHooks.eventDefMutationAppliers) {\n    applier(copy, mutation, context)\n  }\n\n  if (!copy.hasEnd && context.options.forceEventDuration) {\n    copy.hasEnd = true\n  }\n\n  return copy\n}\n\nfunction applyMutationToEventInstance(\n  eventInstance: EventInstance,\n  eventDef: EventDef, // must first be modified by applyMutationToEventDef\n  eventConfig: EventUi,\n  mutation: EventMutation,\n  context: CalendarContext,\n): EventInstance {\n  let { dateEnv } = context\n  let forceAllDay = mutation.standardProps && mutation.standardProps.allDay === true\n  let clearEnd = mutation.standardProps && mutation.standardProps.hasEnd === false\n  let copy = { ...eventInstance } as EventInstance\n\n  if (forceAllDay) {\n    copy.range = computeAlignedDayRange(copy.range)\n  }\n\n  if (mutation.datesDelta && eventConfig.startEditable) {\n    copy.range = {\n      start: dateEnv.add(copy.range.start, mutation.datesDelta),\n      end: dateEnv.add(copy.range.end, mutation.datesDelta),\n    }\n  }\n\n  if (mutation.startDelta && eventConfig.durationEditable) {\n    copy.range = {\n      start: dateEnv.add(copy.range.start, mutation.startDelta),\n      end: copy.range.end,\n    }\n  }\n\n  if (mutation.endDelta && eventConfig.durationEditable) {\n    copy.range = {\n      start: copy.range.start,\n      end: dateEnv.add(copy.range.end, mutation.endDelta),\n    }\n  }\n\n  if (clearEnd) {\n    copy.range = {\n      start: copy.range.start,\n      end: getDefaultEventEnd(eventDef.allDay, copy.range.start, context),\n    }\n  }\n\n  // in case event was all-day but the supplied deltas were not\n  // better util for this?\n  if (eventDef.allDay) {\n    copy.range = {\n      start: startOfDay(copy.range.start),\n      end: startOfDay(copy.range.end),\n    }\n  }\n\n  // handle invalid durations\n  if (copy.range.end < copy.range.start) {\n    copy.range.end = getDefaultEventEnd(eventDef.allDay, copy.range.start, context)\n  }\n\n  return copy\n}\n","import { DateEnv } from './datelib/env'\nimport { CalendarData } from './reducers/data-types'\n\n// no public types yet. when there are, export from:\n// import {} from './api-type-deps'\n\nexport class ViewApi { // always represents the current view. otherwise, it'd need to change value every time date changes\n  constructor(\n    public type: string,\n    private getCurrentData: () => CalendarData,\n    private dateEnv: DateEnv,\n  ) {\n  }\n\n  get calendar() {\n    return this.getCurrentData().calendarApi\n  }\n\n  get title() {\n    return this.getCurrentData().viewTitle\n  }\n\n  get activeStart() {\n    return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)\n  }\n\n  get activeEnd() {\n    return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)\n  }\n\n  get currentStart() {\n    return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)\n  }\n\n  get currentEnd() {\n    return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)\n  }\n\n  getOption(name: string) {\n    return this.getCurrentData().options[name] // are the view-specific options\n  }\n}\n","import { EventInput, EventInputTransformer } from './event-parse'\nimport { EventSourceFunc } from '../event-sources/func-event-source'\nimport { EventSource, EventSourceSuccessResponseHandler, EventSourceErrorResponseHandler } from './event-source'\nimport { JSON_FEED_EVENT_SOURCE_REFINERS } from '../event-sources/json-feed-event-source-refiners'\nimport { CalendarContext } from '../CalendarContext'\nimport { guid } from '../util/misc'\nimport { EVENT_UI_REFINERS, createEventUi, EventUiInput, EventUiRefined } from '../component/event-ui'\nimport { identity, Identity, RawOptionsFromRefiners, refineProps, RefinedOptionsFromRefiners } from '../options'\n\nconst EVENT_SOURCE_REFINERS = { // does NOT include EVENT_UI_REFINERS\n  id: String,\n  defaultAllDay: Boolean,\n  url: String,\n  format: String,\n  events: identity as Identity<EventInput[] | EventSourceFunc>, // array or function\n  eventDataTransform: identity as Identity<EventInputTransformer>,\n\n  // for any network-related sources\n  success: identity as Identity<EventSourceSuccessResponseHandler>,\n  failure: identity as Identity<EventSourceErrorResponseHandler>,\n}\n\ntype BuiltInEventSourceRefiners = typeof EVENT_SOURCE_REFINERS &\n  typeof JSON_FEED_EVENT_SOURCE_REFINERS\n\nexport interface EventSourceRefiners extends BuiltInEventSourceRefiners {\n  // for extending\n}\n\nexport type EventSourceInputObject =\n  EventUiInput &\n  RawOptionsFromRefiners<Required<EventSourceRefiners>> // Required hack\n\nexport type EventSourceInput =\n  EventSourceInputObject | // object in extended form\n  EventInput[] |\n  EventSourceFunc | // just a function\n  string // a URL for a JSON feed\n\nexport type EventSourceRefined =\n  EventUiRefined &\n  RefinedOptionsFromRefiners<Required<EventSourceRefiners>> // Required hack\n\nexport function parseEventSource(\n  raw: EventSourceInput,\n  context: CalendarContext,\n  refiners = buildEventSourceRefiners(context),\n): EventSource<any> | null {\n  let rawObj: EventSourceInputObject\n\n  if (typeof raw === 'string') {\n    rawObj = { url: raw }\n  } else if (typeof raw === 'function' || Array.isArray(raw)) {\n    rawObj = { events: raw }\n  } else if (typeof raw === 'object' && raw) { // not null\n    rawObj = raw\n  }\n\n  if (rawObj) {\n    let { refined, extra } = refineProps(rawObj, refiners)\n    let metaRes = buildEventSourceMeta(refined, context)\n\n    if (metaRes) {\n      return {\n        _raw: raw,\n        isFetching: false,\n        latestFetchId: '',\n        fetchRange: null,\n        defaultAllDay: refined.defaultAllDay,\n        eventDataTransform: refined.eventDataTransform,\n        success: refined.success,\n        failure: refined.failure,\n        publicId: refined.id || '',\n        sourceId: guid(),\n        sourceDefId: metaRes.sourceDefId,\n        meta: metaRes.meta,\n        ui: createEventUi(refined, context),\n        extendedProps: extra,\n      }\n    }\n  }\n\n  return null\n}\n\nexport function buildEventSourceRefiners(context: CalendarContext) {\n  return { ...EVENT_UI_REFINERS, ...EVENT_SOURCE_REFINERS, ...context.pluginHooks.eventSourceRefiners }\n}\n\nfunction buildEventSourceMeta(raw: EventSourceRefined, context: CalendarContext) {\n  let defs = context.pluginHooks.eventSourceDefs\n\n  for (let i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence\n    let def = defs[i]\n    let meta = def.parseMeta(raw)\n\n    if (meta) {\n      return { sourceDefId: i, meta }\n    }\n  }\n\n  return null\n}\n","import { DateEnv, DateInput } from '../datelib/env'\nimport { DateMarker } from '../datelib/marker'\nimport { Action } from './Action'\nimport { BaseOptionsRefined } from '../options'\n\nexport function reduceCurrentDate(currentDate: DateMarker, action: Action) {\n  switch (action.type) {\n    case 'CHANGE_DATE':\n      return action.dateMarker\n    default:\n      return currentDate\n  }\n}\n\nexport function getInitialDate(options: BaseOptionsRefined, dateEnv: DateEnv) {\n  let initialDateInput = options.initialDate\n\n  // compute the initial ambig-timezone date\n  if (initialDateInput != null) {\n    return dateEnv.createMarker(initialDateInput)\n  }\n  return getNow(options.now, dateEnv) // getNow already returns unzoned\n}\n\nexport function getNow(nowInput: DateInput | (() => DateInput), dateEnv: DateEnv) {\n  if (typeof nowInput === 'function') {\n    nowInput = nowInput()\n  }\n\n  if (nowInput == null) {\n    return dateEnv.createNowMarker()\n  }\n\n  return dateEnv.createMarker(nowInput)\n}\n","import { DateMarker } from './datelib/marker'\nimport { createFormatter } from './datelib/formatting'\nimport { createDuration } from './datelib/duration'\nimport { parseDateSpan } from './structs/date-span'\nimport { parseEventSource } from './structs/event-source-parse'\nimport { parseEvent } from './structs/event-parse'\nimport { eventTupleToStore } from './structs/event-store'\nimport { ViewSpec } from './structs/view-spec'\nimport { PointerDragEvent } from './interactions/pointer'\nimport { getNow } from './reducers/current-date'\nimport { triggerDateSelect, triggerDateUnselect } from './calendar-utils'\nimport { hashValuesToArray } from './util/object'\nimport { CalendarDataManager } from './reducers/CalendarDataManager'\nimport { Action } from './reducers/Action'\nimport { EventSource } from './structs/event-source'\nimport { eventApiToStore, buildEventApis } from './api/EventApi'\n\n// public\nimport {\n  CalendarOptions,\n  CalendarListeners,\n  DateInput,\n  DurationInput,\n  DateSpanInput,\n  DateRangeInput,\n  EventSourceInput,\n  EventInput,\n  EventSourceApi,\n  EventApi,\n  ViewApi,\n} from './api-type-deps'\n\nexport class CalendarApi {\n  currentDataManager?: CalendarDataManager // will be set by CalendarDataManager\n\n  getCurrentData() {\n    return this.currentDataManager!.getCurrentData()\n  }\n\n  dispatch(action: Action) {\n    return this.currentDataManager!.dispatch(action)\n  }\n\n  get view(): ViewApi { return this.getCurrentData().viewApi } // for public API\n\n  batchRendering(callback: () => void) { // subclasses should implement\n    callback()\n  }\n\n  updateSize() { // public\n    this.trigger('_resize', true)\n  }\n\n  // Options\n  // -----------------------------------------------------------------------------------------------------------------\n\n  setOption<OptionName extends keyof CalendarOptions>(name: OptionName, val: CalendarOptions[OptionName]) {\n    this.dispatch({\n      type: 'SET_OPTION',\n      optionName: name,\n      rawOptionValue: val,\n    })\n  }\n\n  getOption<OptionName extends keyof CalendarOptions>(name: OptionName): CalendarOptions[OptionName] { // getter, used externally. WTF TS\n    return this.currentDataManager!.currentCalendarOptionsInput[name]\n  }\n\n  getAvailableLocaleCodes() {\n    return Object.keys(this.getCurrentData().availableRawLocales)\n  }\n\n  // Trigger\n  // -----------------------------------------------------------------------------------------------------------------\n\n  on<ListenerName extends keyof CalendarListeners>(handlerName: ListenerName, handler: CalendarListeners[ListenerName]) {\n    let { currentDataManager } = this\n\n    if (currentDataManager.currentCalendarOptionsRefiners[handlerName]) {\n      currentDataManager.emitter.on(handlerName, handler)\n    } else {\n      console.warn(`Unknown listener name '${handlerName}'`)\n    }\n  }\n\n  off<ListenerName extends keyof CalendarListeners>(handlerName: ListenerName, handler: CalendarListeners[ListenerName]) {\n    this.currentDataManager!.emitter.off(handlerName, handler)\n  }\n\n  // not meant for public use\n  trigger<ListenerName extends keyof CalendarListeners>(handlerName: ListenerName, ...args: Parameters<CalendarListeners[ListenerName]>) {\n    this.currentDataManager!.emitter.trigger(handlerName, ...args)\n  }\n\n  // View\n  // -----------------------------------------------------------------------------------------------------------------\n\n  changeView(viewType: string, dateOrRange?: DateRangeInput | DateInput) {\n    this.batchRendering(() => {\n      this.unselect()\n\n      if (dateOrRange) {\n        if ((dateOrRange as DateRangeInput).start && (dateOrRange as DateRangeInput).end) { // a range\n          this.dispatch({\n            type: 'CHANGE_VIEW_TYPE',\n            viewType,\n          })\n          this.dispatch({ // not very efficient to do two dispatches\n            type: 'SET_OPTION',\n            optionName: 'visibleRange',\n            rawOptionValue: dateOrRange,\n          })\n        } else {\n          let { dateEnv } = this.getCurrentData()\n\n          this.dispatch({\n            type: 'CHANGE_VIEW_TYPE',\n            viewType,\n            dateMarker: dateEnv.createMarker(dateOrRange as DateInput),\n          })\n        }\n      } else {\n        this.dispatch({\n          type: 'CHANGE_VIEW_TYPE',\n          viewType,\n        })\n      }\n    })\n  }\n\n  // Forces navigation to a view for the given date.\n  // `viewType` can be a specific view name or a generic one like \"week\" or \"day\".\n  // needs to change\n  zoomTo(dateMarker: DateMarker, viewType?: string) {\n    let state = this.getCurrentData()\n    let spec\n\n    viewType = viewType || 'day' // day is default zoom\n    spec = state.viewSpecs[viewType] || this.getUnitViewSpec(viewType)\n\n    this.unselect()\n\n    if (spec) {\n      this.dispatch({\n        type: 'CHANGE_VIEW_TYPE',\n        viewType: spec.type,\n        dateMarker,\n      })\n    } else {\n      this.dispatch({\n        type: 'CHANGE_DATE',\n        dateMarker,\n      })\n    }\n  }\n\n  // Given a duration singular unit, like \"week\" or \"day\", finds a matching view spec.\n  // Preference is given to views that have corresponding buttons.\n  private getUnitViewSpec(unit: string): ViewSpec | null {\n    let { viewSpecs, toolbarConfig } = this.getCurrentData()\n    let viewTypes = [].concat(\n      toolbarConfig.header ? toolbarConfig.header.viewsWithButtons : [],\n      toolbarConfig.footer ? toolbarConfig.footer.viewsWithButtons : [],\n    )\n    let i\n    let spec\n\n    for (let viewType in viewSpecs) {\n      viewTypes.push(viewType)\n    }\n\n    for (i = 0; i < viewTypes.length; i += 1) {\n      spec = viewSpecs[viewTypes[i]]\n      if (spec) {\n        if (spec.singleUnit === unit) {\n          return spec\n        }\n      }\n    }\n\n    return null\n  }\n\n  // Current Date\n  // -----------------------------------------------------------------------------------------------------------------\n\n  prev() {\n    this.unselect()\n    this.dispatch({ type: 'PREV' })\n  }\n\n  next() {\n    this.unselect()\n    this.dispatch({ type: 'NEXT' })\n  }\n\n  prevYear() {\n    let state = this.getCurrentData()\n    this.unselect()\n    this.dispatch({\n      type: 'CHANGE_DATE',\n      dateMarker: state.dateEnv.addYears(state.currentDate, -1),\n    })\n  }\n\n  nextYear() {\n    let state = this.getCurrentData()\n\n    this.unselect()\n    this.dispatch({\n      type: 'CHANGE_DATE',\n      dateMarker: state.dateEnv.addYears(state.currentDate, 1),\n    })\n  }\n\n  today() {\n    let state = this.getCurrentData()\n\n    this.unselect()\n    this.dispatch({\n      type: 'CHANGE_DATE',\n      dateMarker: getNow(state.calendarOptions.now, state.dateEnv),\n    })\n  }\n\n  gotoDate(zonedDateInput) {\n    let state = this.getCurrentData()\n\n    this.unselect()\n    this.dispatch({\n      type: 'CHANGE_DATE',\n      dateMarker: state.dateEnv.createMarker(zonedDateInput),\n    })\n  }\n\n  incrementDate(deltaInput) { // is public facing\n    let state = this.getCurrentData()\n    let delta = createDuration(deltaInput)\n\n    if (delta) { // else, warn about invalid input?\n      this.unselect()\n      this.dispatch({\n        type: 'CHANGE_DATE',\n        dateMarker: state.dateEnv.add(state.currentDate, delta),\n      })\n    }\n  }\n\n  // for external API\n  getDate(): Date {\n    let state = this.getCurrentData()\n    return state.dateEnv.toDate(state.currentDate)\n  }\n\n  // Date Formatting Utils\n  // -----------------------------------------------------------------------------------------------------------------\n\n  formatDate(d: DateInput, formatter): string {\n    let { dateEnv } = this.getCurrentData()\n\n    return dateEnv.format(\n      dateEnv.createMarker(d),\n      createFormatter(formatter),\n    )\n  }\n\n  // `settings` is for formatter AND isEndExclusive\n  formatRange(d0: DateInput, d1: DateInput, settings) {\n    let { dateEnv } = this.getCurrentData()\n\n    return dateEnv.formatRange(\n      dateEnv.createMarker(d0),\n      dateEnv.createMarker(d1),\n      createFormatter(settings),\n      settings,\n    )\n  }\n\n  formatIso(d: DateInput, omitTime?: boolean) {\n    let { dateEnv } = this.getCurrentData()\n\n    return dateEnv.formatIso(dateEnv.createMarker(d), { omitTime })\n  }\n\n  // Date Selection / Event Selection / DayClick\n  // -----------------------------------------------------------------------------------------------------------------\n\n  // this public method receives start/end dates in any format, with any timezone\n  // NOTE: args were changed from v3\n  select(dateOrObj: DateInput | any, endDate?: DateInput) {\n    let selectionInput: DateSpanInput\n\n    if (endDate == null) {\n      if (dateOrObj.start != null) {\n        selectionInput = dateOrObj as DateSpanInput\n      } else {\n        selectionInput = {\n          start: dateOrObj,\n          end: null,\n        }\n      }\n    } else {\n      selectionInput = {\n        start: dateOrObj,\n        end: endDate,\n      } as DateSpanInput\n    }\n\n    let state = this.getCurrentData()\n    let selection = parseDateSpan(\n      selectionInput,\n      state.dateEnv,\n      createDuration({ days: 1 }), // TODO: cache this?\n    )\n\n    if (selection) { // throw parse error otherwise?\n      this.dispatch({ type: 'SELECT_DATES', selection })\n      triggerDateSelect(selection, null, state)\n    }\n  }\n\n  // public method\n  unselect(pev?: PointerDragEvent) {\n    let state = this.getCurrentData()\n\n    if (state.dateSelection) {\n      this.dispatch({ type: 'UNSELECT_DATES' })\n      triggerDateUnselect(pev, state)\n    }\n  }\n\n  // Public Events API\n  // -----------------------------------------------------------------------------------------------------------------\n\n  addEvent(eventInput: EventInput, sourceInput?: EventSourceApi | string | boolean): EventApi | null {\n    if (eventInput instanceof EventApi) {\n      let def = eventInput._def\n      let instance = eventInput._instance\n      let currentData = this.getCurrentData()\n\n      // not already present? don't want to add an old snapshot\n      if (!currentData.eventStore.defs[def.defId]) {\n        this.dispatch({\n          type: 'ADD_EVENTS',\n          eventStore: eventTupleToStore({ def, instance }), // TODO: better util for two args?\n        })\n        this.triggerEventAdd(eventInput)\n      }\n\n      return eventInput\n    }\n\n    let state = this.getCurrentData()\n    let eventSource: EventSource<any>\n\n    if (sourceInput instanceof EventSourceApi) {\n      eventSource = sourceInput.internalEventSource\n    } else if (typeof sourceInput === 'boolean') {\n      if (sourceInput) { // true. part of the first event source\n        [eventSource] = hashValuesToArray(state.eventSources)\n      }\n    } else if (sourceInput != null) { // an ID. accepts a number too\n      let sourceApi = this.getEventSourceById(sourceInput) // TODO: use an internal function\n\n      if (!sourceApi) {\n        console.warn(`Could not find an event source with ID \"${sourceInput}\"`) // TODO: test\n        return null\n      }\n      eventSource = sourceApi.internalEventSource\n    }\n\n    let tuple = parseEvent(eventInput, eventSource, state, false)\n\n    if (tuple) {\n      let newEventApi = new EventApi(\n        state,\n        tuple.def,\n        tuple.def.recurringDef ? null : tuple.instance,\n      )\n      this.dispatch({\n        type: 'ADD_EVENTS',\n        eventStore: eventTupleToStore(tuple),\n      })\n      this.triggerEventAdd(newEventApi)\n\n      return newEventApi\n    }\n\n    return null\n  }\n\n  private triggerEventAdd(eventApi: EventApi) {\n    let { emitter } = this.getCurrentData()\n\n    emitter.trigger('eventAdd', {\n      event: eventApi,\n      relatedEvents: [],\n      revert: () => {\n        this.dispatch({\n          type: 'REMOVE_EVENTS',\n          eventStore: eventApiToStore(eventApi),\n        })\n      },\n    })\n  }\n\n  // TODO: optimize\n  getEventById(id: string): EventApi | null {\n    let state = this.getCurrentData()\n    let { defs, instances } = state.eventStore\n    id = String(id)\n\n    for (let defId in defs) {\n      let def = defs[defId]\n\n      if (def.publicId === id) {\n        if (def.recurringDef) {\n          return new EventApi(state, def, null)\n        }\n\n        for (let instanceId in instances) {\n          let instance = instances[instanceId]\n\n          if (instance.defId === def.defId) {\n            return new EventApi(state, def, instance)\n          }\n        }\n      }\n    }\n\n    return null\n  }\n\n  getEvents(): EventApi[] {\n    let currentData = this.getCurrentData()\n\n    return buildEventApis(currentData.eventStore, currentData)\n  }\n\n  removeAllEvents() {\n    this.dispatch({ type: 'REMOVE_ALL_EVENTS' })\n  }\n\n  // Public Event Sources API\n  // -----------------------------------------------------------------------------------------------------------------\n\n  getEventSources(): EventSourceApi[] {\n    let state = this.getCurrentData()\n    let sourceHash = state.eventSources\n    let sourceApis: EventSourceApi[] = []\n\n    for (let internalId in sourceHash) {\n      sourceApis.push(new EventSourceApi(state, sourceHash[internalId]))\n    }\n\n    return sourceApis\n  }\n\n  getEventSourceById(id: string): EventSourceApi | null {\n    let state = this.getCurrentData()\n    let sourceHash = state.eventSources\n    id = String(id)\n\n    for (let sourceId in sourceHash) {\n      if (sourceHash[sourceId].publicId === id) {\n        return new EventSourceApi(state, sourceHash[sourceId])\n      }\n    }\n\n    return null\n  }\n\n  addEventSource(sourceInput: EventSourceInput): EventSourceApi {\n    let state = this.getCurrentData()\n\n    if (sourceInput instanceof EventSourceApi) {\n      // not already present? don't want to add an old snapshot\n      if (!state.eventSources[sourceInput.internalEventSource.sourceId]) {\n        this.dispatch({\n          type: 'ADD_EVENT_SOURCES',\n          sources: [sourceInput.internalEventSource],\n        })\n      }\n\n      return sourceInput\n    }\n\n    let eventSource = parseEventSource(sourceInput, state)\n\n    if (eventSource) { // TODO: error otherwise?\n      this.dispatch({ type: 'ADD_EVENT_SOURCES', sources: [eventSource] })\n\n      return new EventSourceApi(state, eventSource)\n    }\n\n    return null\n  }\n\n  removeAllEventSources() {\n    this.dispatch({ type: 'REMOVE_ALL_EVENT_SOURCES' })\n  }\n\n  refetchEvents() {\n    this.dispatch({ type: 'FETCH_EVENT_SOURCES', isRefetch: true })\n  }\n\n  // Scroll\n  // -----------------------------------------------------------------------------------------------------------------\n\n  scrollToTime(timeInput: DurationInput) {\n    let time = createDuration(timeInput)\n\n    if (time) {\n      this.trigger('_scrollRequest', { time })\n    }\n  }\n}\n","import { __assign } from 'tslib'\nimport { EventDef } from '../structs/event-def'\nimport { EVENT_NON_DATE_REFINERS, EVENT_DATE_REFINERS } from '../structs/event-parse'\nimport { EventInstance } from '../structs/event-instance'\nimport { EVENT_UI_REFINERS, EventUiHash } from '../component/event-ui'\nimport { EventMutation, applyMutationToEventStore } from '../structs/event-mutation'\nimport { diffDates, computeAlignedDayRange } from '../util/date'\nimport { createDuration, durationsEqual } from '../datelib/duration'\nimport { createFormatter } from '../datelib/formatting'\nimport { CalendarContext } from '../CalendarContext'\nimport { getRelevantEvents, EventStore } from '../structs/event-store'\nimport { Dictionary } from '../options'\n\n// public\nimport {\n  DateInput,\n  DurationInput,\n  FormatterInput,\n  EventSourceApi,\n} from '../api-type-deps'\n\nexport class EventApi {\n  _context: CalendarContext\n  _def: EventDef\n  _instance: EventInstance | null\n  // instance will be null if expressing a recurring event that has no current instances,\n  // OR if trying to validate an incoming external event that has no dates assigned\n\n  constructor(context: CalendarContext, def: EventDef, instance?: EventInstance) {\n    this._context = context\n    this._def = def\n    this._instance = instance || null\n  }\n\n  /*\n  TODO: make event struct more responsible for this\n  */\n  setProp(name: string, val: any) {\n    if (name in EVENT_DATE_REFINERS) {\n      console.warn('Could not set date-related prop \\'name\\'. Use one of the date-related methods instead.')\n    // TODO: make proper aliasing system?\n    } else if (name === 'id') {\n      val = EVENT_NON_DATE_REFINERS[name](val)\n\n      this.mutate({\n        standardProps: { publicId: val }, // hardcoded internal name\n      })\n    } else if (name in EVENT_NON_DATE_REFINERS) {\n      val = EVENT_NON_DATE_REFINERS[name](val)\n\n      this.mutate({\n        standardProps: { [name]: val },\n      })\n    } else if (name in EVENT_UI_REFINERS) {\n      let ui = EVENT_UI_REFINERS[name](val)\n\n      if (name === 'color') {\n        ui = { backgroundColor: val, borderColor: val }\n      } else if (name === 'editable') {\n        ui = { startEditable: val, durationEditable: val }\n      } else {\n        ui = { [name]: val }\n      }\n\n      this.mutate({\n        standardProps: { ui },\n      })\n    } else {\n      console.warn(`Could not set prop '${name}'. Use setExtendedProp instead.`)\n    }\n  }\n\n  setExtendedProp(name: string, val: any) {\n    this.mutate({\n      extendedProps: { [name]: val },\n    })\n  }\n\n  setStart(startInput: DateInput, options: { granularity?: string, maintainDuration?: boolean } = {}) {\n    let { dateEnv } = this._context\n    let start = dateEnv.createMarker(startInput)\n\n    if (start && this._instance) { // TODO: warning if parsed bad\n      let instanceRange = this._instance.range\n      let startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity) // what if parsed bad!?\n\n      if (options.maintainDuration) {\n        this.mutate({ datesDelta: startDelta })\n      } else {\n        this.mutate({ startDelta })\n      }\n    }\n  }\n\n  setEnd(endInput: DateInput | null, options: { granularity?: string } = {}) {\n    let { dateEnv } = this._context\n    let end\n\n    if (endInput != null) {\n      end = dateEnv.createMarker(endInput)\n\n      if (!end) {\n        return // TODO: warning if parsed bad\n      }\n    }\n\n    if (this._instance) {\n      if (end) {\n        let endDelta = diffDates(this._instance.range.end, end, dateEnv, options.granularity)\n        this.mutate({ endDelta })\n      } else {\n        this.mutate({ standardProps: { hasEnd: false } })\n      }\n    }\n  }\n\n  setDates(startInput: DateInput, endInput: DateInput | null, options: { allDay?: boolean, granularity?: string } = {}) {\n    let { dateEnv } = this._context\n    let standardProps = { allDay: options.allDay } as any\n    let start = dateEnv.createMarker(startInput)\n    let end\n\n    if (!start) {\n      return // TODO: warning if parsed bad\n    }\n\n    if (endInput != null) {\n      end = dateEnv.createMarker(endInput)\n\n      if (!end) { // TODO: warning if parsed bad\n        return\n      }\n    }\n\n    if (this._instance) {\n      let instanceRange = this._instance.range\n\n      // when computing the diff for an event being converted to all-day,\n      // compute diff off of the all-day values the way event-mutation does.\n      if (options.allDay === true) {\n        instanceRange = computeAlignedDayRange(instanceRange)\n      }\n\n      let startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity)\n\n      if (end) {\n        let endDelta = diffDates(instanceRange.end, end, dateEnv, options.granularity)\n\n        if (durationsEqual(startDelta, endDelta)) {\n          this.mutate({ datesDelta: startDelta, standardProps })\n        } else {\n          this.mutate({ startDelta, endDelta, standardProps })\n        }\n      } else { // means \"clear the end\"\n        standardProps.hasEnd = false\n        this.mutate({ datesDelta: startDelta, standardProps })\n      }\n    }\n  }\n\n  moveStart(deltaInput: DurationInput) {\n    let delta = createDuration(deltaInput)\n\n    if (delta) { // TODO: warning if parsed bad\n      this.mutate({ startDelta: delta })\n    }\n  }\n\n  moveEnd(deltaInput: DurationInput) {\n    let delta = createDuration(deltaInput)\n\n    if (delta) { // TODO: warning if parsed bad\n      this.mutate({ endDelta: delta })\n    }\n  }\n\n  moveDates(deltaInput: DurationInput) {\n    let delta = createDuration(deltaInput)\n\n    if (delta) { // TODO: warning if parsed bad\n      this.mutate({ datesDelta: delta })\n    }\n  }\n\n  setAllDay(allDay: boolean, options: { maintainDuration?: boolean } = {}) {\n    let standardProps = { allDay } as any\n    let { maintainDuration } = options\n\n    if (maintainDuration == null) {\n      maintainDuration = this._context.options.allDayMaintainDuration\n    }\n\n    if (this._def.allDay !== allDay) {\n      standardProps.hasEnd = maintainDuration\n    }\n\n    this.mutate({ standardProps })\n  }\n\n  formatRange(formatInput: FormatterInput) {\n    let { dateEnv } = this._context\n    let instance = this._instance\n    let formatter = createFormatter(formatInput)\n\n    if (this._def.hasEnd) {\n      return dateEnv.formatRange(instance.range.start, instance.range.end, formatter, {\n        forcedStartTzo: instance.forcedStartTzo,\n        forcedEndTzo: instance.forcedEndTzo,\n      })\n    }\n    return dateEnv.format(instance.range.start, formatter, {\n      forcedTzo: instance.forcedStartTzo,\n    })\n  }\n\n  mutate(mutation: EventMutation) { // meant to be private. but plugins need access\n    let instance = this._instance\n\n    if (instance) {\n      let def = this._def\n      let context = this._context\n      let { eventStore } = context.getCurrentData()\n      let relevantEvents = getRelevantEvents(eventStore, instance.instanceId)\n      let eventConfigBase = {\n        '': { // HACK. always allow API to mutate events\n          display: '',\n          startEditable: true,\n          durationEditable: true,\n          constraints: [],\n          overlap: null,\n          allows: [],\n          backgroundColor: '',\n          borderColor: '',\n          textColor: '',\n          classNames: [],\n        },\n      } as EventUiHash\n\n      relevantEvents = applyMutationToEventStore(relevantEvents, eventConfigBase, mutation, context)\n\n      let oldEvent = new EventApi(context, def, instance) // snapshot\n      this._def = relevantEvents.defs[def.defId]\n      this._instance = relevantEvents.instances[instance.instanceId]\n\n      context.dispatch({\n        type: 'MERGE_EVENTS',\n        eventStore: relevantEvents,\n      })\n\n      context.emitter.trigger('eventChange', {\n        oldEvent,\n        event: this,\n        relatedEvents: buildEventApis(relevantEvents, context, instance),\n        revert() {\n          context.dispatch({\n            type: 'RESET_EVENTS',\n            eventStore, // the ORIGINAL store\n          })\n        },\n      })\n    }\n  }\n\n  remove() {\n    let context = this._context\n    let asStore = eventApiToStore(this)\n\n    context.dispatch({\n      type: 'REMOVE_EVENTS',\n      eventStore: asStore,\n    })\n\n    context.emitter.trigger('eventRemove', {\n      event: this,\n      relatedEvents: [],\n      revert() {\n        context.dispatch({\n          type: 'MERGE_EVENTS',\n          eventStore: asStore,\n        })\n      },\n    })\n  }\n\n  get source(): EventSourceApi | null {\n    let { sourceId } = this._def\n\n    if (sourceId) {\n      return new EventSourceApi(\n        this._context,\n        this._context.getCurrentData().eventSources[sourceId],\n      )\n    }\n    return null\n  }\n\n  get start(): Date | null {\n    return this._instance ?\n      this._context.dateEnv.toDate(this._instance.range.start) :\n      null\n  }\n\n  get end(): Date | null {\n    return (this._instance && this._def.hasEnd) ?\n      this._context.dateEnv.toDate(this._instance.range.end) :\n      null\n  }\n\n  get startStr(): string {\n    let instance = this._instance\n    if (instance) {\n      return this._context.dateEnv.formatIso(instance.range.start, {\n        omitTime: this._def.allDay,\n        forcedTzo: instance.forcedStartTzo,\n      })\n    }\n    return ''\n  }\n\n  get endStr(): string {\n    let instance = this._instance\n    if (instance && this._def.hasEnd) {\n      return this._context.dateEnv.formatIso(instance.range.end, {\n        omitTime: this._def.allDay,\n        forcedTzo: instance.forcedEndTzo,\n      })\n    }\n    return ''\n  }\n\n  // computable props that all access the def\n  // TODO: find a TypeScript-compatible way to do this at scale\n  get id() { return this._def.publicId }\n  get groupId() { return this._def.groupId }\n  get allDay() { return this._def.allDay }\n  get title() { return this._def.title }\n  get url() { return this._def.url }\n  get display() { return this._def.ui.display || 'auto' } // bad. just normalize the type earlier\n  get startEditable() { return this._def.ui.startEditable }\n  get durationEditable() { return this._def.ui.durationEditable }\n  get constraint() { return this._def.ui.constraints[0] || null }\n  get overlap() { return this._def.ui.overlap }\n  get allow() { return this._def.ui.allows[0] || null }\n  get backgroundColor() { return this._def.ui.backgroundColor }\n  get borderColor() { return this._def.ui.borderColor }\n  get textColor() { return this._def.ui.textColor }\n\n  // NOTE: user can't modify these because Object.freeze was called in event-def parsing\n  get classNames() { return this._def.ui.classNames }\n  get extendedProps() { return this._def.extendedProps }\n\n  toPlainObject(settings: { collapseExtendedProps?: boolean, collapseColor?: boolean } = {}): Dictionary {\n    let def = this._def\n    let { ui } = def\n    let { startStr, endStr } = this\n    let res: Dictionary = {}\n\n    if (def.title) {\n      res.title = def.title\n    }\n\n    if (startStr) {\n      res.start = startStr\n    }\n\n    if (endStr) {\n      res.end = endStr\n    }\n\n    if (def.publicId) {\n      res.id = def.publicId\n    }\n\n    if (def.groupId) {\n      res.groupId = def.groupId\n    }\n\n    if (def.url) {\n      res.url = def.url\n    }\n\n    if (ui.display && ui.display !== 'auto') {\n      res.display = ui.display\n    }\n\n    // TODO: what about recurring-event properties???\n    // TODO: include startEditable/durationEditable/constraint/overlap/allow\n\n    if (settings.collapseColor && ui.backgroundColor && ui.backgroundColor === ui.borderColor) {\n      res.color = ui.backgroundColor\n    } else {\n      if (ui.backgroundColor) {\n        res.backgroundColor = ui.backgroundColor\n      }\n      if (ui.borderColor) {\n        res.borderColor = ui.borderColor\n      }\n    }\n\n    if (ui.textColor) {\n      res.textColor = ui.textColor\n    }\n\n    if (ui.classNames.length) {\n      res.classNames = ui.classNames\n    }\n\n    if (Object.keys(def.extendedProps).length) {\n      if (settings.collapseExtendedProps) {\n        __assign(res, def.extendedProps)\n      } else {\n        res.extendedProps = def.extendedProps\n      }\n    }\n\n    return res\n  }\n\n  toJSON() {\n    return this.toPlainObject()\n  }\n}\n\nexport function eventApiToStore(eventApi: EventApi): EventStore {\n  let def = eventApi._def\n  let instance = eventApi._instance\n\n  return {\n    defs: { [def.defId]: def },\n    instances: instance\n      ? { [instance.instanceId]: instance }\n      : {},\n  }\n}\n\nexport function buildEventApis(eventStore: EventStore, context: CalendarContext, excludeInstance?: EventInstance): EventApi[] {\n  let { defs, instances } = eventStore\n  let eventApis: EventApi[] = []\n  let excludeInstanceId = excludeInstance ? excludeInstance.instanceId : ''\n\n  for (let id in instances) {\n    let instance = instances[id]\n    let def = defs[instance.defId]\n\n    if (instance.instanceId !== excludeInstanceId) {\n      eventApis.push(new EventApi(context, def, instance))\n    }\n  }\n\n  return eventApis\n}\n","import { DateMarker, arrayToUtcDate, dateToUtcArray } from './marker'\n\nexport interface CalendarSystem {\n  getMarkerYear(d: DateMarker): number\n  getMarkerMonth(d: DateMarker): number\n  getMarkerDay(d: DateMarker): number\n  arrayToMarker(arr: number[]): DateMarker\n  markerToArray(d: DateMarker): number[]\n}\n\nlet calendarSystemClassMap = {}\n\nexport function registerCalendarSystem(name, theClass) {\n  calendarSystemClassMap[name] = theClass\n}\n\nexport function createCalendarSystem(name) {\n  return new calendarSystemClassMap[name]()\n}\n\nclass GregorianCalendarSystem implements CalendarSystem {\n  getMarkerYear(d: DateMarker) {\n    return d.getUTCFullYear()\n  }\n\n  getMarkerMonth(d: DateMarker) {\n    return d.getUTCMonth()\n  }\n\n  getMarkerDay(d: DateMarker) {\n    return d.getUTCDate()\n  }\n\n  arrayToMarker(arr) {\n    return arrayToUtcDate(arr)\n  }\n\n  markerToArray(marker) {\n    return dateToUtcArray(marker)\n  }\n}\n\nregisterCalendarSystem('gregory', GregorianCalendarSystem)\n","import { isValidDate } from './marker'\n\nconst ISO_RE = /^\\s*(\\d{4})(-?(\\d{2})(-?(\\d{2})([T ](\\d{2}):?(\\d{2})(:?(\\d{2})(\\.(\\d+))?)?(Z|(([-+])(\\d{2})(:?(\\d{2}))?))?)?)?)?$/\n\nexport function parse(str) {\n  let m = ISO_RE.exec(str)\n\n  if (m) {\n    let marker = new Date(Date.UTC(\n      Number(m[1]),\n      m[3] ? Number(m[3]) - 1 : 0,\n      Number(m[5] || 1),\n      Number(m[7] || 0),\n      Number(m[8] || 0),\n      Number(m[10] || 0),\n      m[12] ? Number(`0.${m[12]}`) * 1000 : 0,\n    ))\n\n    if (isValidDate(marker)) {\n      let timeZoneOffset = null\n\n      if (m[13]) {\n        timeZoneOffset = (m[15] === '-' ? -1 : 1) * (\n          Number(m[16] || 0) * 60 +\n          Number(m[18] || 0)\n        )\n      }\n\n      return {\n        marker,\n        isTimeUnspecified: !m[6],\n        timeZoneOffset,\n      }\n    }\n  }\n\n  return null\n}\n","import {\n  DateMarker, addMs,\n  diffHours, diffMinutes, diffSeconds, diffWholeWeeks, diffWholeDays,\n  startOfDay, startOfHour, startOfMinute, startOfSecond,\n  weekOfYear, arrayToUtcDate, dateToUtcArray, dateToLocalArray, arrayToLocalDate, timeAsMs, isValidDate,\n} from './marker'\nimport { CalendarSystem, createCalendarSystem } from './calendar-system'\nimport { Locale } from './locale'\nimport { NamedTimeZoneImpl, NamedTimeZoneImplClass } from './timezone'\nimport { Duration, asRoughYears, asRoughMonths, asRoughDays, asRoughMs } from './duration'\nimport { DateFormatter, CmdFormatterFunc } from './DateFormatter'\nimport { buildIsoString } from './formatting-utils'\nimport { parse } from './parsing'\nimport { isInt } from '../util/misc'\n\nexport type WeekNumberCalculation = 'local' | 'ISO' | ((m: Date) => number)\n\nexport interface DateEnvSettings {\n  timeZone: string\n  namedTimeZoneImpl?: NamedTimeZoneImplClass\n  calendarSystem: string\n  locale: Locale\n  weekNumberCalculation?: WeekNumberCalculation\n  firstDay?: number, // will override what the locale wants\n  weekText?: string,\n  weekTextLong?: string\n  cmdFormatter?: CmdFormatterFunc\n  defaultSeparator?: string\n}\n\nexport type DateInput = Date | string | number | number[]\n\nexport interface DateMarkerMeta {\n  marker: DateMarker\n  isTimeUnspecified: boolean\n  forcedTzo: number | null\n}\n\nexport class DateEnv {\n  timeZone: string\n  namedTimeZoneImpl: NamedTimeZoneImpl\n  canComputeOffset: boolean\n\n  calendarSystem: CalendarSystem\n  locale: Locale\n  weekDow: number // which day begins the week\n  weekDoy: number // which day must be within the year, for computing the first week number\n  weekNumberFunc: any\n  weekText: string // DON'T LIKE how options are confused with local\n  weekTextLong: string\n  cmdFormatter?: CmdFormatterFunc\n  defaultSeparator: string\n\n  constructor(settings: DateEnvSettings) {\n    let timeZone = this.timeZone = settings.timeZone\n    let isNamedTimeZone = timeZone !== 'local' && timeZone !== 'UTC'\n\n    if (settings.namedTimeZoneImpl && isNamedTimeZone) {\n      this.namedTimeZoneImpl = new settings.namedTimeZoneImpl(timeZone)\n    }\n\n    this.canComputeOffset = Boolean(!isNamedTimeZone || this.namedTimeZoneImpl)\n\n    this.calendarSystem = createCalendarSystem(settings.calendarSystem)\n    this.locale = settings.locale\n    this.weekDow = settings.locale.week.dow\n    this.weekDoy = settings.locale.week.doy\n\n    if (settings.weekNumberCalculation === 'ISO') {\n      this.weekDow = 1\n      this.weekDoy = 4\n    }\n\n    if (typeof settings.firstDay === 'number') {\n      this.weekDow = settings.firstDay\n    }\n\n    if (typeof settings.weekNumberCalculation === 'function') {\n      this.weekNumberFunc = settings.weekNumberCalculation\n    }\n\n    this.weekText = settings.weekText != null ? settings.weekText : settings.locale.options.weekText\n    this.weekTextLong = (settings.weekTextLong != null ? settings.weekTextLong : settings.locale.options.weekTextLong) || this.weekText\n\n    this.cmdFormatter = settings.cmdFormatter\n    this.defaultSeparator = settings.defaultSeparator\n  }\n\n  // Creating / Parsing\n\n  createMarker(input: DateInput): DateMarker {\n    let meta = this.createMarkerMeta(input)\n    if (meta === null) {\n      return null\n    }\n    return meta.marker\n  }\n\n  createNowMarker(): DateMarker {\n    if (this.canComputeOffset) {\n      return this.timestampToMarker(new Date().valueOf())\n    }\n    // if we can't compute the current date val for a timezone,\n    // better to give the current local date vals than UTC\n    return arrayToUtcDate(dateToLocalArray(new Date()))\n  }\n\n  createMarkerMeta(input: DateInput): DateMarkerMeta {\n    if (typeof input === 'string') {\n      return this.parse(input)\n    }\n\n    let marker = null\n\n    if (typeof input === 'number') {\n      marker = this.timestampToMarker(input)\n    } else if (input instanceof Date) {\n      input = input.valueOf()\n\n      if (!isNaN(input)) {\n        marker = this.timestampToMarker(input)\n      }\n    } else if (Array.isArray(input)) {\n      marker = arrayToUtcDate(input)\n    }\n\n    if (marker === null || !isValidDate(marker)) {\n      return null\n    }\n\n    return { marker, isTimeUnspecified: false, forcedTzo: null }\n  }\n\n  parse(s: string) {\n    let parts = parse(s)\n    if (parts === null) {\n      return null\n    }\n\n    let { marker } = parts\n    let forcedTzo = null\n\n    if (parts.timeZoneOffset !== null) {\n      if (this.canComputeOffset) {\n        marker = this.timestampToMarker(marker.valueOf() - parts.timeZoneOffset * 60 * 1000)\n      } else {\n        forcedTzo = parts.timeZoneOffset\n      }\n    }\n\n    return { marker, isTimeUnspecified: parts.isTimeUnspecified, forcedTzo }\n  }\n\n  // Accessors\n\n  getYear(marker: DateMarker): number {\n    return this.calendarSystem.getMarkerYear(marker)\n  }\n\n  getMonth(marker: DateMarker): number {\n    return this.calendarSystem.getMarkerMonth(marker)\n  }\n\n  // Adding / Subtracting\n\n  add(marker: DateMarker, dur: Duration): DateMarker {\n    let a = this.calendarSystem.markerToArray(marker)\n    a[0] += dur.years\n    a[1] += dur.months\n    a[2] += dur.days\n    a[6] += dur.milliseconds\n    return this.calendarSystem.arrayToMarker(a)\n  }\n\n  subtract(marker: DateMarker, dur: Duration): DateMarker {\n    let a = this.calendarSystem.markerToArray(marker)\n    a[0] -= dur.years\n    a[1] -= dur.months\n    a[2] -= dur.days\n    a[6] -= dur.milliseconds\n    return this.calendarSystem.arrayToMarker(a)\n  }\n\n  addYears(marker: DateMarker, n: number) {\n    let a = this.calendarSystem.markerToArray(marker)\n    a[0] += n\n    return this.calendarSystem.arrayToMarker(a)\n  }\n\n  addMonths(marker: DateMarker, n: number) {\n    let a = this.calendarSystem.markerToArray(marker)\n    a[1] += n\n    return this.calendarSystem.arrayToMarker(a)\n  }\n\n  // Diffing Whole Units\n\n  diffWholeYears(m0: DateMarker, m1: DateMarker): number {\n    let { calendarSystem } = this\n\n    if (\n      timeAsMs(m0) === timeAsMs(m1) &&\n      calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) &&\n      calendarSystem.getMarkerMonth(m0) === calendarSystem.getMarkerMonth(m1)\n    ) {\n      return calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0)\n    }\n    return null\n  }\n\n  diffWholeMonths(m0: DateMarker, m1: DateMarker): number {\n    let { calendarSystem } = this\n\n    if (\n      timeAsMs(m0) === timeAsMs(m1) &&\n      calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1)\n    ) {\n      return (calendarSystem.getMarkerMonth(m1) - calendarSystem.getMarkerMonth(m0)) +\n          (calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0)) * 12\n    }\n    return null\n  }\n\n  // Range / Duration\n\n  greatestWholeUnit(m0: DateMarker, m1: DateMarker) {\n    let n = this.diffWholeYears(m0, m1)\n\n    if (n !== null) {\n      return { unit: 'year', value: n }\n    }\n\n    n = this.diffWholeMonths(m0, m1)\n\n    if (n !== null) {\n      return { unit: 'month', value: n }\n    }\n\n    n = diffWholeWeeks(m0, m1)\n\n    if (n !== null) {\n      return { unit: 'week', value: n }\n    }\n\n    n = diffWholeDays(m0, m1)\n\n    if (n !== null) {\n      return { unit: 'day', value: n }\n    }\n\n    n = diffHours(m0, m1)\n\n    if (isInt(n)) {\n      return { unit: 'hour', value: n }\n    }\n\n    n = diffMinutes(m0, m1)\n\n    if (isInt(n)) {\n      return { unit: 'minute', value: n }\n    }\n\n    n = diffSeconds(m0, m1)\n\n    if (isInt(n)) {\n      return { unit: 'second', value: n }\n    }\n\n    return { unit: 'millisecond', value: m1.valueOf() - m0.valueOf() }\n  }\n\n  countDurationsBetween(m0: DateMarker, m1: DateMarker, d: Duration) {\n    // TODO: can use greatestWholeUnit\n    let diff\n\n    if (d.years) {\n      diff = this.diffWholeYears(m0, m1)\n      if (diff !== null) {\n        return diff / asRoughYears(d)\n      }\n    }\n\n    if (d.months) {\n      diff = this.diffWholeMonths(m0, m1)\n      if (diff !== null) {\n        return diff / asRoughMonths(d)\n      }\n    }\n\n    if (d.days) {\n      diff = diffWholeDays(m0, m1)\n      if (diff !== null) {\n        return diff / asRoughDays(d)\n      }\n    }\n\n    return (m1.valueOf() - m0.valueOf()) / asRoughMs(d)\n  }\n\n  // Start-Of\n  // these DON'T return zoned-dates. only UTC start-of dates\n\n  startOf(m: DateMarker, unit: string) {\n    if (unit === 'year') {\n      return this.startOfYear(m)\n    }\n    if (unit === 'month') {\n      return this.startOfMonth(m)\n    }\n    if (unit === 'week') {\n      return this.startOfWeek(m)\n    }\n    if (unit === 'day') {\n      return startOfDay(m)\n    }\n    if (unit === 'hour') {\n      return startOfHour(m)\n    }\n    if (unit === 'minute') {\n      return startOfMinute(m)\n    }\n    if (unit === 'second') {\n      return startOfSecond(m)\n    }\n    return null\n  }\n\n  startOfYear(m: DateMarker): DateMarker {\n    return this.calendarSystem.arrayToMarker([\n      this.calendarSystem.getMarkerYear(m),\n    ])\n  }\n\n  startOfMonth(m: DateMarker): DateMarker {\n    return this.calendarSystem.arrayToMarker([\n      this.calendarSystem.getMarkerYear(m),\n      this.calendarSystem.getMarkerMonth(m),\n    ])\n  }\n\n  startOfWeek(m: DateMarker): DateMarker {\n    return this.calendarSystem.arrayToMarker([\n      this.calendarSystem.getMarkerYear(m),\n      this.calendarSystem.getMarkerMonth(m),\n      m.getUTCDate() - ((m.getUTCDay() - this.weekDow + 7) % 7),\n    ])\n  }\n\n  // Week Number\n\n  computeWeekNumber(marker: DateMarker): number {\n    if (this.weekNumberFunc) {\n      return this.weekNumberFunc(this.toDate(marker))\n    }\n    return weekOfYear(marker, this.weekDow, this.weekDoy)\n  }\n\n  // TODO: choke on timeZoneName: long\n  format(marker: DateMarker, formatter: DateFormatter, dateOptions: { forcedTzo?: number } = {}) {\n    return formatter.format(\n      {\n        marker,\n        timeZoneOffset: dateOptions.forcedTzo != null ?\n          dateOptions.forcedTzo :\n          this.offsetForMarker(marker),\n      },\n      this,\n    )\n  }\n\n  formatRange(\n    start: DateMarker,\n    end: DateMarker,\n    formatter: DateFormatter,\n    dateOptions: { forcedStartTzo?: number, forcedEndTzo?: number, isEndExclusive?: boolean, defaultSeparator?: string } = {},\n  ) {\n    if (dateOptions.isEndExclusive) {\n      end = addMs(end, -1)\n    }\n\n    return formatter.formatRange(\n      {\n        marker: start,\n        timeZoneOffset: dateOptions.forcedStartTzo != null ?\n          dateOptions.forcedStartTzo :\n          this.offsetForMarker(start),\n      },\n      {\n        marker: end,\n        timeZoneOffset: dateOptions.forcedEndTzo != null ?\n          dateOptions.forcedEndTzo :\n          this.offsetForMarker(end),\n      },\n      this,\n      dateOptions.defaultSeparator,\n    )\n  }\n\n  /*\n  DUMB: the omitTime arg is dumb. if we omit the time, we want to omit the timezone offset. and if we do that,\n  might as well use buildIsoString or some other util directly\n  */\n  formatIso(marker: DateMarker, extraOptions: any = {}) {\n    let timeZoneOffset = null\n\n    if (!extraOptions.omitTimeZoneOffset) {\n      if (extraOptions.forcedTzo != null) {\n        timeZoneOffset = extraOptions.forcedTzo\n      } else {\n        timeZoneOffset = this.offsetForMarker(marker)\n      }\n    }\n\n    return buildIsoString(marker, timeZoneOffset, extraOptions.omitTime)\n  }\n\n  // TimeZone\n\n  timestampToMarker(ms: number) {\n    if (this.timeZone === 'local') {\n      return arrayToUtcDate(dateToLocalArray(new Date(ms)))\n    } if (this.timeZone === 'UTC' || !this.namedTimeZoneImpl) {\n      return new Date(ms)\n    }\n    return arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms))\n  }\n\n  offsetForMarker(m: DateMarker) {\n    if (this.timeZone === 'local') {\n      return -arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset() // convert \"inverse\" offset to \"normal\" offset\n    } if (this.timeZone === 'UTC') {\n      return 0\n    } if (this.namedTimeZoneImpl) {\n      return this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m))\n    }\n    return null\n  }\n\n  // Conversion\n\n  toDate(m: DateMarker, forcedTzo?: number): Date {\n    if (this.timeZone === 'local') {\n      return arrayToLocalDate(dateToUtcArray(m))\n    }\n\n    if (this.timeZone === 'UTC') {\n      return new Date(m.valueOf()) // make sure it's a copy\n    }\n\n    if (!this.namedTimeZoneImpl) {\n      return new Date(m.valueOf() - (forcedTzo || 0))\n    }\n\n    return new Date(\n      m.valueOf() -\n        this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)) * 1000 * 60, // convert minutes -> ms\n    )\n  }\n}\n","import { LocaleInput } from './datelib/locale'\n\nexport const globalLocales: LocaleInput[] = []\n","import { mergeProps } from '../util/object'\nimport { globalLocales } from '../global-locales' // weird to be importing this\nimport { CalendarOptions, CalendarOptionsRefined } from '../options'\n\nexport type LocaleCodeArg = string | string[]\nexport type LocaleSingularArg = LocaleCodeArg | LocaleInput\n\nexport interface Locale {\n  codeArg: LocaleCodeArg\n  codes: string[]\n  week: { dow: number, doy: number }\n  simpleNumberFormat: Intl.NumberFormat\n  options: CalendarOptionsRefined\n}\n\nexport interface LocaleInput extends CalendarOptions {\n  code: string\n}\n\nexport type LocaleInputMap = { [code: string]: LocaleInput }\n\nexport interface RawLocaleInfo {\n  map: LocaleInputMap\n  defaultCode: string\n}\n\nconst MINIMAL_RAW_EN_LOCALE = {\n  code: 'en',\n  week: {\n    dow: 0, // Sunday is the first day of the week\n    doy: 4, // 4 days need to be within the year to be considered the first week\n  },\n  direction: 'ltr' as ('ltr' | 'rtl'), // TODO: make a real type for this\n  buttonText: {\n    prev: 'prev',\n    next: 'next',\n    prevYear: 'prev year',\n    nextYear: 'next year',\n    year: 'year',\n    today: 'today',\n    month: 'month',\n    week: 'week',\n    day: 'day',\n    list: 'list',\n  },\n  weekText: 'W',\n  weekTextLong: 'Week',\n  closeHint: 'Close',\n  timeHint: 'Time',\n  eventHint: 'Event',\n  allDayText: 'all-day',\n  moreLinkText: 'more',\n  noEventsText: 'No events to display',\n}\n\nconst RAW_EN_LOCALE = {\n  ...MINIMAL_RAW_EN_LOCALE,\n  // Includes things we don't want other locales to inherit,\n  // things that derive from other translatable strings.\n  buttonHints: {\n    prev: 'Previous $0',\n    next: 'Next $0',\n    today(buttonText, unit) {\n      return (unit === 'day')\n        ? 'Today'\n        : `This ${buttonText}`\n    },\n  },\n  viewHint: '$0 view',\n  navLinkHint: 'Go to $0',\n  moreLinkHint(eventCnt: number) {\n    return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`\n  },\n}\n\nexport function organizeRawLocales(explicitRawLocales: LocaleInput[]): RawLocaleInfo {\n  let defaultCode = explicitRawLocales.length > 0 ? explicitRawLocales[0].code : 'en'\n  let allRawLocales = globalLocales.concat(explicitRawLocales)\n  let rawLocaleMap: LocaleInputMap = {\n    en: RAW_EN_LOCALE,\n  }\n\n  for (let rawLocale of allRawLocales) {\n    rawLocaleMap[rawLocale.code] = rawLocale\n  }\n\n  return {\n    map: rawLocaleMap,\n    defaultCode,\n  }\n}\n\nexport function buildLocale(inputSingular: LocaleSingularArg, available: LocaleInputMap) {\n  if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) {\n    return parseLocale(\n      inputSingular.code,\n      [inputSingular.code],\n      inputSingular,\n    )\n  }\n  return queryLocale(inputSingular, available)\n}\n\nfunction queryLocale(codeArg: LocaleCodeArg, available: LocaleInputMap): Locale {\n  let codes = [].concat(codeArg || []) // will convert to array\n  let raw = queryRawLocale(codes, available) || RAW_EN_LOCALE\n\n  return parseLocale(codeArg, codes, raw)\n}\n\nfunction queryRawLocale(codes: string[], available: LocaleInputMap): LocaleInput {\n  for (let i = 0; i < codes.length; i += 1) {\n    let parts = codes[i].toLocaleLowerCase().split('-')\n\n    for (let j = parts.length; j > 0; j -= 1) {\n      let simpleId = parts.slice(0, j).join('-')\n\n      if (available[simpleId]) {\n        return available[simpleId]\n      }\n    }\n  }\n  return null\n}\n\nfunction parseLocale(codeArg: LocaleCodeArg, codes: string[], raw: LocaleInput): Locale {\n  let merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText'])\n\n  delete merged.code // don't want this part of the options\n  let { week } = merged\n  delete merged.week\n\n  return {\n    codeArg,\n    codes,\n    week,\n    simpleNumberFormat: new Intl.NumberFormat(codeArg),\n    options: merged,\n  }\n}\n","import { EventInput } from './event-parse'\nimport { EventStore, parseEvents } from './event-store'\nimport { CalendarContext } from '../CalendarContext'\n\n/*\nUtils for converting raw business hour input into an EventStore,\nfor both rendering and the constraint system.\n*/\n\nexport type BusinessHoursInput = boolean | EventInput | EventInput[]\n\nconst DEF_DEFAULTS = {\n  startTime: '09:00',\n  endTime: '17:00',\n  daysOfWeek: [1, 2, 3, 4, 5], // monday - friday\n  display: 'inverse-background',\n  classNames: 'fc-non-business',\n  groupId: '_businessHours', // so multiple defs get grouped\n}\n\n/*\nTODO: pass around as EventDefHash!!!\n*/\nexport function parseBusinessHours(input: BusinessHoursInput, context: CalendarContext): EventStore {\n  return parseEvents(\n    refineInputs(input),\n    null,\n    context,\n  )\n}\n\nfunction refineInputs(input: BusinessHoursInput) {\n  let rawDefs\n\n  if (input === true) {\n    rawDefs = [{}] // will get DEF_DEFAULTS verbatim\n  } else if (Array.isArray(input)) {\n    // if specifying an array, every sub-definition NEEDS a day-of-week\n    rawDefs = input.filter((rawDef) => rawDef.daysOfWeek)\n  } else if (typeof input === 'object' && input) { // non-null object\n    rawDefs = [input]\n  } else { // is probably false\n    rawDefs = []\n  }\n\n  rawDefs = rawDefs.map((rawDef) => ({ ...DEF_DEFAULTS, ...rawDef }))\n\n  return rawDefs\n}\n","let canVGrowWithinCell: boolean\n\nexport function getCanVGrowWithinCell() {\n  if (canVGrowWithinCell == null) {\n    canVGrowWithinCell = computeCanVGrowWithinCell()\n  }\n  return canVGrowWithinCell\n}\n\nfunction computeCanVGrowWithinCell() {\n  // for SSR, because this function is call immediately at top-level\n  // TODO: just make this logic execute top-level, immediately, instead of doing lazily\n  if (typeof document === 'undefined') {\n    return true\n  }\n\n  let el = document.createElement('div')\n  el.style.position = 'absolute'\n  el.style.top = '0px'\n  el.style.left = '0px'\n  el.innerHTML = '<table><tr><td><div></div></td></tr></table>'\n  el.querySelector('table').style.height = '100px'\n  el.querySelector('div').style.height = '100%'\n\n  document.body.appendChild(el)\n\n  let div = el.querySelector('div')\n  let possible = div.offsetHeight > 0\n  document.body.removeChild(el)\n  return possible\n}\n","export interface Point {\n  left: number\n  top: number\n}\n\nexport interface Rect {\n  left: number\n  right: number\n  top: number\n  bottom: number\n}\n\nexport function pointInsideRect(point: Point, rect: Rect): boolean {\n  return point.left >= rect.left &&\n    point.left < rect.right &&\n    point.top >= rect.top &&\n    point.top < rect.bottom\n}\n\n// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false\nexport function intersectRects(rect1: Rect, rect2: Rect): Rect | false {\n  let res = {\n    left: Math.max(rect1.left, rect2.left),\n    right: Math.min(rect1.right, rect2.right),\n    top: Math.max(rect1.top, rect2.top),\n    bottom: Math.min(rect1.bottom, rect2.bottom),\n  }\n\n  if (res.left < res.right && res.top < res.bottom) {\n    return res\n  }\n\n  return false\n}\n\nexport function translateRect(rect: Rect, deltaX: number, deltaY: number): Rect {\n  return {\n    left: rect.left + deltaX,\n    right: rect.right + deltaX,\n    top: rect.top + deltaY,\n    bottom: rect.bottom + deltaY,\n  }\n}\n\n// Returns a new point that will have been moved to reside within the given rectangle\nexport function constrainPoint(point: Point, rect: Rect): Point {\n  return {\n    left: Math.min(Math.max(point.left, rect.left), rect.right),\n    top: Math.min(Math.max(point.top, rect.top), rect.bottom),\n  }\n}\n\n// Returns a point that is the center of the given rectangle\nexport function getRectCenter(rect: Rect): Point {\n  return {\n    left: (rect.left + rect.right) / 2,\n    top: (rect.top + rect.bottom) / 2,\n  }\n}\n\n// Subtracts point2's coordinates from point1's coordinates, returning a delta\nexport function diffPoints(point1: Point, point2: Point): Point {\n  return {\n    left: point1.left - point2.left,\n    top: point1.top - point2.top,\n  }\n}\n","import { __assign } from 'tslib'\nimport { EventStore, createEmptyEventStore } from '../structs/event-store'\nimport { EventDef } from '../structs/event-def'\nimport { EventInteractionState } from '../interactions/event-interaction-state'\nimport { mapHash } from '../util/object'\nimport { memoize } from '../util/memoize'\nimport { EventUiHash, EventUi, combineEventUis } from './event-ui'\nimport { DateSpan } from '../structs/date-span'\n\nexport interface SplittableProps {\n  businessHours: EventStore | null // is this really allowed to be null?\n  dateSelection: DateSpan | null\n  eventStore: EventStore\n  eventUiBases: EventUiHash\n  eventSelection: string\n  eventDrag: EventInteractionState | null\n  eventResize: EventInteractionState | null\n}\n\nconst EMPTY_EVENT_STORE = createEmptyEventStore() // for purecomponents. TODO: keep elsewhere\n\nexport abstract class Splitter<PropsType extends SplittableProps = SplittableProps> {\n  private getKeysForEventDefs = memoize(this._getKeysForEventDefs)\n  private splitDateSelection = memoize(this._splitDateSpan)\n  private splitEventStore = memoize(this._splitEventStore)\n  private splitIndividualUi = memoize(this._splitIndividualUi)\n  private splitEventDrag = memoize(this._splitInteraction)\n  private splitEventResize = memoize(this._splitInteraction)\n  private eventUiBuilders = {} // TODO: typescript protection\n\n  abstract getKeyInfo(props: PropsType): { [key: string]: { ui?: EventUi, businessHours?: EventStore } }\n  abstract getKeysForDateSpan(dateSpan: DateSpan): string[]\n  abstract getKeysForEventDef(eventDef: EventDef): string[]\n\n  splitProps(props: PropsType): { [key: string]: SplittableProps } {\n    let keyInfos = this.getKeyInfo(props)\n    let defKeys = this.getKeysForEventDefs(props.eventStore)\n    let dateSelections = this.splitDateSelection(props.dateSelection)\n    let individualUi = this.splitIndividualUi(props.eventUiBases, defKeys) // the individual *bases*\n    let eventStores = this.splitEventStore(props.eventStore, defKeys)\n    let eventDrags = this.splitEventDrag(props.eventDrag)\n    let eventResizes = this.splitEventResize(props.eventResize)\n    let splitProps: { [key: string]: SplittableProps } = {}\n\n    this.eventUiBuilders = mapHash(keyInfos, (info, key) => this.eventUiBuilders[key] || memoize(buildEventUiForKey))\n\n    for (let key in keyInfos) {\n      let keyInfo = keyInfos[key]\n      let eventStore = eventStores[key] || EMPTY_EVENT_STORE\n      let buildEventUi = this.eventUiBuilders[key]\n\n      splitProps[key] = {\n        businessHours: keyInfo.businessHours || props.businessHours,\n        dateSelection: dateSelections[key] || null,\n        eventStore,\n        eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),\n        eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',\n        eventDrag: eventDrags[key] || null,\n        eventResize: eventResizes[key] || null,\n      }\n    }\n\n    return splitProps\n  }\n\n  private _splitDateSpan(dateSpan: DateSpan | null) {\n    let dateSpans = {}\n\n    if (dateSpan) {\n      let keys = this.getKeysForDateSpan(dateSpan)\n\n      for (let key of keys) {\n        dateSpans[key] = dateSpan\n      }\n    }\n\n    return dateSpans\n  }\n\n  private _getKeysForEventDefs(eventStore: EventStore) {\n    return mapHash(eventStore.defs, (eventDef: EventDef) => this.getKeysForEventDef(eventDef))\n  }\n\n  private _splitEventStore(eventStore: EventStore, defKeys): { [key: string]: EventStore } {\n    let { defs, instances } = eventStore\n    let splitStores = {}\n\n    for (let defId in defs) {\n      for (let key of defKeys[defId]) {\n        if (!splitStores[key]) {\n          splitStores[key] = createEmptyEventStore()\n        }\n\n        splitStores[key].defs[defId] = defs[defId]\n      }\n    }\n\n    for (let instanceId in instances) {\n      let instance = instances[instanceId]\n\n      for (let key of defKeys[instance.defId]) {\n        if (splitStores[key]) { // must have already been created\n          splitStores[key].instances[instanceId] = instance\n        }\n      }\n    }\n\n    return splitStores\n  }\n\n  private _splitIndividualUi(eventUiBases: EventUiHash, defKeys): { [key: string]: EventUiHash } {\n    let splitHashes: { [key: string]: EventUiHash } = {}\n\n    for (let defId in eventUiBases) {\n      if (defId) { // not the '' key\n        for (let key of defKeys[defId]) {\n          if (!splitHashes[key]) {\n            splitHashes[key] = {}\n          }\n\n          splitHashes[key][defId] = eventUiBases[defId]\n        }\n      }\n    }\n\n    return splitHashes\n  }\n\n  private _splitInteraction(interaction: EventInteractionState | null): { [key: string]: EventInteractionState } {\n    let splitStates: { [key: string]: EventInteractionState } = {}\n\n    if (interaction) {\n      let affectedStores = this._splitEventStore(\n        interaction.affectedEvents,\n        this._getKeysForEventDefs(interaction.affectedEvents), // can't use cached. might be events from other calendar\n      )\n\n      // can't rely on defKeys because event data is mutated\n      let mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents)\n      let mutatedStores = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId)\n\n      let populate = (key) => {\n        if (!splitStates[key]) {\n          splitStates[key] = {\n            affectedEvents: affectedStores[key] || EMPTY_EVENT_STORE,\n            mutatedEvents: mutatedStores[key] || EMPTY_EVENT_STORE,\n            isEvent: interaction.isEvent,\n          }\n        }\n      }\n\n      for (let key in affectedStores) {\n        populate(key)\n      }\n\n      for (let key in mutatedStores) {\n        populate(key)\n      }\n    }\n\n    return splitStates\n  }\n}\n\nfunction buildEventUiForKey(allUi: EventUi | null, eventUiForKey: EventUi | null, individualUi: EventUiHash | null) {\n  let baseParts = []\n\n  if (allUi) {\n    baseParts.push(allUi)\n  }\n\n  if (eventUiForKey) {\n    baseParts.push(eventUiForKey)\n  }\n\n  let stuff = {\n    '': combineEventUis(baseParts),\n  }\n\n  if (individualUi) {\n    __assign(stuff, individualUi)\n  }\n\n  return stuff\n}\n","import { DateMarker, DAY_IDS } from '../datelib/marker'\nimport { rangeContainsMarker, DateRange } from '../datelib/date-range'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { Theme } from '../theme/Theme'\n\nexport interface DateMeta {\n  dow: number\n  isDisabled: boolean\n  isOther: boolean // like, is it in the non-current \"other\" month\n  isToday: boolean\n  isPast: boolean\n  isFuture: boolean\n}\n\nexport function getDateMeta(date: DateMarker, todayRange?: DateRange, nowDate?: DateMarker, dateProfile?: DateProfile): DateMeta {\n  return {\n    dow: date.getUTCDay(),\n    isDisabled: Boolean(dateProfile && !rangeContainsMarker(dateProfile.activeRange, date)),\n    isOther: Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, date)),\n    isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)),\n    isPast: Boolean(nowDate ? (date < nowDate) : todayRange ? (date < todayRange.start) : false),\n    isFuture: Boolean(nowDate ? (date > nowDate) : todayRange ? (date >= todayRange.end) : false),\n  }\n}\n\nexport function getDayClassNames(meta: DateMeta, theme: Theme) {\n  let classNames: string[] = [\n    'fc-day',\n    `fc-day-${DAY_IDS[meta.dow]}`,\n  ]\n\n  if (meta.isDisabled) {\n    classNames.push('fc-day-disabled')\n  } else {\n    if (meta.isToday) {\n      classNames.push('fc-day-today')\n      classNames.push(theme.getClass('today'))\n    }\n\n    if (meta.isPast) {\n      classNames.push('fc-day-past')\n    }\n\n    if (meta.isFuture) {\n      classNames.push('fc-day-future')\n    }\n\n    if (meta.isOther) {\n      classNames.push('fc-day-other')\n    }\n  }\n\n  return classNames\n}\n\nexport function getSlotClassNames(meta: DateMeta, theme: Theme) {\n  let classNames: string[] = [\n    'fc-slot',\n    `fc-slot-${DAY_IDS[meta.dow]}`,\n  ]\n\n  if (meta.isDisabled) {\n    classNames.push('fc-slot-disabled')\n  } else {\n    if (meta.isToday) {\n      classNames.push('fc-slot-today')\n      classNames.push(theme.getClass('today'))\n    }\n\n    if (meta.isPast) {\n      classNames.push('fc-slot-past')\n    }\n\n    if (meta.isFuture) {\n      classNames.push('fc-slot-future')\n    }\n  }\n\n  return classNames\n}\n","import { createFormatter } from '../datelib/formatting'\nimport { DateMarker } from '../datelib/marker'\nimport { createAriaClickAttrs } from '../util/dom-event'\nimport { formatWithOrdinals } from '../util/misc'\nimport { ViewContext } from '../ViewContext'\n\nconst DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' })\nconst WEEK_FORMAT = createFormatter({ week: 'long' })\n\nexport function buildNavLinkAttrs(\n  context: ViewContext,\n  dateMarker: DateMarker,\n  viewType = 'day',\n  isTabbable = true,\n) {\n  const { dateEnv, options, calendarApi } = context\n  let dateStr = dateEnv.format(dateMarker, viewType === 'week' ? WEEK_FORMAT : DAY_FORMAT)\n\n  if (options.navLinks) {\n    let zonedDate = dateEnv.toDate(dateMarker)\n\n    const handleInteraction = (ev: UIEvent) => {\n      let customAction =\n        viewType === 'day' ? options.navLinkDayClick :\n          viewType === 'week' ? options.navLinkWeekClick : null\n\n      if (typeof customAction === 'function') {\n        customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev)\n      } else {\n        if (typeof customAction === 'string') {\n          viewType = customAction\n        }\n        calendarApi.zoomTo(dateMarker, viewType)\n      }\n    }\n\n    return {\n      title: formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr),\n      'data-navlink': '', // for legacy selectors. TODO: use className?\n      ...(isTabbable\n        ? createAriaClickAttrs(handleInteraction)\n        : { onClick: handleInteraction }\n      ),\n    }\n  }\n\n  return { 'aria-label': dateStr }\n}\n","import { removeElement, applyStyle } from './dom-manip'\n\nlet _isRtlScrollbarOnLeft: boolean | null = null\n\nexport function getIsRtlScrollbarOnLeft() { // responsible for caching the computation\n  if (_isRtlScrollbarOnLeft === null) {\n    _isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft()\n  }\n  return _isRtlScrollbarOnLeft\n}\n\nfunction computeIsRtlScrollbarOnLeft() { // creates an offscreen test element, then removes it\n  let outerEl = document.createElement('div')\n  applyStyle(outerEl, {\n    position: 'absolute',\n    top: -1000,\n    left: 0,\n    border: 0,\n    padding: 0,\n    overflow: 'scroll',\n    direction: 'rtl',\n  })\n  outerEl.innerHTML = '<div></div>'\n\n  document.body.appendChild(outerEl)\n  let innerEl = outerEl.firstChild as HTMLElement\n  let res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left\n\n  removeElement(outerEl)\n  return res\n}\n","export interface ScrollbarWidths {\n  x: number\n  y: number // TODO: rename to vertical. less confusing when dealing with width/height verbage\n}\n\nlet _scrollbarWidths: ScrollbarWidths | undefined\n\nexport function getScrollbarWidths() { // TODO: way to force recompute?\n  if (!_scrollbarWidths) {\n    _scrollbarWidths = computeScrollbarWidths()\n  }\n\n  return _scrollbarWidths\n}\n\nfunction computeScrollbarWidths(): ScrollbarWidths {\n  let el = document.createElement('div')\n  el.style.overflow = 'scroll'\n  el.style.position = 'absolute'\n  el.style.top = '-9999px'\n  el.style.left = '-9999px'\n  document.body.appendChild(el)\n  let res = computeScrollbarWidthsForEl(el)\n  document.body.removeChild(el)\n  return res\n}\n\n// WARNING: will include border\nexport function computeScrollbarWidthsForEl(el: HTMLElement): ScrollbarWidths {\n  return {\n    x: el.offsetHeight - el.clientHeight,\n    y: el.offsetWidth - el.clientWidth,\n  }\n}\n","import { intersectRects, Rect } from './geom'\nimport { getIsRtlScrollbarOnLeft } from './scrollbar-side'\nimport { computeScrollbarWidthsForEl } from './scrollbar-width'\n\nexport interface EdgeInfo {\n  borderLeft: number\n  borderRight: number\n  borderTop: number\n  borderBottom: number\n  scrollbarLeft: number\n  scrollbarRight: number\n  scrollbarBottom: number\n  paddingLeft?: number\n  paddingRight?: number\n  paddingTop?: number\n  paddingBottom?: number\n}\n\nexport function computeEdges(el: HTMLElement, getPadding = false): EdgeInfo { // cache somehow?\n  let computedStyle = window.getComputedStyle(el)\n  let borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0\n  let borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0\n  let borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0\n  let borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0\n  let badScrollbarWidths = computeScrollbarWidthsForEl(el) // includes border!\n  let scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight\n  let scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom\n\n  let res: EdgeInfo = {\n    borderLeft,\n    borderRight,\n    borderTop,\n    borderBottom,\n    scrollbarBottom,\n    scrollbarLeft: 0,\n    scrollbarRight: 0,\n  }\n\n  if (getIsRtlScrollbarOnLeft() && computedStyle.direction === 'rtl') { // is the scrollbar on the left side?\n    res.scrollbarLeft = scrollbarLeftRight\n  } else {\n    res.scrollbarRight = scrollbarLeftRight\n  }\n\n  if (getPadding) {\n    res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0\n    res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0\n    res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0\n    res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0\n  }\n\n  return res\n}\n\nexport function computeInnerRect(el, goWithinPadding = false, doFromWindowViewport?: boolean) {\n  let outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el)\n  let edges = computeEdges(el, goWithinPadding)\n  let res = {\n    left: outerRect.left + edges.borderLeft + edges.scrollbarLeft,\n    right: outerRect.right - edges.borderRight - edges.scrollbarRight,\n    top: outerRect.top + edges.borderTop,\n    bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom,\n  }\n\n  if (goWithinPadding) {\n    res.left += edges.paddingLeft\n    res.right -= edges.paddingRight\n    res.top += edges.paddingTop\n    res.bottom -= edges.paddingBottom\n  }\n\n  return res\n}\n\nexport function computeRect(el): Rect {\n  let rect = el.getBoundingClientRect()\n\n  return {\n    left: rect.left + window.pageXOffset,\n    top: rect.top + window.pageYOffset,\n    right: rect.right + window.pageXOffset,\n    bottom: rect.bottom + window.pageYOffset,\n  }\n}\n\nexport function computeClippedClientRect(el: HTMLElement): Rect | null {\n  let clippingParents = getClippingParents(el)\n  let rect: Rect = el.getBoundingClientRect()\n\n  for (let clippingParent of clippingParents) {\n    let intersection = intersectRects(rect, clippingParent.getBoundingClientRect())\n    if (intersection) {\n      rect = intersection\n    } else {\n      return null\n    }\n  }\n\n  return rect\n}\n\nexport function computeHeightAndMargins(el: HTMLElement) {\n  return el.getBoundingClientRect().height + computeVMargins(el)\n}\n\nexport function computeVMargins(el: HTMLElement) {\n  let computed = window.getComputedStyle(el)\n\n  return parseInt(computed.marginTop, 10) +\n    parseInt(computed.marginBottom, 10)\n}\n\n// does not return window\nexport function getClippingParents(el: HTMLElement): HTMLElement[] {\n  let parents: HTMLElement[] = []\n\n  while (el instanceof HTMLElement) { // will stop when gets to document or null\n    let computedStyle = window.getComputedStyle(el)\n\n    if (computedStyle.position === 'fixed') {\n      break\n    }\n\n    if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n      parents.push(el)\n    }\n\n    el = el.parentNode as HTMLElement\n  }\n\n  return parents\n}\n","// given a function that resolves a result asynchronously.\n// the function can either call passed-in success and failure callbacks,\n// or it can return a promise.\n// if you need to pass additional params to func, bind them first.\nexport function unpromisify(func, success, failure?) {\n  // guard against success/failure callbacks being called more than once\n  // and guard against a promise AND callback being used together.\n  let isResolved = false\n  let wrappedSuccess = function () { // eslint-disable-line func-names\n    if (!isResolved) {\n      isResolved = true\n      success.apply(this, arguments) // eslint-disable-line prefer-rest-params\n    }\n  }\n  let wrappedFailure = function () { // eslint-disable-line func-names\n    if (!isResolved) {\n      isResolved = true\n      if (failure) {\n        failure.apply(this, arguments) // eslint-disable-line prefer-rest-params\n      }\n    }\n  }\n\n  let res = func(wrappedSuccess, wrappedFailure)\n  if (res && typeof res.then === 'function') {\n    res.then(wrappedSuccess, wrappedFailure)\n  }\n}\n","export interface HandlerFuncTypeHash {\n  [eventName: string]: (...args: any[]) => any // with all properties required\n}\n\nexport class Emitter<HandlerFuncs extends HandlerFuncTypeHash> {\n  private handlers: { [Prop in keyof HandlerFuncs]?: HandlerFuncs[Prop][] } = {}\n\n  private options: Partial<HandlerFuncs>\n\n  private thisContext: any = null\n\n  setThisContext(thisContext) {\n    this.thisContext = thisContext\n  }\n\n  setOptions(options: Partial<HandlerFuncs>) {\n    this.options = options\n  }\n\n  on<Prop extends keyof HandlerFuncs>(type: Prop, handler: HandlerFuncs[Prop]) {\n    addToHash(this.handlers, type, handler)\n  }\n\n  off<Prop extends keyof HandlerFuncs>(type: Prop, handler?: HandlerFuncs[Prop]) {\n    removeFromHash(this.handlers, type, handler)\n  }\n\n  trigger<Prop extends keyof HandlerFuncs>(type: Prop, ...args: Parameters<HandlerFuncs[Prop]>) {\n    let attachedHandlers = this.handlers[type] || []\n    let optionHandler = this.options && this.options[type]\n    let handlers = [].concat(optionHandler || [], attachedHandlers)\n\n    for (let handler of handlers) {\n      handler.apply(this.thisContext, args)\n    }\n  }\n\n  hasHandlers(type: keyof HandlerFuncs): boolean {\n    return Boolean(\n      (this.handlers[type] && this.handlers[type].length) ||\n      (this.options && this.options[type]),\n    )\n  }\n}\n\nfunction addToHash(hash, type, handler) {\n  (hash[type] || (hash[type] = []))\n    .push(handler)\n}\n\nfunction removeFromHash(hash, type, handler?) {\n  if (handler) {\n    if (hash[type]) {\n      hash[type] = hash[type].filter((func) => func !== handler)\n    }\n  } else {\n    delete hash[type] // remove all handler funcs for this type\n  }\n}\n","/*\nRecords offset information for a set of elements, relative to an origin element.\nCan record the left/right OR the top/bottom OR both.\nProvides methods for querying the cache by position.\n*/\nexport class PositionCache {\n  els: HTMLElement[] // assumed to be siblings\n  originClientRect: ClientRect\n\n  // arrays of coordinates (from topleft of originEl)\n  // caller can access these directly\n  lefts: any\n  rights: any\n  tops: any\n  bottoms: any\n\n  constructor(originEl: HTMLElement, els: HTMLElement[], isHorizontal: boolean, isVertical: boolean) {\n    this.els = els\n\n    let originClientRect = this.originClientRect = originEl.getBoundingClientRect() // relative to viewport top-left\n\n    if (isHorizontal) {\n      this.buildElHorizontals(originClientRect.left)\n    }\n\n    if (isVertical) {\n      this.buildElVerticals(originClientRect.top)\n    }\n  }\n\n  // Populates the left/right internal coordinate arrays\n  buildElHorizontals(originClientLeft: number) {\n    let lefts = []\n    let rights = []\n\n    for (let el of this.els) {\n      let rect = el.getBoundingClientRect()\n      lefts.push(rect.left - originClientLeft)\n      rights.push(rect.right - originClientLeft)\n    }\n\n    this.lefts = lefts\n    this.rights = rights\n  }\n\n  // Populates the top/bottom internal coordinate arrays\n  buildElVerticals(originClientTop: number) {\n    let tops = []\n    let bottoms = []\n\n    for (let el of this.els) {\n      let rect = el.getBoundingClientRect()\n      tops.push(rect.top - originClientTop)\n      bottoms.push(rect.bottom - originClientTop)\n    }\n\n    this.tops = tops\n    this.bottoms = bottoms\n  }\n\n  // Given a left offset (from document left), returns the index of the el that it horizontally intersects.\n  // If no intersection is made, returns undefined.\n  leftToIndex(leftPosition: number) {\n    let { lefts, rights } = this\n    let len = lefts.length\n    let i\n\n    for (i = 0; i < len; i += 1) {\n      if (leftPosition >= lefts[i] && leftPosition < rights[i]) {\n        return i\n      }\n    }\n\n    return undefined // TODO: better\n  }\n\n  // Given a top offset (from document top), returns the index of the el that it vertically intersects.\n  // If no intersection is made, returns undefined.\n  topToIndex(topPosition: number) {\n    let { tops, bottoms } = this\n    let len = tops.length\n    let i\n\n    for (i = 0; i < len; i += 1) {\n      if (topPosition >= tops[i] && topPosition < bottoms[i]) {\n        return i\n      }\n    }\n\n    return undefined // TODO: better\n  }\n\n  // Gets the width of the element at the given index\n  getWidth(leftIndex: number) {\n    return this.rights[leftIndex] - this.lefts[leftIndex]\n  }\n\n  // Gets the height of the element at the given index\n  getHeight(topIndex: number) {\n    return this.bottoms[topIndex] - this.tops[topIndex]\n  }\n}\n","/* eslint max-classes-per-file: \"off\" */\n\n/*\nAn object for getting/setting scroll-related information for an element.\nInternally, this is done very differently for window versus DOM element,\nso this object serves as a common interface.\n*/\nexport abstract class ScrollController {\n  abstract getScrollTop(): number\n  abstract getScrollLeft(): number\n  abstract setScrollTop(top: number): void\n  abstract setScrollLeft(left: number): void\n  abstract getClientWidth(): number\n  abstract getClientHeight(): number\n  abstract getScrollWidth(): number\n  abstract getScrollHeight(): number\n\n  getMaxScrollTop() {\n    return this.getScrollHeight() - this.getClientHeight()\n  }\n\n  getMaxScrollLeft() {\n    return this.getScrollWidth() - this.getClientWidth()\n  }\n\n  canScrollVertically() {\n    return this.getMaxScrollTop() > 0\n  }\n\n  canScrollHorizontally() {\n    return this.getMaxScrollLeft() > 0\n  }\n\n  canScrollUp() {\n    return this.getScrollTop() > 0\n  }\n\n  canScrollDown() {\n    return this.getScrollTop() < this.getMaxScrollTop()\n  }\n\n  canScrollLeft() {\n    return this.getScrollLeft() > 0\n  }\n\n  canScrollRight() {\n    return this.getScrollLeft() < this.getMaxScrollLeft()\n  }\n}\n\nexport class ElementScrollController extends ScrollController {\n  el: HTMLElement\n\n  constructor(el: HTMLElement) {\n    super()\n    this.el = el\n  }\n\n  getScrollTop() {\n    return this.el.scrollTop\n  }\n\n  getScrollLeft() {\n    return this.el.scrollLeft\n  }\n\n  setScrollTop(top: number) {\n    this.el.scrollTop = top\n  }\n\n  setScrollLeft(left: number) {\n    this.el.scrollLeft = left\n  }\n\n  getScrollWidth() {\n    return this.el.scrollWidth\n  }\n\n  getScrollHeight() {\n    return this.el.scrollHeight\n  }\n\n  getClientHeight() {\n    return this.el.clientHeight\n  }\n\n  getClientWidth() {\n    return this.el.clientWidth\n  }\n}\n\nexport class WindowScrollController extends ScrollController {\n  getScrollTop() {\n    return window.pageYOffset\n  }\n\n  getScrollLeft() {\n    return window.pageXOffset\n  }\n\n  setScrollTop(n: number) {\n    window.scroll(window.pageXOffset, n)\n  }\n\n  setScrollLeft(n: number) {\n    window.scroll(n, window.pageYOffset)\n  }\n\n  getScrollWidth() {\n    return document.documentElement.scrollWidth\n  }\n\n  getScrollHeight() {\n    return document.documentElement.scrollHeight\n  }\n\n  getClientHeight() {\n    return document.documentElement.clientHeight\n  }\n\n  getClientWidth() {\n    return document.documentElement.clientWidth\n  }\n}\n","import { CalendarOptionsRefined } from '../options'\n\nexport class Theme {\n  // settings. default values are set after the class\n  classes: any\n  iconClasses: any\n  rtlIconClasses: any\n  baseIconClass: string // className that ALL icon elements for this theme should have\n  iconOverrideOption: any // the name of the setting to use for icons. the subclass must set this.\n  iconOverrideCustomButtonOption: any // the name of the setting, *within* each customButtons object, to use for icons\n  iconOverridePrefix: string\n\n  constructor(calendarOptions: CalendarOptionsRefined) {\n    if (this.iconOverrideOption) {\n      this.setIconOverride(\n        calendarOptions[this.iconOverrideOption],\n      )\n    }\n  }\n\n  setIconOverride(iconOverrideHash) {\n    let iconClassesCopy\n    let buttonName\n\n    if (typeof iconOverrideHash === 'object' && iconOverrideHash) { // non-null object\n      iconClassesCopy = { ...this.iconClasses }\n\n      for (buttonName in iconOverrideHash) {\n        iconClassesCopy[buttonName] = this.applyIconOverridePrefix(\n          iconOverrideHash[buttonName],\n        )\n      }\n\n      this.iconClasses = iconClassesCopy\n    } else if (iconOverrideHash === false) {\n      this.iconClasses = {}\n    }\n  }\n\n  applyIconOverridePrefix(className) {\n    let prefix = this.iconOverridePrefix\n\n    if (prefix && className.indexOf(prefix) !== 0) { // if not already present\n      className = prefix + className\n    }\n\n    return className\n  }\n\n  getClass(key) {\n    return this.classes[key] || ''\n  }\n\n  getIconClass(buttonName, isRtl?: boolean) {\n    let className\n\n    if (isRtl && this.rtlIconClasses) {\n      className = this.rtlIconClasses[buttonName] || this.iconClasses[buttonName]\n    } else {\n      className = this.iconClasses[buttonName]\n    }\n\n    if (className) {\n      return `${this.baseIconClass} ${className}`\n    }\n\n    return ''\n  }\n\n  getCustomButtonIconClass(customButtonProps) {\n    let className\n\n    if (this.iconOverrideCustomButtonOption) {\n      className = customButtonProps[this.iconOverrideCustomButtonOption]\n\n      if (className) {\n        return `${this.baseIconClass} ${this.applyIconOverridePrefix(className)}`\n      }\n    }\n\n    return ''\n  }\n}\n\nTheme.prototype.classes = {}\nTheme.prototype.iconClasses = {}\nTheme.prototype.baseIconClass = ''\nTheme.prototype.iconOverridePrefix = ''\n\nexport type ThemeClass = { new(calendarOptions: any): Theme }\n","import { __assign } from 'tslib'\nimport { Duration } from './datelib/duration'\nimport { Emitter } from './common/Emitter'\nimport { CalendarListeners } from './options'\n\nexport interface ScrollRequest {\n  time?: Duration\n  [otherProp: string]: any\n}\n\nexport type ScrollRequestHandler = (request: ScrollRequest) => boolean\n\nexport class ScrollResponder {\n  queuedRequest: ScrollRequest\n\n  constructor(\n    private execFunc: ScrollRequestHandler,\n    private emitter: Emitter<CalendarListeners>,\n    private scrollTime: Duration,\n    private scrollTimeReset: boolean,\n  ) {\n    emitter.on('_scrollRequest', this.handleScrollRequest)\n    this.fireInitialScroll()\n  }\n\n  detach() {\n    this.emitter.off('_scrollRequest', this.handleScrollRequest)\n  }\n\n  update(isDatesNew: boolean) {\n    if (isDatesNew && this.scrollTimeReset) {\n      this.fireInitialScroll() // will drain\n    } else {\n      this.drain()\n    }\n  }\n\n  private fireInitialScroll() {\n    this.handleScrollRequest({\n      time: this.scrollTime,\n    })\n  }\n\n  private handleScrollRequest = (request: ScrollRequest) => {\n    this.queuedRequest = __assign({}, this.queuedRequest || {}, request)\n    this.drain()\n  }\n\n  private drain() {\n    if (this.queuedRequest && this.execFunc(this.queuedRequest)) {\n      this.queuedRequest = null\n    }\n  }\n}\n","import { CalendarApi } from './CalendarApi'\nimport { ViewApi } from './ViewApi'\nimport { Theme } from './theme/Theme'\nimport { DateEnv } from './datelib/env'\nimport { PluginHooks } from './plugin-system-struct'\nimport { createContext, Context } from './vdom'\nimport { ScrollResponder, ScrollRequestHandler } from './ScrollResponder'\nimport { DateProfileGenerator } from './DateProfileGenerator'\nimport { ViewSpec } from './structs/view-spec'\nimport { CalendarData } from './reducers/data-types'\nimport { Action } from './reducers/Action'\nimport { Emitter } from './common/Emitter'\nimport { InteractionSettingsInput } from './interactions/interaction'\nimport { DateComponent } from './component/DateComponent'\nimport { CalendarContext } from './CalendarContext'\nimport { createDuration } from './datelib/duration'\nimport { ViewOptionsRefined, CalendarListeners } from './options'\n\nexport const ViewContextType: Context<any> = createContext<ViewContext>({} as any) // for Components\nexport type ResizeHandler = (force: boolean) => void\n\n/*\nit's important that ViewContext extends CalendarContext so that components that subscribe to ViewContext\ncan pass in their ViewContext to util functions that accept CalendarContext.\n*/\nexport interface ViewContext extends CalendarContext {\n  options: ViewOptionsRefined // more specific than BaseOptionsRefined\n  theme: Theme\n  isRtl: boolean\n  dateProfileGenerator: DateProfileGenerator\n  viewSpec: ViewSpec\n  viewApi: ViewApi\n  addResizeHandler: (handler: ResizeHandler) => void\n  removeResizeHandler: (handler: ResizeHandler) => void\n  createScrollResponder: (execFunc: ScrollRequestHandler) => ScrollResponder\n  registerInteractiveComponent: (component: DateComponent<any>, settingsInput: InteractionSettingsInput) => void\n  unregisterInteractiveComponent: (component: DateComponent<any>) => void\n}\n\nexport function buildViewContext(\n  viewSpec: ViewSpec,\n  viewApi: ViewApi,\n  viewOptions: ViewOptionsRefined,\n  dateProfileGenerator: DateProfileGenerator,\n  dateEnv: DateEnv,\n  theme: Theme,\n  pluginHooks: PluginHooks,\n  dispatch: (action: Action) => void,\n  getCurrentData: () => CalendarData,\n  emitter: Emitter<CalendarListeners>,\n  calendarApi: CalendarApi,\n  registerInteractiveComponent: (component: DateComponent<any>, settingsInput: InteractionSettingsInput) => void,\n  unregisterInteractiveComponent: (component: DateComponent<any>) => void,\n): ViewContext {\n  return {\n    dateEnv,\n    options: viewOptions,\n    pluginHooks,\n    emitter,\n    dispatch,\n    getCurrentData,\n    calendarApi,\n    viewSpec,\n    viewApi,\n    dateProfileGenerator,\n    theme,\n    isRtl: viewOptions.direction === 'rtl',\n    addResizeHandler(handler: ResizeHandler) {\n      emitter.on('_resize', handler)\n    },\n    removeResizeHandler(handler: ResizeHandler) {\n      emitter.off('_resize', handler)\n    },\n    createScrollResponder(execFunc: ScrollRequestHandler) {\n      return new ScrollResponder(\n        execFunc,\n        emitter,\n        createDuration(viewOptions.scrollTime),\n        viewOptions.scrollTimeReset,\n      )\n    },\n    registerInteractiveComponent,\n    unregisterInteractiveComponent,\n  }\n}\n","/* eslint max-classes-per-file: off */\n\nimport { __assign } from 'tslib'\nimport { Component, Ref } from './vdom'\nimport { ViewContextType, ViewContext } from './ViewContext'\nimport { compareObjs, EqualityFuncs, getUnequalProps } from './util/object'\nimport { Dictionary } from './options'\n\nexport abstract class PureComponent<Props=Dictionary, State=Dictionary> extends Component<Props, State> {\n  static addPropsEquality = addPropsEquality\n  static addStateEquality = addStateEquality\n  static contextType: any = ViewContextType\n\n  context: ViewContext\n  propEquality: EqualityFuncs<Props>\n  stateEquality: EqualityFuncs<State>\n\n  debug: boolean\n\n  shouldComponentUpdate(nextProps: Props, nextState: State) {\n    if (this.debug) {\n      // eslint-disable-next-line no-console\n      console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state))\n    }\n\n    return !compareObjs(this.props, nextProps, this.propEquality) ||\n      !compareObjs(this.state, nextState, this.stateEquality)\n  }\n\n  // HACK for freakin' React StrictMode\n  safeSetState(newState: Partial<State>): void {\n    if (!compareObjs(this.state, { ...this.state, ...newState }, this.stateEquality)) {\n      this.setState(newState)\n    }\n  }\n}\n\nPureComponent.prototype.propEquality = {}\nPureComponent.prototype.stateEquality = {}\n\nexport abstract class BaseComponent<Props=Dictionary, State=Dictionary> extends PureComponent<Props, State> {\n  static contextType: any = ViewContextType\n\n  context: ViewContext\n}\n\nfunction addPropsEquality(this: { prototype: { propEquality: any } }, propEquality) {\n  let hash = Object.create(this.prototype.propEquality)\n  __assign(hash, propEquality)\n  this.prototype.propEquality = hash\n}\n\nfunction addStateEquality(this: { prototype: { stateEquality: any } }, stateEquality) {\n  let hash = Object.create(this.prototype.stateEquality)\n  __assign(hash, stateEquality)\n  this.prototype.stateEquality = hash\n}\n\n// use other one\nexport function setRef<RefType>(ref: Ref<RefType> | void, current: RefType) {\n  if (typeof ref === 'function') {\n    ref(current)\n  } else if (ref) {\n    // see https://github.com/facebook/react/issues/13029\n    (ref as any).current = current\n  }\n}\n","import { BaseComponent } from '../vdom-util'\nimport { EventRenderRange } from './event-rendering'\nimport { EventInstanceHash } from '../structs/event-instance'\nimport { Hit } from '../interactions/hit'\nimport { elementClosest } from '../util/dom-manip'\nimport { guid } from '../util/misc'\nimport { Dictionary } from '../options'\n\nexport type DateComponentHash = { [uid: string]: DateComponent<any, any> }\n\n// NOTE: for fg-events, eventRange.range is NOT sliced,\n// thus, we need isStart/isEnd\nexport interface Seg {\n  component?: DateComponent<any, any>\n  isStart: boolean\n  isEnd: boolean\n  eventRange?: EventRenderRange\n  [otherProp: string]: any // TODO: remove this. extending Seg will handle this\n  el?: never\n  // NOTE: can sometimes have start/end, which are important values :(\n}\n\nexport interface EventSegUiInteractionState {\n  affectedInstances: EventInstanceHash\n  segs: Seg[]\n  isEvent: boolean\n}\n\n/*\nan INTERACTABLE date component\n\nPURPOSES:\n- hook up to fg, fill, and mirror renderers\n- interface for dragging and hits\n*/\nexport abstract class DateComponent<Props=Dictionary, State=Dictionary> extends BaseComponent<Props, State> {\n  uid = guid()\n\n  // Hit System\n  // -----------------------------------------------------------------------------------------------------------------\n\n  prepareHits() {\n  }\n\n  queryHit(positionLeft: number, positionTop: number, elWidth: number, elHeight: number): Hit | null {\n    return null // this should be abstract\n  }\n\n  // Pointer Interaction Utils\n  // -----------------------------------------------------------------------------------------------------------------\n\n  isValidSegDownEl(el: HTMLElement) {\n    return !(this.props as any).eventDrag && // HACK\n      !(this.props as any).eventResize && // HACK\n      !elementClosest(el, '.fc-event-mirror')\n  }\n\n  isValidDateDownEl(el: HTMLElement) {\n    return !elementClosest(el, '.fc-event:not(.fc-bg-event)') &&\n      !elementClosest(el, '.fc-more-link') && // a \"more..\" link\n      !elementClosest(el, 'a[data-navlink]') && // a clickable nav link\n      !elementClosest(el, '.fc-popover') // hack\n  }\n}\n","import { guid } from './util/misc'\nimport { PluginDefInput, PluginDef, PluginHooks } from './plugin-system-struct'\nimport { isArraysEqual } from './util/array'\n\n// TODO: easier way to add new hooks? need to update a million things\n\nexport function createPlugin(input: PluginDefInput): PluginDef {\n  return {\n    id: guid(),\n    deps: input.deps || [],\n    reducers: input.reducers || [],\n    isLoadingFuncs: input.isLoadingFuncs || [],\n    contextInit: [].concat(input.contextInit || []),\n    eventRefiners: input.eventRefiners || {},\n    eventDefMemberAdders: input.eventDefMemberAdders || [],\n    eventSourceRefiners: input.eventSourceRefiners || {},\n    isDraggableTransformers: input.isDraggableTransformers || [],\n    eventDragMutationMassagers: input.eventDragMutationMassagers || [],\n    eventDefMutationAppliers: input.eventDefMutationAppliers || [],\n    dateSelectionTransformers: input.dateSelectionTransformers || [],\n    datePointTransforms: input.datePointTransforms || [],\n    dateSpanTransforms: input.dateSpanTransforms || [],\n    views: input.views || {},\n    viewPropsTransformers: input.viewPropsTransformers || [],\n    isPropsValid: input.isPropsValid || null,\n    externalDefTransforms: input.externalDefTransforms || [],\n    viewContainerAppends: input.viewContainerAppends || [],\n    eventDropTransformers: input.eventDropTransformers || [],\n    componentInteractions: input.componentInteractions || [],\n    calendarInteractions: input.calendarInteractions || [],\n    themeClasses: input.themeClasses || {},\n    eventSourceDefs: input.eventSourceDefs || [],\n    cmdFormatter: input.cmdFormatter,\n    recurringTypes: input.recurringTypes || [],\n    namedTimeZonedImpl: input.namedTimeZonedImpl,\n    initialView: input.initialView || '',\n    elementDraggingImpl: input.elementDraggingImpl,\n    optionChangeHandlers: input.optionChangeHandlers || {},\n    scrollGridImpl: input.scrollGridImpl || null,\n    contentTypeHandlers: input.contentTypeHandlers || {},\n    listenerRefiners: input.listenerRefiners || {},\n    optionRefiners: input.optionRefiners || {},\n    propSetHandlers: input.propSetHandlers || {},\n  }\n}\n\nfunction buildPluginHooks(pluginDefs: PluginDef[], globalDefs: PluginDef[]): PluginHooks {\n  let isAdded: { [pluginId: string]: boolean } = {}\n  let hooks: PluginHooks = {\n    reducers: [],\n    isLoadingFuncs: [],\n    contextInit: [],\n    eventRefiners: {},\n    eventDefMemberAdders: [],\n    eventSourceRefiners: {},\n    isDraggableTransformers: [],\n    eventDragMutationMassagers: [],\n    eventDefMutationAppliers: [],\n    dateSelectionTransformers: [],\n    datePointTransforms: [],\n    dateSpanTransforms: [],\n    views: {},\n    viewPropsTransformers: [],\n    isPropsValid: null,\n    externalDefTransforms: [],\n    viewContainerAppends: [],\n    eventDropTransformers: [],\n    componentInteractions: [],\n    calendarInteractions: [],\n    themeClasses: {},\n    eventSourceDefs: [],\n    cmdFormatter: null,\n    recurringTypes: [],\n    namedTimeZonedImpl: null,\n    initialView: '',\n    elementDraggingImpl: null,\n    optionChangeHandlers: {},\n    scrollGridImpl: null,\n    contentTypeHandlers: {},\n    listenerRefiners: {},\n    optionRefiners: {},\n    propSetHandlers: {},\n  }\n\n  function addDefs(defs: PluginDef[]) {\n    for (let def of defs) {\n      if (!isAdded[def.id]) {\n        isAdded[def.id] = true\n        addDefs(def.deps)\n        hooks = combineHooks(hooks, def)\n      }\n    }\n  }\n\n  if (pluginDefs) {\n    addDefs(pluginDefs)\n  }\n\n  addDefs(globalDefs)\n\n  return hooks\n}\n\nexport function buildBuildPluginHooks() { // memoizes\n  let currentOverrideDefs: PluginDef[] = []\n  let currentGlobalDefs: PluginDef[] = []\n  let currentHooks: PluginHooks\n\n  return (overrideDefs: PluginDef[], globalDefs: PluginDef[]) => {\n    if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {\n      currentHooks = buildPluginHooks(overrideDefs, globalDefs)\n    }\n    currentOverrideDefs = overrideDefs\n    currentGlobalDefs = globalDefs\n    return currentHooks\n  }\n}\n\nfunction combineHooks(hooks0: PluginHooks, hooks1: PluginHooks): PluginHooks {\n  return {\n    reducers: hooks0.reducers.concat(hooks1.reducers),\n    isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs),\n    contextInit: hooks0.contextInit.concat(hooks1.contextInit),\n    eventRefiners: { ...hooks0.eventRefiners, ...hooks1.eventRefiners },\n    eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders),\n    eventSourceRefiners: { ...hooks0.eventSourceRefiners, ...hooks1.eventSourceRefiners },\n    isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),\n    eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),\n    eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),\n    dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),\n    datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),\n    dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),\n    views: { ...hooks0.views, ...hooks1.views },\n    viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),\n    isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,\n    externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),\n    viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends),\n    eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),\n    calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),\n    componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),\n    themeClasses: { ...hooks0.themeClasses, ...hooks1.themeClasses },\n    eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),\n    cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,\n    recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),\n    namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl,\n    initialView: hooks0.initialView || hooks1.initialView, // put earlier plugins FIRST\n    elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl, // \"\n    optionChangeHandlers: { ...hooks0.optionChangeHandlers, ...hooks1.optionChangeHandlers },\n    scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl,\n    contentTypeHandlers: { ...hooks0.contentTypeHandlers, ...hooks1.contentTypeHandlers },\n    listenerRefiners: { ...hooks0.listenerRefiners, ...hooks1.listenerRefiners },\n    optionRefiners: { ...hooks0.optionRefiners, ...hooks1.optionRefiners },\n    propSetHandlers: { ...hooks0.propSetHandlers, ...hooks1.propSetHandlers },\n  }\n}\n","import { Theme } from './Theme'\n\nexport class StandardTheme extends Theme {\n}\n\nStandardTheme.prototype.classes = {\n  root: 'fc-theme-standard', // TODO: compute this off of registered theme name\n  tableCellShaded: 'fc-cell-shaded',\n  buttonGroup: 'fc-button-group',\n  button: 'fc-button fc-button-primary',\n  buttonActive: 'fc-button-active',\n}\n\nStandardTheme.prototype.baseIconClass = 'fc-icon'\nStandardTheme.prototype.iconClasses = {\n  close: 'fc-icon-x',\n  prev: 'fc-icon-chevron-left',\n  next: 'fc-icon-chevron-right',\n  prevYear: 'fc-icon-chevrons-left',\n  nextYear: 'fc-icon-chevrons-right',\n}\nStandardTheme.prototype.rtlIconClasses = {\n  prev: 'fc-icon-chevron-right',\n  next: 'fc-icon-chevron-left',\n  prevYear: 'fc-icon-chevrons-right',\n  nextYear: 'fc-icon-chevrons-left',\n}\n\nStandardTheme.prototype.iconOverrideOption = 'buttonIcons' // TODO: make TS-friendly\nStandardTheme.prototype.iconOverrideCustomButtonOption = 'icon'\nStandardTheme.prototype.iconOverridePrefix = 'fc-icon-'\n","import { ViewConfigHash, ViewComponentType } from './view-config'\nimport { ViewOptions } from '../options'\n\n/*\nRepresents information for an instantiatable View class along with settings\nthat are specific to that view. No other settings, like calendar-wide settings, are stored.\n*/\nexport interface ViewDef {\n  type: string\n  component: ViewComponentType\n  overrides: ViewOptions\n  defaults: ViewOptions\n}\n\nexport type ViewDefHash = { [viewType: string]: ViewDef }\n\nexport function compileViewDefs(defaultConfigs: ViewConfigHash, overrideConfigs: ViewConfigHash): ViewDefHash {\n  let hash: ViewDefHash = {}\n  let viewType: string\n\n  for (viewType in defaultConfigs) {\n    ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs)\n  }\n\n  for (viewType in overrideConfigs) {\n    ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs)\n  }\n\n  return hash\n}\n\nfunction ensureViewDef(\n  viewType: string,\n  hash: ViewDefHash,\n  defaultConfigs: ViewConfigHash,\n  overrideConfigs: ViewConfigHash,\n): ViewDef | null {\n  if (hash[viewType]) {\n    return hash[viewType]\n  }\n\n  let viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs)\n\n  if (viewDef) {\n    hash[viewType] = viewDef\n  }\n\n  return viewDef\n}\n\nfunction buildViewDef(\n  viewType: string,\n  hash: ViewDefHash,\n  defaultConfigs: ViewConfigHash,\n  overrideConfigs: ViewConfigHash,\n): ViewDef | null {\n  let defaultConfig = defaultConfigs[viewType]\n  let overrideConfig = overrideConfigs[viewType]\n\n  let queryProp = (name) => (\n    (defaultConfig && defaultConfig[name] !== null) ? defaultConfig[name] :\n      ((overrideConfig && overrideConfig[name] !== null) ? overrideConfig[name] : null)\n  )\n\n  let theComponent = queryProp('component') as ViewComponentType\n  let superType = queryProp('superType') as string\n  let superDef: ViewDef | null = null\n\n  if (superType) {\n    if (superType === viewType) {\n      throw new Error('Can\\'t have a custom view type that references itself')\n    }\n\n    superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs)\n  }\n\n  if (!theComponent && superDef) {\n    theComponent = superDef.component\n  }\n\n  if (!theComponent) {\n    return null // don't throw a warning, might be settings for a single-unit view\n  }\n\n  return {\n    type: viewType,\n    component: theComponent,\n    defaults: {\n      ...(superDef ? superDef.defaults : {}),\n      ...(defaultConfig ? defaultConfig.rawOptions : {}),\n    },\n    overrides: {\n      ...(superDef ? superDef.overrides : {}),\n      ...(overrideConfig ? overrideConfig.rawOptions : {}),\n    },\n  }\n}\n","/* eslint max-classes-per-file: off */\n\nimport { Ref, createRef, ComponentChildren, createElement, RefObject, createContext, Context } from '../vdom'\nimport { setRef, BaseComponent } from '../vdom-util'\nimport { isPropsEqual } from '../util/object'\nimport { parseClassNames, ClassNamesInput } from '../util/html'\n\nexport type MountArg<ContentArg> = ContentArg & { el: HTMLElement }\nexport type DidMountHandler<TheMountArg extends { el: HTMLElement }> = (mountArg: TheMountArg) => void\nexport type WillUnmountHandler<TheMountArg extends { el: HTMLElement }> = (mountArg: TheMountArg) => void\n\nexport interface RenderHookProps<ContentArg> {\n  hookProps: ContentArg\n  classNames: ClassNamesGenerator<ContentArg>\n  content: CustomContentGenerator<ContentArg>\n  defaultContent?: DefaultContentGenerator<ContentArg>\n  didMount: DidMountHandler<MountArg<ContentArg>>\n  willUnmount: WillUnmountHandler<MountArg<ContentArg>>\n  children: RenderHookPropsChildren\n  elRef?: Ref<any>\n}\n\nexport type RenderHookPropsChildren = (\n  rootElRef: Ref<any>,\n  classNames: string[],\n  innerElRef: Ref<any>,\n  innerContent: ComponentChildren // if falsy, means it wasn't specified\n) => ComponentChildren\n\nexport interface ContentTypeHandlers {\n  [contentKey: string]: () => ({\n    render: (el: HTMLElement, contentVal: any) => void\n    destroy?: () => void\n  })\n}\n\n// NOTE: in JSX, you should always use this class with <HookProps> arg. otherwise, will default to any???\nexport class RenderHook<HookProps> extends BaseComponent<RenderHookProps<HookProps>> {\n  private rootElRef = createRef()\n\n  render() {\n    let { props } = this\n    let { hookProps } = props\n\n    return (\n      <MountHook hookProps={hookProps} didMount={props.didMount} willUnmount={props.willUnmount} elRef={this.handleRootEl}>\n        {(rootElRef) => (\n          <ContentHook hookProps={hookProps} content={props.content} defaultContent={props.defaultContent} backupElRef={this.rootElRef}>\n            {(innerElRef, innerContent) => props.children(\n              rootElRef,\n              normalizeClassNames(props.classNames, hookProps),\n              innerElRef,\n              innerContent,\n            )}\n          </ContentHook>\n        )}\n      </MountHook>\n    )\n  }\n\n  handleRootEl = (el: HTMLElement | null) => {\n    setRef(this.rootElRef, el)\n\n    if (this.props.elRef) {\n      setRef(this.props.elRef, el)\n    }\n  }\n}\n\nexport interface ObjCustomContent {\n  html: string\n  domNodes: any[]\n  [custom: string]: any // TODO: expose hook for plugins to add!\n}\n\nexport type CustomContent = ComponentChildren | ObjCustomContent\nexport type CustomContentGenerator<HookProps> = CustomContent | ((hookProps: HookProps) => CustomContent)\n\nexport type DefaultContentGenerator<HookProps> = (hookProps: HookProps) => ComponentChildren\n// TODO: rename to be about function, not default. use in above type\n\n// for forcing rerender of components that use the ContentHook\nexport const CustomContentRenderContext: Context<number> = createContext<number>(0)\n\nexport interface ContentHookProps<HookProps> {\n  hookProps: HookProps // produced by FullCalendar internally, for rendering an entity/whatever\n  content: CustomContentGenerator<HookProps> // the value of a user-hook, like `eventContent`\n  defaultContent?: DefaultContentGenerator<HookProps> // if content not specified (TODO: just use content?)\n  children: ( // for producing a wrapper around the content\n    innerElRef: Ref<any>,\n    innerContent: ComponentChildren // if falsy, means it wasn't specified\n  ) => ComponentChildren\n  backupElRef?: RefObject<any>\n}\n\ninterface ContentHookInnerProps<HookProps> extends ContentHookProps<HookProps> {\n  renderId: number\n}\n\nexport function ContentHook<HookProps>(props: ContentHookProps<HookProps>) { // TODO: rename to CustomContentHook?\n  return (\n    <CustomContentRenderContext.Consumer>\n      {(renderId) => (\n        <ContentHookInner renderId={renderId} {...props} />\n      )}\n    </CustomContentRenderContext.Consumer>\n  )\n}\n\nclass ContentHookInner<HookProps> extends BaseComponent<ContentHookInnerProps<HookProps>> {\n  private innerElRef = createRef()\n\n  private customContentInfo: {\n    contentKey: string\n    contentVal: any\n    render: (el: HTMLElement, contentVal: any) => void\n    destroy?: () => void\n  }\n\n  render() {\n    return this.props.children(this.innerElRef, this.renderInnerContent())\n  }\n\n  componentDidMount() {\n    this.updateCustomContent()\n  }\n\n  componentDidUpdate() {\n    this.updateCustomContent()\n  }\n\n  componentWillUnmount() {\n    if (this.customContentInfo && this.customContentInfo.destroy) {\n      this.customContentInfo.destroy()\n    }\n  }\n\n  private renderInnerContent() {\n    let { customContentInfo } = this // only populated if using non-[p]react node(s)\n    let innerContent = this.getInnerContent()\n    let meta = this.getContentMeta(innerContent)\n\n    // initial run, or content-type changing? (from vue -> react for example)\n    if (!customContentInfo || customContentInfo.contentKey !== meta.contentKey) {\n      // clearing old value\n      if (customContentInfo) {\n        if (customContentInfo.destroy) {\n          customContentInfo.destroy()\n        }\n        customContentInfo = this.customContentInfo = null\n      }\n      // assigning new value\n      if (meta.contentKey) {\n        customContentInfo = this.customContentInfo = { // for non-[p]react\n          contentKey: meta.contentKey,\n          contentVal: innerContent[meta.contentKey],\n          ...meta.buildLifecycleFuncs(),\n        }\n      }\n    // updating\n    } else if (customContentInfo) {\n      customContentInfo.contentVal = innerContent[meta.contentKey]\n    }\n\n    return customContentInfo\n      ? [] // signal that something was specified\n      : innerContent // assume a [p]react vdom node. use it\n  }\n\n  private getInnerContent() {\n    let { props } = this\n    let innerContent = normalizeContent(props.content, props.hookProps)\n\n    if (innerContent === undefined) { // use the default\n      innerContent = normalizeContent(props.defaultContent, props.hookProps)\n    }\n\n    return innerContent == null ? null : innerContent // convert undefined to null (better for React)\n  }\n\n  private getContentMeta(innerContent: any) {\n    let { contentTypeHandlers } = this.context.pluginHooks\n    let contentKey = ''\n    let buildLifecycleFuncs = null\n\n    if (innerContent) { // allowed to be null, for convenience to caller\n      for (let searchKey in contentTypeHandlers) {\n        if (innerContent[searchKey] !== undefined) {\n          contentKey = searchKey\n          buildLifecycleFuncs = contentTypeHandlers[searchKey]\n          break\n        }\n      }\n    }\n\n    return { contentKey, buildLifecycleFuncs }\n  }\n\n  private updateCustomContent() {\n    if (this.customContentInfo) { // for non-[p]react\n      this.customContentInfo.render(\n        this.innerElRef.current || this.props.backupElRef.current, // the element to render into\n        this.customContentInfo.contentVal,\n      )\n    }\n  }\n}\n\nexport interface MountHookProps<ContentArg> {\n  hookProps: ContentArg\n  didMount: DidMountHandler<MountArg<ContentArg>>\n  willUnmount: WillUnmountHandler<MountArg<ContentArg>>\n  children: (rootElRef: Ref<any>) => ComponentChildren\n  elRef?: Ref<any> // maybe get rid of once we have better API for caller to combine refs\n}\n\nexport class MountHook<ContentArg> extends BaseComponent<MountHookProps<ContentArg>> {\n  rootEl: HTMLElement\n\n  render() {\n    return this.props.children(this.handleRootEl)\n  }\n\n  componentDidMount() {\n    let callback = this.props.didMount\n\n    if (callback) {\n      callback({ ...this.props.hookProps, el: this.rootEl })\n    }\n  }\n\n  componentWillUnmount() {\n    let callback = this.props.willUnmount\n\n    if (callback) {\n      callback({ ...this.props.hookProps, el: this.rootEl })\n    }\n  }\n\n  private handleRootEl = (rootEl: HTMLElement) => {\n    this.rootEl = rootEl\n\n    if (this.props.elRef) {\n      setRef(this.props.elRef, rootEl)\n    }\n  }\n}\n\nexport function buildClassNameNormalizer<HookProps>() { // TODO: general deep-memoizer?\n  let currentGenerator: ClassNamesGenerator<HookProps>\n  let currentHookProps: HookProps\n  let currentClassNames: string[] = []\n\n  return (generator: ClassNamesGenerator<HookProps>, hookProps: HookProps) => {\n    if (!currentHookProps || !isPropsEqual(currentHookProps, hookProps) || generator !== currentGenerator) {\n      currentGenerator = generator\n      currentHookProps = hookProps\n      currentClassNames = normalizeClassNames(generator, hookProps)\n    }\n\n    return currentClassNames\n  }\n}\n\nexport type ClassNamesGenerator<HookProps> = ClassNamesInput | ((hookProps: HookProps) => ClassNamesInput)\n\nfunction normalizeClassNames<HookProps>(classNames: ClassNamesGenerator<HookProps>, hookProps: HookProps): string[] {\n  if (typeof classNames === 'function') {\n    classNames = classNames(hookProps)\n  }\n\n  return parseClassNames(classNames)\n}\n\nfunction normalizeContent(input, hookProps) {\n  if (typeof input === 'function') {\n    return input(hookProps, createElement) // give the function the vdom-creation func\n  }\n  return input\n}\n","import { ViewSpec } from '../structs/view-spec'\nimport { MountHook, buildClassNameNormalizer, MountArg } from './render-hook'\nimport { ComponentChildren, createElement, Ref } from '../vdom'\nimport { BaseComponent } from '../vdom-util'\nimport { ViewApi } from '../ViewApi'\n\nexport interface ViewRootProps {\n  viewSpec: ViewSpec\n  children: (rootElRef: Ref<any>, classNames: string[]) => ComponentChildren\n  elRef?: Ref<any>\n}\n\nexport interface ViewContentArg {\n  view: ViewApi\n}\n\nexport type ViewMountArg = MountArg<ViewContentArg>\n\nexport class ViewRoot extends BaseComponent<ViewRootProps> {\n  normalizeClassNames = buildClassNameNormalizer<ViewContentArg>()\n\n  render() {\n    let { props, context } = this\n    let { options } = context\n    let hookProps: ViewContentArg = { view: context.viewApi }\n    let customClassNames = this.normalizeClassNames(options.viewClassNames, hookProps)\n\n    return (\n      <MountHook\n        hookProps={hookProps}\n        didMount={options.viewDidMount}\n        willUnmount={options.viewWillUnmount}\n        elRef={props.elRef}\n      >\n        {(rootElRef) => props.children(\n          rootElRef,\n          [`fc-${props.viewSpec.type}-view`, 'fc-view'].concat(customClassNames),\n        )}\n      </MountHook>\n    )\n  }\n}\n","import { ViewProps } from '../View'\nimport { mapHash } from '../util/object'\nimport { ComponentType, Component, createElement } from '../vdom'\nimport { ViewRoot } from '../common/ViewRoot'\nimport { RenderHook, MountArg } from '../common/render-hook'\nimport { ViewContext, ViewContextType } from '../ViewContext'\nimport { ViewOptions } from '../options'\nimport { Duration } from '../datelib/duration'\n\n/*\nA view-config represents information for either:\nA) creating a new instantiatable view class. in which case, supplied a class/type in addition to options, OR\nB) options to customize an existing view, in which case only provides options.\n*/\n\nexport type ViewComponent = Component<ViewProps> // an instance\nexport type ViewComponentType = ComponentType<ViewProps>\n\nexport type ViewConfigInput = ViewComponentType | ViewOptions\nexport type ViewConfigInputHash = { [viewType: string]: ViewConfigInput }\n\nexport interface ViewConfig {\n  superType: string\n  component: ViewComponentType | null\n  rawOptions: ViewOptions\n}\n\nexport type ViewConfigHash = { [viewType: string]: ViewConfig }\n\nexport function parseViewConfigs(inputs: ViewConfigInputHash): ViewConfigHash {\n  return mapHash(inputs, parseViewConfig)\n}\n\nfunction parseViewConfig(input: ViewConfigInput): ViewConfig {\n  let rawOptions: ViewOptions = typeof input === 'function' ?\n    { component: input } :\n    input\n  let { component } = rawOptions\n\n  if (rawOptions.content) {\n    component = createViewHookComponent(rawOptions)\n    // TODO: remove content/classNames/didMount/etc from options?\n  }\n\n  return {\n    superType: rawOptions.type as any,\n    component: component as any,\n    rawOptions, // includes type and component too :(\n  }\n}\n\nexport interface SpecificViewContentArg extends ViewProps {\n  nextDayThreshold: Duration\n}\n\nexport type SpecificViewMountArg = MountArg<SpecificViewContentArg>\n\nfunction createViewHookComponent(options: ViewOptions) {\n  return (viewProps: ViewProps) => (\n    <ViewContextType.Consumer>\n      {(context: ViewContext) => (\n        <ViewRoot viewSpec={context.viewSpec}>\n          {(viewElRef, viewClassNames) => {\n            let hookProps: SpecificViewContentArg = {\n              ...viewProps,\n              nextDayThreshold: context.options.nextDayThreshold,\n            }\n            return (\n              <RenderHook\n                hookProps={hookProps}\n                classNames={options.classNames as any}\n                content={options.content as any}\n                didMount={options.didMount as any}\n                willUnmount={options.willUnmount as any}\n                elRef={viewElRef}\n              >\n                {(rootElRef, customClassNames, innerElRef, innerContent) => (\n                  <div className={viewClassNames.concat(customClassNames).join(' ')} ref={rootElRef}>\n                    {innerContent}\n                  </div>\n                )}\n              </RenderHook>\n            )\n          }}\n        </ViewRoot>\n      )}\n    </ViewContextType.Consumer>\n  )\n}\n","import { ViewDef, compileViewDefs } from './view-def'\nimport { Duration, createDuration, greatestDurationDenominator, DurationInput } from '../datelib/duration'\nimport { mapHash } from '../util/object'\nimport { ViewOptions, CalendarOptions, BASE_OPTION_DEFAULTS } from '../options'\nimport { ViewConfigInputHash, parseViewConfigs, ViewConfigHash, ViewComponentType } from './view-config'\n\n/*\nRepresents everything needed to instantiate a new view instance,\nincluding options that have been compiled from view-specific and calendar-wide options,\nas well as duration information.\n\nOverall flow:\nViewConfig -> ViewDef -> ViewSpec\n*/\nexport interface ViewSpec {\n  type: string\n  component: ViewComponentType\n  duration: Duration\n  durationUnit: string\n  singleUnit: string\n  optionDefaults: ViewOptions\n  optionOverrides: ViewOptions\n  buttonTextOverride: string\n  buttonTextDefault: string\n  buttonTitleOverride: string | ((...args: any[]) => string)\n  buttonTitleDefault: string | ((...args: any[]) => string)\n}\n\nexport type ViewSpecHash = { [viewType: string]: ViewSpec }\n\nexport function buildViewSpecs(\n  defaultInputs: ViewConfigInputHash,\n  optionOverrides: CalendarOptions,\n  dynamicOptionOverrides: CalendarOptions,\n  localeDefaults,\n): ViewSpecHash {\n  let defaultConfigs = parseViewConfigs(defaultInputs)\n  let overrideConfigs = parseViewConfigs(optionOverrides.views)\n  let viewDefs = compileViewDefs(defaultConfigs, overrideConfigs)\n\n  return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults))\n}\n\nfunction buildViewSpec(\n  viewDef: ViewDef,\n  overrideConfigs: ViewConfigHash,\n  optionOverrides: CalendarOptions,\n  dynamicOptionOverrides: CalendarOptions,\n  localeDefaults,\n): ViewSpec {\n  let durationInput =\n    viewDef.overrides.duration ||\n    viewDef.defaults.duration ||\n    dynamicOptionOverrides.duration ||\n    optionOverrides.duration\n\n  let duration = null\n  let durationUnit = ''\n  let singleUnit = ''\n  let singleUnitOverrides: ViewOptions = {}\n\n  if (durationInput) {\n    duration = createDurationCached(durationInput)\n\n    if (duration) { // valid?\n      let denom = greatestDurationDenominator(duration)\n      durationUnit = denom.unit\n\n      if (denom.value === 1) {\n        singleUnit = durationUnit\n        singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].rawOptions : {}\n      }\n    }\n  }\n\n  let queryButtonText = (optionsSubset) => {\n    let buttonTextMap = optionsSubset.buttonText || {}\n    let buttonTextKey = viewDef.defaults.buttonTextKey as string\n\n    if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) {\n      return buttonTextMap[buttonTextKey]\n    }\n    if (buttonTextMap[viewDef.type] != null) {\n      return buttonTextMap[viewDef.type]\n    }\n    if (buttonTextMap[singleUnit] != null) {\n      return buttonTextMap[singleUnit]\n    }\n    return null\n  }\n\n  let queryButtonTitle = (optionsSubset) => { // TODO: more DRY with queryButtonText\n    let buttonHints = optionsSubset.buttonHints || {}\n    let buttonKey = viewDef.defaults.buttonTextKey as string // use same key as text\n\n    if (buttonKey != null && buttonHints[buttonKey] != null) {\n      return buttonHints[buttonKey]\n    }\n    if (buttonHints[viewDef.type] != null) {\n      return buttonHints[viewDef.type]\n    }\n    if (buttonHints[singleUnit] != null) {\n      return buttonHints[singleUnit]\n    }\n    return null\n  }\n\n  return {\n    type: viewDef.type,\n    component: viewDef.component,\n    duration,\n    durationUnit,\n    singleUnit,\n    optionDefaults: viewDef.defaults,\n    optionOverrides: { ...singleUnitOverrides, ...viewDef.overrides },\n\n    buttonTextOverride:\n      queryButtonText(dynamicOptionOverrides) ||\n      queryButtonText(optionOverrides) || // constructor-specified buttonText lookup hash takes precedence\n      viewDef.overrides.buttonText, // `buttonText` for view-specific options is a string\n    buttonTextDefault:\n      queryButtonText(localeDefaults) ||\n      viewDef.defaults.buttonText ||\n      queryButtonText(BASE_OPTION_DEFAULTS) ||\n      viewDef.type, // fall back to given view name\n\n    // not DRY\n    buttonTitleOverride:\n      queryButtonTitle(dynamicOptionOverrides) ||\n      queryButtonTitle(optionOverrides) ||\n      viewDef.overrides.buttonHint,\n    buttonTitleDefault:\n      queryButtonTitle(localeDefaults) ||\n      viewDef.defaults.buttonHint ||\n      queryButtonTitle(BASE_OPTION_DEFAULTS),\n    // will eventually fall back to buttonText\n  }\n}\n\n// hack to get memoization working\n\nlet durationInputMap: { [json: string]: Duration } = {}\n\nfunction createDurationCached(durationInput: DurationInput) {\n  let json = JSON.stringify(durationInput)\n  let res = durationInputMap[json]\n\n  if (res === undefined) {\n    res = createDuration(durationInput)\n    durationInputMap[json] = res\n  }\n\n  return res\n}\n","import { DateMarker, startOfDay, addDays } from './datelib/marker'\nimport { Duration, createDuration, asRoughDays, asRoughMs, greatestDurationDenominator } from './datelib/duration'\nimport {\n  DateRange,\n  OpenDateRange,\n  constrainMarkerToRange,\n  intersectRanges,\n  rangesIntersect,\n  parseRange,\n  DateRangeInput,\n} from './datelib/date-range'\nimport { DateEnv, DateInput } from './datelib/env'\nimport { computeVisibleDayRange } from './util/date'\nimport { getNow } from './reducers/current-date'\nimport { CalendarApi } from './CalendarApi'\n\nexport interface DateProfile {\n  currentRange: DateRange // TODO: does this include slotMinTime/slotMaxTime?\n  currentRangeUnit: string\n  isRangeAllDay: boolean\n  validRange: OpenDateRange\n  activeRange: DateRange | null\n  renderRange: DateRange\n  slotMinTime: Duration\n  slotMaxTime: Duration\n  isValid: boolean\n  dateIncrement: Duration\n}\n\nexport interface DateProfileGeneratorProps extends DateProfileOptions {\n  dateProfileGeneratorClass: DateProfileGeneratorClass // not used by DateProfileGenerator itself\n  duration: Duration\n  durationUnit: string\n  usesMinMaxTime: boolean\n  dateEnv: DateEnv\n  calendarApi: CalendarApi\n}\n\nexport interface DateProfileOptions {\n  slotMinTime: Duration\n  slotMaxTime: Duration\n  showNonCurrentDates?: boolean\n  dayCount?: number\n  dateAlignment?: string\n  dateIncrement?: Duration\n  hiddenDays?: number[]\n  weekends?: boolean\n  nowInput?: DateInput | (() => DateInput)\n  validRangeInput?: DateRangeInput | ((this: CalendarApi, nowDate: Date) => DateRangeInput)\n  visibleRangeInput?: DateRangeInput | ((this: CalendarApi, nowDate: Date) => DateRangeInput)\n  monthMode?: boolean\n  fixedWeekCount?: boolean\n}\n\nexport type DateProfileGeneratorClass = {\n  new(props: DateProfileGeneratorProps): DateProfileGenerator\n}\n\nexport class DateProfileGenerator { // only publicly used for isHiddenDay :(\n  nowDate: DateMarker\n\n  isHiddenDayHash: boolean[]\n\n  constructor(protected props: DateProfileGeneratorProps) {\n    this.nowDate = getNow(props.nowInput, props.dateEnv)\n    this.initHiddenDays()\n  }\n\n  /* Date Range Computation\n  ------------------------------------------------------------------------------------------------------------------*/\n\n  // Builds a structure with info about what the dates/ranges will be for the \"prev\" view.\n  buildPrev(currentDateProfile: DateProfile, currentDate: DateMarker, forceToValid?: boolean): DateProfile {\n    let { dateEnv } = this.props\n\n    let prevDate = dateEnv.subtract(\n      dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n      currentDateProfile.dateIncrement,\n    )\n\n    return this.build(prevDate, -1, forceToValid)\n  }\n\n  // Builds a structure with info about what the dates/ranges will be for the \"next\" view.\n  buildNext(currentDateProfile: DateProfile, currentDate: DateMarker, forceToValid?: boolean): DateProfile {\n    let { dateEnv } = this.props\n\n    let nextDate = dateEnv.add(\n      dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n      currentDateProfile.dateIncrement,\n    )\n\n    return this.build(nextDate, 1, forceToValid)\n  }\n\n  // Builds a structure holding dates/ranges for rendering around the given date.\n  // Optional direction param indicates whether the date is being incremented/decremented\n  // from its previous value. decremented = -1, incremented = 1 (default).\n  build(currentDate: DateMarker, direction?, forceToValid = true): DateProfile {\n    let { props } = this\n    let validRange: DateRange\n    let currentInfo\n    let isRangeAllDay\n    let renderRange: DateRange\n    let activeRange: DateRange\n    let isValid\n\n    validRange = this.buildValidRange()\n    validRange = this.trimHiddenDays(validRange)\n\n    if (forceToValid) {\n      currentDate = constrainMarkerToRange(currentDate, validRange)\n    }\n\n    currentInfo = this.buildCurrentRangeInfo(currentDate, direction)\n    isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit)\n    renderRange = this.buildRenderRange(\n      this.trimHiddenDays(currentInfo.range),\n      currentInfo.unit,\n      isRangeAllDay,\n    )\n    renderRange = this.trimHiddenDays(renderRange)\n    activeRange = renderRange\n\n    if (!props.showNonCurrentDates) {\n      activeRange = intersectRanges(activeRange, currentInfo.range)\n    }\n\n    activeRange = this.adjustActiveRange(activeRange)\n    activeRange = intersectRanges(activeRange, validRange) // might return null\n\n    // it's invalid if the originally requested date is not contained,\n    // or if the range is completely outside of the valid range.\n    isValid = rangesIntersect(currentInfo.range, validRange)\n\n    return {\n      // constraint for where prev/next operations can go and where events can be dragged/resized to.\n      // an object with optional start and end properties.\n      validRange,\n\n      // range the view is formally responsible for.\n      // for example, a month view might have 1st-31st, excluding padded dates\n      currentRange: currentInfo.range,\n\n      // name of largest unit being displayed, like \"month\" or \"week\"\n      currentRangeUnit: currentInfo.unit,\n\n      isRangeAllDay,\n\n      // dates that display events and accept drag-n-drop\n      // will be `null` if no dates accept events\n      activeRange,\n\n      // date range with a rendered skeleton\n      // includes not-active days that need some sort of DOM\n      renderRange,\n\n      // Duration object that denotes the first visible time of any given day\n      slotMinTime: props.slotMinTime,\n\n      // Duration object that denotes the exclusive visible end time of any given day\n      slotMaxTime: props.slotMaxTime,\n\n      isValid,\n\n      // how far the current date will move for a prev/next operation\n      dateIncrement: this.buildDateIncrement(currentInfo.duration),\n      // pass a fallback (might be null) ^\n    }\n  }\n\n  // Builds an object with optional start/end properties.\n  // Indicates the minimum/maximum dates to display.\n  // not responsible for trimming hidden days.\n  buildValidRange(): OpenDateRange {\n    let input = this.props.validRangeInput\n    let simpleInput = typeof input === 'function'\n      ? input.call(this.props.calendarApi, this.nowDate)\n      : input\n\n    return this.refineRange(simpleInput) ||\n      { start: null, end: null } // completely open-ended\n  }\n\n  // Builds a structure with info about the \"current\" range, the range that is\n  // highlighted as being the current month for example.\n  // See build() for a description of `direction`.\n  // Guaranteed to have `range` and `unit` properties. `duration` is optional.\n  buildCurrentRangeInfo(date: DateMarker, direction) {\n    let { props } = this\n    let duration = null\n    let unit = null\n    let range = null\n    let dayCount\n\n    if (props.duration) {\n      duration = props.duration\n      unit = props.durationUnit\n      range = this.buildRangeFromDuration(date, direction, duration, unit)\n    } else if ((dayCount = this.props.dayCount)) {\n      unit = 'day'\n      range = this.buildRangeFromDayCount(date, direction, dayCount)\n    } else if ((range = this.buildCustomVisibleRange(date))) {\n      unit = props.dateEnv.greatestWholeUnit(range.start, range.end).unit\n    } else {\n      duration = this.getFallbackDuration()\n      unit = greatestDurationDenominator(duration).unit\n      range = this.buildRangeFromDuration(date, direction, duration, unit)\n    }\n\n    return { duration, unit, range }\n  }\n\n  getFallbackDuration(): Duration {\n    return createDuration({ day: 1 })\n  }\n\n  // Returns a new activeRange to have time values (un-ambiguate)\n  // slotMinTime or slotMaxTime causes the range to expand.\n  adjustActiveRange(range: DateRange) {\n    let { dateEnv, usesMinMaxTime, slotMinTime, slotMaxTime } = this.props\n    let { start, end } = range\n\n    if (usesMinMaxTime) {\n      // expand active range if slotMinTime is negative (why not when positive?)\n      if (asRoughDays(slotMinTime) < 0) {\n        start = startOfDay(start) // necessary?\n        start = dateEnv.add(start, slotMinTime)\n      }\n\n      // expand active range if slotMaxTime is beyond one day (why not when negative?)\n      if (asRoughDays(slotMaxTime) > 1) {\n        end = startOfDay(end) // necessary?\n        end = addDays(end, -1)\n        end = dateEnv.add(end, slotMaxTime)\n      }\n    }\n\n    return { start, end }\n  }\n\n  // Builds the \"current\" range when it is specified as an explicit duration.\n  // `unit` is the already-computed greatestDurationDenominator unit of duration.\n  buildRangeFromDuration(date: DateMarker, direction, duration: Duration, unit) {\n    let { dateEnv, dateAlignment } = this.props\n    let start: DateMarker\n    let end: DateMarker\n    let res\n\n    // compute what the alignment should be\n    if (!dateAlignment) {\n      let { dateIncrement } = this.props\n\n      if (dateIncrement) {\n        // use the smaller of the two units\n        if (asRoughMs(dateIncrement) < asRoughMs(duration)) {\n          dateAlignment = greatestDurationDenominator(dateIncrement).unit\n        } else {\n          dateAlignment = unit\n        }\n      } else {\n        dateAlignment = unit\n      }\n    }\n\n    // if the view displays a single day or smaller\n    if (asRoughDays(duration) <= 1) {\n      if (this.isHiddenDay(start)) {\n        start = this.skipHiddenDays(start, direction)\n        start = startOfDay(start)\n      }\n    }\n\n    function computeRes() {\n      start = dateEnv.startOf(date, dateAlignment)\n      end = dateEnv.add(start, duration)\n      res = { start, end }\n    }\n\n    computeRes()\n\n    // if range is completely enveloped by hidden days, go past the hidden days\n    if (!this.trimHiddenDays(res)) {\n      date = this.skipHiddenDays(date, direction)\n      computeRes()\n    }\n\n    return res\n  }\n\n  // Builds the \"current\" range when a dayCount is specified.\n  buildRangeFromDayCount(date: DateMarker, direction, dayCount) {\n    let { dateEnv, dateAlignment } = this.props\n    let runningCount = 0\n    let start: DateMarker = date\n    let end: DateMarker\n\n    if (dateAlignment) {\n      start = dateEnv.startOf(start, dateAlignment)\n    }\n\n    start = startOfDay(start)\n    start = this.skipHiddenDays(start, direction)\n\n    end = start\n    do {\n      end = addDays(end, 1)\n      if (!this.isHiddenDay(end)) {\n        runningCount += 1\n      }\n    } while (runningCount < dayCount)\n\n    return { start, end }\n  }\n\n  // Builds a normalized range object for the \"visible\" range,\n  // which is a way to define the currentRange and activeRange at the same time.\n  buildCustomVisibleRange(date: DateMarker) {\n    let { props } = this\n    let input = props.visibleRangeInput\n    let simpleInput = typeof input === 'function'\n      ? input.call(props.calendarApi, props.dateEnv.toDate(date))\n      : input\n\n    let range = this.refineRange(simpleInput)\n\n    if (range && (range.start == null || range.end == null)) {\n      return null\n    }\n\n    return range\n  }\n\n  // Computes the range that will represent the element/cells for *rendering*,\n  // but which may have voided days/times.\n  // not responsible for trimming hidden days.\n  buildRenderRange(currentRange: DateRange, currentRangeUnit, isRangeAllDay) {\n    return currentRange\n  }\n\n  // Compute the duration value that should be added/substracted to the current date\n  // when a prev/next operation happens.\n  buildDateIncrement(fallback): Duration {\n    let { dateIncrement } = this.props\n    let customAlignment\n\n    if (dateIncrement) {\n      return dateIncrement\n    }\n\n    if ((customAlignment = this.props.dateAlignment)) {\n      return createDuration(1, customAlignment)\n    }\n\n    if (fallback) {\n      return fallback\n    }\n\n    return createDuration({ days: 1 })\n  }\n\n  refineRange(rangeInput: DateRangeInput | undefined): DateRange | null {\n    if (rangeInput) {\n      let range = parseRange(rangeInput, this.props.dateEnv)\n\n      if (range) {\n        range = computeVisibleDayRange(range)\n      }\n\n      return range\n    }\n\n    return null\n  }\n\n  /* Hidden Days\n  ------------------------------------------------------------------------------------------------------------------*/\n\n  // Initializes internal variables related to calculating hidden days-of-week\n  initHiddenDays() {\n    let hiddenDays = this.props.hiddenDays || [] // array of day-of-week indices that are hidden\n    let isHiddenDayHash = [] // is the day-of-week hidden? (hash with day-of-week-index -> bool)\n    let dayCnt = 0\n    let i\n\n    if (this.props.weekends === false) {\n      hiddenDays.push(0, 6) // 0=sunday, 6=saturday\n    }\n\n    for (i = 0; i < 7; i += 1) {\n      if (\n        !(isHiddenDayHash[i] = hiddenDays.indexOf(i) !== -1)\n      ) {\n        dayCnt += 1\n      }\n    }\n\n    if (!dayCnt) {\n      throw new Error('invalid hiddenDays') // all days were hidden? bad.\n    }\n\n    this.isHiddenDayHash = isHiddenDayHash\n  }\n\n  // Remove days from the beginning and end of the range that are computed as hidden.\n  // If the whole range is trimmed off, returns null\n  trimHiddenDays(range: DateRange): DateRange | null {\n    let { start, end } = range\n\n    if (start) {\n      start = this.skipHiddenDays(start)\n    }\n\n    if (end) {\n      end = this.skipHiddenDays(end, -1, true)\n    }\n\n    if (start == null || end == null || start < end) {\n      return { start, end }\n    }\n\n    return null\n  }\n\n  // Is the current day hidden?\n  // `day` is a day-of-week index (0-6), or a Date (used for UTC)\n  isHiddenDay(day) {\n    if (day instanceof Date) {\n      day = day.getUTCDay()\n    }\n    return this.isHiddenDayHash[day]\n  }\n\n  // Incrementing the current day until it is no longer a hidden day, returning a copy.\n  // DOES NOT CONSIDER validRange!\n  // If the initial value of `date` is not a hidden day, don't do anything.\n  // Pass `isExclusive` as `true` if you are dealing with an end date.\n  // `inc` defaults to `1` (increment one day forward each time)\n  skipHiddenDays(date: DateMarker, inc = 1, isExclusive = false) {\n    while (\n      this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]\n    ) {\n      date = addDays(date, inc)\n    }\n    return date\n  }\n}\n","import { EventSource, EventSourceHash } from '../structs/event-source'\nimport { parseEventSource, buildEventSourceRefiners } from '../structs/event-source-parse'\nimport { arrayToHash, filterHash } from '../util/object'\nimport { DateRange } from '../datelib/date-range'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { Action } from './Action'\nimport { guid } from '../util/misc'\nimport { CalendarContext } from '../CalendarContext'\nimport { CalendarOptions } from '../options'\n\nexport function initEventSources(calendarOptions, dateProfile: DateProfile, context: CalendarContext) {\n  let activeRange = dateProfile ? dateProfile.activeRange : null\n\n  return addSources(\n    {},\n    parseInitialSources(calendarOptions, context),\n    activeRange,\n    context,\n  )\n}\n\nexport function reduceEventSources(\n  eventSources: EventSourceHash,\n  action: Action,\n  dateProfile: DateProfile,\n  context: CalendarContext,\n): EventSourceHash {\n  let activeRange = dateProfile ? dateProfile.activeRange : null // need this check?\n\n  switch (action.type) {\n    case 'ADD_EVENT_SOURCES': // already parsed\n      return addSources(eventSources, action.sources, activeRange, context)\n\n    case 'REMOVE_EVENT_SOURCE':\n      return removeSource(eventSources, action.sourceId)\n\n    case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n    case 'NEXT':\n    case 'CHANGE_DATE':\n    case 'CHANGE_VIEW_TYPE':\n      if (dateProfile) {\n        return fetchDirtySources(eventSources, activeRange, context)\n      }\n      return eventSources\n\n    case 'FETCH_EVENT_SOURCES':\n      return fetchSourcesByIds(\n        eventSources,\n        (action as any).sourceIds ? // why no type?\n          arrayToHash((action as any).sourceIds) :\n          excludeStaticSources(eventSources, context),\n        activeRange,\n        action.isRefetch || false,\n        context,\n      )\n\n    case 'RECEIVE_EVENTS':\n    case 'RECEIVE_EVENT_ERROR':\n      return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange)\n\n    case 'REMOVE_ALL_EVENT_SOURCES':\n      return {}\n\n    default:\n      return eventSources\n  }\n}\n\nexport function reduceEventSourcesNewTimeZone(eventSources: EventSourceHash, dateProfile: DateProfile, context: CalendarContext) {\n  let activeRange = dateProfile ? dateProfile.activeRange : null // need this check?\n\n  return fetchSourcesByIds(\n    eventSources,\n    excludeStaticSources(eventSources, context),\n    activeRange,\n    true,\n    context,\n  )\n}\n\nexport function computeEventSourcesLoading(eventSources: EventSourceHash): boolean {\n  for (let sourceId in eventSources) {\n    if (eventSources[sourceId].isFetching) {\n      return true\n    }\n  }\n\n  return false\n}\n\nfunction addSources(\n  eventSourceHash: EventSourceHash,\n  sources: EventSource<any>[],\n  fetchRange: DateRange | null,\n  context: CalendarContext,\n): EventSourceHash {\n  let hash: EventSourceHash = {}\n\n  for (let source of sources) {\n    hash[source.sourceId] = source\n  }\n\n  if (fetchRange) {\n    hash = fetchDirtySources(hash, fetchRange, context)\n  }\n\n  return { ...eventSourceHash, ...hash }\n}\n\nfunction removeSource(eventSourceHash: EventSourceHash, sourceId: string): EventSourceHash {\n  return filterHash(eventSourceHash, (eventSource: EventSource<any>) => eventSource.sourceId !== sourceId)\n}\n\nfunction fetchDirtySources(sourceHash: EventSourceHash, fetchRange: DateRange, context: CalendarContext): EventSourceHash {\n  return fetchSourcesByIds(\n    sourceHash,\n    filterHash(sourceHash, (eventSource) => isSourceDirty(eventSource, fetchRange, context)),\n    fetchRange,\n    false,\n    context,\n  )\n}\n\nfunction isSourceDirty(eventSource: EventSource<any>, fetchRange: DateRange, context: CalendarContext) {\n  if (!doesSourceNeedRange(eventSource, context)) {\n    return !eventSource.latestFetchId\n  }\n  return !context.options.lazyFetching ||\n      !eventSource.fetchRange ||\n      eventSource.isFetching || // always cancel outdated in-progress fetches\n      fetchRange.start < eventSource.fetchRange.start ||\n      fetchRange.end > eventSource.fetchRange.end\n}\n\nfunction fetchSourcesByIds(\n  prevSources: EventSourceHash,\n  sourceIdHash: { [sourceId: string]: any },\n  fetchRange: DateRange,\n  isRefetch: boolean,\n  context: CalendarContext,\n): EventSourceHash {\n  let nextSources: EventSourceHash = {}\n\n  for (let sourceId in prevSources) {\n    let source = prevSources[sourceId]\n\n    if (sourceIdHash[sourceId]) {\n      nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context)\n    } else {\n      nextSources[sourceId] = source\n    }\n  }\n\n  return nextSources\n}\n\nfunction fetchSource(eventSource: EventSource<any>, fetchRange: DateRange, isRefetch: boolean, context: CalendarContext) {\n  let { options, calendarApi } = context\n  let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId]\n  let fetchId = guid()\n\n  sourceDef.fetch(\n    {\n      eventSource,\n      range: fetchRange,\n      isRefetch,\n      context,\n    },\n    (res) => { // success callback\n      let { rawEvents } = res\n\n      if (options.eventSourceSuccess) {\n        rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.xhr) || rawEvents\n      }\n\n      if (eventSource.success) {\n        rawEvents = eventSource.success.call(calendarApi, rawEvents, res.xhr) || rawEvents\n      }\n\n      context.dispatch({\n        type: 'RECEIVE_EVENTS',\n        sourceId: eventSource.sourceId,\n        fetchId,\n        fetchRange,\n        rawEvents,\n      })\n    },\n    (error) => { // failure callback\n      console.warn(error.message, error)\n\n      if (options.eventSourceFailure) {\n        options.eventSourceFailure.call(calendarApi, error)\n      }\n\n      if (eventSource.failure) {\n        eventSource.failure(error)\n      }\n\n      context.dispatch({\n        type: 'RECEIVE_EVENT_ERROR',\n        sourceId: eventSource.sourceId,\n        fetchId,\n        fetchRange,\n        error,\n      })\n    },\n  )\n\n  return {\n    ...eventSource,\n    isFetching: true,\n    latestFetchId: fetchId,\n  }\n}\n\nfunction receiveResponse(sourceHash: EventSourceHash, sourceId: string, fetchId: string, fetchRange: DateRange) {\n  let eventSource: EventSource<any> = sourceHash[sourceId]\n\n  if (\n    eventSource && // not already removed\n    fetchId === eventSource.latestFetchId\n  ) {\n    return {\n      ...sourceHash,\n      [sourceId]: {\n        ...eventSource,\n        isFetching: false,\n        fetchRange, // also serves as a marker that at least one fetch has completed\n      },\n    }\n  }\n\n  return sourceHash\n}\n\nfunction excludeStaticSources(eventSources: EventSourceHash, context: CalendarContext): EventSourceHash {\n  return filterHash(eventSources, (eventSource) => doesSourceNeedRange(eventSource, context))\n}\n\nfunction parseInitialSources(rawOptions: CalendarOptions, context: CalendarContext) {\n  let refiners = buildEventSourceRefiners(context)\n  let rawSources = [].concat(rawOptions.eventSources || [])\n  let sources = [] // parsed\n\n  if (rawOptions.initialEvents) {\n    rawSources.unshift(rawOptions.initialEvents)\n  }\n\n  if (rawOptions.events) {\n    rawSources.unshift(rawOptions.events)\n  }\n\n  for (let rawSource of rawSources) {\n    let source = parseEventSource(rawSource, context, refiners)\n    if (source) {\n      sources.push(source)\n    }\n  }\n\n  return sources\n}\n\nfunction doesSourceNeedRange(eventSource: EventSource<any>, context: CalendarContext) {\n  let defs = context.pluginHooks.eventSourceDefs\n\n  return !defs[eventSource.sourceDefId].ignoreRange\n}\n","import { filterHash, mapHash } from '../util/object'\nimport { EventDef } from '../structs/event-def'\nimport { EventInstance, EventInstanceHash } from '../structs/event-instance'\nimport { EventInput } from '../structs/event-parse'\nimport {\n  EventStore,\n  mergeEventStores,\n  createEmptyEventStore,\n  filterEventStoreDefs,\n  excludeSubEventStore,\n  parseEvents,\n} from '../structs/event-store'\nimport { Action } from './Action'\nimport { EventSourceHash, EventSource } from '../structs/event-source'\nimport { DateRange } from '../datelib/date-range'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { DateEnv } from '../datelib/env'\nimport { CalendarContext } from '../CalendarContext'\nimport { expandRecurring } from '../structs/recurring-event'\n\nexport function reduceEventStore(\n  eventStore: EventStore,\n  action: Action,\n  eventSources: EventSourceHash,\n  dateProfile: DateProfile,\n  context: CalendarContext,\n): EventStore {\n  switch (action.type) {\n    case 'RECEIVE_EVENTS': // raw\n      return receiveRawEvents(\n        eventStore,\n        eventSources[action.sourceId],\n        action.fetchId,\n        action.fetchRange,\n        action.rawEvents,\n        context,\n      )\n\n    case 'ADD_EVENTS': // already parsed, but not expanded\n      return addEvent(\n        eventStore,\n        action.eventStore, // new ones\n        dateProfile ? dateProfile.activeRange : null,\n        context,\n      )\n\n    case 'RESET_EVENTS':\n      return action.eventStore\n\n    case 'MERGE_EVENTS': // already parsed and expanded\n      return mergeEventStores(eventStore, action.eventStore)\n\n    case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n    case 'NEXT':\n    case 'CHANGE_DATE':\n    case 'CHANGE_VIEW_TYPE':\n      if (dateProfile) {\n        return expandRecurring(eventStore, dateProfile.activeRange, context)\n      }\n      return eventStore\n\n    case 'REMOVE_EVENTS':\n      return excludeSubEventStore(eventStore, action.eventStore)\n\n    case 'REMOVE_EVENT_SOURCE':\n      return excludeEventsBySourceId(eventStore, action.sourceId)\n\n    case 'REMOVE_ALL_EVENT_SOURCES':\n      return filterEventStoreDefs(eventStore, (eventDef: EventDef) => (\n        !eventDef.sourceId // only keep events with no source id\n      ))\n\n    case 'REMOVE_ALL_EVENTS':\n      return createEmptyEventStore()\n\n    default:\n      return eventStore\n  }\n}\n\nfunction receiveRawEvents(\n  eventStore: EventStore,\n  eventSource: EventSource<any>,\n  fetchId: string,\n  fetchRange: DateRange | null,\n  rawEvents: EventInput[],\n  context: CalendarContext,\n): EventStore {\n  if (\n    eventSource && // not already removed\n    fetchId === eventSource.latestFetchId // TODO: wish this logic was always in event-sources\n  ) {\n    let subset = parseEvents(\n      transformRawEvents(rawEvents, eventSource, context),\n      eventSource,\n      context,\n    )\n\n    if (fetchRange) {\n      subset = expandRecurring(subset, fetchRange, context)\n    }\n\n    return mergeEventStores(\n      excludeEventsBySourceId(eventStore, eventSource.sourceId),\n      subset,\n    )\n  }\n\n  return eventStore\n}\n\nfunction transformRawEvents(rawEvents, eventSource: EventSource<any>, context: CalendarContext) {\n  let calEachTransform = context.options.eventDataTransform\n  let sourceEachTransform = eventSource ? eventSource.eventDataTransform : null\n\n  if (sourceEachTransform) {\n    rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform)\n  }\n\n  if (calEachTransform) {\n    rawEvents = transformEachRawEvent(rawEvents, calEachTransform)\n  }\n\n  return rawEvents\n}\n\nfunction transformEachRawEvent(rawEvents, func) {\n  let refinedEvents\n\n  if (!func) {\n    refinedEvents = rawEvents\n  } else {\n    refinedEvents = []\n\n    for (let rawEvent of rawEvents) {\n      let refinedEvent = func(rawEvent)\n\n      if (refinedEvent) {\n        refinedEvents.push(refinedEvent)\n      } else if (refinedEvent == null) {\n        refinedEvents.push(rawEvent)\n      } // if a different falsy value, do nothing\n    }\n  }\n\n  return refinedEvents\n}\n\nfunction addEvent(eventStore: EventStore, subset: EventStore, expandRange: DateRange | null, context: CalendarContext): EventStore {\n  if (expandRange) {\n    subset = expandRecurring(subset, expandRange, context)\n  }\n\n  return mergeEventStores(eventStore, subset)\n}\n\nexport function rezoneEventStoreDates(eventStore: EventStore, oldDateEnv: DateEnv, newDateEnv: DateEnv): EventStore {\n  let { defs } = eventStore\n\n  let instances = mapHash(eventStore.instances, (instance: EventInstance): EventInstance => {\n    let def = defs[instance.defId]\n\n    if (def.allDay || def.recurringDef) {\n      return instance // isn't dependent on timezone\n    }\n    return {\n      ...instance,\n      range: {\n        start: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo)),\n        end: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo)),\n      },\n      forcedStartTzo: newDateEnv.canComputeOffset ? null : instance.forcedStartTzo,\n      forcedEndTzo: newDateEnv.canComputeOffset ? null : instance.forcedEndTzo,\n    }\n  })\n\n  return { defs, instances }\n}\n\nfunction excludeEventsBySourceId(eventStore: EventStore, sourceId: string) {\n  return filterEventStoreDefs(eventStore, (eventDef: EventDef) => eventDef.sourceId !== sourceId)\n}\n\n// QUESTION: why not just return instances? do a general object-property-exclusion util\nexport function excludeInstances(eventStore: EventStore, removals: EventInstanceHash): EventStore {\n  return {\n    defs: eventStore.defs,\n    instances: filterHash(eventStore.instances, (instance: EventInstance) => !removals[instance.instanceId]),\n  }\n}\n","import { DateSpan } from '../structs/date-span'\nimport { Action } from './Action'\n\nexport function reduceDateSelection(currentSelection: DateSpan | null, action: Action) {\n  switch (action.type) {\n    case 'UNSELECT_DATES':\n      return null\n\n    case 'SELECT_DATES':\n      return action.selection\n\n    default:\n      return currentSelection\n  }\n}\n","import { Action } from './Action'\n\nexport function reduceSelectedEvent(currentInstanceId: string, action: Action): string {\n  switch (action.type) {\n    case 'UNSELECT_EVENT':\n      return ''\n\n    case 'SELECT_EVENT':\n      return action.eventInstanceId\n\n    default:\n      return currentInstanceId\n  }\n}\n","import { Action } from './Action'\nimport { EventInteractionState } from '../interactions/event-interaction-state'\n\nexport function reduceEventDrag(currentDrag: EventInteractionState | null, action: Action): EventInteractionState | null {\n  let newDrag: EventInteractionState\n\n  switch (action.type) {\n    case 'UNSET_EVENT_DRAG':\n      return null\n\n    case 'SET_EVENT_DRAG':\n      newDrag = action.state\n\n      return {\n        affectedEvents: newDrag.affectedEvents,\n        mutatedEvents: newDrag.mutatedEvents,\n        isEvent: newDrag.isEvent,\n      }\n\n    default:\n      return currentDrag\n  }\n}\n","import { EventInteractionState } from '../interactions/event-interaction-state'\nimport { Action } from './Action'\n\nexport function reduceEventResize(currentResize: EventInteractionState | null, action: Action): EventInteractionState | null {\n  let newResize: EventInteractionState\n\n  switch (action.type) {\n    case 'UNSET_EVENT_RESIZE':\n      return null\n\n    case 'SET_EVENT_RESIZE':\n      newResize = action.state\n\n      return {\n        affectedEvents: newResize.affectedEvents,\n        mutatedEvents: newResize.mutatedEvents,\n        isEvent: newResize.isEvent,\n      }\n\n    default:\n      return currentResize\n  }\n}\n","import { ViewSpec, ViewSpecHash } from './structs/view-spec'\nimport { Theme } from './theme/Theme'\nimport { CalendarApi } from './CalendarApi'\nimport { CalendarOptionsRefined, CalendarOptions } from './options'\nimport { ToolbarInput, ToolbarModel, ToolbarWidget, CustomButtonInput } from './toolbar-struct'\nimport { formatWithOrdinals } from './util/misc'\n\nexport function parseToolbars(\n  calendarOptions: CalendarOptionsRefined,\n  calendarOptionOverrides: CalendarOptions,\n  theme: Theme,\n  viewSpecs: ViewSpecHash,\n  calendarApi: CalendarApi,\n) {\n  let header = calendarOptions.headerToolbar ? parseToolbar(\n    calendarOptions.headerToolbar,\n    calendarOptions,\n    calendarOptionOverrides,\n    theme,\n    viewSpecs,\n    calendarApi,\n  ) : null\n  let footer = calendarOptions.footerToolbar ? parseToolbar(\n    calendarOptions.footerToolbar,\n    calendarOptions,\n    calendarOptionOverrides,\n    theme,\n    viewSpecs,\n    calendarApi,\n  ) : null\n\n  return { header, footer }\n}\n\nfunction parseToolbar(\n  sectionStrHash: ToolbarInput,\n  calendarOptions: CalendarOptionsRefined,\n  calendarOptionOverrides: CalendarOptions,\n  theme: Theme,\n  viewSpecs: ViewSpecHash,\n  calendarApi: CalendarApi,\n) : ToolbarModel {\n  let sectionWidgets: { [sectionName: string]: ToolbarWidget[][] } = {}\n  let viewsWithButtons: string[] = []\n  let hasTitle = false\n\n  for (let sectionName in sectionStrHash) {\n    let sectionStr = sectionStrHash[sectionName]\n    let sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi)\n    sectionWidgets[sectionName] = sectionRes.widgets\n    viewsWithButtons.push(...sectionRes.viewsWithButtons)\n    hasTitle = hasTitle || sectionRes.hasTitle\n  }\n\n  return { sectionWidgets, viewsWithButtons, hasTitle }\n}\n\n/*\nBAD: querying icons and text here. should be done at render time\n*/\nfunction parseSection(\n  sectionStr: string,\n  calendarOptions: CalendarOptionsRefined, // defaults+overrides, then refined\n  calendarOptionOverrides: CalendarOptions, // overrides only!, unrefined :(\n  theme: Theme,\n  viewSpecs: ViewSpecHash,\n  calendarApi: CalendarApi,\n): { widgets: ToolbarWidget[][], viewsWithButtons: string[], hasTitle: boolean } {\n  let isRtl = calendarOptions.direction === 'rtl'\n  let calendarCustomButtons = calendarOptions.customButtons || {}\n  let calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {}\n  let calendarButtonText = calendarOptions.buttonText || {}\n  let calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {}\n  let calendarButtonHints = calendarOptions.buttonHints || {}\n  let sectionSubstrs = sectionStr ? sectionStr.split(' ') : []\n  let viewsWithButtons: string[] = []\n  let hasTitle = false\n\n  let widgets = sectionSubstrs.map(\n    (buttonGroupStr): ToolbarWidget[] => (\n      buttonGroupStr.split(',').map((buttonName): ToolbarWidget => {\n        if (buttonName === 'title') {\n          hasTitle = true\n          return { buttonName }\n        }\n\n        let customButtonProps: CustomButtonInput\n        let viewSpec: ViewSpec\n        let buttonClick\n        let buttonIcon // only one of these will be set\n        let buttonText // \"\n        let buttonHint: string | ((navUnit: string) => string)\n        // ^ for the title=\"\" attribute, for accessibility\n\n        if ((customButtonProps = calendarCustomButtons[buttonName])) {\n          buttonClick = (ev: UIEvent) => {\n            if (customButtonProps.click) {\n              customButtonProps.click.call(ev.target, ev, ev.target) // TODO: use Calendar this context?\n            }\n          };\n\n          (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||\n            (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||\n            (buttonText = customButtonProps.text)\n\n          buttonHint = customButtonProps.hint || customButtonProps.text\n        } else if ((viewSpec = viewSpecs[buttonName])) {\n          viewsWithButtons.push(buttonName)\n\n          buttonClick = () => {\n            calendarApi.changeView(buttonName)\n          };\n\n          (buttonText = viewSpec.buttonTextOverride) ||\n            (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||\n            (buttonText = viewSpec.buttonTextDefault)\n\n          let textFallback =\n            viewSpec.buttonTextOverride ||\n            viewSpec.buttonTextDefault\n\n          buttonHint = formatWithOrdinals(\n            viewSpec.buttonTitleOverride ||\n            viewSpec.buttonTitleDefault ||\n            calendarOptions.viewHint,\n            [textFallback, buttonName], // view-name = buttonName\n            textFallback,\n          )\n        } else if (calendarApi[buttonName]) { // a calendarApi method\n          buttonClick = () => {\n            calendarApi[buttonName]()\n          };\n\n          (buttonText = calendarButtonTextOverrides[buttonName]) ||\n            (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||\n            (buttonText = calendarButtonText[buttonName]) // everything else is considered default\n\n          if (buttonName === 'prevYear' || buttonName === 'nextYear') {\n            let prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next'\n            buttonHint = formatWithOrdinals(\n              calendarButtonHintOverrides[prevOrNext] ||\n              calendarButtonHints[prevOrNext],\n              [\n                calendarButtonText.year || 'year', // localize unit\n                'year',\n              ],\n              calendarButtonText[buttonName],\n            )\n          } else {\n            buttonHint = (navUnit: string) => formatWithOrdinals(\n              calendarButtonHintOverrides[buttonName] ||\n              calendarButtonHints[buttonName],\n              [\n                calendarButtonText[navUnit] || navUnit, // localized unit\n                navUnit,\n              ],\n              calendarButtonText[buttonName],\n            )\n          }\n        }\n\n        return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint }\n      })\n    ),\n  )\n\n  return { widgets, viewsWithButtons, hasTitle }\n}\n","import { Dictionary } from '../options'\n\nexport function requestJson(method: string, url: string, params: Dictionary, successCallback, failureCallback) {\n  method = method.toUpperCase()\n\n  let body = null\n\n  if (method === 'GET') {\n    url = injectQueryStringParams(url, params)\n  } else {\n    body = encodeParams(params)\n  }\n\n  let xhr = new XMLHttpRequest()\n  xhr.open(method, url, true)\n\n  if (method !== 'GET') {\n    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')\n  }\n\n  xhr.onload = () => {\n    if (xhr.status >= 200 && xhr.status < 400) {\n      let parsed = false\n      let res\n\n      try {\n        res = JSON.parse(xhr.responseText)\n        parsed = true\n      } catch (err) {\n        // will handle parsed=false\n      }\n\n      if (parsed) {\n        successCallback(res, xhr)\n      } else {\n        failureCallback('Failure parsing JSON', xhr)\n      }\n    } else {\n      failureCallback('Request failed', xhr)\n    }\n  }\n\n  xhr.onerror = () => {\n    failureCallback('Request failed', xhr)\n  }\n\n  xhr.send(body)\n}\n\nfunction injectQueryStringParams(url: string, params) {\n  return url +\n    (url.indexOf('?') === -1 ? '?' : '&') +\n    encodeParams(params)\n}\n\nfunction encodeParams(params) {\n  let parts = []\n\n  for (let key in params) {\n    parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)\n  }\n\n  return parts.join('&')\n}\n","import { createPlugin } from './plugin-system'\nimport { hashValuesToArray } from './util/object'\nimport { EventSource } from './structs/event-source'\nimport { CalendarContext } from './CalendarContext'\n\nexport const changeHandlerPlugin = createPlugin({\n  optionChangeHandlers: {\n    events(events, context) {\n      handleEventSources([events], context)\n    },\n    eventSources: handleEventSources,\n  },\n})\n\n/*\nBUG: if `event` was supplied, all previously-given `eventSources` will be wiped out\n*/\nfunction handleEventSources(inputs, context: CalendarContext) {\n  let unfoundSources: EventSource<any>[] = hashValuesToArray(context.getCurrentData().eventSources)\n  let newInputs = []\n\n  for (let input of inputs) {\n    let inputFound = false\n\n    for (let i = 0; i < unfoundSources.length; i += 1) {\n      if (unfoundSources[i]._raw === input) {\n        unfoundSources.splice(i, 1) // delete\n        inputFound = true\n        break\n      }\n    }\n\n    if (!inputFound) {\n      newInputs.push(input)\n    }\n  }\n\n  for (let unfoundSource of unfoundSources) {\n    context.dispatch({\n      type: 'REMOVE_EVENT_SOURCE',\n      sourceId: unfoundSource.sourceId,\n    })\n  }\n\n  for (let newInput of newInputs) {\n    context.calendarApi.addEventSource(newInput)\n  }\n}\n","import { PluginDef } from './plugin-system-struct'\nimport { createPlugin } from './plugin-system'\nimport { arrayEventSourcePlugin } from './event-sources/array-event-source'\nimport { funcEventSourcePlugin } from './event-sources/func-event-source'\nimport { jsonFeedEventSourcePlugin } from './event-sources/json-feed-event-source'\nimport { simpleRecurringEventsPlugin } from './structs/recurring-event-simple'\nimport { changeHandlerPlugin } from './option-change-handlers'\nimport { handleDateProfile } from './dates-set'\nimport { handleEventStore } from './event-crud'\nimport { isArraysEqual } from './util/array'\nimport { removeElement } from './util/dom-manip'\nimport { computeEventSourcesLoading } from './reducers/eventSources'\nimport { CalendarDataManagerState } from './reducers/data-types'\n\n/*\nthis array is exposed on the root namespace so that UMD plugins can add to it.\nsee the rollup-bundles script.\n*/\nexport const globalPlugins: PluginDef[] = [ // TODO: make a const?\n  arrayEventSourcePlugin,\n  funcEventSourcePlugin,\n  jsonFeedEventSourcePlugin,\n  simpleRecurringEventsPlugin,\n  changeHandlerPlugin,\n  createPlugin({ // misc...\n    isLoadingFuncs: [\n      (state: CalendarDataManagerState) => computeEventSourcesLoading(state.eventSources),\n    ],\n    contentTypeHandlers: {\n      html: buildHtmlRenderer,\n      domNodes: buildDomNodeRenderer,\n    },\n    propSetHandlers: {\n      dateProfile: handleDateProfile,\n      eventStore: handleEventStore,\n    },\n  }),\n]\n\nfunction buildHtmlRenderer() {\n  let currentEl: HTMLElement | null = null\n  let currentHtml: string = ''\n\n  function render(el: HTMLElement, html: string) {\n    if (el !== currentEl || html !== currentHtml) {\n      el.innerHTML = html\n    }\n    currentEl = el\n    currentHtml = html\n  }\n\n  function destroy() {\n    currentEl.innerHTML = ''\n    currentEl = null\n    currentHtml = ''\n  }\n\n  return { render, destroy }\n}\n\nfunction buildDomNodeRenderer() {\n  let currentEl: HTMLElement | null = null\n  let currentDomNodes: Node[] = []\n\n  function render(el: HTMLElement, domNodes: Node[] | NodeList) {\n    let newDomNodes = Array.prototype.slice.call(domNodes)\n\n    if (el !== currentEl || !isArraysEqual(currentDomNodes, newDomNodes)) {\n      // append first, remove second (for scroll resetting)\n      for (let newNode of newDomNodes) {\n        el.appendChild(newNode)\n      }\n      destroy()\n    }\n\n    currentEl = el\n    currentDomNodes = newDomNodes\n  }\n\n  function destroy() {\n    currentDomNodes.forEach(removeElement)\n    currentDomNodes = []\n    currentEl = null\n  }\n\n  return { render, destroy }\n}\n","import { createPlugin } from '../plugin-system'\nimport { EventSourceDef } from '../structs/event-source-def'\nimport { EventInput } from '../structs/event-parse'\n\nlet eventSourceDef: EventSourceDef<EventInput[]> = {\n  ignoreRange: true,\n\n  parseMeta(refined) {\n    if (Array.isArray(refined.events)) {\n      return refined.events\n    }\n    return null\n  },\n\n  fetch(arg, success) {\n    success({\n      rawEvents: arg.eventSource.meta,\n    })\n  },\n}\n\nexport const arrayEventSourcePlugin = createPlugin({\n  eventSourceDefs: [eventSourceDef],\n})\n","import { unpromisify } from '../util/promise'\nimport { EventSourceDef } from '../structs/event-source-def'\nimport { EventSourceError } from '../structs/event-source'\nimport { EventInput } from '../structs/event-parse'\nimport { createPlugin } from '../plugin-system'\nimport { buildRangeApiWithTimeZone } from '../structs/date-span'\n\nexport type EventSourceFunc = (\n  arg: {\n    start: Date\n    end: Date\n    startStr: string\n    endStr: string\n    timeZone: string\n  },\n  successCallback: (events: EventInput[]) => void,\n  failureCallback: (error: EventSourceError) => void\n) => (void | PromiseLike<EventInput[]>)\n\nlet eventSourceDef: EventSourceDef<EventSourceFunc> = {\n\n  parseMeta(refined) {\n    if (typeof refined.events === 'function') {\n      return refined.events\n    }\n    return null\n  },\n\n  fetch(arg, success, failure) {\n    let { dateEnv } = arg.context\n    let func = arg.eventSource.meta\n\n    unpromisify(\n      func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)),\n      (rawEvents) => { // success\n        success({ rawEvents }) // needs an object response\n      },\n      failure, // send errorObj directly to failure callback\n    )\n  },\n\n}\n\nexport const funcEventSourcePlugin = createPlugin({\n  eventSourceDefs: [eventSourceDef],\n})\n","import { __assign } from 'tslib'\nimport { requestJson } from '../util/requestJson'\nimport { CalendarContext } from '../CalendarContext'\nimport { EventSourceDef } from '../structs/event-source-def'\nimport { DateRange } from '../datelib/date-range'\nimport { createPlugin } from '../plugin-system'\nimport { JSON_FEED_EVENT_SOURCE_REFINERS } from './json-feed-event-source-refiners'\n\ninterface JsonFeedMeta {\n  url: string\n  format: 'json' // for EventSourceApi\n  method: string\n  extraParams?: any\n  startParam?: string\n  endParam?: string\n  timeZoneParam?: string\n}\n\nlet eventSourceDef: EventSourceDef<JsonFeedMeta> = {\n\n  parseMeta(refined) {\n    if (refined.url && (refined.format === 'json' || !refined.format)) {\n      return {\n        url: refined.url,\n        format: 'json',\n        method: (refined.method || 'GET').toUpperCase(),\n        extraParams: refined.extraParams,\n        startParam: refined.startParam,\n        endParam: refined.endParam,\n        timeZoneParam: refined.timeZoneParam,\n      }\n    }\n    return null\n  },\n\n  fetch(arg, success, failure) {\n    let { meta } = arg.eventSource\n    let requestParams = buildRequestParams(meta, arg.range, arg.context)\n\n    requestJson(\n      meta.method, meta.url, requestParams,\n      (rawEvents, xhr) => {\n        success({ rawEvents, xhr })\n      },\n      (errorMessage, xhr) => {\n        failure({ message: errorMessage, xhr })\n      },\n    )\n  },\n\n}\n\nexport const jsonFeedEventSourcePlugin = createPlugin({\n  eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS,\n  eventSourceDefs: [eventSourceDef],\n})\n\nfunction buildRequestParams(meta: JsonFeedMeta, range: DateRange, context: CalendarContext) {\n  let { dateEnv, options } = context\n  let startParam\n  let endParam\n  let timeZoneParam\n  let customRequestParams\n  let params = {}\n\n  startParam = meta.startParam\n  if (startParam == null) {\n    startParam = options.startParam\n  }\n\n  endParam = meta.endParam\n  if (endParam == null) {\n    endParam = options.endParam\n  }\n\n  timeZoneParam = meta.timeZoneParam\n  if (timeZoneParam == null) {\n    timeZoneParam = options.timeZoneParam\n  }\n\n  // retrieve any outbound GET/POST data from the options\n  if (typeof meta.extraParams === 'function') {\n    // supplied as a function that returns a key/value object\n    customRequestParams = meta.extraParams()\n  } else {\n    // probably supplied as a straight key/value object\n    customRequestParams = meta.extraParams || {}\n  }\n\n  __assign(params, customRequestParams)\n\n  params[startParam] = dateEnv.formatIso(range.start)\n  params[endParam] = dateEnv.formatIso(range.end)\n\n  if (dateEnv.timeZone !== 'local') {\n    params[timeZoneParam] = dateEnv.timeZone\n  }\n\n  return params\n}\n","import { identity, Identity, Dictionary } from '../options'\n\nexport const JSON_FEED_EVENT_SOURCE_REFINERS = {\n  method: String,\n  extraParams: identity as Identity<Dictionary | (() => Dictionary)>,\n  startParam: String,\n  endParam: String,\n  timeZoneParam: String,\n}\n","import { startOfDay, addDays, DateMarker } from '../datelib/marker'\nimport { Duration, subtractDurations } from '../datelib/duration'\nimport { arrayToHash } from '../util/object'\nimport { RecurringType } from './recurring-event'\nimport { EventRefined } from './event-parse'\nimport { DateRange, intersectRanges } from '../datelib/date-range'\nimport { DateEnv } from '../datelib/env'\nimport { createPlugin } from '../plugin-system'\nimport { SIMPLE_RECURRING_REFINERS } from './recurring-event-simple-refiners'\nimport './recurring-event-simple-declare'\n\n/*\nAn implementation of recurring events that only supports every-day or weekly recurrences.\n*/\n\ninterface SimpleRecurringData {\n  daysOfWeek: number[] | null\n  startTime: Duration | null\n  endTime: Duration | null\n  startRecur: DateMarker | null\n  endRecur: DateMarker | null\n}\n\nlet recurring: RecurringType<SimpleRecurringData> = {\n\n  parse(refined: EventRefined, dateEnv: DateEnv) {\n    if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) {\n      let recurringData: SimpleRecurringData = {\n        daysOfWeek: refined.daysOfWeek || null,\n        startTime: refined.startTime || null,\n        endTime: refined.endTime || null,\n        startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,\n        endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null,\n      }\n\n      let duration: Duration\n\n      if (refined.duration) {\n        duration = refined.duration\n      }\n      if (!duration && refined.startTime && refined.endTime) {\n        duration = subtractDurations(refined.endTime, refined.startTime)\n      }\n\n      return {\n        allDayGuess: Boolean(!refined.startTime && !refined.endTime),\n        duration,\n        typeData: recurringData, // doesn't need endTime anymore but oh well\n      }\n    }\n\n    return null\n  },\n\n  expand(typeData: SimpleRecurringData, framingRange: DateRange, dateEnv: DateEnv): DateMarker[] {\n    let clippedFramingRange = intersectRanges(\n      framingRange,\n      { start: typeData.startRecur, end: typeData.endRecur },\n    )\n\n    if (clippedFramingRange) {\n      return expandRanges(\n        typeData.daysOfWeek,\n        typeData.startTime,\n        clippedFramingRange,\n        dateEnv,\n      )\n    }\n    return []\n  },\n\n}\n\nexport const simpleRecurringEventsPlugin = createPlugin({\n  recurringTypes: [recurring],\n  eventRefiners: SIMPLE_RECURRING_REFINERS,\n})\n\nfunction expandRanges(\n  daysOfWeek: number[] | null,\n  startTime: Duration | null,\n  framingRange: DateRange,\n  dateEnv: DateEnv,\n): DateMarker[] {\n  let dowHash: { [num: string]: true } | null = daysOfWeek ? arrayToHash(daysOfWeek) : null\n  let dayMarker = startOfDay(framingRange.start)\n  let endMarker = framingRange.end\n  let instanceStarts: DateMarker[] = []\n\n  while (dayMarker < endMarker) {\n    let instanceStart\n\n    // if everyday, or this particular day-of-week\n    if (!dowHash || dowHash[dayMarker.getUTCDay()]) {\n      if (startTime) {\n        instanceStart = dateEnv.add(dayMarker, startTime)\n      } else {\n        instanceStart = dayMarker\n      }\n\n      instanceStarts.push(instanceStart)\n    }\n\n    dayMarker = addDays(dayMarker, 1)\n  }\n\n  return instanceStarts\n}\n","import { createDuration } from '../datelib/duration'\nimport { DateInput } from '../datelib/env'\nimport { identity, Identity } from '../options'\n\nexport const SIMPLE_RECURRING_REFINERS = {\n  daysOfWeek: identity as Identity<number[]>,\n  startTime: createDuration,\n  endTime: createDuration,\n  duration: createDuration,\n  startRecur: identity as Identity<DateInput>,\n  endRecur: identity as Identity<DateInput>,\n}\n","import { DateProfile } from './DateProfileGenerator'\nimport { CalendarData } from './reducers/data-types'\nimport { RangeApiWithTimeZone, buildRangeApiWithTimeZone } from './structs/date-span'\nimport { ViewApi } from './ViewApi'\n\nexport type DatesSetArg = RangeApiWithTimeZone & { view: ViewApi }\n\nexport function handleDateProfile(dateProfile: DateProfile, context: CalendarData) {\n  context.emitter.trigger('datesSet', {\n    ...buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv),\n    view: context.viewApi,\n  })\n}\n","import { EventStore } from './structs/event-store'\nimport { CalendarData } from './reducers/data-types'\nimport { EventApi, buildEventApis } from './api/EventApi'\nimport { Duration } from './datelib/duration'\nimport { ViewApi } from './ViewApi'\n\nexport interface EventAddArg {\n  event: EventApi\n  relatedEvents: EventApi[]\n  revert: () => void\n}\n\nexport interface EventChangeArg {\n  oldEvent: EventApi\n  event: EventApi\n  relatedEvents: EventApi[]\n  revert: () => void\n}\n\nexport interface EventDropArg extends EventChangeArg { // not best place. deals w/ UI\n  el: HTMLElement\n  delta: Duration\n  jsEvent: MouseEvent\n  view: ViewApi\n  // and other \"transformed\" things\n}\n\nexport interface EventRemoveArg {\n  event: EventApi\n  relatedEvents: EventApi[]\n  revert: () => void\n}\n\nexport function handleEventStore(eventStore: EventStore, context: CalendarData) {\n  let { emitter } = context\n\n  if (emitter.hasHandlers('eventsSet')) {\n    emitter.trigger('eventsSet', buildEventApis(eventStore, context))\n  }\n}\n","export class DelayedRunner {\n  private isRunning = false\n  private isDirty = false\n  private pauseDepths: { [scope: string]: number } = {}\n  private timeoutId: number = 0\n\n  constructor(\n    private drainedOption?: () => void,\n  ) {\n  }\n\n  request(delay?: number) {\n    this.isDirty = true\n\n    if (!this.isPaused()) {\n      this.clearTimeout()\n\n      if (delay == null) {\n        this.tryDrain()\n      } else {\n        this.timeoutId = setTimeout( // NOT OPTIMAL! TODO: look at debounce\n          this.tryDrain.bind(this),\n          delay,\n        ) as unknown as number\n      }\n    }\n  }\n\n  pause(scope = '') {\n    let { pauseDepths } = this\n\n    pauseDepths[scope] = (pauseDepths[scope] || 0) + 1\n\n    this.clearTimeout()\n  }\n\n  resume(scope = '', force?: boolean) {\n    let { pauseDepths } = this\n\n    if (scope in pauseDepths) {\n      if (force) {\n        delete pauseDepths[scope]\n      } else {\n        pauseDepths[scope] -= 1\n        let depth = pauseDepths[scope]\n\n        if (depth <= 0) {\n          delete pauseDepths[scope]\n        }\n      }\n\n      this.tryDrain()\n    }\n  }\n\n  isPaused() {\n    return Object.keys(this.pauseDepths).length\n  }\n\n  tryDrain() {\n    if (!this.isRunning && !this.isPaused()) {\n      this.isRunning = true\n\n      while (this.isDirty) {\n        this.isDirty = false\n        this.drained() // might set isDirty to true again\n      }\n\n      this.isRunning = false\n    }\n  }\n\n  clear() {\n    this.clearTimeout()\n    this.isDirty = false\n    this.pauseDepths = {}\n  }\n\n  private clearTimeout() {\n    if (this.timeoutId) {\n      clearTimeout(this.timeoutId)\n      this.timeoutId = 0\n    }\n  }\n\n  protected drained() { // subclasses can implement\n    if (this.drainedOption) {\n      this.drainedOption()\n    }\n  }\n}\n","import { DelayedRunner } from './DelayedRunner'\n\nexport class TaskRunner<Task> { // this class USES the DelayedRunner\n  private queue: Task[] = []\n\n  private delayedRunner: DelayedRunner // will most likely be used WITHOUT any delay\n\n  constructor(\n    private runTaskOption?: (task: Task) => void,\n    private drainedOption?: (completedTasks: Task[]) => void,\n  ) {\n    this.delayedRunner = new DelayedRunner(this.drain.bind(this))\n  }\n\n  request(task: Task, delay?: number) {\n    this.queue.push(task)\n    this.delayedRunner.request(delay)\n  }\n\n  pause(scope?: string) {\n    this.delayedRunner.pause(scope)\n  }\n\n  resume(scope?: string, force?: boolean) {\n    this.delayedRunner.resume(scope, force)\n  }\n\n  drain() {\n    let { queue } = this\n\n    while (queue.length) {\n      let completedTasks: Task[] = []\n      let task: Task\n\n      while ((task = queue.shift())) {\n        this.runTask(task)\n        completedTasks.push(task)\n      }\n\n      this.drained(completedTasks)\n    } // keep going, in case new tasks were added in the drained handler\n  }\n\n  protected runTask(task: Task) { // subclasses can implement\n    if (this.runTaskOption) {\n      this.runTaskOption(task)\n    }\n  }\n\n  protected drained(completedTasks: Task[]) { // subclasses can implement\n    if (this.drainedOption) {\n      this.drainedOption(completedTasks)\n    }\n  }\n}\n","import { DateProfile } from '../DateProfileGenerator'\nimport { diffWholeDays } from '../datelib/marker'\nimport { createFormatter, FormatterInput } from '../datelib/formatting'\nimport { DateRange } from '../datelib/date-range'\nimport { DateEnv } from '../datelib/env'\nimport { BaseOptions } from '../options'\n\n// Computes what the title at the top of the calendarApi should be for this view\nexport function buildTitle(dateProfile: DateProfile, viewOptions: BaseOptions, dateEnv: DateEnv) {\n  let range: DateRange\n\n  // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n  if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n    range = dateProfile.currentRange\n  } else { // for day units or smaller, use the actual day range\n    range = dateProfile.activeRange\n  }\n\n  return dateEnv.formatRange(\n    range.start,\n    range.end,\n    createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)),\n    {\n      isEndExclusive: dateProfile.isRangeAllDay,\n      defaultSeparator: viewOptions.titleRangeSeparator,\n    },\n  )\n}\n\n// Generates the format string that should be used to generate the title for the current date range.\n// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.\nfunction buildTitleFormat(dateProfile: DateProfile): FormatterInput {\n  let { currentRangeUnit } = dateProfile\n\n  if (currentRangeUnit === 'year') {\n    return { year: 'numeric' }\n  }\n\n  if (currentRangeUnit === 'month') {\n    return { year: 'numeric', month: 'long' } // like \"September 2014\"\n  }\n\n  let days = diffWholeDays(\n    dateProfile.currentRange.start,\n    dateProfile.currentRange.end,\n  )\n\n  if (days !== null && days > 1) {\n    // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n    return { year: 'numeric', month: 'short', day: 'numeric' }\n  }\n\n  // one day. longer, like \"September 9 2014\"\n  return { year: 'numeric', month: 'long', day: 'numeric' }\n}\n","import { __assign } from 'tslib'\nimport { buildLocale, RawLocaleInfo, organizeRawLocales, LocaleSingularArg } from '../datelib/locale'\nimport { memoize, memoizeObjArg } from '../util/memoize'\nimport { Action } from './Action'\nimport { buildBuildPluginHooks } from '../plugin-system'\nimport { PluginHooks } from '../plugin-system-struct'\nimport { DateEnv } from '../datelib/env'\nimport { CalendarApi } from '../CalendarApi'\nimport { StandardTheme } from '../theme/StandardTheme'\nimport { EventSourceHash } from '../structs/event-source'\nimport { buildViewSpecs, ViewSpec } from '../structs/view-spec'\nimport { mapHash, isPropsEqual } from '../util/object'\nimport { DateProfileGenerator, DateProfileGeneratorProps } from '../DateProfileGenerator'\nimport { reduceViewType } from './view-type'\nimport { getInitialDate, reduceCurrentDate } from './current-date'\nimport { reduceDynamicOptionOverrides } from './options'\nimport { reduceDateProfile } from './date-profile'\nimport { reduceEventSources, initEventSources, reduceEventSourcesNewTimeZone, computeEventSourcesLoading } from './eventSources'\nimport { reduceEventStore, rezoneEventStoreDates } from './eventStore'\nimport { reduceDateSelection } from './date-selection'\nimport { reduceSelectedEvent } from './selected-event'\nimport { reduceEventDrag } from './event-drag'\nimport { reduceEventResize } from './event-resize'\nimport { Emitter } from '../common/Emitter'\nimport { EventUiHash, EventUi, createEventUi } from '../component/event-ui'\nimport { EventDefHash } from '../structs/event-def'\nimport { parseToolbars } from '../toolbar-parse'\nimport {\n  CalendarOptionsRefined, CalendarOptions,\n  CALENDAR_OPTION_REFINERS, COMPLEX_OPTION_COMPARATORS,\n  ViewOptions, ViewOptionsRefined,\n  BASE_OPTION_DEFAULTS, mergeRawOptions,\n  BASE_OPTION_REFINERS, VIEW_OPTION_REFINERS,\n  CalendarListeners, CALENDAR_LISTENER_REFINERS, Dictionary,\n} from '../options'\nimport { rangeContainsMarker } from '../datelib/date-range'\nimport { ViewApi } from '../ViewApi'\nimport { parseBusinessHours } from '../structs/business-hours'\nimport { globalPlugins } from '../global-plugins'\nimport { createEmptyEventStore } from '../structs/event-store'\nimport { CalendarContext } from '../CalendarContext'\nimport { CalendarDataManagerState, CalendarOptionsData, CalendarCurrentViewData, CalendarData } from './data-types'\nimport { TaskRunner } from '../util/TaskRunner'\nimport { buildTitle } from './title-formatting'\n\nexport interface CalendarDataManagerProps {\n  optionOverrides: CalendarOptions\n  calendarApi: CalendarApi\n  onAction?: (action: Action) => void\n  onData?: (data: CalendarData) => void\n}\n\nexport type ReducerFunc = ( // TODO: rename to CalendarDataInjector. move view-props-manip hook here as well?\n  currentState: Dictionary | null,\n  action: Action | null,\n  context: CalendarContext & CalendarDataManagerState // more than just context\n) => Dictionary\n\n// in future refactor, do the redux-style function(state=initial) for initial-state\n// also, whatever is happening in constructor, have it happen in action queue too\n\nexport class CalendarDataManager {\n  private computeOptionsData = memoize(this._computeOptionsData)\n  private computeCurrentViewData = memoize(this._computeCurrentViewData)\n  private organizeRawLocales = memoize(organizeRawLocales)\n  private buildLocale = memoize(buildLocale)\n  private buildPluginHooks = buildBuildPluginHooks()\n  private buildDateEnv = memoize(buildDateEnv)\n  private buildTheme = memoize(buildTheme)\n  private parseToolbars = memoize(parseToolbars)\n  private buildViewSpecs = memoize(buildViewSpecs)\n  private buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator)\n  private buildViewApi = memoize(buildViewApi)\n  private buildViewUiProps = memoizeObjArg(buildViewUiProps)\n  private buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual)\n  private buildEventUiBases = memoize(buildEventUiBases)\n  private parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours)\n  private buildTitle = memoize(buildTitle)\n\n  public emitter = new Emitter<CalendarListeners>()\n  private actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this))\n  private props: CalendarDataManagerProps\n  private state: CalendarDataManagerState\n  private data: CalendarData\n\n  public currentCalendarOptionsInput: CalendarOptions = {}\n  private currentCalendarOptionsRefined: CalendarOptionsRefined = ({} as any)\n  private currentViewOptionsInput: ViewOptions = {}\n  private currentViewOptionsRefined: ViewOptionsRefined = ({} as any)\n  public currentCalendarOptionsRefiners: any = {}\n\n  constructor(props: CalendarDataManagerProps) {\n    this.props = props\n    this.actionRunner.pause()\n\n    let dynamicOptionOverrides: CalendarOptions = {}\n    let optionsData = this.computeOptionsData(\n      props.optionOverrides,\n      dynamicOptionOverrides,\n      props.calendarApi,\n    )\n\n    let currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView\n    let currentViewData = this.computeCurrentViewData(\n      currentViewType,\n      optionsData,\n      props.optionOverrides,\n      dynamicOptionOverrides,\n    )\n\n    // wire things up\n    // TODO: not DRY\n    props.calendarApi.currentDataManager = this\n    this.emitter.setThisContext(props.calendarApi)\n    this.emitter.setOptions(currentViewData.options)\n\n    let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv)\n    let dateProfile = currentViewData.dateProfileGenerator.build(currentDate)\n\n    if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {\n      currentDate = dateProfile.currentRange.start\n    }\n\n    let calendarContext: CalendarContext = {\n      dateEnv: optionsData.dateEnv,\n      options: optionsData.calendarOptions,\n      pluginHooks: optionsData.pluginHooks,\n      calendarApi: props.calendarApi,\n      dispatch: this.dispatch,\n      emitter: this.emitter,\n      getCurrentData: this.getCurrentData,\n    }\n\n    // needs to be after setThisContext\n    for (let callback of optionsData.pluginHooks.contextInit) {\n      callback(calendarContext)\n    }\n\n    // NOT DRY\n    let eventSources = initEventSources(optionsData.calendarOptions, dateProfile, calendarContext)\n\n    let initialState: CalendarDataManagerState = {\n      dynamicOptionOverrides,\n      currentViewType,\n      currentDate,\n      dateProfile,\n      businessHours: this.parseContextBusinessHours(calendarContext), // weird to have this in state\n      eventSources,\n      eventUiBases: {},\n      eventStore: createEmptyEventStore(),\n      renderableEventStore: createEmptyEventStore(),\n      dateSelection: null,\n      eventSelection: '',\n      eventDrag: null,\n      eventResize: null,\n      selectionConfig: this.buildViewUiProps(calendarContext).selectionConfig,\n    }\n    let contextAndState = { ...calendarContext, ...initialState }\n\n    for (let reducer of optionsData.pluginHooks.reducers) {\n      __assign(initialState, reducer(null, null, contextAndState))\n    }\n\n    if (computeIsLoading(initialState, calendarContext)) {\n      this.emitter.trigger('loading', true) // NOT DRY\n    }\n\n    this.state = initialState\n    this.updateData()\n    this.actionRunner.resume()\n  }\n\n  getCurrentData = () => this.data\n\n  dispatch = (action: Action) => {\n    this.actionRunner.request(action) // protects against recursive calls to _handleAction\n  }\n\n  resetOptions(optionOverrides: CalendarOptions, append?: boolean) {\n    let { props } = this\n\n    props.optionOverrides = append\n      ? { ...props.optionOverrides, ...optionOverrides }\n      : optionOverrides\n\n    this.actionRunner.request({ // hack. will cause updateData\n      type: 'NOTHING',\n    })\n  }\n\n  _handleAction(action: Action) {\n    let { props, state, emitter } = this\n\n    let dynamicOptionOverrides = reduceDynamicOptionOverrides(state.dynamicOptionOverrides, action)\n    let optionsData = this.computeOptionsData(\n      props.optionOverrides,\n      dynamicOptionOverrides,\n      props.calendarApi,\n    )\n\n    let currentViewType = reduceViewType(state.currentViewType, action)\n    let currentViewData = this.computeCurrentViewData(\n      currentViewType,\n      optionsData,\n      props.optionOverrides,\n      dynamicOptionOverrides,\n    )\n\n    // wire things up\n    // TODO: not DRY\n    props.calendarApi.currentDataManager = this\n    emitter.setThisContext(props.calendarApi)\n    emitter.setOptions(currentViewData.options)\n\n    let calendarContext: CalendarContext = {\n      dateEnv: optionsData.dateEnv,\n      options: optionsData.calendarOptions,\n      pluginHooks: optionsData.pluginHooks,\n      calendarApi: props.calendarApi,\n      dispatch: this.dispatch,\n      emitter,\n      getCurrentData: this.getCurrentData,\n    }\n\n    let { currentDate, dateProfile } = state\n\n    if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { // hack\n      dateProfile = currentViewData.dateProfileGenerator.build(currentDate)\n    }\n\n    currentDate = reduceCurrentDate(currentDate, action)\n    dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator)\n\n    if (\n      action.type === 'PREV' || // TODO: move this logic into DateProfileGenerator\n      action.type === 'NEXT' || // \"\n      !rangeContainsMarker(dateProfile.currentRange, currentDate)\n    ) {\n      currentDate = dateProfile.currentRange.start\n    }\n\n    let eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext)\n    let eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext)\n    let isEventsLoading = computeEventSourcesLoading(eventSources) // BAD. also called in this func in computeIsLoading\n\n    let renderableEventStore =\n      (isEventsLoading && !currentViewData.options.progressiveEventRendering) ?\n        (state.renderableEventStore || eventStore) : // try from previous state\n        eventStore\n\n    let { eventUiSingleBase, selectionConfig } = this.buildViewUiProps(calendarContext) // will memoize obj\n    let eventUiBySource = this.buildEventUiBySource(eventSources)\n    let eventUiBases = this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource)\n\n    let newState: CalendarDataManagerState = {\n      dynamicOptionOverrides,\n      currentViewType,\n      currentDate,\n      dateProfile,\n      eventSources,\n      eventStore,\n      renderableEventStore,\n      selectionConfig,\n      eventUiBases,\n      businessHours: this.parseContextBusinessHours(calendarContext), // will memoize obj\n      dateSelection: reduceDateSelection(state.dateSelection, action),\n      eventSelection: reduceSelectedEvent(state.eventSelection, action),\n      eventDrag: reduceEventDrag(state.eventDrag, action),\n      eventResize: reduceEventResize(state.eventResize, action),\n    }\n    let contextAndState = { ...calendarContext, ...newState }\n\n    for (let reducer of optionsData.pluginHooks.reducers) {\n      __assign(newState, reducer(state, action, contextAndState)) // give the OLD state, for old value\n    }\n\n    let wasLoading = computeIsLoading(state, calendarContext)\n    let isLoading = computeIsLoading(newState, calendarContext)\n\n    // TODO: use propSetHandlers in plugin system\n    if (!wasLoading && isLoading) {\n      emitter.trigger('loading', true)\n    } else if (wasLoading && !isLoading) {\n      emitter.trigger('loading', false)\n    }\n\n    this.state = newState\n\n    if (props.onAction) {\n      props.onAction(action)\n    }\n  }\n\n  updateData() {\n    let { props, state } = this\n    let oldData = this.data\n\n    let optionsData = this.computeOptionsData(\n      props.optionOverrides,\n      state.dynamicOptionOverrides,\n      props.calendarApi,\n    )\n\n    let currentViewData = this.computeCurrentViewData(\n      state.currentViewType,\n      optionsData,\n      props.optionOverrides,\n      state.dynamicOptionOverrides,\n    )\n\n    let data: CalendarData = this.data = {\n      viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv),\n      calendarApi: props.calendarApi,\n      dispatch: this.dispatch,\n      emitter: this.emitter,\n      getCurrentData: this.getCurrentData,\n      ...optionsData,\n      ...currentViewData,\n      ...state,\n    }\n\n    let changeHandlers = optionsData.pluginHooks.optionChangeHandlers\n    let oldCalendarOptions = oldData && oldData.calendarOptions\n    let newCalendarOptions = optionsData.calendarOptions\n\n    if (oldCalendarOptions && oldCalendarOptions !== newCalendarOptions) {\n      if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) {\n        // hack\n        state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data)\n        state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv)\n      }\n\n      for (let optionName in changeHandlers) {\n        if (oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) {\n          changeHandlers[optionName](newCalendarOptions[optionName], data)\n        }\n      }\n    }\n\n    if (props.onData) {\n      props.onData(data)\n    }\n  }\n\n  _computeOptionsData(\n    optionOverrides: CalendarOptions,\n    dynamicOptionOverrides: CalendarOptions,\n    calendarApi: CalendarApi,\n  ): CalendarOptionsData {\n    // TODO: blacklist options that are handled by optionChangeHandlers\n\n    let {\n      refinedOptions, pluginHooks, localeDefaults, availableLocaleData, extra,\n    } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides)\n\n    warnUnknownOptions(extra)\n\n    let dateEnv = this.buildDateEnv(\n      refinedOptions.timeZone,\n      refinedOptions.locale,\n      refinedOptions.weekNumberCalculation,\n      refinedOptions.firstDay,\n      refinedOptions.weekText,\n      pluginHooks,\n      availableLocaleData,\n      refinedOptions.defaultRangeSeparator,\n    )\n\n    let viewSpecs = this.buildViewSpecs(pluginHooks.views, optionOverrides, dynamicOptionOverrides, localeDefaults)\n    let theme = this.buildTheme(refinedOptions, pluginHooks)\n    let toolbarConfig = this.parseToolbars(refinedOptions, optionOverrides, theme, viewSpecs, calendarApi)\n\n    return {\n      calendarOptions: refinedOptions,\n      pluginHooks,\n      dateEnv,\n      viewSpecs,\n      theme,\n      toolbarConfig,\n      localeDefaults,\n      availableRawLocales: availableLocaleData.map,\n    }\n  }\n\n  // always called from behind a memoizer\n  processRawCalendarOptions(optionOverrides: CalendarOptions, dynamicOptionOverrides: CalendarOptions) {\n    let { locales, locale } = mergeRawOptions([\n      BASE_OPTION_DEFAULTS,\n      optionOverrides,\n      dynamicOptionOverrides,\n    ])\n    let availableLocaleData = this.organizeRawLocales(locales)\n    let availableRawLocales = availableLocaleData.map\n    let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options\n    let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins)\n    let refiners = this.currentCalendarOptionsRefiners = {\n      ...BASE_OPTION_REFINERS,\n      ...CALENDAR_LISTENER_REFINERS,\n      ...CALENDAR_OPTION_REFINERS,\n      ...pluginHooks.listenerRefiners,\n      ...pluginHooks.optionRefiners,\n    }\n    let extra = {}\n\n    let raw = mergeRawOptions([\n      BASE_OPTION_DEFAULTS,\n      localeDefaults,\n      optionOverrides,\n      dynamicOptionOverrides,\n    ])\n    let refined: Partial<CalendarOptionsRefined> = {}\n    let currentRaw = this.currentCalendarOptionsInput\n    let currentRefined = this.currentCalendarOptionsRefined\n    let anyChanges = false\n\n    for (let optionName in raw) {\n      if (optionName !== 'plugins') { // because plugins is special-cased\n        if (\n          raw[optionName] === currentRaw[optionName] ||\n          (\n            COMPLEX_OPTION_COMPARATORS[optionName] &&\n            (optionName in currentRaw) &&\n            COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])\n          )\n        ) {\n          refined[optionName] = currentRefined[optionName]\n        } else if (refiners[optionName]) {\n          refined[optionName] = refiners[optionName](raw[optionName])\n          anyChanges = true\n        } else {\n          extra[optionName] = currentRaw[optionName]\n        }\n      }\n    }\n\n    if (anyChanges) {\n      this.currentCalendarOptionsInput = raw\n      this.currentCalendarOptionsRefined = refined as CalendarOptionsRefined\n    }\n\n    return {\n      rawOptions: this.currentCalendarOptionsInput,\n      refinedOptions: this.currentCalendarOptionsRefined,\n      pluginHooks,\n      availableLocaleData,\n      localeDefaults,\n      extra,\n    }\n  }\n\n  _computeCurrentViewData(\n    viewType: string,\n    optionsData: CalendarOptionsData,\n    optionOverrides: CalendarOptions,\n    dynamicOptionOverrides: CalendarOptions,\n  ): CalendarCurrentViewData {\n    let viewSpec = optionsData.viewSpecs[viewType]\n\n    if (!viewSpec) {\n      throw new Error(`viewType \"${viewType}\" is not available. Please make sure you've loaded all neccessary plugins`)\n    }\n\n    let { refinedOptions, extra } = this.processRawViewOptions(\n      viewSpec,\n      optionsData.pluginHooks,\n      optionsData.localeDefaults,\n      optionOverrides,\n      dynamicOptionOverrides,\n    )\n\n    warnUnknownOptions(extra)\n\n    let dateProfileGenerator = this.buildDateProfileGenerator({\n      dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass as any,\n      duration: viewSpec.duration,\n      durationUnit: viewSpec.durationUnit,\n      usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime as any,\n      dateEnv: optionsData.dateEnv,\n      calendarApi: this.props.calendarApi, // should come from elsewhere?\n      slotMinTime: refinedOptions.slotMinTime,\n      slotMaxTime: refinedOptions.slotMaxTime,\n      showNonCurrentDates: refinedOptions.showNonCurrentDates,\n      dayCount: refinedOptions.dayCount,\n      dateAlignment: refinedOptions.dateAlignment,\n      dateIncrement: refinedOptions.dateIncrement,\n      hiddenDays: refinedOptions.hiddenDays,\n      weekends: refinedOptions.weekends,\n      nowInput: refinedOptions.now,\n      validRangeInput: refinedOptions.validRange,\n      visibleRangeInput: refinedOptions.visibleRange,\n      monthMode: refinedOptions.monthMode,\n      fixedWeekCount: refinedOptions.fixedWeekCount,\n    })\n\n    let viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv)\n\n    return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi }\n  }\n\n  processRawViewOptions(\n    viewSpec: ViewSpec,\n    pluginHooks: PluginHooks,\n    localeDefaults: CalendarOptions,\n    optionOverrides: CalendarOptions,\n    dynamicOptionOverrides: CalendarOptions,\n  ) {\n    let raw = mergeRawOptions([\n      BASE_OPTION_DEFAULTS,\n      viewSpec.optionDefaults,\n      localeDefaults,\n      optionOverrides,\n      viewSpec.optionOverrides,\n      dynamicOptionOverrides,\n    ])\n    let refiners = {\n      ...BASE_OPTION_REFINERS,\n      ...CALENDAR_LISTENER_REFINERS,\n      ...CALENDAR_OPTION_REFINERS,\n      ...VIEW_OPTION_REFINERS,\n      ...pluginHooks.listenerRefiners,\n      ...pluginHooks.optionRefiners,\n    }\n    let refined: Partial<ViewOptionsRefined> = {}\n    let currentRaw = this.currentViewOptionsInput\n    let currentRefined = this.currentViewOptionsRefined\n    let anyChanges = false\n    let extra = {}\n\n    for (let optionName in raw) {\n      if (\n        raw[optionName] === currentRaw[optionName] ||\n        (COMPLEX_OPTION_COMPARATORS[optionName] &&\n          COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName]))\n      ) {\n        refined[optionName] = currentRefined[optionName]\n      } else {\n        if (\n          raw[optionName] === this.currentCalendarOptionsInput[optionName] ||\n          (COMPLEX_OPTION_COMPARATORS[optionName] &&\n            COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName]))\n        ) {\n          if (optionName in this.currentCalendarOptionsRefined) { // might be an \"extra\" prop\n            refined[optionName] = this.currentCalendarOptionsRefined[optionName]\n          }\n        } else if (refiners[optionName]) {\n          refined[optionName] = refiners[optionName](raw[optionName])\n        } else {\n          extra[optionName] = raw[optionName]\n        }\n\n        anyChanges = true\n      }\n    }\n\n    if (anyChanges) {\n      this.currentViewOptionsInput = raw\n      this.currentViewOptionsRefined = refined as ViewOptionsRefined\n    }\n\n    return {\n      rawOptions: this.currentViewOptionsInput,\n      refinedOptions: this.currentViewOptionsRefined,\n      extra,\n    }\n  }\n}\n\nfunction buildDateEnv(\n  timeZone: string,\n  explicitLocale: LocaleSingularArg,\n  weekNumberCalculation,\n  firstDay: number | undefined,\n  weekText,\n  pluginHooks: PluginHooks,\n  availableLocaleData: RawLocaleInfo,\n  defaultSeparator: string,\n) {\n  let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map)\n\n  return new DateEnv({\n    calendarSystem: 'gregory', // TODO: make this a setting\n    timeZone,\n    namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl,\n    locale,\n    weekNumberCalculation,\n    firstDay,\n    weekText,\n    cmdFormatter: pluginHooks.cmdFormatter,\n    defaultSeparator,\n  })\n}\n\nfunction buildTheme(options: CalendarOptionsRefined, pluginHooks: PluginHooks) {\n  let ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme\n\n  return new ThemeClass(options)\n}\n\nfunction buildDateProfileGenerator(props: DateProfileGeneratorProps): DateProfileGenerator {\n  let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator\n\n  return new DateProfileGeneratorClass(props)\n}\n\nfunction buildViewApi(type: string, getCurrentData: () => CalendarData, dateEnv: DateEnv) {\n  return new ViewApi(type, getCurrentData, dateEnv)\n}\n\nfunction buildEventUiBySource(eventSources: EventSourceHash): EventUiHash {\n  return mapHash(eventSources, (eventSource) => eventSource.ui)\n}\n\nfunction buildEventUiBases(eventDefs: EventDefHash, eventUiSingleBase: EventUi, eventUiBySource: EventUiHash) {\n  let eventUiBases: EventUiHash = { '': eventUiSingleBase }\n\n  for (let defId in eventDefs) {\n    let def = eventDefs[defId]\n\n    if (def.sourceId && eventUiBySource[def.sourceId]) {\n      eventUiBases[defId] = eventUiBySource[def.sourceId]\n    }\n  }\n\n  return eventUiBases\n}\n\nfunction buildViewUiProps(calendarContext: CalendarContext) {\n  let { options } = calendarContext\n\n  return {\n    eventUiSingleBase: createEventUi(\n      {\n        display: options.eventDisplay,\n        editable: options.editable, // without \"event\" at start\n        startEditable: options.eventStartEditable,\n        durationEditable: options.eventDurationEditable,\n        constraint: options.eventConstraint,\n        overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined,\n        allow: options.eventAllow,\n        backgroundColor: options.eventBackgroundColor,\n        borderColor: options.eventBorderColor,\n        textColor: options.eventTextColor,\n        color: options.eventColor,\n        // classNames: options.eventClassNames // render hook will handle this\n      },\n      calendarContext,\n    ),\n    selectionConfig: createEventUi(\n      {\n        constraint: options.selectConstraint,\n        overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined,\n        allow: options.selectAllow,\n      },\n      calendarContext,\n    ),\n  }\n}\n\nfunction computeIsLoading(state: CalendarDataManagerState, context: CalendarContext) {\n  for (let isLoadingFunc of context.pluginHooks.isLoadingFuncs) {\n    if (isLoadingFunc(state)) {\n      return true\n    }\n  }\n\n  return false\n}\n\nfunction parseContextBusinessHours(calendarContext: CalendarContext) {\n  return parseBusinessHours(calendarContext.options.businessHours, calendarContext)\n}\n\nfunction warnUnknownOptions(options: any, viewName?: string) {\n  for (let optionName in options) {\n    console.warn(\n      `Unknown option '${optionName}'` +\n      (viewName ? ` for view '${viewName}'` : ''),\n    )\n  }\n}\n","import { Action } from './Action'\n\nexport function reduceDynamicOptionOverrides(dynamicOptionOverrides, action: Action) {\n  switch (action.type) {\n    case 'SET_OPTION':\n      return { ...dynamicOptionOverrides, [action.optionName]: action.rawOptionValue }\n    default:\n      return dynamicOptionOverrides\n  }\n}\n","import { Action } from './Action'\n\nexport function reduceViewType(viewType: string, action: Action): string {\n  switch (action.type) {\n    case 'CHANGE_VIEW_TYPE':\n      viewType = action.viewType\n  }\n\n  return viewType\n}\n","import { DateProfile, DateProfileGenerator } from '../DateProfileGenerator'\nimport { Action } from './Action'\nimport { DateMarker } from '../datelib/marker'\n\nexport function reduceDateProfile(\n  currentDateProfile: DateProfile | null,\n  action: Action,\n  currentDate: DateMarker,\n  dateProfileGenerator: DateProfileGenerator,\n): DateProfile {\n  let dp: DateProfile\n\n  switch (action.type) {\n    case 'CHANGE_VIEW_TYPE':\n      return dateProfileGenerator.build(action.dateMarker || currentDate)\n\n    case 'CHANGE_DATE':\n      return dateProfileGenerator.build(action.dateMarker)\n\n    case 'PREV':\n      dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate)\n      if (dp.isValid) {\n        return dp\n      }\n      break\n\n    case 'NEXT':\n      dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate)\n      if (dp.isValid) {\n        return dp\n      }\n      break\n  }\n\n  return currentDateProfile\n}\n","import { Component, ComponentChildren } from '../vdom'\nimport { CalendarDataManager } from '../reducers/CalendarDataManager'\nimport { CalendarApi } from '../CalendarApi'\nimport { CalendarData } from '../reducers/data-types'\n\nexport interface CalendarDataProviderProps {\n  optionOverrides: any\n  calendarApi: CalendarApi\n  children?: (data: CalendarData) => ComponentChildren\n}\n\n// TODO: move this to react plugin?\nexport class CalendarDataProvider extends Component<CalendarDataProviderProps, CalendarData> {\n  dataManager: CalendarDataManager\n\n  constructor(props: CalendarDataProviderProps) {\n    super(props)\n\n    this.dataManager = new CalendarDataManager({\n      optionOverrides: props.optionOverrides,\n      calendarApi: props.calendarApi,\n      onData: this.handleData,\n    })\n  }\n\n  handleData = (data: CalendarData) => {\n    if (!this.dataManager) { // still within initial run, before assignment in constructor\n      // eslint-disable-next-line react/no-direct-mutation-state\n      this.state = data // can't use setState yet\n    } else {\n      this.setState(data)\n    }\n  }\n\n  render() {\n    return this.props.children(this.state)\n  }\n\n  componentDidUpdate(prevProps: CalendarDataProviderProps) {\n    let newOptionOverrides = this.props.optionOverrides\n\n    if (newOptionOverrides !== prevProps.optionOverrides) { // prevent recursive handleData\n      this.dataManager.resetOptions(newOptionOverrides)\n    }\n  }\n}\n","export interface SegSpan {\n  start: number\n  end: number\n}\n\nexport interface SegEntry {\n  index: number\n  thickness: number // should be an integer\n  span: SegSpan\n}\n\n// used internally. exposed for subclasses of SegHierarchy\nexport interface SegInsertion {\n  level: number // will have an equal coord, or slightly before, entries in existing level\n  levelCoord: number\n  lateral: number // where to insert in the existing level. -1 if creating a new level\n  touchingLevel: number // -1 if no touching\n  touchingLateral: number // -1 if no touching\n  touchingEntry: SegEntry // the last touching entry in the level\n  stackCnt: number\n}\n\nexport interface SegRect extends SegEntry {\n  levelCoord: number\n}\n\nexport interface SegEntryGroup {\n  entries: SegEntry[]\n  span: SegSpan\n}\n\nexport class SegHierarchy {\n  // settings\n  strictOrder: boolean = false\n  allowReslicing: boolean = false\n  maxCoord: number = -1 // -1 means no max\n  maxStackCnt: number = -1 // -1 means no max\n\n  levelCoords: number[] = [] // ordered\n  entriesByLevel: SegEntry[][] = [] // parallel with levelCoords\n  stackCnts: { [entryId: string]: number } = {} // TODO: use better technique!?\n\n  addSegs(inputs: SegEntry[]): SegEntry[] {\n    let hiddenEntries: SegEntry[] = []\n\n    for (let input of inputs) {\n      this.insertEntry(input, hiddenEntries)\n    }\n\n    return hiddenEntries\n  }\n\n  insertEntry(entry: SegEntry, hiddenEntries: SegEntry[]): number {\n    let insertion = this.findInsertion(entry)\n\n    if (this.isInsertionValid(insertion, entry)) {\n      this.insertEntryAt(entry, insertion)\n      return 1\n    }\n\n    return this.handleInvalidInsertion(insertion, entry, hiddenEntries)\n  }\n\n  isInsertionValid(insertion: SegInsertion, entry: SegEntry): boolean {\n    return (this.maxCoord === -1 || insertion.levelCoord + entry.thickness <= this.maxCoord) &&\n      (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt)\n  }\n\n  // returns number of new entries inserted\n  handleInvalidInsertion(insertion: SegInsertion, entry: SegEntry, hiddenEntries: SegEntry[]): number {\n    if (this.allowReslicing && insertion.touchingEntry) {\n      return this.splitEntry(entry, insertion.touchingEntry, hiddenEntries)\n    }\n\n    hiddenEntries.push(entry)\n    return 0\n  }\n\n  splitEntry(entry: SegEntry, barrier: SegEntry, hiddenEntries: SegEntry[]): number {\n    let partCnt = 0\n    let splitHiddenEntries: SegEntry[] = []\n    let entrySpan = entry.span\n    let barrierSpan = barrier.span\n\n    if (entrySpan.start < barrierSpan.start) {\n      partCnt += this.insertEntry({\n        index: entry.index,\n        thickness: entry.thickness,\n        span: { start: entrySpan.start, end: barrierSpan.start },\n      }, splitHiddenEntries)\n    }\n\n    if (entrySpan.end > barrierSpan.end) {\n      partCnt += this.insertEntry({\n        index: entry.index,\n        thickness: entry.thickness,\n        span: { start: barrierSpan.end, end: entrySpan.end },\n      }, splitHiddenEntries)\n    }\n\n    if (partCnt) {\n      hiddenEntries.push({\n        index: entry.index,\n        thickness: entry.thickness,\n        span: intersectSpans(barrierSpan, entrySpan), // guaranteed to intersect\n      }, ...splitHiddenEntries)\n      return partCnt\n    }\n\n    hiddenEntries.push(entry)\n    return 0\n  }\n\n  insertEntryAt(entry: SegEntry, insertion: SegInsertion): void {\n    let { entriesByLevel, levelCoords } = this\n\n    if (insertion.lateral === -1) {\n      // create a new level\n      insertAt(levelCoords, insertion.level, insertion.levelCoord)\n      insertAt(entriesByLevel, insertion.level, [entry])\n    } else {\n      // insert into existing level\n      insertAt(entriesByLevel[insertion.level], insertion.lateral, entry)\n    }\n\n    this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt\n  }\n\n  findInsertion(newEntry: SegEntry): SegInsertion {\n    let { levelCoords, entriesByLevel, strictOrder, stackCnts } = this\n    let levelCnt = levelCoords.length\n    let candidateCoord = 0\n    let touchingLevel: number = -1\n    let touchingLateral: number = -1\n    let touchingEntry: SegEntry = null\n    let stackCnt = 0\n\n    for (let trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {\n      let trackingCoord = levelCoords[trackingLevel]\n\n      // if the current level is past the placed entry, we have found a good empty space and can stop.\n      // if strictOrder, keep finding more lateral intersections.\n      if (!strictOrder && trackingCoord >= candidateCoord + newEntry.thickness) {\n        break\n      }\n\n      let trackingEntries = entriesByLevel[trackingLevel]\n      let trackingEntry: SegEntry\n      let searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd) // find first entry after newEntry's end\n      let lateralIndex = searchRes[0] + searchRes[1] // if exact match (which doesn't collide), go to next one\n\n      while ( // loop through entries that horizontally intersect\n        (trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list\n        trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry\n      ) {\n        let trackingEntryBottom = trackingCoord + trackingEntry.thickness\n        // intersects into the top of the candidate?\n        if (trackingEntryBottom > candidateCoord) {\n          candidateCoord = trackingEntryBottom\n          touchingEntry = trackingEntry\n          touchingLevel = trackingLevel\n          touchingLateral = lateralIndex\n        }\n        // butts up against top of candidate? (will happen if just intersected as well)\n        if (trackingEntryBottom === candidateCoord) {\n          // accumulate the highest possible stackCnt of the trackingEntries that butt up\n          stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1)\n        }\n        lateralIndex += 1\n      }\n    }\n\n    // the destination level will be after touchingEntry's level. find it\n    let destLevel = 0\n    if (touchingEntry) {\n      destLevel = touchingLevel + 1\n      while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {\n        destLevel += 1\n      }\n    }\n\n    // if adding to an existing level, find where to insert\n    let destLateral = -1\n    if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {\n      destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0]\n    }\n\n    return {\n      touchingLevel,\n      touchingLateral,\n      touchingEntry,\n      stackCnt,\n      levelCoord: candidateCoord,\n      level: destLevel,\n      lateral: destLateral,\n    }\n  }\n\n  // sorted by levelCoord (lowest to highest)\n  toRects(): SegRect[] {\n    let { entriesByLevel, levelCoords } = this\n    let levelCnt = entriesByLevel.length\n    let rects: SegRect[] = []\n\n    for (let level = 0; level < levelCnt; level += 1) {\n      let entries = entriesByLevel[level]\n      let levelCoord = levelCoords[level]\n\n      for (let entry of entries) {\n        rects.push({ ...entry, levelCoord })\n      }\n    }\n\n    return rects\n  }\n}\n\nexport function getEntrySpanEnd(entry: SegEntry) {\n  return entry.span.end\n}\n\nexport function buildEntryKey(entry: SegEntry) { // TODO: use Map instead?\n  return entry.index + ':' + entry.span.start\n}\n\n// returns groups with entries sorted by input order\nexport function groupIntersectingEntries(entries: SegEntry[]): SegEntryGroup[] {\n  let merges: SegEntryGroup[] = []\n\n  for (let entry of entries) {\n    let filteredMerges: SegEntryGroup[] = []\n    let hungryMerge: SegEntryGroup = { // the merge that will eat what it collides with\n      span: entry.span,\n      entries: [entry],\n    }\n\n    for (let merge of merges) {\n      if (intersectSpans(merge.span, hungryMerge.span)) {\n        hungryMerge = {\n          entries: merge.entries.concat(hungryMerge.entries), // keep preexisting merge's items first. maintains order\n          span: joinSpans(merge.span, hungryMerge.span),\n        }\n      } else {\n        filteredMerges.push(merge)\n      }\n    }\n\n    filteredMerges.push(hungryMerge)\n    merges = filteredMerges\n  }\n\n  return merges\n}\n\nexport function joinSpans(span0: SegSpan, span1: SegSpan): SegSpan {\n  return {\n    start: Math.min(span0.start, span1.start),\n    end: Math.max(span0.end, span1.end),\n  }\n}\n\nexport function intersectSpans(span0: SegSpan, span1: SegSpan): SegSpan | null {\n  let start = Math.max(span0.start, span1.start)\n  let end = Math.min(span0.end, span1.end)\n\n  if (start < end) {\n    return { start, end }\n  }\n\n  return null\n}\n\n// general util\n// ---------------------------------------------------------------------------------------------------------------------\n\nfunction insertAt<Item>(arr: Item[], index: number, item: Item) {\n  arr.splice(index, 0, item)\n}\n\nexport function binarySearch<Item>(\n  a: Item[],\n  searchVal: number,\n  getItemVal: (item: Item) => number,\n): [number, number] { // returns [level, isExactMatch ? 1 : 0]\n  let startIndex = 0\n  let endIndex = a.length // exclusive\n\n  if (!endIndex || searchVal < getItemVal(a[startIndex])) { // no items OR before first item\n    return [0, 0]\n  }\n  if (searchVal > getItemVal(a[endIndex - 1])) { // after last item\n    return [endIndex, 0]\n  }\n\n  while (startIndex < endIndex) {\n    let middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2)\n    let middleVal = getItemVal(a[middleIndex])\n\n    if (searchVal < middleVal) {\n      endIndex = middleIndex\n    } else if (searchVal > middleVal) {\n      startIndex = middleIndex + 1\n    } else { // equal!\n      return [middleIndex, 1]\n    }\n  }\n\n  return [startIndex, 0]\n}\n","import { DateComponent } from '../component/DateComponent'\nimport { Hit } from './hit'\n\nexport abstract class Interaction {\n  component: DateComponent<any>\n  isHitComboAllowed: ((hit0: Hit, hit1: Hit) => boolean) | null\n\n  constructor(settings: InteractionSettings) {\n    this.component = settings.component\n    this.isHitComboAllowed = settings.isHitComboAllowed || null\n  }\n\n  destroy() {\n  }\n}\n\nexport type InteractionClass = { new(settings: InteractionSettings): Interaction }\n\nexport interface InteractionSettingsInput {\n  el: HTMLElement\n  useEventCenter?: boolean\n  isHitComboAllowed?: (hit0: Hit, hit1: Hit) => boolean\n}\n\nexport interface InteractionSettings {\n  component: DateComponent<any>\n  el: HTMLElement\n  useEventCenter: boolean\n  isHitComboAllowed: ((hit0: Hit, hit1: Hit) => boolean) | null\n}\n\nexport type InteractionSettingsStore = { [componenUid: string]: InteractionSettings }\n\nexport function parseInteractionSettings(component: DateComponent<any>, input: InteractionSettingsInput): InteractionSettings {\n  return {\n    component,\n    el: input.el,\n    useEventCenter: input.useEventCenter != null ? input.useEventCenter : true,\n    isHitComboAllowed: input.isHitComboAllowed || null,\n  }\n}\n\nexport function interactionSettingsToStore(settings: InteractionSettings) {\n  return {\n    [settings.component.uid]: settings,\n  }\n}\n\n// global state\nexport const interactionSettingsStore: InteractionSettingsStore = {}\n","import { Emitter } from '../common/Emitter'\n\n/*\nAn abstraction for a dragging interaction originating on an event.\nDoes higher-level things than PointerDragger, such as possibly:\n- a \"mirror\" that moves with the pointer\n- a minimum number of pixels or other criteria for a true drag to begin\n\nsubclasses must emit:\n- pointerdown\n- dragstart\n- dragmove\n- pointerup\n- dragend\n*/\nexport abstract class ElementDragging { // TODO: rename to *Interface?\n  emitter: Emitter<any>\n\n  constructor(el: HTMLElement, selector?: string) {\n    this.emitter = new Emitter()\n  }\n\n  destroy() {\n  }\n\n  // if given true, should prevent dragstart+dragmove+dragend from firing\n  abstract setIgnoreMove(bool: boolean): void\n\n  setMirrorIsVisible(bool: boolean) {\n    // optional if subclass doesn't want to support a mirror\n  }\n\n  setMirrorNeedsRevert(bool: boolean) {\n    // optional if subclass doesn't want to support a mirror\n  }\n\n  setAutoScrollEnabled(bool: boolean) {\n    // optional\n  }\n}\n\nexport type ElementDraggingClass = { new(el: HTMLElement, selector?: string): ElementDragging }\n","// TODO: get rid of this in favor of options system,\n// tho it's really easy to access this globally rather than pass thru options.\nexport const config = {} as any\n","import { createDuration, Duration } from '../datelib/duration'\nimport { refineProps, RawOptionsFromRefiners, Dictionary } from '../options'\n\n/*\nInformation about what will happen when an external element is dragged-and-dropped\nonto a calendar. Contains information for creating an event.\n*/\n\nconst DRAG_META_REFINERS = {\n  startTime: createDuration,\n  duration: createDuration,\n  create: Boolean,\n  sourceId: String,\n}\n\nexport type DragMetaInput =\n  RawOptionsFromRefiners<typeof DRAG_META_REFINERS> &\n  { [otherProp: string]: any } // for leftoverProps\n\nexport interface DragMeta {\n  startTime: Duration | null\n  duration: Duration | null\n  create: boolean // create an event when dropped?\n  sourceId: string // similar to addEvent's parameter\n  leftoverProps: Dictionary\n}\n\nexport function parseDragMeta(raw: DragMetaInput): DragMeta {\n  let { refined, extra } = refineProps(raw, DRAG_META_REFINERS)\n\n  return {\n    startTime: refined.startTime || null,\n    duration: refined.duration || null,\n    create: refined.create != null ? refined.create : true,\n    sourceId: refined.sourceId,\n    leftoverProps: extra,\n  }\n}\n","import { createElement, VNode } from './vdom'\nimport { BaseComponent } from './vdom-util'\nimport { ToolbarWidget } from './toolbar-struct'\n\nexport interface ToolbarContent {\n  title: string\n  titleId: string\n  navUnit: string\n  activeButton: string\n  isTodayEnabled: boolean\n  isPrevEnabled: boolean\n  isNextEnabled: boolean\n}\n\nexport interface ToolbarSectionProps extends ToolbarContent {\n  widgetGroups: ToolbarWidget[][]\n}\n\nexport class ToolbarSection extends BaseComponent<ToolbarSectionProps> {\n  render() {\n    let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup))\n\n    return createElement('div', { className: 'fc-toolbar-chunk' }, ...children)\n  }\n\n  renderWidgetGroup(widgetGroup: ToolbarWidget[]) {\n    let { props } = this\n    let { theme } = this.context\n    let children: VNode[] = []\n    let isOnlyButtons = true\n\n    for (let widget of widgetGroup) {\n      let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget\n\n      if (buttonName === 'title') {\n        isOnlyButtons = false\n        children.push(\n          <h2 className=\"fc-toolbar-title\" id={props.titleId}>{props.title}</h2>,\n        )\n      } else {\n        let isPressed = buttonName === props.activeButton\n        let isDisabled =\n          (!props.isTodayEnabled && buttonName === 'today') ||\n          (!props.isPrevEnabled && buttonName === 'prev') ||\n          (!props.isNextEnabled && buttonName === 'next')\n\n        let buttonClasses = [`fc-${buttonName}-button`, theme.getClass('button')]\n        if (isPressed) {\n          buttonClasses.push(theme.getClass('buttonActive'))\n        }\n\n        children.push(\n          <button\n            type=\"button\"\n            title={typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint}\n            disabled={isDisabled}\n            aria-pressed={isPressed}\n            className={buttonClasses.join(' ')}\n            onClick={buttonClick}\n          >\n            {buttonText || (buttonIcon ? <span className={buttonIcon} /> : '')}\n          </button>,\n        )\n      }\n    }\n\n    if (children.length > 1) {\n      let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || ''\n\n      return createElement('div', { className: groupClassName }, ...children)\n    }\n    return children[0]\n  }\n}\n","import { createElement } from './vdom'\nimport { BaseComponent } from './vdom-util'\nimport { ToolbarModel, ToolbarWidget } from './toolbar-struct'\nimport { ToolbarSection, ToolbarContent } from './ToolbarSection'\n\nexport interface ToolbarProps extends ToolbarContent {\n  extraClassName: string // wish this could be array, but easier for pureness\n  model: ToolbarModel\n  titleId: string\n}\n\nexport class Toolbar extends BaseComponent<ToolbarProps> {\n  render() {\n    let { model, extraClassName } = this.props\n    let forceLtr = false\n    let startContent\n    let endContent\n    let sectionWidgets = model.sectionWidgets\n    let centerContent = sectionWidgets.center\n\n    if (sectionWidgets.left) {\n      forceLtr = true\n      startContent = sectionWidgets.left\n    } else {\n      startContent = sectionWidgets.start\n    }\n\n    if (sectionWidgets.right) {\n      forceLtr = true\n      endContent = sectionWidgets.right\n    } else {\n      endContent = sectionWidgets.end\n    }\n\n    let classNames = [\n      extraClassName || '',\n      'fc-toolbar',\n      forceLtr ? 'fc-toolbar-ltr' : '',\n    ]\n\n    return (\n      <div className={classNames.join(' ')}>\n        {this.renderSection('start', startContent || [])}\n        {this.renderSection('center', centerContent || [])}\n        {this.renderSection('end', endContent || [])}\n      </div>\n    )\n  }\n\n  renderSection(key: string, widgetGroups: ToolbarWidget[][]) {\n    let { props } = this\n\n    return (\n      <ToolbarSection\n        key={key}\n        widgetGroups={widgetGroups}\n        title={props.title}\n        navUnit={props.navUnit}\n        activeButton={props.activeButton}\n        isTodayEnabled={props.isTodayEnabled}\n        isPrevEnabled={props.isPrevEnabled}\n        isNextEnabled={props.isNextEnabled}\n        titleId={props.titleId}\n      />\n    )\n  }\n}\n","import { BaseComponent, setRef } from './vdom-util'\nimport { ComponentChildren, Ref, createElement } from './vdom'\nimport { CssDimValue } from './scrollgrid/util'\n\nexport interface ViewContainerProps {\n  labeledById: string\n  liquid?: boolean\n  height?: CssDimValue\n  aspectRatio?: number\n  elRef?: Ref<HTMLDivElement>\n  children?: ComponentChildren\n}\n\ninterface ViewContainerState {\n  availableWidth: number | null\n}\n\n// TODO: do function component?\nexport class ViewContainer extends BaseComponent<ViewContainerProps, ViewContainerState> {\n  el: HTMLElement\n\n  state: ViewContainerState = {\n    availableWidth: null,\n  }\n\n  render() {\n    let { props, state } = this\n    let { aspectRatio } = props\n\n    let classNames = [\n      'fc-view-harness',\n      (aspectRatio || props.liquid || props.height)\n        ? 'fc-view-harness-active' // harness controls the height\n        : 'fc-view-harness-passive', // let the view do the height\n    ]\n    let height: CssDimValue = ''\n    let paddingBottom: CssDimValue = ''\n\n    if (aspectRatio) {\n      if (state.availableWidth !== null) {\n        height = state.availableWidth / aspectRatio\n      } else {\n        // while waiting to know availableWidth, we can't set height to *zero*\n        // because will cause lots of unnecessary scrollbars within scrollgrid.\n        // BETTER: don't start rendering ANYTHING yet until we know container width\n        // NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606)\n        paddingBottom = `${(1 / aspectRatio) * 100}%`\n      }\n    } else {\n      height = props.height || ''\n    }\n\n    return (\n      <div\n        aria-labelledby={props.labeledById}\n        ref={this.handleEl}\n        className={classNames.join(' ')}\n        style={{ height, paddingBottom }}\n      >\n        {props.children}\n      </div>\n    )\n  }\n\n  componentDidMount() {\n    this.context.addResizeHandler(this.handleResize)\n  }\n\n  componentWillUnmount() {\n    this.context.removeResizeHandler(this.handleResize)\n  }\n\n  handleEl = (el: HTMLElement | null) => {\n    this.el = el\n    setRef(this.props.elRef, el)\n    this.updateAvailableWidth()\n  }\n\n  handleResize = () => {\n    this.updateAvailableWidth()\n  }\n\n  updateAvailableWidth() {\n    if (\n      this.el && // needed. but why?\n      this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth\n    ) {\n      this.setState({ availableWidth: this.el.offsetWidth })\n    }\n  }\n}\n","import { listenBySelector } from '../util/dom-event'\nimport { EventApi } from '../api/EventApi'\nimport { elementClosest } from '../util/dom-manip'\nimport { getElSeg } from '../component/event-rendering'\nimport { Interaction, InteractionSettings } from './interaction'\nimport { ViewApi } from '../ViewApi'\n\nexport interface EventClickArg {\n  el: HTMLElement\n  event: EventApi\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\n/*\nDetects when the user clicks on an event within a DateComponent\n*/\nexport class EventClicking extends Interaction {\n  constructor(settings: InteractionSettings) {\n    super(settings)\n\n    this.destroy = listenBySelector(\n      settings.el,\n      'click',\n      '.fc-event', // on both fg and bg events\n      this.handleSegClick,\n    )\n  }\n\n  handleSegClick = (ev: Event, segEl: HTMLElement) => {\n    let { component } = this\n    let { context } = component\n    let seg = getElSeg(segEl)\n\n    if (\n      seg && // might be the <div> surrounding the more link\n      component.isValidSegDownEl(ev.target as HTMLElement)\n    ) {\n      // our way to simulate a link click for elements that can't be <a> tags\n      // grab before trigger fired in case trigger trashes DOM thru rerendering\n      let hasUrlContainer = elementClosest(ev.target as HTMLElement, '.fc-event-forced-url')\n      let url = hasUrlContainer ? (hasUrlContainer.querySelector('a[href]') as any).href : ''\n\n      context.emitter.trigger('eventClick', {\n        el: segEl,\n        event: new EventApi(\n          component.context,\n          seg.eventRange.def,\n          seg.eventRange.instance,\n        ),\n        jsEvent: ev as MouseEvent, // Is this always a mouse event? See #4655\n        view: context.viewApi,\n      } as EventClickArg)\n\n      if (url && !ev.defaultPrevented) {\n        window.location.href = url\n      }\n    }\n  }\n}\n","import { listenToHoverBySelector } from '../util/dom-event'\nimport { EventApi } from '../api/EventApi'\nimport { getElSeg } from '../component/event-rendering'\nimport { Interaction, InteractionSettings } from './interaction'\nimport { ViewApi } from '../ViewApi'\n\nexport interface EventHoveringArg {\n  el: HTMLElement\n  event: EventApi\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\n/*\nTriggers events and adds/removes core classNames when the user's pointer\nenters/leaves event-elements of a component.\n*/\nexport class EventHovering extends Interaction {\n  removeHoverListeners: () => void\n\n  currentSegEl: HTMLElement\n\n  constructor(settings: InteractionSettings) {\n    super(settings)\n\n    this.removeHoverListeners = listenToHoverBySelector(\n      settings.el,\n      '.fc-event', // on both fg and bg events\n      this.handleSegEnter,\n      this.handleSegLeave,\n    )\n  }\n\n  destroy() {\n    this.removeHoverListeners()\n  }\n\n  // for simulating an eventMouseLeave when the event el is destroyed while mouse is over it\n  handleEventElRemove = (el: HTMLElement) => {\n    if (el === this.currentSegEl) {\n      this.handleSegLeave(null, this.currentSegEl)\n    }\n  }\n\n  handleSegEnter = (ev: Event, segEl: HTMLElement) => {\n    if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper\n      this.currentSegEl = segEl\n      this.triggerEvent('eventMouseEnter', ev, segEl)\n    }\n  }\n\n  handleSegLeave = (ev: Event | null, segEl: HTMLElement) => {\n    if (this.currentSegEl) {\n      this.currentSegEl = null\n      this.triggerEvent('eventMouseLeave', ev, segEl)\n    }\n  }\n\n  triggerEvent(publicEvName: 'eventMouseEnter' | 'eventMouseLeave', ev: Event | null, segEl: HTMLElement) {\n    let { component } = this\n    let { context } = component\n    let seg = getElSeg(segEl)!\n\n    if (!ev || component.isValidSegDownEl(ev.target as HTMLElement)) {\n      context.emitter.trigger(publicEvName, {\n        el: segEl,\n        event: new EventApi(\n          context,\n          seg.eventRange.def,\n          seg.eventRange.instance,\n        ),\n        jsEvent: ev as MouseEvent, // Is this always a mouse event? See #4655\n        view: context.viewApi,\n      } as EventHoveringArg)\n    }\n  }\n}\n","import { __assign } from 'tslib'\nimport { ViewContextType, buildViewContext } from './ViewContext'\nimport { ViewSpec } from './structs/view-spec'\nimport { ViewProps } from './View'\nimport { Toolbar } from './Toolbar'\nimport { DateProfileGenerator, DateProfile } from './DateProfileGenerator'\nimport { rangeContainsMarker } from './datelib/date-range'\nimport { memoize } from './util/memoize'\nimport { DateMarker } from './datelib/marker'\nimport { CalendarData } from './reducers/data-types'\nimport { ViewPropsTransformerClass } from './plugin-system-struct'\nimport { createElement, createRef, Fragment, VNode } from './vdom'\nimport { ViewContainer } from './ViewContainer'\nimport {\n  Interaction,\n  InteractionSettingsInput,\n  InteractionClass,\n  parseInteractionSettings,\n  interactionSettingsStore,\n} from './interactions/interaction'\nimport { DateComponent } from './component/DateComponent'\nimport { EventClicking } from './interactions/EventClicking'\nimport { EventHovering } from './interactions/EventHovering'\nimport { getNow } from './reducers/current-date'\nimport { CalendarInteraction } from './calendar-utils'\nimport { DelayedRunner } from './util/DelayedRunner'\nimport { PureComponent } from './vdom-util'\nimport { getUniqueDomId } from './util/dom-manip'\n\nexport interface CalendarContentProps extends CalendarData {\n  forPrint: boolean\n  isHeightAuto: boolean\n}\n\nexport class CalendarContent extends PureComponent<CalendarContentProps> {\n  private buildViewContext = memoize(buildViewContext)\n  private buildViewPropTransformers = memoize(buildViewPropTransformers)\n  private buildToolbarProps = memoize(buildToolbarProps)\n  private headerRef = createRef<Toolbar>()\n  private footerRef = createRef<Toolbar>()\n  private interactionsStore: { [componentUid: string]: Interaction[] } = {}\n  private calendarInteractions: CalendarInteraction[]\n\n  // eslint-disable-next-line\n  state = {\n    viewLabelId: getUniqueDomId(),\n  }\n\n  /*\n  renders INSIDE of an outer div\n  */\n  render() {\n    let { props } = this\n    let { toolbarConfig, options } = props\n\n    let toolbarProps = this.buildToolbarProps(\n      props.viewSpec,\n      props.dateProfile,\n      props.dateProfileGenerator,\n      props.currentDate,\n      getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????\n      props.viewTitle,\n    )\n\n    let viewVGrow = false\n    let viewHeight: string | number = ''\n    let viewAspectRatio: number | undefined\n\n    if (props.isHeightAuto || props.forPrint) {\n      viewHeight = ''\n    } else if (options.height != null) {\n      viewVGrow = true\n    } else if (options.contentHeight != null) {\n      viewHeight = options.contentHeight\n    } else {\n      viewAspectRatio = Math.max(options.aspectRatio, 0.5) // prevent from getting too tall\n    }\n\n    let viewContext = this.buildViewContext(\n      props.viewSpec,\n      props.viewApi,\n      props.options,\n      props.dateProfileGenerator,\n      props.dateEnv,\n      props.theme,\n      props.pluginHooks,\n      props.dispatch,\n      props.getCurrentData,\n      props.emitter,\n      props.calendarApi,\n      this.registerInteractiveComponent,\n      this.unregisterInteractiveComponent,\n    )\n\n    let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)\n      ? this.state.viewLabelId\n      : ''\n\n    return (\n      <ViewContextType.Provider value={viewContext}>\n        {toolbarConfig.header && (\n          <Toolbar\n            ref={this.headerRef}\n            extraClassName=\"fc-header-toolbar\"\n            model={toolbarConfig.header}\n            titleId={viewLabelId}\n            {...toolbarProps}\n          />\n        )}\n        <ViewContainer\n          liquid={viewVGrow}\n          height={viewHeight}\n          aspectRatio={viewAspectRatio}\n          labeledById={viewLabelId}\n        >\n          {this.renderView(props)}\n          {this.buildAppendContent()}\n        </ViewContainer>\n        {toolbarConfig.footer && (\n          <Toolbar\n            ref={this.footerRef}\n            extraClassName=\"fc-footer-toolbar\"\n            model={toolbarConfig.footer}\n            titleId=\"\"\n            {...toolbarProps}\n          />\n        )}\n      </ViewContextType.Provider>\n    )\n  }\n\n  componentDidMount() {\n    let { props } = this\n\n    this.calendarInteractions = props.pluginHooks.calendarInteractions\n      .map((CalendarInteractionClass) => new CalendarInteractionClass(props))\n\n    window.addEventListener('resize', this.handleWindowResize)\n\n    let { propSetHandlers } = props.pluginHooks\n    for (let propName in propSetHandlers) {\n      propSetHandlers[propName](props[propName], props)\n    }\n  }\n\n  componentDidUpdate(prevProps: CalendarContentProps) {\n    let { props } = this\n\n    let { propSetHandlers } = props.pluginHooks\n    for (let propName in propSetHandlers) {\n      if (props[propName] !== prevProps[propName]) {\n        propSetHandlers[propName](props[propName], props)\n      }\n    }\n  }\n\n  componentWillUnmount() {\n    window.removeEventListener('resize', this.handleWindowResize)\n    this.resizeRunner.clear()\n\n    for (let interaction of this.calendarInteractions) {\n      interaction.destroy()\n    }\n\n    this.props.emitter.trigger('_unmount')\n  }\n\n  buildAppendContent(): VNode {\n    let { props } = this\n\n    let children = props.pluginHooks.viewContainerAppends.map(\n      (buildAppendContent) => buildAppendContent(props),\n    )\n\n    return createElement(Fragment, {}, ...children)\n  }\n\n  renderView(props: CalendarContentProps) {\n    let { pluginHooks } = props\n    let { viewSpec } = props\n\n    let viewProps: ViewProps = {\n      dateProfile: props.dateProfile,\n      businessHours: props.businessHours,\n      eventStore: props.renderableEventStore, // !\n      eventUiBases: props.eventUiBases,\n      dateSelection: props.dateSelection,\n      eventSelection: props.eventSelection,\n      eventDrag: props.eventDrag,\n      eventResize: props.eventResize,\n      isHeightAuto: props.isHeightAuto,\n      forPrint: props.forPrint,\n    }\n\n    let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers)\n\n    for (let transformer of transformers) {\n      __assign(\n        viewProps,\n        transformer.transform(viewProps, props),\n      )\n    }\n\n    let ViewComponent = viewSpec.component\n\n    return (\n      <ViewComponent {...viewProps} />\n    )\n  }\n\n  // Component Registration\n  // -----------------------------------------------------------------------------------------------------------------\n\n  registerInteractiveComponent = (component: DateComponent<any>, settingsInput: InteractionSettingsInput) => {\n    let settings = parseInteractionSettings(component, settingsInput)\n    let DEFAULT_INTERACTIONS: InteractionClass[] = [\n      EventClicking,\n      EventHovering,\n    ]\n    let interactionClasses: InteractionClass[] = DEFAULT_INTERACTIONS.concat(\n      this.props.pluginHooks.componentInteractions,\n    )\n    let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings))\n\n    this.interactionsStore[component.uid] = interactions\n    interactionSettingsStore[component.uid] = settings\n  }\n\n  unregisterInteractiveComponent = (component: DateComponent<any>) => {\n    let listeners = this.interactionsStore[component.uid]\n\n    if (listeners) {\n      for (let listener of listeners) {\n        listener.destroy()\n      }\n      delete this.interactionsStore[component.uid]\n    }\n\n    delete interactionSettingsStore[component.uid]\n  }\n\n  // Resizing\n  // -----------------------------------------------------------------------------------------------------------------\n\n  resizeRunner = new DelayedRunner(() => {\n    this.props.emitter.trigger('_resize', true) // should window resizes be considered \"forced\" ?\n    this.props.emitter.trigger('windowResize', { view: this.props.viewApi })\n  })\n\n  handleWindowResize = (ev: UIEvent) => {\n    let { options } = this.props\n\n    if (\n      options.handleWindowResize &&\n      ev.target === window // avoid jqui events\n    ) {\n      this.resizeRunner.request(options.windowResizeDelay)\n    }\n  }\n}\n\nfunction buildToolbarProps(\n  viewSpec: ViewSpec,\n  dateProfile: DateProfile,\n  dateProfileGenerator: DateProfileGenerator,\n  currentDate: DateMarker,\n  now: DateMarker,\n  title: string,\n) {\n  // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid\n  let todayInfo = dateProfileGenerator.build(now, undefined, false) // TODO: need `undefined` or else INFINITE LOOP for some reason\n  let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false)\n  let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false)\n\n  return {\n    title,\n    activeButton: viewSpec.type,\n    navUnit: viewSpec.singleUnit,\n    isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),\n    isPrevEnabled: prevInfo.isValid,\n    isNextEnabled: nextInfo.isValid,\n  }\n}\n\n// Plugin\n// -----------------------------------------------------------------------------------------------------------------\n\nfunction buildViewPropTransformers(theClasses: ViewPropsTransformerClass[]) {\n  return theClasses.map((TheClass) => new TheClass())\n}\n","import { ComponentChildren } from './vdom'\nimport { BaseComponent } from './vdom-util'\nimport { CssDimValue } from './scrollgrid/util'\nimport { CalendarOptions, CalendarListeners } from './options'\nimport { Theme } from './theme/Theme'\nimport { getCanVGrowWithinCell } from './util/table-styling'\nimport { Emitter } from './common/Emitter'\n\nexport interface CalendarRootProps {\n  options: CalendarOptions\n  theme: Theme\n  emitter: Emitter<CalendarListeners>\n  children: (classNames: string[], height: CssDimValue, isHeightAuto: boolean, forPrint: boolean) => ComponentChildren\n}\n\ninterface CalendarRootState {\n  forPrint: boolean\n}\n\nexport class CalendarRoot extends BaseComponent<CalendarRootProps, CalendarRootState> {\n  state = {\n    forPrint: false,\n  }\n\n  render() {\n    let { props } = this\n    let { options } = props\n    let { forPrint } = this.state\n\n    let isHeightAuto = forPrint || options.height === 'auto' || options.contentHeight === 'auto'\n    let height = (!isHeightAuto && options.height != null) ? options.height : ''\n\n    let classNames: string[] = [\n      'fc',\n      forPrint ? 'fc-media-print' : 'fc-media-screen',\n      `fc-direction-${options.direction}`,\n      props.theme.getClass('root'),\n    ]\n\n    if (!getCanVGrowWithinCell()) {\n      classNames.push('fc-liquid-hack')\n    }\n\n    return props.children(classNames, height, isHeightAuto, forPrint)\n  }\n\n  componentDidMount() {\n    let { emitter } = this.props\n    emitter.on('_beforeprint', this.handleBeforePrint)\n    emitter.on('_afterprint', this.handleAfterPrint)\n  }\n\n  componentWillUnmount() {\n    let { emitter } = this.props\n    emitter.off('_beforeprint', this.handleBeforePrint)\n    emitter.off('_afterprint', this.handleAfterPrint)\n  }\n\n  handleBeforePrint = () => {\n    this.setState({ forPrint: true })\n  }\n\n  handleAfterPrint = () => {\n    this.setState({ forPrint: false })\n  }\n}\n","import { createFormatter } from '../datelib/formatting'\n\n// Computes a default column header formatting string if `colFormat` is not explicitly defined\nexport function computeFallbackHeaderFormat(datesRepDistinctDays: boolean, dayCnt: number) {\n  // if more than one week row, or if there are a lot of columns with not much space,\n  // put just the day numbers will be in each cell\n  if (!datesRepDistinctDays || dayCnt > 10) {\n    return createFormatter({ weekday: 'short' }) // \"Sat\"\n  }\n\n  if (dayCnt > 1) {\n    return createFormatter({ weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }) // \"Sat 11/12\"\n  }\n\n  return createFormatter({ weekday: 'long' }) // \"Saturday\"\n}\n","import { DayHeaderContentArg } from '../render-hook-misc'\n\nexport const CLASS_NAME = 'fc-col-header-cell' // do the cushion too? no\n\nexport function renderInner(hookProps: DayHeaderContentArg) {\n  return hookProps.text\n}\n","import { DateRange } from '../datelib/date-range'\nimport { getDayClassNames, getDateMeta } from '../component/date-rendering'\nimport { DateMarker } from '../datelib/marker'\nimport { createElement } from '../vdom'\nimport { DateFormatter } from '../datelib/DateFormatter'\nimport { formatDayString } from '../datelib/formatting-utils'\nimport { BaseComponent } from '../vdom-util'\nimport { RenderHook } from './render-hook'\nimport { buildNavLinkAttrs } from './nav-link'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { DayHeaderContentArg } from '../render-hook-misc'\nimport { Dictionary } from '../options'\nimport { CLASS_NAME, renderInner } from './table-cell-util'\n\nexport interface TableDateCellProps {\n  date: DateMarker\n  dateProfile: DateProfile\n  todayRange: DateRange\n  colCnt: number\n  dayHeaderFormat: DateFormatter\n  colSpan?: number\n  isSticky?: boolean // TODO: get this outta here somehow\n  extraDataAttrs?: Dictionary\n  extraHookProps?: Dictionary\n}\n\nexport class TableDateCell extends BaseComponent<TableDateCellProps> { // BAD name for this class now. used in the Header\n  render() {\n    let { dateEnv, options, theme, viewApi } = this.context\n    let { props } = this\n    let { date, dateProfile } = props\n    let dayMeta = getDateMeta(date, props.todayRange, null, dateProfile)\n\n    let classNames = [CLASS_NAME].concat(\n      getDayClassNames(dayMeta, theme),\n    )\n    let text = dateEnv.format(date, props.dayHeaderFormat)\n\n    // if colCnt is 1, we are already in a day-view and don't need a navlink\n    let navLinkAttrs = (!dayMeta.isDisabled && props.colCnt > 1)\n      ? buildNavLinkAttrs(this.context, date)\n      : {}\n\n    let hookProps: DayHeaderContentArg = {\n      date: dateEnv.toDate(date),\n      view: viewApi,\n      ...props.extraHookProps,\n      text,\n      ...dayMeta,\n    }\n\n    return (\n      <RenderHook\n        hookProps={hookProps}\n        classNames={options.dayHeaderClassNames}\n        content={options.dayHeaderContent}\n        defaultContent={renderInner}\n        didMount={options.dayHeaderDidMount}\n        willUnmount={options.dayHeaderWillUnmount}\n      >\n        {(rootElRef, customClassNames, innerElRef, innerContent) => (\n          <th\n            ref={rootElRef}\n            role=\"columnheader\"\n            className={classNames.concat(customClassNames).join(' ')}\n            data-date={!dayMeta.isDisabled ? formatDayString(date) : undefined}\n            colSpan={props.colSpan}\n            {...props.extraDataAttrs}\n          >\n            <div className=\"fc-scrollgrid-sync-inner\">\n              {!dayMeta.isDisabled && (\n                <a\n                  ref={innerElRef}\n                  className={[\n                    'fc-col-header-cell-cushion',\n                    props.isSticky ? 'fc-sticky' : '',\n                  ].join(' ')}\n                  {...navLinkAttrs}\n                >\n                  {innerContent}\n                </a>\n              )}\n            </div>\n          </th>\n        )}\n      </RenderHook>\n    )\n  }\n}\n","import { getDayClassNames, DateMeta } from '../component/date-rendering'\nimport { addDays } from '../datelib/marker'\nimport { createElement } from '../vdom'\nimport { DateFormatter } from '../datelib/DateFormatter'\nimport { BaseComponent } from '../vdom-util'\nimport { RenderHook } from './render-hook'\nimport { Dictionary } from '../options'\nimport { CLASS_NAME, renderInner } from './table-cell-util'\nimport { DayHeaderContentArg } from '../render-hook-misc'\nimport { createFormatter } from '../datelib/formatting'\n\nexport interface TableDowCellProps {\n  dow: number\n  dayHeaderFormat: DateFormatter\n  colSpan?: number\n  isSticky?: boolean // TODO: get this outta here somehow\n  extraHookProps?: Dictionary\n  extraDataAttrs?: Dictionary\n  extraClassNames?: string[]\n}\n\nconst WEEKDAY_FORMAT = createFormatter({ weekday: 'long' })\n\nexport class TableDowCell extends BaseComponent<TableDowCellProps> {\n  render() {\n    let { props } = this\n    let { dateEnv, theme, viewApi, options } = this.context\n    let date = addDays(new Date(259200000), props.dow) // start with Sun, 04 Jan 1970 00:00:00 GMT\n    let dateMeta: DateMeta = {\n      dow: props.dow,\n      isDisabled: false,\n      isFuture: false,\n      isPast: false,\n      isToday: false,\n      isOther: false,\n    }\n    let classNames = [CLASS_NAME].concat(\n      getDayClassNames(dateMeta, theme),\n      props.extraClassNames || [],\n    )\n    let text = dateEnv.format(date, props.dayHeaderFormat)\n    let hookProps: DayHeaderContentArg = { // TODO: make this public?\n      date,\n      ...dateMeta,\n      view: viewApi,\n      ...props.extraHookProps,\n      text,\n    }\n\n    return (\n      <RenderHook\n        hookProps={hookProps}\n        classNames={options.dayHeaderClassNames}\n        content={options.dayHeaderContent}\n        defaultContent={renderInner}\n        didMount={options.dayHeaderDidMount}\n        willUnmount={options.dayHeaderWillUnmount}\n      >\n        {(rootElRef, customClassNames, innerElRef, innerContent) => (\n          <th\n            ref={rootElRef}\n            role=\"columnheader\"\n            className={classNames.concat(customClassNames).join(' ')}\n            colSpan={props.colSpan}\n            {...props.extraDataAttrs}\n          >\n            <div className=\"fc-scrollgrid-sync-inner\">\n              <a\n                aria-label={dateEnv.format(date, WEEKDAY_FORMAT)}\n                className={[\n                  'fc-col-header-cell-cushion',\n                  props.isSticky ? 'fc-sticky' : '',\n                ].join(' ')}\n                ref={innerElRef}\n              >\n                {innerContent}\n              </a>\n            </div>\n          </th>\n        )}\n      </RenderHook>\n    )\n  }\n}\n","import { DateMarker, addMs, startOfDay, addDays } from './datelib/marker'\nimport { createDuration } from './datelib/duration'\nimport { ViewContext, ViewContextType } from './ViewContext'\nimport { ComponentChildren, Component } from './vdom'\nimport { DateRange } from './datelib/date-range'\nimport { getNow } from './reducers/current-date'\n\nexport interface NowTimerProps {\n  unit: string // TODO: add type of unit\n  children: (now: DateMarker, todayRange: DateRange) => ComponentChildren\n}\n\ninterface NowTimerState {\n  nowDate: DateMarker\n  todayRange: DateRange\n}\n\nexport class NowTimer extends Component<NowTimerProps, NowTimerState> {\n  static contextType: any = ViewContextType\n  context: ViewContext // do this for all components that use the context!!!\n  initialNowDate: DateMarker\n  initialNowQueriedMs: number\n  timeoutId: any\n\n  constructor(props: NowTimerProps, context: ViewContext) {\n    super(props, context)\n\n    this.initialNowDate = getNow(context.options.now, context.dateEnv)\n    this.initialNowQueriedMs = new Date().valueOf()\n\n    this.state = this.computeTiming().currentState\n  }\n\n  render() {\n    let { props, state } = this\n    return props.children(state.nowDate, state.todayRange)\n  }\n\n  componentDidMount() {\n    this.setTimeout()\n  }\n\n  componentDidUpdate(prevProps: NowTimerProps) {\n    if (prevProps.unit !== this.props.unit) {\n      this.clearTimeout()\n      this.setTimeout()\n    }\n  }\n\n  componentWillUnmount() {\n    this.clearTimeout()\n  }\n\n  private computeTiming() {\n    let { props, context } = this\n    let unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs)\n    let currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit)\n    let nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit))\n    let waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf()\n\n    // there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342)\n    // ensure no longer than a day\n    waitMs = Math.min(1000 * 60 * 60 * 24, waitMs)\n\n    return {\n      currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) } as NowTimerState,\n      nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) } as NowTimerState,\n      waitMs,\n    }\n  }\n\n  private setTimeout() {\n    let { nextState, waitMs } = this.computeTiming()\n\n    this.timeoutId = setTimeout(() => {\n      this.setState(nextState, () => {\n        this.setTimeout()\n      })\n    }, waitMs)\n  }\n\n  private clearTimeout() {\n    if (this.timeoutId) {\n      clearTimeout(this.timeoutId)\n    }\n  }\n}\n\nfunction buildDayRange(date: DateMarker): DateRange { // TODO: make this a general util\n  let start = startOfDay(date)\n  let end = addDays(start, 1)\n\n  return { start, end }\n}\n","import { BaseComponent } from '../vdom-util'\nimport { DateMarker } from '../datelib/marker'\nimport { computeFallbackHeaderFormat } from './table-utils'\nimport { VNode, createElement } from '../vdom'\nimport { TableDateCell } from './TableDateCell'\nimport { TableDowCell } from './TableDowCell'\nimport { NowTimer } from '../NowTimer'\nimport { DateRange } from '../datelib/date-range'\nimport { memoize } from '../util/memoize'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { DateFormatter } from '../datelib/DateFormatter'\n\nexport interface DayHeaderProps {\n  dateProfile: DateProfile\n  dates: DateMarker[]\n  datesRepDistinctDays: boolean\n  renderIntro?: (rowKey: string) => VNode\n}\n\nexport class DayHeader extends BaseComponent<DayHeaderProps> { // TODO: rename to DayHeaderTr?\n  createDayHeaderFormatter = memoize(createDayHeaderFormatter)\n\n  render() {\n    let { context } = this\n    let { dates, dateProfile, datesRepDistinctDays, renderIntro } = this.props\n\n    let dayHeaderFormat = this.createDayHeaderFormatter(\n      context.options.dayHeaderFormat,\n      datesRepDistinctDays,\n      dates.length,\n    )\n\n    return (\n      <NowTimer unit=\"day\">\n        {(nowDate: DateMarker, todayRange: DateRange) => (\n          <tr role=\"row\">\n            {renderIntro && renderIntro('day')}\n            {dates.map((date) => (\n              datesRepDistinctDays ? (\n                <TableDateCell\n                  key={date.toISOString()}\n                  date={date}\n                  dateProfile={dateProfile}\n                  todayRange={todayRange}\n                  colCnt={dates.length}\n                  dayHeaderFormat={dayHeaderFormat}\n                />\n              ) : (\n                <TableDowCell\n                  key={date.getUTCDay()}\n                  dow={date.getUTCDay()}\n                  dayHeaderFormat={dayHeaderFormat}\n                />\n              )\n            ))}\n          </tr>\n        )}\n      </NowTimer>\n    )\n  }\n}\n\nfunction createDayHeaderFormatter(explicitFormat: DateFormatter, datesRepDistinctDays, dateCnt) {\n  return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt)\n}\n","import { DateProfileGenerator } from '../DateProfileGenerator'\nimport { DateMarker, addDays, diffDays } from '../datelib/marker'\nimport { DateRange } from '../datelib/date-range'\n\nexport interface DaySeriesSeg {\n  firstIndex: number\n  lastIndex: number\n  isStart: boolean\n  isEnd: boolean\n}\n\nexport class DaySeriesModel {\n  cnt: number\n  dates: DateMarker[] // whole-day dates for each column. left to right\n  indices: number[] // for each day from start, the offset\n\n  constructor(range: DateRange, dateProfileGenerator: DateProfileGenerator) {\n    let date: DateMarker = range.start\n    let { end } = range\n    let indices: number[] = []\n    let dates: DateMarker[] = []\n    let dayIndex = -1\n\n    while (date < end) { // loop each day from start to end\n      if (dateProfileGenerator.isHiddenDay(date)) {\n        indices.push(dayIndex + 0.5) // mark that it's between indices\n      } else {\n        dayIndex += 1\n        indices.push(dayIndex)\n        dates.push(date)\n      }\n      date = addDays(date, 1)\n    }\n\n    this.dates = dates\n    this.indices = indices\n    this.cnt = dates.length\n  }\n\n  sliceRange(range: DateRange): DaySeriesSeg | null {\n    let firstIndex = this.getDateDayIndex(range.start) // inclusive first index\n    let lastIndex = this.getDateDayIndex(addDays(range.end, -1)) // inclusive last index\n\n    let clippedFirstIndex = Math.max(0, firstIndex)\n    let clippedLastIndex = Math.min(this.cnt - 1, lastIndex)\n\n    // deal with in-between indices\n    clippedFirstIndex = Math.ceil(clippedFirstIndex) // in-between starts round to next cell\n    clippedLastIndex = Math.floor(clippedLastIndex) // in-between ends round to prev cell\n\n    if (clippedFirstIndex <= clippedLastIndex) {\n      return {\n        firstIndex: clippedFirstIndex,\n        lastIndex: clippedLastIndex,\n        isStart: firstIndex === clippedFirstIndex,\n        isEnd: lastIndex === clippedLastIndex,\n      }\n    }\n    return null\n  }\n\n  // Given a date, returns its chronolocial cell-index from the first cell of the grid.\n  // If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.\n  // If before the first offset, returns a negative number.\n  // If after the last offset, returns an offset past the last cell offset.\n  // Only works for *start* dates of cells. Will not work for exclusive end dates for cells.\n  private getDateDayIndex(date: DateMarker) {\n    let { indices } = this\n    let dayOffset = Math.floor(diffDays(this.dates[0], date))\n\n    if (dayOffset < 0) {\n      return indices[0] - 1\n    }\n\n    if (dayOffset >= indices.length) {\n      return indices[indices.length - 1] + 1\n    }\n\n    return indices[dayOffset]\n  }\n}\n","import { DaySeriesModel } from './DaySeriesModel'\nimport { DateRange } from '../datelib/date-range'\nimport { DateMarker } from '../datelib/marker'\nimport { Seg } from '../component/DateComponent'\nimport { Dictionary } from '../options'\n\nexport interface DayTableSeg extends Seg {\n  row: number\n  firstCol: number\n  lastCol: number\n}\n\nexport interface DayTableCell {\n  key: string // probably just the serialized date, but could be other metadata if this col is specific to another entity\n  date: DateMarker\n  extraHookProps?: Dictionary\n  extraDataAttrs?: Dictionary\n  extraClassNames?: string[]\n  extraDateSpan?: Dictionary\n}\n\nexport class DayTableModel {\n  rowCnt: number\n  colCnt: number\n  cells: DayTableCell[][]\n  headerDates: DateMarker[]\n\n  private daySeries: DaySeriesModel\n\n  constructor(daySeries: DaySeriesModel, breakOnWeeks: boolean) {\n    let { dates } = daySeries\n    let daysPerRow\n    let firstDay\n    let rowCnt\n\n    if (breakOnWeeks) {\n      // count columns until the day-of-week repeats\n      firstDay = dates[0].getUTCDay()\n      for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) {\n        if (dates[daysPerRow].getUTCDay() === firstDay) {\n          break\n        }\n      }\n      rowCnt = Math.ceil(dates.length / daysPerRow)\n    } else {\n      rowCnt = 1\n      daysPerRow = dates.length\n    }\n\n    this.rowCnt = rowCnt\n    this.colCnt = daysPerRow\n    this.daySeries = daySeries\n    this.cells = this.buildCells()\n    this.headerDates = this.buildHeaderDates()\n  }\n\n  private buildCells() {\n    let rows = []\n\n    for (let row = 0; row < this.rowCnt; row += 1) {\n      let cells = []\n\n      for (let col = 0; col < this.colCnt; col += 1) {\n        cells.push(\n          this.buildCell(row, col),\n        )\n      }\n\n      rows.push(cells)\n    }\n\n    return rows\n  }\n\n  private buildCell(row, col): DayTableCell {\n    let date = this.daySeries.dates[row * this.colCnt + col]\n    return {\n      key: date.toISOString(),\n      date,\n    }\n  }\n\n  private buildHeaderDates() {\n    let dates = []\n\n    for (let col = 0; col < this.colCnt; col += 1) {\n      dates.push(this.cells[0][col].date)\n    }\n\n    return dates\n  }\n\n  sliceRange(range: DateRange): DayTableSeg[] {\n    let { colCnt } = this\n    let seriesSeg = this.daySeries.sliceRange(range)\n    let segs: DayTableSeg[] = []\n\n    if (seriesSeg) {\n      let { firstIndex, lastIndex } = seriesSeg\n      let index = firstIndex\n\n      while (index <= lastIndex) {\n        let row = Math.floor(index / colCnt)\n        let nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1)\n\n        segs.push({\n          row,\n          firstCol: index % colCnt,\n          lastCol: (nextIndex - 1) % colCnt,\n          isStart: seriesSeg.isStart && index === firstIndex,\n          isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex,\n        })\n\n        index = nextIndex\n      }\n    }\n\n    return segs\n  }\n}\n","import { DateRange } from '../datelib/date-range'\nimport { EventStore } from '../structs/event-store'\nimport { EventUiHash } from '../component/event-ui'\nimport { sliceEventStore, EventRenderRange } from '../component/event-rendering'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { Seg, EventSegUiInteractionState } from '../component/DateComponent' // TODO: rename EventSegUiInteractionState, move here\nimport { DateSpan, fabricateEventRange } from '../structs/date-span'\nimport { EventInteractionState } from '../interactions/event-interaction-state'\nimport { Duration } from '../datelib/duration'\nimport { memoize } from '../util/memoize'\nimport { DateMarker, addMs, addDays } from '../datelib/marker'\nimport { CalendarContext } from '../CalendarContext'\nimport { expandRecurring } from '../structs/recurring-event'\n\nexport interface SliceableProps {\n  dateSelection: DateSpan\n  businessHours: EventStore\n  eventStore: EventStore\n  eventDrag: EventInteractionState | null\n  eventResize: EventInteractionState | null\n  eventSelection: string\n  eventUiBases: EventUiHash\n}\n\nexport interface SlicedProps<SegType extends Seg> {\n  dateSelectionSegs: SegType[]\n  businessHourSegs: SegType[]\n  fgEventSegs: SegType[]\n  bgEventSegs: SegType[]\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n  eventSelection: string\n}\n\nexport abstract class Slicer<SegType extends Seg, ExtraArgs extends any[] = []> {\n  private sliceBusinessHours = memoize(this._sliceBusinessHours)\n  private sliceDateSelection = memoize(this._sliceDateSpan)\n  private sliceEventStore = memoize(this._sliceEventStore)\n  private sliceEventDrag = memoize(this._sliceInteraction)\n  private sliceEventResize = memoize(this._sliceInteraction)\n\n  abstract sliceRange(dateRange: DateRange, ...extraArgs: ExtraArgs): SegType[]\n  protected forceDayIfListItem = false // hack\n\n  sliceProps(\n    props: SliceableProps,\n    dateProfile: DateProfile,\n    nextDayThreshold: Duration | null,\n    context: CalendarContext,\n    ...extraArgs: ExtraArgs\n  ): SlicedProps<SegType> {\n    let { eventUiBases } = props\n    let eventSegs = this.sliceEventStore(props.eventStore, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs)\n\n    return {\n      dateSelectionSegs: this.sliceDateSelection(props.dateSelection, eventUiBases, context, ...extraArgs),\n      businessHourSegs: this.sliceBusinessHours(props.businessHours, dateProfile, nextDayThreshold, context, ...extraArgs),\n      fgEventSegs: eventSegs.fg,\n      bgEventSegs: eventSegs.bg,\n      eventDrag: this.sliceEventDrag(props.eventDrag, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs),\n      eventResize: this.sliceEventResize(props.eventResize, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs),\n      eventSelection: props.eventSelection,\n    } // TODO: give interactionSegs?\n  }\n\n  sliceNowDate( // does not memoize\n    date: DateMarker,\n    context: CalendarContext,\n    ...extraArgs: ExtraArgs\n  ): SegType[] {\n    return this._sliceDateSpan(\n      { range: { start: date, end: addMs(date, 1) }, allDay: false }, // add 1 ms, protect against null range\n      {},\n      context,\n      ...extraArgs,\n    )\n  }\n\n  private _sliceBusinessHours(\n    businessHours: EventStore,\n    dateProfile: DateProfile,\n    nextDayThreshold: Duration | null,\n    context: CalendarContext,\n    ...extraArgs: ExtraArgs\n  ): SegType[] {\n    if (!businessHours) {\n      return []\n    }\n\n    return this._sliceEventStore(\n      expandRecurring(\n        businessHours,\n        computeActiveRange(dateProfile, Boolean(nextDayThreshold)),\n        context,\n      ),\n      {},\n      dateProfile,\n      nextDayThreshold,\n      ...extraArgs,\n    ).bg\n  }\n\n  private _sliceEventStore(\n    eventStore: EventStore,\n    eventUiBases: EventUiHash,\n    dateProfile: DateProfile,\n    nextDayThreshold: Duration | null,\n    ...extraArgs: ExtraArgs\n  ): { bg: SegType[], fg: SegType[] } {\n    if (eventStore) {\n      let rangeRes = sliceEventStore(\n        eventStore,\n        eventUiBases,\n        computeActiveRange(dateProfile, Boolean(nextDayThreshold)),\n        nextDayThreshold,\n      )\n\n      return {\n        bg: this.sliceEventRanges(rangeRes.bg, extraArgs),\n        fg: this.sliceEventRanges(rangeRes.fg, extraArgs),\n      }\n    }\n    return { bg: [], fg: [] }\n  }\n\n  private _sliceInteraction(\n    interaction: EventInteractionState,\n    eventUiBases: EventUiHash,\n    dateProfile: DateProfile,\n    nextDayThreshold: Duration | null,\n    ...extraArgs: ExtraArgs\n  ): EventSegUiInteractionState {\n    if (!interaction) {\n      return null\n    }\n\n    let rangeRes = sliceEventStore(\n      interaction.mutatedEvents,\n      eventUiBases,\n      computeActiveRange(dateProfile, Boolean(nextDayThreshold)),\n      nextDayThreshold,\n    )\n\n    return {\n      segs: this.sliceEventRanges(rangeRes.fg, extraArgs),\n      affectedInstances: interaction.affectedEvents.instances,\n      isEvent: interaction.isEvent,\n    }\n  }\n\n  private _sliceDateSpan(\n    dateSpan: DateSpan,\n    eventUiBases: EventUiHash,\n    context: CalendarContext,\n    ...extraArgs: ExtraArgs\n  ): SegType[] {\n    if (!dateSpan) {\n      return []\n    }\n\n    let eventRange = fabricateEventRange(dateSpan, eventUiBases, context)\n    let segs = this.sliceRange(dateSpan.range, ...extraArgs)\n\n    for (let seg of segs) {\n      seg.eventRange = eventRange\n    }\n\n    return segs\n  }\n\n  /*\n  \"complete\" seg means it has component and eventRange\n  */\n  private sliceEventRanges(\n    eventRanges: EventRenderRange[],\n    extraArgs: ExtraArgs,\n  ): SegType[] {\n    let segs: SegType[] = []\n\n    for (let eventRange of eventRanges) {\n      segs.push(...this.sliceEventRange(eventRange, extraArgs))\n    }\n\n    return segs\n  }\n\n  /*\n  \"complete\" seg means it has component and eventRange\n  */\n  private sliceEventRange(\n    eventRange: EventRenderRange,\n    extraArgs: ExtraArgs,\n  ): SegType[] {\n    let dateRange = eventRange.range\n\n    // hack to make multi-day events that are being force-displayed as list-items to take up only one day\n    if (this.forceDayIfListItem && eventRange.ui.display === 'list-item') {\n      dateRange = {\n        start: dateRange.start,\n        end: addDays(dateRange.start, 1),\n      }\n    }\n\n    let segs = this.sliceRange(dateRange, ...extraArgs)\n\n    for (let seg of segs) {\n      seg.eventRange = eventRange\n      seg.isStart = eventRange.isStart && seg.isStart\n      seg.isEnd = eventRange.isEnd && seg.isEnd\n    }\n\n    return segs\n  }\n}\n\n/*\nfor incorporating slotMinTime/slotMaxTime if appropriate\nTODO: should be part of DateProfile!\nTimelineDateProfile already does this btw\n*/\nfunction computeActiveRange(dateProfile: DateProfile, isComponentAllDay: boolean): DateRange {\n  let range = dateProfile.activeRange\n\n  if (isComponentAllDay) {\n    return range\n  }\n\n  return {\n    start: addMs(range.start, dateProfile.slotMinTime.milliseconds),\n    end: addMs(range.end, dateProfile.slotMaxTime.milliseconds - 864e5), // 864e5 = ms in a day\n  }\n}\n","import { EventStore, filterEventStoreDefs } from './structs/event-store'\nimport { DateSpan } from './structs/date-span'\nimport { rangeContainsRange, rangesIntersect, DateRange, OpenDateRange } from './datelib/date-range'\nimport { EventApi } from './api/EventApi'\nimport { compileEventUis } from './component/event-rendering'\nimport { excludeInstances } from './reducers/eventStore'\nimport { EventInteractionState } from './interactions/event-interaction-state'\nimport { SplittableProps } from './component/event-splitting'\nimport { mapHash } from './util/object'\nimport { CalendarContext } from './CalendarContext'\nimport { buildDateSpanApiWithContext } from './calendar-utils'\nimport { Constraint } from './structs/constraint'\nimport { expandRecurring } from './structs/recurring-event'\nimport { DateProfile } from './DateProfileGenerator'\n\n// high-level segmenting-aware tester functions\n// ------------------------------------------------------------------------------------------------------------------------\n\nexport function isInteractionValid(\n  interaction: EventInteractionState,\n  dateProfile: DateProfile,\n  context: CalendarContext,\n) {\n  let { instances } = interaction.mutatedEvents\n  for (let instanceId in instances) {\n    if (!rangeContainsRange(dateProfile.validRange, instances[instanceId].range)) {\n      return false\n    }\n  }\n  return isNewPropsValid({ eventDrag: interaction }, context) // HACK: the eventDrag props is used for ALL interactions\n}\n\nexport function isDateSelectionValid(\n  dateSelection: DateSpan,\n  dateProfile: DateProfile,\n  context: CalendarContext,\n) {\n  if (!rangeContainsRange(dateProfile.validRange, dateSelection.range)) {\n    return false\n  }\n  return isNewPropsValid({ dateSelection }, context)\n}\n\nfunction isNewPropsValid(newProps, context: CalendarContext) {\n  let calendarState = context.getCurrentData()\n\n  let props = {\n    businessHours: calendarState.businessHours,\n    dateSelection: '',\n    eventStore: calendarState.eventStore,\n    eventUiBases: calendarState.eventUiBases,\n    eventSelection: '',\n    eventDrag: null,\n    eventResize: null,\n    ...newProps,\n  }\n\n  return (context.pluginHooks.isPropsValid || isPropsValid)(props, context)\n}\n\nexport function isPropsValid(state: SplittableProps, context: CalendarContext, dateSpanMeta = {}, filterConfig?): boolean {\n  if (state.eventDrag && !isInteractionPropsValid(state, context, dateSpanMeta, filterConfig)) {\n    return false\n  }\n\n  if (state.dateSelection && !isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig)) {\n    return false\n  }\n\n  return true\n}\n\n// Moving Event Validation\n// ------------------------------------------------------------------------------------------------------------------------\n\nfunction isInteractionPropsValid(state: SplittableProps, context: CalendarContext, dateSpanMeta: any, filterConfig): boolean {\n  let currentState = context.getCurrentData()\n  let interaction = state.eventDrag // HACK: the eventDrag props is used for ALL interactions\n\n  let subjectEventStore = interaction.mutatedEvents\n  let subjectDefs = subjectEventStore.defs\n  let subjectInstances = subjectEventStore.instances\n  let subjectConfigs = compileEventUis(\n    subjectDefs,\n    interaction.isEvent ?\n      state.eventUiBases :\n      { '': currentState.selectionConfig }, // if not a real event, validate as a selection\n  )\n\n  if (filterConfig) {\n    subjectConfigs = mapHash(subjectConfigs, filterConfig)\n  }\n\n  // exclude the subject events. TODO: exclude defs too?\n  let otherEventStore = excludeInstances(state.eventStore, interaction.affectedEvents.instances)\n\n  let otherDefs = otherEventStore.defs\n  let otherInstances = otherEventStore.instances\n  let otherConfigs = compileEventUis(otherDefs, state.eventUiBases)\n\n  for (let subjectInstanceId in subjectInstances) {\n    let subjectInstance = subjectInstances[subjectInstanceId]\n    let subjectRange = subjectInstance.range\n    let subjectConfig = subjectConfigs[subjectInstance.defId]\n    let subjectDef = subjectDefs[subjectInstance.defId]\n\n    // constraint\n    if (!allConstraintsPass(subjectConfig.constraints, subjectRange, otherEventStore, state.businessHours, context)) {\n      return false\n    }\n\n    // overlap\n\n    let { eventOverlap } = context.options\n    let eventOverlapFunc = typeof eventOverlap === 'function' ? eventOverlap : null\n\n    for (let otherInstanceId in otherInstances) {\n      let otherInstance = otherInstances[otherInstanceId]\n\n      // intersect! evaluate\n      if (rangesIntersect(subjectRange, otherInstance.range)) {\n        let otherOverlap = otherConfigs[otherInstance.defId].overlap\n\n        // consider the other event's overlap. only do this if the subject event is a \"real\" event\n        if (otherOverlap === false && interaction.isEvent) {\n          return false\n        }\n\n        if (subjectConfig.overlap === false) {\n          return false\n        }\n\n        if (eventOverlapFunc && !eventOverlapFunc(\n          new EventApi(context, otherDefs[otherInstance.defId], otherInstance), // still event\n          new EventApi(context, subjectDef, subjectInstance), // moving event\n        )) {\n          return false\n        }\n      }\n    }\n\n    // allow (a function)\n\n    let calendarEventStore = currentState.eventStore // need global-to-calendar, not local to component (splittable)state\n\n    for (let subjectAllow of subjectConfig.allows) {\n      let subjectDateSpan: DateSpan = {\n        ...dateSpanMeta,\n        range: subjectInstance.range,\n        allDay: subjectDef.allDay,\n      }\n\n      let origDef = calendarEventStore.defs[subjectDef.defId]\n      let origInstance = calendarEventStore.instances[subjectInstanceId]\n      let eventApi\n\n      if (origDef) { // was previously in the calendar\n        eventApi = new EventApi(context, origDef, origInstance)\n      } else { // was an external event\n        eventApi = new EventApi(context, subjectDef) // no instance, because had no dates\n      }\n\n      if (!subjectAllow(\n        buildDateSpanApiWithContext(subjectDateSpan, context),\n        eventApi,\n      )) {\n        return false\n      }\n    }\n  }\n\n  return true\n}\n\n// Date Selection Validation\n// ------------------------------------------------------------------------------------------------------------------------\n\nfunction isDateSelectionPropsValid(state: SplittableProps, context: CalendarContext, dateSpanMeta: any, filterConfig): boolean {\n  let relevantEventStore = state.eventStore\n  let relevantDefs = relevantEventStore.defs\n  let relevantInstances = relevantEventStore.instances\n\n  let selection = state.dateSelection\n  let selectionRange = selection.range\n  let { selectionConfig } = context.getCurrentData()\n\n  if (filterConfig) {\n    selectionConfig = filterConfig(selectionConfig)\n  }\n\n  // constraint\n  if (!allConstraintsPass(selectionConfig.constraints, selectionRange, relevantEventStore, state.businessHours, context)) {\n    return false\n  }\n\n  // overlap\n\n  let { selectOverlap } = context.options\n  let selectOverlapFunc = typeof selectOverlap === 'function' ? selectOverlap : null\n\n  for (let relevantInstanceId in relevantInstances) {\n    let relevantInstance = relevantInstances[relevantInstanceId]\n\n    // intersect! evaluate\n    if (rangesIntersect(selectionRange, relevantInstance.range)) {\n      if (selectionConfig.overlap === false) {\n        return false\n      }\n\n      if (selectOverlapFunc && !selectOverlapFunc(\n        new EventApi(context, relevantDefs[relevantInstance.defId], relevantInstance),\n        null,\n      )) {\n        return false\n      }\n    }\n  }\n\n  // allow (a function)\n  for (let selectionAllow of selectionConfig.allows) {\n    let fullDateSpan = { ...dateSpanMeta, ...selection }\n\n    if (!selectionAllow(\n      buildDateSpanApiWithContext(fullDateSpan, context),\n      null,\n    )) {\n      return false\n    }\n  }\n\n  return true\n}\n\n// Constraint Utils\n// ------------------------------------------------------------------------------------------------------------------------\n\nfunction allConstraintsPass(\n  constraints: Constraint[],\n  subjectRange: DateRange,\n  otherEventStore: EventStore,\n  businessHoursUnexpanded: EventStore,\n  context: CalendarContext,\n): boolean {\n  for (let constraint of constraints) {\n    if (!anyRangesContainRange(\n      constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context),\n      subjectRange,\n    )) {\n      return false\n    }\n  }\n\n  return true\n}\n\nfunction constraintToRanges(\n  constraint: Constraint,\n  subjectRange: DateRange, // for expanding a recurring constraint, or expanding business hours\n  otherEventStore: EventStore, // for if constraint is an even group ID\n  businessHoursUnexpanded: EventStore, // for if constraint is 'businessHours'\n  context: CalendarContext, // for expanding businesshours\n): OpenDateRange[] {\n  if (constraint === 'businessHours') {\n    return eventStoreToRanges(\n      expandRecurring(businessHoursUnexpanded, subjectRange, context),\n    )\n  }\n\n  if (typeof constraint === 'string') { // an group ID\n    return eventStoreToRanges(\n      filterEventStoreDefs(otherEventStore, (eventDef) => eventDef.groupId === constraint),\n    )\n  }\n\n  if (typeof constraint === 'object' && constraint) { // non-null object\n    return eventStoreToRanges(\n      expandRecurring(constraint, subjectRange, context),\n    )\n  }\n\n  return [] // if it's false\n}\n\n// TODO: move to event-store file?\nfunction eventStoreToRanges(eventStore: EventStore): DateRange[] {\n  let { instances } = eventStore\n  let ranges: DateRange[] = []\n\n  for (let instanceId in instances) {\n    ranges.push(instances[instanceId].range)\n  }\n\n  return ranges\n}\n\n// TODO: move to geom file?\nfunction anyRangesContainRange(outerRanges: DateRange[], innerRange: DateRange): boolean {\n  for (let outerRange of outerRanges) {\n    if (rangeContainsRange(outerRange, innerRange)) {\n      return true\n    }\n  }\n\n  return false\n}\n","import { createElement, ComponentChildren, Ref } from '../vdom'\nimport { BaseComponent, setRef } from '../vdom-util'\nimport { CssDimValue, ScrollerLike } from './util'\n\nexport type OverflowValue = 'auto' | 'hidden' | 'scroll' | 'visible'\n\nexport interface ScrollerProps {\n  overflowX: OverflowValue\n  overflowY: OverflowValue\n  overcomeLeft?: number\n  overcomeRight?: number\n  overcomeBottom?: number\n  maxHeight?: CssDimValue\n  liquid?: boolean\n  liquidIsAbsolute?: boolean\n  children?: ComponentChildren\n  elRef?: Ref<HTMLElement>\n}\n\nconst VISIBLE_HIDDEN_RE = /^(visible|hidden)$/\n\nexport class Scroller extends BaseComponent<ScrollerProps> implements ScrollerLike {\n  private el: HTMLElement // TODO: just use this.base?\n\n  render() {\n    let { props } = this\n    let { liquid, liquidIsAbsolute } = props\n    let isAbsolute = liquid && liquidIsAbsolute\n    let className = ['fc-scroller']\n\n    if (liquid) {\n      if (liquidIsAbsolute) {\n        className.push('fc-scroller-liquid-absolute')\n      } else {\n        className.push('fc-scroller-liquid')\n      }\n    }\n\n    return (\n      <div\n        ref={this.handleEl}\n        className={className.join(' ')}\n        style={{\n          overflowX: props.overflowX,\n          overflowY: props.overflowY,\n          left: (isAbsolute && -(props.overcomeLeft || 0)) || '',\n          right: (isAbsolute && -(props.overcomeRight || 0)) || '',\n          bottom: (isAbsolute && -(props.overcomeBottom || 0)) || '',\n          marginLeft: (!isAbsolute && -(props.overcomeLeft || 0)) || '',\n          marginRight: (!isAbsolute && -(props.overcomeRight || 0)) || '',\n          marginBottom: (!isAbsolute && -(props.overcomeBottom || 0)) || '',\n          maxHeight: props.maxHeight || '',\n        }}\n      >\n        {props.children}\n      </div>\n    )\n  }\n\n  handleEl = (el: HTMLElement) => {\n    this.el = el\n    setRef(this.props.elRef, el)\n  }\n\n  needsXScrolling() {\n    if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {\n      return false\n    }\n\n    // testing scrollWidth>clientWidth is unreliable cross-browser when pixel heights aren't integers.\n    // much more reliable to see if children are taller than the scroller, even tho doesn't account for\n    // inner-child margins and absolute positioning\n\n    let { el } = this\n    let realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth()\n    let { children } = el\n\n    for (let i = 0; i < children.length; i += 1) {\n      let childEl = children[i]\n\n      if (childEl.getBoundingClientRect().width > realClientWidth) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  needsYScrolling() {\n    if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {\n      return false\n    }\n\n    // testing scrollHeight>clientHeight is unreliable cross-browser when pixel heights aren't integers.\n    // much more reliable to see if children are taller than the scroller, even tho doesn't account for\n    // inner-child margins and absolute positioning\n\n    let { el } = this\n    let realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth()\n    let { children } = el\n\n    for (let i = 0; i < children.length; i += 1) {\n      let childEl = children[i]\n\n      if (childEl.getBoundingClientRect().height > realClientHeight) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  getXScrollbarWidth() {\n    if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {\n      return 0\n    }\n    return this.el.offsetHeight - this.el.clientHeight // only works because we guarantee no borders. TODO: add to CSS with important?\n  }\n\n  getYScrollbarWidth() {\n    if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {\n      return 0\n    }\n    return this.el.offsetWidth - this.el.clientWidth // only works because we guarantee no borders. TODO: add to CSS with important?\n  }\n}\n","import { hashValuesToArray, collectFromHash } from './object'\n\n/*\nTODO: somehow infer OtherArgs from masterCallback?\nTODO: infer RefType from masterCallback if provided\n*/\nexport class RefMap<RefType> {\n  public currentMap: { [key: string]: RefType } = {}\n  private depths: { [key: string]: number } = {}\n  private callbackMap: { [key: string]: (val: RefType | null) => void } = {}\n\n  constructor(public masterCallback?: (val: RefType | null, key: string) => void) {\n  }\n\n  createRef(key: string | number) {\n    let refCallback = this.callbackMap[key]\n\n    if (!refCallback) {\n      refCallback = this.callbackMap[key] = (val: RefType | null) => {\n        this.handleValue(val, String(key))\n      }\n    }\n\n    return refCallback\n  }\n\n  handleValue = (val: RefType | null, key: string) => { // bind in case users want to pass it around\n    let { depths, currentMap } = this\n    let removed = false\n    let added = false\n\n    if (val !== null) {\n      // for bug... ACTUALLY: can probably do away with this now that callers don't share numeric indices anymore\n      removed = (key in currentMap)\n\n      currentMap[key] = val\n      depths[key] = (depths[key] || 0) + 1\n      added = true\n    } else {\n      depths[key] -= 1\n\n      if (!depths[key]) {\n        delete currentMap[key]\n        delete this.callbackMap[key]\n        removed = true\n      }\n    }\n\n    if (this.masterCallback) {\n      if (removed) {\n        this.masterCallback(null, String(key))\n      }\n      if (added) {\n        this.masterCallback(val, String(key))\n      }\n    }\n  }\n\n  // TODO: check callers that don't care about order. should use getAll instead\n  // NOTE: this method has become less valuable now that we are encouraged to map order by some other index\n  // TODO: provide ONE array-export function, buildArray, which fails on non-numeric indexes. caller can manipulate and \"collect\"\n  collect(\n    startIndex?: number,\n    endIndex?: number,\n    step?: number,\n  ) {\n    return collectFromHash(this.currentMap, startIndex, endIndex, step)\n  }\n\n  getAll(): RefType[] { // returns in no partical order!\n    return hashValuesToArray(this.currentMap)\n  }\n}\n","import { VNode, createElement, Ref } from '../vdom'\nimport { findElements } from '../util/dom-manip'\nimport { ViewContext } from '../ViewContext'\nimport { computeSmallestCellWidth } from '../util/misc'\nimport { isPropsEqual } from '../util/object'\nimport { isArraysEqual } from '../util/array'\nimport { BaseOptionsRefined } from '../options'\n\nexport type CssDimValue = string | number // TODO: move to more general file\n\nexport interface ColProps {\n  width?: CssDimValue\n  minWidth?: CssDimValue\n  span?: number\n}\n\nexport interface SectionConfig {\n  outerContent?: VNode\n  type: 'body' | 'header' | 'footer'\n  className?: string\n  maxHeight?: number\n  liquid?: boolean\n  expandRows?: boolean // TODO: how to get a bottom rule?\n  syncRowHeights?: boolean // yuck\n  isSticky?: boolean\n}\n\nexport type ChunkConfigContent = (contentProps: ChunkContentCallbackArgs) => VNode\nexport type ChunkConfigRowContent = VNode | ChunkConfigContent\n\nexport interface ChunkConfig {\n  outerContent?: VNode\n  content?: ChunkConfigContent\n  rowContent?: ChunkConfigRowContent\n  scrollerElRef?: Ref<HTMLDivElement>\n  elRef?: Ref<HTMLTableCellElement>\n  tableClassName?: string\n}\n\nexport interface ChunkContentCallbackArgs { // TODO: util for wrapping tables!?\n  tableColGroupNode: VNode\n  tableMinWidth: CssDimValue\n  clientWidth: number | null // important to know whether 0 or not-yet-determined. for headless testing\n  clientHeight: number | null //\n  expandRows: boolean\n  syncRowHeights: boolean\n  rowSyncHeights: number[]\n  reportRowHeightChange: (rowEl: HTMLElement, isStable: boolean) => void\n}\n\nexport function computeShrinkWidth(chunkEls: HTMLElement[]) { // all in same COL!\n  let shrinkCells = findElements(chunkEls, '.fc-scrollgrid-shrink')\n  let largestWidth = 0\n\n  for (let shrinkCell of shrinkCells) {\n    largestWidth = Math.max(\n      largestWidth,\n      computeSmallestCellWidth(shrinkCell),\n    )\n  }\n\n  return Math.ceil(largestWidth) // <table> elements work best with integers. round up to ensure contents fits\n}\n\nexport interface ScrollerLike { // have scrollers implement?\n  needsYScrolling(): boolean\n  needsXScrolling(): boolean\n}\n\nexport function getSectionHasLiquidHeight(props: { liquid: boolean }, sectionConfig: SectionConfig) {\n  return props.liquid && sectionConfig.liquid // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well)\n}\n\nexport function getAllowYScrolling(props: { liquid: boolean }, sectionConfig: SectionConfig) {\n  return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars\n    getSectionHasLiquidHeight(props, sectionConfig) // if the section is liquid height, it might condense enough to require scrollbars\n}\n\n// TODO: ONLY use `arg`. force out internal function to use same API\nexport function renderChunkContent(\n  sectionConfig: SectionConfig,\n  chunkConfig: ChunkConfig,\n  arg: ChunkContentCallbackArgs,\n  isHeader: boolean,\n) {\n  let { expandRows } = arg\n\n  let content: VNode = typeof chunkConfig.content === 'function' ?\n    chunkConfig.content(arg) :\n    createElement(\n      'table',\n      {\n        role: 'presentation',\n        className: [\n          chunkConfig.tableClassName,\n          sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '',\n        ].join(' '),\n        style: {\n          minWidth: arg.tableMinWidth, // because colMinWidths arent enough\n          width: arg.clientWidth,\n          height: expandRows ? arg.clientHeight : '', // css `height` on a <table> serves as a min-height\n        },\n      },\n      arg.tableColGroupNode,\n      createElement(\n        isHeader ? 'thead' : 'tbody',\n        {\n          role: 'presentation',\n        },\n        typeof chunkConfig.rowContent === 'function'\n          ? chunkConfig.rowContent(arg)\n          : chunkConfig.rowContent,\n      ),\n    )\n\n  return content\n}\n\nexport function isColPropsEqual(cols0: ColProps[], cols1: ColProps[]) {\n  return isArraysEqual(cols0, cols1, isPropsEqual)\n}\n\nexport function renderMicroColGroup(cols: ColProps[], shrinkWidth?: number): VNode {\n  let colNodes: VNode[] = []\n\n  /*\n  for ColProps with spans, it would have been great to make a single <col span=\"\">\n  HOWEVER, Chrome was getting messing up distributing the width to <td>/<th> elements with colspans.\n  SOLUTION: making individual <col> elements makes Chrome behave.\n  */\n  for (let colProps of cols) {\n    let span = colProps.span || 1\n\n    for (let i = 0; i < span; i += 1) {\n      colNodes.push(\n        <col\n          style={{\n            width: colProps.width === 'shrink' ? sanitizeShrinkWidth(shrinkWidth) : (colProps.width || ''),\n            minWidth: colProps.minWidth || '',\n          }}\n        />,\n      )\n    }\n  }\n\n  return createElement('colgroup', {}, ...colNodes)\n}\n\nexport function sanitizeShrinkWidth(shrinkWidth?: number) {\n  /* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth\n  4 accounts for 2 2-pixel borders. TODO: better solution? */\n  return shrinkWidth == null ? 4 : shrinkWidth\n}\n\nexport function hasShrinkWidth(cols: ColProps[]) {\n  for (let col of cols) {\n    if (col.width === 'shrink') {\n      return true\n    }\n  }\n\n  return false\n}\n\nexport function getScrollGridClassNames(liquid: boolean, context: ViewContext) {\n  let classNames = [\n    'fc-scrollgrid',\n    context.theme.getClass('table'),\n  ]\n\n  if (liquid) {\n    classNames.push('fc-scrollgrid-liquid')\n  }\n\n  return classNames\n}\n\nexport function getSectionClassNames(sectionConfig: SectionConfig, wholeTableVGrow: boolean) {\n  let classNames = [\n    'fc-scrollgrid-section',\n    `fc-scrollgrid-section-${sectionConfig.type}`,\n    sectionConfig.className, // used?\n  ]\n\n  if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) {\n    classNames.push('fc-scrollgrid-section-liquid')\n  }\n\n  if (sectionConfig.isSticky) {\n    classNames.push('fc-scrollgrid-section-sticky')\n  }\n\n  return classNames\n}\n\nexport function renderScrollShim(arg: ChunkContentCallbackArgs) {\n  return (\n    <div\n      className=\"fc-scrollgrid-sticky-shim\"\n      style={{\n        width: arg.clientWidth,\n        minWidth: arg.tableMinWidth,\n      }}\n    />\n  )\n}\n\nexport function getStickyHeaderDates(options: BaseOptionsRefined) {\n  let { stickyHeaderDates } = options\n\n  if (stickyHeaderDates == null || stickyHeaderDates === 'auto') {\n    stickyHeaderDates = options.height === 'auto' || options.viewHeight === 'auto'\n  }\n\n  return stickyHeaderDates\n}\n\nexport function getStickyFooterScrollbar(options: BaseOptionsRefined) {\n  let { stickyFooterScrollbar } = options\n\n  if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') {\n    stickyFooterScrollbar = options.height === 'auto' || options.viewHeight === 'auto'\n  }\n\n  return stickyFooterScrollbar\n}\n","import { VNode, createElement, Fragment } from '../vdom'\nimport { BaseComponent, setRef } from '../vdom-util'\nimport { Scroller, OverflowValue } from './Scroller'\nimport { RefMap } from '../util/RefMap'\nimport {\n  ColProps, SectionConfig, renderMicroColGroup, computeShrinkWidth, getScrollGridClassNames, getSectionClassNames, getAllowYScrolling,\n  renderChunkContent, getSectionHasLiquidHeight, ChunkConfig, hasShrinkWidth, CssDimValue,\n  isColPropsEqual,\n} from './util'\nimport { getCanVGrowWithinCell } from '../util/table-styling'\nimport { memoize } from '../util/memoize'\nimport { isPropsEqual } from '../util/object'\nimport { getScrollbarWidths } from '../util/scrollbar-width'\n\nexport interface SimpleScrollGridProps {\n  cols: ColProps[]\n  sections: SimpleScrollGridSection[]\n  liquid: boolean // liquid *height*\n  collapsibleWidth: boolean // can ALL sections be fully collapsed in width?\n  height?: CssDimValue // TODO: give to real ScrollGrid\n}\n\nexport interface SimpleScrollGridSection extends SectionConfig {\n  key: string\n  chunk?: ChunkConfig\n}\n\ninterface SimpleScrollGridState {\n  shrinkWidth: number | null\n  forceYScrollbars: boolean\n  scrollerClientWidths: { [key: string]: number }\n  scrollerClientHeights: { [key: string]: number }\n}\n\nexport class SimpleScrollGrid extends BaseComponent<SimpleScrollGridProps, SimpleScrollGridState> {\n  processCols = memoize((a) => a, isColPropsEqual) // so we get same `cols` props every time\n\n  // yucky to memoize VNodes, but much more efficient for consumers\n  renderMicroColGroup: typeof renderMicroColGroup = memoize(renderMicroColGroup)\n\n  scrollerRefs = new RefMap<Scroller>()\n  scrollerElRefs = new RefMap<HTMLElement>(this._handleScrollerEl.bind(this))\n\n  state: SimpleScrollGridState = {\n    shrinkWidth: null,\n    forceYScrollbars: false,\n    scrollerClientWidths: {},\n    scrollerClientHeights: {},\n  }\n\n  render(): VNode {\n    let { props, state, context } = this\n    let sectionConfigs = props.sections || []\n    let cols = this.processCols(props.cols)\n\n    let microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth)\n    let classNames = getScrollGridClassNames(props.liquid, context)\n\n    if (props.collapsibleWidth) {\n      classNames.push('fc-scrollgrid-collapsible')\n    }\n\n    // TODO: make DRY\n    let configCnt = sectionConfigs.length\n    let configI = 0\n    let currentConfig: SimpleScrollGridSection\n    let headSectionNodes: VNode[] = []\n    let bodySectionNodes: VNode[] = []\n    let footSectionNodes: VNode[] = []\n\n    while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {\n      headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true))\n      configI += 1\n    }\n\n    while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {\n      bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false))\n      configI += 1\n    }\n\n    while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {\n      footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true))\n      configI += 1\n    }\n\n    // firefox bug: when setting height on table and there is a thead or tfoot,\n    // the necessary height:100% on the liquid-height body section forces the *whole* table to be taller. (bug #5524)\n    // use getCanVGrowWithinCell as a way to detect table-stupid firefox.\n    // if so, use a simpler dom structure, jam everything into a lone tbody.\n    let isBuggy = !getCanVGrowWithinCell()\n\n    const roleAttrs = { role: 'rowgroup' }\n\n    return createElement(\n      'table',\n      {\n        role: 'grid',\n        className: classNames.join(' '),\n        style: { height: props.height },\n      },\n      Boolean(!isBuggy && headSectionNodes.length) && createElement('thead', roleAttrs, ...headSectionNodes),\n      Boolean(!isBuggy && bodySectionNodes.length) && createElement('tbody', roleAttrs, ...bodySectionNodes),\n      Boolean(!isBuggy && footSectionNodes.length) && createElement('tfoot', roleAttrs, ...footSectionNodes),\n      isBuggy && createElement('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes),\n    )\n  }\n\n  renderSection(sectionConfig: SimpleScrollGridSection, microColGroupNode: VNode, isHeader: boolean) {\n    if ('outerContent' in sectionConfig) {\n      return (\n        <Fragment key={sectionConfig.key}>\n          {sectionConfig.outerContent}\n        </Fragment>\n      )\n    }\n\n    return (\n      <tr\n        key={sectionConfig.key}\n        role=\"presentation\"\n        className={getSectionClassNames(sectionConfig, this.props.liquid).join(' ')}\n      >\n        {this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)}\n      </tr>\n    )\n  }\n\n  renderChunkTd(\n    sectionConfig: SimpleScrollGridSection,\n    microColGroupNode: VNode,\n    chunkConfig: ChunkConfig,\n    isHeader: boolean,\n  ): createElement.JSX.Element {\n    if ('outerContent' in chunkConfig) {\n      return chunkConfig.outerContent\n    }\n\n    let { props } = this\n    let { forceYScrollbars, scrollerClientWidths, scrollerClientHeights } = this.state\n\n    let needsYScrolling = getAllowYScrolling(props, sectionConfig) // TODO: do lazily. do in section config?\n    let isLiquid = getSectionHasLiquidHeight(props, sectionConfig)\n\n    // for `!props.liquid` - is WHOLE scrollgrid natural height?\n    // TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars\n    let overflowY: OverflowValue =\n      !props.liquid ? 'visible' :\n        forceYScrollbars ? 'scroll' :\n          !needsYScrolling ? 'hidden' :\n            'auto'\n\n    let sectionKey = sectionConfig.key\n    let content = renderChunkContent(sectionConfig, chunkConfig, {\n      tableColGroupNode: microColGroupNode,\n      tableMinWidth: '',\n      clientWidth: (!props.collapsibleWidth && scrollerClientWidths[sectionKey] !== undefined) ? scrollerClientWidths[sectionKey] : null,\n      clientHeight: scrollerClientHeights[sectionKey] !== undefined ? scrollerClientHeights[sectionKey] : null,\n      expandRows: sectionConfig.expandRows,\n      syncRowHeights: false,\n      rowSyncHeights: [],\n      reportRowHeightChange: () => {},\n    }, isHeader)\n\n    return createElement(\n      isHeader ? 'th' : 'td',\n      {\n        ref: chunkConfig.elRef as any,\n        role: 'presentation',\n      },\n      <div className={`fc-scroller-harness${isLiquid ? ' fc-scroller-harness-liquid' : ''}`}>\n        <Scroller\n          ref={this.scrollerRefs.createRef(sectionKey)}\n          elRef={this.scrollerElRefs.createRef(sectionKey)}\n          overflowY={overflowY}\n          overflowX={!props.liquid ? 'visible' : 'hidden' /* natural height? */}\n          maxHeight={sectionConfig.maxHeight}\n          liquid={isLiquid}\n          liquidIsAbsolute // because its within a harness\n        >\n          {content}\n        </Scroller>\n      </div>,\n    )\n  }\n\n  _handleScrollerEl(scrollerEl: HTMLElement | null, key: string) {\n    let section = getSectionByKey(this.props.sections, key)\n\n    if (section) {\n      setRef(section.chunk.scrollerElRef, scrollerEl)\n    }\n  }\n\n  // TODO: can do a really simple print-view. dont need to join rows\n  handleSizing = () => {\n    this.safeSetState({\n      shrinkWidth: this.computeShrinkWidth(), // will create each chunk's <colgroup>. TODO: precompute hasShrinkWidth\n      ...this.computeScrollerDims(),\n    })\n  }\n\n  componentDidMount() {\n    this.handleSizing()\n    this.context.addResizeHandler(this.handleSizing)\n  }\n\n  componentDidUpdate() {\n    // TODO: need better solution when state contains non-sizing things\n    this.handleSizing()\n  }\n\n  componentWillUnmount() {\n    this.context.removeResizeHandler(this.handleSizing)\n  }\n\n  computeShrinkWidth() {\n    return hasShrinkWidth(this.props.cols)\n      ? computeShrinkWidth(this.scrollerElRefs.getAll())\n      : 0\n  }\n\n  computeScrollerDims() {\n    let scrollbarWidth = getScrollbarWidths()\n    let { scrollerRefs, scrollerElRefs } = this\n\n    let forceYScrollbars = false\n    let scrollerClientWidths: { [index: string]: number } = {}\n    let scrollerClientHeights: { [index: string]: number } = {}\n\n    for (let sectionKey in scrollerRefs.currentMap) {\n      let scroller = scrollerRefs.currentMap[sectionKey]\n\n      if (scroller && scroller.needsYScrolling()) {\n        forceYScrollbars = true\n        break\n      }\n    }\n\n    for (let section of this.props.sections) {\n      let sectionKey = section.key\n      let scrollerEl = scrollerElRefs.currentMap[sectionKey]\n\n      if (scrollerEl) {\n        let harnessEl = scrollerEl.parentNode as HTMLElement // TODO: weird way to get this. need harness b/c doesn't include table borders\n\n        scrollerClientWidths[sectionKey] = Math.floor(\n          harnessEl.getBoundingClientRect().width - (\n            forceYScrollbars\n              ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future\n              : 0\n          ),\n        )\n\n        scrollerClientHeights[sectionKey] = Math.floor(\n          harnessEl.getBoundingClientRect().height, // never has horizontal scrollbars\n        )\n      }\n    }\n\n    return { forceYScrollbars, scrollerClientWidths, scrollerClientHeights }\n  }\n}\n\nSimpleScrollGrid.addStateEquality({\n  scrollerClientWidths: isPropsEqual,\n  scrollerClientHeights: isPropsEqual,\n})\n\nfunction getSectionByKey(sections: SimpleScrollGridSection[], key: string): SimpleScrollGridSection | null {\n  for (let section of sections) {\n    if (section.key === key) {\n      return section\n    }\n  }\n\n  return null\n}\n","import { Seg } from '../component/DateComponent'\nimport { ComponentChildren, createElement, Ref, createRef, RefObject } from '../vdom'\nimport { EventApi } from '../api/EventApi'\nimport {\n  computeSegDraggable,\n  computeSegStartResizable,\n  computeSegEndResizable,\n  setElSeg,\n  EventContentArg,\n  getEventClassNames,\n} from '../component/event-rendering'\nimport { RenderHook } from './render-hook'\nimport { BaseComponent } from '../vdom-util'\n\nexport interface MinimalEventProps {\n  seg: Seg\n  isDragging: boolean // rename to isMirrorDragging? make optional?\n  isResizing: boolean // rename to isMirrorResizing? make optional?\n  isDateSelecting: boolean // rename to isMirrorDateSelecting? make optional?\n  isSelected: boolean\n  isPast: boolean\n  isFuture: boolean\n  isToday: boolean\n}\n\nexport interface EventRootProps extends MinimalEventProps {\n  timeText: string\n  disableDragging?: boolean\n  disableResizing?: boolean\n  defaultContent: (hookProps: EventContentArg) => ComponentChildren\n  children: (\n    rootElRef: Ref<any>,\n    classNames: string[],\n    innerElRef: Ref<any>,\n    innerContent: ComponentChildren,\n    hookProps: EventContentArg\n  ) => ComponentChildren\n}\n\nexport class EventRoot extends BaseComponent<EventRootProps> {\n  elRef: RefObject<HTMLElement> = createRef<HTMLElement>()\n\n  render() {\n    let { props, context } = this\n    let { options } = context\n    let { seg } = props\n    let { eventRange } = seg\n    let { ui } = eventRange\n\n    let hookProps: EventContentArg = {\n      event: new EventApi(context, eventRange.def, eventRange.instance),\n      view: context.viewApi,\n      timeText: props.timeText,\n      textColor: ui.textColor,\n      backgroundColor: ui.backgroundColor,\n      borderColor: ui.borderColor,\n      isDraggable: !props.disableDragging && computeSegDraggable(seg, context),\n      isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),\n      isEndResizable: !props.disableResizing && computeSegEndResizable(seg, context),\n      isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),\n      isStart: Boolean(seg.isStart),\n      isEnd: Boolean(seg.isEnd),\n      isPast: Boolean(props.isPast), // TODO: don't cast. getDateMeta does it\n      isFuture: Boolean(props.isFuture), // TODO: don't cast. getDateMeta does it\n      isToday: Boolean(props.isToday), // TODO: don't cast. getDateMeta does it\n      isSelected: Boolean(props.isSelected),\n      isDragging: Boolean(props.isDragging),\n      isResizing: Boolean(props.isResizing),\n    }\n\n    let standardClassNames = getEventClassNames(hookProps).concat(ui.classNames)\n\n    return (\n      <RenderHook\n        hookProps={hookProps}\n        classNames={options.eventClassNames}\n        content={options.eventContent}\n        defaultContent={props.defaultContent}\n        didMount={options.eventDidMount}\n        willUnmount={options.eventWillUnmount}\n        elRef={this.elRef}\n      >\n        {(rootElRef, customClassNames, innerElRef, innerContent) => props.children(\n          rootElRef, standardClassNames.concat(customClassNames), innerElRef, innerContent, hookProps,\n        )}\n      </RenderHook>\n    )\n  }\n\n  componentDidMount() {\n    setElSeg(this.elRef.current, this.props.seg)\n  }\n\n  /*\n  need to re-assign seg to the element if seg changes, even if the element is the same\n  */\n  componentDidUpdate(prevProps: EventRootProps) {\n    let { seg } = this.props\n\n    if (seg !== prevProps.seg) {\n      setElSeg(this.elRef.current, seg)\n    }\n  }\n}\n","import { ComponentChildren, createElement, Fragment } from '../vdom'\nimport { BaseComponent } from '../vdom-util'\nimport { buildSegTimeText, EventContentArg, getSegAnchorAttrs } from '../component/event-rendering'\nimport { EventRoot, MinimalEventProps } from './EventRoot'\nimport { DateFormatter } from '../datelib/DateFormatter'\n\nexport interface StandardEventProps extends MinimalEventProps {\n  extraClassNames: string[]\n  defaultTimeFormat: DateFormatter\n  defaultDisplayEventTime?: boolean // default true\n  defaultDisplayEventEnd?: boolean // default true\n  disableDragging?: boolean // default false\n  disableResizing?: boolean // default false\n  defaultContent?: (hookProps: EventContentArg) => ComponentChildren // not used by anyone yet\n}\n\n// should not be a purecomponent\nexport class StandardEvent extends BaseComponent<StandardEventProps> {\n  render() {\n    let { props, context } = this\n    let { seg } = props\n    let timeFormat = context.options.eventTimeFormat || props.defaultTimeFormat\n    let timeText = buildSegTimeText(\n      seg,\n      timeFormat,\n      context,\n      props.defaultDisplayEventTime,\n      props.defaultDisplayEventEnd,\n    )\n\n    return (\n      <EventRoot\n        seg={seg}\n        timeText={timeText}\n        disableDragging={props.disableDragging}\n        disableResizing={props.disableResizing}\n        defaultContent={props.defaultContent || renderInnerContent}\n        isDragging={props.isDragging}\n        isResizing={props.isResizing}\n        isDateSelecting={props.isDateSelecting}\n        isSelected={props.isSelected}\n        isPast={props.isPast}\n        isFuture={props.isFuture}\n        isToday={props.isToday}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent, hookProps) => (\n          <a\n            className={props.extraClassNames.concat(classNames).join(' ')}\n            style={{\n              borderColor: hookProps.borderColor,\n              backgroundColor: hookProps.backgroundColor,\n            }}\n            ref={rootElRef}\n            {...getSegAnchorAttrs(seg, context)}\n          >\n            <div className=\"fc-event-main\" ref={innerElRef} style={{ color: hookProps.textColor }}>\n              {innerContent}\n            </div>\n            {hookProps.isStartResizable &&\n              <div className=\"fc-event-resizer fc-event-resizer-start\" />}\n            {hookProps.isEndResizable &&\n              <div className=\"fc-event-resizer fc-event-resizer-end\" />}\n          </a>\n        )}\n      </EventRoot>\n    )\n  }\n}\n\nfunction renderInnerContent(innerProps: EventContentArg) {\n  return (\n    <div className=\"fc-event-main-frame\">\n      {innerProps.timeText && (\n        <div className=\"fc-event-time\">{innerProps.timeText}</div>\n      )}\n      <div className=\"fc-event-title-container\">\n        <div className=\"fc-event-title fc-sticky\">\n          {innerProps.event.title || <Fragment>&nbsp;</Fragment>}\n        </div>\n      </div>\n    </div>\n  )\n}\n","import { RenderHook, RenderHookPropsChildren, MountArg } from './render-hook'\nimport { DateMarker } from '../datelib/marker'\nimport { ViewContext, ViewContextType } from '../ViewContext'\nimport { createElement } from '../vdom'\nimport { ViewApi } from '../ViewApi'\n\nexport interface NowIndicatorRootProps {\n  isAxis: boolean\n  date: DateMarker\n  children: RenderHookPropsChildren\n}\n\nexport interface NowIndicatorContentArg {\n  isAxis: boolean\n  date: Date\n  view: ViewApi\n}\n\nexport type NowIndicatorMountArg = MountArg<NowIndicatorContentArg>\n\nexport const NowIndicatorRoot = (props: NowIndicatorRootProps) => (\n  <ViewContextType.Consumer>\n    {(context: ViewContext) => {\n      let { options } = context\n      let hookProps: NowIndicatorContentArg = {\n        isAxis: props.isAxis,\n        date: context.dateEnv.toDate(props.date),\n        view: context.viewApi,\n      }\n\n      return (\n        <RenderHook\n          hookProps={hookProps}\n          classNames={options.nowIndicatorClassNames}\n          content={options.nowIndicatorContent}\n          didMount={options.nowIndicatorDidMount}\n          willUnmount={options.nowIndicatorWillUnmount}\n        >\n          {props.children}\n        </RenderHook>\n      )\n    }}\n  </ViewContextType.Consumer>\n)\n","import { Ref, ComponentChildren, createElement } from '../vdom'\nimport { DateMarker } from '../datelib/marker'\nimport { DateRange } from '../datelib/date-range'\nimport { getDateMeta, DateMeta } from '../component/date-rendering'\nimport { createFormatter } from '../datelib/formatting'\nimport { ContentHook } from './render-hook'\nimport { ViewApi } from '../ViewApi'\nimport { BaseComponent } from '../vdom-util'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { Dictionary } from '../options'\nimport { DateEnv } from '../datelib/env'\n\nconst DAY_NUM_FORMAT = createFormatter({ day: 'numeric' })\n\nexport interface DayCellContentProps {\n  date: DateMarker\n  dateProfile: DateProfile\n  todayRange: DateRange\n  showDayNumber?: boolean // defaults to false\n  extraHookProps?: Dictionary\n  defaultContent?: (hookProps: DayCellContentArg) => ComponentChildren\n  children: (\n    innerElRef: Ref<any>,\n    innerContent: ComponentChildren\n  ) => ComponentChildren\n}\n\nexport interface DayCellContentArg extends DateMeta {\n  date: DateMarker // localized\n  view: ViewApi\n  dayNumberText: string\n  [extraProp: string]: any // so can include a resource\n}\n\nexport interface DayCellHookPropsInput {\n  date: DateMarker // generic\n  dateProfile: DateProfile\n  todayRange: DateRange\n  dateEnv: DateEnv\n  viewApi: ViewApi\n  showDayNumber?: boolean // defaults to false\n  extraProps?: Dictionary // so can include a resource\n}\n\nexport class DayCellContent extends BaseComponent<DayCellContentProps> {\n  render() {\n    let { props, context } = this\n    let { options } = context\n    let hookProps = refineDayCellHookProps({\n      date: props.date,\n      dateProfile: props.dateProfile,\n      todayRange: props.todayRange,\n      showDayNumber: props.showDayNumber,\n      extraProps: props.extraHookProps,\n      viewApi: context.viewApi,\n      dateEnv: context.dateEnv,\n    })\n\n    return (\n      <ContentHook\n        hookProps={hookProps}\n        content={options.dayCellContent}\n        defaultContent={props.defaultContent}\n      >\n        {props.children}\n      </ContentHook>\n    )\n  }\n}\n\nexport function refineDayCellHookProps(raw: DayCellHookPropsInput): DayCellContentArg {\n  let { date, dateEnv } = raw\n  let dayMeta = getDateMeta(date, raw.todayRange, null, raw.dateProfile)\n\n  return {\n    date: dateEnv.toDate(date),\n    view: raw.viewApi,\n    ...dayMeta,\n    dayNumberText: raw.showDayNumber ? dateEnv.format(date, DAY_NUM_FORMAT) : '',\n    ...raw.extraProps,\n  }\n}\n","import { Ref, ComponentChildren, createElement } from '../vdom'\nimport { DateMarker } from '../datelib/marker'\nimport { DateRange } from '../datelib/date-range'\nimport { getDayClassNames, DateMeta } from '../component/date-rendering'\nimport { formatDayString } from '../datelib/formatting-utils'\nimport { buildClassNameNormalizer, MountHook, MountArg } from './render-hook'\nimport { ViewApi } from '../ViewApi'\nimport { BaseComponent } from '../vdom-util'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { memoizeObjArg } from '../util/memoize'\nimport { Dictionary } from '../options'\nimport { refineDayCellHookProps } from './DayCellContent'\n\nexport interface DayCellContentArg extends DateMeta {\n  date: DateMarker // localized\n  view: ViewApi\n  dayNumberText: string\n  [extraProp: string]: any // so can include a resource\n}\nexport type DayCellMountArg = MountArg<DayCellContentArg>\n\nexport interface DayCellRootProps {\n  elRef?: Ref<any>\n  date: DateMarker\n  dateProfile: DateProfile\n  todayRange: DateRange\n  showDayNumber?: boolean // defaults to false\n  extraHookProps?: Dictionary\n  children: (\n    rootElRef: Ref<any>,\n    classNames: string[],\n    rootDataAttrs,\n    isDisabled: boolean\n  ) => ComponentChildren\n}\n\nexport class DayCellRoot extends BaseComponent<DayCellRootProps> {\n  refineHookProps = memoizeObjArg(refineDayCellHookProps)\n  normalizeClassNames = buildClassNameNormalizer<DayCellContentArg>()\n\n  render() {\n    let { props, context } = this\n    let { options } = context\n    let hookProps = this.refineHookProps({\n      date: props.date,\n      dateProfile: props.dateProfile,\n      todayRange: props.todayRange,\n      showDayNumber: props.showDayNumber,\n      extraProps: props.extraHookProps,\n      viewApi: context.viewApi,\n      dateEnv: context.dateEnv,\n    })\n\n    let classNames = getDayClassNames(hookProps, context.theme).concat(\n      hookProps.isDisabled\n        ? [] // don't use custom classNames if disabled\n        : this.normalizeClassNames(options.dayCellClassNames, hookProps),\n    )\n\n    let dataAttrs = hookProps.isDisabled ? {} : {\n      'data-date': formatDayString(props.date),\n    }\n\n    return (\n      <MountHook\n        hookProps={hookProps}\n        didMount={options.dayCellDidMount}\n        willUnmount={options.dayCellWillUnmount}\n        elRef={props.elRef}\n      >\n        {(rootElRef) => props.children(rootElRef, classNames, dataAttrs, hookProps.isDisabled)}\n      </MountHook>\n    )\n  }\n}\n","import { createElement } from '../vdom'\nimport { EventRoot } from './EventRoot'\nimport { Seg } from '../component/DateComponent'\nimport { EventContentArg } from '../component/event-rendering'\n\nexport function renderFill(fillType: string) {\n  return (\n    <div className={`fc-${fillType}`} />\n  )\n}\n\nexport interface BgEventProps {\n  seg: Seg\n  isPast: boolean\n  isFuture: boolean\n  isToday: boolean\n}\n\nexport const BgEvent = (props: BgEventProps) => (\n  <EventRoot\n    defaultContent={renderInnerContent}\n    seg={props.seg /* uselesss i think */}\n    timeText=\"\"\n    disableDragging\n    disableResizing\n    isDragging={false}\n    isResizing={false}\n    isDateSelecting={false}\n    isSelected={false}\n    isPast={props.isPast}\n    isFuture={props.isFuture}\n    isToday={props.isToday}\n  >\n    {(rootElRef, classNames, innerElRef, innerContent, hookProps) => (\n      <div\n        ref={rootElRef}\n        className={['fc-bg-event'].concat(classNames).join(' ')}\n        style={{\n          backgroundColor: hookProps.backgroundColor,\n        }}\n      >\n        {innerContent}\n      </div>\n    )}\n  </EventRoot>\n)\n\nfunction renderInnerContent(props: EventContentArg) {\n  let { title } = props.event\n\n  return title && (\n    <div className=\"fc-event-title\">{props.event.title}</div>\n  )\n}\n","import { ViewContext, ViewContextType } from '../ViewContext'\nimport { DateMarker } from '../datelib/marker'\nimport { RenderHook, RenderHookPropsChildren, MountArg } from './render-hook'\nimport { createElement } from '../vdom'\nimport { DateFormatter } from '../datelib/DateFormatter'\n\nexport interface WeekNumberRootProps {\n  date: DateMarker\n  defaultFormat: DateFormatter\n  children: RenderHookPropsChildren\n}\n\nexport interface WeekNumberContentArg {\n  num: number\n  text: string\n  date: Date\n}\nexport type WeekNumberMountArg = MountArg<WeekNumberContentArg>\n\nexport const WeekNumberRoot = (props: WeekNumberRootProps) => (\n  <ViewContextType.Consumer>\n    {(context: ViewContext) => {\n      let { dateEnv, options } = context\n      let { date } = props\n      let format = options.weekNumberFormat || props.defaultFormat\n      let num = dateEnv.computeWeekNumber(date) // TODO: somehow use for formatting as well?\n      let text = dateEnv.format(date, format)\n      let hookProps: WeekNumberContentArg = { num, text, date }\n\n      return (\n        <RenderHook<WeekNumberContentArg> // why isn't WeekNumberContentArg being auto-detected?\n          hookProps={hookProps}\n          classNames={options.weekNumberClassNames}\n          content={options.weekNumberContent}\n          defaultContent={renderInner}\n          didMount={options.weekNumberDidMount}\n          willUnmount={options.weekNumberWillUnmount}\n        >\n          {props.children}\n        </RenderHook>\n      )\n    }}\n  </ViewContextType.Consumer>\n)\n\nfunction renderInner(innerProps) {\n  return innerProps.text\n}\n","import { Dictionary } from '../options'\nimport { computeClippedClientRect } from '../util/dom-geom'\nimport { applyStyle, elementClosest, getEventTargetViaRoot, getUniqueDomId } from '../util/dom-manip'\nimport { createElement, ComponentChildren, Ref, createPortal } from '../vdom'\nimport { BaseComponent, setRef } from '../vdom-util'\n\nexport interface PopoverProps {\n  elRef?: Ref<HTMLElement>\n  id: string\n  title: string\n  extraClassNames?: string[]\n  extraAttrs?: Dictionary\n  parentEl: HTMLElement\n  alignmentEl: HTMLElement\n  alignGridTop?: boolean\n  children?: ComponentChildren\n  onClose?: () => void\n}\n\nconst PADDING_FROM_VIEWPORT = 10\n\nexport class Popover extends BaseComponent<PopoverProps> {\n  private rootEl: HTMLElement\n  state = {\n    titleId: getUniqueDomId(),\n  }\n\n  render() {\n    let { theme, options } = this.context\n    let { props, state } = this\n    let classNames = [\n      'fc-popover',\n      theme.getClass('popover'),\n    ].concat(\n      props.extraClassNames || [],\n    )\n\n    return createPortal(\n      <div\n        id={props.id}\n        className={classNames.join(' ')}\n        aria-labelledby={state.titleId}\n        {...props.extraAttrs}\n        ref={this.handleRootEl}\n      >\n        <div className={'fc-popover-header ' + theme.getClass('popoverHeader')}>\n          <span className=\"fc-popover-title\" id={state.titleId}>\n            {props.title}\n          </span>\n          <span\n            className={'fc-popover-close ' + theme.getIconClass('close')}\n            title={options.closeHint}\n            onClick={this.handleCloseClick}\n          />\n        </div>\n        <div className={'fc-popover-body ' + theme.getClass('popoverContent')}>\n          {props.children}\n        </div>\n      </div>,\n      props.parentEl,\n    )\n  }\n\n  componentDidMount() {\n    document.addEventListener('mousedown', this.handleDocumentMouseDown)\n    document.addEventListener('keydown', this.handleDocumentKeyDown)\n    this.updateSize()\n  }\n\n  componentWillUnmount() {\n    document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n    document.removeEventListener('keydown', this.handleDocumentKeyDown)\n  }\n\n  handleRootEl = (el: HTMLElement | null) => {\n    this.rootEl = el\n\n    if (this.props.elRef) {\n      setRef(this.props.elRef, el)\n    }\n  }\n\n  // Triggered when the user clicks *anywhere* in the document, for the autoHide feature\n  handleDocumentMouseDown = (ev) => {\n    // only hide the popover if the click happened outside the popover\n    const target = getEventTargetViaRoot(ev) as HTMLElement\n    if (!this.rootEl.contains(target)) {\n      this.handleCloseClick()\n    }\n  }\n\n  handleDocumentKeyDown = (ev) => {\n    if (ev.key === 'Escape') {\n      this.handleCloseClick()\n    }\n  }\n\n  handleCloseClick = () => {\n    let { onClose } = this.props\n    if (onClose) {\n      onClose()\n    }\n  }\n\n  private updateSize() {\n    let { isRtl } = this.context\n    let { alignmentEl, alignGridTop } = this.props\n    let { rootEl } = this\n\n    let alignmentRect = computeClippedClientRect(alignmentEl)\n    if (alignmentRect) {\n      let popoverDims = rootEl.getBoundingClientRect()\n\n      // position relative to viewport\n      let popoverTop = alignGridTop\n        ? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top\n        : alignmentRect.top\n      let popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left\n\n      // constrain\n      popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT)\n      popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width)\n      popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT)\n\n      let origin = rootEl.offsetParent.getBoundingClientRect()\n      applyStyle(rootEl, {\n        top: popoverTop - origin.top,\n        left: popoverLeft - origin.left,\n      })\n    }\n  }\n}\n","import { DateComponent } from '../component/DateComponent'\nimport { DateRange } from '../datelib/date-range'\nimport { DateMarker } from '../datelib/marker'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { Hit } from '../interactions/hit'\nimport { Dictionary } from '../options'\nimport { createElement, ComponentChildren } from '../vdom'\nimport { DayCellContent } from './DayCellContent'\nimport { DayCellRoot } from './DayCellRoot'\nimport { Popover } from './Popover'\n\nexport interface MorePopoverProps {\n  id: string\n  startDate: DateMarker\n  endDate: DateMarker\n  dateProfile: DateProfile\n  parentEl: HTMLElement\n  alignmentEl: HTMLElement\n  alignGridTop?: boolean\n  todayRange: DateRange\n  extraDateSpan: Dictionary\n  children: ComponentChildren\n  onClose?: () => void\n}\n\nexport class MorePopover extends DateComponent<MorePopoverProps> {\n  rootEl: HTMLElement\n\n  render() {\n    let { options, dateEnv } = this.context\n    let { props } = this\n    let { startDate, todayRange, dateProfile } = props\n    let title = dateEnv.format(startDate, options.dayPopoverFormat)\n    return (\n      <DayCellRoot date={startDate} dateProfile={dateProfile} todayRange={todayRange} elRef={this.handleRootEl}>\n        {(rootElRef, dayClassNames, dataAttrs) => (\n          <Popover\n            elRef={rootElRef}\n            id={props.id}\n            title={title}\n            extraClassNames={['fc-more-popover'].concat(dayClassNames)}\n            extraAttrs={dataAttrs /* TODO: make these time-based when not whole-day? */}\n            parentEl={props.parentEl}\n            alignmentEl={props.alignmentEl}\n            alignGridTop={props.alignGridTop}\n            onClose={props.onClose}\n          >\n            <DayCellContent date={startDate} dateProfile={dateProfile} todayRange={todayRange}>\n              {(innerElRef, innerContent) => (\n                innerContent &&\n                  <div className=\"fc-more-popover-misc\" ref={innerElRef}>{innerContent}</div>\n              )}\n            </DayCellContent>\n            {props.children}\n          </Popover>\n        )}\n      </DayCellRoot>\n    )\n  }\n\n  handleRootEl = (rootEl: HTMLDivElement | null) => {\n    this.rootEl = rootEl\n    if (rootEl) {\n      this.context.registerInteractiveComponent(this, {\n        el: rootEl,\n        useEventCenter: false,\n      })\n    } else {\n      this.context.unregisterInteractiveComponent(this)\n    }\n  }\n\n  queryHit(positionLeft: number, positionTop: number, elWidth: number, elHeight: number): Hit {\n    let { rootEl, props } = this\n\n    if (\n      positionLeft >= 0 && positionLeft < elWidth &&\n      positionTop >= 0 && positionTop < elHeight\n    ) {\n      return {\n        dateProfile: props.dateProfile,\n        dateSpan: {\n          allDay: true,\n          range: {\n            start: props.startDate,\n            end: props.endDate,\n          },\n          ...props.extraDateSpan,\n        },\n        dayEl: rootEl,\n        rect: {\n          left: 0,\n          top: 0,\n          right: elWidth,\n          bottom: elHeight,\n        },\n        layer: 1, // important when comparing with hits from other components\n      }\n    }\n\n    return null\n  }\n}\n","import { EventApi } from '../api/EventApi'\nimport { Seg } from '../component/DateComponent'\nimport { DateRange } from '../datelib/date-range'\nimport { addDays, DateMarker } from '../datelib/marker'\nimport { DateProfile } from '../DateProfileGenerator'\nimport { Dictionary } from '../options'\nimport { elementClosest, getUniqueDomId } from '../util/dom-manip'\nimport { formatWithOrdinals } from '../util/misc'\nimport { ComponentChildren, createElement, createRef, Fragment, Ref, RefObject, VNode } from '../vdom'\nimport { BaseComponent } from '../vdom-util'\nimport { ViewApi } from '../ViewApi'\nimport { ViewContext, ViewContextType } from '../ViewContext'\nimport { MorePopover } from './MorePopover'\nimport { MountArg, RenderHook } from './render-hook'\n\nexport type MoreLinkChildren = (\n  rootElRef: Ref<any>,\n  classNames: string[],\n  innerElRef: Ref<any>,\n  innerContent: ComponentChildren,\n  handleClick: (ev: MouseEvent) => void,\n  title: string, // for a11y\n  isExpanded: boolean,\n  popoverId: string,\n) => ComponentChildren\n\nexport interface MoreLinkRootProps { // what the MoreLinkRoot component receives\n  dateProfile: DateProfile\n  todayRange: DateRange\n  allDayDate: DateMarker | null\n  moreCnt: number // can't always derive from hiddenSegs. some hiddenSegs might be due to lack of dimensions\n  allSegs: Seg[]\n  hiddenSegs: Seg[]\n  extraDateSpan?: Dictionary\n  alignmentElRef: RefObject<HTMLElement> // for popover\n  alignGridTop?: boolean // for popover\n  topAlignmentElRef?: RefObject<HTMLElement>\n  defaultContent?: (hookProps: MoreLinkContentArg) => ComponentChildren\n  popoverContent: () => VNode\n  children: MoreLinkChildren\n}\n\nexport interface MoreLinkContentArg { // what the render-hooks receive\n  num: number\n  text: string\n  shortText: string\n  view: ViewApi\n}\n\nexport type MoreLinkMountArg = MountArg<MoreLinkContentArg>\n\ninterface MoreLinkRootState {\n  isPopoverOpen: boolean\n  popoverId: string\n}\n\nexport class MoreLinkRoot extends BaseComponent<MoreLinkRootProps, MoreLinkRootState> {\n  private linkElRef = createRef<HTMLElement>()\n  private parentEl: HTMLElement\n\n  state = {\n    isPopoverOpen: false,\n    popoverId: getUniqueDomId(),\n  }\n\n  render() {\n    let { props, state } = this\n    return (\n      <ViewContextType.Consumer>\n        {(context: ViewContext) => {\n          let { viewApi, options, calendarApi } = context\n          let { moreLinkText } = options\n          let { moreCnt } = props\n          let range = computeRange(props)\n\n          let text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals\n            ? moreLinkText.call(calendarApi, moreCnt)\n            : `+${moreCnt} ${moreLinkText}`\n          let title = formatWithOrdinals(options.moreLinkHint, [moreCnt], text)\n          let hookProps: MoreLinkContentArg = {\n            num: moreCnt,\n            shortText: `+${moreCnt}`, // TODO: offer hook or i18n?\n            text,\n            view: viewApi,\n          }\n\n          return (\n            <Fragment>\n              {Boolean(props.moreCnt) && (\n                <RenderHook<MoreLinkContentArg>\n                  elRef={this.linkElRef}\n                  hookProps={hookProps}\n                  classNames={options.moreLinkClassNames}\n                  content={options.moreLinkContent}\n                  defaultContent={props.defaultContent || renderMoreLinkInner}\n                  didMount={options.moreLinkDidMount}\n                  willUnmount={options.moreLinkWillUnmount}\n                >\n                  {(rootElRef, customClassNames, innerElRef, innerContent) => props.children(\n                    rootElRef,\n                    ['fc-more-link'].concat(customClassNames),\n                    innerElRef,\n                    innerContent,\n                    this.handleClick,\n                    title,\n                    state.isPopoverOpen,\n                    state.isPopoverOpen ? state.popoverId : '',\n                  )}\n                </RenderHook>\n              )}\n              {state.isPopoverOpen && (\n                <MorePopover\n                  id={state.popoverId}\n                  startDate={range.start}\n                  endDate={range.end}\n                  dateProfile={props.dateProfile}\n                  todayRange={props.todayRange}\n                  extraDateSpan={props.extraDateSpan}\n                  parentEl={this.parentEl}\n                  alignmentEl={props.alignmentElRef.current}\n                  alignGridTop={props.alignGridTop}\n                  onClose={this.handlePopoverClose}\n                >\n                  {props.popoverContent()}\n                </MorePopover>\n              )}\n            </Fragment>\n          )\n        }}\n      </ViewContextType.Consumer>\n    )\n  }\n\n  componentDidMount() {\n    this.updateParentEl()\n  }\n\n  componentDidUpdate() {\n    this.updateParentEl()\n  }\n\n  updateParentEl() {\n    if (this.linkElRef.current) {\n      this.parentEl = elementClosest(this.linkElRef.current, '.fc-view-harness')\n    }\n  }\n\n  handleClick = (ev: MouseEvent) => {\n    let { props, context } = this\n    let { moreLinkClick } = context.options\n    let date = computeRange(props).start\n\n    function buildPublicSeg(seg: Seg) {\n      let { def, instance, range } = seg.eventRange\n      return {\n        event: new EventApi(context, def, instance),\n        start: context.dateEnv.toDate(range.start),\n        end: context.dateEnv.toDate(range.end),\n        isStart: seg.isStart,\n        isEnd: seg.isEnd,\n      }\n    }\n\n    if (typeof moreLinkClick === 'function') {\n      moreLinkClick = moreLinkClick({\n        date,\n        allDay: Boolean(props.allDayDate),\n        allSegs: props.allSegs.map(buildPublicSeg),\n        hiddenSegs: props.hiddenSegs.map(buildPublicSeg),\n        jsEvent: ev,\n        view: context.viewApi,\n      }) as string | undefined\n    }\n\n    if (!moreLinkClick || moreLinkClick === 'popover') {\n      this.setState({ isPopoverOpen: true })\n    } else if (typeof moreLinkClick === 'string') { // a view name\n      context.calendarApi.zoomTo(date, moreLinkClick)\n    }\n  }\n\n  handlePopoverClose = () => {\n    this.setState({ isPopoverOpen: false })\n  }\n}\n\nfunction renderMoreLinkInner(props: MoreLinkContentArg) {\n  return props.text\n}\n\nfunction computeRange(props: MoreLinkRootProps): DateRange {\n  if (props.allDayDate) {\n    return {\n      start: props.allDayDate,\n      end: addDays(props.allDayDate, 1),\n    }\n  }\n\n  let { hiddenSegs } = props\n  return {\n    start: computeEarliestSegStart(hiddenSegs),\n    end: computeLatestSegEnd(hiddenSegs),\n  }\n}\n\nexport function computeEarliestSegStart(segs: Seg[]): DateMarker {\n  return segs.reduce(pickEarliestStart).eventRange.range.start\n}\n\nfunction pickEarliestStart(seg0: Seg, seg1: Seg): Seg {\n  return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1\n}\n\nfunction computeLatestSegEnd(segs: Seg[]): DateMarker {\n  return segs.reduce(pickLatestEnd).eventRange.range.end\n}\n\nfunction pickLatestEnd(seg0: Seg, seg1: Seg): Seg {\n  return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1\n}\n","import './main.css'\n\n// exports\n// --------------------------------------------------------------------------------------------------\n\nexport const version: string = '<%= version %>' // important to type it, so .d.ts has generic string\n\n// explicit API\nexport { EventSourceApi } from './api/EventSourceApi'\nexport { EventApi, buildEventApis } from './api/EventApi'\nexport { CalendarApi } from './CalendarApi'\nexport { formatDate, formatRange, FormatDateOptions, FormatRangeOptions } from './formatting-api'\nexport { ViewApi } from './ViewApi'\nexport * from './api-type-deps'\n\nexport { // things for plugins. everything else is exported in api-type-deps\n  BASE_OPTION_DEFAULTS, BASE_OPTION_REFINERS, identity, Identity, Dictionary, refineProps,\n  BaseOptionRefiners, BaseOptionsRefined, CalendarOptionRefiners, CalendarOptionsRefined,\n  ViewOptionRefiners, ViewOptionsRefined, RawOptionsFromRefiners, RefinedOptionsFromRefiners,\n  CalendarListenerRefiners,\n} from './options'\n\nexport { EventDef, EventDefHash } from './structs/event-def'\nexport { EventInstance, EventInstanceHash, createEventInstance } from './structs/event-instance'\nexport { EventInput, EventRefined, parseEventDef, EventTuple, EventRefiners, refineEventDef } from './structs/event-parse'\nexport { BusinessHoursInput, parseBusinessHours } from './structs/business-hours'\n\nexport {\n  padStart,\n  isInt,\n  parseFieldSpecs,\n  compareByFieldSpecs,\n  compareByFieldSpec,\n  flexibleCompare,\n  preventSelection, allowSelection, preventContextMenu, allowContextMenu,\n  compareNumbers, enableCursor, disableCursor,\n  guid,\n  computeSmallestCellWidth,\n  OrderSpec,\n} from './util/misc'\n\nexport {\n  computeVisibleDayRange,\n  isMultiDayRange,\n  diffDates,\n} from './util/date'\n\nexport {\n  removeExact,\n  isArraysEqual,\n} from './util/array'\n\nexport { memoize, memoizeObjArg, memoizeArraylike, memoizeHashlike, MemoizeHashFunc, MemoiseArrayFunc } from './util/memoize'\n\nexport {\n  intersectRects,\n  Rect, pointInsideRect,\n  constrainPoint,\n  getRectCenter, diffPoints, Point,\n  translateRect,\n} from './util/geom'\n\nexport { mapHash, filterHash, isPropsEqual, compareObjs, buildHashFromArray, collectFromHash, getUnequalProps } from './util/object'\n\nexport {\n  findElements,\n  findDirectChildren,\n  removeElement,\n  applyStyle,\n  applyStyleProp,\n  elementMatches,\n  elementClosest,\n  getElRoot,\n  getEventTargetViaRoot,\n  getUniqueDomId,\n} from './util/dom-manip'\nexport { parseClassNames } from './util/html'\n\nexport { getCanVGrowWithinCell } from './util/table-styling'\n\nexport {\n  EventStore,\n  filterEventStoreDefs,\n  createEmptyEventStore,\n  mergeEventStores,\n  getRelevantEvents,\n  eventTupleToStore,\n} from './structs/event-store'\nexport { EventUiHash, EventUi, combineEventUis, createEventUi } from './component/event-ui'\nexport { Splitter, SplittableProps } from './component/event-splitting'\nexport { getDayClassNames, getDateMeta, DateMeta, getSlotClassNames } from './component/date-rendering'\nexport { buildNavLinkAttrs } from './common/nav-link'\n\nexport {\n  preventDefault,\n  listenBySelector,\n  whenTransitionDone,\n  createAriaClickAttrs,\n} from './util/dom-event'\n\nexport {\n  computeInnerRect,\n  computeEdges,\n  computeHeightAndMargins,\n  getClippingParents,\n  computeRect,\n} from './util/dom-geom'\n\nexport { unpromisify } from './util/promise'\n\nexport { Emitter } from './common/Emitter'\nexport { DateRange, rangeContainsMarker, intersectRanges, rangesEqual, rangesIntersect, rangeContainsRange } from './datelib/date-range'\nexport { PositionCache } from './common/PositionCache'\nexport { ScrollController, ElementScrollController, WindowScrollController } from './common/scroll-controller'\nexport { Theme } from './theme/Theme'\nexport { ViewContext, ViewContextType } from './ViewContext'\nexport { DateComponent, Seg, EventSegUiInteractionState } from './component/DateComponent'\nexport { CalendarData } from './reducers/data-types'\nexport { CalendarDataManager } from './reducers/CalendarDataManager'\nexport { CalendarDataProvider, CalendarDataProviderProps } from './component/CalendarDataProvider'\nexport { ViewProps, sliceEvents } from './View'\n\nexport { DateProfileGenerator, DateProfile } from './DateProfileGenerator'\nexport { ViewDef } from './structs/view-def'\nexport { ViewSpec } from './structs/view-spec'\nexport { DateSpan, DateSpanApi, DatePointApi, isDateSpansEqual } from './structs/date-span'\n\nexport {\n  DateMarker,\n  addDays,\n  startOfDay,\n  addMs,\n  addWeeks,\n  diffWeeks,\n  diffWholeWeeks,\n  diffWholeDays,\n  diffDayAndTime,\n  diffDays,\n  isValidDate,\n} from './datelib/marker'\nexport {\n  Duration, createDuration,\n  asCleanDays, multiplyDuration, addDurations,\n  asRoughMinutes, asRoughSeconds, asRoughMs,\n  wholeDivideDurations, greatestDurationDenominator,\n} from './datelib/duration'\nexport { DateEnv, DateMarkerMeta } from './datelib/env'\n\nexport {\n  createFormatter,\n  FormatterInput,\n} from './datelib/formatting'\nexport {\n  DateFormatter,\n  VerboseFormattingArg,\n} from './datelib/DateFormatter'\nexport {\n  formatIsoTimeString,\n  formatDayString,\n  buildIsoString,\n} from './datelib/formatting-utils'\nexport { NamedTimeZoneImpl } from './datelib/timezone'\nexport { parse as parseMarker } from './datelib/parsing'\nexport { LocaleInput } from './datelib/locale'\n\nexport { EventSourceDef } from './structs/event-source-def'\nexport { EventSource, EventSourceHash } from './structs/event-source'\nexport { EventSourceRefiners, EventSourceRefined } from './structs/event-source-parse'\n\nexport {\n  SegSpan, SegRect, SegHierarchy, SegEntry, SegInsertion, buildEntryKey,\n  getEntrySpanEnd, binarySearch, SegEntryGroup, groupIntersectingEntries,\n  joinSpans, intersectSpans,\n} from './seg-hierarchy'\n\nexport {\n  Interaction,\n  InteractionSettings,\n  interactionSettingsToStore,\n  interactionSettingsStore,\n  InteractionSettingsStore,\n} from './interactions/interaction'\nexport { PointerDragEvent } from './interactions/pointer'\nexport { Hit } from './interactions/hit'\nexport { dateSelectionJoinTransformer } from './interactions/date-selecting'\nexport { eventDragMutationMassager, EventDropTransformers } from './interactions/event-dragging'\nexport { ElementDragging } from './interactions/ElementDragging'\n\nexport { config } from './global-config'\nexport { globalLocales } from './global-locales'\n\nexport { RecurringType, ParsedRecurring } from './structs/recurring-event'\n\nexport { DragMetaInput, DragMeta, parseDragMeta } from './structs/drag-meta'\n\nexport { PluginDef, PluginDefInput, ViewPropsTransformer, ViewContainerAppend } from './plugin-system-struct'\nexport { createPlugin } from './plugin-system'\nexport { Action } from './reducers/Action'\nexport { CalendarContext } from './CalendarContext'\nexport { CalendarContentProps, CalendarContent } from './CalendarContent'\nexport { CalendarRoot } from './CalendarRoot'\n\nexport { DayHeader } from './common/DayHeader'\nexport { computeFallbackHeaderFormat } from './common/table-utils'\nexport { TableDateCell } from './common/TableDateCell'\nexport { TableDowCell } from './common/TableDowCell'\n\nexport { DaySeriesModel } from './common/DaySeriesModel'\n\nexport { EventInteractionState } from './interactions/event-interaction-state'\nexport {\n  EventRenderRange, sliceEventStore, hasBgRendering, setElSeg, getElSeg,\n  computeSegDraggable, computeSegStartResizable, computeSegEndResizable,\n  getEventClassNames, buildSegTimeText,\n  buildSegCompareObj, sortEventSegs,\n  getSegMeta, EventContentArg, buildEventRangeKey,\n  getSegAnchorAttrs,\n} from './component/event-rendering'\n\nexport { DayTableModel, DayTableSeg, DayTableCell } from './common/DayTableModel'\n\nexport { Slicer, SlicedProps } from './common/slicing-utils'\n\nexport { EventMutation, applyMutationToEventStore } from './structs/event-mutation'\nexport { Constraint, ConstraintInput, AllowFunc } from './structs/constraint'\nexport { isPropsValid, isInteractionValid, isDateSelectionValid } from './validation'\n\nexport { requestJson } from './util/requestJson'\n\nexport * from './vdom'\nexport { BaseComponent, setRef } from './vdom-util'\nexport { DelayedRunner } from './util/DelayedRunner'\n\nexport {\n  ScrollGridProps,\n  ScrollGridSectionConfig,\n  ColGroupConfig,\n  ScrollGridImpl,\n  ScrollGridChunkConfig,\n} from './scrollgrid/ScrollGridImpl'\nexport { SimpleScrollGrid, SimpleScrollGridSection } from './scrollgrid/SimpleScrollGrid'\nexport {\n  CssDimValue, ScrollerLike, SectionConfig, ColProps, ChunkConfig, hasShrinkWidth, renderMicroColGroup,\n  getScrollGridClassNames, getSectionClassNames, getSectionHasLiquidHeight, getAllowYScrolling, renderChunkContent, computeShrinkWidth,\n  ChunkContentCallbackArgs,\n  sanitizeShrinkWidth,\n  ChunkConfigRowContent, ChunkConfigContent,\n  isColPropsEqual,\n  renderScrollShim,\n  getStickyFooterScrollbar,\n  getStickyHeaderDates,\n} from './scrollgrid/util'\nexport { Scroller, ScrollerProps, OverflowValue } from './scrollgrid/Scroller'\nexport { getScrollbarWidths } from './util/scrollbar-width'\nexport { RefMap } from './util/RefMap'\nexport { getIsRtlScrollbarOnLeft } from './util/scrollbar-side'\n\nexport { NowTimer } from './NowTimer'\nexport { ScrollResponder, ScrollRequest } from './ScrollResponder'\nexport { globalPlugins } from './global-plugins'\nexport {\n  RenderHook, RenderHookProps, RenderHookPropsChildren, MountHook, MountHookProps, buildClassNameNormalizer, ContentHook,\n  CustomContentRenderContext, ClassNamesGenerator, CustomContentGenerator, DidMountHandler, WillUnmountHandler, MountArg,\n} from './common/render-hook'\nexport { StandardEvent, StandardEventProps } from './common/StandardEvent'\nexport { NowIndicatorRoot, NowIndicatorRootProps } from './common/NowIndicatorRoot'\n\nexport { DayCellRoot, DayCellRootProps, DayCellContentArg } from './common/DayCellRoot'\nexport { DayCellContent, DayCellContentProps } from './common/DayCellContent'\nexport { EventRoot, MinimalEventProps } from './common/EventRoot'\nexport { renderFill, BgEvent, BgEventProps } from './common/bg-fill'\nexport { WeekNumberRoot, WeekNumberRootProps } from './common/WeekNumberRoot'\nexport { MoreLinkRoot, MoreLinkRootProps, MoreLinkContentArg, MoreLinkMountArg, computeEarliestSegStart } from './common/MoreLinkRoot'\n\nexport { ViewRoot, ViewRootProps } from './common/ViewRoot'\nexport { triggerDateSelect, DatePointTransform, DateSpanTransform, DateSelectionApi, getDefaultEventEnd } from './calendar-utils'\n","import {\n  CalendarOptions, Action, CalendarContent, render, createElement, DelayedRunner, CssDimValue, applyStyleProp,\n  CalendarApi, CalendarRoot, isArraysEqual, CalendarDataManager, CalendarData,\n  CustomContentRenderContext, flushSync, unmountComponentAtNode,\n} from '@fullcalendar/common'\n\nexport class Calendar extends CalendarApi {\n  currentData: CalendarData\n  renderRunner: DelayedRunner\n  el: HTMLElement\n  isRendering = false\n  isRendered = false\n  currentClassNames: string[] = []\n  customContentRenderId = 0 // will affect custom generated classNames?\n\n  get view() { return this.currentData.viewApi } // for public API\n\n  constructor(el: HTMLElement, optionOverrides: CalendarOptions = {}) {\n    super()\n\n    this.el = el\n    this.renderRunner = new DelayedRunner(this.handleRenderRequest)\n\n    new CalendarDataManager({ // eslint-disable-line no-new\n      optionOverrides,\n      calendarApi: this,\n      onAction: this.handleAction,\n      onData: this.handleData,\n    })\n  }\n\n  handleAction = (action: Action) => {\n    // actions we know we want to render immediately\n    switch (action.type) {\n      case 'SET_EVENT_DRAG':\n      case 'SET_EVENT_RESIZE':\n        this.renderRunner.tryDrain()\n    }\n  }\n\n  handleData = (data: CalendarData) => {\n    this.currentData = data\n    this.renderRunner.request(data.calendarOptions.rerenderDelay)\n  }\n\n  handleRenderRequest = () => {\n    if (this.isRendering) {\n      this.isRendered = true\n      let { currentData } = this\n\n      flushSync(() => {\n        render(\n          <CalendarRoot options={currentData.calendarOptions} theme={currentData.theme} emitter={currentData.emitter}>\n            {(classNames, height, isHeightAuto, forPrint) => {\n              this.setClassNames(classNames)\n              this.setHeight(height)\n\n              return (\n                <CustomContentRenderContext.Provider value={this.customContentRenderId}>\n                  <CalendarContent\n                    isHeightAuto={isHeightAuto}\n                    forPrint={forPrint}\n                    {...currentData}\n                  />\n                </CustomContentRenderContext.Provider>\n              )\n            }}\n          </CalendarRoot>,\n          this.el,\n        )\n      })\n    } else if (this.isRendered) {\n      this.isRendered = false\n      unmountComponentAtNode(this.el)\n      this.setClassNames([])\n      this.setHeight('')\n    }\n  }\n\n  render() {\n    let wasRendering = this.isRendering\n\n    if (!wasRendering) {\n      this.isRendering = true\n    } else {\n      this.customContentRenderId += 1\n    }\n\n    this.renderRunner.request()\n\n    if (wasRendering) {\n      this.updateSize()\n    }\n  }\n\n  destroy() {\n    if (this.isRendering) {\n      this.isRendering = false\n      this.renderRunner.request()\n    }\n  }\n\n  updateSize() {\n    flushSync(() => {\n      super.updateSize()\n    })\n  }\n\n  batchRendering(func) {\n    this.renderRunner.pause('batchRendering')\n    func()\n    this.renderRunner.resume('batchRendering')\n  }\n\n  pauseRendering() { // available to plugins\n    this.renderRunner.pause('pauseRendering')\n  }\n\n  resumeRendering() { // available to plugins\n    this.renderRunner.resume('pauseRendering', true)\n  }\n\n  resetOptions(optionOverrides, append?) {\n    this.currentDataManager.resetOptions(optionOverrides, append)\n  }\n\n  setClassNames(classNames: string[]) {\n    if (!isArraysEqual(classNames, this.currentClassNames)) {\n      let { classList } = this.el\n\n      for (let className of this.currentClassNames) {\n        classList.remove(className)\n      }\n\n      for (let className of classNames) {\n        classList.add(className)\n      }\n\n      this.currentClassNames = classNames\n    }\n  }\n\n  setHeight(height: CssDimValue) {\n    applyStyleProp(this.el, 'height', height)\n  }\n}\n","import {\n  VNode, createElement,\n  SimpleScrollGrid,\n  SimpleScrollGridSection,\n  ChunkContentCallbackArgs,\n  createRef,\n  ScrollGridSectionConfig,\n  ViewRoot,\n  DateComponent,\n  ViewProps,\n  RefObject,\n  renderScrollShim,\n  getStickyHeaderDates,\n  getStickyFooterScrollbar,\n  ChunkConfigRowContent,\n  Dictionary,\n} from '@fullcalendar/common'\n\n/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.\n----------------------------------------------------------------------------------------------------------------------*/\n// It is a manager for a Table subcomponent, which does most of the heavy lifting.\n// It is responsible for managing width/height.\n\nexport abstract class TableView<State=Dictionary> extends DateComponent<ViewProps, State> {\n  protected headerElRef: RefObject<HTMLTableCellElement> = createRef<HTMLTableCellElement>()\n\n  renderSimpleLayout(\n    headerRowContent: ChunkConfigRowContent,\n    bodyContent: (contentArg: ChunkContentCallbackArgs) => VNode,\n  ) {\n    let { props, context } = this\n    let sections: SimpleScrollGridSection[] = []\n    let stickyHeaderDates = getStickyHeaderDates(context.options)\n\n    if (headerRowContent) {\n      sections.push({\n        type: 'header',\n        key: 'header',\n        isSticky: stickyHeaderDates,\n        chunk: {\n          elRef: this.headerElRef,\n          tableClassName: 'fc-col-header',\n          rowContent: headerRowContent,\n        },\n      })\n    }\n\n    sections.push({\n      type: 'body',\n      key: 'body',\n      liquid: true,\n      chunk: { content: bodyContent },\n    })\n\n    return (\n      <ViewRoot viewSpec={context.viewSpec}>\n        {(rootElRef, classNames) => (\n          <div ref={rootElRef} className={['fc-daygrid'].concat(classNames).join(' ')}>\n            <SimpleScrollGrid\n              liquid={!props.isHeightAuto && !props.forPrint}\n              collapsibleWidth={props.forPrint}\n              cols={[] /* TODO: make optional? */}\n              sections={sections}\n            />\n          </div>\n        )}\n      </ViewRoot>\n    )\n  }\n\n  renderHScrollLayout(\n    headerRowContent: ChunkConfigRowContent,\n    bodyContent: (contentArg: ChunkContentCallbackArgs) => VNode,\n    colCnt: number,\n    dayMinWidth: number,\n  ) {\n    let ScrollGrid = this.context.pluginHooks.scrollGridImpl\n\n    if (!ScrollGrid) {\n      throw new Error('No ScrollGrid implementation')\n    }\n\n    let { props, context } = this\n    let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options)\n    let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options)\n    let sections: ScrollGridSectionConfig[] = []\n\n    if (headerRowContent) {\n      sections.push({\n        type: 'header',\n        key: 'header',\n        isSticky: stickyHeaderDates,\n        chunks: [{\n          key: 'main',\n          elRef: this.headerElRef,\n          tableClassName: 'fc-col-header',\n          rowContent: headerRowContent,\n        }],\n      })\n    }\n\n    sections.push({\n      type: 'body',\n      key: 'body',\n      liquid: true,\n      chunks: [{\n        key: 'main',\n        content: bodyContent,\n      }],\n    })\n\n    if (stickyFooterScrollbar) {\n      sections.push({\n        type: 'footer',\n        key: 'footer',\n        isSticky: true,\n        chunks: [{\n          key: 'main',\n          content: renderScrollShim,\n        }],\n      })\n    }\n\n    return (\n      <ViewRoot viewSpec={context.viewSpec}>\n        {(rootElRef, classNames) => (\n          <div ref={rootElRef} className={['fc-daygrid'].concat(classNames).join(' ')}>\n            <ScrollGrid\n              liquid={!props.isHeightAuto && !props.forPrint}\n              collapsibleWidth={props.forPrint}\n              colGroups={[{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }]}\n              sections={sections}\n            />\n          </div>\n        )}\n      </ViewRoot>\n    )\n  }\n}\n","import { EventSegUiInteractionState, Seg } from '@fullcalendar/common'\n\n// this is a DATA STRUCTURE, not a component\n\nexport interface TableSeg extends Seg {\n  row: number\n  firstCol: number\n  lastCol: number\n}\n\nexport function splitSegsByRow(segs: TableSeg[], rowCnt: number) {\n  let byRow: TableSeg[][] = []\n\n  for (let i = 0; i < rowCnt; i += 1) {\n    byRow[i] = []\n  }\n\n  for (let seg of segs) {\n    byRow[seg.row].push(seg)\n  }\n\n  return byRow\n}\n\nexport function splitSegsByFirstCol(segs: TableSeg[], colCnt: number) {\n  let byCol: TableSeg[][] = []\n\n  for (let i = 0; i < colCnt; i += 1) {\n    byCol[i] = []\n  }\n\n  for (let seg of segs) {\n    byCol[seg.firstCol].push(seg)\n  }\n\n  return byCol\n}\n\nexport function splitInteractionByRow(ui: EventSegUiInteractionState | null, rowCnt: number) {\n  let byRow: EventSegUiInteractionState[] = []\n\n  if (!ui) {\n    for (let i = 0; i < rowCnt; i += 1) {\n      byRow[i] = null\n    }\n  } else {\n    for (let i = 0; i < rowCnt; i += 1) {\n      byRow[i] = {\n        affectedInstances: ui.affectedInstances,\n        isEvent: ui.isEvent,\n        segs: [],\n      }\n    }\n\n    for (let seg of ui.segs) {\n      byRow[seg.row].segs.push(seg)\n    }\n  }\n\n  return byRow\n}\n","import {\n  createElement,\n  DateMarker,\n  DateRange,\n  DayCellContentArg,\n  DayCellContent,\n  BaseComponent,\n  DateProfile,\n  Dictionary,\n  Fragment,\n  buildNavLinkAttrs,\n} from '@fullcalendar/common'\n\ninterface TableCellTopProps {\n  date: DateMarker\n  dateProfile: DateProfile\n  showDayNumber: boolean\n  dayNumberId: string\n  forceDayTop: boolean // hack to force-create an element with height (created by a nbsp)\n  todayRange: DateRange\n  extraHookProps?: Dictionary\n}\n\nexport class TableCellTop extends BaseComponent<TableCellTopProps> {\n  render() {\n    let { props } = this\n    let navLinkAttrs = buildNavLinkAttrs(this.context, props.date)\n\n    return (\n      <DayCellContent\n        date={props.date}\n        dateProfile={props.dateProfile}\n        todayRange={props.todayRange}\n        showDayNumber={props.showDayNumber}\n        extraHookProps={props.extraHookProps}\n        defaultContent={renderTopInner}\n      >\n        {(innerElRef, innerContent) => (\n          (innerContent || props.forceDayTop) && (\n            <div className=\"fc-daygrid-day-top\" ref={innerElRef}>\n              <a\n                id={props.dayNumberId}\n                className=\"fc-daygrid-day-number\"\n                {...navLinkAttrs}\n              >\n                {innerContent || <Fragment>&nbsp;</Fragment>}\n              </a>\n            </div>\n          )\n        )}\n      </DayCellContent>\n    )\n  }\n}\n\nfunction renderTopInner(props: DayCellContentArg) {\n  return props.dayNumberText\n}\n","import { createFormatter } from '@fullcalendar/common'\nimport { TableSeg } from './TableSeg'\n\nexport const DEFAULT_TABLE_EVENT_TIME_FORMAT = createFormatter({\n  hour: 'numeric',\n  minute: '2-digit',\n  omitZeroMinute: true,\n  meridiem: 'narrow',\n})\n\nexport function hasListItemDisplay(seg: TableSeg) {\n  let { display } = seg.eventRange.ui\n\n  return display === 'list-item' || (\n    display === 'auto' &&\n    !seg.eventRange.def.allDay &&\n    seg.firstCol === seg.lastCol && // can't be multi-day\n    seg.isStart && // \"\n    seg.isEnd // \"\n  )\n}\n","import { createElement, StandardEvent, BaseComponent, MinimalEventProps } from '@fullcalendar/common'\nimport { DEFAULT_TABLE_EVENT_TIME_FORMAT } from './event-rendering'\n\nexport interface TableBlockEventProps extends MinimalEventProps {\n  defaultDisplayEventEnd: boolean\n}\n\nexport class TableBlockEvent extends BaseComponent<TableBlockEventProps> {\n  render() {\n    let { props } = this\n\n    return (\n      <StandardEvent\n        {...props}\n        extraClassNames={['fc-daygrid-event', 'fc-daygrid-block-event', 'fc-h-event']}\n        defaultTimeFormat={DEFAULT_TABLE_EVENT_TIME_FORMAT}\n        defaultDisplayEventEnd={props.defaultDisplayEventEnd}\n        disableResizing={!props.seg.eventRange.def.allDay}\n      />\n    )\n  }\n}\n","import {\n  createElement,\n  BaseComponent,\n  Seg,\n  EventRoot,\n  buildSegTimeText,\n  EventContentArg,\n  Fragment,\n  getSegAnchorAttrs,\n} from '@fullcalendar/common'\nimport { DEFAULT_TABLE_EVENT_TIME_FORMAT } from './event-rendering'\n\nexport interface DotTableEventProps {\n  seg: Seg\n  isDragging: boolean\n  isSelected: boolean\n  isPast: boolean\n  isFuture: boolean\n  isToday: boolean\n  defaultDisplayEventEnd: boolean\n}\n\nexport class TableListItemEvent extends BaseComponent<DotTableEventProps> {\n  render() {\n    let { props, context } = this\n    let timeFormat = context.options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT\n    let timeText = buildSegTimeText(\n      props.seg,\n      timeFormat,\n      context,\n      true,\n      props.defaultDisplayEventEnd,\n    )\n\n    return (\n      <EventRoot\n        seg={props.seg}\n        timeText={timeText}\n        defaultContent={renderInnerContent}\n        isDragging={props.isDragging}\n        isResizing={false}\n        isDateSelecting={false}\n        isSelected={props.isSelected}\n        isPast={props.isPast}\n        isFuture={props.isFuture}\n        isToday={props.isToday}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent) => ( // we don't use styles!\n          <a\n            className={['fc-daygrid-event', 'fc-daygrid-dot-event'].concat(classNames).join(' ')}\n            ref={rootElRef}\n            {...getSegAnchorAttrs(props.seg, context)}\n          >\n            {innerContent}\n          </a>\n        )}\n      </EventRoot>\n    )\n  }\n}\n\nfunction renderInnerContent(innerProps: EventContentArg) {\n  return (\n    <Fragment>\n      <div\n        className=\"fc-daygrid-event-dot\"\n        style={{ borderColor: innerProps.borderColor || innerProps.backgroundColor }}\n      />\n      {innerProps.timeText && (\n        <div className=\"fc-event-time\">{innerProps.timeText}</div>\n      )}\n      <div className=\"fc-event-title\">\n        {innerProps.event.title || <Fragment>&nbsp;</Fragment>}\n      </div>\n    </Fragment>\n  )\n}\n","import {\n  createElement,\n  MoreLinkRoot,\n  RefObject,\n  BaseComponent,\n  memoize,\n  DateMarker,\n  Dictionary,\n  DateProfile,\n  DateRange,\n  EventSegUiInteractionState,\n  getSegMeta,\n  Fragment,\n  createAriaClickAttrs,\n} from '@fullcalendar/common'\nimport { TableSegPlacement } from './event-placement'\nimport { hasListItemDisplay } from './event-rendering'\nimport { TableBlockEvent } from './TableBlockEvent'\nimport { TableListItemEvent } from './TableListItemEvent'\nimport { TableSeg } from './TableSeg'\n\nexport interface TableCellMoreLinkProps {\n  allDayDate: DateMarker\n  singlePlacements: TableSegPlacement[]\n  moreCnt: number\n  alignmentElRef: RefObject<HTMLElement> // for popover\n  alignGridTop: boolean // for popover\n  extraDateSpan?: Dictionary\n  dateProfile: DateProfile\n  todayRange: DateRange\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n}\n\nexport class TableCellMoreLink extends BaseComponent<TableCellMoreLinkProps> {\n  compileSegs = memoize(compileSegs)\n\n  render() {\n    let { props } = this\n    let { allSegs, invisibleSegs } = this.compileSegs(props.singlePlacements)\n\n    return (\n      <MoreLinkRoot\n        dateProfile={props.dateProfile}\n        todayRange={props.todayRange}\n        allDayDate={props.allDayDate}\n        moreCnt={props.moreCnt}\n        allSegs={allSegs}\n        hiddenSegs={invisibleSegs}\n        alignmentElRef={props.alignmentElRef}\n        alignGridTop={props.alignGridTop}\n        extraDateSpan={props.extraDateSpan}\n        popoverContent={() => {\n          let isForcedInvisible =\n            (props.eventDrag ? props.eventDrag.affectedInstances : null) ||\n            (props.eventResize ? props.eventResize.affectedInstances : null) ||\n            {}\n          return (\n            <Fragment>\n              {allSegs.map((seg) => {\n                let instanceId = seg.eventRange.instance.instanceId\n                return (\n                  <div\n                    className=\"fc-daygrid-event-harness\"\n                    key={instanceId}\n                    style={{\n                      visibility: isForcedInvisible[instanceId] ? 'hidden' : ('' as any),\n                    }}\n                  >\n                    {hasListItemDisplay(seg) ? (\n                      <TableListItemEvent\n                        seg={seg}\n                        isDragging={false}\n                        isSelected={instanceId === props.eventSelection}\n                        defaultDisplayEventEnd={false}\n                        {...getSegMeta(seg, props.todayRange)}\n                      />\n                    ) : (\n                      <TableBlockEvent\n                        seg={seg}\n                        isDragging={false}\n                        isResizing={false}\n                        isDateSelecting={false}\n                        isSelected={instanceId === props.eventSelection}\n                        defaultDisplayEventEnd={false}\n                        {...getSegMeta(seg, props.todayRange)}\n                      />\n                    )}\n                  </div>\n                )\n              })}\n            </Fragment>\n          )\n        }}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) => (\n          <a\n            ref={rootElRef}\n            className={['fc-daygrid-more-link'].concat(classNames).join(' ')}\n            title={title}\n            aria-expanded={isExpanded}\n            aria-controls={popoverId}\n            {...createAriaClickAttrs(handleClick)}\n          >\n            {innerContent}\n          </a>\n        )}\n      </MoreLinkRoot>\n    )\n  }\n}\n\nfunction compileSegs(singlePlacements: TableSegPlacement[]): {\n  allSegs: TableSeg[]\n  invisibleSegs: TableSeg[]\n} {\n  let allSegs: TableSeg[] = []\n  let invisibleSegs: TableSeg[] = []\n\n  for (let placement of singlePlacements) {\n    allSegs.push(placement.seg)\n\n    if (!placement.isVisible) {\n      invisibleSegs.push(placement.seg)\n    }\n  }\n\n  return { allSegs, invisibleSegs }\n}\n","import {\n  Ref,\n  ComponentChildren,\n  createElement,\n  DateMarker,\n  DateComponent,\n  DateRange,\n  buildNavLinkAttrs,\n  WeekNumberRoot,\n  DayCellRoot,\n  DateProfile,\n  setRef,\n  createFormatter,\n  Dictionary,\n  createRef,\n  EventSegUiInteractionState,\n  getUniqueDomId,\n} from '@fullcalendar/common'\nimport { TableCellTop } from './TableCellTop'\nimport { TableCellMoreLink } from './TableCellMoreLink'\nimport { TableSegPlacement } from './event-placement'\n\nexport interface TableCellProps {\n  date: DateMarker\n  dateProfile: DateProfile\n  extraHookProps?: Dictionary\n  extraDataAttrs?: Dictionary\n  extraClassNames?: string[]\n  extraDateSpan?: Dictionary\n  elRef?: Ref<HTMLTableCellElement>\n  innerElRef?: Ref<HTMLDivElement>\n  bgContent: ComponentChildren\n  fgContentElRef?: Ref<HTMLDivElement> // TODO: rename!!! classname confusion. is the \"event\" div\n  fgContent: ComponentChildren\n  moreCnt: number\n  moreMarginTop: number\n  showDayNumber: boolean\n  showWeekNumber: boolean\n  forceDayTop: boolean\n  todayRange: DateRange\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n  singlePlacements: TableSegPlacement[]\n}\n\nconst DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'narrow' })\n\nexport class TableCell extends DateComponent<TableCellProps> {\n  private rootElRef = createRef<HTMLElement>()\n  state = {\n    dayNumberId: getUniqueDomId(),\n  }\n\n  render() {\n    let { context, props, state, rootElRef } = this\n    let { date, dateProfile } = props\n    let navLinkAttrs = buildNavLinkAttrs(context, date, 'week')\n\n    return (\n      <DayCellRoot\n        date={date}\n        dateProfile={dateProfile}\n        todayRange={props.todayRange}\n        showDayNumber={props.showDayNumber}\n        extraHookProps={props.extraHookProps}\n        elRef={this.handleRootEl}\n      >\n        {(dayElRef, dayClassNames, rootDataAttrs, isDisabled) => (\n          <td\n            ref={dayElRef}\n            role=\"gridcell\"\n            className={['fc-daygrid-day'].concat(dayClassNames, props.extraClassNames || []).join(' ')}\n            {...rootDataAttrs}\n            {...props.extraDataAttrs}\n            {...(props.showDayNumber ? { 'aria-labelledby': state.dayNumberId } : {})}\n          >\n            <div className=\"fc-daygrid-day-frame fc-scrollgrid-sync-inner\" ref={props.innerElRef /* different from hook system! RENAME */}>\n              {props.showWeekNumber && (\n                <WeekNumberRoot date={date} defaultFormat={DEFAULT_WEEK_NUM_FORMAT}>\n                  {(weekElRef, weekClassNames, innerElRef, innerContent) => (\n                    <a\n                      ref={weekElRef}\n                      className={['fc-daygrid-week-number'].concat(weekClassNames).join(' ')}\n                      {...navLinkAttrs}\n                    >\n                      {innerContent}\n                    </a>\n                  )}\n                </WeekNumberRoot>\n              )}\n              {!isDisabled && (\n                <TableCellTop\n                  date={date}\n                  dateProfile={dateProfile}\n                  showDayNumber={props.showDayNumber}\n                  dayNumberId={state.dayNumberId}\n                  forceDayTop={props.forceDayTop}\n                  todayRange={props.todayRange}\n                  extraHookProps={props.extraHookProps}\n                />\n              )}\n              <div\n                className=\"fc-daygrid-day-events\"\n                ref={props.fgContentElRef}\n              >\n                {props.fgContent}\n                <div className=\"fc-daygrid-day-bottom\" style={{ marginTop: props.moreMarginTop }}>\n                  <TableCellMoreLink\n                    allDayDate={date}\n                    singlePlacements={props.singlePlacements}\n                    moreCnt={props.moreCnt}\n                    alignmentElRef={rootElRef}\n                    alignGridTop={!props.showDayNumber}\n                    extraDateSpan={props.extraDateSpan}\n                    dateProfile={props.dateProfile}\n                    eventSelection={props.eventSelection}\n                    eventDrag={props.eventDrag}\n                    eventResize={props.eventResize}\n                    todayRange={props.todayRange}\n                  />\n                </div>\n              </div>\n              <div className=\"fc-daygrid-day-bg\">\n                {props.bgContent}\n              </div>\n            </div>\n          </td>\n        )}\n      </DayCellRoot>\n    )\n  }\n\n  handleRootEl = (el: HTMLElement) => {\n    setRef(this.rootElRef, el)\n    setRef(this.props.elRef, el)\n  }\n}\n","import {\n  SegHierarchy,\n  SegRect,\n  SegEntry,\n  SegInsertion,\n  buildEntryKey,\n  EventRenderRange,\n  intersectRanges,\n  addDays,\n  DayTableCell,\n  intersectSpans,\n} from '@fullcalendar/common'\nimport { TableSeg } from './TableSeg'\n\nexport interface TableSegPlacement {\n  seg: TableSeg\n  isVisible: boolean\n  isAbsolute: boolean\n  absoluteTop: number // populated regardless of isAbsolute\n  marginTop: number\n}\n\nexport function computeFgSegPlacement(\n  segs: TableSeg[], // assumed already sorted\n  dayMaxEvents: boolean | number,\n  dayMaxEventRows: boolean | number,\n  strictOrder: boolean,\n  eventInstanceHeights: { [instanceId: string]: number },\n  maxContentHeight: number | null,\n  cells: DayTableCell[],\n) {\n  let hierarchy = new DayGridSegHierarchy()\n  hierarchy.allowReslicing = true\n  hierarchy.strictOrder = strictOrder\n\n  if (dayMaxEvents === true || dayMaxEventRows === true) {\n    hierarchy.maxCoord = maxContentHeight\n    hierarchy.hiddenConsumes = true\n  } else if (typeof dayMaxEvents === 'number') {\n    hierarchy.maxStackCnt = dayMaxEvents\n  } else if (typeof dayMaxEventRows === 'number') {\n    hierarchy.maxStackCnt = dayMaxEventRows\n    hierarchy.hiddenConsumes = true\n  }\n\n  // create segInputs only for segs with known heights\n  let segInputs: SegEntry[] = []\n  let unknownHeightSegs: TableSeg[] = []\n  for (let i = 0; i < segs.length; i += 1) {\n    let seg = segs[i]\n    let { instanceId } = seg.eventRange.instance\n    let eventHeight = eventInstanceHeights[instanceId]\n\n    if (eventHeight != null) {\n      segInputs.push({\n        index: i,\n        thickness: eventHeight,\n        span: {\n          start: seg.firstCol,\n          end: seg.lastCol + 1,\n        },\n      })\n    } else {\n      unknownHeightSegs.push(seg)\n    }\n  }\n\n  let hiddenEntries = hierarchy.addSegs(segInputs)\n  let segRects = hierarchy.toRects()\n  let { singleColPlacements, multiColPlacements, leftoverMargins } = placeRects(segRects, segs, cells)\n\n  let moreCnts: number[] = []\n  let moreMarginTops: number[] = []\n\n  // add segs with unknown heights\n  for (let seg of unknownHeightSegs) {\n    multiColPlacements[seg.firstCol].push({\n      seg,\n      isVisible: false,\n      isAbsolute: true,\n      absoluteTop: 0,\n      marginTop: 0,\n    })\n\n    for (let col = seg.firstCol; col <= seg.lastCol; col += 1) {\n      singleColPlacements[col].push({\n        seg: resliceSeg(seg, col, col + 1, cells),\n        isVisible: false,\n        isAbsolute: false,\n        absoluteTop: 0,\n        marginTop: 0,\n      })\n    }\n  }\n\n  // add the hidden entries\n  for (let col = 0; col < cells.length; col += 1) {\n    moreCnts.push(0)\n  }\n  for (let hiddenEntry of hiddenEntries) {\n    let seg = segs[hiddenEntry.index]\n    let hiddenSpan = hiddenEntry.span\n\n    multiColPlacements[hiddenSpan.start].push({\n      seg: resliceSeg(seg, hiddenSpan.start, hiddenSpan.end, cells),\n      isVisible: false,\n      isAbsolute: true,\n      absoluteTop: 0,\n      marginTop: 0,\n    })\n\n    for (let col = hiddenSpan.start; col < hiddenSpan.end; col += 1) {\n      moreCnts[col] += 1\n      singleColPlacements[col].push({\n        seg: resliceSeg(seg, col, col + 1, cells),\n        isVisible: false,\n        isAbsolute: false,\n        absoluteTop: 0,\n        marginTop: 0,\n      })\n    }\n  }\n\n  // deal with leftover margins\n  for (let col = 0; col < cells.length; col += 1) {\n    moreMarginTops.push(leftoverMargins[col])\n  }\n\n  return { singleColPlacements, multiColPlacements, moreCnts, moreMarginTops }\n}\n\n// rects ordered by top coord, then left\nfunction placeRects(allRects: SegRect[], segs: TableSeg[], cells: DayTableCell[]) {\n  let rectsByEachCol = groupRectsByEachCol(allRects, cells.length)\n  let singleColPlacements: TableSegPlacement[][] = []\n  let multiColPlacements: TableSegPlacement[][] = []\n  let leftoverMargins: number[] = []\n\n  for (let col = 0; col < cells.length; col += 1) {\n    let rects = rectsByEachCol[col]\n\n    // compute all static segs in singlePlacements\n    let singlePlacements: TableSegPlacement[] = []\n    let currentHeight = 0\n    let currentMarginTop = 0\n    for (let rect of rects) {\n      let seg = segs[rect.index]\n      singlePlacements.push({\n        seg: resliceSeg(seg, col, col + 1, cells),\n        isVisible: true,\n        isAbsolute: false,\n        absoluteTop: rect.levelCoord,\n        marginTop: rect.levelCoord - currentHeight,\n      })\n      currentHeight = rect.levelCoord + rect.thickness\n    }\n\n    // compute mixed static/absolute segs in multiPlacements\n    let multiPlacements: TableSegPlacement[] = []\n    currentHeight = 0\n    currentMarginTop = 0\n    for (let rect of rects) {\n      let seg = segs[rect.index]\n      let isAbsolute = rect.span.end - rect.span.start > 1 // multi-column?\n      let isFirstCol = rect.span.start === col\n\n      currentMarginTop += rect.levelCoord - currentHeight // amount of space since bottom of previous seg\n      currentHeight = rect.levelCoord + rect.thickness // height will now be bottom of current seg\n\n      if (isAbsolute) {\n        currentMarginTop += rect.thickness\n        if (isFirstCol) {\n          multiPlacements.push({\n            seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n            isVisible: true,\n            isAbsolute: true,\n            absoluteTop: rect.levelCoord,\n            marginTop: 0,\n          })\n        }\n      } else if (isFirstCol) {\n        multiPlacements.push({\n          seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n          isVisible: true,\n          isAbsolute: false,\n          absoluteTop: rect.levelCoord,\n          marginTop: currentMarginTop, // claim the margin\n        })\n        currentMarginTop = 0\n      }\n    }\n\n    singleColPlacements.push(singlePlacements)\n    multiColPlacements.push(multiPlacements)\n    leftoverMargins.push(currentMarginTop)\n  }\n\n  return { singleColPlacements, multiColPlacements, leftoverMargins }\n}\n\nfunction groupRectsByEachCol(rects: SegRect[], colCnt: number): SegRect[][] {\n  let rectsByEachCol: SegRect[][] = []\n\n  for (let col = 0; col < colCnt; col += 1) {\n    rectsByEachCol.push([])\n  }\n\n  for (let rect of rects) {\n    for (let col = rect.span.start; col < rect.span.end; col += 1) {\n      rectsByEachCol[col].push(rect)\n    }\n  }\n\n  return rectsByEachCol\n}\n\nfunction resliceSeg(seg: TableSeg, spanStart: number, spanEnd: number, cells: DayTableCell[]): TableSeg {\n  if (seg.firstCol === spanStart && seg.lastCol === spanEnd - 1) {\n    return seg\n  }\n\n  let eventRange = seg.eventRange\n  let origRange = eventRange.range\n  let slicedRange = intersectRanges(origRange, {\n    start: cells[spanStart].date,\n    end: addDays(cells[spanEnd - 1].date, 1),\n  })\n\n  return {\n    ...seg,\n    firstCol: spanStart,\n    lastCol: spanEnd - 1,\n    eventRange: {\n      def: eventRange.def,\n      ui: { ...eventRange.ui, durationEditable: false }, // hack to disable resizing\n      instance: eventRange.instance,\n      range: slicedRange,\n    } as EventRenderRange,\n    isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(),\n    isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf(),\n  }\n}\n\nclass DayGridSegHierarchy extends SegHierarchy {\n  // config\n  hiddenConsumes: boolean = false\n\n  // allows us to keep hidden entries in the hierarchy so they take up space\n  forceHidden: { [entryId: string]: true } = {}\n\n  addSegs(segInputs: SegEntry[]): SegEntry[] {\n    const hiddenSegs = super.addSegs(segInputs)\n    const { entriesByLevel } = this\n    const excludeHidden = (entry: SegEntry) => !this.forceHidden[buildEntryKey(entry)]\n\n    // remove the forced-hidden segs\n    for (let level = 0; level < entriesByLevel.length; level += 1) {\n      entriesByLevel[level] = entriesByLevel[level].filter(excludeHidden)\n    }\n\n    return hiddenSegs\n  }\n\n  handleInvalidInsertion(insertion: SegInsertion, entry: SegEntry, hiddenEntries: SegEntry[]) {\n    const { entriesByLevel, forceHidden } = this\n    const { touchingEntry, touchingLevel, touchingLateral } = insertion\n\n    if (this.hiddenConsumes && touchingEntry) {\n      const touchingEntryId = buildEntryKey(touchingEntry)\n      // if not already hidden\n      if (!forceHidden[touchingEntryId]) {\n        if (this.allowReslicing) {\n          const placeholderEntry: SegEntry = { // placeholder of the \"more\" link\n            ...touchingEntry,\n            span: intersectSpans(touchingEntry.span, entry.span),\n          }\n          const placeholderEntryId = buildEntryKey(placeholderEntry)\n          forceHidden[placeholderEntryId] = true\n          entriesByLevel[touchingLevel][touchingLateral] = placeholderEntry // replace touchingEntry with our placeholder\n          this.splitEntry(touchingEntry, entry, hiddenEntries) // split up the touchingEntry, reinsert it\n        } else {\n          forceHidden[touchingEntryId] = true\n          hiddenEntries.push(touchingEntry)\n        }\n      }\n    }\n\n    return super.handleInvalidInsertion(insertion, entry, hiddenEntries)\n  }\n}\n","import {\n  EventSegUiInteractionState,\n  VNode,\n  DateComponent,\n  createElement,\n  PositionCache,\n  RefMap,\n  CssDimValue,\n  DateRange,\n  getSegMeta,\n  DateProfile,\n  Fragment,\n  BgEvent,\n  renderFill,\n  isPropsEqual,\n  createRef,\n  buildEventRangeKey,\n  sortEventSegs,\n  DayTableCell,\n} from '@fullcalendar/common'\nimport { TableSeg, splitSegsByFirstCol } from './TableSeg'\nimport { TableCell } from './TableCell'\nimport { TableListItemEvent } from './TableListItemEvent'\nimport { TableBlockEvent } from './TableBlockEvent'\nimport { computeFgSegPlacement, TableSegPlacement } from './event-placement'\nimport { hasListItemDisplay } from './event-rendering'\n\n// TODO: attach to window resize?\n\nexport interface TableRowProps {\n  cells: DayTableCell[]\n  renderIntro?: () => VNode\n  businessHourSegs: TableSeg[]\n  bgEventSegs: TableSeg[]\n  fgEventSegs: TableSeg[]\n  dateSelectionSegs: TableSeg[]\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n  dayMaxEvents: boolean | number\n  dayMaxEventRows: boolean | number\n  clientWidth: number | null\n  clientHeight: number | null // simply for causing an updateSize, for when liquid height\n  dateProfile: DateProfile\n  todayRange: DateRange\n  showDayNumbers: boolean\n  showWeekNumbers: boolean\n  forPrint: boolean\n}\n\ninterface TableRowState {\n  framePositions: PositionCache\n  maxContentHeight: number | null\n  eventInstanceHeights: { [instanceId: string]: number } // integers\n}\n\nexport class TableRow extends DateComponent<TableRowProps, TableRowState> {\n  private cellElRefs = new RefMap<HTMLTableCellElement>() // the <td>\n  private frameElRefs = new RefMap<HTMLElement>() // the fc-daygrid-day-frame\n  private fgElRefs = new RefMap<HTMLDivElement>() // the fc-daygrid-day-events\n  private segHarnessRefs = new RefMap<HTMLDivElement>() // indexed by \"instanceId:firstCol\"\n  private rootElRef = createRef<HTMLTableRowElement>()\n\n  state: TableRowState = {\n    framePositions: null,\n    maxContentHeight: null,\n    eventInstanceHeights: {},\n  }\n\n  render() {\n    let { props, state, context } = this\n    let { options } = context\n    let colCnt = props.cells.length\n\n    let businessHoursByCol = splitSegsByFirstCol(props.businessHourSegs, colCnt)\n    let bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt)\n    let highlightSegsByCol = splitSegsByFirstCol(this.getHighlightSegs(), colCnt)\n    let mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt)\n\n    let { singleColPlacements, multiColPlacements, moreCnts, moreMarginTops } = computeFgSegPlacement(\n      sortEventSegs(props.fgEventSegs, options.eventOrder) as TableSeg[],\n      props.dayMaxEvents,\n      props.dayMaxEventRows,\n      options.eventOrderStrict,\n      state.eventInstanceHeights,\n      state.maxContentHeight,\n      props.cells,\n    )\n\n    let isForcedInvisible = // TODO: messy way to compute this\n      (props.eventDrag && props.eventDrag.affectedInstances) ||\n      (props.eventResize && props.eventResize.affectedInstances) ||\n      {}\n\n    return (\n      <tr ref={this.rootElRef} role=\"row\">\n        {props.renderIntro && props.renderIntro()}\n        {props.cells.map((cell, col) => {\n          let normalFgNodes = this.renderFgSegs(\n            col,\n            props.forPrint ? singleColPlacements[col] : multiColPlacements[col],\n            props.todayRange,\n            isForcedInvisible,\n          )\n\n          let mirrorFgNodes = this.renderFgSegs(\n            col,\n            buildMirrorPlacements(mirrorSegsByCol[col], multiColPlacements),\n            props.todayRange,\n            {},\n            Boolean(props.eventDrag),\n            Boolean(props.eventResize),\n            false, // date-selecting (because mirror is never drawn for date selection)\n          )\n\n          return (\n            <TableCell\n              key={cell.key}\n              elRef={this.cellElRefs.createRef(cell.key)}\n              innerElRef={this.frameElRefs.createRef(cell.key) /* FF <td> problem, but okay to use for left/right. TODO: rename prop */}\n              dateProfile={props.dateProfile}\n              date={cell.date}\n              showDayNumber={props.showDayNumbers}\n              showWeekNumber={props.showWeekNumbers && col === 0}\n              forceDayTop={props.showWeekNumbers /* even displaying weeknum for row, not necessarily day */}\n              todayRange={props.todayRange}\n              eventSelection={props.eventSelection}\n              eventDrag={props.eventDrag}\n              eventResize={props.eventResize}\n              extraHookProps={cell.extraHookProps}\n              extraDataAttrs={cell.extraDataAttrs}\n              extraClassNames={cell.extraClassNames}\n              extraDateSpan={cell.extraDateSpan}\n              moreCnt={moreCnts[col]}\n              moreMarginTop={moreMarginTops[col]}\n              singlePlacements={singleColPlacements[col]}\n              fgContentElRef={this.fgElRefs.createRef(cell.key)}\n              fgContent={( // Fragment scopes the keys\n                <Fragment>\n                  <Fragment>{normalFgNodes}</Fragment>\n                  <Fragment>{mirrorFgNodes}</Fragment>\n                </Fragment>\n              )}\n              bgContent={( // Fragment scopes the keys\n                <Fragment>\n                  {this.renderFillSegs(highlightSegsByCol[col], 'highlight')}\n                  {this.renderFillSegs(businessHoursByCol[col], 'non-business')}\n                  {this.renderFillSegs(bgEventSegsByCol[col], 'bg-event')}\n                </Fragment>\n              )}\n            />\n          )\n        })}\n      </tr>\n    )\n  }\n\n  componentDidMount() {\n    this.updateSizing(true)\n  }\n\n  componentDidUpdate(prevProps: TableRowProps, prevState: TableRowState) {\n    let currentProps = this.props\n\n    this.updateSizing(\n      !isPropsEqual(prevProps, currentProps),\n    )\n  }\n\n  getHighlightSegs(): TableSeg[] {\n    let { props } = this\n\n    if (props.eventDrag && props.eventDrag.segs.length) { // messy check\n      return props.eventDrag.segs as TableSeg[]\n    }\n\n    if (props.eventResize && props.eventResize.segs.length) { // messy check\n      return props.eventResize.segs as TableSeg[]\n    }\n\n    return props.dateSelectionSegs\n  }\n\n  getMirrorSegs(): TableSeg[] {\n    let { props } = this\n\n    if (props.eventResize && props.eventResize.segs.length) { // messy check\n      return props.eventResize.segs as TableSeg[]\n    }\n\n    return []\n  }\n\n  renderFgSegs(\n    col: number,\n    segPlacements: TableSegPlacement[],\n    todayRange: DateRange,\n    isForcedInvisible: { [instanceId: string]: any },\n    isDragging?: boolean,\n    isResizing?: boolean,\n    isDateSelecting?: boolean,\n  ): VNode[] {\n    let { context } = this\n    let { eventSelection } = this.props\n    let { framePositions } = this.state\n    let defaultDisplayEventEnd = this.props.cells.length === 1 // colCnt === 1\n    let isMirror = isDragging || isResizing || isDateSelecting\n    let nodes: VNode[] = []\n\n    if (framePositions) {\n      for (let placement of segPlacements) {\n        let { seg } = placement\n        let { instanceId } = seg.eventRange.instance\n        let key = instanceId + ':' + col\n        let isVisible = placement.isVisible && !isForcedInvisible[instanceId]\n        let isAbsolute = placement.isAbsolute\n        let left: CssDimValue = ''\n        let right: CssDimValue = ''\n\n        if (isAbsolute) {\n          if (context.isRtl) {\n            right = 0\n            left = framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol]\n          } else {\n            left = 0\n            right = framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol]\n          }\n        }\n\n        /*\n        known bug: events that are force to be list-item but span multiple days still take up space in later columns\n        todo: in print view, for multi-day events, don't display title within non-start/end segs\n        */\n        nodes.push(\n          <div\n            className={'fc-daygrid-event-harness' + (isAbsolute ? ' fc-daygrid-event-harness-abs' : '')}\n            key={key}\n            ref={isMirror ? null : this.segHarnessRefs.createRef(key)}\n            style={{\n              visibility: isVisible ? ('' as any) : 'hidden',\n              marginTop: isAbsolute ? '' : placement.marginTop,\n              top: isAbsolute ? placement.absoluteTop : '',\n              left,\n              right,\n            }}\n          >\n            {hasListItemDisplay(seg) ? (\n              <TableListItemEvent\n                seg={seg}\n                isDragging={isDragging}\n                isSelected={instanceId === eventSelection}\n                defaultDisplayEventEnd={defaultDisplayEventEnd}\n                {...getSegMeta(seg, todayRange)}\n              />\n            ) : (\n              <TableBlockEvent\n                seg={seg}\n                isDragging={isDragging}\n                isResizing={isResizing}\n                isDateSelecting={isDateSelecting}\n                isSelected={instanceId === eventSelection}\n                defaultDisplayEventEnd={defaultDisplayEventEnd}\n                {...getSegMeta(seg, todayRange)}\n              />\n            )}\n          </div>,\n        )\n      }\n    }\n\n    return nodes\n  }\n\n  renderFillSegs(segs: TableSeg[], fillType: string): VNode {\n    let { isRtl } = this.context\n    let { todayRange } = this.props\n    let { framePositions } = this.state\n    let nodes: VNode[] = []\n\n    if (framePositions) {\n      for (let seg of segs) {\n        let leftRightCss = isRtl ? {\n          right: 0,\n          left: framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol],\n        } : {\n          left: 0,\n          right: framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol],\n        }\n\n        nodes.push(\n          <div\n            key={buildEventRangeKey(seg.eventRange)}\n            className=\"fc-daygrid-bg-harness\"\n            style={leftRightCss}\n          >\n            {fillType === 'bg-event' ?\n              <BgEvent seg={seg} {...getSegMeta(seg, todayRange)} /> :\n              renderFill(fillType)}\n          </div>,\n        )\n      }\n    }\n\n    return createElement(Fragment, {}, ...nodes)\n  }\n\n  updateSizing(isExternalSizingChange) {\n    let { props, frameElRefs } = this\n\n    if (\n      !props.forPrint &&\n      props.clientWidth !== null // positioning ready?\n    ) {\n      if (isExternalSizingChange) {\n        let frameEls = props.cells.map((cell) => frameElRefs.currentMap[cell.key])\n\n        if (frameEls.length) {\n          let originEl = this.rootElRef.current\n\n          this.setState({ // will trigger isCellPositionsChanged...\n            framePositions: new PositionCache(\n              originEl,\n              frameEls,\n              true, // isHorizontal\n              false,\n            ),\n          })\n        }\n      }\n\n      const oldInstanceHeights = this.state.eventInstanceHeights\n      const newInstanceHeights = this.queryEventInstanceHeights()\n      const limitByContentHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true\n\n      this.safeSetState({\n        // HACK to prevent oscillations of events being shown/hidden from max-event-rows\n        // Essentially, once you compute an element's height, never null-out.\n        // TODO: always display all events, as visibility:hidden?\n        eventInstanceHeights: { ...oldInstanceHeights, ...newInstanceHeights },\n\n        maxContentHeight: limitByContentHeight ? this.computeMaxContentHeight() : null,\n      })\n    }\n  }\n\n  queryEventInstanceHeights() {\n    let segElMap = this.segHarnessRefs.currentMap\n    let eventInstanceHeights: { [key: string]: number } = {}\n\n    // get the max height amongst instance segs\n    for (let key in segElMap) {\n      let height = Math.round(segElMap[key].getBoundingClientRect().height)\n      let instanceId = key.split(':')[0] // deconstruct how renderFgSegs makes the key\n      eventInstanceHeights[instanceId] = Math.max(eventInstanceHeights[instanceId] || 0, height)\n    }\n\n    return eventInstanceHeights\n  }\n\n  computeMaxContentHeight() {\n    let firstKey = this.props.cells[0].key\n    let cellEl = this.cellElRefs.currentMap[firstKey]\n    let fcContainerEl = this.fgElRefs.currentMap[firstKey]\n\n    return cellEl.getBoundingClientRect().bottom - fcContainerEl.getBoundingClientRect().top\n  }\n\n  public getCellEls() {\n    let elMap = this.cellElRefs.currentMap\n\n    return this.props.cells.map((cell) => elMap[cell.key])\n  }\n}\n\nTableRow.addStateEquality({\n  eventInstanceHeights: isPropsEqual,\n})\n\nfunction buildMirrorPlacements(mirrorSegs: TableSeg[], colPlacements: TableSegPlacement[][]): TableSegPlacement[] {\n  if (!mirrorSegs.length) {\n    return []\n  }\n  let topsByInstanceId = buildAbsoluteTopHash(colPlacements) // TODO: cache this at first render?\n  return mirrorSegs.map((seg: TableSeg) => ({\n    seg,\n    isVisible: true,\n    isAbsolute: true,\n    absoluteTop: topsByInstanceId[seg.eventRange.instance.instanceId],\n    marginTop: 0,\n  }))\n}\n\nfunction buildAbsoluteTopHash(colPlacements: TableSegPlacement[][]): { [instanceId: string]: number } {\n  let topsByInstanceId: { [instanceId: string]: number } = {}\n\n  for (let placements of colPlacements) {\n    for (let placement of placements) {\n      topsByInstanceId[placement.seg.eventRange.instance.instanceId] = placement.absoluteTop\n    }\n  }\n\n  return topsByInstanceId\n}\n","import {\n  EventSegUiInteractionState,\n  VNode,\n  DateComponent,\n  RefObject,\n  CssDimValue,\n  createElement,\n  PositionCache,\n  memoize,\n  addDays,\n  RefMap,\n  DateRange,\n  NowTimer,\n  DateMarker,\n  DateProfile,\n  Fragment,\n  Hit,\n  DayTableCell,\n} from '@fullcalendar/common'\nimport { TableSeg, splitSegsByRow, splitInteractionByRow } from './TableSeg'\nimport { TableRow } from './TableRow'\n\nexport interface TableProps {\n  dateProfile: DateProfile\n  cells: DayTableCell[][] // cells-BY-ROW\n  renderRowIntro?: () => VNode\n  colGroupNode: VNode\n  tableMinWidth: CssDimValue\n  expandRows: boolean\n  showWeekNumbers: boolean\n  clientWidth: number | null\n  clientHeight: number | null\n  businessHourSegs: TableSeg[]\n  bgEventSegs: TableSeg[]\n  fgEventSegs: TableSeg[]\n  dateSelectionSegs: TableSeg[]\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n  dayMaxEvents: boolean | number\n  dayMaxEventRows: boolean | number\n  headerAlignElRef?: RefObject<HTMLElement>\n  forPrint: boolean\n  isHitComboAllowed?: (hit0: Hit, hit1: Hit) => boolean\n}\n\nexport class Table extends DateComponent<TableProps> {\n  private splitBusinessHourSegs = memoize(splitSegsByRow)\n  private splitBgEventSegs = memoize(splitSegsByRow)\n  private splitFgEventSegs = memoize(splitSegsByRow)\n  private splitDateSelectionSegs = memoize(splitSegsByRow)\n  private splitEventDrag = memoize(splitInteractionByRow)\n  private splitEventResize = memoize(splitInteractionByRow)\n  private rootEl: HTMLElement\n  private rowRefs = new RefMap<TableRow>()\n  private rowPositions: PositionCache\n  private colPositions: PositionCache\n\n  render() {\n    let { props } = this\n    let { dateProfile, dayMaxEventRows, dayMaxEvents, expandRows } = props\n    let rowCnt = props.cells.length\n\n    let businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCnt)\n    let bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt)\n    let fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt)\n    let dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCnt)\n    let eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt)\n    let eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt)\n\n    let limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true\n\n    // if rows can't expand to fill fixed height, can't do balanced-height event limit\n    // TODO: best place to normalize these options?\n    if (limitViaBalanced && !expandRows) {\n      limitViaBalanced = false\n      dayMaxEventRows = null\n      dayMaxEvents = null\n    }\n\n    let classNames = [\n      'fc-daygrid-body',\n      limitViaBalanced ? 'fc-daygrid-body-balanced' : 'fc-daygrid-body-unbalanced', // will all row heights be equal?\n      expandRows ? '' : 'fc-daygrid-body-natural', // will height of one row depend on the others?\n    ]\n\n    return (\n      <div\n        className={classNames.join(' ')}\n        ref={this.handleRootEl}\n        style={{\n          // these props are important to give this wrapper correct dimensions for interactions\n          // TODO: if we set it here, can we avoid giving to inner tables?\n          width: props.clientWidth,\n          minWidth: props.tableMinWidth,\n        }}\n      >\n        <NowTimer unit=\"day\">\n          {(nowDate: DateMarker, todayRange: DateRange) => (\n            <Fragment>\n              <table\n                role=\"presentation\"\n                className=\"fc-scrollgrid-sync-table\"\n                style={{\n                  width: props.clientWidth,\n                  minWidth: props.tableMinWidth,\n                  height: expandRows ? props.clientHeight : '',\n                }}\n              >\n                {props.colGroupNode}\n                <tbody role=\"presentation\">\n                  {props.cells.map((cells, row) => (\n                    <TableRow\n                      ref={this.rowRefs.createRef(row)}\n                      key={\n                        cells.length\n                          ? cells[0].date.toISOString() /* best? or put key on cell? or use diff formatter? */\n                          : row // in case there are no cells (like when resource view is loading)\n                      }\n                      showDayNumbers={rowCnt > 1}\n                      showWeekNumbers={props.showWeekNumbers}\n                      todayRange={todayRange}\n                      dateProfile={dateProfile}\n                      cells={cells}\n                      renderIntro={props.renderRowIntro}\n                      businessHourSegs={businessHourSegsByRow[row]}\n                      eventSelection={props.eventSelection}\n                      bgEventSegs={bgEventSegsByRow[row].filter(isSegAllDay) /* hack */}\n                      fgEventSegs={fgEventSegsByRow[row]}\n                      dateSelectionSegs={dateSelectionSegsByRow[row]}\n                      eventDrag={eventDragByRow[row]}\n                      eventResize={eventResizeByRow[row]}\n                      dayMaxEvents={dayMaxEvents}\n                      dayMaxEventRows={dayMaxEventRows}\n                      clientWidth={props.clientWidth}\n                      clientHeight={props.clientHeight}\n                      forPrint={props.forPrint}\n                    />\n                  ))}\n                </tbody>\n              </table>\n            </Fragment>\n          )}\n        </NowTimer>\n      </div>\n    )\n  }\n\n  handleRootEl = (rootEl: HTMLElement | null) => {\n    this.rootEl = rootEl\n\n    if (rootEl) {\n      this.context.registerInteractiveComponent(this, {\n        el: rootEl,\n        isHitComboAllowed: this.props.isHitComboAllowed,\n      })\n    } else {\n      this.context.unregisterInteractiveComponent(this)\n    }\n  }\n\n  // Hit System\n  // ----------------------------------------------------------------------------------------------------\n\n  prepareHits() {\n    this.rowPositions = new PositionCache(\n      this.rootEl,\n      this.rowRefs.collect().map((rowObj) => rowObj.getCellEls()[0]), // first cell el in each row. TODO: not optimal\n      false,\n      true, // vertical\n    )\n\n    this.colPositions = new PositionCache(\n      this.rootEl,\n      this.rowRefs.currentMap[0].getCellEls(), // cell els in first row\n      true, // horizontal\n      false,\n    )\n  }\n\n  queryHit(positionLeft: number, positionTop: number): Hit {\n    let { colPositions, rowPositions } = this\n    let col = colPositions.leftToIndex(positionLeft)\n    let row = rowPositions.topToIndex(positionTop)\n\n    if (row != null && col != null) {\n      let cell = this.props.cells[row][col]\n\n      return {\n        dateProfile: this.props.dateProfile,\n        dateSpan: {\n          range: this.getCellRange(row, col),\n          allDay: true,\n          ...cell.extraDateSpan,\n        },\n        dayEl: this.getCellEl(row, col),\n        rect: {\n          left: colPositions.lefts[col],\n          right: colPositions.rights[col],\n          top: rowPositions.tops[row],\n          bottom: rowPositions.bottoms[row],\n        },\n        layer: 0,\n      }\n    }\n\n    return null\n  }\n\n  private getCellEl(row, col) {\n    return this.rowRefs.currentMap[row].getCellEls()[col] // TODO: not optimal\n  }\n\n  private getCellRange(row, col) {\n    let start = this.props.cells[row][col].date\n    let end = addDays(start, 1)\n    return { start, end }\n  }\n}\n\nfunction isSegAllDay(seg: TableSeg) {\n  return seg.eventRange.def.allDay\n}\n","import { DayTableModel, DateRange, Slicer } from '@fullcalendar/common'\nimport { TableSeg } from './TableSeg'\n\nexport class DayTableSlicer extends Slicer<TableSeg, [DayTableModel]> {\n  forceDayIfListItem = true\n\n  sliceRange(dateRange: DateRange, dayTableModel: DayTableModel): TableSeg[] {\n    return dayTableModel.sliceRange(dateRange)\n  }\n}\n","import {\n  createElement, createRef, VNode,\n  EventStore,\n  EventUiHash,\n  DateSpan,\n  EventInteractionState,\n  DayTableModel,\n  Duration,\n  DateComponent,\n  ViewContext,\n  RefObject,\n  CssDimValue,\n  DateProfile,\n} from '@fullcalendar/common'\nimport { Table } from './Table'\nimport { DayTableSlicer } from './DayTableSlicer'\n\nexport interface DayTableProps {\n  dateProfile: DateProfile,\n  dayTableModel: DayTableModel\n  nextDayThreshold: Duration\n  businessHours: EventStore\n  eventStore: EventStore\n  eventUiBases: EventUiHash\n  dateSelection: DateSpan | null\n  eventSelection: string\n  eventDrag: EventInteractionState | null\n  eventResize: EventInteractionState | null\n  colGroupNode: VNode\n  tableMinWidth: CssDimValue\n  renderRowIntro?: () => VNode\n  dayMaxEvents: boolean | number\n  dayMaxEventRows: boolean | number\n  expandRows: boolean\n  showWeekNumbers: boolean\n  headerAlignElRef?: RefObject<HTMLElement> // for more popover alignment\n  clientWidth: number | null\n  clientHeight: number | null\n  forPrint: boolean\n}\n\nexport class DayTable extends DateComponent<DayTableProps, ViewContext> {\n  private slicer = new DayTableSlicer()\n  private tableRef = createRef<Table>()\n\n  render() {\n    let { props, context } = this\n\n    return (\n      <Table\n        ref={this.tableRef}\n        {...this.slicer.sliceProps(props, props.dateProfile, props.nextDayThreshold, context, props.dayTableModel)}\n        dateProfile={props.dateProfile}\n        cells={props.dayTableModel.cells}\n        colGroupNode={props.colGroupNode}\n        tableMinWidth={props.tableMinWidth}\n        renderRowIntro={props.renderRowIntro}\n        dayMaxEvents={props.dayMaxEvents}\n        dayMaxEventRows={props.dayMaxEventRows}\n        showWeekNumbers={props.showWeekNumbers}\n        expandRows={props.expandRows}\n        headerAlignElRef={props.headerAlignElRef}\n        clientWidth={props.clientWidth}\n        clientHeight={props.clientHeight}\n        forPrint={props.forPrint}\n      />\n    )\n  }\n}\n","import {\n  createElement, createRef,\n  DayHeader,\n  DateProfileGenerator,\n  DateProfile,\n  memoize,\n  DaySeriesModel,\n  DayTableModel,\n  ChunkContentCallbackArgs,\n} from '@fullcalendar/common'\nimport { TableView } from './TableView'\nimport { DayTable } from './DayTable'\n\nexport class DayTableView extends TableView {\n  private buildDayTableModel = memoize(buildDayTableModel)\n  private headerRef = createRef<DayHeader>()\n  private tableRef = createRef<DayTable>()\n\n  render() {\n    let { options, dateProfileGenerator } = this.context\n    let { props } = this\n    let dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator)\n\n    let headerContent = options.dayHeaders && (\n      <DayHeader\n        ref={this.headerRef}\n        dateProfile={props.dateProfile}\n        dates={dayTableModel.headerDates}\n        datesRepDistinctDays={dayTableModel.rowCnt === 1}\n      />\n    )\n\n    let bodyContent = (contentArg: ChunkContentCallbackArgs) => (\n      <DayTable\n        ref={this.tableRef}\n        dateProfile={props.dateProfile}\n        dayTableModel={dayTableModel}\n        businessHours={props.businessHours}\n        dateSelection={props.dateSelection}\n        eventStore={props.eventStore}\n        eventUiBases={props.eventUiBases}\n        eventSelection={props.eventSelection}\n        eventDrag={props.eventDrag}\n        eventResize={props.eventResize}\n        nextDayThreshold={options.nextDayThreshold}\n        colGroupNode={contentArg.tableColGroupNode}\n        tableMinWidth={contentArg.tableMinWidth}\n        dayMaxEvents={options.dayMaxEvents}\n        dayMaxEventRows={options.dayMaxEventRows}\n        showWeekNumbers={options.weekNumbers}\n        expandRows={!props.isHeightAuto}\n        headerAlignElRef={this.headerElRef}\n        clientWidth={contentArg.clientWidth}\n        clientHeight={contentArg.clientHeight}\n        forPrint={props.forPrint}\n      />\n    )\n\n    return options.dayMinWidth\n      ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth)\n      : this.renderSimpleLayout(headerContent, bodyContent)\n  }\n}\n\nexport function buildDayTableModel(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator) {\n  let daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator)\n\n  return new DayTableModel(\n    daySeries,\n    /year|month|week/.test(dateProfile.currentRangeUnit),\n  )\n}\n","import {\n  DateProfileGenerator,\n  addWeeks, diffWeeks,\n  DateRange,\n} from '@fullcalendar/common'\n\nexport class TableDateProfileGenerator extends DateProfileGenerator {\n  // Computes the date range that will be rendered.\n  buildRenderRange(currentRange, currentRangeUnit, isRangeAllDay): DateRange {\n    let { dateEnv } = this.props\n    let renderRange = super.buildRenderRange(currentRange, currentRangeUnit, isRangeAllDay)\n    let start = renderRange.start\n    let end = renderRange.end\n    let endOfWeek\n\n    // year and month views should be aligned with weeks. this is already done for week\n    if (/^(year|month)$/.test(currentRangeUnit)) {\n      start = dateEnv.startOfWeek(start)\n\n      // make end-of-week if not already\n      endOfWeek = dateEnv.startOfWeek(end)\n      if (endOfWeek.valueOf() !== end.valueOf()) {\n        end = addWeeks(endOfWeek, 1)\n      }\n    }\n\n    // ensure 6 weeks\n    if (\n      this.props.monthMode &&\n      this.props.fixedWeekCount\n    ) {\n      let rowCnt = Math.ceil( // could be partial weeks due to hiddenDays\n        diffWeeks(start, end),\n      )\n      end = addWeeks(end, 6 - rowCnt)\n    }\n\n    return { start, end }\n  }\n}\n","import { createPlugin } from '@fullcalendar/common'\nimport { DayTableView } from './DayTableView'\nimport { TableDateProfileGenerator } from './TableDateProfileGenerator'\nimport './main.css'\n\nexport { DayTable } from './DayTable'\nexport { DayTableSlicer } from './DayTableSlicer'\nexport { Table } from './Table'\nexport { TableSeg } from './TableSeg'\nexport { TableView } from './TableView'\nexport { buildDayTableModel } from './DayTableView'\nexport { DayTableView as DayGridView } // export as old name!\n\nexport default createPlugin({\n  initialView: 'dayGridMonth',\n  views: {\n\n    dayGrid: {\n      component: DayTableView,\n      dateProfileGeneratorClass: TableDateProfileGenerator,\n    },\n\n    dayGridDay: {\n      type: 'dayGrid',\n      duration: { days: 1 },\n    },\n\n    dayGridWeek: {\n      type: 'dayGrid',\n      duration: { weeks: 1 },\n    },\n\n    dayGridMonth: {\n      type: 'dayGrid',\n      duration: { months: 1 },\n      monthMode: true,\n      fixedWeekCount: true,\n    },\n\n  },\n})\n","import {\n  Splitter,\n  hasBgRendering,\n  EventDef,\n  DateSpan,\n} from '@fullcalendar/common'\n\nexport class AllDaySplitter extends Splitter {\n  getKeyInfo() {\n    return {\n      allDay: {},\n      timed: {},\n    }\n  }\n\n  getKeysForDateSpan(dateSpan: DateSpan): string[] {\n    if (dateSpan.allDay) {\n      return ['allDay']\n    }\n\n    return ['timed']\n  }\n\n  getKeysForEventDef(eventDef: EventDef): string[] {\n    if (!eventDef.allDay) {\n      return ['timed']\n    }\n\n    if (hasBgRendering(eventDef)) {\n      return ['timed', 'allDay']\n    }\n\n    return ['allDay']\n  }\n}\n","import {\n  createElement,\n  ViewContext,\n  createFormatter,\n  ViewContextType,\n  RenderHook,\n  SlotLabelContentArg,\n} from '@fullcalendar/common'\nimport { TimeSlatMeta } from './time-slat-meta'\n\nconst DEFAULT_SLAT_LABEL_FORMAT = createFormatter({\n  hour: 'numeric',\n  minute: '2-digit',\n  omitZeroMinute: true,\n  meridiem: 'short',\n})\n\nexport function TimeColsAxisCell(props: TimeSlatMeta) {\n  let classNames = [\n    'fc-timegrid-slot',\n    'fc-timegrid-slot-label',\n    props.isLabeled ? 'fc-scrollgrid-shrink' : 'fc-timegrid-slot-minor',\n  ]\n\n  return (\n    <ViewContextType.Consumer>\n      {(context: ViewContext) => {\n        if (!props.isLabeled) {\n          return (\n            <td className={classNames.join(' ')} data-time={props.isoTimeStr} />\n          )\n        }\n\n        let { dateEnv, options, viewApi } = context\n        let labelFormat = // TODO: fully pre-parse\n          options.slotLabelFormat == null ? DEFAULT_SLAT_LABEL_FORMAT :\n            Array.isArray(options.slotLabelFormat) ? createFormatter(options.slotLabelFormat[0]) :\n              createFormatter(options.slotLabelFormat)\n\n        let hookProps: SlotLabelContentArg = {\n          level: 0,\n          time: props.time,\n          date: dateEnv.toDate(props.date),\n          view: viewApi,\n          text: dateEnv.format(props.date, labelFormat),\n        }\n\n        return (\n          <RenderHook<SlotLabelContentArg> // needed?\n            hookProps={hookProps}\n            classNames={options.slotLabelClassNames}\n            content={options.slotLabelContent}\n            defaultContent={renderInnerContent}\n            didMount={options.slotLabelDidMount}\n            willUnmount={options.slotLabelWillUnmount}\n          >\n            {(rootElRef, customClassNames, innerElRef, innerContent) => (\n              <td ref={rootElRef} className={classNames.concat(customClassNames).join(' ')} data-time={props.isoTimeStr}>\n                <div className=\"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame\">\n                  <div className=\"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion\" ref={innerElRef}>\n                    {innerContent}\n                  </div>\n                </div>\n              </td>\n            )}\n          </RenderHook>\n        )\n      }}\n    </ViewContextType.Consumer>\n  )\n}\n\nfunction renderInnerContent(props) { // TODO: add types\n  return props.text\n}\n","import { createElement, BaseComponent } from '@fullcalendar/common'\nimport { TimeColsAxisCell } from './TimeColsAxisCell'\nimport { TimeSlatMeta } from './time-slat-meta'\n\n/* Thin Axis\n------------------------------------------------------------------------------------------------------------------*/\n\ninterface TimeBodyAxisProps {\n  slatMetas: TimeSlatMeta[]\n}\n\nexport class TimeBodyAxis extends BaseComponent<TimeBodyAxisProps> { // just <tr> content\n  render() {\n    return this.props.slatMetas.map((slatMeta: TimeSlatMeta) => (\n      <tr key={slatMeta.key}>\n        <TimeColsAxisCell {...slatMeta} />\n      </tr>\n    ))\n  }\n}\n","import {\n  createElement, createRef,\n  diffDays,\n  SimpleScrollGridSection,\n  VNode,\n  SimpleScrollGrid,\n  ChunkContentCallbackArgs,\n  ScrollGridSectionConfig,\n  buildNavLinkAttrs,\n  ViewRoot,\n  WeekNumberRoot,\n  RenderHook,\n  DateComponent,\n  ViewProps,\n  RefObject,\n  renderScrollShim,\n  getStickyHeaderDates,\n  getStickyFooterScrollbar,\n  createFormatter,\n  AllDayContentArg,\n  CssDimValue,\n  NowTimer,\n  DateMarker,\n  NowIndicatorRoot,\n} from '@fullcalendar/common'\nimport { AllDaySplitter } from './AllDaySplitter'\nimport { TimeSlatMeta } from './time-slat-meta'\nimport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\nimport { TimeBodyAxis } from './TimeBodyAxis'\n\nconst DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'short' })\nconst AUTO_ALL_DAY_MAX_EVENT_ROWS = 5\n\n/* An abstract class for all timegrid-related views. Displays one more columns with time slots running vertically.\n----------------------------------------------------------------------------------------------------------------------*/\n// Is a manager for the TimeCols subcomponent and possibly the DayGrid subcomponent (if allDaySlot is on).\n// Responsible for managing width/height.\n\ninterface TimeColsViewState {\n  slatCoords: TimeColsSlatsCoords | null\n}\n\nexport abstract class TimeColsView extends DateComponent<ViewProps, TimeColsViewState> {\n  protected allDaySplitter = new AllDaySplitter() // for use by subclasses\n\n  protected headerElRef: RefObject<HTMLTableCellElement> = createRef<HTMLTableCellElement>()\n  private rootElRef: RefObject<HTMLDivElement> = createRef<HTMLDivElement>()\n  private scrollerElRef: RefObject<HTMLDivElement> = createRef<HTMLDivElement>()\n\n  state = {\n    slatCoords: null,\n  }\n\n  // rendering\n  // ----------------------------------------------------------------------------------------------------\n\n  renderSimpleLayout(\n    headerRowContent: VNode | null,\n    allDayContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null,\n    timeContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null,\n  ) {\n    let { context, props } = this\n    let sections: SimpleScrollGridSection[] = []\n    let stickyHeaderDates = getStickyHeaderDates(context.options)\n\n    if (headerRowContent) {\n      sections.push({\n        type: 'header',\n        key: 'header',\n        isSticky: stickyHeaderDates,\n        chunk: {\n          elRef: this.headerElRef,\n          tableClassName: 'fc-col-header',\n          rowContent: headerRowContent,\n        },\n      })\n    }\n\n    if (allDayContent) {\n      sections.push({\n        type: 'body',\n        key: 'all-day',\n        chunk: { content: allDayContent },\n      })\n      sections.push({\n        type: 'body',\n        key: 'all-day-divider',\n        outerContent: ( // TODO: rename to cellContent so don't need to define <tr>?\n          <tr role=\"presentation\" className=\"fc-scrollgrid-section\">\n            <td\n              className={'fc-timegrid-divider ' + context.theme.getClass('tableCellShaded')}\n            />\n          </tr>\n        ),\n      })\n    }\n\n    sections.push({\n      type: 'body',\n      key: 'body',\n      liquid: true,\n      expandRows: Boolean(context.options.expandRows),\n      chunk: {\n        scrollerElRef: this.scrollerElRef,\n        content: timeContent,\n      },\n    })\n\n    return (\n      <ViewRoot viewSpec={context.viewSpec} elRef={this.rootElRef}>\n        {(rootElRef, classNames) => (\n          <div className={['fc-timegrid'].concat(classNames).join(' ')} ref={rootElRef}>\n            <SimpleScrollGrid\n              liquid={!props.isHeightAuto && !props.forPrint}\n              collapsibleWidth={props.forPrint}\n              cols={[{ width: 'shrink' }]}\n              sections={sections}\n            />\n          </div>\n        )}\n      </ViewRoot>\n    )\n  }\n\n  renderHScrollLayout(\n    headerRowContent: VNode | null,\n    allDayContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null,\n    timeContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null,\n    colCnt: number,\n    dayMinWidth: number,\n    slatMetas: TimeSlatMeta[],\n    slatCoords: TimeColsSlatsCoords | null, // yuck\n  ) {\n    let ScrollGrid = this.context.pluginHooks.scrollGridImpl\n\n    if (!ScrollGrid) {\n      throw new Error('No ScrollGrid implementation')\n    }\n\n    let { context, props } = this\n    let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options)\n    let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options)\n    let sections: ScrollGridSectionConfig[] = []\n\n    if (headerRowContent) {\n      sections.push({\n        type: 'header',\n        key: 'header',\n        isSticky: stickyHeaderDates,\n        syncRowHeights: true,\n        chunks: [\n          {\n            key: 'axis',\n            rowContent: (arg: ChunkContentCallbackArgs) => (\n              <tr role=\"presentation\">\n                {this.renderHeadAxis('day', arg.rowSyncHeights[0])}\n              </tr>\n            ),\n          },\n          {\n            key: 'cols',\n            elRef: this.headerElRef,\n            tableClassName: 'fc-col-header',\n            rowContent: headerRowContent,\n          },\n        ],\n      })\n    }\n\n    if (allDayContent) {\n      sections.push({\n        type: 'body',\n        key: 'all-day',\n        syncRowHeights: true,\n        chunks: [\n          {\n            key: 'axis',\n            rowContent: (contentArg: ChunkContentCallbackArgs) => (\n              <tr role=\"presentation\">\n                {this.renderTableRowAxis(contentArg.rowSyncHeights[0])}\n              </tr>\n            ),\n          },\n          {\n            key: 'cols',\n            content: allDayContent,\n          },\n        ],\n      })\n      sections.push({\n        key: 'all-day-divider',\n        type: 'body',\n        outerContent: ( // TODO: rename to cellContent so don't need to define <tr>?\n          <tr role=\"presentation\" className=\"fc-scrollgrid-section\">\n            <td\n              colSpan={2}\n              className={'fc-timegrid-divider ' + context.theme.getClass('tableCellShaded')}\n            />\n          </tr>\n        ),\n      })\n    }\n\n    let isNowIndicator = context.options.nowIndicator\n\n    sections.push({\n      type: 'body',\n      key: 'body',\n      liquid: true,\n      expandRows: Boolean(context.options.expandRows),\n      chunks: [\n        {\n          key: 'axis',\n          content: (arg) => (\n            // TODO: make this now-indicator arrow more DRY with TimeColsContent\n            <div className=\"fc-timegrid-axis-chunk\">\n              <table aria-hidden style={{ height: arg.expandRows ? arg.clientHeight : '' }}>\n                {arg.tableColGroupNode}\n                <tbody>\n                  <TimeBodyAxis slatMetas={slatMetas} />\n                </tbody>\n              </table>\n              <div className=\"fc-timegrid-now-indicator-container\">\n                <NowTimer unit={isNowIndicator ? 'minute' : 'day' /* hacky */}>\n                  {(nowDate: DateMarker) => {\n                    let nowIndicatorTop =\n                      isNowIndicator &&\n                      slatCoords &&\n                      slatCoords.safeComputeTop(nowDate) // might return void\n\n                    if (typeof nowIndicatorTop === 'number') {\n                      return (\n                        <NowIndicatorRoot isAxis date={nowDate}>\n                          {(rootElRef, classNames, innerElRef, innerContent) => (\n                            <div\n                              ref={rootElRef}\n                              className={['fc-timegrid-now-indicator-arrow'].concat(classNames).join(' ')}\n                              style={{ top: nowIndicatorTop }}\n                            >\n                              {innerContent}\n                            </div>\n                          )}\n                        </NowIndicatorRoot>\n                      )\n                    }\n\n                    return null\n                  }}\n                </NowTimer>\n              </div>\n            </div>\n          ),\n        },\n        {\n          key: 'cols',\n          scrollerElRef: this.scrollerElRef,\n          content: timeContent,\n        },\n      ],\n    })\n\n    if (stickyFooterScrollbar) {\n      sections.push({\n        key: 'footer',\n        type: 'footer',\n        isSticky: true,\n        chunks: [\n          {\n            key: 'axis',\n            content: renderScrollShim,\n          },\n          {\n            key: 'cols',\n            content: renderScrollShim,\n          },\n        ],\n      })\n    }\n\n    return (\n      <ViewRoot viewSpec={context.viewSpec} elRef={this.rootElRef}>\n        {(rootElRef, classNames) => (\n          <div className={['fc-timegrid'].concat(classNames).join(' ')} ref={rootElRef}>\n            <ScrollGrid\n              liquid={!props.isHeightAuto && !props.forPrint}\n              collapsibleWidth={false}\n              colGroups={[\n                { width: 'shrink', cols: [{ width: 'shrink' }] }, // TODO: allow no specify cols\n                { cols: [{ span: colCnt, minWidth: dayMinWidth }] },\n              ]}\n              sections={sections}\n            />\n          </div>\n        )}\n      </ViewRoot>\n    )\n  }\n\n  handleScrollTopRequest = (scrollTop: number) => {\n    let scrollerEl = this.scrollerElRef.current\n\n    if (scrollerEl) { // TODO: not sure how this could ever be null. weirdness with the reducer\n      scrollerEl.scrollTop = scrollTop\n    }\n  }\n\n  /* Dimensions\n  ------------------------------------------------------------------------------------------------------------------*/\n\n  getAllDayMaxEventProps() {\n    let { dayMaxEvents, dayMaxEventRows } = this.context.options\n\n    if (dayMaxEvents === true || dayMaxEventRows === true) { // is auto?\n      dayMaxEvents = undefined\n      dayMaxEventRows = AUTO_ALL_DAY_MAX_EVENT_ROWS // make sure \"auto\" goes to a real number\n    }\n\n    return { dayMaxEvents, dayMaxEventRows }\n  }\n\n  /* Header Render Methods\n  ------------------------------------------------------------------------------------------------------------------*/\n\n  renderHeadAxis = (rowKey: 'day' | string, frameHeight: CssDimValue = '') => {\n    let { options } = this.context\n    let { dateProfile } = this.props\n    let range = dateProfile.renderRange\n    let dayCnt = diffDays(range.start, range.end)\n\n    let navLinkAttrs = (dayCnt === 1) // only do in day views (to avoid doing in week views that dont need it)\n      ? buildNavLinkAttrs(this.context, range.start, 'week')\n      : {}\n\n    if (options.weekNumbers && rowKey === 'day') {\n      return (\n        <WeekNumberRoot date={range.start} defaultFormat={DEFAULT_WEEK_NUM_FORMAT}>\n          {(rootElRef, classNames, innerElRef, innerContent) => (\n            <th\n              ref={rootElRef}\n              aria-hidden\n              className={[\n                'fc-timegrid-axis',\n                'fc-scrollgrid-shrink',\n              ].concat(classNames).join(' ')}\n            >\n              <div\n                className=\"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid\"\n                style={{ height: frameHeight }}\n              >\n                <a\n                  ref={innerElRef}\n                  className=\"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner\"\n                  {...navLinkAttrs}\n                >\n                  {innerContent}\n                </a>\n              </div>\n            </th>\n          )}\n        </WeekNumberRoot>\n      )\n    }\n\n    return (\n      <th aria-hidden className=\"fc-timegrid-axis\">\n        <div className=\"fc-timegrid-axis-frame\" style={{ height: frameHeight }} />\n      </th>\n    )\n  }\n\n  /* Table Component Render Methods\n  ------------------------------------------------------------------------------------------------------------------*/\n\n  // only a one-way height sync. we don't send the axis inner-content height to the DayGrid,\n  // but DayGrid still needs to have classNames on inner elements in order to measure.\n  renderTableRowAxis = (rowHeight?: number) => {\n    let { options, viewApi } = this.context\n    let hookProps: AllDayContentArg = {\n      text: options.allDayText,\n      view: viewApi,\n    }\n\n    return (\n      // TODO: make reusable hook. used in list view too\n      <RenderHook<AllDayContentArg>\n        hookProps={hookProps}\n        classNames={options.allDayClassNames}\n        content={options.allDayContent}\n        defaultContent={renderAllDayInner}\n        didMount={options.allDayDidMount}\n        willUnmount={options.allDayWillUnmount}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent) => (\n          <td\n            ref={rootElRef}\n            aria-hidden\n            className={[\n              'fc-timegrid-axis',\n              'fc-scrollgrid-shrink',\n            ].concat(classNames).join(' ')}\n          >\n            <div\n              className={'fc-timegrid-axis-frame fc-scrollgrid-shrink-frame' + (rowHeight == null ? ' fc-timegrid-axis-frame-liquid' : '')}\n              style={{ height: rowHeight }}\n            >\n              <span className=\"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner\" ref={innerElRef}>\n                {innerContent}\n              </span>\n            </div>\n          </td>\n        )}\n      </RenderHook>\n    )\n  }\n\n  handleSlatCoords = (slatCoords: TimeColsSlatsCoords) => {\n    this.setState({ slatCoords })\n  }\n}\n\nfunction renderAllDayInner(hookProps) {\n  return hookProps.text\n}\n","import {\n  PositionCache,\n  DateMarker,\n  startOfDay,\n  createDuration,\n  asRoughMs,\n  DateProfile,\n  Duration,\n  rangeContainsMarker,\n} from '@fullcalendar/common'\n\nexport class TimeColsSlatsCoords {\n  constructor(\n    public positions: PositionCache,\n    private dateProfile: DateProfile,\n    private slotDuration: Duration,\n  ) {\n  }\n\n  safeComputeTop(date: DateMarker) { // TODO: DRY with computeDateTop\n    let { dateProfile } = this\n\n    if (rangeContainsMarker(dateProfile.currentRange, date)) {\n      let startOfDayDate = startOfDay(date)\n      let timeMs = date.valueOf() - startOfDayDate.valueOf()\n\n      if (\n        timeMs >= asRoughMs(dateProfile.slotMinTime) &&\n        timeMs < asRoughMs(dateProfile.slotMaxTime)\n      ) {\n        return this.computeTimeTop(createDuration(timeMs))\n      }\n    }\n\n    return null\n  }\n\n  // Computes the top coordinate, relative to the bounds of the grid, of the given date.\n  // A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.\n  computeDateTop(when: DateMarker, startOfDayDate?: DateMarker) {\n    if (!startOfDayDate) {\n      startOfDayDate = startOfDay(when)\n    }\n    return this.computeTimeTop(createDuration(when.valueOf() - startOfDayDate.valueOf()))\n  }\n\n  // Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).\n  // This is a makeshify way to compute the time-top. Assumes all slatMetas dates are uniform.\n  // Eventually allow computation with arbirary slat dates.\n  computeTimeTop(duration: Duration): number {\n    let { positions, dateProfile } = this\n    let len = positions.els.length\n\n    // floating-point value of # of slots covered\n    let slatCoverage = (duration.milliseconds - asRoughMs(dateProfile.slotMinTime)) / asRoughMs(this.slotDuration)\n    let slatIndex\n    let slatRemainder\n\n    // compute a floating-point number for how many slats should be progressed through.\n    // from 0 to number of slats (inclusive)\n    // constrained because slotMinTime/slotMaxTime might be customized.\n    slatCoverage = Math.max(0, slatCoverage)\n    slatCoverage = Math.min(len, slatCoverage)\n\n    // an integer index of the furthest whole slat\n    // from 0 to number slats (*exclusive*, so len-1)\n    slatIndex = Math.floor(slatCoverage)\n    slatIndex = Math.min(slatIndex, len - 1)\n\n    // how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.\n    // could be 1.0 if slatCoverage is covering *all* the slots\n    slatRemainder = slatCoverage - slatIndex\n\n    return positions.tops[slatIndex] +\n      positions.getHeight(slatIndex) * slatRemainder\n  }\n}\n","import {\n  createElement,\n  BaseComponent,\n  RefMap,\n  RenderHook,\n  SlotLaneContentArg,\n} from '@fullcalendar/common'\nimport { TimeColsAxisCell } from './TimeColsAxisCell'\nimport { TimeSlatMeta } from './time-slat-meta'\n\nexport interface TimeColsSlatsBodyProps {\n  axis: boolean\n  slatMetas: TimeSlatMeta[]\n  slatElRefs: RefMap<HTMLTableRowElement>\n}\n\nexport class TimeColsSlatsBody extends BaseComponent<TimeColsSlatsBodyProps> {\n  render() {\n    let { props, context } = this\n    let { options } = context\n    let { slatElRefs } = props\n\n    return (\n      <tbody>\n        {props.slatMetas.map((slatMeta, i) => {\n          let hookProps: SlotLaneContentArg = {\n            time: slatMeta.time,\n            date: context.dateEnv.toDate(slatMeta.date),\n            view: context.viewApi,\n          }\n\n          let classNames = [\n            'fc-timegrid-slot',\n            'fc-timegrid-slot-lane',\n            slatMeta.isLabeled ? '' : 'fc-timegrid-slot-minor',\n          ]\n\n          return (\n            <tr\n              key={slatMeta.key}\n              ref={slatElRefs.createRef(slatMeta.key)}\n            >\n              {props.axis && (\n                <TimeColsAxisCell {...slatMeta} />\n              )}\n              <RenderHook\n                hookProps={hookProps}\n                classNames={options.slotLaneClassNames}\n                content={options.slotLaneContent}\n                didMount={options.slotLaneDidMount}\n                willUnmount={options.slotLaneWillUnmount}\n              >\n                {(rootElRef, customClassNames, innerElRef, innerContent) => (\n                  <td\n                    ref={rootElRef}\n                    className={classNames.concat(customClassNames).join(' ')}\n                    data-time={slatMeta.isoTimeStr}\n                  >\n                    {innerContent}\n                  </td>\n                )}\n              </RenderHook>\n            </tr>\n          )\n        })}\n      </tbody>\n    )\n  }\n}\n","import {\n  createElement,\n  VNode,\n  BaseComponent,\n  RefMap,\n  CssDimValue,\n  createRef,\n  PositionCache,\n  DateProfile,\n} from '@fullcalendar/common'\nimport { TimeSlatMeta } from './time-slat-meta'\nimport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\nimport { TimeColsSlatsBody } from './TimeColsSlatsBody'\n\nexport interface TimeColsSlatsProps extends TimeColsSlatsContentProps {\n  dateProfile: DateProfile\n  clientWidth: number | null\n  minHeight: CssDimValue\n  tableMinWidth: CssDimValue\n  tableColGroupNode: VNode\n  onCoords?: (coords: TimeColsSlatsCoords | null) => void\n}\n\ninterface TimeColsSlatsContentProps {\n  axis: boolean\n  slatMetas: TimeSlatMeta[]\n}\n\n/*\nfor the horizontal \"slats\" that run width-wise. Has a time axis on a side. Depends on RTL.\n*/\n\nexport class TimeColsSlats extends BaseComponent<TimeColsSlatsProps> {\n  private rootElRef = createRef<HTMLDivElement>()\n  private slatElRefs = new RefMap<HTMLTableRowElement>()\n\n  render() {\n    let { props, context } = this\n\n    return (\n      <div ref={this.rootElRef} className=\"fc-timegrid-slots\">\n        <table\n          aria-hidden\n          className={context.theme.getClass('table')}\n          style={{\n            minWidth: props.tableMinWidth,\n            width: props.clientWidth,\n            height: props.minHeight,\n          }}\n        >\n          {props.tableColGroupNode /* relies on there only being a single <col> for the axis */}\n          <TimeColsSlatsBody\n            slatElRefs={this.slatElRefs}\n            axis={props.axis}\n            slatMetas={props.slatMetas}\n          />\n        </table>\n      </div>\n    )\n  }\n\n  componentDidMount() {\n    this.updateSizing()\n  }\n\n  componentDidUpdate() {\n    this.updateSizing()\n  }\n\n  componentWillUnmount() {\n    if (this.props.onCoords) {\n      this.props.onCoords(null)\n    }\n  }\n\n  updateSizing() {\n    let { context, props } = this\n\n    if (\n      props.onCoords &&\n      props.clientWidth !== null // means sizing has stabilized\n    ) {\n      let rootEl = this.rootElRef.current\n\n      if (rootEl.offsetHeight) { // not hidden by css\n        props.onCoords(\n          new TimeColsSlatsCoords(\n            new PositionCache(\n              this.rootElRef.current,\n              collectSlatEls(this.slatElRefs.currentMap, props.slatMetas),\n              false,\n              true, // vertical\n            ),\n            this.props.dateProfile,\n            context.options.slotDuration,\n          ),\n        )\n      }\n    }\n  }\n}\n\nfunction collectSlatEls(elMap: { [key: string]: HTMLElement }, slatMetas: TimeSlatMeta[]) {\n  return slatMetas.map((slatMeta) => elMap[slatMeta.key])\n}\n","import { DateMarker, Seg, EventSegUiInteractionState } from '@fullcalendar/common'\n\n// JUST A DATA STRUCTURE, not a component\n\nexport interface TimeColsSeg extends Seg {\n  col: number\n  start: DateMarker\n  end: DateMarker\n}\n\nexport function splitSegsByCol(segs: TimeColsSeg[] | null, colCnt: number) { // can be given null/undefined!\n  let segsByCol: TimeColsSeg[][] = []\n  let i\n\n  for (i = 0; i < colCnt; i += 1) {\n    segsByCol.push([])\n  }\n\n  if (segs) {\n    for (i = 0; i < segs.length; i += 1) {\n      segsByCol[segs[i].col].push(segs[i])\n    }\n  }\n\n  return segsByCol\n}\n\nexport function splitInteractionByCol(ui: EventSegUiInteractionState | null, colCnt: number) {\n  let byRow: EventSegUiInteractionState[] = []\n\n  if (!ui) {\n    for (let i = 0; i < colCnt; i += 1) {\n      byRow[i] = null\n    }\n  } else {\n    for (let i = 0; i < colCnt; i += 1) {\n      byRow[i] = {\n        affectedInstances: ui.affectedInstances,\n        isEvent: ui.isEvent,\n        segs: [],\n      }\n    }\n\n    for (let seg of ui.segs) {\n      byRow[seg.col].segs.push(seg)\n    }\n  }\n\n  return byRow\n}\n","import {\n  createElement, MoreLinkContentArg, MoreLinkRoot, BaseComponent, createRef, setRef,\n  Dictionary, DateProfile, DateRange, DateMarker, EventSegUiInteractionState, CssDimValue,\n} from '@fullcalendar/common'\nimport { renderPlainFgSegs } from './TimeCol'\nimport { TimeColsSeg } from './TimeColsSeg'\n\nexport interface TimeColMoreLinkProps {\n  hiddenSegs: TimeColsSeg[]\n  top: CssDimValue\n  bottom: CssDimValue\n  extraDateSpan?: Dictionary\n  dateProfile: DateProfile\n  todayRange: DateRange\n  nowDate: DateMarker\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState\n  eventResize: EventSegUiInteractionState\n}\n\nexport class TimeColMoreLink extends BaseComponent<TimeColMoreLinkProps> {\n  rootElRef = createRef<HTMLElement>()\n\n  render() {\n    let { props } = this\n    return (\n      <MoreLinkRoot\n        allDayDate={null}\n        moreCnt={props.hiddenSegs.length}\n        allSegs={props.hiddenSegs}\n        hiddenSegs={props.hiddenSegs}\n        alignmentElRef={this.rootElRef}\n        defaultContent={renderMoreLinkInner}\n        extraDateSpan={props.extraDateSpan}\n        dateProfile={props.dateProfile}\n        todayRange={props.todayRange}\n        popoverContent={() => renderPlainFgSegs(props.hiddenSegs, props)}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) => (\n          <a\n            ref={(el: HTMLElement | null) => {\n              setRef(rootElRef, el)\n              setRef(this.rootElRef, el)\n            }}\n            className={['fc-timegrid-more-link'].concat(classNames).join(' ')}\n            style={{ top: props.top, bottom: props.bottom }}\n            onClick={handleClick}\n            title={title}\n            aria-expanded={isExpanded}\n            aria-controls={popoverId}\n          >\n            <div ref={innerElRef} className=\"fc-timegrid-more-link-inner fc-sticky\">\n              {innerContent}\n            </div>\n          </a>\n        )}\n      </MoreLinkRoot>\n    )\n  }\n}\n\nfunction renderMoreLinkInner(props: MoreLinkContentArg) {\n  return props.shortText\n}\n","import {\n  SegEntry,\n  SegHierarchy,\n  SegRect,\n  buildEntryKey,\n  getEntrySpanEnd,\n  binarySearch,\n  SegEntryGroup,\n  groupIntersectingEntries,\n} from '@fullcalendar/common'\n\ninterface SegNode extends SegEntry {\n  nextLevelNodes: SegNode[] // with highest-pressure first\n}\n\ntype SegNodeAndPressure = [ SegNode, number ]\n\ninterface SegSiblingRange { // will ALWAYS have span of 1 or more items. if not, will be null\n  level: number\n  lateralStart: number\n  lateralEnd: number\n}\n\nexport interface SegWebRect extends SegRect {\n  stackDepth: number\n  stackForward: number\n}\n\n// segInputs assumed sorted\nexport function buildPositioning(\n  segInputs: SegEntry[],\n  strictOrder?: boolean,\n  maxStackCnt?: number,\n): { segRects: SegWebRect[], hiddenGroups: SegEntryGroup[] } {\n  let hierarchy = new SegHierarchy()\n  if (strictOrder != null) {\n    hierarchy.strictOrder = strictOrder\n  }\n  if (maxStackCnt != null) {\n    hierarchy.maxStackCnt = maxStackCnt\n  }\n\n  let hiddenEntries = hierarchy.addSegs(segInputs)\n  let hiddenGroups = groupIntersectingEntries(hiddenEntries)\n\n  let web = buildWeb(hierarchy)\n  web = stretchWeb(web, 1) // all levelCoords/thickness will have 0.0-1.0\n  let segRects = webToRects(web)\n\n  return { segRects, hiddenGroups }\n}\n\nfunction buildWeb(hierarchy: SegHierarchy): SegNode[] {\n  const { entriesByLevel } = hierarchy\n\n  const buildNode = cacheable(\n    (level: number, lateral: number) => level + ':' + lateral,\n    (level: number, lateral: number): SegNodeAndPressure => {\n      let siblingRange = findNextLevelSegs(hierarchy, level, lateral)\n      let nextLevelRes = buildNodes(siblingRange, buildNode)\n      let entry = entriesByLevel[level][lateral]\n\n      return [\n        { ...entry, nextLevelNodes: nextLevelRes[0] },\n        entry.thickness + nextLevelRes[1], // the pressure builds\n      ]\n    },\n  )\n\n  return buildNodes(\n    entriesByLevel.length\n      ? { level: 0, lateralStart: 0, lateralEnd: entriesByLevel[0].length }\n      : null,\n    buildNode,\n  )[0]\n}\n\nfunction buildNodes(\n  siblingRange: SegSiblingRange | null,\n  buildNode: (level: number, lateral: number) => SegNodeAndPressure,\n): [SegNode[], number] { // number is maxPressure\n  if (!siblingRange) {\n    return [[], 0]\n  }\n\n  let { level, lateralStart, lateralEnd } = siblingRange\n  let lateral = lateralStart\n  let pairs: SegNodeAndPressure[] = []\n\n  while (lateral < lateralEnd) {\n    pairs.push(buildNode(level, lateral))\n    lateral += 1\n  }\n\n  pairs.sort(cmpDescPressures)\n\n  return [\n    pairs.map(extractNode),\n    pairs[0][1], // first item's pressure\n  ]\n}\n\nfunction cmpDescPressures(a: SegNodeAndPressure, b: SegNodeAndPressure) { // sort pressure high -> low\n  return b[1] - a[1]\n}\n\nfunction extractNode(a: SegNodeAndPressure): SegNode {\n  return a[0]\n}\n\nfunction findNextLevelSegs(hierarchy: SegHierarchy, subjectLevel: number, subjectLateral: number): SegSiblingRange | null {\n  let { levelCoords, entriesByLevel } = hierarchy\n  let subjectEntry = entriesByLevel[subjectLevel][subjectLateral]\n  let afterSubject = levelCoords[subjectLevel] + subjectEntry.thickness\n  let levelCnt = levelCoords.length\n  let level = subjectLevel\n\n  // skip past levels that are too high up\n  for (; level < levelCnt && levelCoords[level] < afterSubject; level += 1) ; // do nothing\n\n  for (; level < levelCnt; level += 1) {\n    let entries = entriesByLevel[level]\n    let entry: SegEntry\n    let searchIndex = binarySearch(entries, subjectEntry.span.start, getEntrySpanEnd)\n    let lateralStart = searchIndex[0] + searchIndex[1] // if exact match (which doesn't collide), go to next one\n    let lateralEnd = lateralStart\n\n    while ( // loop through entries that horizontally intersect\n      (entry = entries[lateralEnd]) && // but not past the whole seg list\n      entry.span.start < subjectEntry.span.end\n    ) { lateralEnd += 1 }\n\n    if (lateralStart < lateralEnd) {\n      return { level, lateralStart, lateralEnd }\n    }\n  }\n\n  return null\n}\n\nfunction stretchWeb(topLevelNodes: SegNode[], totalThickness: number): SegNode[] {\n  const stretchNode = cacheable(\n    (node: SegNode, startCoord: number, prevThickness: number) => buildEntryKey(node),\n    (node: SegNode, startCoord: number, prevThickness: number): [number, SegNode] => { // [startCoord, node]\n      let { nextLevelNodes, thickness } = node\n      let allThickness = thickness + prevThickness\n      let thicknessFraction = thickness / allThickness\n      let endCoord: number\n      let newChildren: SegNode[] = []\n\n      if (!nextLevelNodes.length) {\n        endCoord = totalThickness\n      } else {\n        for (let childNode of nextLevelNodes) {\n          if (endCoord === undefined) {\n            let res = stretchNode(childNode, startCoord, allThickness)\n            endCoord = res[0]\n            newChildren.push(res[1])\n          } else {\n            let res = stretchNode(childNode, endCoord, 0)\n            newChildren.push(res[1])\n          }\n        }\n      }\n\n      let newThickness = (endCoord - startCoord) * thicknessFraction\n      return [endCoord - newThickness, {\n        ...node,\n        thickness: newThickness,\n        nextLevelNodes: newChildren,\n      }]\n    },\n  )\n\n  return topLevelNodes.map((node: SegNode) => stretchNode(node, 0, 0)[1])\n}\n\n// not sorted in any particular order\nfunction webToRects(topLevelNodes: SegNode[]): SegWebRect[] {\n  let rects: SegWebRect[] = []\n\n  const processNode = cacheable(\n    (node: SegNode, levelCoord: number, stackDepth: number) => buildEntryKey(node),\n    (node: SegNode, levelCoord: number, stackDepth: number) => { // returns forwardPressure\n      let rect: SegWebRect = {\n        ...node,\n        levelCoord,\n        stackDepth,\n        stackForward: 0, // will assign after recursing\n      }\n      rects.push(rect)\n\n      return (\n        rect.stackForward = processNodes(node.nextLevelNodes, levelCoord + node.thickness, stackDepth + 1) + 1\n      )\n    },\n  )\n\n  function processNodes(nodes: SegNode[], levelCoord: number, stackDepth: number) { // returns stackForward\n    let stackForward = 0\n    for (let node of nodes) {\n      stackForward = Math.max(processNode(node, levelCoord, stackDepth), stackForward)\n    }\n    return stackForward\n  }\n\n  processNodes(topLevelNodes, 0, 0)\n  return rects // TODO: sort rects by levelCoord to be consistent with toRects?\n}\n\n// TODO: move to general util\n\nfunction cacheable<Args extends any[], Res>(\n  keyFunc: (...args: Args) => string,\n  workFunc: (...args: Args) => Res,\n): ((...args: Args) => Res) {\n  const cache: { [key: string]: Res } = {}\n\n  return (...args: Args) => {\n    let key = keyFunc(...args)\n    return (key in cache)\n      ? cache[key]\n      : (cache[key] = workFunc(...args))\n  }\n}\n","import {\n  SegSpan,\n  SegEntry,\n  SegEntryGroup,\n  DateMarker,\n} from '@fullcalendar/common'\nimport { TimeColsSeg } from './TimeColsSeg'\nimport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\nimport { SegWebRect, buildPositioning } from './seg-web'\n\n// public interface\n// ------------------------------------------------------------------------------------------\n\nexport interface TimeColFgSegPlacement {\n  seg: TimeColsSeg\n  rect: SegWebRect | null\n}\n\nexport function computeSegVCoords(\n  segs: TimeColsSeg[],\n  colDate: DateMarker,\n  slatCoords: TimeColsSlatsCoords = null,\n  eventMinHeight: number = 0, // might be null/undefined :(\n): SegSpan[] {\n  let vcoords: SegSpan[] = []\n\n  if (slatCoords) {\n    for (let i = 0; i < segs.length; i += 1) {\n      let seg = segs[i]\n      let spanStart = slatCoords.computeDateTop(seg.start, colDate)\n      let spanEnd = Math.max(\n        spanStart + (eventMinHeight || 0), // :(\n        slatCoords.computeDateTop(seg.end, colDate),\n      )\n      vcoords.push({\n        start: Math.round(spanStart), // for barely-overlapping collisions\n        end: Math.round(spanEnd), //\n      })\n    }\n  }\n\n  return vcoords\n}\n\nexport function computeFgSegPlacements(\n  segs: TimeColsSeg[],\n  segVCoords: SegSpan[], // might not have for every seg\n  eventOrderStrict?: boolean,\n  eventMaxStack?: number,\n): { segPlacements: TimeColFgSegPlacement[], hiddenGroups: SegEntryGroup[] } {\n  let segInputs: SegEntry[] = []\n  let dumbSegs: TimeColsSeg[] = [] // segs without coords\n\n  for (let i = 0; i < segs.length; i += 1) {\n    let vcoords = segVCoords[i]\n    if (vcoords) {\n      segInputs.push({\n        index: i,\n        thickness: 1,\n        span: vcoords,\n      })\n    } else {\n      dumbSegs.push(segs[i])\n    }\n  }\n\n  let { segRects, hiddenGroups } = buildPositioning(segInputs, eventOrderStrict, eventMaxStack)\n  let segPlacements: TimeColFgSegPlacement[] = []\n\n  for (let segRect of segRects) {\n    segPlacements.push({\n      seg: segs[segRect.index],\n      rect: segRect,\n    })\n  }\n\n  for (let dumbSeg of dumbSegs) {\n    segPlacements.push({ seg: dumbSeg, rect: null })\n  }\n\n  return { segPlacements, hiddenGroups }\n}\n","import { createElement, StandardEvent, BaseComponent, MinimalEventProps, createFormatter } from '@fullcalendar/common'\n\nconst DEFAULT_TIME_FORMAT = createFormatter({\n  hour: 'numeric',\n  minute: '2-digit',\n  meridiem: false,\n})\n\nexport interface TimeColEventProps extends MinimalEventProps {\n  isShort: boolean\n}\n\nexport class TimeColEvent extends BaseComponent<TimeColEventProps> {\n  render() {\n    let classNames = [\n      'fc-timegrid-event',\n      'fc-v-event',\n    ]\n\n    if (this.props.isShort) {\n      classNames.push('fc-timegrid-event-short')\n    }\n\n    return (\n      <StandardEvent\n        {...this.props}\n        defaultTimeFormat={DEFAULT_TIME_FORMAT}\n        extraClassNames={classNames}\n      />\n    )\n  }\n}\n","import {\n  DateMarker, BaseComponent, createElement,\n  DateRange, DayCellContent, DateProfile,\n} from '@fullcalendar/common'\n\nexport interface TimeColMiscProps { // should be given nowDate too??\n  dateProfile: DateProfile\n  date: DateMarker\n  todayRange: DateRange\n  extraHookProps?: any\n}\n\nexport class TimeColMisc extends BaseComponent<TimeColMiscProps> {\n  render() {\n    let { props } = this\n\n    return (\n      <DayCellContent date={props.date} dateProfile={props.dateProfile} todayRange={props.todayRange} extraHookProps={props.extraHookProps}>\n        {(innerElRef, innerContent) => (\n          innerContent &&\n            <div className=\"fc-timegrid-col-misc\" ref={innerElRef}>{innerContent}</div>\n        )}\n      </DayCellContent>\n    )\n  }\n}\n","import {\n  Ref, DateMarker, BaseComponent, createElement, EventSegUiInteractionState, Seg, getSegMeta,\n  DateRange, Fragment, DayCellRoot, NowIndicatorRoot, BgEvent, renderFill, buildIsoString, computeEarliestSegStart,\n  DateProfile, buildEventRangeKey, sortEventSegs, memoize, SegEntryGroup, SegEntry, Dictionary, SegSpan, CssDimValue,\n} from '@fullcalendar/common'\nimport { TimeColMoreLink } from './TimeColMoreLink'\nimport { TimeColsSeg } from './TimeColsSeg'\nimport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\nimport { SegWebRect } from './seg-web'\nimport { computeFgSegPlacements, computeSegVCoords } from './event-placement'\nimport { TimeColEvent } from './TimeColEvent'\nimport { TimeColMisc } from './TimeColMisc'\n\nexport interface TimeColProps {\n  elRef?: Ref<HTMLTableCellElement>\n  dateProfile: DateProfile\n  date: DateMarker\n  nowDate: DateMarker\n  todayRange: DateRange\n  extraDataAttrs?: any\n  extraHookProps?: any\n  extraClassNames?: string[]\n  extraDateSpan?: Dictionary\n  fgEventSegs: TimeColsSeg[]\n  bgEventSegs: TimeColsSeg[]\n  businessHourSegs: TimeColsSeg[]\n  nowIndicatorSegs: TimeColsSeg[]\n  dateSelectionSegs: TimeColsSeg[]\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n  slatCoords: TimeColsSlatsCoords\n  forPrint: boolean\n}\n\nexport class TimeCol extends BaseComponent<TimeColProps> {\n  sortEventSegs = memoize(sortEventSegs)\n  // TODO: memoize event-placement?\n\n  render() {\n    let { props, context } = this\n    let isSelectMirror = context.options.selectMirror\n\n    let mirrorSegs: Seg[] = // yuck\n      (props.eventDrag && props.eventDrag.segs) ||\n      (props.eventResize && props.eventResize.segs) ||\n      (isSelectMirror && props.dateSelectionSegs) ||\n      []\n\n    let interactionAffectedInstances = // TODO: messy way to compute this\n      (props.eventDrag && props.eventDrag.affectedInstances) ||\n      (props.eventResize && props.eventResize.affectedInstances) ||\n      {}\n\n    let sortedFgSegs = this.sortEventSegs(props.fgEventSegs, context.options.eventOrder) as TimeColsSeg[]\n\n    return (\n      <DayCellRoot\n        elRef={props.elRef}\n        date={props.date}\n        dateProfile={props.dateProfile}\n        todayRange={props.todayRange}\n        extraHookProps={props.extraHookProps}\n      >\n        {(rootElRef, classNames, dataAttrs) => (\n          <td\n            ref={rootElRef}\n            role=\"gridcell\"\n            className={['fc-timegrid-col'].concat(classNames, props.extraClassNames || []).join(' ')}\n            {...dataAttrs}\n            {...props.extraDataAttrs}\n          >\n            <div className=\"fc-timegrid-col-frame\">\n              <div className=\"fc-timegrid-col-bg\">\n                {this.renderFillSegs(props.businessHourSegs, 'non-business')}\n                {this.renderFillSegs(props.bgEventSegs, 'bg-event')}\n                {this.renderFillSegs(props.dateSelectionSegs, 'highlight')}\n              </div>\n              <div className=\"fc-timegrid-col-events\">\n                {this.renderFgSegs(\n                  sortedFgSegs,\n                  interactionAffectedInstances,\n                  false,\n                  false,\n                  false,\n                )}\n              </div>\n              <div className=\"fc-timegrid-col-events\">\n                {this.renderFgSegs(\n                  mirrorSegs as TimeColsSeg[],\n                  {},\n                  Boolean(props.eventDrag),\n                  Boolean(props.eventResize),\n                  Boolean(isSelectMirror),\n                )}\n              </div>\n              <div className=\"fc-timegrid-now-indicator-container\">\n                {this.renderNowIndicator(props.nowIndicatorSegs)}\n              </div>\n              <TimeColMisc\n                date={props.date}\n                dateProfile={props.dateProfile}\n                todayRange={props.todayRange}\n                extraHookProps={props.extraHookProps}\n              />\n            </div>\n          </td>\n        )}\n      </DayCellRoot>\n    )\n  }\n\n  renderFgSegs(\n    sortedFgSegs: TimeColsSeg[],\n    segIsInvisible: { [instanceId: string]: any },\n    isDragging: boolean,\n    isResizing: boolean,\n    isDateSelecting: boolean,\n  ) {\n    let { props } = this\n    if (props.forPrint) {\n      return renderPlainFgSegs(sortedFgSegs, props)\n    }\n    return this.renderPositionedFgSegs(sortedFgSegs, segIsInvisible, isDragging, isResizing, isDateSelecting)\n  }\n\n  renderPositionedFgSegs(\n    segs: TimeColsSeg[], // if not mirror, needs to be sorted\n    segIsInvisible: { [instanceId: string]: any },\n    isDragging: boolean,\n    isResizing: boolean,\n    isDateSelecting: boolean,\n  ) {\n    let { eventMaxStack, eventShortHeight, eventOrderStrict, eventMinHeight } = this.context.options\n    let { date, slatCoords, eventSelection, todayRange, nowDate } = this.props\n    let isMirror = isDragging || isResizing || isDateSelecting\n    let segVCoords = computeSegVCoords(segs, date, slatCoords, eventMinHeight)\n    let { segPlacements, hiddenGroups } = computeFgSegPlacements(segs, segVCoords, eventOrderStrict, eventMaxStack)\n\n    return (\n      <Fragment>\n        {this.renderHiddenGroups(hiddenGroups, segs)}\n        {segPlacements.map((segPlacement) => {\n          let { seg, rect } = segPlacement\n          let instanceId = seg.eventRange.instance.instanceId\n          let isVisible = isMirror || Boolean(!segIsInvisible[instanceId] && rect)\n          let vStyle = computeSegVStyle(rect && rect.span)\n          let hStyle = (!isMirror && rect) ? this.computeSegHStyle(rect) : { left: 0, right: 0 }\n          let isInset = Boolean(rect) && rect.stackForward > 0\n          let isShort = Boolean(rect) && (rect.span.end - rect.span.start) < eventShortHeight // look at other places for this problem\n\n          return (\n            <div\n              className={\n                'fc-timegrid-event-harness' +\n                (isInset ? ' fc-timegrid-event-harness-inset' : '')\n              }\n              key={instanceId}\n              style={{\n                visibility: isVisible ? ('' as any) : 'hidden',\n                ...vStyle,\n                ...hStyle,\n              }}\n            >\n              <TimeColEvent\n                seg={seg}\n                isDragging={isDragging}\n                isResizing={isResizing}\n                isDateSelecting={isDateSelecting}\n                isSelected={instanceId === eventSelection}\n                isShort={isShort}\n                {...getSegMeta(seg, todayRange, nowDate)}\n              />\n            </div>\n          )\n        })}\n      </Fragment>\n    )\n  }\n\n  // will already have eventMinHeight applied because segInputs already had it\n  renderHiddenGroups(hiddenGroups: SegEntryGroup[], segs: TimeColsSeg[]) {\n    let { extraDateSpan, dateProfile, todayRange, nowDate, eventSelection, eventDrag, eventResize } = this.props\n    return (\n      <Fragment>\n        {hiddenGroups.map((hiddenGroup) => {\n          let positionCss = computeSegVStyle(hiddenGroup.span)\n          let hiddenSegs = compileSegsFromEntries(hiddenGroup.entries, segs)\n          return (\n            <TimeColMoreLink\n              key={buildIsoString(computeEarliestSegStart(hiddenSegs))}\n              hiddenSegs={hiddenSegs}\n              top={positionCss.top}\n              bottom={positionCss.bottom}\n              extraDateSpan={extraDateSpan}\n              dateProfile={dateProfile}\n              todayRange={todayRange}\n              nowDate={nowDate}\n              eventSelection={eventSelection}\n              eventDrag={eventDrag}\n              eventResize={eventResize}\n            />\n          )\n        })}\n      </Fragment>\n    )\n  }\n\n  renderFillSegs(segs: TimeColsSeg[], fillType: string) {\n    let { props, context } = this\n    let segVCoords = computeSegVCoords(segs, props.date, props.slatCoords, context.options.eventMinHeight) // don't assume all populated\n\n    let children = segVCoords.map((vcoords, i) => {\n      let seg = segs[i]\n      return (\n        <div\n          key={buildEventRangeKey(seg.eventRange)}\n          className=\"fc-timegrid-bg-harness\"\n          style={computeSegVStyle(vcoords)}\n        >\n          {fillType === 'bg-event' ?\n            <BgEvent seg={seg} {...getSegMeta(seg, props.todayRange, props.nowDate)} /> :\n            renderFill(fillType)}\n        </div>\n      )\n    })\n\n    return <Fragment>{children}</Fragment>\n  }\n\n  renderNowIndicator(segs: TimeColsSeg[]) {\n    let { slatCoords, date } = this.props\n\n    if (!slatCoords) { return null }\n\n    return segs.map((seg, i) => (\n      <NowIndicatorRoot\n        isAxis={false}\n        date={date}\n        // key doesn't matter. will only ever be one\n        key={i} // eslint-disable-line react/no-array-index-key\n      >\n        {(rootElRef, classNames, innerElRef, innerContent) => (\n          <div\n            ref={rootElRef}\n            className={['fc-timegrid-now-indicator-line'].concat(classNames).join(' ')}\n            style={{ top: slatCoords.computeDateTop(seg.start, date) }}\n          >\n            {innerContent}\n          </div>\n        )}\n      </NowIndicatorRoot>\n    ))\n  }\n\n  computeSegHStyle(segHCoords: SegWebRect) {\n    let { isRtl, options } = this.context\n    let shouldOverlap = options.slotEventOverlap\n    let nearCoord = segHCoords.levelCoord // the left side if LTR. the right side if RTL. floating-point\n    let farCoord = segHCoords.levelCoord + segHCoords.thickness // the right side if LTR. the left side if RTL. floating-point\n    let left // amount of space from left edge, a fraction of the total width\n    let right // amount of space from right edge, a fraction of the total width\n\n    if (shouldOverlap) {\n      // double the width, but don't go beyond the maximum forward coordinate (1.0)\n      farCoord = Math.min(1, nearCoord + (farCoord - nearCoord) * 2)\n    }\n\n    if (isRtl) {\n      left = 1 - farCoord\n      right = nearCoord\n    } else {\n      left = nearCoord\n      right = 1 - farCoord\n    }\n\n    let props = {\n      zIndex: segHCoords.stackDepth + 1, // convert from 0-base to 1-based\n      left: left * 100 + '%',\n      right: right * 100 + '%',\n    }\n\n    if (shouldOverlap && !segHCoords.stackForward) {\n      // add padding to the edge so that forward stacked events don't cover the resizer's icon\n      props[isRtl ? 'marginLeft' : 'marginRight'] = 10 * 2 // 10 is a guesstimate of the icon's width\n    }\n\n    return props\n  }\n}\n\nexport function renderPlainFgSegs(\n  sortedFgSegs: TimeColsSeg[],\n  { todayRange, nowDate, eventSelection, eventDrag, eventResize }: {\n    todayRange: DateRange\n    nowDate: DateMarker\n    eventSelection: string\n    eventDrag: EventSegUiInteractionState | null\n    eventResize: EventSegUiInteractionState | null\n  },\n) {\n  let hiddenInstances =\n    (eventDrag ? eventDrag.affectedInstances : null) ||\n    (eventResize ? eventResize.affectedInstances : null) ||\n    {}\n  return (\n    <Fragment>\n      {sortedFgSegs.map((seg) => {\n        let instanceId = seg.eventRange.instance.instanceId\n        return (\n          <div\n            key={instanceId}\n            style={{ visibility: hiddenInstances[instanceId] ? 'hidden' : ('' as any) }}\n          >\n            <TimeColEvent\n              seg={seg}\n              isDragging={false}\n              isResizing={false}\n              isDateSelecting={false}\n              isSelected={instanceId === eventSelection}\n              isShort={false}\n              {...getSegMeta(seg, todayRange, nowDate)}\n            />\n          </div>\n        )\n      })}\n    </Fragment>\n  )\n}\n\nfunction computeSegVStyle(segVCoords: SegSpan | null): { top: CssDimValue, bottom: CssDimValue } {\n  if (!segVCoords) {\n    return { top: '', bottom: '' }\n  }\n  return {\n    top: segVCoords.start,\n    bottom: -segVCoords.end,\n  }\n}\n\nfunction compileSegsFromEntries(\n  segEntries: SegEntry[],\n  allSegs: TimeColsSeg[],\n): TimeColsSeg[] {\n  return segEntries.map((segEntry) => allSegs[segEntry.index])\n}\n","import {\n  createElement, VNode,\n  BaseComponent,\n  EventSegUiInteractionState,\n  CssDimValue,\n  DateMarker,\n  RefMap,\n  createRef,\n  PositionCache,\n  memoize,\n  DateRange,\n  NowIndicatorRoot,\n  DateProfile,\n  DayTableCell,\n} from '@fullcalendar/common'\nimport { TimeColsSeg, splitSegsByCol, splitInteractionByCol } from './TimeColsSeg'\nimport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\nimport { TimeCol } from './TimeCol'\n\nexport interface TimeColsContentProps {\n  axis: boolean\n  cells: DayTableCell[]\n  dateProfile: DateProfile\n  nowDate: DateMarker\n  todayRange: DateRange\n  businessHourSegs: TimeColsSeg[]\n  bgEventSegs: TimeColsSeg[]\n  fgEventSegs: TimeColsSeg[]\n  dateSelectionSegs: TimeColsSeg[]\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n  nowIndicatorSegs: TimeColsSeg[]\n  clientWidth: number | null\n  tableMinWidth: CssDimValue\n  tableColGroupNode: VNode\n  slatCoords: TimeColsSlatsCoords\n  onColCoords?: (colCoords: PositionCache) => void\n  forPrint: boolean\n}\n\nexport class TimeColsContent extends BaseComponent<TimeColsContentProps> { // TODO: rename\n  private splitFgEventSegs = memoize(splitSegsByCol)\n  private splitBgEventSegs = memoize(splitSegsByCol)\n  private splitBusinessHourSegs = memoize(splitSegsByCol)\n  private splitNowIndicatorSegs = memoize(splitSegsByCol)\n  private splitDateSelectionSegs = memoize(splitSegsByCol)\n  private splitEventDrag = memoize(splitInteractionByCol)\n  private splitEventResize = memoize(splitInteractionByCol)\n  private rootElRef = createRef<HTMLDivElement>()\n  private cellElRefs = new RefMap<HTMLTableCellElement>()\n\n  render() {\n    let { props, context } = this\n    let nowIndicatorTop =\n      context.options.nowIndicator &&\n      props.slatCoords &&\n      props.slatCoords.safeComputeTop(props.nowDate) // might return void\n\n    let colCnt = props.cells.length\n    let fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, colCnt)\n    let bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, colCnt)\n    let businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, colCnt)\n    let nowIndicatorSegsByRow = this.splitNowIndicatorSegs(props.nowIndicatorSegs, colCnt)\n    let dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, colCnt)\n    let eventDragByRow = this.splitEventDrag(props.eventDrag, colCnt)\n    let eventResizeByRow = this.splitEventResize(props.eventResize, colCnt)\n\n    return (\n      <div className=\"fc-timegrid-cols\" ref={this.rootElRef}>\n        <table\n          role=\"presentation\"\n          style={{\n            minWidth: props.tableMinWidth,\n            width: props.clientWidth,\n          }}\n        >\n          {props.tableColGroupNode}\n          <tbody role=\"presentation\">\n            <tr role=\"row\">\n              {props.axis && (\n                <td aria-hidden className=\"fc-timegrid-col fc-timegrid-axis\">\n                  <div className=\"fc-timegrid-col-frame\">\n                    <div className=\"fc-timegrid-now-indicator-container\">\n                      {typeof nowIndicatorTop === 'number' && (\n                        <NowIndicatorRoot isAxis date={props.nowDate}>\n                          {(rootElRef, classNames, innerElRef, innerContent) => (\n                            <div\n                              ref={rootElRef}\n                              className={['fc-timegrid-now-indicator-arrow'].concat(classNames).join(' ')}\n                              style={{ top: nowIndicatorTop }}\n                            >\n                              {innerContent}\n                            </div>\n                          )}\n                        </NowIndicatorRoot>\n                      )}\n                    </div>\n                  </div>\n                </td>\n              )}\n              {props.cells.map((cell, i) => (\n                <TimeCol\n                  key={cell.key}\n                  elRef={this.cellElRefs.createRef(cell.key)}\n                  dateProfile={props.dateProfile}\n                  date={cell.date}\n                  nowDate={props.nowDate}\n                  todayRange={props.todayRange}\n                  extraHookProps={cell.extraHookProps}\n                  extraDataAttrs={cell.extraDataAttrs}\n                  extraClassNames={cell.extraClassNames}\n                  extraDateSpan={cell.extraDateSpan}\n                  fgEventSegs={fgEventSegsByRow[i]}\n                  bgEventSegs={bgEventSegsByRow[i]}\n                  businessHourSegs={businessHourSegsByRow[i]}\n                  nowIndicatorSegs={nowIndicatorSegsByRow[i]}\n                  dateSelectionSegs={dateSelectionSegsByRow[i]}\n                  eventDrag={eventDragByRow[i]}\n                  eventResize={eventResizeByRow[i]}\n                  slatCoords={props.slatCoords}\n                  eventSelection={props.eventSelection}\n                  forPrint={props.forPrint}\n                />\n              ))}\n            </tr>\n          </tbody>\n        </table>\n      </div>\n    )\n  }\n\n  componentDidMount() {\n    this.updateCoords()\n  }\n\n  componentDidUpdate() {\n    this.updateCoords()\n  }\n\n  updateCoords() {\n    let { props } = this\n\n    if (\n      props.onColCoords &&\n      props.clientWidth !== null // means sizing has stabilized\n    ) {\n      props.onColCoords(\n        new PositionCache(\n          this.rootElRef.current,\n          collectCellEls(this.cellElRefs.currentMap, props.cells),\n          true, // horizontal\n          false,\n        ),\n      )\n    }\n  }\n}\n\nfunction collectCellEls(elMap: { [key: string]: HTMLElement }, cells: DayTableCell[]) {\n  return cells.map((cell) => elMap[cell.key])\n}\n","import {\n  createElement, VNode,\n  addDurations,\n  multiplyDuration,\n  wholeDivideDurations,\n  DateMarker,\n  EventSegUiInteractionState,\n  memoize,\n  CssDimValue,\n  PositionCache,\n  ScrollResponder,\n  ScrollRequest,\n  DateRange,\n  Duration,\n  DateProfile,\n  DayTableCell,\n  Hit,\n  DateComponent,\n} from '@fullcalendar/common'\nimport { TimeColsSlats } from './TimeColsSlats'\nimport { TimeSlatMeta } from './time-slat-meta'\nimport { TimeColsContent } from './TimeColsContent'\nimport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\nimport { TimeColsSeg } from './TimeColsSeg'\n\nexport interface TimeColsProps {\n  cells: DayTableCell[]\n  dateProfile: DateProfile\n  slotDuration: Duration\n  nowDate: DateMarker\n  todayRange: DateRange\n  businessHourSegs: TimeColsSeg[]\n  bgEventSegs: TimeColsSeg[]\n  fgEventSegs: TimeColsSeg[]\n  dateSelectionSegs: TimeColsSeg[]\n  eventSelection: string\n  eventDrag: EventSegUiInteractionState | null\n  eventResize: EventSegUiInteractionState | null\n  tableColGroupNode: VNode\n  tableMinWidth: CssDimValue\n  clientWidth: number | null\n  clientHeight: number | null\n  expandRows: boolean\n  nowIndicatorSegs: TimeColsSeg[]\n  onScrollTopRequest?: (scrollTop: number) => void\n  forPrint: boolean\n  axis: boolean\n  slatMetas: TimeSlatMeta[]\n  onSlatCoords?: (slatCoords: TimeColsSlatsCoords) => void\n  isHitComboAllowed?: (hit0: Hit, hit1: Hit) => boolean\n}\n\ninterface TimeColsState {\n  slatCoords: TimeColsSlatsCoords | null\n}\n\n/* A component that renders one or more columns of vertical time slots\n----------------------------------------------------------------------------------------------------------------------*/\n\nexport class TimeCols extends DateComponent<TimeColsProps, TimeColsState> {\n  private processSlotOptions = memoize(processSlotOptions)\n  private scrollResponder: ScrollResponder\n  private colCoords: PositionCache\n\n  state = {\n    slatCoords: null,\n  }\n\n  render() {\n    let { props, state } = this\n\n    return (\n      <div\n        className=\"fc-timegrid-body\"\n        ref={this.handleRootEl}\n        style={{\n          // these props are important to give this wrapper correct dimensions for interactions\n          // TODO: if we set it here, can we avoid giving to inner tables?\n          width: props.clientWidth,\n          minWidth: props.tableMinWidth,\n        }}\n      >\n        <TimeColsSlats\n          axis={props.axis}\n          dateProfile={props.dateProfile}\n          slatMetas={props.slatMetas}\n          clientWidth={props.clientWidth}\n          minHeight={props.expandRows ? props.clientHeight : ''}\n          tableMinWidth={props.tableMinWidth}\n          tableColGroupNode={props.axis ? props.tableColGroupNode : null /* axis depends on the colgroup's shrinking */}\n          onCoords={this.handleSlatCoords}\n        />\n        <TimeColsContent\n          cells={props.cells}\n          axis={props.axis}\n          dateProfile={props.dateProfile}\n          businessHourSegs={props.businessHourSegs}\n          bgEventSegs={props.bgEventSegs}\n          fgEventSegs={props.fgEventSegs}\n          dateSelectionSegs={props.dateSelectionSegs}\n          eventSelection={props.eventSelection}\n          eventDrag={props.eventDrag}\n          eventResize={props.eventResize}\n          todayRange={props.todayRange}\n          nowDate={props.nowDate}\n          nowIndicatorSegs={props.nowIndicatorSegs}\n          clientWidth={props.clientWidth}\n          tableMinWidth={props.tableMinWidth}\n          tableColGroupNode={props.tableColGroupNode}\n          slatCoords={state.slatCoords}\n          onColCoords={this.handleColCoords}\n          forPrint={props.forPrint}\n        />\n      </div>\n    )\n  }\n\n  handleRootEl = (el: HTMLElement | null) => {\n    if (el) {\n      this.context.registerInteractiveComponent(this, {\n        el,\n        isHitComboAllowed: this.props.isHitComboAllowed,\n      })\n    } else {\n      this.context.unregisterInteractiveComponent(this)\n    }\n  }\n\n  componentDidMount() {\n    this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest)\n  }\n\n  componentDidUpdate(prevProps: TimeColsProps) {\n    this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile)\n  }\n\n  componentWillUnmount() {\n    this.scrollResponder.detach()\n  }\n\n  handleScrollRequest = (request: ScrollRequest) => {\n    let { onScrollTopRequest } = this.props\n    let { slatCoords } = this.state\n\n    if (onScrollTopRequest && slatCoords) {\n      if (request.time) {\n        let top = slatCoords.computeTimeTop(request.time)\n        top = Math.ceil(top) // zoom can give weird floating-point values. rather scroll a little bit further\n        if (top) {\n          top += 1 // to overcome top border that slots beyond the first have. looks better\n        }\n\n        onScrollTopRequest(top)\n      }\n\n      return true\n    }\n\n    return false\n  }\n\n  handleColCoords = (colCoords: PositionCache | null) => {\n    this.colCoords = colCoords\n  }\n\n  handleSlatCoords = (slatCoords: TimeColsSlatsCoords | null) => {\n    this.setState({ slatCoords })\n\n    if (this.props.onSlatCoords) {\n      this.props.onSlatCoords(slatCoords)\n    }\n  }\n\n  queryHit(positionLeft: number, positionTop: number): Hit {\n    let { dateEnv, options } = this.context\n    let { colCoords } = this\n    let { dateProfile } = this.props\n    let { slatCoords } = this.state\n    let { snapDuration, snapsPerSlot } = this.processSlotOptions(this.props.slotDuration, options.snapDuration)\n\n    let colIndex = colCoords.leftToIndex(positionLeft)\n    let slatIndex = slatCoords.positions.topToIndex(positionTop)\n\n    if (colIndex != null && slatIndex != null) {\n      let cell = this.props.cells[colIndex]\n      let slatTop = slatCoords.positions.tops[slatIndex]\n      let slatHeight = slatCoords.positions.getHeight(slatIndex)\n      let partial = (positionTop - slatTop) / slatHeight // floating point number between 0 and 1\n      let localSnapIndex = Math.floor(partial * snapsPerSlot) // the snap # relative to start of slat\n      let snapIndex = slatIndex * snapsPerSlot + localSnapIndex\n\n      let dayDate = this.props.cells[colIndex].date\n      let time = addDurations(\n        dateProfile.slotMinTime,\n        multiplyDuration(snapDuration, snapIndex),\n      )\n\n      let start = dateEnv.add(dayDate, time)\n      let end = dateEnv.add(start, snapDuration)\n\n      return {\n        dateProfile,\n        dateSpan: {\n          range: { start, end },\n          allDay: false,\n          ...cell.extraDateSpan,\n        },\n        dayEl: colCoords.els[colIndex],\n        rect: {\n          left: colCoords.lefts[colIndex],\n          right: colCoords.rights[colIndex],\n          top: slatTop,\n          bottom: slatTop + slatHeight,\n        },\n        layer: 0,\n      }\n    }\n\n    return null\n  }\n}\n\nfunction processSlotOptions(slotDuration: Duration, snapDurationOverride: Duration | null) {\n  let snapDuration = snapDurationOverride || slotDuration\n  let snapsPerSlot = wholeDivideDurations(slotDuration, snapDuration)\n\n  if (snapsPerSlot === null) {\n    snapDuration = slotDuration\n    snapsPerSlot = 1\n    // TODO: say warning?\n  }\n\n  return { snapDuration, snapsPerSlot }\n}\n","import { intersectRanges, DateRange, Slicer } from '@fullcalendar/common'\nimport { TimeColsSeg } from './TimeColsSeg'\n\nexport class DayTimeColsSlicer extends Slicer<TimeColsSeg, [DateRange[]]> {\n  sliceRange(range: DateRange, dayRanges: DateRange[]): TimeColsSeg[] {\n    let segs: TimeColsSeg[] = []\n\n    for (let col = 0; col < dayRanges.length; col += 1) {\n      let segRange = intersectRanges(range, dayRanges[col])\n\n      if (segRange) {\n        segs.push({\n          start: segRange.start,\n          end: segRange.end,\n          isStart: segRange.start.valueOf() === range.start.valueOf(),\n          isEnd: segRange.end.valueOf() === range.end.valueOf(),\n          col,\n        })\n      }\n    }\n\n    return segs\n  }\n}\n","import {\n  createElement,\n  createRef,\n  VNode,\n  DateComponent,\n  DateProfile,\n  EventStore,\n  EventUiHash,\n  EventInteractionState,\n  DateSpan,\n  memoize,\n  DateRange,\n  DayTableModel,\n  DateEnv,\n  DateMarker,\n  NowTimer,\n  CssDimValue,\n  Duration,\n} from '@fullcalendar/common'\nimport { TimeCols } from './TimeCols'\nimport { TimeSlatMeta } from './time-slat-meta'\nimport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\nimport { DayTimeColsSlicer } from './DayTimeColsSlicer'\n\nexport interface DayTimeColsProps {\n  dateProfile: DateProfile\n  dayTableModel: DayTableModel\n  axis: boolean\n  slotDuration: Duration\n  slatMetas: TimeSlatMeta[]\n  businessHours: EventStore\n  eventStore: EventStore\n  eventUiBases: EventUiHash\n  dateSelection: DateSpan | null\n  eventSelection: string\n  eventDrag: EventInteractionState | null\n  eventResize: EventInteractionState | null\n  tableColGroupNode: VNode\n  tableMinWidth: CssDimValue\n  clientWidth: number | null\n  clientHeight: number | null\n  expandRows: boolean\n  onScrollTopRequest?: (scrollTop: number) => void\n  forPrint: boolean\n  onSlatCoords?: (slatCoords: TimeColsSlatsCoords) => void\n}\n\nexport class DayTimeCols extends DateComponent<DayTimeColsProps> {\n  private buildDayRanges = memoize(buildDayRanges)\n  private slicer = new DayTimeColsSlicer()\n  private timeColsRef = createRef<TimeCols>()\n\n  render() {\n    let { props, context } = this\n    let { dateProfile, dayTableModel } = props\n\n    let isNowIndicator = context.options.nowIndicator\n    let dayRanges = this.buildDayRanges(dayTableModel, dateProfile, context.dateEnv)\n\n    // give it the first row of cells\n    // TODO: would move this further down hierarchy, but sliceNowDate needs it\n    return (\n      <NowTimer unit={isNowIndicator ? 'minute' : 'day'}>\n        {(nowDate: DateMarker, todayRange: DateRange) => (\n          <TimeCols\n            ref={this.timeColsRef}\n            {...this.slicer.sliceProps(props, dateProfile, null, context, dayRanges)}\n            forPrint={props.forPrint}\n            axis={props.axis}\n            dateProfile={dateProfile}\n            slatMetas={props.slatMetas}\n            slotDuration={props.slotDuration}\n            cells={dayTableModel.cells[0]}\n            tableColGroupNode={props.tableColGroupNode}\n            tableMinWidth={props.tableMinWidth}\n            clientWidth={props.clientWidth}\n            clientHeight={props.clientHeight}\n            expandRows={props.expandRows}\n            nowDate={nowDate}\n            nowIndicatorSegs={isNowIndicator && this.slicer.sliceNowDate(nowDate, context, dayRanges)}\n            todayRange={todayRange}\n            onScrollTopRequest={props.onScrollTopRequest}\n            onSlatCoords={props.onSlatCoords}\n          />\n        )}\n      </NowTimer>\n    )\n  }\n}\n\nexport function buildDayRanges(dayTableModel: DayTableModel, dateProfile: DateProfile, dateEnv: DateEnv): DateRange[] {\n  let ranges: DateRange[] = []\n\n  for (let date of dayTableModel.headerDates) {\n    ranges.push({\n      start: dateEnv.add(date, dateProfile.slotMinTime),\n      end: dateEnv.add(date, dateProfile.slotMaxTime),\n    })\n  }\n\n  return ranges\n}\n","import {\n  createDuration,\n  asRoughMs,\n  formatIsoTimeString,\n  addDurations,\n  wholeDivideDurations,\n  Duration,\n  DateMarker,\n  DateEnv,\n} from '@fullcalendar/common'\n\nexport interface TimeSlatMeta {\n  date: DateMarker\n  time: Duration\n  key: string\n  isoTimeStr: string\n  isLabeled: boolean\n}\n\n// potential nice values for the slot-duration and interval-duration\n// from largest to smallest\nconst STOCK_SUB_DURATIONS = [\n  { hours: 1 },\n  { minutes: 30 },\n  { minutes: 15 },\n  { seconds: 30 },\n  { seconds: 15 },\n]\n\nexport function buildSlatMetas(\n  slotMinTime: Duration,\n  slotMaxTime: Duration,\n  explicitLabelInterval: Duration | null,\n  slotDuration: Duration,\n  dateEnv: DateEnv,\n) {\n  let dayStart = new Date(0)\n  let slatTime = slotMinTime\n  let slatIterator = createDuration(0)\n  let labelInterval = explicitLabelInterval || computeLabelInterval(slotDuration)\n  let metas: TimeSlatMeta[] = []\n\n  while (asRoughMs(slatTime) < asRoughMs(slotMaxTime)) {\n    let date = dateEnv.add(dayStart, slatTime)\n    let isLabeled = wholeDivideDurations(slatIterator, labelInterval) !== null\n\n    metas.push({\n      date,\n      time: slatTime,\n      key: date.toISOString(), // we can't use the isoTimeStr for uniqueness when minTime/maxTime beyone 0h/24h\n      isoTimeStr: formatIsoTimeString(date),\n      isLabeled,\n    })\n\n    slatTime = addDurations(slatTime, slotDuration)\n    slatIterator = addDurations(slatIterator, slotDuration)\n  }\n\n  return metas\n}\n\n// Computes an automatic value for slotLabelInterval\nfunction computeLabelInterval(slotDuration) {\n  let i\n  let labelInterval\n  let slotsPerLabel\n\n  // find the smallest stock label interval that results in more than one slots-per-label\n  for (i = STOCK_SUB_DURATIONS.length - 1; i >= 0; i -= 1) {\n    labelInterval = createDuration(STOCK_SUB_DURATIONS[i])\n    slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration)\n    if (slotsPerLabel !== null && slotsPerLabel > 1) {\n      return labelInterval\n    }\n  }\n\n  return slotDuration // fall back\n}\n","import {\n  createElement,\n  DateProfileGenerator, DateProfile,\n  DayHeader,\n  DaySeriesModel,\n  DayTableModel,\n  memoize,\n  ChunkContentCallbackArgs,\n} from '@fullcalendar/common'\nimport { DayTable } from '@fullcalendar/daygrid'\nimport { TimeColsView } from './TimeColsView'\nimport { DayTimeCols } from './DayTimeCols'\nimport { buildSlatMetas } from './time-slat-meta'\n\nexport class DayTimeColsView extends TimeColsView {\n  private buildTimeColsModel = memoize(buildTimeColsModel)\n  private buildSlatMetas = memoize(buildSlatMetas)\n\n  render() {\n    let { options, dateEnv, dateProfileGenerator } = this.context\n    let { props } = this\n    let { dateProfile } = props\n    let dayTableModel = this.buildTimeColsModel(dateProfile, dateProfileGenerator)\n    let splitProps = this.allDaySplitter.splitProps(props)\n    let slatMetas = this.buildSlatMetas(\n      dateProfile.slotMinTime,\n      dateProfile.slotMaxTime,\n      options.slotLabelInterval,\n      options.slotDuration,\n      dateEnv,\n    )\n    let { dayMinWidth } = options\n    let hasAttachedAxis = !dayMinWidth\n    let hasDetachedAxis = dayMinWidth\n\n    let headerContent = options.dayHeaders && (\n      <DayHeader\n        dates={dayTableModel.headerDates}\n        dateProfile={dateProfile}\n        datesRepDistinctDays\n        renderIntro={hasAttachedAxis ? this.renderHeadAxis : null}\n      />\n    )\n\n    let allDayContent = (options.allDaySlot !== false) && ((contentArg: ChunkContentCallbackArgs) => (\n      <DayTable\n        {...splitProps.allDay}\n        dateProfile={dateProfile}\n        dayTableModel={dayTableModel}\n        nextDayThreshold={options.nextDayThreshold}\n        tableMinWidth={contentArg.tableMinWidth}\n        colGroupNode={contentArg.tableColGroupNode}\n        renderRowIntro={hasAttachedAxis ? this.renderTableRowAxis : null}\n        showWeekNumbers={false}\n        expandRows={false}\n        headerAlignElRef={this.headerElRef}\n        clientWidth={contentArg.clientWidth}\n        clientHeight={contentArg.clientHeight}\n        forPrint={props.forPrint}\n        {...this.getAllDayMaxEventProps()}\n      />\n    ))\n\n    let timeGridContent = (contentArg: ChunkContentCallbackArgs) => (\n      <DayTimeCols\n        {...splitProps.timed}\n        dayTableModel={dayTableModel}\n        dateProfile={dateProfile}\n        axis={hasAttachedAxis}\n        slotDuration={options.slotDuration}\n        slatMetas={slatMetas}\n        forPrint={props.forPrint}\n        tableColGroupNode={contentArg.tableColGroupNode}\n        tableMinWidth={contentArg.tableMinWidth}\n        clientWidth={contentArg.clientWidth}\n        clientHeight={contentArg.clientHeight}\n        onSlatCoords={this.handleSlatCoords}\n        expandRows={contentArg.expandRows}\n        onScrollTopRequest={this.handleScrollTopRequest}\n      />\n    )\n\n    return hasDetachedAxis\n      ? this.renderHScrollLayout(\n        headerContent,\n        allDayContent,\n        timeGridContent,\n        dayTableModel.colCnt,\n        dayMinWidth,\n        slatMetas,\n        this.state.slatCoords,\n      )\n      : this.renderSimpleLayout(\n        headerContent,\n        allDayContent,\n        timeGridContent,\n      )\n  }\n}\n\nexport function buildTimeColsModel(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator) {\n  let daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator)\n\n  return new DayTableModel(daySeries, false)\n}\n","export const OPTION_REFINERS = {\n  allDaySlot: Boolean,\n}\n","import { createPlugin } from '@fullcalendar/common'\nimport { TimeColsView } from './TimeColsView'\nimport { DayTimeColsView, buildTimeColsModel } from './DayTimeColsView'\nimport { TimeColsSeg } from './TimeColsSeg'\nimport { DayTimeCols, buildDayRanges } from './DayTimeCols'\nimport { DayTimeColsSlicer } from './DayTimeColsSlicer'\nimport { OPTION_REFINERS } from './options'\nimport './options-declare'\nimport './main.css'\n\nexport { DayTimeCols, DayTimeColsView, TimeColsView, buildTimeColsModel, buildDayRanges, DayTimeColsSlicer, TimeColsSeg }\nexport { TimeCols } from './TimeCols'\nexport { TimeSlatMeta, buildSlatMetas } from './time-slat-meta'\nexport { TimeColsSlatsCoords } from './TimeColsSlatsCoords'\n\nexport default createPlugin({\n  initialView: 'timeGridWeek',\n  optionRefiners: OPTION_REFINERS,\n  views: {\n\n    timeGrid: {\n      component: DayTimeColsView,\n      usesMinMaxTime: true, // indicates that slotMinTime/slotMaxTime affects rendering\n      allDaySlot: true,\n      slotDuration: '00:30:00',\n      slotEventOverlap: true, // a bad name. confused with overlap/constraint system\n    },\n\n    timeGridDay: {\n      type: 'timeGrid',\n      duration: { days: 1 },\n    },\n\n    timeGridWeek: {\n      type: 'timeGrid',\n      duration: { weeks: 1 },\n    },\n\n  },\n})\n","import { config, isValidDate, addDays, createElement, CalendarContext, Fragment } from '@fullcalendar/common'\n\nconst RELEASE_DATE = '<%= releaseDate %>' // for Scheduler\nconst UPGRADE_WINDOW = 365 + 7 // days. 1 week leeway, for tz shift reasons too\nconst INVALID_LICENSE_URL = 'http://fullcalendar.io/docs/schedulerLicenseKey#invalid'\nconst OUTDATED_LICENSE_URL = 'http://fullcalendar.io/docs/schedulerLicenseKey#outdated'\nconst PRESET_LICENSE_KEYS = [\n  'GPL-My-Project-Is-Open-Source',\n  'CC-Attribution-NonCommercial-NoDerivatives',\n]\nconst CSS = {\n  position: 'absolute' as 'absolute', // for TS+React. ugh.\n  zIndex: 99999,\n  bottom: '1px',\n  left: '1px',\n  background: '#eee',\n  borderColor: '#ddd',\n  borderStyle: 'solid',\n  borderWidth: '1px 1px 0 0',\n  padding: '2px 4px',\n  fontSize: '12px',\n  borderTopRightRadius: '3px',\n}\n\nexport function buildLicenseWarning(context: CalendarContext) {\n  let key = context.options.schedulerLicenseKey\n  let currentUrl = typeof window !== 'undefined' ? window.location.href : ''\n\n  if (!isImmuneUrl(currentUrl)) {\n    let status = processLicenseKey(key)\n\n    if (status !== 'valid') {\n      return (\n        <div className=\"fc-license-message\" style={CSS}>\n          {(status === 'outdated') ? (\n            <Fragment>\n              {'Your license key is too old to work with this version. '}\n              <a href={OUTDATED_LICENSE_URL}>More Info</a>\n            </Fragment>\n          ) : (\n            <Fragment>\n              {'Your license key is invalid. '}\n              <a href={INVALID_LICENSE_URL}>More Info</a>\n            </Fragment>\n          )}\n        </div>\n      )\n    }\n  }\n\n  return null\n}\n\n/*\nThis decryption is not meant to be bulletproof. Just a way to remind about an upgrade.\n*/\nfunction processLicenseKey(key) {\n  if (PRESET_LICENSE_KEYS.indexOf(key) !== -1) {\n    return 'valid'\n  }\n\n  const parts = (key || '').match(/^(\\d+)-fcs-(\\d+)$/)\n\n  if (parts && (parts[1].length === 10)) {\n    const purchaseDate = new Date(parseInt(parts[2], 10) * 1000)\n    const releaseDate = new Date(config.mockSchedulerReleaseDate || RELEASE_DATE)\n\n    if (isValidDate(releaseDate)) { // token won't be replaced in dev mode\n      const minPurchaseDate = addDays(releaseDate, -UPGRADE_WINDOW)\n\n      if (minPurchaseDate < purchaseDate) {\n        return 'valid'\n      }\n\n      return 'outdated'\n    }\n  }\n\n  return 'invalid'\n}\n\nfunction isImmuneUrl(url) {\n  return /\\w+:\\/\\/fullcalendar\\.io\\/|\\/examples\\/[\\w-]+\\.html$/.test(url)\n}\n","export const OPTION_REFINERS = {\n  schedulerLicenseKey: String,\n}\n","import { removeElement, computeEdges } from '@fullcalendar/common'\n\n// TODO: assume the el has no borders?\nexport function getScrollCanvasOrigin(scrollEl: HTMLElement) { // best place for this?\n  let rect = scrollEl.getBoundingClientRect()\n  let edges = computeEdges(scrollEl) // TODO: pass in isRtl?\n\n  return {\n    left: rect.left + edges.borderLeft + edges.scrollbarLeft - getScrollFromLeftEdge(scrollEl),\n    top: rect.top + edges.borderTop - scrollEl.scrollTop,\n  }\n}\n\nexport function getScrollFromLeftEdge(el: HTMLElement) {\n  let scrollLeft = el.scrollLeft\n  let computedStyles = window.getComputedStyle(el) // TODO: pass in isRtl instead?\n\n  if (computedStyles.direction === 'rtl') {\n    switch (getRtlScrollSystem()) {\n      case 'negative':\n        scrollLeft *= -1 // convert to 'reverse'. fall through...\n      case 'reverse': // scrollLeft is distance between scrollframe's right edge scrollcanvas's right edge\n        scrollLeft = el.scrollWidth - scrollLeft - el.clientWidth\n    }\n  }\n\n  return scrollLeft\n}\n\nexport function setScrollFromLeftEdge(el: HTMLElement, scrollLeft: number) {\n  let computedStyles = window.getComputedStyle(el) // TODO: pass in isRtl instead?\n\n  if (computedStyles.direction === 'rtl') {\n    switch (getRtlScrollSystem()) {\n      case 'reverse':\n        scrollLeft = el.scrollWidth - scrollLeft\n        break\n      case 'negative':\n        scrollLeft = -(el.scrollWidth - scrollLeft)\n        break\n    }\n  }\n\n  el.scrollLeft = scrollLeft\n}\n\n// Horizontal Scroll System Detection\n// ----------------------------------------------------------------------------------------------\n\nlet _rtlScrollSystem\n\nfunction getRtlScrollSystem() {\n  return _rtlScrollSystem || (_rtlScrollSystem = detectRtlScrollSystem())\n}\n\nfunction detectRtlScrollSystem() {\n  let el = document.createElement('div')\n  el.style.position = 'absolute'\n  el.style.top = '-1000px'\n  el.style.width = '1px'\n  el.style.height = '1px'\n  el.style.overflow = 'scroll'\n  el.style.direction = 'rtl'\n  el.style.fontSize = '100px'\n  el.innerHTML = 'A'\n\n  document.body.appendChild(el)\n\n  let system\n  if (el.scrollLeft > 0) {\n    system = 'positive' // scroll is a positive number from the left edge\n  } else {\n    el.scrollLeft = 1\n    if (el.scrollLeft > 0) {\n      system = 'reverse' // scroll is a positive number from the right edge\n    } else {\n      system = 'negative' // scroll is a negative number from the right edge\n    }\n  }\n\n  removeElement(el)\n  return system\n}\n","import { createPlugin } from '@fullcalendar/common'\nimport { buildLicenseWarning } from './license'\nimport { OPTION_REFINERS } from './options'\nimport './options-declare'\n\nexport default createPlugin({\n  optionRefiners: OPTION_REFINERS,\n  viewContainerAppends: [buildLicenseWarning],\n})\n","import { Emitter, DelayedRunner } from '@fullcalendar/common'\n\nconst WHEEL_EVENT_NAMES = 'wheel mousewheel DomMouseScroll MozMousePixelScroll'.split(' ')\n\n/*\nALSO, with the ability to disable touch\n*/\nexport class ScrollListener {\n  emitter = new Emitter()\n  private isScrolling = false\n  private isTouching = false // user currently has finger down?\n  private isRecentlyWheeled = false\n  private isRecentlyScrolled = false\n  private wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this))\n  private scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this))\n\n  constructor(public el: HTMLElement) {\n    el.addEventListener('scroll', this.handleScroll)\n    el.addEventListener('touchstart', this.handleTouchStart, { passive: true })\n    el.addEventListener('touchend', this.handleTouchEnd)\n\n    for (let eventName of WHEEL_EVENT_NAMES) {\n      el.addEventListener(eventName, this.handleWheel)\n    }\n  }\n\n  destroy() {\n    let { el } = this\n    el.removeEventListener('scroll', this.handleScroll)\n    el.removeEventListener('touchstart', this.handleTouchStart, { passive: true } as AddEventListenerOptions)\n    el.removeEventListener('touchend', this.handleTouchEnd)\n\n    for (let eventName of WHEEL_EVENT_NAMES) {\n      el.removeEventListener(eventName, this.handleWheel)\n    }\n  }\n\n  // Start / Stop\n  // ----------------------------------------------------------------------------------------------\n\n  private startScroll() {\n    if (!this.isScrolling) {\n      this.isScrolling = true\n      this.emitter.trigger('scrollStart', this.isRecentlyWheeled, this.isTouching)\n    }\n  }\n\n  endScroll() {\n    if (this.isScrolling) {\n      this.emitter.trigger('scrollEnd')\n      this.isScrolling = false\n      this.isRecentlyScrolled = true\n      this.isRecentlyWheeled = false\n      this.scrollWaiter.clear()\n      this.wheelWaiter.clear()\n    }\n  }\n\n  // Handlers\n  // ----------------------------------------------------------------------------------------------\n\n  handleScroll = () => {\n    this.startScroll()\n    this.emitter.trigger('scroll', this.isRecentlyWheeled, this.isTouching)\n    this.isRecentlyScrolled = true\n    this.scrollWaiter.request(500)\n  }\n\n  _handleScrollWaited() {\n    this.isRecentlyScrolled = false\n\n    // only end the scroll if not currently touching.\n    // if touching, the scrolling will end later, on touchend.\n    if (!this.isTouching) {\n      this.endScroll() // won't fire if already ended\n    }\n  }\n\n  // will fire *before* the scroll event is fired (might not cause a scroll)\n  handleWheel = () => {\n    this.isRecentlyWheeled = true\n    this.wheelWaiter.request(500)\n  }\n\n  _handleWheelWaited() {\n    this.isRecentlyWheeled = false\n  }\n\n  // will fire *before* the scroll event is fired (might not cause a scroll)\n  handleTouchStart = () => {\n    this.isTouching = true\n  }\n\n  handleTouchEnd = () => {\n    this.isTouching = false\n\n    // if the user ended their touch, and the scroll area wasn't moving,\n    // we consider this to be the end of the scroll.\n    if (!this.isRecentlyScrolled) {\n      this.endScroll() // won't fire if already ended\n    }\n  }\n}\n","import {\n  applyStyle,\n  translateRect, Rect, Point,\n  findElements,\n  computeInnerRect,\n  CssDimValue,\n  removeElement,\n} from '@fullcalendar/common'\nimport { ScrollListener } from './ScrollListener'\nimport { getScrollCanvasOrigin, getScrollFromLeftEdge } from './scroll-left-norm'\n\ninterface ElementGeom {\n  parentBound: Rect // relative to the canvas origin\n  naturalBound: Rect | null // of the el itself\n  elWidth: number\n  elHeight: number\n  textAlign: string\n}\n\nconst IS_MS_EDGE = typeof navigator !== 'undefined' && /Edge/.test(navigator.userAgent) // TODO: what about Chromeum-based Edge?\nconst STICKY_SELECTOR = '.fc-sticky'\n\n/*\nuseful beyond the native position:sticky for these reasons:\n- support in IE11\n- nice centering support\n\nREQUIREMENT: fc-sticky elements, if the fc-sticky className is taken away, should NOT have relative or absolute positioning.\nThis is because we attach the coords with JS, and the VDOM might take away the fc-sticky class but doesn't know kill the positioning.\n\nTODO: don't query text-align:center. isn't compatible with flexbox centering. instead, check natural X coord within parent container\n*/\nexport class StickyScrolling {\n  listener?: ScrollListener\n  usingRelative: boolean | null = null\n\n  constructor(\n    private scrollEl: HTMLElement,\n    private isRtl: boolean,\n  ) {\n    this.usingRelative =\n      !getStickySupported() || // IE11\n      // https://stackoverflow.com/questions/56835658/in-microsoft-edge-sticky-positioning-doesnt-work-when-combined-with-dir-rtl\n      (IS_MS_EDGE && isRtl)\n\n    if (this.usingRelative) {\n      this.listener = new ScrollListener(scrollEl)\n      this.listener.emitter.on('scrollEnd', this.updateSize)\n    }\n  }\n\n  destroy() {\n    if (this.listener) {\n      this.listener.destroy()\n    }\n  }\n\n  updateSize = () => {\n    let { scrollEl } = this\n    let els = findElements(scrollEl, STICKY_SELECTOR)\n    let elGeoms = this.queryElGeoms(els)\n    let viewportWidth = scrollEl.clientWidth\n    let viewportHeight = scrollEl.clientHeight\n\n    if (this.usingRelative) {\n      let elDestinations = this.computeElDestinations(elGeoms, viewportWidth) // read before prepPositioning\n\n      assignRelativePositions(els, elGeoms, elDestinations, viewportWidth, viewportHeight)\n    } else {\n      assignStickyPositions(els, elGeoms, viewportWidth)\n    }\n  }\n\n  queryElGeoms(els: HTMLElement[]): ElementGeom[] {\n    let { scrollEl, isRtl } = this\n    let canvasOrigin = getScrollCanvasOrigin(scrollEl)\n    let elGeoms: ElementGeom[] = []\n\n    for (let el of els) {\n      let parentBound = translateRect(\n        computeInnerRect(el.parentNode as HTMLElement, true, true), // weird way to call this!!!\n        -canvasOrigin.left,\n        -canvasOrigin.top,\n      )\n\n      let elRect = el.getBoundingClientRect()\n      let computedStyles = window.getComputedStyle(el)\n      let textAlign = window.getComputedStyle(el.parentNode as HTMLElement).textAlign // ask the parent\n      let naturalBound = null\n\n      if (textAlign === 'start') {\n        textAlign = isRtl ? 'right' : 'left'\n      } else if (textAlign === 'end') {\n        textAlign = isRtl ? 'left' : 'right'\n      }\n\n      if (computedStyles.position !== 'sticky') {\n        naturalBound = translateRect(\n          elRect,\n          -canvasOrigin.left - (parseFloat(computedStyles.left) || 0), // could be 'auto'\n          -canvasOrigin.top - (parseFloat(computedStyles.top) || 0),\n        )\n      }\n\n      elGeoms.push({\n        parentBound,\n        naturalBound,\n        elWidth: elRect.width,\n        elHeight: elRect.height,\n        textAlign,\n      })\n    }\n\n    return elGeoms\n  }\n\n  // only for IE\n  computeElDestinations(elGeoms: ElementGeom[], viewportWidth: number): Point[] {\n    let { scrollEl } = this\n    let viewportTop = scrollEl.scrollTop\n    let viewportLeft = getScrollFromLeftEdge(scrollEl)\n    let viewportRight = viewportLeft + viewportWidth\n\n    return elGeoms.map((elGeom) => {\n      let { elWidth, elHeight, parentBound, naturalBound } = elGeom\n      let destLeft // relative to canvas topleft\n      let destTop // \"\n\n      switch (elGeom.textAlign) {\n        case 'left':\n          destLeft = viewportLeft\n          break\n        case 'right':\n          destLeft = viewportRight - elWidth\n          break\n        case 'center':\n          destLeft = (viewportLeft + viewportRight) / 2 - elWidth / 2 /// noooo, use half-width insteadddddddd\n          break\n      }\n\n      destLeft = Math.min(destLeft, parentBound.right - elWidth)\n      destLeft = Math.max(destLeft, parentBound.left)\n\n      destTop = viewportTop\n      destTop = Math.min(destTop, parentBound.bottom - elHeight)\n      destTop = Math.max(destTop, naturalBound.top) // better to use natural top for upper bound\n\n      return { left: destLeft, top: destTop }\n    })\n  }\n}\n\nfunction assignRelativePositions(\n  els: HTMLElement[],\n  elGeoms: ElementGeom[],\n  elDestinations: Point[],\n  viewportWidth: number,\n  viewportHeight: number,\n) {\n  els.forEach((el, i) => {\n    let { naturalBound, parentBound } = elGeoms[i]\n    let parentWidth = parentBound.right - parentBound.left\n    let parentHeight = parentBound.bottom - parentBound.bottom\n    let left: CssDimValue\n    let top: CssDimValue\n\n    if (\n      parentWidth > viewportWidth ||\n      parentHeight > viewportHeight\n    ) {\n      left = elDestinations[i].left - naturalBound.left\n      top = elDestinations[i].top - naturalBound.top\n    } else { // if parent container can be completely in view, we don't need stickiness\n      left = ''\n      top = ''\n    }\n\n    applyStyle(el, {\n      position: 'relative',\n      left,\n      right: -left, // for rtl\n      top,\n    })\n  })\n}\n\nfunction assignStickyPositions(els: HTMLElement[], elGeoms: ElementGeom[], viewportWidth: number) {\n  els.forEach((el, i) => {\n    let { textAlign, elWidth, parentBound } = elGeoms[i]\n    let parentWidth = parentBound.right - parentBound.left\n    let left: CssDimValue\n\n    if (\n      textAlign === 'center' &&\n      parentWidth > viewportWidth\n    ) {\n      left = (viewportWidth - elWidth) / 2\n    } else { // if parent container can be completely in view, we don't need stickiness\n      left = ''\n    }\n\n    applyStyle(el, { // will already have fc-sticky class which makes it sticky\n      left,\n      right: left, // for when centered\n      top: 0,\n    })\n  })\n}\n\nlet _isStickySupported\n\nfunction getStickySupported() {\n  if (_isStickySupported == null) {\n    _isStickySupported = computeStickySupported()\n  }\n  return _isStickySupported\n}\n\nfunction computeStickySupported() {\n  let el = document.createElement('div')\n  el.style.position = 'sticky'\n  document.body.appendChild(el)\n  let val = window.getComputedStyle(el).position\n  removeElement(el)\n  return val === 'sticky'\n}\n","import {\n  createElement, ComponentChildren, createRef, Ref, BaseComponent, setRef,\n  ScrollerLike,\n  Scroller, OverflowValue,\n  getIsRtlScrollbarOnLeft,\n  isPropsEqual,\n} from '@fullcalendar/common'\n\nexport type ClippedOverflowValue = OverflowValue | 'scroll-hidden'\n\nexport interface ClippedScrollerProps {\n  overflowX: ClippedOverflowValue\n  overflowY: ClippedOverflowValue\n  liquid: boolean\n  maxHeight?: number // incompatible with liquid\n  children?: ComponentChildren\n  scrollerRef?: Ref<Scroller>\n  scrollerElRef?: Ref<HTMLElement>\n}\n\ninterface ClippedScrollerState {\n  yScrollbarWidth?: number\n  xScrollbarWidth?: number\n}\n\nexport class ClippedScroller extends BaseComponent<ClippedScrollerProps, ClippedScrollerState> implements ScrollerLike {\n  private elRef = createRef<HTMLDivElement>()\n  private scroller: Scroller\n\n  state = {\n    xScrollbarWidth: 0,\n    yScrollbarWidth: 0,\n  }\n\n  render() {\n    let { props, state, context } = this\n    let isScrollbarOnLeft = context.isRtl && getIsRtlScrollbarOnLeft()\n    let overcomeLeft = 0\n    let overcomeRight = 0\n    let overcomeBottom = 0\n\n    if (props.overflowX === 'scroll-hidden') {\n      overcomeBottom = state.xScrollbarWidth\n    }\n\n    if (props.overflowY === 'scroll-hidden') {\n      if (state.yScrollbarWidth != null) {\n        if (isScrollbarOnLeft) {\n          overcomeLeft = state.yScrollbarWidth\n        } else {\n          overcomeRight = state.yScrollbarWidth\n        }\n      }\n    }\n\n    return (\n      <div\n        ref={this.elRef}\n        className={'fc-scroller-harness' + (props.liquid ? ' fc-scroller-harness-liquid' : '')}\n      >\n        <Scroller\n          ref={this.handleScroller}\n          elRef={this.props.scrollerElRef}\n          overflowX={props.overflowX === 'scroll-hidden' ? 'scroll' : props.overflowX}\n          overflowY={props.overflowY === 'scroll-hidden' ? 'scroll' : props.overflowY}\n          overcomeLeft={overcomeLeft}\n          overcomeRight={overcomeRight}\n          overcomeBottom={overcomeBottom}\n          maxHeight={\n            typeof props.maxHeight === 'number'\n              ? (props.maxHeight + (props.overflowX === 'scroll-hidden' ? state.xScrollbarWidth : 0))\n              : ''\n          }\n          liquid={props.liquid}\n          liquidIsAbsolute\n        >\n          {props.children}\n        </Scroller>\n      </div>\n    )\n  }\n\n  handleScroller = (scroller: Scroller) => {\n    this.scroller = scroller\n    setRef(this.props.scrollerRef, scroller)\n  }\n\n  componentDidMount() {\n    this.handleSizing()\n    this.context.addResizeHandler(this.handleSizing)\n  }\n\n  componentDidUpdate(prevProps: ClippedScrollerProps) {\n    if (!isPropsEqual(prevProps, this.props)) { // an external change?\n      this.handleSizing()\n    }\n  }\n\n  componentWillUnmount() {\n    this.context.removeResizeHandler(this.handleSizing)\n  }\n\n  handleSizing = () => {\n    let { props } = this\n\n    if (props.overflowY === 'scroll-hidden') {\n      this.setState({ yScrollbarWidth: this.scroller.getYScrollbarWidth() })\n    }\n\n    if (props.overflowX === 'scroll-hidden') {\n      this.setState({ xScrollbarWidth: this.scroller.getXScrollbarWidth() })\n    }\n  }\n\n  needsXScrolling() {\n    return this.scroller.needsXScrolling()\n  }\n\n  needsYScrolling() {\n    return this.scroller.needsYScrolling()\n  }\n}\n","import { ScrollListener } from './ScrollListener'\nimport { setScrollFromLeftEdge } from './scroll-left-norm'\n\nexport class ScrollSyncer {\n  private masterEl: HTMLElement\n  private scrollListeners: ScrollListener[]\n  private isPaused: boolean = false\n\n  constructor(\n    private isVertical: boolean,\n    private scrollEls: HTMLElement[],\n  ) {\n    this.scrollListeners = scrollEls.map((el) => this.bindScroller(el))\n  }\n\n  destroy() {\n    for (let scrollListener of this.scrollListeners) {\n      scrollListener.destroy()\n    }\n  }\n\n  bindScroller(el: HTMLElement) {\n    let { scrollEls, isVertical } = this\n    let scrollListener = new ScrollListener(el)\n\n    const onScroll = (isWheel, isTouch) => {\n      if (!this.isPaused) {\n        if (!this.masterEl || (this.masterEl !== el && (isWheel || isTouch))) {\n          this.assignMaster(el)\n        }\n\n        if (this.masterEl === el) { // dealing with current\n          for (let otherEl of scrollEls) {\n            if (otherEl !== el) {\n              if (isVertical) {\n                otherEl.scrollTop = el.scrollTop\n              } else {\n                otherEl.scrollLeft = el.scrollLeft\n              }\n            }\n          }\n        }\n      }\n    }\n\n    const onScrollEnd = () => {\n      if (this.masterEl === el) {\n        this.masterEl = null\n      }\n    }\n\n    scrollListener.emitter.on('scroll', onScroll)\n    scrollListener.emitter.on('scrollEnd', onScrollEnd)\n\n    return scrollListener\n  }\n\n  assignMaster(el: HTMLElement) {\n    this.masterEl = el\n\n    for (let scrollListener of this.scrollListeners) {\n      if (scrollListener.el !== el) {\n        scrollListener.endScroll() // to prevent residual scrolls from reclaiming master\n      }\n    }\n  }\n\n  /*\n  will normalize the scrollLeft value\n  */\n  forceScrollLeft(scrollLeft: number) {\n    this.isPaused = true\n\n    for (let listener of this.scrollListeners) {\n      setScrollFromLeftEdge(listener.el, scrollLeft)\n    }\n\n    this.isPaused = false\n  }\n\n  forceScrollTop(top: number) {\n    this.isPaused = true\n\n    for (let listener of this.scrollListeners) {\n      listener.el.scrollTop = top\n    }\n\n    this.isPaused = false\n  }\n}\n","import {\n  createElement, VNode, Fragment,\n  BaseComponent,\n  isArraysEqual,\n  findElements,\n  mapHash,\n  RefMap,\n  ColProps, CssDimValue, hasShrinkWidth, renderMicroColGroup,\n  ScrollGridProps, ScrollGridSectionConfig, ColGroupConfig,\n  getScrollGridClassNames, getSectionClassNames, getSectionHasLiquidHeight, getAllowYScrolling, renderChunkContent, computeShrinkWidth,\n  getIsRtlScrollbarOnLeft,\n  setRef,\n  sanitizeShrinkWidth,\n  isPropsEqual,\n  compareObjs,\n  isColPropsEqual,\n  getScrollbarWidths,\n  memoizeArraylike,\n  MemoiseArrayFunc,\n  collectFromHash,\n  memoizeHashlike,\n  MemoizeHashFunc,\n  ScrollGridChunkConfig,\n  getCanVGrowWithinCell,\n  config,\n} from '@fullcalendar/common'\nimport { StickyScrolling } from './StickyScrolling'\nimport { ClippedScroller, ClippedOverflowValue } from './ClippedScroller'\nimport { ScrollSyncer } from './ScrollSyncer'\n\ninterface ScrollGridState {\n  shrinkWidths: number[] // for only one col within each vertical stack of chunks\n  forceYScrollbars: boolean // null means not computed yet\n  forceXScrollbars: boolean // \"\n  scrollerClientWidths: { [index: string]: number } // why not use array?\n  scrollerClientHeights: { [index: string]: number }\n  sectionRowMaxHeights: number[][][]\n}\n\ninterface ColGroupStat {\n  hasShrinkCol: boolean\n  totalColWidth: number\n  totalColMinWidth: number\n  allowXScrolling: boolean\n  width?: CssDimValue\n  cols: ColProps[]\n}\n\n/*\nTODO: make <ScrollGridSection> subcomponent\nNOTE: doesn't support collapsibleWidth (which is sortof a hack anyway)\n*/\nexport class ScrollGrid extends BaseComponent<ScrollGridProps, ScrollGridState> {\n  private compileColGroupStats = memoizeArraylike(compileColGroupStat, isColGroupStatsEqual)\n  private renderMicroColGroups = memoizeArraylike(renderMicroColGroup) // yucky to memoize VNodes, but much more efficient for consumers\n  private clippedScrollerRefs = new RefMap<ClippedScroller>()\n\n  // doesn't hold non-scrolling els used just for padding\n  private scrollerElRefs = new RefMap<HTMLElement>(this._handleScrollerEl.bind(this))\n\n  private chunkElRefs = new RefMap<HTMLTableCellElement>(this._handleChunkEl.bind(this))\n  private getStickyScrolling: MemoiseArrayFunc<[HTMLElement, boolean], StickyScrolling>\n  private getScrollSyncersBySection: MemoizeHashFunc<HTMLElement[], ScrollSyncer>\n  private getScrollSyncersByColumn: MemoizeHashFunc<HTMLElement[], ScrollSyncer>\n  private stickyScrollings: StickyScrolling[] = []\n  private scrollSyncersBySection: { [sectionI: string]: ScrollSyncer } = {}\n  private scrollSyncersByColumn: { [columnI: string]: ScrollSyncer } = {}\n\n  // for row-height-syncing\n  private rowUnstableMap = new Map<HTMLTableRowElement, boolean>() // no need to groom. always self-cancels\n  private rowInnerMaxHeightMap = new Map<HTMLTableRowElement, number>()\n  private anyRowHeightsChanged = false\n\n  private lastSizingDate: Date\n  private recentSizingCnt = 0\n\n  state: ScrollGridState = {\n    shrinkWidths: [],\n    forceYScrollbars: false,\n    forceXScrollbars: false,\n    scrollerClientWidths: {},\n    scrollerClientHeights: {},\n    sectionRowMaxHeights: [],\n  }\n\n  render(): VNode {\n    let { props, state, context } = this\n    let { shrinkWidths } = state\n\n    let colGroupStats = this.compileColGroupStats(props.colGroups.map((colGroup) => [colGroup]))\n    let microColGroupNodes = this.renderMicroColGroups(colGroupStats.map((stat, i) => [stat.cols, shrinkWidths[i]]))\n    let classNames = getScrollGridClassNames(props.liquid, context)\n\n    // yuck\n    let indices: [ number, number ][] = []\n    let [sectionCnt, chunksPerSection] = this.getDims()\n    for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n      for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n        indices.push([sectionI, chunkI])\n      }\n    }\n\n    // TODO: make DRY\n    let sectionConfigs = props.sections\n    let configCnt = sectionConfigs.length\n    let configI = 0\n    let currentConfig: ScrollGridSectionConfig\n    let headSectionNodes: VNode[] = []\n    let bodySectionNodes: VNode[] = []\n    let footSectionNodes: VNode[] = []\n\n    while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {\n      headSectionNodes.push(this.renderSection(\n        currentConfig,\n        configI,\n        colGroupStats,\n        microColGroupNodes,\n        state.sectionRowMaxHeights,\n        true,\n      ))\n      configI += 1\n    }\n\n    while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {\n      bodySectionNodes.push(this.renderSection(\n        currentConfig,\n        configI,\n        colGroupStats,\n        microColGroupNodes,\n        state.sectionRowMaxHeights,\n        false,\n      ))\n      configI += 1\n    }\n\n    while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {\n      footSectionNodes.push(this.renderSection(\n        currentConfig,\n        configI,\n        colGroupStats,\n        microColGroupNodes,\n        state.sectionRowMaxHeights,\n        true,\n      ))\n      configI += 1\n    }\n\n    const isBuggy = !getCanVGrowWithinCell() // see NOTE in SimpleScrollGrid\n    const roleAttrs = { role: 'rowgroup' }\n\n    return createElement(\n      'table',\n      {\n        ref: props.elRef,\n        role: 'grid',\n        className: classNames.join(' '),\n      },\n      renderMacroColGroup(colGroupStats, shrinkWidths),\n      Boolean(!isBuggy && headSectionNodes.length) && createElement('thead', roleAttrs, ...headSectionNodes),\n      Boolean(!isBuggy && bodySectionNodes.length) && createElement('tbody', roleAttrs, ...bodySectionNodes),\n      Boolean(!isBuggy && footSectionNodes.length) && createElement('tfoot', roleAttrs, ...footSectionNodes),\n      isBuggy && createElement('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes),\n    )\n  }\n\n  renderSection(\n    sectionConfig: ScrollGridSectionConfig,\n    sectionIndex: number,\n    colGroupStats: ColGroupStat[],\n    microColGroupNodes: VNode[],\n    sectionRowMaxHeights: number[][][],\n    isHeader: boolean,\n  ): VNode {\n    if ('outerContent' in sectionConfig) {\n      return (\n        <Fragment key={sectionConfig.key}>\n          {sectionConfig.outerContent}\n        </Fragment>\n      )\n    }\n\n    return (\n      <tr\n        key={sectionConfig.key}\n        role=\"presentation\"\n        className={getSectionClassNames(sectionConfig, this.props.liquid).join(' ')}\n      >\n        {sectionConfig.chunks.map((chunkConfig, i) => this.renderChunk(\n          sectionConfig,\n          sectionIndex,\n          colGroupStats[i],\n          microColGroupNodes[i],\n          chunkConfig,\n          i,\n          (sectionRowMaxHeights[sectionIndex] || [])[i] || [],\n          isHeader,\n        ))}\n      </tr>\n    )\n  }\n\n  renderChunk(\n    sectionConfig: ScrollGridSectionConfig,\n    sectionIndex: number,\n    colGroupStat: ColGroupStat | undefined,\n    microColGroupNode: VNode | undefined,\n    chunkConfig: ScrollGridChunkConfig,\n    chunkIndex: number,\n    rowHeights: number[],\n    isHeader: boolean,\n  ): VNode {\n    if ('outerContent' in chunkConfig) {\n      return (\n        <Fragment key={chunkConfig.key}>\n          {chunkConfig.outerContent}\n        </Fragment>\n      )\n    }\n\n    let { state } = this\n    let { scrollerClientWidths, scrollerClientHeights } = state\n\n    let [sectionCnt, chunksPerSection] = this.getDims()\n    let index = sectionIndex * chunksPerSection + chunkIndex\n    let sideScrollIndex = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0\n    let isVScrollSide = chunkIndex === sideScrollIndex\n    let isLastSection = sectionIndex === sectionCnt - 1\n\n    let forceXScrollbars = isLastSection && state.forceXScrollbars // NOOOO can result in `null`\n    let forceYScrollbars = isVScrollSide && state.forceYScrollbars // NOOOO can result in `null`\n\n    let allowXScrolling = colGroupStat && colGroupStat.allowXScrolling // rename?\n    let allowYScrolling = getAllowYScrolling(this.props, sectionConfig) // rename? do in section func?\n\n    let chunkVGrow = getSectionHasLiquidHeight(this.props, sectionConfig) // do in section func?\n    let expandRows = sectionConfig.expandRows && chunkVGrow\n    let tableMinWidth = (colGroupStat && colGroupStat.totalColMinWidth) || ''\n\n    let content = renderChunkContent(sectionConfig, chunkConfig, {\n      tableColGroupNode: microColGroupNode,\n      tableMinWidth,\n      clientWidth: scrollerClientWidths[index] !== undefined ? scrollerClientWidths[index] : null,\n      clientHeight: scrollerClientHeights[index] !== undefined ? scrollerClientHeights[index] : null,\n      expandRows,\n      syncRowHeights: Boolean(sectionConfig.syncRowHeights),\n      rowSyncHeights: rowHeights,\n      reportRowHeightChange: this.handleRowHeightChange,\n    }, isHeader)\n\n    let overflowX: ClippedOverflowValue =\n      forceXScrollbars ? (isLastSection ? 'scroll' : 'scroll-hidden') :\n        !allowXScrolling ? 'hidden' :\n          (isLastSection ? 'auto' : 'scroll-hidden')\n\n    let overflowY: ClippedOverflowValue =\n      forceYScrollbars ? (isVScrollSide ? 'scroll' : 'scroll-hidden') :\n        !allowYScrolling ? 'hidden' :\n          (isVScrollSide ? 'auto' : 'scroll-hidden')\n\n    // it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,\n    // but if these values were to change, the inner components would be unmounted/remounted because of the parent change.\n    content = (\n      <ClippedScroller\n        ref={this.clippedScrollerRefs.createRef(index)}\n        scrollerElRef={this.scrollerElRefs.createRef(index)}\n        overflowX={overflowX}\n        overflowY={overflowY}\n        liquid={chunkVGrow}\n        maxHeight={sectionConfig.maxHeight}\n      >\n        {content}\n      </ClippedScroller>\n    )\n\n    return createElement(\n      isHeader ? 'th' : 'td',\n      {\n        key: chunkConfig.key,\n        ref: this.chunkElRefs.createRef(index) as any,\n        role: 'presentation',\n      },\n      content,\n    )\n  }\n\n  componentDidMount() {\n    this.getStickyScrolling = memoizeArraylike(initStickyScrolling, null, destroyStickyScrolling)\n    this.getScrollSyncersBySection = memoizeHashlike(initScrollSyncer.bind(this, true), null, destroyScrollSyncer)\n    this.getScrollSyncersByColumn = memoizeHashlike(initScrollSyncer.bind(this, false), null, destroyScrollSyncer)\n\n    this.updateScrollSyncers()\n    this.handleSizing(false)\n\n    this.context.addResizeHandler(this.handleSizing)\n  }\n\n  componentDidUpdate(prevProps: ScrollGridProps, prevState: ScrollGridState) {\n    this.updateScrollSyncers()\n\n    // TODO: need better solution when state contains non-sizing things\n    this.handleSizing(false, prevState.sectionRowMaxHeights !== this.state.sectionRowMaxHeights)\n  }\n\n  componentWillUnmount() {\n    this.context.removeResizeHandler(this.handleSizing)\n\n    this.destroyStickyScrolling()\n    this.destroyScrollSyncers()\n  }\n\n  handleSizing = (isForcedResize: boolean, sectionRowMaxHeightsChanged?: boolean) => {\n    if (!this.allowSizing()) {\n      return\n    }\n\n    if (!sectionRowMaxHeightsChanged) { // something else changed, probably external\n      this.anyRowHeightsChanged = true\n    }\n\n    let otherState: Partial<ScrollGridState> = {}\n\n    // if reacting to self-change of sectionRowMaxHeightsChanged, or not stable, don't do anything\n    if (isForcedResize || (!sectionRowMaxHeightsChanged && !this.rowUnstableMap.size)) {\n      otherState.sectionRowMaxHeights = this.computeSectionRowMaxHeights()\n    }\n\n    this.setState({\n      shrinkWidths: this.computeShrinkWidths(),\n      ...this.computeScrollerDims(),\n      ...(otherState as any), // wtf\n    }, () => {\n      if (!this.rowUnstableMap.size) {\n        this.updateStickyScrolling() // needs to happen AFTER final positioning committed to DOM\n      }\n    })\n  }\n\n  allowSizing() {\n    let now = new Date()\n\n    if (\n      !this.lastSizingDate ||\n      now.valueOf() > this.lastSizingDate.valueOf() + config.SCROLLGRID_RESIZE_INTERVAL\n    ) {\n      this.lastSizingDate = now\n      this.recentSizingCnt = 0\n      return true\n    }\n\n    return (this.recentSizingCnt += 1) <= 10\n  }\n\n  handleRowHeightChange = (rowEl: HTMLTableRowElement, isStable: boolean) => {\n    let { rowUnstableMap, rowInnerMaxHeightMap } = this\n\n    if (!isStable) {\n      rowUnstableMap.set(rowEl, true)\n    } else {\n      rowUnstableMap.delete(rowEl)\n\n      let innerMaxHeight = getRowInnerMaxHeight(rowEl)\n      if (!rowInnerMaxHeightMap.has(rowEl) || rowInnerMaxHeightMap.get(rowEl) !== innerMaxHeight) {\n        rowInnerMaxHeightMap.set(rowEl, innerMaxHeight)\n        this.anyRowHeightsChanged = true\n      }\n\n      if (!rowUnstableMap.size && this.anyRowHeightsChanged) {\n        this.anyRowHeightsChanged = false\n        this.setState({\n          sectionRowMaxHeights: this.computeSectionRowMaxHeights(),\n        })\n      }\n    }\n  }\n\n  computeShrinkWidths() {\n    let colGroupStats = this.compileColGroupStats(this.props.colGroups.map((colGroup) => [colGroup]))\n    let [sectionCnt, chunksPerSection] = this.getDims()\n    let cnt = sectionCnt * chunksPerSection\n    let shrinkWidths: number[] = []\n\n    colGroupStats.forEach((colGroupStat, i) => {\n      if (colGroupStat.hasShrinkCol) {\n        let chunkEls = this.chunkElRefs.collect(i, cnt, chunksPerSection) // in one col\n        shrinkWidths[i] = computeShrinkWidth(chunkEls)\n      }\n    })\n\n    return shrinkWidths\n  }\n\n  // has the side effect of grooming rowInnerMaxHeightMap\n  // TODO: somehow short-circuit if there are no new height changes\n  private computeSectionRowMaxHeights() {\n    let newHeightMap = new Map<HTMLTableRowElement, number>()\n\n    let [sectionCnt, chunksPerSection] = this.getDims()\n    let sectionRowMaxHeights: number[][][] = []\n\n    for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n      let sectionConfig = this.props.sections[sectionI]\n      let assignableHeights: number[][] = [] // chunk, row\n\n      if (sectionConfig && sectionConfig.syncRowHeights) {\n        let rowHeightsByChunk: number[][] = []\n\n        for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n          let index = sectionI * chunksPerSection + chunkI\n          let rowHeights: number[] = []\n\n          let chunkEl = this.chunkElRefs.currentMap[index]\n          if (chunkEl) {\n            rowHeights = findElements(chunkEl, '.fc-scrollgrid-sync-table tr').map((rowEl: HTMLTableRowElement) => {\n              let max = getRowInnerMaxHeight(rowEl)\n              newHeightMap.set(rowEl, max)\n              return max\n            })\n          } else {\n            rowHeights = []\n          }\n\n          rowHeightsByChunk.push(rowHeights)\n        }\n\n        let rowCnt = rowHeightsByChunk[0].length\n        let isEqualRowCnt = true\n\n        for (let chunkI = 1; chunkI < chunksPerSection; chunkI += 1) {\n          let isOuterContent = sectionConfig.chunks[chunkI] && sectionConfig.chunks[chunkI].outerContent !== undefined // can be null\n\n          if (!isOuterContent && rowHeightsByChunk[chunkI].length !== rowCnt) { // skip outer content\n            isEqualRowCnt = false\n            break\n          }\n        }\n\n        if (!isEqualRowCnt) {\n          let chunkHeightSums: number[] = []\n          for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n            chunkHeightSums.push(\n              sumNumbers(rowHeightsByChunk[chunkI]) + rowHeightsByChunk[chunkI].length, // add in border\n            )\n          }\n\n          let maxTotalSum = Math.max(...chunkHeightSums)\n\n          for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n            let rowInChunkCnt = rowHeightsByChunk[chunkI].length\n            let rowInChunkTotalHeight = maxTotalSum - rowInChunkCnt // subtract border\n\n            // height of non-first row. we do this to avoid rounding, because it's unreliable within a table\n            let rowInChunkHeightOthers = Math.floor(rowInChunkTotalHeight / rowInChunkCnt)\n\n            // whatever is leftover goes to the first row\n            let rowInChunkHeightFirst = rowInChunkTotalHeight - rowInChunkHeightOthers * (rowInChunkCnt - 1)\n\n            let rowInChunkHeights: number[] = []\n            let row = 0\n\n            if (row < rowInChunkCnt) {\n              rowInChunkHeights.push(rowInChunkHeightFirst)\n              row += 1\n            }\n\n            while (row < rowInChunkCnt) {\n              rowInChunkHeights.push(rowInChunkHeightOthers)\n              row += 1\n            }\n\n            assignableHeights.push(rowInChunkHeights)\n          }\n        } else {\n          for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n            assignableHeights.push([])\n          }\n\n          for (let row = 0; row < rowCnt; row += 1) {\n            let rowHeightsAcrossChunks: number[] = []\n\n            for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n              let h = rowHeightsByChunk[chunkI][row]\n              if (h != null) { // protect against outerContent\n                rowHeightsAcrossChunks.push(h)\n              }\n            }\n\n            let maxHeight = Math.max(...rowHeightsAcrossChunks)\n\n            for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n              assignableHeights[chunkI].push(maxHeight)\n            }\n          }\n        }\n      }\n\n      sectionRowMaxHeights.push(assignableHeights)\n    }\n\n    this.rowInnerMaxHeightMap = newHeightMap\n\n    return sectionRowMaxHeights\n  }\n\n  computeScrollerDims() {\n    let scrollbarWidth = getScrollbarWidths()\n    let [sectionCnt, chunksPerSection] = this.getDims()\n    let sideScrollI = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0\n    let lastSectionI = sectionCnt - 1\n    let currentScrollers = this.clippedScrollerRefs.currentMap\n    let scrollerEls = this.scrollerElRefs.currentMap\n    let forceYScrollbars = false\n    let forceXScrollbars = false\n    let scrollerClientWidths: { [index: string]: number } = {}\n    let scrollerClientHeights: { [index: string]: number } = {}\n\n    for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) { // along edge\n      let index = sectionI * chunksPerSection + sideScrollI\n      let scroller = currentScrollers[index]\n\n      if (scroller && scroller.needsYScrolling()) {\n        forceYScrollbars = true\n        break\n      }\n    }\n\n    for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) { // along last row\n      let index = lastSectionI * chunksPerSection + chunkI\n      let scroller = currentScrollers[index]\n\n      if (scroller && scroller.needsXScrolling()) {\n        forceXScrollbars = true\n        break\n      }\n    }\n\n    for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n      for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n        let index = sectionI * chunksPerSection + chunkI\n        let scrollerEl = scrollerEls[index]\n\n        if (scrollerEl) {\n          // TODO: weird way to get this. need harness b/c doesn't include table borders\n          let harnessEl = scrollerEl.parentNode as HTMLElement\n\n          scrollerClientWidths[index] = Math.floor(\n            harnessEl.getBoundingClientRect().width - (\n              (chunkI === sideScrollI && forceYScrollbars)\n                ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future\n                : 0\n            ),\n          )\n\n          scrollerClientHeights[index] = Math.floor(\n            harnessEl.getBoundingClientRect().height - (\n              (sectionI === lastSectionI && forceXScrollbars)\n                ? scrollbarWidth.x // use global because scroller might not have scrollbars yet but will need them in future\n                : 0\n            ),\n          )\n        }\n      }\n    }\n\n    return { forceYScrollbars, forceXScrollbars, scrollerClientWidths, scrollerClientHeights }\n  }\n\n  updateStickyScrolling() {\n    let { isRtl } = this.context\n    let argsByKey = this.scrollerElRefs.getAll().map(\n      (scrollEl) => [scrollEl, isRtl] as [ HTMLElement, boolean ],\n    )\n\n    let stickyScrollings = this.getStickyScrolling(argsByKey)\n\n    stickyScrollings.forEach((stickyScrolling) => stickyScrolling.updateSize())\n\n    this.stickyScrollings = stickyScrollings\n  }\n\n  destroyStickyScrolling() {\n    this.stickyScrollings.forEach(destroyStickyScrolling)\n  }\n\n  updateScrollSyncers() {\n    let [sectionCnt, chunksPerSection] = this.getDims()\n    let cnt = sectionCnt * chunksPerSection\n    let scrollElsBySection: { [sectionI: string]: HTMLElement[] } = {}\n    let scrollElsByColumn: { [colI: string]: HTMLElement[] } = {}\n    let scrollElMap = this.scrollerElRefs.currentMap\n\n    for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n      let startIndex = sectionI * chunksPerSection\n      let endIndex = startIndex + chunksPerSection\n\n      scrollElsBySection[sectionI] = collectFromHash(scrollElMap, startIndex, endIndex, 1) // use the filtered\n    }\n\n    for (let col = 0; col < chunksPerSection; col += 1) {\n      scrollElsByColumn[col] = this.scrollerElRefs.collect(col, cnt, chunksPerSection) // DON'T use the filtered\n    }\n\n    this.scrollSyncersBySection = this.getScrollSyncersBySection(scrollElsBySection)\n    this.scrollSyncersByColumn = this.getScrollSyncersByColumn(scrollElsByColumn)\n  }\n\n  destroyScrollSyncers() {\n    mapHash(this.scrollSyncersBySection, destroyScrollSyncer)\n    mapHash(this.scrollSyncersByColumn, destroyScrollSyncer)\n  }\n\n  getChunkConfigByIndex(index: number) { // somewhat expensive for something so simple\n    let chunksPerSection = this.getDims()[1]\n    let sectionI = Math.floor(index / chunksPerSection)\n    let chunkI = index % chunksPerSection\n    let sectionConfig = this.props.sections[sectionI]\n\n    return sectionConfig && sectionConfig.chunks[chunkI]\n  }\n\n  forceScrollLeft(col: number, scrollLeft: number) {\n    let scrollSyncer = this.scrollSyncersByColumn[col]\n\n    if (scrollSyncer) {\n      scrollSyncer.forceScrollLeft(scrollLeft)\n    }\n  }\n\n  forceScrollTop(sectionI: number, scrollTop: number) {\n    let scrollSyncer = this.scrollSyncersBySection[sectionI]\n\n    if (scrollSyncer) {\n      scrollSyncer.forceScrollTop(scrollTop)\n    }\n  }\n\n  _handleChunkEl(chunkEl: HTMLTableCellElement | null, key: string) {\n    let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10))\n\n    if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef\n      setRef(chunkConfig.elRef, chunkEl)\n    }\n  }\n\n  _handleScrollerEl(scrollerEl: HTMLElement | null, key: string) {\n    let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10))\n\n    if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef\n      setRef(chunkConfig.scrollerElRef, scrollerEl)\n    }\n  }\n\n  getDims() {\n    let sectionCnt = this.props.sections.length\n    let chunksPerSection = sectionCnt ? this.props.sections[0].chunks.length : 0\n\n    return [sectionCnt, chunksPerSection]\n  }\n}\n\nScrollGrid.addStateEquality({\n  shrinkWidths: isArraysEqual,\n  scrollerClientWidths: isPropsEqual,\n  scrollerClientHeights: isPropsEqual,\n})\n\nfunction sumNumbers(numbers: number[]) { // TODO: general util\n  let sum = 0\n\n  for (let n of numbers) {\n    sum += n\n  }\n\n  return sum\n}\n\nfunction getRowInnerMaxHeight(rowEl: HTMLElement) {\n  let innerHeights = findElements(rowEl, '.fc-scrollgrid-sync-inner').map(getElHeight)\n\n  if (innerHeights.length) {\n    return Math.max(...innerHeights)\n  }\n\n  return 0\n}\n\nfunction getElHeight(el: HTMLElement) {\n  return el.offsetHeight // better to deal with integers, for rounding, for PureComponent\n}\n\nfunction renderMacroColGroup(colGroupStats: ColGroupStat[], shrinkWidths: number[]) {\n  let children = colGroupStats.map((colGroupStat, i) => {\n    let width = colGroupStat.width\n\n    if (width === 'shrink') {\n      width = colGroupStat.totalColWidth + sanitizeShrinkWidth(shrinkWidths[i]) + 1 // +1 for border :(\n    }\n\n    return ( // eslint-disable-next-line react/jsx-key\n      <col style={{ width }} />\n    )\n  })\n\n  return createElement('colgroup', {}, ...children)\n}\n\nfunction compileColGroupStat(colGroupConfig: ColGroupConfig): ColGroupStat {\n  let totalColWidth = sumColProp(colGroupConfig.cols, 'width') // excludes \"shrink\"\n  let totalColMinWidth = sumColProp(colGroupConfig.cols, 'minWidth')\n  let hasShrinkCol = hasShrinkWidth(colGroupConfig.cols)\n  let allowXScrolling = colGroupConfig.width !== 'shrink' && Boolean(totalColWidth || totalColMinWidth || hasShrinkCol)\n\n  return {\n    hasShrinkCol,\n    totalColWidth,\n    totalColMinWidth,\n    allowXScrolling,\n    cols: colGroupConfig.cols,\n    width: colGroupConfig.width,\n  }\n}\n\nfunction sumColProp(cols: ColProps[], propName: string) {\n  let total = 0\n\n  for (let col of cols) {\n    let val = col[propName]\n\n    if (typeof val === 'number') {\n      total += val * (col.span || 1)\n    }\n  }\n\n  return total\n}\n\nconst COL_GROUP_STAT_EQUALITY = {\n  cols: isColPropsEqual,\n}\n\nfunction isColGroupStatsEqual(stat0: ColGroupStat, stat1: ColGroupStat): boolean {\n  return compareObjs(stat0, stat1, COL_GROUP_STAT_EQUALITY)\n}\n\n// for memoizers...\n\nfunction initScrollSyncer(isVertical: boolean, ...scrollEls: HTMLElement[]) {\n  return new ScrollSyncer(isVertical, scrollEls)\n}\n\nfunction destroyScrollSyncer(scrollSyncer: ScrollSyncer) {\n  scrollSyncer.destroy()\n}\n\nfunction initStickyScrolling(scrollEl: HTMLElement, isRtl: boolean) {\n  return new StickyScrolling(scrollEl, isRtl)\n}\n\nfunction destroyStickyScrolling(stickyScrolling: StickyScrolling) {\n  stickyScrolling.destroy()\n}\n","import { createPlugin, config } from '@fullcalendar/common'\n\nimport premiumCommonPlugin from '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n// ensure ambient declarations\nimport '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n\nimport { ScrollGrid } from './ScrollGrid'\n\nexport { ScrollGrid }\nexport { setScrollFromLeftEdge } from './scroll-left-norm'\n\nexport default createPlugin({\n  deps: [\n    premiumCommonPlugin,\n  ],\n  scrollGridImpl: ScrollGrid,\n})\n\nconfig.SCROLLGRID_RESIZE_INTERVAL = 500\n","import {\n  config, computeVisibleDayRange, Duration, DateProfile, asCleanDays, addDays, wholeDivideDurations, DateMarker,\n  startOfDay, createDuration, DateEnv, diffWholeDays, asRoughMs, createFormatter, greatestDurationDenominator,\n  asRoughMinutes, padStart, asRoughSeconds, DateRange, isInt, DateProfileGenerator, BaseOptionsRefined,\n} from '@fullcalendar/common'\n\nexport interface TimelineDateProfile {\n  labelInterval: Duration\n  slotDuration: Duration\n  slotsPerLabel: number\n  headerFormats: any\n  isTimeScale: boolean\n  largeUnit: string\n  emphasizeWeeks: boolean\n  snapDuration: Duration\n  snapsPerSlot: number\n  normalizedRange: DateRange // snaps to unit. adds in slotMinTime/slotMaxTime\n  timeWindowMs: number\n  slotDates: DateMarker[]\n  isWeekStarts: boolean[]\n  snapDiffToIndex: number[]\n  snapIndexToDiff: number[]\n  snapCnt: number\n  slotCnt: number\n  cellRows: TimelineHeaderCell[][]\n}\n\nexport interface TimelineHeaderCell {\n  date: DateMarker\n  text: string\n  rowUnit: string\n  colspan: number\n  isWeekStart: boolean\n}\n\nconst MIN_AUTO_LABELS = 18 // more than `12` months but less that `24` hours\nconst MAX_AUTO_SLOTS_PER_LABEL = 6 // allows 6 10-min slots in an hour\nconst MAX_AUTO_CELLS = 200 // allows 4-days to have a :30 slot duration\nconfig.MAX_TIMELINE_SLOTS = 1000\n\n// potential nice values for slot-duration and interval-duration\nconst STOCK_SUB_DURATIONS = [ // from largest to smallest\n  { years: 1 },\n  { months: 1 },\n  { days: 1 },\n  { hours: 1 },\n  { minutes: 30 },\n  { minutes: 15 },\n  { minutes: 10 },\n  { minutes: 5 },\n  { minutes: 1 },\n  { seconds: 30 },\n  { seconds: 15 },\n  { seconds: 10 },\n  { seconds: 5 },\n  { seconds: 1 },\n  { milliseconds: 500 },\n  { milliseconds: 100 },\n  { milliseconds: 10 },\n  { milliseconds: 1 },\n]\n\nexport function buildTimelineDateProfile(\n  dateProfile: DateProfile,\n  dateEnv: DateEnv,\n  allOptions: BaseOptionsRefined,\n  dateProfileGenerator: DateProfileGenerator,\n): TimelineDateProfile {\n  let tDateProfile = {\n    labelInterval: allOptions.slotLabelInterval,\n    slotDuration: allOptions.slotDuration,\n  } as TimelineDateProfile\n\n  validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) // validate after computed grid duration\n  ensureLabelInterval(tDateProfile, dateProfile, dateEnv)\n  ensureSlotDuration(tDateProfile, dateProfile, dateEnv)\n\n  let input = allOptions.slotLabelFormat\n  let rawFormats =\n    Array.isArray(input) ? input :\n      (input != null) ? [input] :\n        computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions)\n\n  tDateProfile.headerFormats = rawFormats.map((rawFormat) => createFormatter(rawFormat))\n\n  tDateProfile.isTimeScale = Boolean(tDateProfile.slotDuration.milliseconds)\n\n  let largeUnit = null\n  if (!tDateProfile.isTimeScale) {\n    const slotUnit = greatestDurationDenominator(tDateProfile.slotDuration).unit\n    if (/year|month|week/.test(slotUnit)) {\n      largeUnit = slotUnit\n    }\n  }\n\n  tDateProfile.largeUnit = largeUnit\n\n  tDateProfile.emphasizeWeeks =\n    asCleanDays(tDateProfile.slotDuration) === 1 &&\n    currentRangeAs('weeks', dateProfile, dateEnv) >= 2 &&\n    !allOptions.businessHours\n\n  /*\n  console.log('label interval =', timelineView.labelInterval.humanize())\n  console.log('slot duration =', timelineView.slotDuration.humanize())\n  console.log('header formats =', timelineView.headerFormats)\n  console.log('isTimeScale', timelineView.isTimeScale)\n  console.log('largeUnit', timelineView.largeUnit)\n  */\n\n  let rawSnapDuration = allOptions.snapDuration\n  let snapDuration\n  let snapsPerSlot\n\n  if (rawSnapDuration) {\n    snapDuration = createDuration(rawSnapDuration)\n    snapsPerSlot = wholeDivideDurations(tDateProfile.slotDuration, snapDuration)\n    // ^ TODO: warning if not whole?\n  }\n\n  if (snapsPerSlot == null) {\n    snapDuration = tDateProfile.slotDuration\n    snapsPerSlot = 1\n  }\n\n  tDateProfile.snapDuration = snapDuration\n  tDateProfile.snapsPerSlot = snapsPerSlot\n\n  // more...\n\n  let timeWindowMs = asRoughMs(dateProfile.slotMaxTime) - asRoughMs(dateProfile.slotMinTime)\n\n  // TODO: why not use normalizeRange!?\n  let normalizedStart = normalizeDate(dateProfile.renderRange.start, tDateProfile, dateEnv)\n  let normalizedEnd = normalizeDate(dateProfile.renderRange.end, tDateProfile, dateEnv)\n\n  // apply slotMinTime/slotMaxTime\n  // TODO: View should be responsible.\n  if (tDateProfile.isTimeScale) {\n    normalizedStart = dateEnv.add(normalizedStart, dateProfile.slotMinTime)\n    normalizedEnd = dateEnv.add(\n      addDays(normalizedEnd, -1),\n      dateProfile.slotMaxTime,\n    )\n  }\n\n  tDateProfile.timeWindowMs = timeWindowMs\n  tDateProfile.normalizedRange = { start: normalizedStart, end: normalizedEnd }\n\n  let slotDates = []\n  let date = normalizedStart\n  while (date < normalizedEnd) {\n    if (isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator)) {\n      slotDates.push(date)\n    }\n    date = dateEnv.add(date, tDateProfile.slotDuration)\n  }\n\n  tDateProfile.slotDates = slotDates\n\n  // more...\n\n  let snapIndex = -1\n  let snapDiff = 0 // index of the diff :(\n  const snapDiffToIndex = []\n  const snapIndexToDiff = []\n\n  date = normalizedStart\n  while (date < normalizedEnd) {\n    if (isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator)) {\n      snapIndex += 1\n      snapDiffToIndex.push(snapIndex)\n      snapIndexToDiff.push(snapDiff)\n    } else {\n      snapDiffToIndex.push(snapIndex + 0.5)\n    }\n    date = dateEnv.add(date, tDateProfile.snapDuration)\n    snapDiff += 1\n  }\n\n  tDateProfile.snapDiffToIndex = snapDiffToIndex\n  tDateProfile.snapIndexToDiff = snapIndexToDiff\n\n  tDateProfile.snapCnt = snapIndex + 1 // is always one behind\n  tDateProfile.slotCnt = tDateProfile.snapCnt / tDateProfile.snapsPerSlot\n\n  // more...\n\n  tDateProfile.isWeekStarts = buildIsWeekStarts(tDateProfile, dateEnv)\n  tDateProfile.cellRows = buildCellRows(tDateProfile, dateEnv)\n  tDateProfile.slotsPerLabel = wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration)\n\n  return tDateProfile\n}\n\n/*\nsnaps to appropriate unit\n*/\nexport function normalizeDate(date: DateMarker, tDateProfile: TimelineDateProfile, dateEnv: DateEnv): DateMarker {\n  let normalDate = date\n\n  if (!tDateProfile.isTimeScale) {\n    normalDate = startOfDay(normalDate)\n\n    if (tDateProfile.largeUnit) {\n      normalDate = dateEnv.startOf(normalDate, tDateProfile.largeUnit)\n    }\n  }\n\n  return normalDate\n}\n\n/*\nsnaps to appropriate unit\n*/\nexport function normalizeRange(range: DateRange, tDateProfile: TimelineDateProfile, dateEnv: DateEnv): DateRange {\n  if (!tDateProfile.isTimeScale) {\n    range = computeVisibleDayRange(range)\n\n    if (tDateProfile.largeUnit) {\n      let dayRange = range // preserve original result\n\n      range = {\n        start: dateEnv.startOf(range.start, tDateProfile.largeUnit),\n        end: dateEnv.startOf(range.end, tDateProfile.largeUnit),\n      }\n\n      // if date is partially through the interval, or is in the same interval as the start,\n      // make the exclusive end be the *next* interval\n      if (range.end.valueOf() !== dayRange.end.valueOf() || range.end <= range.start) {\n        range = {\n          start: range.start,\n          end: dateEnv.add(range.end, tDateProfile.slotDuration),\n        }\n      }\n    }\n  }\n\n  return range\n}\n\nexport function isValidDate(\n  date: DateMarker,\n  tDateProfile: TimelineDateProfile,\n  dateProfile: DateProfile,\n  dateProfileGenerator: DateProfileGenerator,\n) {\n  if (dateProfileGenerator.isHiddenDay(date)) {\n    return false\n  }\n\n  if (tDateProfile.isTimeScale) {\n    // determine if the time is within slotMinTime/slotMaxTime, which may have wacky values\n    let day = startOfDay(date)\n    let timeMs = date.valueOf() - day.valueOf()\n    let ms = timeMs - asRoughMs(dateProfile.slotMinTime) // milliseconds since slotMinTime\n    ms = ((ms % 86400000) + 86400000) % 86400000 // make negative values wrap to 24hr clock\n    return ms < tDateProfile.timeWindowMs // before the slotMaxTime?\n  }\n\n  return true\n}\n\nfunction validateLabelAndSlot(tDateProfile: TimelineDateProfile, dateProfile: DateProfile, dateEnv: DateEnv) {\n  const { currentRange } = dateProfile\n\n  // make sure labelInterval doesn't exceed the max number of cells\n  if (tDateProfile.labelInterval) {\n    const labelCnt = dateEnv.countDurationsBetween(\n      currentRange.start,\n      currentRange.end,\n      tDateProfile.labelInterval,\n    )\n    if (labelCnt > config.MAX_TIMELINE_SLOTS) {\n      console.warn('slotLabelInterval results in too many cells')\n      tDateProfile.labelInterval = null\n    }\n  }\n\n  // make sure slotDuration doesn't exceed the maximum number of cells\n  if (tDateProfile.slotDuration) {\n    const slotCnt = dateEnv.countDurationsBetween(\n      currentRange.start,\n      currentRange.end,\n      tDateProfile.slotDuration,\n    )\n    if (slotCnt > config.MAX_TIMELINE_SLOTS) {\n      console.warn('slotDuration results in too many cells')\n      tDateProfile.slotDuration = null\n    }\n  }\n\n  // make sure labelInterval is a multiple of slotDuration\n  if (tDateProfile.labelInterval && tDateProfile.slotDuration) {\n    const slotsPerLabel = wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration)\n    if (slotsPerLabel === null || slotsPerLabel < 1) {\n      console.warn('slotLabelInterval must be a multiple of slotDuration')\n      tDateProfile.slotDuration = null\n    }\n  }\n}\n\nfunction ensureLabelInterval(tDateProfile: TimelineDateProfile, dateProfile: DateProfile, dateEnv: DateEnv) {\n  const { currentRange } = dateProfile\n  let { labelInterval } = tDateProfile\n\n  if (!labelInterval) {\n    // compute based off the slot duration\n    // find the largest label interval with an acceptable slots-per-label\n    let input\n    if (tDateProfile.slotDuration) {\n      for (input of STOCK_SUB_DURATIONS) {\n        const tryLabelInterval = createDuration(input)\n        const slotsPerLabel = wholeDivideDurations(tryLabelInterval, tDateProfile.slotDuration)\n        if (slotsPerLabel !== null && slotsPerLabel <= MAX_AUTO_SLOTS_PER_LABEL) {\n          labelInterval = tryLabelInterval\n          break\n        }\n      }\n\n      // use the slot duration as a last resort\n      if (!labelInterval) {\n        labelInterval = tDateProfile.slotDuration\n      }\n\n    // compute based off the view's duration\n    // find the largest label interval that yields the minimum number of labels\n    } else {\n      for (input of STOCK_SUB_DURATIONS) {\n        labelInterval = createDuration(input)\n        const labelCnt = dateEnv.countDurationsBetween(\n          currentRange.start,\n          currentRange.end,\n          labelInterval,\n        )\n        if (labelCnt >= MIN_AUTO_LABELS) {\n          break\n        }\n      }\n    }\n\n    tDateProfile.labelInterval = labelInterval\n  }\n\n  return labelInterval\n}\n\nfunction ensureSlotDuration(tDateProfile: TimelineDateProfile, dateProfile: DateProfile, dateEnv: DateEnv) {\n  const { currentRange } = dateProfile\n  let { slotDuration } = tDateProfile\n\n  if (!slotDuration) {\n    const labelInterval = ensureLabelInterval(tDateProfile, dateProfile, dateEnv) // will compute if necessary\n\n    // compute based off the label interval\n    // find the largest slot duration that is different from labelInterval, but still acceptable\n    for (let input of STOCK_SUB_DURATIONS) {\n      const trySlotDuration = createDuration(input)\n      const slotsPerLabel = wholeDivideDurations(labelInterval, trySlotDuration)\n      if (slotsPerLabel !== null && slotsPerLabel > 1 && slotsPerLabel <= MAX_AUTO_SLOTS_PER_LABEL) {\n        slotDuration = trySlotDuration\n        break\n      }\n    }\n\n    // only allow the value if it won't exceed the view's # of slots limit\n    if (slotDuration) {\n      const slotCnt = dateEnv.countDurationsBetween(\n        currentRange.start,\n        currentRange.end,\n        slotDuration,\n      )\n      if (slotCnt > MAX_AUTO_CELLS) {\n        slotDuration = null\n      }\n    }\n\n    // use the label interval as a last resort\n    if (!slotDuration) {\n      slotDuration = labelInterval\n    }\n\n    tDateProfile.slotDuration = slotDuration\n  }\n\n  return slotDuration\n}\n\nfunction computeHeaderFormats(\n  tDateProfile: TimelineDateProfile,\n  dateProfile: DateProfile,\n  dateEnv: DateEnv,\n  allOptions: BaseOptionsRefined,\n) {\n  let format1\n  let format2\n  const { labelInterval } = tDateProfile\n  let unit = greatestDurationDenominator(labelInterval).unit\n  const weekNumbersVisible = allOptions.weekNumbers\n  let format0 = (format1 = (format2 = null))\n\n  // NOTE: weekNumber computation function wont work\n\n  if ((unit === 'week') && !weekNumbersVisible) {\n    unit = 'day'\n  }\n\n  switch (unit) {\n    case 'year':\n      format0 = { year: 'numeric' } // '2015'\n      break\n\n    case 'month':\n      if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n        format0 = { year: 'numeric' } // '2015'\n      }\n\n      format1 = { month: 'short' } // 'Jan'\n      break\n\n    case 'week':\n      if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n        format0 = { year: 'numeric' } // '2015'\n      }\n\n      format1 = { week: 'narrow' } // 'Wk4'\n      break\n\n    case 'day':\n      if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n        format0 = { year: 'numeric', month: 'long' } // 'January 2014'\n      } else if (currentRangeAs('months', dateProfile, dateEnv) > 1) {\n        format0 = { month: 'long' } // 'January'\n      }\n\n      if (weekNumbersVisible) {\n        format1 = { week: 'short' } // 'Wk 4'\n      }\n\n      format2 = { weekday: 'narrow', day: 'numeric' } // 'Su 9'\n      break\n\n    case 'hour':\n      if (weekNumbersVisible) {\n        format0 = { week: 'short' } // 'Wk 4'\n      }\n\n      if (currentRangeAs('days', dateProfile, dateEnv) > 1) {\n        format1 = { weekday: 'short', day: 'numeric', month: 'numeric', omitCommas: true } // Sat 4/7\n      }\n\n      format2 = {\n        hour: 'numeric',\n        minute: '2-digit',\n        omitZeroMinute: true,\n        meridiem: 'short',\n      }\n      break\n\n    case 'minute':\n      // sufficiently large number of different minute cells?\n      if ((asRoughMinutes(labelInterval) / 60) >= MAX_AUTO_SLOTS_PER_LABEL) {\n        format0 = {\n          hour: 'numeric',\n          meridiem: 'short',\n        }\n        format1 = (params) => (\n          ':' + padStart(params.date.minute, 2) // ':30'\n        )\n      } else {\n        format0 = {\n          hour: 'numeric',\n          minute: 'numeric',\n          meridiem: 'short',\n        }\n      }\n      break\n\n    case 'second':\n      // sufficiently large number of different second cells?\n      if ((asRoughSeconds(labelInterval) / 60) >= MAX_AUTO_SLOTS_PER_LABEL) {\n        format0 = { hour: 'numeric', minute: '2-digit', meridiem: 'lowercase' } // '8:30 PM'\n        format1 = (params) => (\n          ':' + padStart(params.date.second, 2) // ':30'\n        )\n      } else {\n        format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' } // '8:30:45 PM'\n      }\n      break\n\n    case 'millisecond':\n      format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' } // '8:30:45 PM'\n      format1 = (params) => (\n        '.' + padStart(params.millisecond, 3)\n      )\n      break\n  }\n\n  return [].concat(format0 || [], format1 || [], format2 || [])\n}\n\n// Compute the number of the give units in the \"current\" range.\n// Won't go more precise than days.\n// Will return `0` if there's not a clean whole interval.\nfunction currentRangeAs(unit: string, dateProfile: DateProfile, dateEnv: DateEnv) {\n  let range = dateProfile.currentRange\n  let res = null\n\n  if (unit === 'years') {\n    res = dateEnv.diffWholeYears(range.start, range.end)\n  } else if (unit === 'months') {\n    res = dateEnv.diffWholeMonths(range.start, range.end)\n  } else if (unit === 'weeks') {\n    res = dateEnv.diffWholeMonths(range.start, range.end)\n  } else if (unit === 'days') {\n    res = diffWholeDays(range.start, range.end)\n  }\n\n  return res || 0\n}\n\nfunction buildIsWeekStarts(tDateProfile: TimelineDateProfile, dateEnv: DateEnv) {\n  let { slotDates, emphasizeWeeks } = tDateProfile\n  let prevWeekNumber = null\n  let isWeekStarts: boolean[] = []\n\n  for (let slotDate of slotDates) {\n    let weekNumber = dateEnv.computeWeekNumber(slotDate)\n    let isWeekStart = emphasizeWeeks && (prevWeekNumber !== null) && (prevWeekNumber !== weekNumber)\n    prevWeekNumber = weekNumber\n\n    isWeekStarts.push(isWeekStart)\n  }\n\n  return isWeekStarts\n}\n\nfunction buildCellRows(tDateProfile: TimelineDateProfile, dateEnv: DateEnv) {\n  let slotDates = tDateProfile.slotDates\n  let formats = tDateProfile.headerFormats\n  let cellRows = formats.map(() => []) // indexed by row,col\n  let slotAsDays = asCleanDays(tDateProfile.slotDuration)\n  let guessedSlotUnit =\n    slotAsDays === 7 ? 'week' :\n      slotAsDays === 1 ? 'day' :\n        null\n\n  // specifically for navclicks\n  let rowUnitsFromFormats = formats.map(\n    (format) => (format.getLargestUnit ? format.getLargestUnit() : null),\n  )\n\n  // builds cellRows and slotCells\n  for (let i = 0; i < slotDates.length; i += 1) {\n    let date = slotDates[i]\n    let isWeekStart = tDateProfile.isWeekStarts[i]\n\n    for (let row = 0; row < formats.length; row += 1) {\n      let format = formats[row]\n      let rowCells = cellRows[row]\n      let leadingCell = rowCells[rowCells.length - 1]\n      let isLastRow = row === formats.length - 1\n      let isSuperRow = formats.length > 1 && !isLastRow // more than one row and not the last\n      let newCell = null\n      let rowUnit = rowUnitsFromFormats[row] || (isLastRow ? guessedSlotUnit : null)\n\n      if (isSuperRow) {\n        let text = dateEnv.format(date, format)\n        if (!leadingCell || (leadingCell.text !== text)) {\n          newCell = buildCellObject(date, text, rowUnit)\n        } else {\n          leadingCell.colspan += 1\n        }\n      } else if (\n        !leadingCell ||\n        isInt(dateEnv.countDurationsBetween(\n          tDateProfile.normalizedRange.start,\n          date,\n          tDateProfile.labelInterval,\n        ))\n      ) {\n        let text = dateEnv.format(date, format)\n        newCell = buildCellObject(date, text, rowUnit)\n      } else {\n        leadingCell.colspan += 1\n      }\n\n      if (newCell) {\n        newCell.weekStart = isWeekStart\n        rowCells.push(newCell)\n      }\n    }\n  }\n\n  return cellRows\n}\n\nfunction buildCellObject(date: DateMarker, text, rowUnit): TimelineHeaderCell {\n  return { date, text, rowUnit, colspan: 1, isWeekStart: false }\n}\n","import { createElement, BaseComponent, DateMarker, ContentHook, ViewApi, DateEnv } from '@fullcalendar/common'\n\nexport interface TimelineHeaderThInnerProps {\n  hookProps: HookProps\n  isSticky: boolean\n  navLinkAttrs: object | null\n}\n\nexport class TimelineHeaderThInner extends BaseComponent<TimelineHeaderThInnerProps> {\n  render() {\n    let { props, context } = this\n\n    return (\n      <ContentHook hookProps={props.hookProps} content={context.options.slotLabelContent} defaultContent={renderInnerContent}>\n        {(innerElRef, innerContent) => (\n          <a\n            ref={innerElRef}\n            className={'fc-timeline-slot-cushion fc-scrollgrid-sync-inner' + (props.isSticky ? ' fc-sticky' : '')}\n            {...props.navLinkAttrs}\n          >\n            {innerContent}\n          </a>\n        )}\n      </ContentHook>\n    )\n  }\n}\n\nfunction renderInnerContent(props) { // TODO: add types\n  return props.text\n}\n\n// hook props\n// ----------\n\nexport interface HookPropsInput {\n  level: number\n  dateMarker: DateMarker\n  text: string\n  dateEnv: DateEnv\n  viewApi: ViewApi\n}\n\nexport interface HookProps {\n  level: number\n  date: DateMarker // localized\n  view: ViewApi\n  text: string\n}\n\nexport function refineHookProps(input: HookPropsInput): HookProps {\n  return {\n    level: input.level,\n    date: input.dateEnv.toDate(input.dateMarker),\n    view: input.viewApi,\n    text: input.text,\n  }\n}\n","import {\n  createElement, BaseComponent, DateRange, DateMarker, getDateMeta, getSlotClassNames,\n  buildNavLinkAttrs, buildClassNameNormalizer, MountHook,\n  getDayClassNames, DateProfile, memoizeObjArg, ViewContext, memoize,\n} from '@fullcalendar/common'\nimport { TimelineDateProfile, TimelineHeaderCell } from './timeline-date-profile'\nimport { TimelineHeaderThInner, refineHookProps, HookProps } from './TimelineHeaderThInner'\n\nexport interface TimelineHeaderThProps {\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  rowLevel: number\n  cell: TimelineHeaderCell\n  todayRange: DateRange\n  nowDate: DateMarker\n  rowInnerHeight?: number\n  isSticky: boolean\n}\n\nexport class TimelineHeaderTh extends BaseComponent<TimelineHeaderThProps> {\n  refineHookProps = memoizeObjArg(refineHookProps)\n  normalizeClassNames = buildClassNameNormalizer<HookProps>()\n  buildCellNavLinkAttrs = memoize(buildCellNavLinkAttrs)\n\n  render() {\n    let { props, context } = this\n    let { dateEnv, options } = context\n    let { cell, dateProfile, tDateProfile } = props\n\n    // the cell.rowUnit is f'd\n    // giving 'month' for a 3-day view\n    // workaround: to infer day, do NOT time\n\n    let dateMeta = getDateMeta(cell.date, props.todayRange, props.nowDate, dateProfile)\n\n    let classNames = ['fc-timeline-slot', 'fc-timeline-slot-label'].concat(\n      cell.rowUnit === 'time' // TODO: so slot classnames for week/month/bigger. see note above about rowUnit\n        ? getSlotClassNames(dateMeta, context.theme)\n        : getDayClassNames(dateMeta, context.theme),\n    )\n\n    if (cell.isWeekStart) {\n      classNames.push('fc-timeline-slot-em')\n    }\n\n    let hookProps = this.refineHookProps({\n      level: props.rowLevel,\n      dateMarker: cell.date,\n      text: cell.text,\n      dateEnv: context.dateEnv,\n      viewApi: context.viewApi,\n    })\n\n    let customClassNames = this.normalizeClassNames(options.slotLabelClassNames, hookProps)\n\n    return (\n      <MountHook hookProps={hookProps} didMount={options.slotLabelDidMount} willUnmount={options.slotLabelWillUnmount}>\n        {(rootElRef) => (\n          <th\n            ref={rootElRef}\n            className={classNames.concat(customClassNames).join(' ')}\n            data-date={dateEnv.formatIso(cell.date, { omitTime: !tDateProfile.isTimeScale, omitTimeZoneOffset: true })}\n            colSpan={cell.colspan}\n          >\n            <div className=\"fc-timeline-slot-frame\" style={{ height: props.rowInnerHeight }}>\n              <TimelineHeaderThInner\n                hookProps={hookProps}\n                isSticky={props.isSticky}\n                navLinkAttrs={this.buildCellNavLinkAttrs(context, cell.date, cell.rowUnit)}\n              />\n            </div>\n          </th>\n        )}\n      </MountHook>\n    )\n  }\n}\n\nfunction buildCellNavLinkAttrs(context: ViewContext, cellDate: DateMarker, rowUnit: string): object {\n  return (rowUnit && rowUnit !== 'time')\n    ? buildNavLinkAttrs(context, cellDate, rowUnit)\n    : {}\n}\n","import { createElement, BaseComponent, Fragment, DateRange, DateMarker, DateProfile } from '@fullcalendar/common'\nimport { TimelineDateProfile } from './timeline-date-profile'\nimport { TimelineHeaderTh } from './TimelineHeaderTh'\n\nexport interface TimelineHeaderRowsProps {\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  nowDate: DateMarker\n  todayRange: DateRange\n  rowInnerHeights?: number[]\n}\n\nexport class TimelineHeaderRows extends BaseComponent<TimelineHeaderRowsProps> {\n  render() {\n    let { dateProfile, tDateProfile, rowInnerHeights, todayRange, nowDate } = this.props\n    let { cellRows } = tDateProfile\n\n    return (\n      <Fragment>\n        {cellRows.map((rowCells, rowLevel) => {\n          let isLast = rowLevel === cellRows.length - 1\n          let isChrono = tDateProfile.isTimeScale && isLast // the final row, with times?\n          let classNames = [\n            'fc-timeline-header-row',\n            isChrono ? 'fc-timeline-header-row-chrono' : '',\n          ]\n\n          return ( // eslint-disable-next-line react/no-array-index-key\n            <tr key={rowLevel} className={classNames.join(' ')}>\n              {rowCells.map((cell) => (\n                <TimelineHeaderTh\n                  key={cell.date.toISOString()}\n                  cell={cell}\n                  rowLevel={rowLevel}\n                  dateProfile={dateProfile}\n                  tDateProfile={tDateProfile}\n                  todayRange={todayRange}\n                  nowDate={nowDate}\n                  rowInnerHeight={rowInnerHeights && rowInnerHeights[rowLevel]}\n                  isSticky={!isLast}\n                />\n              ))}\n            </tr>\n          )\n        })}\n      </Fragment>\n    )\n  }\n}\n","import {\n  PositionCache, findDirectChildren,\n  isInt, DateProfile,\n  DateMarker, DateEnv, Duration, startOfDay, rangeContainsMarker, CssDimValue, DateRange, SegSpan,\n} from '@fullcalendar/common'\nimport { TimelineDateProfile } from './timeline-date-profile'\n\nexport class TimelineCoords { // TODO: rename to \"slat\" coords?\n  outerCoordCache: PositionCache\n  innerCoordCache: PositionCache\n\n  constructor(\n    public slatRootEl: HTMLElement, // okay to expose?\n    slatEls: HTMLElement[],\n    public dateProfile: DateProfile,\n    private tDateProfile: TimelineDateProfile,\n    private dateEnv: DateEnv,\n    public isRtl: boolean,\n  ) {\n    this.outerCoordCache = new PositionCache(\n      slatRootEl,\n      slatEls,\n      true, // isHorizontal\n      false, // isVertical\n    )\n\n    // for the inner divs within the slats\n    // used for event rendering and scrollTime, to disregard slat border\n    this.innerCoordCache = new PositionCache(\n      slatRootEl,\n      findDirectChildren(slatEls, 'div'),\n      true, // isHorizontal\n      false, // isVertical\n    )\n  }\n\n  isDateInRange(date: DateMarker) {\n    return rangeContainsMarker(this.dateProfile.currentRange, date)\n  }\n\n  // results range from negative width of area to 0\n  dateToCoord(date: DateMarker): number {\n    let { tDateProfile } = this\n    let snapCoverage = this.computeDateSnapCoverage(date)\n    let slotCoverage = snapCoverage / tDateProfile.snapsPerSlot\n    let slotIndex = Math.floor(slotCoverage)\n    slotIndex = Math.min(slotIndex, tDateProfile.slotCnt - 1)\n    let partial = slotCoverage - slotIndex\n    let { innerCoordCache, outerCoordCache } = this\n\n    if (this.isRtl) {\n      return outerCoordCache.originClientRect.width - (\n        outerCoordCache.rights[slotIndex] -\n        (innerCoordCache.getWidth(slotIndex) * partial)\n      )\n    }\n\n    return (\n      outerCoordCache.lefts[slotIndex] +\n      (innerCoordCache.getWidth(slotIndex) * partial)\n    )\n  }\n\n  rangeToCoords(range: DateRange): SegSpan {\n    return {\n      start: this.dateToCoord(range.start),\n      end: this.dateToCoord(range.end),\n    }\n  }\n\n  durationToCoord(duration: Duration): number {\n    let { dateProfile, tDateProfile, dateEnv, isRtl } = this\n    let coord = 0\n\n    if (dateProfile) {\n      let date = dateEnv.add(dateProfile.activeRange.start, duration)\n\n      if (!tDateProfile.isTimeScale) {\n        date = startOfDay(date)\n      }\n\n      coord = this.dateToCoord(date)\n\n      // hack to overcome the left borders of non-first slat\n      if (!isRtl && coord) {\n        coord += 1\n      }\n    }\n\n    return coord\n  }\n\n  coordFromLeft(coord: number) {\n    if (this.isRtl) {\n      return this.outerCoordCache.originClientRect.width - coord\n    }\n    return coord\n  }\n\n  // returned value is between 0 and the number of snaps\n  computeDateSnapCoverage(date: DateMarker): number {\n    return computeDateSnapCoverage(date, this.tDateProfile, this.dateEnv)\n  }\n}\n\n// returned value is between 0 and the number of snaps\nexport function computeDateSnapCoverage(date: DateMarker, tDateProfile: TimelineDateProfile, dateEnv: DateEnv): number {\n  let snapDiff = dateEnv.countDurationsBetween(\n    tDateProfile.normalizedRange.start,\n    date,\n    tDateProfile.snapDuration,\n  )\n\n  if (snapDiff < 0) {\n    return 0\n  }\n\n  if (snapDiff >= tDateProfile.snapDiffToIndex.length) {\n    return tDateProfile.snapCnt\n  }\n\n  let snapDiffInt = Math.floor(snapDiff)\n  let snapCoverage = tDateProfile.snapDiffToIndex[snapDiffInt]\n\n  if (isInt(snapCoverage)) { // not an in-between value\n    snapCoverage += snapDiff - snapDiffInt // add the remainder\n  } else {\n    // a fractional value, meaning the date is not visible\n    // always round up in this case. works for start AND end dates in a range.\n    snapCoverage = Math.ceil(snapCoverage)\n  }\n\n  return snapCoverage\n}\n\nexport function coordToCss(\n  hcoord: number | null,\n  isRtl: boolean,\n): { left: CssDimValue, right: CssDimValue } {\n  if (hcoord === null) {\n    return { left: '', right: '' }\n  }\n  if (isRtl) {\n    return { right: hcoord, left: '' }\n  }\n  return { left: hcoord, right: '' }\n}\n\nexport function coordsToCss(\n  hcoords: SegSpan | null,\n  isRtl: boolean,\n): { left: CssDimValue, right: CssDimValue } {\n  if (!hcoords) {\n    return { left: '', right: '' }\n  }\n  if (isRtl) {\n    return { right: hcoords.start, left: -hcoords.end }\n  }\n  return { left: hcoords.start, right: -hcoords.end }\n}\n","import {\n  createElement, BaseComponent, CssDimValue, VNode, DateMarker, NowTimer,\n  greatestDurationDenominator, DateRange, NowIndicatorRoot, createRef,\n  findElements, RefObject, DateProfile,\n} from '@fullcalendar/common'\nimport { TimelineHeaderRows } from './TimelineHeaderRows'\nimport { coordToCss, TimelineCoords } from './TimelineCoords'\nimport { TimelineDateProfile } from './timeline-date-profile'\n\nexport interface TimelineHeaderProps {\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  clientWidth: number | null\n  clientHeight: number | null\n  tableMinWidth: CssDimValue\n  tableColGroupNode: VNode\n  slatCoords: TimelineCoords\n  rowInnerHeights?: number[]\n  onMaxCushionWidth?: (number) => void\n}\n\nexport class TimelineHeader extends BaseComponent<TimelineHeaderProps> {\n  rootElRef: RefObject<HTMLDivElement> = createRef<HTMLDivElement>()\n\n  render() {\n    let { props, context } = this\n\n    // TODO: very repetitive\n    // TODO: make part of tDateProfile?\n    let timerUnit = greatestDurationDenominator(props.tDateProfile.slotDuration).unit\n\n    // WORKAROUND: make ignore slatCoords when out of sync with dateProfile\n    let slatCoords = props.slatCoords && props.slatCoords.dateProfile === props.dateProfile ? props.slatCoords : null\n\n    return (\n      <NowTimer unit={timerUnit}>\n        {(nowDate: DateMarker, todayRange: DateRange) => (\n          <div className=\"fc-timeline-header\" ref={this.rootElRef}>\n            <table\n              aria-hidden\n              className=\"fc-scrollgrid-sync-table\"\n              style={{ minWidth: props.tableMinWidth, width: props.clientWidth }}\n            >\n              {props.tableColGroupNode}\n              <tbody>\n                <TimelineHeaderRows\n                  dateProfile={props.dateProfile}\n                  tDateProfile={props.tDateProfile}\n                  nowDate={nowDate}\n                  todayRange={todayRange}\n                  rowInnerHeights={props.rowInnerHeights}\n                />\n              </tbody>\n            </table>\n            {context.options.nowIndicator && (\n              // need to have a container regardless of whether the current view has a visible now indicator\n              // because apparently removal of the element resets the scroll for some reasons (issue #5351).\n              // this issue doesn't happen for the timeline body however (\n              <div className=\"fc-timeline-now-indicator-container\">\n                {(slatCoords && slatCoords.isDateInRange(nowDate)) && (\n                  <NowIndicatorRoot isAxis date={nowDate}>\n                    {(rootElRef, classNames, innerElRef, innerContent) => (\n                      <div\n                        ref={rootElRef}\n                        className={['fc-timeline-now-indicator-arrow'].concat(classNames).join(' ')}\n                        style={coordToCss(slatCoords.dateToCoord(nowDate), context.isRtl)}\n                      >\n                        {innerContent}\n                      </div>\n                    )}\n                  </NowIndicatorRoot>\n                )}\n              </div>\n            )}\n          </div>\n        )}\n      </NowTimer>\n    )\n  }\n\n  componentDidMount() {\n    this.updateSize()\n  }\n\n  componentDidUpdate() {\n    this.updateSize()\n  }\n\n  updateSize() {\n    if (this.props.onMaxCushionWidth) {\n      this.props.onMaxCushionWidth(this.computeMaxCushionWidth())\n    }\n  }\n\n  computeMaxCushionWidth() { // TODO: called way too often\n    return Math.max(\n      ...findElements(this.rootElRef.current, '.fc-timeline-header-row:last-child .fc-timeline-slot-cushion').map(\n        (el) => el.getBoundingClientRect().width,\n      ),\n    )\n  }\n}\n","import {\n  createElement, isInt, BaseComponent, DateMarker, Ref, DateRange, getDateMeta, getSlotClassNames,\n  RenderHook, getDayClassNames, SlotLaneContentArg, DateProfile,\n} from '@fullcalendar/common'\nimport { TimelineDateProfile } from './timeline-date-profile'\n\nexport interface TimelineSlatCellProps {\n  date: DateMarker\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  nowDate: DateMarker\n  todayRange: DateRange\n  isDay: boolean\n  isEm: boolean\n  elRef?: Ref<HTMLTableCellElement>\n}\n\nexport class TimelineSlatCell extends BaseComponent<TimelineSlatCellProps> {\n  render() {\n    let { props, context } = this\n    let { dateEnv, options, theme } = context\n    let { date, tDateProfile, isEm } = props\n    let dateMeta = getDateMeta(props.date, props.todayRange, props.nowDate, props.dateProfile)\n    let classNames = ['fc-timeline-slot', 'fc-timeline-slot-lane']\n    let dataAttrs = { 'data-date': dateEnv.formatIso(date, { omitTimeZoneOffset: true, omitTime: !tDateProfile.isTimeScale }) }\n    let hookProps: SlotLaneContentArg = {\n      date: dateEnv.toDate(props.date),\n      ...dateMeta,\n      view: context.viewApi,\n    }\n\n    if (isEm) {\n      classNames.push('fc-timeline-slot-em')\n    }\n\n    if (tDateProfile.isTimeScale) {\n      classNames.push(\n        isInt(dateEnv.countDurationsBetween(\n          tDateProfile.normalizedRange.start,\n          props.date,\n          tDateProfile.labelInterval,\n        )) ?\n          'fc-timeline-slot-major' :\n          'fc-timeline-slot-minor',\n      )\n    }\n\n    classNames.push(...(\n      props.isDay\n        ? getDayClassNames(dateMeta, theme)\n        : getSlotClassNames(dateMeta, theme)\n    ))\n\n    return (\n      <RenderHook\n        hookProps={hookProps}\n        classNames={options.slotLaneClassNames}\n        content={options.slotLaneContent}\n        didMount={options.slotLaneDidMount}\n        willUnmount={options.slotLaneWillUnmount}\n        elRef={props.elRef}\n      >\n        {(rootElRef, customClassNames, innerElRef, innerContent) => (\n          <td\n            ref={rootElRef}\n            className={classNames.concat(customClassNames).join(' ')}\n            {...dataAttrs}\n          >\n            <div ref={innerElRef}>{innerContent}</div>\n          </td>\n        )}\n      </RenderHook>\n    )\n  }\n}\n","import { createElement, BaseComponent, RefMap, DateMarker, DateRange, DateProfile } from '@fullcalendar/common'\nimport { TimelineDateProfile } from './timeline-date-profile'\nimport { TimelineSlatCell } from './TimelineSlatCell'\n\nexport interface TimelineSlatsContentProps {\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  nowDate: DateMarker\n  todayRange: DateRange\n}\n\nexport interface TimelineSlatsBodyProps extends TimelineSlatsContentProps {\n  cellElRefs: RefMap<HTMLTableCellElement>\n}\n\nexport class TimelineSlatsBody extends BaseComponent<TimelineSlatsBodyProps> {\n  render() {\n    let { props } = this\n    let { tDateProfile, cellElRefs } = props\n    let { slotDates, isWeekStarts } = tDateProfile\n    let isDay = !tDateProfile.isTimeScale && !tDateProfile.largeUnit\n\n    return (\n      <tbody>\n        <tr>\n          {slotDates.map((slotDate, i) => {\n            let key = slotDate.toISOString()\n\n            return (\n              <TimelineSlatCell\n                key={key}\n                elRef={cellElRefs.createRef(key)}\n                date={slotDate}\n                dateProfile={props.dateProfile}\n                tDateProfile={tDateProfile}\n                nowDate={props.nowDate}\n                todayRange={props.todayRange}\n                isEm={isWeekStarts[i]}\n                isDay={isDay}\n              />\n            )\n          })}\n        </tr>\n      </tbody>\n    )\n  }\n}\n","import {\n  createElement, BaseComponent, multiplyDuration, RefMap, CssDimValue, VNode,\n  createRef, ScrollResponder, ScrollRequest, DateMarker,\n} from '@fullcalendar/common'\nimport { TimelineCoords } from './TimelineCoords'\nimport { TimelineSlatsBody, TimelineSlatsContentProps } from './TimelineSlatsBody'\n\nexport interface TimelineSlatsProps extends TimelineSlatsContentProps {\n  clientWidth: number | null\n  tableMinWidth: CssDimValue\n  tableColGroupNode: VNode\n  onCoords?: (coord: TimelineCoords | null) => void\n  onScrollLeftRequest?: (scrollLeft: number) => void\n}\n\nexport class TimelineSlats extends BaseComponent<TimelineSlatsProps> {\n  private rootElRef = createRef<HTMLDivElement>()\n  private cellElRefs = new RefMap<HTMLTableCellElement>()\n  private coords: TimelineCoords // for positionToHit\n  private scrollResponder: ScrollResponder\n\n  render() {\n    let { props, context } = this\n\n    return (\n      <div className=\"fc-timeline-slots\" ref={this.rootElRef}>\n        <table\n          aria-hidden\n          className={context.theme.getClass('table')}\n          style={{\n            minWidth: props.tableMinWidth,\n            width: props.clientWidth,\n          }}\n        >\n          {props.tableColGroupNode}\n          <TimelineSlatsBody\n            cellElRefs={this.cellElRefs}\n            dateProfile={props.dateProfile}\n            tDateProfile={props.tDateProfile}\n            nowDate={props.nowDate}\n            todayRange={props.todayRange}\n          />\n        </table>\n      </div>\n    )\n  }\n\n  componentDidMount() {\n    this.updateSizing()\n    this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest)\n  }\n\n  componentDidUpdate(prevProps: TimelineSlatsProps) {\n    this.updateSizing()\n\n    this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile)\n  }\n\n  componentWillUnmount() {\n    this.scrollResponder.detach()\n\n    if (this.props.onCoords) {\n      this.props.onCoords(null)\n    }\n  }\n\n  updateSizing() {\n    let { props, context } = this\n\n    if (\n      props.clientWidth !== null && // is sizing stable?\n      this.scrollResponder\n      // ^it's possible to have clientWidth immediately after mount (when returning from print view), but w/o scrollResponder\n    ) {\n      let rootEl = this.rootElRef.current\n\n      if (rootEl.offsetWidth) { // not hidden by css\n        this.coords = new TimelineCoords(\n          this.rootElRef.current,\n          collectCellEls(this.cellElRefs.currentMap, props.tDateProfile.slotDates),\n          props.dateProfile,\n          props.tDateProfile,\n          context.dateEnv,\n          context.isRtl,\n        )\n\n        if (props.onCoords) {\n          props.onCoords(this.coords)\n        }\n\n        this.scrollResponder.update(false) // TODO: wouldn't have to do this if coords were in state\n      }\n    }\n  }\n\n  handleScrollRequest = (request: ScrollRequest) => {\n    let { onScrollLeftRequest } = this.props\n    let { coords } = this\n\n    if (onScrollLeftRequest && coords) {\n      if (request.time) {\n        let scrollLeft = coords.coordFromLeft(coords.durationToCoord(request.time))\n        onScrollLeftRequest(scrollLeft)\n      }\n      return true\n    }\n\n    return null // best?\n  }\n\n  positionToHit(leftPosition) { // TODO: kill somehow\n    let { outerCoordCache } = this.coords\n    let { dateEnv, isRtl } = this.context\n    let { tDateProfile } = this.props\n    let slatIndex = outerCoordCache.leftToIndex(leftPosition)\n\n    if (slatIndex != null) {\n      // somewhat similar to what TimeGrid does. consolidate?\n      let slatWidth = outerCoordCache.getWidth(slatIndex)\n      let partial = isRtl ?\n        (outerCoordCache.rights[slatIndex] - leftPosition) / slatWidth :\n        (leftPosition - outerCoordCache.lefts[slatIndex]) / slatWidth\n      let localSnapIndex = Math.floor(partial * tDateProfile.snapsPerSlot)\n      let start = dateEnv.add(\n        tDateProfile.slotDates[slatIndex],\n        multiplyDuration(tDateProfile.snapDuration, localSnapIndex),\n      )\n      let end = dateEnv.add(start, tDateProfile.snapDuration)\n\n      return {\n        dateSpan: {\n          range: { start, end },\n          allDay: !this.props.tDateProfile.isTimeScale,\n        },\n        dayEl: this.cellElRefs.currentMap[slatIndex],\n        left: outerCoordCache.lefts[slatIndex], // TODO: make aware of snaps?\n        right: outerCoordCache.rights[slatIndex],\n      }\n    }\n\n    return null\n  }\n}\n\nfunction collectCellEls(elMap: { [key: string]: HTMLElement }, slotDates: DateMarker[]) {\n  return slotDates.map((slotDate) => {\n    let key = slotDate.toISOString()\n    return elMap[key]\n  })\n}\n","import {\n  SegSpan, SegHierarchy, groupIntersectingEntries, SegEntry, buildIsoString,\n  computeEarliestSegStart,\n} from '@fullcalendar/common'\nimport { TimelineCoords } from './TimelineCoords'\nimport { TimelineLaneSeg } from './TimelineLaneSlicer'\n\nexport interface TimelineSegPlacement {\n  seg: TimelineLaneSeg | TimelineLaneSeg[] // HACK: if array, then it's a more-link group\n  hcoords: SegSpan | null\n  top: number | null\n}\n\nexport function computeSegHCoords(\n  segs: TimelineLaneSeg[],\n  minWidth: number,\n  timelineCoords: TimelineCoords | null,\n): SegSpan[] {\n  let hcoords: SegSpan[] = []\n\n  if (timelineCoords) {\n    for (let seg of segs) {\n      let res = timelineCoords.rangeToCoords(seg)\n      let start = Math.round(res.start) // for barely-overlapping collisions\n      let end = Math.round(res.end) //\n\n      if (end - start < minWidth) {\n        end = start + minWidth\n      }\n\n      hcoords.push({ start, end })\n    }\n  }\n\n  return hcoords\n}\n\nexport function computeFgSegPlacements(\n  segs: TimelineLaneSeg[],\n  segHCoords: SegSpan[], // might not have for every seg\n  eventInstanceHeights: { [instanceId: string]: number }, // might not have for every seg\n  moreLinkHeights: { [isoStr: string]: number }, // might not have for every more-link\n  strictOrder?: boolean,\n  maxStackCnt?: number,\n): [TimelineSegPlacement[], number] { // [placements, totalHeight]\n  let segInputs: SegEntry[] = []\n  let crudePlacements: TimelineSegPlacement[] = [] // when we don't know dims\n\n  for (let i = 0; i < segs.length; i += 1) {\n    let seg = segs[i]\n    let instanceId = seg.eventRange.instance.instanceId\n    let height = eventInstanceHeights[instanceId]\n    let hcoords = segHCoords[i]\n\n    if (height && hcoords) {\n      segInputs.push({\n        index: i,\n        span: hcoords,\n        thickness: height,\n      })\n    } else {\n      crudePlacements.push({\n        seg,\n        hcoords, // might as well set hcoords if we have them. might be null\n        top: null,\n      })\n    }\n  }\n\n  let hierarchy = new SegHierarchy()\n  if (strictOrder != null) {\n    hierarchy.strictOrder = strictOrder\n  }\n  if (maxStackCnt != null) {\n    hierarchy.maxStackCnt = maxStackCnt\n  }\n\n  let hiddenEntries = hierarchy.addSegs(segInputs)\n  let hiddenPlacements = hiddenEntries.map((entry) => ({\n    seg: segs[entry.index],\n    hcoords: entry.span,\n    top: null,\n  } as TimelineSegPlacement))\n\n  let hiddenGroups = groupIntersectingEntries(hiddenEntries)\n  let moreLinkInputs: SegEntry[] = []\n  let moreLinkCrudePlacements: TimelineSegPlacement[] = []\n  const extractSeg = (entry: SegEntry) => segs[entry.index]\n\n  for (let i = 0; i < hiddenGroups.length; i += 1) {\n    let hiddenGroup = hiddenGroups[i]\n    let sortedSegs = hiddenGroup.entries.map(extractSeg)\n    let height = moreLinkHeights[buildIsoString(computeEarliestSegStart(sortedSegs))] // not optimal :(\n\n    if (height != null) {\n      // NOTE: the hiddenGroup's spanStart/spanEnd are already computed by rangeToCoords. computed during input.\n      moreLinkInputs.push({\n        index: segs.length + i, // out-of-bounds indexes map to hiddenGroups\n        thickness: height,\n        span: hiddenGroup.span,\n      })\n    } else {\n      moreLinkCrudePlacements.push({\n        seg: sortedSegs, // a Seg array signals a more-link\n        hcoords: hiddenGroup.span,\n        top: null,\n      })\n    }\n  }\n\n  // add more-links into the hierarchy, but don't limit\n  hierarchy.maxStackCnt = -1\n  hierarchy.addSegs(moreLinkInputs)\n\n  let visibleRects = hierarchy.toRects()\n  let visiblePlacements: TimelineSegPlacement[] = []\n  let maxHeight = 0\n\n  for (let rect of visibleRects) {\n    let segIndex = rect.index\n    visiblePlacements.push({\n      seg: segIndex < segs.length\n        ? segs[segIndex] // a real seg\n        : hiddenGroups[segIndex - segs.length].entries.map(extractSeg), // signals a more-link\n      hcoords: rect.span,\n      top: rect.levelCoord,\n    })\n    maxHeight = Math.max(maxHeight, rect.levelCoord + rect.thickness)\n  }\n\n  return [\n    visiblePlacements.concat(crudePlacements, hiddenPlacements, moreLinkCrudePlacements),\n    maxHeight,\n  ]\n}\n","import {\n  BaseComponent, createElement, Fragment, BgEvent, renderFill,\n  getSegMeta, DateRange, DateMarker, buildEventRangeKey,\n} from '@fullcalendar/common'\nimport { computeSegHCoords } from './event-placement'\nimport { coordsToCss, TimelineCoords } from './TimelineCoords'\nimport { TimelineLaneSeg } from './TimelineLaneSlicer'\n\nexport interface TimelineLaneBgProps {\n  businessHourSegs: TimelineLaneSeg[] | null // can be null :(\n  bgEventSegs: TimelineLaneSeg[] | null // can be null :(\n  dateSelectionSegs: TimelineLaneSeg[]\n  eventResizeSegs: TimelineLaneSeg[]\n  timelineCoords: TimelineCoords | null\n  todayRange: DateRange\n  nowDate: DateMarker\n}\n\nexport class TimelineLaneBg extends BaseComponent<TimelineLaneBgProps> {\n  render() {\n    let { props } = this\n    let highlightSeg = [].concat(props.eventResizeSegs, props.dateSelectionSegs)\n\n    return props.timelineCoords && (\n      <div className=\"fc-timeline-bg\">\n        {/* Fragments contain the keys */}\n        {this.renderSegs(props.businessHourSegs || [], props.timelineCoords, 'non-business')}\n        {this.renderSegs(props.bgEventSegs || [], props.timelineCoords, 'bg-event')}\n        {this.renderSegs(highlightSeg, props.timelineCoords, 'highlight')}\n      </div>\n    )\n  }\n\n  renderSegs(segs: TimelineLaneSeg[], timelineCoords: TimelineCoords | null, fillType: string) {\n    let { todayRange, nowDate } = this.props\n    let { isRtl } = this.context\n    let segHCoords = computeSegHCoords(segs, 0, timelineCoords)\n\n    let children = segs.map((seg, i) => {\n      let hcoords = segHCoords[i]\n      let hStyle = coordsToCss(hcoords, isRtl)\n\n      return (\n        <div\n          key={buildEventRangeKey(seg.eventRange)}\n          className=\"fc-timeline-bg-harness\"\n          style={hStyle}\n        >\n          {fillType === 'bg-event' ?\n            <BgEvent seg={seg} {...getSegMeta(seg, todayRange, nowDate)} /> :\n            renderFill(fillType)}\n        </div>\n      )\n    })\n\n    return <Fragment>{children}</Fragment>\n  }\n}\n","import {\n  DateRange, intersectRanges, addMs, DateProfile, Slicer,\n  DateProfileGenerator, DateEnv, DateMarker, Seg,\n} from '@fullcalendar/common'\nimport { normalizeRange, isValidDate, TimelineDateProfile } from './timeline-date-profile'\nimport { computeDateSnapCoverage } from './TimelineCoords'\n\nexport interface TimelineLaneSeg extends Seg {\n  // the point of this range is because it might be different than seg.eventRange.range\n  // because the date might have been rounded to the start of a week or a month\n  start: DateMarker\n  end: DateMarker\n}\n\nexport class TimelineLaneSlicer extends Slicer<\n  TimelineLaneSeg,\n  [DateProfile, DateProfileGenerator, TimelineDateProfile, DateEnv]\n> {\n  sliceRange(\n    origRange: DateRange,\n    dateProfile: DateProfile,\n    dateProfileGenerator: DateProfileGenerator,\n    tDateProfile: TimelineDateProfile,\n    dateEnv: DateEnv,\n  ): TimelineLaneSeg[] {\n    let normalRange = normalizeRange(origRange, tDateProfile, dateEnv)\n    let segs: TimelineLaneSeg[] = []\n\n    // protect against when the span is entirely in an invalid date region\n    if (\n      computeDateSnapCoverage(normalRange.start, tDateProfile, dateEnv)\n      < computeDateSnapCoverage(normalRange.end, tDateProfile, dateEnv)\n    ) {\n      // intersect the footprint's range with the grid's range\n      let slicedRange = intersectRanges(normalRange, tDateProfile.normalizedRange)\n\n      if (slicedRange) {\n        segs.push({\n          start: slicedRange.start,\n          end: slicedRange.end,\n          isStart: slicedRange.start.valueOf() === normalRange.start.valueOf()\n            && isValidDate(slicedRange.start, tDateProfile, dateProfile, dateProfileGenerator),\n          isEnd: slicedRange.end.valueOf() === normalRange.end.valueOf()\n            && isValidDate(addMs(slicedRange.end, -1), tDateProfile, dateProfile, dateProfileGenerator),\n        })\n      }\n    }\n\n    return segs\n  }\n}\n","import { StandardEvent, MinimalEventProps, createElement, BaseComponent, createFormatter } from '@fullcalendar/common'\n\nexport interface TimelineEventProps extends MinimalEventProps {\n  isTimeScale: boolean\n}\n\nconst DEFAULT_TIME_FORMAT = createFormatter({\n  hour: 'numeric',\n  minute: '2-digit',\n  omitZeroMinute: true,\n  meridiem: 'narrow',\n})\n\nexport class TimelineEvent extends BaseComponent<TimelineEventProps> {\n  render() {\n    let { props } = this\n\n    return (\n      <StandardEvent\n        {...props}\n        extraClassNames={['fc-timeline-event', 'fc-h-event']}\n        defaultTimeFormat={DEFAULT_TIME_FORMAT}\n        defaultDisplayEventTime={!props.isTimeScale}\n      />\n    )\n  }\n}\n","import {\n  createElement, BaseComponent, Ref, createRef, MoreLinkRoot,\n  setRef, DateProfile, DateRange, DateMarker, Fragment, getSegMeta,\n} from '@fullcalendar/common'\nimport { TimelineSegPlacement } from './event-placement'\nimport { coordsToCss } from './TimelineCoords'\nimport { TimelineEvent } from './TimelineEvent'\nimport { TimelineLaneSeg } from './TimelineLaneSlicer'\n\nexport interface TimelineLaneMoreLinkProps {\n  elRef: Ref<HTMLElement>\n  hiddenSegs: TimelineLaneSeg[]\n  placement: TimelineSegPlacement\n  dateProfile: DateProfile\n  nowDate: DateMarker\n  todayRange: DateRange\n  isTimeScale: boolean\n  eventSelection: string\n  resourceId?: string\n  isForcedInvisible: { [instanceId: string]: any }\n}\n\nexport class TimelineLaneMoreLink extends BaseComponent<TimelineLaneMoreLinkProps> {\n  rootElRef = createRef<HTMLElement>()\n\n  render() {\n    let { props, context } = this\n    let { hiddenSegs, elRef, placement, resourceId } = props\n    let { top, hcoords } = placement\n    let isVisible = hcoords && top !== null\n    let hStyle = coordsToCss(hcoords, context.isRtl)\n    let extraDateSpan = resourceId ? { resourceId } : {}\n\n    return (\n      <MoreLinkRoot\n        allDayDate={null}\n        moreCnt={hiddenSegs.length}\n        allSegs={hiddenSegs}\n        hiddenSegs={hiddenSegs}\n        alignmentElRef={this.rootElRef}\n        dateProfile={props.dateProfile}\n        todayRange={props.todayRange}\n        extraDateSpan={extraDateSpan}\n        popoverContent={() => (\n          <Fragment>\n            {hiddenSegs.map((seg) => {\n              let instanceId = seg.eventRange.instance.instanceId\n              return (\n                <div\n                  key={instanceId}\n                  style={{ visibility: props.isForcedInvisible[instanceId] ? 'hidden' : ('' as any) }}\n                >\n                  <TimelineEvent\n                    isTimeScale={props.isTimeScale}\n                    seg={seg}\n                    isDragging={false}\n                    isResizing={false}\n                    isDateSelecting={false}\n                    isSelected={instanceId === props.eventSelection}\n                    {...getSegMeta(seg, props.todayRange, props.nowDate)}\n                  />\n                </div>\n              )\n            })}\n          </Fragment>\n        )}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) => (\n          <a\n            ref={(el: HTMLElement | null) => {\n              setRef(rootElRef, el) // for MoreLinkRoot\n              setRef(elRef, el) // for props props\n              setRef(this.rootElRef, el) // for this component\n            }}\n            className={['fc-timeline-more-link'].concat(classNames).join(' ')}\n            style={{\n              visibility: isVisible ? ('' as any) : 'hidden',\n              top: top || 0,\n              ...hStyle,\n            }}\n            onClick={handleClick}\n            title={title}\n            aria-expanded={isExpanded}\n            aria-controls={popoverId}\n          >\n            <div ref={innerElRef} className=\"fc-timeline-more-link-inner fc-sticky\">\n              {innerContent}\n            </div>\n          </a>\n        )}\n      </MoreLinkRoot>\n    )\n  }\n}\n","import {\n  Duration, EventStore, EventUiHash, DateSpan, EventInteractionState,\n  BaseComponent, createElement, memoize, Fragment, RefMap, mapHash, createRef,\n  getSegMeta, DateMarker, DateRange, DateProfile, sortEventSegs, isPropsEqual, buildIsoString,\n  computeEarliestSegStart,\n} from '@fullcalendar/common'\nimport { TimelineDateProfile } from './timeline-date-profile'\nimport { coordsToCss, TimelineCoords } from './TimelineCoords'\nimport { TimelineLaneBg } from './TimelineLaneBg'\nimport { TimelineLaneSlicer, TimelineLaneSeg } from './TimelineLaneSlicer'\nimport { TimelineEvent } from './TimelineEvent'\nimport { TimelineLaneMoreLink } from './TimelineLaneMoreLink'\nimport { computeFgSegPlacements, computeSegHCoords, TimelineSegPlacement } from './event-placement'\n\nexport interface TimelineLaneProps extends TimelineLaneCoreProps {\n  onHeightChange?: (innerEl: HTMLElement, isStable: boolean) => void\n}\n\nexport interface TimelineLaneCoreProps {\n  nowDate: DateMarker\n  todayRange: DateRange\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  nextDayThreshold: Duration\n  businessHours: EventStore | null\n  eventStore: EventStore | null\n  eventUiBases: EventUiHash\n  dateSelection: DateSpan | null\n  eventSelection: string\n  eventDrag: EventInteractionState | null\n  eventResize: EventInteractionState | null\n  timelineCoords: TimelineCoords | null // TODO: renamt to SLAT coords?\n  resourceId?: string // hack\n  syncParentMinHeight?: boolean // hack\n}\n\ninterface TimelineLaneState {\n  eventInstanceHeights: { [instanceId: string]: number } // integers\n  moreLinkHeights: { [isoStr: string]: number } // integers\n}\n\nexport class TimelineLane extends BaseComponent<TimelineLaneProps, TimelineLaneState> {\n  private slicer = new TimelineLaneSlicer()\n  private sortEventSegs = memoize(sortEventSegs)\n  private harnessElRefs = new RefMap<HTMLDivElement>()\n  private moreElRefs = new RefMap<HTMLDivElement>()\n  private innerElRef = createRef<HTMLDivElement>()\n  // TODO: memoize event positioning\n\n  state: TimelineLaneState = {\n    eventInstanceHeights: {},\n    moreLinkHeights: {},\n  }\n\n  render() {\n    let { props, state, context } = this\n    let { options } = context\n    let { dateProfile, tDateProfile } = props\n\n    let slicedProps = this.slicer.sliceProps(\n      props,\n      dateProfile,\n      tDateProfile.isTimeScale ? null : props.nextDayThreshold,\n      context, // wish we didn't have to pass in the rest of the args...\n      dateProfile,\n      context.dateProfileGenerator,\n      tDateProfile,\n      context.dateEnv,\n    )\n\n    let mirrorSegs =\n      (slicedProps.eventDrag ? slicedProps.eventDrag.segs as TimelineLaneSeg[] : null) ||\n      (slicedProps.eventResize ? slicedProps.eventResize.segs as TimelineLaneSeg[] : null) ||\n      []\n\n    let fgSegs = this.sortEventSegs(slicedProps.fgEventSegs, options.eventOrder) as TimelineLaneSeg[]\n    let fgSegHCoords = computeSegHCoords(fgSegs, options.eventMinWidth, props.timelineCoords)\n    let [fgPlacements, fgHeight] = computeFgSegPlacements(\n      fgSegs,\n      fgSegHCoords,\n      state.eventInstanceHeights,\n      state.moreLinkHeights,\n      options.eventOrderStrict,\n      options.eventMaxStack,\n    )\n\n    let isForcedInvisible = // TODO: more convenient\n      (slicedProps.eventDrag ? slicedProps.eventDrag.affectedInstances : null) ||\n      (slicedProps.eventResize ? slicedProps.eventResize.affectedInstances : null) ||\n      {}\n\n    return (\n      <Fragment>\n        <TimelineLaneBg\n          businessHourSegs={slicedProps.businessHourSegs}\n          bgEventSegs={slicedProps.bgEventSegs}\n          timelineCoords={props.timelineCoords}\n          eventResizeSegs={slicedProps.eventResize ? slicedProps.eventResize.segs as TimelineLaneSeg[] : [] /* bad new empty array? */}\n          dateSelectionSegs={slicedProps.dateSelectionSegs}\n          nowDate={props.nowDate}\n          todayRange={props.todayRange}\n        />\n        <div\n          className=\"fc-timeline-events fc-scrollgrid-sync-inner\"\n          ref={this.innerElRef}\n          style={{ height: fgHeight }}\n        >\n          {this.renderFgSegs(\n            fgPlacements,\n            isForcedInvisible,\n            false,\n            false,\n            false,\n          )}\n          {this.renderFgSegs(\n            buildMirrorPlacements(mirrorSegs, props.timelineCoords, fgPlacements),\n            {},\n            Boolean(slicedProps.eventDrag),\n            Boolean(slicedProps.eventResize),\n            false, // because mirror is never drawn for date selection\n          )}\n        </div>\n      </Fragment>\n    )\n  }\n\n  componentDidMount() {\n    this.updateSize()\n  }\n\n  componentDidUpdate(prevProps: TimelineLaneProps, prevState: TimelineLaneState) {\n    if (\n      prevProps.eventStore !== this.props.eventStore || // external thing changed?\n      prevProps.timelineCoords !== this.props.timelineCoords || // external thing changed?\n      prevState.moreLinkHeights !== this.state.moreLinkHeights // HACK. see addStateEquality\n    ) {\n      this.updateSize()\n    }\n  }\n\n  updateSize() {\n    let { props } = this\n    let { timelineCoords } = props\n    const innerEl = this.innerElRef.current\n\n    if (props.onHeightChange) {\n      props.onHeightChange(innerEl, false)\n    }\n\n    if (timelineCoords) {\n      this.setState({\n        eventInstanceHeights: mapHash(this.harnessElRefs.currentMap, (harnessEl) => (\n          Math.round(harnessEl.getBoundingClientRect().height)\n        )),\n        moreLinkHeights: mapHash(this.moreElRefs.currentMap, (moreEl) => (\n          Math.round(moreEl.getBoundingClientRect().height)\n        )),\n      }, () => {\n        if (props.onHeightChange) {\n          props.onHeightChange(innerEl, true)\n        }\n      })\n    }\n\n    // hack\n    if (props.syncParentMinHeight) {\n      innerEl.parentElement.style.minHeight = innerEl.style.height\n    }\n  }\n\n  renderFgSegs(\n    segPlacements: TimelineSegPlacement[],\n    isForcedInvisible: { [instanceId: string]: any },\n    isDragging: boolean,\n    isResizing: boolean,\n    isDateSelecting: boolean,\n  ) {\n    let { harnessElRefs, moreElRefs, props, context } = this\n    let isMirror = isDragging || isResizing || isDateSelecting\n\n    return (\n      <Fragment>\n        {segPlacements.map((segPlacement) => {\n          let { seg, hcoords, top } = segPlacement\n\n          if (Array.isArray(seg)) { // a more-link\n            let isoStr = buildIsoString(computeEarliestSegStart(seg))\n            return (\n              <TimelineLaneMoreLink\n                key={'m:' + isoStr /* \"m\" for \"more\" */}\n                elRef={moreElRefs.createRef(isoStr)}\n                hiddenSegs={seg}\n                placement={segPlacement}\n                dateProfile={props.dateProfile}\n                nowDate={props.nowDate}\n                todayRange={props.todayRange}\n                isTimeScale={props.tDateProfile.isTimeScale}\n                eventSelection={props.eventSelection}\n                resourceId={props.resourceId}\n                isForcedInvisible={isForcedInvisible}\n              />\n            )\n          }\n\n          let instanceId = seg.eventRange.instance.instanceId\n          let isVisible = isMirror || Boolean(!isForcedInvisible[instanceId] && hcoords && top !== null)\n          let hStyle = coordsToCss(hcoords, context.isRtl)\n\n          return (\n            <div\n              key={'e:' + instanceId /* \"e\" for \"event\" */}\n              ref={isMirror ? null : harnessElRefs.createRef(instanceId)}\n              className=\"fc-timeline-event-harness\"\n              style={{\n                visibility: isVisible ? ('' as any) : 'hidden',\n                top: top || 0,\n                ...hStyle,\n              }}\n            >\n              <TimelineEvent\n                isTimeScale={props.tDateProfile.isTimeScale}\n                seg={seg}\n                isDragging={isDragging}\n                isResizing={isResizing}\n                isDateSelecting={isDateSelecting}\n                isSelected={instanceId === props.eventSelection /* TODO: bad for mirror? */}\n                {...getSegMeta(seg, props.todayRange, props.nowDate)}\n              />\n            </div>\n          )\n        })}\n      </Fragment>\n    )\n  }\n}\n\nTimelineLane.addStateEquality({\n  eventInstanceHeights: isPropsEqual,\n  moreLinkHeights: isPropsEqual,\n})\n\nfunction buildMirrorPlacements(\n  mirrorSegs: TimelineLaneSeg[],\n  timelineCoords: TimelineCoords | null,\n  fgPlacements: TimelineSegPlacement[],\n): TimelineSegPlacement[] {\n  if (!mirrorSegs.length || !timelineCoords) {\n    return []\n  }\n  let topsByInstanceId = buildAbsoluteTopHash(fgPlacements) // TODO: cache this at first render?\n  return mirrorSegs.map((seg) => ({\n    seg,\n    hcoords: timelineCoords.rangeToCoords(seg),\n    top: topsByInstanceId[seg.eventRange.instance.instanceId],\n  }))\n}\n\nfunction buildAbsoluteTopHash(placements: TimelineSegPlacement[]) {\n  let topsByInstanceId: { [instanceId: string]: number } = {}\n\n  for (let placement of placements) {\n    let { seg } = placement\n    if (!Array.isArray(seg)) { // doesn't represent a more-link\n      topsByInstanceId[seg.eventRange.instance.instanceId] = placement.top\n    }\n  }\n\n  return topsByInstanceId\n}\n","import {\n  createElement, createRef, ViewProps, Hit, DateComponent, CssDimValue, VNode, DateMarker, NowTimer,\n  greatestDurationDenominator, DateRange, NowIndicatorRoot, Fragment,\n} from '@fullcalendar/common'\nimport { coordToCss, TimelineCoords } from './TimelineCoords'\nimport { TimelineSlats } from './TimelineSlats'\nimport { TimelineLane } from './TimelineLane'\nimport { TimelineDateProfile } from './timeline-date-profile'\n\nexport interface TimelinGridProps extends ViewProps {\n  tDateProfile: TimelineDateProfile\n  clientWidth: number | null\n  clientHeight: number | null\n  tableMinWidth: CssDimValue\n  tableColGroupNode: VNode\n  onSlatCoords?: (coords: TimelineCoords) => void\n  onScrollLeftRequest?: (scrollLeft: number) => void\n}\n\ninterface TimelineGridState {\n  coords: TimelineCoords | null\n}\n\nexport class TimelineGrid extends DateComponent<TimelinGridProps, TimelineGridState> {\n  private slatsRef = createRef<TimelineSlats>()\n\n  state: TimelineGridState = {\n    coords: null,\n  }\n\n  render() {\n    let { props, state, context } = this\n    let { options } = context\n    let { dateProfile, tDateProfile } = props\n    let timerUnit = greatestDurationDenominator(tDateProfile.slotDuration).unit\n\n    return (\n      <div\n        className=\"fc-timeline-body\"\n        ref={this.handeEl}\n        style={{\n          minWidth: props.tableMinWidth,\n          height: props.clientHeight,\n          width: props.clientWidth,\n        }}\n      >\n        <NowTimer unit={timerUnit}>\n          {(nowDate: DateMarker, todayRange: DateRange) => (\n            <Fragment>\n              <TimelineSlats\n                ref={this.slatsRef}\n                dateProfile={dateProfile}\n                tDateProfile={tDateProfile}\n                nowDate={nowDate}\n                todayRange={todayRange}\n                clientWidth={props.clientWidth}\n                tableColGroupNode={props.tableColGroupNode}\n                tableMinWidth={props.tableMinWidth}\n                onCoords={this.handleCoords}\n                onScrollLeftRequest={props.onScrollLeftRequest}\n              />\n              <TimelineLane\n                dateProfile={dateProfile}\n                tDateProfile={props.tDateProfile}\n                nowDate={nowDate}\n                todayRange={todayRange}\n                nextDayThreshold={options.nextDayThreshold}\n                businessHours={props.businessHours}\n                eventStore={props.eventStore}\n                eventUiBases={props.eventUiBases}\n                dateSelection={props.dateSelection}\n                eventSelection={props.eventSelection}\n                eventDrag={props.eventDrag}\n                eventResize={props.eventResize}\n                timelineCoords={state.coords}\n                syncParentMinHeight\n              />\n              {(options.nowIndicator && state.coords && state.coords.isDateInRange(nowDate)) && (\n                <div className=\"fc-timeline-now-indicator-container\">\n                  <NowIndicatorRoot isAxis={false} date={nowDate}>\n                    {(rootElRef, classNames, innerElRef, innerContent) => (\n                      <div\n                        ref={rootElRef}\n                        className={['fc-timeline-now-indicator-line'].concat(classNames).join(' ')}\n                        style={coordToCss(state.coords.dateToCoord(nowDate), context.isRtl)}\n                      >\n                        {innerContent}\n                      </div>\n                    )}\n                  </NowIndicatorRoot>\n                </div>\n              )}\n            </Fragment>\n          )}\n        </NowTimer>\n      </div>\n    )\n  }\n\n  handeEl = (el: HTMLElement | null) => {\n    if (el) {\n      this.context.registerInteractiveComponent(this, { el })\n    } else {\n      this.context.unregisterInteractiveComponent(this)\n    }\n  }\n\n  handleCoords = (coords: TimelineCoords) => {\n    this.setState({ coords })\n\n    if (this.props.onSlatCoords) {\n      this.props.onSlatCoords(coords)\n    }\n  }\n\n  // Hit System\n  // ------------------------------------------------------------------------------------------\n\n  queryHit(positionLeft: number, positionTop: number, elWidth: number, elHeight: number): Hit {\n    let slats = this.slatsRef.current\n    let slatHit = slats.positionToHit(positionLeft)\n\n    if (slatHit) {\n      return {\n        dateProfile: this.props.dateProfile,\n        dateSpan: slatHit.dateSpan,\n        rect: {\n          left: slatHit.left,\n          right: slatHit.right,\n          top: 0,\n          bottom: elHeight,\n        },\n        dayEl: slatHit.dayEl,\n        layer: 0,\n      }\n    }\n\n    return null\n  }\n}\n","import {\n  createElement, ViewProps, memoize, ChunkContentCallbackArgs, createRef, ViewRoot,\n  DateComponent, ScrollGridSectionConfig, renderScrollShim, getStickyHeaderDates, getStickyFooterScrollbar,\n} from '@fullcalendar/common'\nimport { ScrollGrid } from '@fullcalendar/scrollgrid'\nimport { buildTimelineDateProfile, TimelineDateProfile } from './timeline-date-profile'\nimport { TimelineHeader } from './TimelineHeader'\nimport { TimelineGrid } from './TimelineGrid'\nimport { TimelineCoords } from './TimelineCoords'\n\ninterface TimelineViewState {\n  slatCoords: TimelineCoords | null\n  slotCushionMaxWidth: number | null\n}\n\nexport class TimelineView extends DateComponent<ViewProps, TimelineViewState> { // would make this abstract, but TS complains\n  private buildTimelineDateProfile = memoize(buildTimelineDateProfile)\n  private scrollGridRef = createRef<ScrollGrid>()\n\n  state = {\n    slatCoords: null,\n    slotCushionMaxWidth: null,\n  }\n\n  render() {\n    let { props, state, context } = this\n    let { options } = context\n    let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(options)\n    let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(options)\n\n    let tDateProfile = this.buildTimelineDateProfile(\n      props.dateProfile,\n      context.dateEnv,\n      options,\n      context.dateProfileGenerator,\n    )\n\n    let extraClassNames = [\n      'fc-timeline',\n      options.eventOverlap === false ? 'fc-timeline-overlap-disabled' : '',\n    ]\n\n    let { slotMinWidth } = options\n    let slatCols = buildSlatCols(tDateProfile, slotMinWidth || this.computeFallbackSlotMinWidth(tDateProfile))\n\n    let sections: ScrollGridSectionConfig[] = [\n      {\n        type: 'header',\n        key: 'header',\n        isSticky: stickyHeaderDates,\n        chunks: [{\n          key: 'timeline',\n          content: (contentArg: ChunkContentCallbackArgs) => (\n            <TimelineHeader\n              dateProfile={props.dateProfile}\n              clientWidth={contentArg.clientWidth}\n              clientHeight={contentArg.clientHeight}\n              tableMinWidth={contentArg.tableMinWidth}\n              tableColGroupNode={contentArg.tableColGroupNode}\n              tDateProfile={tDateProfile}\n              slatCoords={state.slatCoords}\n              onMaxCushionWidth={slotMinWidth ? null : this.handleMaxCushionWidth}\n            />\n          ),\n        }],\n      },\n      {\n        type: 'body',\n        key: 'body',\n        liquid: true,\n        chunks: [{\n          key: 'timeline',\n          content: (contentArg: ChunkContentCallbackArgs) => (\n            <TimelineGrid\n              {...props}\n              clientWidth={contentArg.clientWidth}\n              clientHeight={contentArg.clientHeight}\n              tableMinWidth={contentArg.tableMinWidth}\n              tableColGroupNode={contentArg.tableColGroupNode}\n              tDateProfile={tDateProfile}\n              onSlatCoords={this.handleSlatCoords}\n              onScrollLeftRequest={this.handleScrollLeftRequest}\n            />\n          ),\n        }],\n      },\n    ]\n\n    if (stickyFooterScrollbar) {\n      sections.push({\n        type: 'footer',\n        key: 'footer',\n        isSticky: true,\n        chunks: [{\n          key: 'timeline',\n          content: renderScrollShim,\n        }],\n      })\n    }\n\n    return (\n      <ViewRoot viewSpec={context.viewSpec}>\n        {(rootElRef, classNames) => (\n          <div ref={rootElRef} className={extraClassNames.concat(classNames).join(' ')}>\n            <ScrollGrid\n              ref={this.scrollGridRef}\n              liquid={!props.isHeightAuto && !props.forPrint}\n              collapsibleWidth={false}\n              colGroups={[\n                { cols: slatCols },\n              ]}\n              sections={sections}\n            />\n          </div>\n        )}\n      </ViewRoot>\n    )\n  }\n\n  handleSlatCoords = (slatCoords: TimelineCoords | null) => {\n    this.setState({ slatCoords })\n  }\n\n  handleScrollLeftRequest = (scrollLeft: number) => {\n    let scrollGrid = this.scrollGridRef.current\n    scrollGrid.forceScrollLeft(0, scrollLeft)\n  }\n\n  handleMaxCushionWidth = (slotCushionMaxWidth) => {\n    this.setState({\n      slotCushionMaxWidth: Math.ceil(slotCushionMaxWidth), // for less rerendering TODO: DRY\n    })\n  }\n\n  computeFallbackSlotMinWidth(tDateProfile: TimelineDateProfile) { // TODO: duplicate definition\n    return Math.max(30, ((this.state.slotCushionMaxWidth || 0) / tDateProfile.slotsPerLabel))\n  }\n}\n\nexport function buildSlatCols(tDateProfile: TimelineDateProfile, slotMinWidth?: number) {\n  return [{\n    span: tDateProfile.slotCnt,\n    minWidth: slotMinWidth || 1, // needs to be a non-zero number to trigger horizontal scrollbars!??????\n  }]\n}\n","import { createPlugin } from '@fullcalendar/common'\n\nimport premiumCommonPlugin from '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n// ensure ambient declarations\nimport '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n\nimport { TimelineView } from './TimelineView'\nimport './main.css'\n\nexport { TimelineView }\nexport { buildSlatCols } from './TimelineView'\nexport { TimelineLane, TimelineLaneProps, TimelineLaneCoreProps } from './TimelineLane'\nexport { TimelineLaneBg } from './TimelineLaneBg'\nexport { TimelineHeader } from './TimelineHeader'\nexport { TimelineSlats } from './TimelineSlats'\nexport { TimelineDateProfile, buildTimelineDateProfile } from './timeline-date-profile'\nexport { TimelineCoords, coordToCss, coordsToCss } from './TimelineCoords'\nexport { TimelineLaneSlicer, TimelineLaneSeg } from './TimelineLaneSlicer'\nexport { TimelineHeaderRows } from './TimelineHeaderRows'\n\nexport default createPlugin({\n  deps: [\n    premiumCommonPlugin,\n  ],\n  initialView: 'timelineDay',\n  views: {\n\n    timeline: {\n      component: TimelineView,\n      usesMinMaxTime: true,\n      eventResizableFromStart: true, // how is this consumed for TimelineView tho?\n    },\n\n    timelineDay: {\n      type: 'timeline',\n      duration: { days: 1 },\n    },\n\n    timelineWeek: {\n      type: 'timeline',\n      duration: { weeks: 1 },\n    },\n\n    timelineMonth: {\n      type: 'timeline',\n      duration: { months: 1 },\n    },\n\n    timelineYear: {\n      type: 'timeline',\n      duration: { years: 1 },\n    },\n\n  },\n})\n","import { EventMutation, Hit, EventDef, CalendarContext, EventDropArg } from '@fullcalendar/common'\n\nexport function massageEventDragMutation(eventMutation: EventMutation, hit0: Hit, hit1: Hit) {\n  let resource0 = hit0.dateSpan.resourceId\n  let resource1 = hit1.dateSpan.resourceId\n\n  if (\n    resource0 && resource1 &&\n    resource0 !== resource1\n  ) {\n    eventMutation.resourceMutation = {\n      matchResourceId: resource0,\n      setResourceId: resource1,\n    }\n  }\n}\n\n/*\nTODO: all this would be much easier if we were using a hash!\n*/\nexport function applyEventDefMutation(eventDef: EventDef, mutation: EventMutation, context: CalendarContext) {\n  let resourceMutation = mutation.resourceMutation\n\n  if (resourceMutation && computeResourceEditable(eventDef, context)) {\n    let index = eventDef.resourceIds.indexOf(resourceMutation.matchResourceId)\n\n    if (index !== -1) {\n      let resourceIds = eventDef.resourceIds.slice() // copy\n\n      resourceIds.splice(index, 1) // remove\n\n      if (resourceIds.indexOf(resourceMutation.setResourceId) === -1) { // not already in there\n        resourceIds.push(resourceMutation.setResourceId) // add\n      }\n\n      eventDef.resourceIds = resourceIds\n    }\n  }\n}\n\n/*\nHACK\nTODO: use EventUi system instead of this\n*/\nexport function computeResourceEditable(eventDef: EventDef, context: CalendarContext): boolean {\n  let { resourceEditable } = eventDef\n\n  if (resourceEditable == null) {\n    let source = eventDef.sourceId && context.getCurrentData().eventSources[eventDef.sourceId]\n\n    if (source) {\n      resourceEditable = source.extendedProps.resourceEditable // used the Source::extendedProps hack\n    }\n\n    if (resourceEditable == null) {\n      resourceEditable = context.options.eventResourceEditable\n\n      if (resourceEditable == null) {\n        resourceEditable = context.options.editable // TODO: use defaults system instead\n      }\n    }\n  }\n\n  return resourceEditable\n}\n\nexport function transformEventDrop(mutation: EventMutation, context: CalendarContext): Partial<EventDropArg> {\n  let { resourceMutation } = mutation\n\n  if (resourceMutation) {\n    let { calendarApi } = context\n\n    return {\n      oldResource: calendarApi.getResourceById(resourceMutation.matchResourceId),\n      newResource: calendarApi.getResourceById(resourceMutation.setResourceId),\n    }\n  }\n\n  return {\n    oldResource: null,\n    newResource: null,\n  }\n}\n","import {\n  rangesIntersect, EventInstanceHash, filterHash, ViewProps, ViewPropsTransformer, CalendarContentProps, memoize,\n  EventUi, EventDefHash, EventDef, EventStore, DateRange, CalendarContext,\n} from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { ResourceHash } from './structs/resource'\nimport { ResourceEntityExpansions } from './reducers/resourceEntityExpansions'\nimport { computeResourceEditable } from './EventDragging'\n\n// for when resource views need resource data\n\nexport interface ResourceViewProps extends ViewProps {\n  resourceStore: ResourceHash\n  resourceEntityExpansions: ResourceEntityExpansions\n}\n\nexport class ResourceDataAdder implements ViewPropsTransformer {\n  filterResources = memoize(filterResources)\n\n  transform(viewProps: ViewProps, calendarProps: CalendarContentProps) {\n    if (calendarProps.viewSpec.optionDefaults.needsResourceData) {\n      return {\n        resourceStore: this.filterResources(\n          calendarProps.resourceStore,\n          calendarProps.options.filterResourcesWithEvents,\n          calendarProps.eventStore,\n          calendarProps.dateProfile.activeRange,\n        ),\n        resourceEntityExpansions: calendarProps.resourceEntityExpansions,\n      }\n    }\n    return null\n  }\n}\n\nfunction filterResources(\n  resourceStore: ResourceHash,\n  doFilterResourcesWithEvents: boolean,\n  eventStore: EventStore,\n  activeRange: DateRange,\n): ResourceHash {\n  if (doFilterResourcesWithEvents) {\n    let instancesInRange = filterEventInstancesInRange(eventStore.instances, activeRange)\n    let hasEvents = computeHasEvents(instancesInRange, eventStore.defs)\n\n    __assign(hasEvents, computeAncestorHasEvents(hasEvents, resourceStore))\n\n    return filterHash(resourceStore, (resource, resourceId) => hasEvents[resourceId])\n  }\n\n  return resourceStore\n}\n\nfunction filterEventInstancesInRange(eventInstances: EventInstanceHash, activeRange: DateRange) {\n  return filterHash(eventInstances, (eventInstance) => rangesIntersect(eventInstance.range, activeRange))\n}\n\nfunction computeHasEvents(eventInstances: EventInstanceHash, eventDefs: EventDefHash) {\n  let hasEvents = {}\n\n  for (let instanceId in eventInstances) {\n    let instance = eventInstances[instanceId]\n\n    for (let resourceId of eventDefs[instance.defId].resourceIds) {\n      hasEvents[resourceId] = true\n    }\n  }\n\n  return hasEvents\n}\n\n/*\nmark resources as having events if any of their ancestors have them\nNOTE: resourceStore might not have all the resources that hasEvents{} has keyed\n*/\nfunction computeAncestorHasEvents(hasEvents: { [resourceId: string]: boolean }, resourceStore: ResourceHash) {\n  let res = {}\n\n  for (let resourceId in hasEvents) {\n    let resource\n\n    while ((resource = resourceStore[resourceId])) {\n      resourceId = resource.parentId // now functioning as the parentId\n\n      if (resourceId) {\n        res[resourceId] = true\n      } else {\n        break\n      }\n    }\n  }\n\n  return res\n}\n\n/*\nfor making sure events that have editable resources are always draggable in resource views\n*/\nexport function transformIsDraggable(val: boolean, eventDef: EventDef, eventUi: EventUi, context: CalendarContext) {\n  if (!val) {\n    let state = context.getCurrentData()\n    let viewSpec = state.viewSpecs[state.currentViewType]\n\n    if (viewSpec.optionDefaults.needsResourceData) {\n      if (computeResourceEditable(eventDef, context)) {\n        return true\n      }\n    }\n  }\n\n  return val\n}\n","import {\n  ViewProps, ViewPropsTransformer, CalendarContentProps, memoize, mapHash,\n  EventUi, isPropsEqual, EventUiHash, EventDefHash, EventDef, combineEventUis,\n} from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { ResourceHash } from './structs/resource'\n\n// for when non-resource view should be given EventUi info (for event coloring/constraints based off of resource data)\n\nexport class ResourceEventConfigAdder implements ViewPropsTransformer {\n  buildResourceEventUis = memoize(buildResourceEventUis, isPropsEqual)\n  injectResourceEventUis = memoize(injectResourceEventUis)\n\n  transform(viewProps: ViewProps, calendarProps: CalendarContentProps) {\n    if (!calendarProps.viewSpec.optionDefaults.needsResourceData) {\n      return {\n        eventUiBases: this.injectResourceEventUis(\n          viewProps.eventUiBases,\n          viewProps.eventStore.defs,\n          this.buildResourceEventUis(calendarProps.resourceStore),\n        ),\n      }\n    }\n    return null\n  }\n}\n\nfunction buildResourceEventUis(resourceStore: ResourceHash) {\n  return mapHash(resourceStore, (resource) => resource.ui)\n}\n\nfunction injectResourceEventUis(eventUiBases: EventUiHash, eventDefs: EventDefHash, resourceEventUis: EventUiHash) {\n  return mapHash(eventUiBases, (eventUi, defId) => {\n    if (defId) { // not the '' key\n      return injectResourceEventUi(eventUi, eventDefs[defId], resourceEventUis)\n    }\n    return eventUi\n  })\n}\n\nfunction injectResourceEventUi(origEventUi: EventUi, eventDef: EventDef, resourceEventUis: EventUiHash) {\n  let parts = []\n\n  // first resource takes precedence, which fights with the ordering of combineEventUis, thus the unshifts\n  for (let resourceId of eventDef.resourceIds) {\n    if (resourceEventUis[resourceId]) {\n      parts.unshift(resourceEventUis[resourceId])\n    }\n  }\n\n  parts.unshift(origEventUi)\n\n  return combineEventUis(parts)\n}\n","import { ResourceFetcher } from './resource-source'\nimport { ResourceSourceRefined } from './resource-source-parse'\n\nexport interface ResourceSourceDef<ResourceSourceMeta> {\n  ignoreRange?: boolean\n  parseMeta: (refined: ResourceSourceRefined) => ResourceSourceMeta | null\n  fetch: ResourceFetcher<ResourceSourceMeta>\n}\n\nlet defs: ResourceSourceDef<any>[] = [] // TODO: use plugin system\n\nexport function registerResourceSourceDef<ResourceSourceMeta>(def: ResourceSourceDef<ResourceSourceMeta>) {\n  defs.push(def)\n}\n\nexport function getResourceSourceDef(id: number): ResourceSourceDef<any> {\n  return defs[id]\n}\n\nexport function getResourceSourceDefs(): ResourceSourceDef<any>[] {\n  return defs\n}\n","import { guid, identity, Identity, RefinedOptionsFromRefiners, refineProps, RawOptionsFromRefiners, Dictionary } from '@fullcalendar/common'\nimport { ResourceInput } from './resource'\nimport { ResourceFunc } from '../resource-sources/resource-func'\nimport { ResourceSource } from './resource-source'\nimport { getResourceSourceDefs } from './resource-source-def'\n\n// TODO: make this a plugin-able parser\n// TODO: success/failure\nexport const RESOURCE_SOURCE_REFINERS = {\n  id: String,\n\n  // for array. TODO: move to resource-array\n  resources: identity as Identity<ResourceInput[] | ResourceFunc>,\n\n  // for json feed. TODO: move to resource-json-feed\n  url: String,\n  method: String,\n  startParam: String,\n  endParam: String,\n  timeZoneParam: String,\n  extraParams: identity as Identity<Dictionary | (() => Dictionary)>,\n}\n\nexport type ResourceSourceInputObject = RawOptionsFromRefiners<typeof RESOURCE_SOURCE_REFINERS>\nexport type ResourceSourceRefined = RefinedOptionsFromRefiners<typeof RESOURCE_SOURCE_REFINERS>\n\nexport type ResourceSourceInput =\n  ResourceSourceInputObject |\n  ResourceInput[] |\n  ResourceFunc |\n  string // url\n\nexport function parseResourceSource(input: ResourceSourceInput): ResourceSource<any> {\n  let inputObj: ResourceSourceInputObject\n\n  if (typeof input === 'string') {\n    inputObj = { url: input }\n  } else if (typeof input === 'function' || Array.isArray(input)) {\n    inputObj = { resources: input }\n  } else if (typeof input === 'object' && input) { // non-null object\n    inputObj = input\n  }\n\n  if (inputObj) {\n    let { refined, extra } = refineProps(inputObj, RESOURCE_SOURCE_REFINERS)\n\n    warnUnknownProps(extra)\n\n    let metaRes = buildResourceSourceMeta(refined)\n\n    if (metaRes) {\n      return {\n        _raw: input,\n        sourceId: guid(),\n        sourceDefId: metaRes.sourceDefId,\n        meta: metaRes.meta,\n        publicId: refined.id || '',\n        isFetching: false,\n        latestFetchId: '',\n        fetchRange: null,\n      }\n    }\n  }\n\n  return null\n}\n\nfunction buildResourceSourceMeta(refined: ResourceSourceRefined) {\n  let defs = getResourceSourceDefs()\n\n  for (let i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence\n    let def = defs[i]\n    let meta = def.parseMeta(refined)\n\n    if (meta) {\n      return { meta, sourceDefId: i }\n    }\n  }\n\n  return null\n}\n\nfunction warnUnknownProps(props) {\n  for (let propName in props) {\n    console.warn(`Unknown resource prop '${propName}'`)\n  }\n}\n","import { DateProfile, rangesEqual, DateRange, guid, CalendarContext } from '@fullcalendar/common'\nimport { ResourceSource } from '../structs/resource-source'\nimport { parseResourceSource } from '../structs/resource-source-parse'\nimport { getResourceSourceDef } from '../structs/resource-source-def'\nimport { ResourceAction } from './resource-action'\n\nexport function reduceResourceSource(\n  source: ResourceSource<any> | null,\n  action: ResourceAction | null,\n  context: CalendarContext & { dateProfile: DateProfile },\n): ResourceSource<any> {\n  let { options, dateProfile } = context\n\n  if (!source || !action) {\n    return createSource(\n      options.initialResources || options.resources,\n      dateProfile.activeRange,\n      options.refetchResourcesOnNavigate,\n      context,\n    )\n  }\n\n  switch (action.type) {\n    case 'RESET_RESOURCE_SOURCE':\n      return createSource(action.resourceSourceInput, dateProfile.activeRange, options.refetchResourcesOnNavigate, context)\n\n    case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n    case 'NEXT':\n    case 'CHANGE_DATE':\n    case 'CHANGE_VIEW_TYPE':\n      return handleRangeChange(source, dateProfile.activeRange, options.refetchResourcesOnNavigate, context)\n\n    case 'RECEIVE_RESOURCES':\n    case 'RECEIVE_RESOURCE_ERROR':\n      return receiveResponse(source, action.fetchId, action.fetchRange)\n\n    case 'REFETCH_RESOURCES':\n      return fetchSource(source, dateProfile.activeRange, context)\n\n    default:\n      return source\n  }\n}\n\nfunction createSource(input, activeRange: DateRange, refetchResourcesOnNavigate, context: CalendarContext) {\n  if (input) {\n    let source = parseResourceSource(input)\n    source = fetchSource(source, refetchResourcesOnNavigate ? activeRange : null, context)\n    return source\n  }\n\n  return null\n}\n\nfunction handleRangeChange(\n  source: ResourceSource<any>,\n  activeRange: DateRange,\n  refetchResourcesOnNavigate,\n  context: CalendarContext,\n): ResourceSource<any> {\n  if (\n    refetchResourcesOnNavigate &&\n    !doesSourceIgnoreRange(source) &&\n    (!source.fetchRange || !rangesEqual(source.fetchRange, activeRange))\n  ) {\n    return fetchSource(source, activeRange, context)\n  }\n  return source\n}\n\nfunction doesSourceIgnoreRange(source: ResourceSource<any>) {\n  return Boolean(getResourceSourceDef(source.sourceDefId).ignoreRange)\n}\n\nfunction fetchSource(source: ResourceSource<any>, fetchRange: DateRange | null, context: CalendarContext): ResourceSource<any> {\n  let sourceDef = getResourceSourceDef(source.sourceDefId)\n  let fetchId = guid()\n\n  sourceDef.fetch(\n    {\n      resourceSource: source,\n      range: fetchRange,\n      context,\n    },\n    (res) => {\n      context.dispatch({\n        type: 'RECEIVE_RESOURCES',\n        fetchId,\n        fetchRange,\n        rawResources: res.rawResources,\n      })\n    },\n    (error) => {\n      context.dispatch({\n        type: 'RECEIVE_RESOURCE_ERROR',\n        fetchId,\n        fetchRange,\n        error,\n      })\n    },\n  )\n\n  return {\n    ...source,\n    isFetching: true,\n    latestFetchId: fetchId,\n  }\n}\n\nfunction receiveResponse(source: ResourceSource<any>, fetchId: string, fetchRange: DateRange) {\n  if (fetchId === source.latestFetchId) {\n    return {\n      ...source,\n      isFetching: false,\n      fetchRange,\n    }\n  }\n\n  return source\n}\n","import {\n  ConstraintInput, AllowFunc, EventStore, parseBusinessHours, CalendarContext, EventUi, BusinessHoursInput,\n  guid, identity, Identity, RawOptionsFromRefiners, parseClassNames, refineProps, createEventUi, Dictionary,\n} from '@fullcalendar/common'\n\nconst PRIVATE_ID_PREFIX = '_fc:'\n\nconst RESOURCE_REFINERS = {\n  id: String,\n  parentId: String,\n  children: identity as Identity<ResourceInput[]>,\n  title: String,\n  businessHours: identity as Identity<BusinessHoursInput>,\n  extendedProps: identity as Identity<Dictionary>,\n\n  // event-ui\n  eventEditable: Boolean,\n  eventStartEditable: Boolean,\n  eventDurationEditable: Boolean,\n  eventConstraint: identity as Identity<ConstraintInput>,\n  eventOverlap: Boolean, // can NOT be a func, different from OptionsInput\n  eventAllow: identity as Identity<AllowFunc>,\n  eventClassNames: parseClassNames,\n  eventBackgroundColor: String,\n  eventBorderColor: String,\n  eventTextColor: String,\n  eventColor: String,\n}\n\ntype BuiltInResourceRefiners = typeof RESOURCE_REFINERS\n\nexport interface ResourceRefiners extends BuiltInResourceRefiners {\n  // for preventing circular definition. also, good for making ambient in the future\n}\n\nexport type ResourceInput =\n  RawOptionsFromRefiners<Required<ResourceRefiners>> & // Required hack\n  { [extendedProps: string]: any }\n\nexport interface Resource {\n  id: string\n  parentId: string\n  title: string\n  businessHours: EventStore | null // if null, will fall thru to non-resource business hours\n  ui: EventUi\n  extendedProps: { [extendedProp: string]: any }\n}\n\nexport type ResourceHash = { [resourceId: string]: Resource }\n\n/*\nneeds a full store so that it can populate children too\n*/\nexport function parseResource(raw: ResourceInput, parentId: string = '', store: ResourceHash, context: CalendarContext): Resource {\n  let { refined, extra } = refineProps(raw, RESOURCE_REFINERS)\n\n  let resource: Resource = {\n    id: refined.id || (PRIVATE_ID_PREFIX + guid()),\n    parentId: refined.parentId || parentId,\n    title: refined.title || '',\n    businessHours: refined.businessHours ? parseBusinessHours(refined.businessHours, context) : null,\n    ui: createEventUi({\n      editable: refined.eventEditable,\n      startEditable: refined.eventStartEditable,\n      durationEditable: refined.eventDurationEditable,\n      constraint: refined.eventConstraint,\n      overlap: refined.eventOverlap,\n      allow: refined.eventAllow,\n      classNames: refined.eventClassNames,\n      backgroundColor: refined.eventBackgroundColor,\n      borderColor: refined.eventBorderColor,\n      textColor: refined.eventTextColor,\n      color: refined.eventColor,\n    }, context),\n    extendedProps: {\n      ...extra,\n      ...refined.extendedProps,\n    },\n  }\n\n  // help out ResourceApi from having user modify props\n  Object.freeze(resource.ui.classNames)\n  Object.freeze(resource.extendedProps)\n\n  if (store[resource.id]) {\n    // console.warn('duplicate resource ID')\n\n  } else {\n    store[resource.id] = resource\n\n    if (refined.children) {\n      for (let childInput of refined.children) {\n        parseResource(childInput, resource.id, store, context)\n      }\n    }\n  }\n\n  return resource\n}\n\n/*\nTODO: use this in more places\n*/\nexport function getPublicId(id: string): string {\n  if (id.indexOf(PRIVATE_ID_PREFIX) === 0) {\n    return ''\n  }\n\n  return id\n}\n","import { CalendarContext } from '@fullcalendar/common'\nimport { ResourceAction } from './resource-action'\nimport { ResourceHash, ResourceInput, parseResource } from '../structs/resource'\nimport { ResourceSource } from '../structs/resource-source'\n\nexport function reduceResourceStore(\n  store: ResourceHash | null,\n  action: ResourceAction | null,\n  source: ResourceSource<any>,\n  context: CalendarContext,\n): ResourceHash {\n  if (!store || !action) {\n    return {}\n  }\n\n  switch (action.type) {\n    case 'RECEIVE_RESOURCES':\n      return receiveRawResources(store, action.rawResources, action.fetchId, source, context)\n\n    case 'ADD_RESOURCE':\n      return addResource(store, action.resourceHash)\n\n    case 'REMOVE_RESOURCE':\n      return removeResource(store, action.resourceId)\n\n    case 'SET_RESOURCE_PROP':\n      return setResourceProp(store, action.resourceId, action.propName, action.propValue)\n\n    case 'SET_RESOURCE_EXTENDED_PROP':\n      return setResourceExtendedProp(store, action.resourceId, action.propName, action.propValue)\n\n    default:\n      return store\n  }\n}\n\nfunction receiveRawResources(\n  existingStore: ResourceHash,\n  inputs: ResourceInput[],\n  fetchId: string,\n  source: ResourceSource<any>,\n  context: CalendarContext,\n): ResourceHash {\n  if (source.latestFetchId === fetchId) {\n    let nextStore: ResourceHash = {}\n\n    for (let input of inputs) {\n      parseResource(input, '', nextStore, context)\n    }\n\n    return nextStore\n  }\n\n  return existingStore\n}\n\nfunction addResource(existingStore: ResourceHash, additions: ResourceHash) {\n  // TODO: warn about duplicate IDs\n\n  return { ...existingStore, ...additions }\n}\n\nfunction removeResource(existingStore: ResourceHash, resourceId: string) {\n  let newStore = { ...existingStore } as ResourceHash\n\n  delete newStore[resourceId]\n\n  // promote children\n  for (let childResourceId in newStore) { // a child, *maybe* but probably not\n    if (newStore[childResourceId].parentId === resourceId) {\n      newStore[childResourceId] = {\n        ...newStore[childResourceId],\n        parentId: '',\n      }\n    }\n  }\n\n  return newStore\n}\n\nfunction setResourceProp(existingStore: ResourceHash, resourceId: string, name: string, value: any): ResourceHash {\n  let existingResource = existingStore[resourceId]\n\n  // TODO: sanitization\n\n  if (existingResource) {\n    return {\n      ...existingStore,\n      [resourceId]: {\n        ...existingResource,\n        [name]: value,\n      },\n    }\n  }\n\n  return existingStore\n}\n\nfunction setResourceExtendedProp(existingStore: ResourceHash, resourceId: string, name: string, value: any): ResourceHash {\n  let existingResource = existingStore[resourceId]\n\n  if (existingResource) {\n    return {\n      ...existingStore,\n      [resourceId]: {\n        ...existingResource,\n        extendedProps: {\n          ...existingResource.extendedProps,\n          [name]: value,\n        },\n      },\n    }\n  }\n\n  return existingStore\n}\n","import { EventRefined, identity, Identity } from '@fullcalendar/common'\n\nexport const EVENT_REFINERS = {\n  resourceId: String,\n  resourceIds: identity as Identity<string[]>,\n  resourceEditable: Boolean,\n}\n\nexport function generateEventDefResourceMembers(refined: EventRefined) {\n  return {\n    resourceIds: ensureStringArray(refined.resourceIds)\n      .concat(refined.resourceId ? [refined.resourceId] : []),\n    resourceEditable: refined.resourceEditable,\n  }\n}\n\nfunction ensureStringArray(items: any[]) {\n  return (items || []).map((item) => String(item))\n}\n","import { CalendarContext, EventApi, Dictionary } from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { Resource, getPublicId, ResourceHash } from '../structs/resource'\n\nexport class ResourceApi {\n  constructor(\n    private _context: CalendarContext,\n    public _resource: Resource,\n  ) {\n  }\n\n  setProp(name: string, value: any) {\n    let oldResource = this._resource\n\n    this._context.dispatch({\n      type: 'SET_RESOURCE_PROP',\n      resourceId: oldResource.id,\n      propName: name,\n      propValue: value,\n    })\n\n    this.sync(oldResource)\n  }\n\n  setExtendedProp(name: string, value: any) {\n    let oldResource = this._resource\n\n    this._context.dispatch({\n      type: 'SET_RESOURCE_EXTENDED_PROP',\n      resourceId: oldResource.id,\n      propName: name,\n      propValue: value,\n    })\n\n    this.sync(oldResource)\n  }\n\n  private sync(oldResource: Resource) {\n    let context = this._context\n    let resourceId = oldResource.id\n\n    // TODO: what if dispatch didn't complete synchronously?\n    this._resource = context.getCurrentData().resourceStore[resourceId]\n\n    context.emitter.trigger('resourceChange', {\n      oldResource: new ResourceApi(context, oldResource),\n      resource: this,\n      revert() {\n        context.dispatch({\n          type: 'ADD_RESOURCE', // function as a merge. TODO: rename\n          resourceHash: {\n            [resourceId]: oldResource,\n          },\n        })\n      },\n    })\n  }\n\n  remove() {\n    let context = this._context\n    let internalResource = this._resource\n    let resourceId = internalResource.id\n\n    context.dispatch({\n      type: 'REMOVE_RESOURCE',\n      resourceId,\n    })\n\n    context.emitter.trigger('resourceRemove', {\n      resource: this,\n      revert() {\n        context.dispatch({\n          type: 'ADD_RESOURCE', // function as a merge. TODO: rename\n          resourceHash: {\n            [resourceId]: internalResource,\n          },\n        })\n      },\n    })\n  }\n\n  getParent(): ResourceApi | null {\n    let context = this._context\n    let parentId = this._resource.parentId\n\n    if (parentId) {\n      return new ResourceApi(\n        context,\n        context.getCurrentData().resourceSource[parentId],\n      )\n    }\n\n    return null\n  }\n\n  getChildren(): ResourceApi[] {\n    let thisResourceId = this._resource.id\n    let context = this._context\n    let { resourceStore } = context.getCurrentData()\n    let childApis: ResourceApi[] = []\n\n    for (let resourceId in resourceStore) {\n      if (resourceStore[resourceId].parentId === thisResourceId) {\n        childApis.push(\n          new ResourceApi(context, resourceStore[resourceId]),\n        )\n      }\n    }\n\n    return childApis\n  }\n\n  /*\n  this is really inefficient!\n  TODO: make EventApi::resourceIds a hash or keep an index in the Calendar's state\n  */\n  getEvents(): EventApi[] {\n    let thisResourceId = this._resource.id\n    let context = this._context\n    let { defs, instances } = context.getCurrentData().eventStore\n    let eventApis: EventApi[] = []\n\n    for (let instanceId in instances) {\n      let instance = instances[instanceId]\n      let def = defs[instance.defId]\n\n      if (def.resourceIds.indexOf(thisResourceId) !== -1) { // inefficient!!!\n        eventApis.push(new EventApi(context, def, instance))\n      }\n    }\n\n    return eventApis\n  }\n\n  get id() { return getPublicId(this._resource.id) }\n  get title() { return this._resource.title }\n  get eventConstraint() { return this._resource.ui.constraints[0] || null }\n  get eventOverlap() { return this._resource.ui.overlap }\n  get eventAllow() { return this._resource.ui.allows[0] || null }\n  get eventBackgroundColor() { return this._resource.ui.backgroundColor }\n  get eventBorderColor() { return this._resource.ui.borderColor }\n  get eventTextColor() { return this._resource.ui.textColor }\n\n  // NOTE: user can't modify these because Object.freeze was called in event-def parsing\n  get eventClassNames() { return this._resource.ui.classNames }\n  get extendedProps() { return this._resource.extendedProps }\n\n  toPlainObject(settings: { collapseExtendedProps?: boolean, collapseEventColor?: boolean } = {}) {\n    let internal = this._resource\n    let { ui } = internal\n    let publicId = this.id\n    let res: Dictionary = {}\n\n    if (publicId) {\n      res.id = publicId\n    }\n\n    if (internal.title) {\n      res.title = internal.title\n    }\n\n    if (settings.collapseEventColor && ui.backgroundColor && ui.backgroundColor === ui.borderColor) {\n      res.eventColor = ui.backgroundColor\n    } else {\n      if (ui.backgroundColor) {\n        res.eventBackgroundColor = ui.backgroundColor\n      }\n      if (ui.borderColor) {\n        res.eventBorderColor = ui.borderColor\n      }\n    }\n\n    if (ui.textColor) {\n      res.eventTextColor = ui.textColor\n    }\n\n    if (ui.classNames.length) {\n      res.eventClassNames = ui.classNames\n    }\n\n    if (Object.keys(internal.extendedProps).length) {\n      if (settings.collapseExtendedProps) {\n        __assign(res, internal.extendedProps)\n      } else {\n        res.extendedProps = internal.extendedProps\n      }\n    }\n\n    return res\n  }\n\n  toJSON() {\n    return this.toPlainObject()\n  }\n}\n\nexport function buildResourceApis(resourceStore: ResourceHash, context: CalendarContext) {\n  let resourceApis: ResourceApi[] = []\n\n  for (let resourceId in resourceStore) {\n    resourceApis.push(new ResourceApi(context, resourceStore[resourceId]))\n  }\n\n  return resourceApis\n}\n","import { DateSpan, CalendarApi, CalendarContext } from '@fullcalendar/common'\nimport { ResourceApi } from './ResourceApi'\nimport { ResourceInput, parseResource, ResourceHash, Resource } from '../structs/resource'\n\nCalendarApi.prototype.addResource = function ( // eslint-disable-line func-names\n  this: CalendarApi,\n  input: ResourceInput | ResourceApi,\n  scrollTo = true,\n) {\n  let currentState = this.getCurrentData()\n  let resourceHash: ResourceHash\n  let resource: Resource\n\n  if (input instanceof ResourceApi) {\n    resource = input._resource\n    resourceHash = { [resource.id]: resource }\n  } else {\n    resourceHash = {}\n    resource = parseResource(input, '', resourceHash, currentState)\n  }\n\n  this.dispatch({\n    type: 'ADD_RESOURCE',\n    resourceHash,\n  })\n\n  if (scrollTo) {\n    // TODO: wait til dispatch completes somehow\n    this.trigger('_scrollRequest', { resourceId: resource.id })\n  }\n\n  let resourceApi = new ResourceApi(currentState, resource)\n\n  currentState.emitter.trigger('resourceAdd', {\n    resource: resourceApi,\n    revert: () => {\n      this.dispatch({\n        type: 'REMOVE_RESOURCE',\n        resourceId: resource.id,\n      })\n    },\n  })\n\n  return resourceApi\n}\n\nCalendarApi.prototype.getResourceById = function (this: CalendarApi, id: string) { // eslint-disable-line func-names\n  id = String(id)\n  let currentState = this.getCurrentData() // eslint-disable-line react/no-this-in-sfc\n\n  if (currentState.resourceStore) { // guard against calendar with no resource functionality\n    let rawResource = currentState.resourceStore[id]\n\n    if (rawResource) {\n      return new ResourceApi(currentState, rawResource)\n    }\n  }\n\n  return null\n}\n\nCalendarApi.prototype.getResources = function (this: CalendarApi): ResourceApi[] { // eslint-disable-line func-names\n  let currentState = this.getCurrentData()\n  let { resourceStore } = currentState\n  let resourceApis: ResourceApi[] = []\n\n  if (resourceStore) { // guard against calendar with no resource functionality\n    for (let resourceId in resourceStore) {\n      resourceApis.push(\n        new ResourceApi(currentState, resourceStore[resourceId]),\n      )\n    }\n  }\n\n  return resourceApis\n}\n\nCalendarApi.prototype.getTopLevelResources = function (this: CalendarApi): ResourceApi[] { // eslint-disable-line func-names\n  let currentState = this.getCurrentData()\n  let { resourceStore } = currentState\n  let resourceApis: ResourceApi[] = []\n\n  if (resourceStore) { // guard against calendar with no resource functionality\n    for (let resourceId in resourceStore) {\n      if (!resourceStore[resourceId].parentId) {\n        resourceApis.push(\n          new ResourceApi(currentState, resourceStore[resourceId]),\n        )\n      }\n    }\n  }\n\n  return resourceApis\n}\n\nCalendarApi.prototype.refetchResources = function (this: CalendarApi) { // eslint-disable-line func-names\n  this.dispatch({\n    type: 'REFETCH_RESOURCES',\n  })\n}\n\nexport function transformDatePoint(dateSpan: DateSpan, context: CalendarContext) {\n  return dateSpan.resourceId ?\n    { resource: context.calendarApi.getResourceById(dateSpan.resourceId) } :\n    {}\n}\n\nexport function transformDateSpan(dateSpan: DateSpan, context: CalendarContext) {\n  return dateSpan.resourceId ?\n    { resource: context.calendarApi.getResourceById(dateSpan.resourceId) } :\n    {}\n}\n","import { Splitter, SplittableProps, DateSpan, EventDef } from '@fullcalendar/common'\nimport { ResourceHash } from '../structs/resource'\n\nexport interface SplittableResourceProps extends SplittableProps {\n  resourceStore: ResourceHash\n}\n\n/*\nsplits things BASED OFF OF which resources they are associated with.\ncreates a '' entry which is when something has NO resource.\n*/\nexport class ResourceSplitter extends Splitter<SplittableResourceProps> {\n  getKeyInfo(props: SplittableResourceProps) {\n    return {\n      '': {}, // needed for non-resource\n      ...props.resourceStore, // already has `ui` and `businessHours` keys!\n    }\n  }\n\n  getKeysForDateSpan(dateSpan: DateSpan): string[] {\n    return [dateSpan.resourceId || '']\n  }\n\n  getKeysForEventDef(eventDef: EventDef): string[] {\n    let resourceIds = eventDef.resourceIds\n\n    if (!resourceIds.length) {\n      return ['']\n    }\n\n    return resourceIds\n  }\n}\n","import { SplittableProps, EventUi, isPropsValid, Constraint, EventStore, mergeEventStores, CalendarContext } from '@fullcalendar/common'\nimport { ResourceSplitter } from './common/ResourceSplitter'\n\nexport function isPropsValidWithResources(combinedProps: SplittableProps, context: CalendarContext): boolean {\n  let splitter = new ResourceSplitter()\n\n  let sets = splitter.splitProps({\n    ...combinedProps,\n    resourceStore: context.getCurrentData().resourceStore,\n  })\n\n  for (let resourceId in sets) {\n    let props = sets[resourceId]\n\n    // merge in event data from the non-resource segment\n    if (resourceId && sets['']) { // current segment is not the non-resource one, and there IS a non-resource one\n      props = {\n        ...props,\n        eventStore: mergeEventStores(sets[''].eventStore, props.eventStore),\n        eventUiBases: { ...sets[''].eventUiBases, ...props.eventUiBases },\n      }\n    }\n\n    if (!isPropsValid(props, context, { resourceId }, filterConfig.bind(null, resourceId))) {\n      return false\n    }\n  }\n\n  return true\n}\n\nfunction filterConfig(resourceId, config: EventUi) {\n  return {\n    ...config,\n    constraints: filterConstraints(resourceId, config.constraints),\n  }\n}\n\nfunction filterConstraints(resourceId: string, constraints: Constraint[]) {\n  return constraints.map((constraint) => {\n    let defs = (constraint as EventStore).defs\n    if (defs) { // we are dealing with an EventStore\n      // if any of the events define constraints to resources that are NOT this resource,\n      // then this resource is unconditionally prohibited, which is what a `false` value does.\n      for (let defId in defs) {\n        let resourceIds = defs[defId].resourceIds\n        if (resourceIds.length && resourceIds.indexOf(resourceId) === -1) { // TODO: use a hash?!!! (for other reasons too)\n          return false\n        }\n      }\n    }\n\n    return constraint\n  })\n}\n","import { EventApi } from '@fullcalendar/common'\nimport { ResourceApi } from './ResourceApi'\n\nEventApi.prototype.getResources = function (this: EventApi): ResourceApi[] { // eslint-disable-line func-names\n  let { calendarApi } = this._context\n\n  return this._def.resourceIds.map((resourceId) => calendarApi.getResourceById(resourceId))\n}\n\nEventApi.prototype.setResources = function ( // eslint-disable-line func-names\n  this: EventApi,\n  resources: (string | ResourceApi)[],\n) {\n  let resourceIds = []\n\n  // massage resources -> resourceIds\n  for (let resource of resources) {\n    let resourceId = null\n\n    if (typeof resource === 'string') {\n      resourceId = resource\n    } else if (typeof resource === 'number') {\n      resourceId = String(resource)\n    } else if (resource instanceof ResourceApi) {\n      resourceId = resource.id // guaranteed to always have an ID. hmmm\n    } else {\n      console.warn('unknown resource type: ' + resource)\n    }\n\n    if (resourceId) {\n      resourceIds.push(resourceId)\n    }\n  }\n\n  this.mutate({\n    standardProps: {\n      resourceIds,\n    },\n  })\n}\n","import { CalendarContext } from '@fullcalendar/common'\n\nexport const optionChangeHandlers = {\n  resources: handleResources,\n}\n\nfunction handleResources(newSourceInput, context: CalendarContext) {\n  let oldSourceInput = context.getCurrentData().resourceSource._raw\n\n  if (oldSourceInput !== newSourceInput) {\n    context.dispatch({\n      type: 'RESET_RESOURCE_SOURCE',\n      resourceSourceInput: newSourceInput,\n    })\n  }\n}\n","import { CalendarData, parseFieldSpecs } from '@fullcalendar/common'\nimport { buildResourceApis, ResourceApi } from './api/ResourceApi'\nimport { ResourceHash } from './structs/resource'\n\nexport const DEFAULT_RESOURCE_ORDER = parseFieldSpecs('id,title')\n\nexport interface ResourceAddArg {\n  resource: ResourceApi\n  revert: () => void\n}\n\nexport interface ResourceChangeArg {\n  oldResource: ResourceApi\n  resource: ResourceApi\n  revert: () => void\n}\n\nexport interface ResourceRemoveArg {\n  resource: ResourceApi\n  revert: () => void\n}\n\nexport function handleResourceStore(resourceStore: ResourceHash, calendarData: CalendarData) {\n  let { emitter } = calendarData\n\n  if (emitter.hasHandlers('resourcesSet')) {\n    emitter.trigger('resourcesSet', buildResourceApis(resourceStore, calendarData))\n  }\n}\n","import {\n  Identity, CssDimValue, ClassNamesGenerator, CustomContentGenerator, DidMountHandler, WillUnmountHandler,\n  identity, parseFieldSpecs,\n} from '@fullcalendar/common'\n\n// public\nimport {\n  ResourceSourceInput,\n  ResourceLabelContentArg, ResourceLabelMountArg,\n  ColSpec,\n  ColHeaderContentArg, ColHeaderMountArg,\n  ColCellContentArg, ColCellMountArg,\n  ResourceLaneContentArg, ResourceLaneMountArg,\n  ResourceApi,\n  ResourceAddArg, ResourceChangeArg, ResourceRemoveArg,\n} from './api-type-deps'\n\nexport const OPTION_REFINERS = {\n  initialResources: identity as Identity<ResourceSourceInput>,\n  resources: identity as Identity<ResourceSourceInput>,\n\n  eventResourceEditable: Boolean,\n  refetchResourcesOnNavigate: Boolean,\n  resourceOrder: parseFieldSpecs,\n  filterResourcesWithEvents: Boolean,\n  resourceGroupField: String,\n  resourceAreaWidth: identity as Identity<CssDimValue>,\n  resourceAreaColumns: identity as Identity<ColSpec[]>,\n  resourcesInitiallyExpanded: Boolean,\n  datesAboveResources: Boolean,\n  needsResourceData: Boolean, // internal-only\n\n  resourceAreaHeaderClassNames: identity as Identity<ClassNamesGenerator<ColHeaderContentArg>>,\n  resourceAreaHeaderContent: identity as Identity<CustomContentGenerator<ColHeaderContentArg>>,\n  resourceAreaHeaderDidMount: identity as Identity<DidMountHandler<ColHeaderMountArg>>,\n  resourceAreaHeaderWillUnmount: identity as Identity<WillUnmountHandler<ColHeaderMountArg>>,\n\n  resourceGroupLabelClassNames: identity as Identity<ClassNamesGenerator<ColCellContentArg>>,\n  resourceGroupLabelContent: identity as Identity<CustomContentGenerator<ColCellContentArg>>,\n  resourceGroupLabelDidMount: identity as Identity<DidMountHandler<ColCellMountArg>>,\n  resourceGroupLabelWillUnmount: identity as Identity<WillUnmountHandler<ColCellMountArg>>,\n\n  resourceLabelClassNames: identity as Identity<ClassNamesGenerator<ResourceLabelContentArg>>,\n  resourceLabelContent: identity as Identity<CustomContentGenerator<ResourceLabelContentArg>>,\n  resourceLabelDidMount: identity as Identity<DidMountHandler<ResourceLabelMountArg>>,\n  resourceLabelWillUnmount: identity as Identity<WillUnmountHandler<ResourceLabelMountArg>>,\n\n  resourceLaneClassNames: identity as Identity<ClassNamesGenerator<ResourceLaneContentArg>>,\n  resourceLaneContent: identity as Identity<CustomContentGenerator<ResourceLaneContentArg>>,\n  resourceLaneDidMount: identity as Identity<DidMountHandler<ResourceLaneMountArg>>,\n  resourceLaneWillUnmount: identity as Identity<WillUnmountHandler<ResourceLaneMountArg>>,\n\n  resourceGroupLaneClassNames: identity as Identity<ClassNamesGenerator<ColCellContentArg>>,\n  resourceGroupLaneContent: identity as Identity<CustomContentGenerator<ColCellContentArg>>,\n  resourceGroupLaneDidMount: identity as Identity<DidMountHandler<ColCellMountArg>>,\n  resourceGroupLaneWillUnmount: identity as Identity<WillUnmountHandler<ColCellMountArg>>,\n}\n\nexport const LISTENER_REFINERS = {\n  resourcesSet: identity as Identity<(resources: ResourceApi[]) => void>,\n  resourceAdd: identity as Identity<(arg: ResourceAddArg) => void>,\n  resourceChange: identity as Identity<(arg: ResourceChangeArg) => void>,\n  resourceRemove: identity as Identity<(arg: ResourceRemoveArg) => void>,\n}\n","import {\n  createElement, Ref, ComponentChildren, ViewContextType, ViewContext, RenderHook,\n  ViewApi, formatDayString, Dictionary, MountArg,\n} from '@fullcalendar/common'\nimport { Resource } from '../structs/resource'\nimport { ResourceApi } from '../api/ResourceApi'\n\nexport interface ResourceLabelRootProps {\n  resource: Resource\n  date?: Date\n  children: (\n    rootElRef: Ref<HTMLElement>,\n    classNames: string[],\n    dataAttrs: Dictionary,\n    innerElRef: Ref<HTMLElement>,\n    innerContent: ComponentChildren\n  ) => ComponentChildren\n}\n\nexport interface ResourceLabelContentArg {\n  resource: ResourceApi\n  date?: Date\n  view: ViewApi\n}\n\nexport type ResourceLabelMountArg = MountArg<ResourceLabelContentArg>\n\n// TODO: not used for Spreadsheet. START USING. difficult because of col-specific rendering props\n\nexport function ResourceLabelRoot(props: ResourceLabelRootProps) {\n  return (\n    <ViewContextType.Consumer>\n      {(context: ViewContext) => {\n        let { options } = context\n        let hookProps: ResourceLabelContentArg = {\n          resource: new ResourceApi(context, props.resource),\n          date: props.date ? context.dateEnv.toDate(props.date) : null,\n          view: context.viewApi,\n        }\n\n        let dataAttrs = {\n          'data-resource-id': props.resource.id, // TODO: only do public-facing one?\n          'data-date': props.date ? formatDayString(props.date) : undefined,\n        }\n\n        return (\n          <RenderHook<ResourceLabelContentArg>\n            hookProps={hookProps}\n            classNames={options.resourceLabelClassNames}\n            content={options.resourceLabelContent}\n            defaultContent={renderInnerContent}\n            didMount={options.resourceLabelDidMount}\n            willUnmount={options.resourceLabelWillUnmount}\n          >\n            {(rootElRef, classNames, innerElRef, innerContent) => props.children(\n              rootElRef,\n              classNames, // TODO: pass in 'fc-resource' ?\n              dataAttrs,\n              innerElRef,\n              innerContent,\n            )}\n          </RenderHook>\n        )\n      }}\n    </ViewContextType.Consumer>\n  )\n}\n\nfunction renderInnerContent(props: ResourceLabelContentArg) {\n  return props.resource.title || props.resource.id\n}\n","import { registerResourceSourceDef } from '../structs/resource-source-def'\nimport { ResourceInput } from '../structs/resource'\nimport { ResourceSourceRefined } from '../structs/resource-source-parse'\n\nregisterResourceSourceDef<ResourceInput[]>({\n\n  ignoreRange: true,\n\n  parseMeta(refined: ResourceSourceRefined) {\n    if (Array.isArray(refined.resources)) {\n      return refined.resources\n    }\n    return null\n  },\n\n  fetch(arg, successCallback) {\n    successCallback({\n      rawResources: arg.resourceSource.meta,\n    })\n  },\n\n})\n","import { unpromisify } from '@fullcalendar/common'\nimport { ResourceSourceError } from '../structs/resource-source'\nimport { registerResourceSourceDef } from '../structs/resource-source-def'\nimport { ResourceInput } from '../structs/resource'\nimport { ResourceSourceRefined } from '../structs/resource-source-parse'\n\nexport interface ResourceFuncArg {\n  start?: Date\n  end?: Date\n  startStr?: string\n  endStr?: string\n  timeZone?: string\n}\n\nexport type ResourceFunc = (\n  arg: ResourceFuncArg,\n  successCallback: (events: ResourceInput[]) => void,\n  failureCallback: (errorObj: ResourceSourceError) => void\n) => any // TODO: promise-like object or nothing\n\nregisterResourceSourceDef<ResourceFunc>({\n\n  parseMeta(refined: ResourceSourceRefined) {\n    if (typeof refined.resources === 'function') {\n      return refined.resources\n    }\n    return null\n  },\n\n  fetch(arg, success, failure) {\n    let dateEnv = arg.context.dateEnv\n    let func = arg.resourceSource.meta\n\n    let publicArg: ResourceFuncArg = arg.range ? {\n      start: dateEnv.toDate(arg.range.start),\n      end: dateEnv.toDate(arg.range.end),\n      startStr: dateEnv.formatIso(arg.range.start),\n      endStr: dateEnv.formatIso(arg.range.end),\n      timeZone: dateEnv.timeZone,\n    } : {}\n\n    // TODO: make more dry with EventSourceFunc\n    // TODO: accept a response?\n    unpromisify(\n      func.bind(null, publicArg),\n      (rawResources) => { // success\n        success({ rawResources }) // needs an object response\n      },\n      failure, // send errorObj directly to failure callback\n    )\n  },\n\n})\n","import { DateRange, CalendarContext, requestJson, Dictionary } from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { registerResourceSourceDef } from '../structs/resource-source-def'\nimport { ResourceSourceRefined } from '../structs/resource-source-parse'\n\ninterface JsonFeedMeta {\n  url: string\n  method: string\n  startParam?: string\n  endParam?: string\n  timeZoneParam?: string\n  extraParams?: Dictionary | (() => Dictionary)\n}\n\nregisterResourceSourceDef<JsonFeedMeta>({\n\n  parseMeta(refined: ResourceSourceRefined) {\n    if (refined.url) {\n      return {\n        url: refined.url,\n        method: (refined.method || 'GET').toUpperCase(),\n        extraParams: refined.extraParams,\n      }\n    }\n    return null\n  },\n\n  fetch(arg, successCallback, failureCallback) {\n    let meta = arg.resourceSource.meta\n    let requestParams = buildRequestParams(meta, arg.range, arg.context)\n\n    requestJson(meta.method, meta.url, requestParams, (rawResources, xhr) => {\n      successCallback({ rawResources, xhr })\n    }, (message, xhr) => {\n      failureCallback({ message, xhr })\n    })\n  },\n\n})\n\n// TODO: somehow consolidate with event json feed\nfunction buildRequestParams(meta: JsonFeedMeta, range: DateRange | null, context: CalendarContext) {\n  let { dateEnv, options } = context\n  let startParam\n  let endParam\n  let timeZoneParam\n  let customRequestParams\n  let params = {}\n\n  if (range) {\n    startParam = meta.startParam\n    if (startParam == null) {\n      startParam = options.startParam\n    }\n\n    endParam = meta.endParam\n    if (endParam == null) {\n      endParam = options.endParam\n    }\n\n    timeZoneParam = meta.timeZoneParam\n    if (timeZoneParam == null) {\n      timeZoneParam = options.timeZoneParam\n    }\n\n    params[startParam] = dateEnv.formatIso(range.start)\n    params[endParam] = dateEnv.formatIso(range.end)\n\n    if (dateEnv.timeZone !== 'local') {\n      params[timeZoneParam] = dateEnv.timeZone\n    }\n  }\n\n  // retrieve any outbound GET/POST data from the options\n  if (typeof meta.extraParams === 'function') {\n    // supplied as a function that returns a key/value object\n    customRequestParams = meta.extraParams()\n  } else {\n    // probably supplied as a straight key/value object\n    customRequestParams = meta.extraParams || {}\n  }\n\n  __assign(params, customRequestParams)\n\n  return params\n}\n","import { createElement, BaseComponent, DateMarker, Ref, ComponentChildren } from '@fullcalendar/common'\nimport { Resource } from '../structs/resource'\nimport { ResourceLabelRoot } from './ResourceLabelRoot'\n\nexport interface ResourceCellProps {\n  resource: Resource\n  colSpan: number\n  date?: DateMarker\n  isSticky?: boolean\n}\n\nexport class ResourceCell extends BaseComponent<ResourceCellProps> {\n  render() {\n    let { props } = this\n\n    return (\n      <ResourceLabelRoot resource={props.resource} date={props.date}>\n        {(elRef: Ref<HTMLTableCellElement>, customClassNames: string[], dataAttrs, innerElRef, innerContent: ComponentChildren) => (\n          <th\n            ref={elRef}\n            role=\"columnheader\"\n            className={['fc-col-header-cell', 'fc-resource'].concat(customClassNames).join(' ')}\n            colSpan={props.colSpan}\n            {...dataAttrs}\n          >\n            <div className=\"fc-scrollgrid-sync-inner\">\n              <span\n                className={[\n                  'fc-col-header-cell-cushion',\n                  props.isSticky ? 'fc-sticky' : '',\n                ].join(' ')}\n                ref={innerElRef}\n              >\n                {innerContent}\n              </span>\n            </div>\n          </th>\n        )}\n      </ResourceLabelRoot>\n    )\n  }\n}\n","import {\n  VNode, createElement, TableDowCell, memoize, BaseComponent,\n  DateMarker, DateFormatter, computeFallbackHeaderFormat, TableDateCell, Fragment,\n  DateRange, NowTimer, DateProfile,\n} from '@fullcalendar/common'\nimport { Resource } from '../structs/resource'\nimport { ResourceApi } from '../api/ResourceApi'\nimport { ResourceCell } from './ResourceCell'\n\nexport interface ResourceDayHeaderProps {\n  dates: DateMarker[]\n  dateProfile: DateProfile\n  datesRepDistinctDays: boolean\n  resources: Resource[] // flattened\n  renderIntro?: (rowKey: string) => VNode\n}\n\nexport class ResourceDayHeader extends BaseComponent<ResourceDayHeaderProps> { // TODO: rename to ResourceDayHeaderTrs?\n  private buildDateFormat = memoize(buildDateFormat)\n\n  render() {\n    let { props, context } = this\n    let dateFormat = this.buildDateFormat(\n      context.options.dayHeaderFormat,\n      props.datesRepDistinctDays,\n      props.dates.length,\n    )\n\n    return (\n      <NowTimer unit=\"day\">\n        {(nowDate: DateMarker, todayRange: DateRange) => {\n          if (props.dates.length === 1) {\n            return this.renderResourceRow(props.resources, props.dates[0])\n          }\n          if (context.options.datesAboveResources) {\n            return this.renderDayAndResourceRows(props.dates, dateFormat, todayRange, props.resources)\n          }\n          return this.renderResourceAndDayRows(props.resources, props.dates, dateFormat, todayRange)\n        }}\n      </NowTimer>\n    )\n  }\n\n  renderResourceRow(resources: Resource[], date: DateMarker) {\n    let resourceCells = resources.map((resource) => (\n      <ResourceCell\n        key={resource.id}\n        resource={resource}\n        colSpan={1}\n        date={date}\n      />\n    ))\n    return this.buildTr(resourceCells, 'resources')\n  }\n\n  renderDayAndResourceRows(dates: DateMarker[], dateFormat: DateFormatter, todayRange: DateRange, resources: Resource[]) {\n    let dateCells: VNode[] = []\n    let resourceCells: VNode[] = []\n\n    for (let date of dates) {\n      dateCells.push(\n        this.renderDateCell(date, dateFormat, todayRange, resources.length, null, true),\n      )\n\n      for (let resource of resources) {\n        resourceCells.push(\n          <ResourceCell\n            key={resource.id + ':' + date.toISOString()}\n            resource={resource}\n            colSpan={1}\n            date={date}\n          />,\n        )\n      }\n    }\n\n    return (\n      <Fragment>\n        {this.buildTr(dateCells, 'day')}\n        {this.buildTr(resourceCells, 'resources')}\n      </Fragment>\n    )\n  }\n\n  renderResourceAndDayRows(resources: Resource[], dates: DateMarker[], dateFormat: DateFormatter, todayRange: DateRange) {\n    let resourceCells: VNode[] = []\n    let dateCells: VNode[] = []\n\n    for (let resource of resources) {\n      resourceCells.push(\n        <ResourceCell\n          key={resource.id}\n          resource={resource}\n          colSpan={dates.length}\n          isSticky\n        />,\n      )\n\n      for (let date of dates) {\n        dateCells.push(\n          this.renderDateCell(date, dateFormat, todayRange, 1, resource),\n        )\n      }\n    }\n\n    return (\n      <Fragment>\n        {this.buildTr(resourceCells, 'resources')}\n        {this.buildTr(dateCells, 'day')}\n      </Fragment>\n    )\n  }\n\n  // a cell with date text. might have a resource associated with it\n  renderDateCell(\n    date: DateMarker,\n    dateFormat: DateFormatter,\n    todayRange: DateRange,\n    colSpan: number,\n    resource?: Resource,\n    isSticky?: boolean,\n  ) {\n    let { props } = this\n    let keyPostfix = resource ? `:${resource.id}` : ''\n    let extraHookProps = resource ? { resource: new ResourceApi(this.context, resource) } : {}\n    let extraDataAttrs = resource ? { 'data-resource-id': resource.id } : {}\n\n    return props.datesRepDistinctDays ? (\n      <TableDateCell\n        key={date.toISOString() + keyPostfix}\n        date={date}\n        dateProfile={props.dateProfile}\n        todayRange={todayRange}\n        colCnt={props.dates.length * props.resources.length}\n        dayHeaderFormat={dateFormat}\n        colSpan={colSpan}\n        isSticky={isSticky}\n        extraHookProps={extraHookProps}\n        extraDataAttrs={extraDataAttrs}\n      />\n    ) : (\n      <TableDowCell // we can't leverage the pure-componentness becausae the extra* props are new every time :(\n        key={date.getUTCDay() + keyPostfix}\n        dow={date.getUTCDay()}\n        dayHeaderFormat={dateFormat}\n        colSpan={colSpan}\n        isSticky={isSticky}\n        extraHookProps={extraHookProps}\n        extraDataAttrs={extraDataAttrs}\n      />\n    )\n  }\n\n  buildTr(cells: VNode[], key: string) {\n    let { renderIntro } = this.props\n\n    if (!cells.length) {\n      cells = [<td key={0}>&nbsp;</td>]\n    }\n\n    return (\n      <tr key={key} role=\"row\">\n        {renderIntro && renderIntro(key)}\n        {cells}\n      </tr>\n    )\n  }\n}\n\nfunction buildDateFormat(dayHeaderFormat: DateFormatter, datesRepDistinctDays, dayCnt) {\n  return dayHeaderFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt)\n}\n","import { Resource } from '../structs/resource'\n\nexport class ResourceIndex {\n  indicesById: { [resourceId: string]: number }\n  ids: string[]\n  length: number\n\n  constructor(resources: Resource[]) {\n    let indicesById = {}\n    let ids = []\n\n    for (let i = 0; i < resources.length; i += 1) {\n      let id = resources[i].id\n\n      ids.push(id)\n      indicesById[id] = i\n    }\n\n    this.ids = ids\n    this.indicesById = indicesById\n    this.length = resources.length\n  }\n}\n","import { CalendarContext, DayTableModel, DayTableCell } from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { Resource } from '../structs/resource'\nimport { ResourceApi } from '../api/ResourceApi'\nimport { ResourceIndex } from './ResourceIndex'\n\nexport abstract class AbstractResourceDayTableModel {\n  cells: DayTableCell[][]\n  rowCnt: number\n  colCnt: number\n  resourceIndex: ResourceIndex\n\n  constructor(\n    public dayTableModel: DayTableModel,\n    public resources: Resource[],\n    private context: CalendarContext,\n  ) {\n    this.resourceIndex = new ResourceIndex(resources)\n    this.rowCnt = dayTableModel.rowCnt\n    this.colCnt = dayTableModel.colCnt * resources.length\n    this.cells = this.buildCells()\n  }\n\n  abstract computeCol(dateI, resourceI): number\n  abstract computeColRanges(dateStartI, dateEndI, resourceI): {\n    firstCol: number,\n    lastCol: number,\n    isStart: boolean,\n    isEnd: boolean\n  }[]\n\n  buildCells(): DayTableCell[][] {\n    let { rowCnt, dayTableModel, resources } = this\n    let rows: DayTableCell[][] = []\n\n    for (let row = 0; row < rowCnt; row += 1) {\n      let rowCells: DayTableCell[] = []\n\n      for (let dateCol = 0; dateCol < dayTableModel.colCnt; dateCol += 1) {\n        for (let resourceCol = 0; resourceCol < resources.length; resourceCol += 1) {\n          let resource = resources[resourceCol]\n          let extraHookProps = { resource: new ResourceApi(this.context, resource) }\n          let extraDataAttrs = { 'data-resource-id': resource.id }\n          let extraClassNames = ['fc-resource']\n          let extraDateSpan = { resourceId: resource.id }\n          let date = dayTableModel.cells[row][dateCol].date\n\n          rowCells[\n            this.computeCol(dateCol, resourceCol)\n          ] = {\n            key: resource.id + ':' + date.toISOString(),\n            date,\n            extraHookProps,\n            extraDataAttrs,\n            extraClassNames,\n            extraDateSpan,\n          }\n        }\n      }\n\n      rows.push(rowCells)\n    }\n\n    return rows\n  }\n}\n","import { SlicedProps, Seg, memoize, EventSegUiInteractionState } from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { AbstractResourceDayTableModel } from './AbstractResourceDayTableModel'\n\nconst NO_SEGS = [] // for memoizing\n\nexport abstract class VResourceJoiner<SegType extends Seg> {\n  private joinDateSelection = memoize(this.joinSegs)\n  private joinBusinessHours = memoize(this.joinSegs)\n  private joinFgEvents = memoize(this.joinSegs)\n  private joinBgEvents = memoize(this.joinSegs)\n  private joinEventDrags = memoize(this.joinInteractions)\n  private joinEventResizes = memoize(this.joinInteractions)\n\n  /*\n  propSets also has a '' key for things with no resource\n  */\n  joinProps(\n    propSets: { [resourceId: string]: SlicedProps<SegType> },\n    resourceDayTable: AbstractResourceDayTableModel,\n  ): SlicedProps<SegType> {\n    let dateSelectionSets = []\n    let businessHoursSets = []\n    let fgEventSets = []\n    let bgEventSets = []\n    let eventDrags = []\n    let eventResizes = []\n    let eventSelection = ''\n    let keys = resourceDayTable.resourceIndex.ids.concat(['']) // add in the all-resource key\n\n    for (let key of keys) {\n      let props = propSets[key]\n\n      dateSelectionSets.push(props.dateSelectionSegs)\n      businessHoursSets.push(key ? props.businessHourSegs : NO_SEGS) // don't include redundant all-resource businesshours\n      fgEventSets.push(key ? props.fgEventSegs : NO_SEGS) // don't include fg all-resource segs\n      bgEventSets.push(props.bgEventSegs)\n      eventDrags.push(props.eventDrag)\n      eventResizes.push(props.eventResize)\n      eventSelection = eventSelection || props.eventSelection\n    }\n\n    return {\n      dateSelectionSegs: this.joinDateSelection(resourceDayTable, ...dateSelectionSets),\n      businessHourSegs: this.joinBusinessHours(resourceDayTable, ...businessHoursSets),\n      fgEventSegs: this.joinFgEvents(resourceDayTable, ...fgEventSets),\n      bgEventSegs: this.joinBgEvents(resourceDayTable, ...bgEventSets),\n      eventDrag: this.joinEventDrags(resourceDayTable, ...eventDrags),\n      eventResize: this.joinEventResizes(resourceDayTable, ...eventResizes),\n      eventSelection,\n    }\n  }\n\n  joinSegs(resourceDayTable: AbstractResourceDayTableModel, ...segGroups: SegType[][]): SegType[] {\n    let resourceCnt = resourceDayTable.resources.length\n    let transformedSegs = []\n\n    for (let i = 0; i < resourceCnt; i += 1) {\n      for (let seg of segGroups[i]) {\n        transformedSegs.push(\n          ...this.transformSeg(seg, resourceDayTable, i),\n        )\n      }\n\n      for (let seg of segGroups[resourceCnt]) { // one beyond. the all-resource\n        transformedSegs.push(\n          ...this.transformSeg(seg, resourceDayTable, i),\n        )\n      }\n    }\n\n    return transformedSegs\n  }\n\n  /*\n  for expanding non-resource segs to all resources.\n  only for public use.\n  no memoizing.\n  */\n  expandSegs(resourceDayTable: AbstractResourceDayTableModel, segs: SegType[]) {\n    let resourceCnt = resourceDayTable.resources.length\n    let transformedSegs = []\n\n    for (let i = 0; i < resourceCnt; i += 1) {\n      for (let seg of segs) {\n        transformedSegs.push(\n          ...this.transformSeg(seg, resourceDayTable, i),\n        )\n      }\n    }\n\n    return transformedSegs\n  }\n\n  joinInteractions(\n    resourceDayTable: AbstractResourceDayTableModel,\n    ...interactions: EventSegUiInteractionState[]\n  ): EventSegUiInteractionState | null {\n    let resourceCnt = resourceDayTable.resources.length\n    let affectedInstances = {}\n    let transformedSegs = []\n    let anyInteractions = false\n    let isEvent = false\n\n    for (let i = 0; i < resourceCnt; i += 1) {\n      let interaction = interactions[i]\n\n      if (interaction) {\n        anyInteractions = true\n\n        for (let seg of interaction.segs) {\n          transformedSegs.push(\n            ...this.transformSeg(seg as SegType, resourceDayTable, i), // TODO: templateify Interaction::segs\n          )\n        }\n\n        __assign(affectedInstances, interaction.affectedInstances)\n        isEvent = isEvent || interaction.isEvent\n      }\n\n      if (interactions[resourceCnt]) { // one beyond. the all-resource\n        for (let seg of interactions[resourceCnt].segs) {\n          transformedSegs.push(\n            ...this.transformSeg(seg as SegType, resourceDayTable, i), // TODO: templateify Interaction::segs\n          )\n        }\n      }\n    }\n\n    if (anyInteractions) {\n      return {\n        affectedInstances,\n        segs: transformedSegs,\n        isEvent,\n      }\n    }\n\n    return null\n  }\n\n  // needs to generate NEW seg obj!!! because of .el\n  abstract transformSeg(seg: SegType, resourceDayTable: AbstractResourceDayTableModel, resourceI: number): SegType[]\n}\n","import { __assign } from 'tslib'\nimport { AbstractResourceDayTableModel } from './AbstractResourceDayTableModel'\n\n/*\nresources over dates\n*/\nexport class ResourceDayTableModel extends AbstractResourceDayTableModel {\n  computeCol(dateI, resourceI) {\n    return resourceI * this.dayTableModel.colCnt + dateI\n  }\n\n  /*\n  all date ranges are intact\n  */\n  computeColRanges(dateStartI, dateEndI, resourceI) {\n    return [\n      {\n        firstCol: this.computeCol(dateStartI, resourceI),\n        lastCol: this.computeCol(dateEndI, resourceI),\n        isStart: true,\n        isEnd: true,\n      },\n    ]\n  }\n}\n","import { __assign } from 'tslib'\nimport { AbstractResourceDayTableModel } from './AbstractResourceDayTableModel'\n\n/*\ndates over resources\n*/\nexport class DayResourceTableModel extends AbstractResourceDayTableModel {\n  computeCol(dateI, resourceI) {\n    return dateI * this.resources.length + resourceI\n  }\n\n  /*\n  every single day is broken up\n  */\n  computeColRanges(dateStartI, dateEndI, resourceI) {\n    let segs = []\n\n    for (let i = dateStartI; i <= dateEndI; i += 1) {\n      let col = this.computeCol(i, resourceI)\n\n      segs.push({\n        firstCol: col,\n        lastCol: col,\n        isStart: i === dateStartI,\n        isEnd: i === dateEndI,\n      })\n    }\n\n    return segs\n  }\n}\n","import { EventDef, mapHash, Splitter, SplittableProps, DateSpan } from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { AbstractResourceDayTableModel } from './AbstractResourceDayTableModel'\n\n// splitter\n\nexport interface VResourceProps extends SplittableProps {\n  resourceDayTableModel: AbstractResourceDayTableModel\n}\n\n/*\nTODO: just use ResourceHash somehow? could then use the generic ResourceSplitter\n*/\nexport class VResourceSplitter extends Splitter<VResourceProps> {\n  getKeyInfo(props: VResourceProps) {\n    let { resourceDayTableModel } = props\n\n    let hash = mapHash(\n      resourceDayTableModel.resourceIndex.indicesById,\n      (i) => resourceDayTableModel.resources[i], // has `ui` AND `businessHours` keys!\n    ) as any // :(\n\n    hash[''] = {}\n\n    return hash\n  }\n\n  getKeysForDateSpan(dateSpan: DateSpan): string[] {\n    return [dateSpan.resourceId || '']\n  }\n\n  getKeysForEventDef(eventDef: EventDef): string[] {\n    let resourceIds = eventDef.resourceIds\n\n    if (!resourceIds.length) {\n      return ['']\n    }\n\n    return resourceIds\n  }\n}\n","import { flexibleCompare, compareByFieldSpecs, OrderSpec } from '@fullcalendar/common'\nimport { ResourceHash, Resource } from '../structs/resource'\nimport { ResourceEntityExpansions } from '../reducers/resourceEntityExpansions'\nimport { GroupSpec } from './resource-spec'\nimport { ResourceApi } from '../api/ResourceApi'\n\ninterface ParentNode {\n  children: ParentNode[]\n}\n\ninterface ResourceParentNode extends ParentNode {\n  resource: Resource\n  resourceFields: any\n}\n\ntype ResourceNodeHash = { [resourceId: string]: ResourceParentNode }\n\ninterface GroupParentNode extends ParentNode {\n  group: Group\n}\n\nexport interface Group {\n  value: any\n  spec: GroupSpec\n}\n\nexport interface GroupNode {\n  id: string // 'field:value'\n  isExpanded: boolean\n  group: Group\n}\n\nexport interface ResourceNode {\n  id: string // 'resourceId' (won't collide with group ID's because has colon)\n  rowSpans: number[]\n  depth: number\n  isExpanded: boolean\n  hasChildren: boolean\n  resource: Resource\n  resourceFields: any\n}\n\n/*\ndoesn't accept grouping\n*/\nexport function flattenResources(resourceStore: ResourceHash, orderSpecs: OrderSpec<ResourceApi>[]): Resource[] {\n  return buildRowNodes(resourceStore, [], orderSpecs, false, {}, true)\n    .map((node) => (node as ResourceNode).resource)\n}\n\nexport function buildRowNodes(\n  resourceStore: ResourceHash,\n  groupSpecs: GroupSpec[],\n  orderSpecs: OrderSpec<ResourceApi>[],\n  isVGrouping: boolean,\n  expansions: ResourceEntityExpansions,\n  expansionDefault: boolean,\n): (GroupNode | ResourceNode)[] {\n  let complexNodes = buildHierarchy(resourceStore, isVGrouping ? -1 : 1, groupSpecs, orderSpecs)\n  let flatNodes = []\n\n  flattenNodes(complexNodes, flatNodes, isVGrouping, [], 0, expansions, expansionDefault)\n\n  return flatNodes\n}\n\nfunction flattenNodes(\n  complexNodes: ParentNode[],\n  res, isVGrouping, rowSpans, depth,\n  expansions: ResourceEntityExpansions,\n  expansionDefault: boolean,\n) {\n  for (let i = 0; i < complexNodes.length; i += 1) {\n    let complexNode = complexNodes[i]\n    let group = (complexNode as GroupParentNode).group\n\n    if (group) {\n      if (isVGrouping) {\n        let firstRowIndex = res.length\n        let rowSpanIndex = rowSpans.length\n\n        flattenNodes(complexNode.children, res, isVGrouping, rowSpans.concat(0), depth, expansions, expansionDefault)\n\n        if (firstRowIndex < res.length) {\n          let firstRow = res[firstRowIndex]\n          let firstRowSpans = firstRow.rowSpans = firstRow.rowSpans.slice()\n\n          firstRowSpans[rowSpanIndex] = res.length - firstRowIndex\n        }\n      } else {\n        let id = group.spec.field + ':' + group.value\n        let isExpanded = expansions[id] != null ? expansions[id] : expansionDefault\n\n        res.push({ id, group, isExpanded })\n\n        if (isExpanded) {\n          flattenNodes(complexNode.children, res, isVGrouping, rowSpans, depth + 1, expansions, expansionDefault)\n        }\n      }\n    } else if ((complexNode as ResourceParentNode).resource) {\n      let id = (complexNode as ResourceParentNode).resource.id\n      let isExpanded = expansions[id] != null ? expansions[id] : expansionDefault\n\n      res.push({\n        id,\n        rowSpans,\n        depth,\n        isExpanded,\n        hasChildren: Boolean(complexNode.children.length),\n        resource: (complexNode as ResourceParentNode).resource,\n        resourceFields: (complexNode as ResourceParentNode).resourceFields,\n      })\n\n      if (isExpanded) {\n        flattenNodes(complexNode.children, res, isVGrouping, rowSpans, depth + 1, expansions, expansionDefault)\n      }\n    }\n  }\n}\n\nfunction buildHierarchy(\n  resourceStore: ResourceHash,\n  maxDepth: number,\n  groupSpecs: GroupSpec[],\n  orderSpecs: OrderSpec<ResourceApi>[],\n): ParentNode[] {\n  let resourceNodes = buildResourceNodes(resourceStore, orderSpecs)\n  let builtNodes: ParentNode[] = []\n\n  for (let resourceId in resourceNodes) {\n    let resourceNode = resourceNodes[resourceId]\n\n    if (!resourceNode.resource.parentId) {\n      insertResourceNode(resourceNode, builtNodes, groupSpecs, 0, maxDepth, orderSpecs)\n    }\n  }\n\n  return builtNodes\n}\n\nfunction buildResourceNodes(resourceStore: ResourceHash, orderSpecs: OrderSpec<ResourceApi>[]): ResourceNodeHash {\n  let nodeHash: ResourceNodeHash = {}\n\n  for (let resourceId in resourceStore) {\n    let resource = resourceStore[resourceId]\n\n    nodeHash[resourceId] = {\n      resource,\n      resourceFields: buildResourceFields(resource),\n      children: [],\n    }\n  }\n\n  for (let resourceId in resourceStore) {\n    let resource = resourceStore[resourceId]\n\n    if (resource.parentId) {\n      let parentNode = nodeHash[resource.parentId]\n\n      if (parentNode) {\n        insertResourceNodeInSiblings(nodeHash[resourceId], parentNode.children, orderSpecs)\n      }\n    }\n  }\n\n  return nodeHash\n}\n\nfunction insertResourceNode(\n  resourceNode: ResourceParentNode,\n  nodes: ParentNode[],\n  groupSpecs: GroupSpec[],\n  depth: number,\n  maxDepth: number,\n  orderSpecs: OrderSpec<ResourceApi>[],\n) {\n  if (groupSpecs.length && (maxDepth === -1 || depth <= maxDepth)) {\n    let groupNode = ensureGroupNodes(resourceNode, nodes, groupSpecs[0])\n\n    insertResourceNode(resourceNode, groupNode.children, groupSpecs.slice(1), depth + 1, maxDepth, orderSpecs)\n  } else {\n    insertResourceNodeInSiblings(resourceNode, nodes, orderSpecs)\n  }\n}\n\nfunction ensureGroupNodes(resourceNode: ResourceParentNode, nodes: ParentNode[], groupSpec: GroupSpec): GroupParentNode {\n  let groupValue = resourceNode.resourceFields[groupSpec.field]\n  let groupNode\n  let newGroupIndex\n\n  // find an existing group that matches, or determine the position for a new group\n  if (groupSpec.order) {\n    for (newGroupIndex = 0; newGroupIndex < nodes.length; newGroupIndex += 1) {\n      let node = nodes[newGroupIndex]\n\n      if ((node as GroupParentNode).group) {\n        let cmp = flexibleCompare(groupValue, (node as GroupParentNode).group.value) * groupSpec.order\n\n        if (cmp === 0) {\n          groupNode = node\n          break\n        } else if (cmp < 0) {\n          break\n        }\n      }\n    }\n  } else { // the groups are unordered\n    for (newGroupIndex = 0; newGroupIndex < nodes.length; newGroupIndex += 1) {\n      let node = nodes[newGroupIndex]\n\n      if ((node as GroupParentNode).group && groupValue === (node as GroupParentNode).group.value) {\n        groupNode = node\n        break\n      }\n    }\n  }\n\n  if (!groupNode) {\n    groupNode = {\n      group: {\n        value: groupValue,\n        spec: groupSpec,\n      },\n      children: [],\n    }\n\n    nodes.splice(newGroupIndex, 0, groupNode)\n  }\n\n  return groupNode\n}\n\nfunction insertResourceNodeInSiblings(resourceNode, siblings, orderSpecs: OrderSpec<ResourceApi>[]) {\n  let i\n\n  for (i = 0; i < siblings.length; i += 1) {\n    let cmp = compareByFieldSpecs(siblings[i].resourceFields, resourceNode.resourceFields, orderSpecs) // TODO: pass in ResourceApi?\n\n    if (cmp > 0) { // went 1 past. insert at i\n      break\n    }\n  }\n\n  siblings.splice(i, 0, resourceNode)\n}\n\nexport function buildResourceFields(resource: Resource) {\n  let obj = { ...resource.extendedProps, ...resource.ui, ...resource }\n\n  delete obj.ui\n  delete obj.extendedProps\n\n  return obj\n}\n\nexport function isGroupsEqual(group0: Group, group1: Group) {\n  return group0.spec === group1.spec && group0.value === group1.value\n}\n","import { createPlugin } from '@fullcalendar/common'\n\nimport premiumCommonPlugin from '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n// ensure ambient declarations\nimport '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n\nimport './ambient'\nimport { ResourceDataAdder, transformIsDraggable } from './View' // TODO: ResourceDataAdder should be own plugin\nimport { ResourceEventConfigAdder } from './ResourceEventConfigAdder'\nimport { reduceResources, ResourceState } from './reducers/resources'\nimport { generateEventDefResourceMembers, EVENT_REFINERS } from './structs/event-parse'\nimport './structs/event-declare'\nimport { massageEventDragMutation, applyEventDefMutation, transformEventDrop } from './EventDragging'\nimport { transformDateSelectionJoin } from './DateSelecting'\nimport { transformDatePoint, transformDateSpan } from './api/CalendarApi-extend'\nimport './api/CalendarApi-declare'\nimport { isPropsValidWithResources } from './validation'\nimport { transformExternalDef } from './ExternalElementDragging'\nimport './api/EventApi-extend'\nimport './api/EventApi-declare'\nimport { optionChangeHandlers } from './option-change-handlers'\nimport { handleResourceStore } from './resources-crud'\nimport { OPTION_REFINERS, LISTENER_REFINERS } from './options'\nimport './options-declare'\n\n// TODO: plugin-ify\nimport './resource-sources/resource-array'\nimport './resource-sources/resource-func'\nimport './resource-sources/resource-json-feed'\n\nexport { ResourceLaneContentArg, ResourceLaneHookPropsInput } from './render-hooks'\n\nexport * from './api-type-deps'\nexport { DEFAULT_RESOURCE_ORDER } from './resources-crud'\n\nexport default createPlugin({\n  deps: [\n    premiumCommonPlugin,\n  ],\n  reducers: [\n    reduceResources,\n  ],\n  isLoadingFuncs: [\n    (state: ResourceState) => state.resourceSource && state.resourceSource.isFetching,\n  ],\n  eventRefiners: EVENT_REFINERS,\n  eventDefMemberAdders: [generateEventDefResourceMembers],\n  isDraggableTransformers: [transformIsDraggable],\n  eventDragMutationMassagers: [massageEventDragMutation],\n  eventDefMutationAppliers: [applyEventDefMutation],\n  dateSelectionTransformers: [transformDateSelectionJoin],\n  datePointTransforms: [transformDatePoint],\n  dateSpanTransforms: [transformDateSpan],\n  viewPropsTransformers: [ResourceDataAdder, ResourceEventConfigAdder],\n  isPropsValid: isPropsValidWithResources,\n  externalDefTransforms: [transformExternalDef],\n  eventDropTransformers: [transformEventDrop],\n  optionChangeHandlers,\n  optionRefiners: OPTION_REFINERS,\n  listenerRefiners: LISTENER_REFINERS,\n  propSetHandlers: { resourceStore: handleResourceStore },\n})\n\nexport { ResourceDayHeader } from './common/ResourceDayHeader'\nexport { AbstractResourceDayTableModel } from './common/AbstractResourceDayTableModel'\nexport { ResourceDayTableModel } from './common/ResourceDayTableModel'\nexport { DayResourceTableModel } from './common/DayResourceTableModel'\nexport { VResourceJoiner } from './common/VResourceJoiner'\nexport { VResourceSplitter } from './common/VResourceSplitter'\nexport { Resource, ResourceHash, getPublicId } from './structs/resource'\nexport { ResourceViewProps } from './View'\nexport {\n  flattenResources,\n  Group,\n  isGroupsEqual,\n  GroupNode,\n  ResourceNode,\n  buildRowNodes,\n  buildResourceFields,\n} from './common/resource-hierarchy'\nexport {\n  ColSpec,\n  GroupSpec,\n  GroupLaneRenderHooks,\n  ColCellContentArg,\n  ColCellMountArg,\n  ColHeaderContentArg,\n  ColHeaderMountArg,\n  ColHeaderRenderHooks,\n} from './common/resource-spec'\nexport { ResourceApi } from './api/ResourceApi'\nexport { ResourceSplitter } from './common/ResourceSplitter'\nexport { ResourceLabelRoot, ResourceLabelRootProps } from './common/ResourceLabelRoot'\n","import { CalendarContext, DateProfile } from '@fullcalendar/common'\nimport { ResourceSource } from '../structs/resource-source'\nimport { ResourceHash } from '../structs/resource'\nimport { reduceResourceSource } from './resourceSource'\nimport { reduceResourceStore } from './resourceStore'\nimport { reduceResourceEntityExpansions, ResourceEntityExpansions } from './resourceEntityExpansions'\nimport { ResourceAction } from './resource-action'\n\nexport interface ResourceState {\n  resourceSource: ResourceSource<any>\n  resourceStore: ResourceHash\n  resourceEntityExpansions: ResourceEntityExpansions\n}\n\nexport function reduceResources(\n  state: ResourceState | null,\n  action: ResourceAction | null,\n  context: CalendarContext & { dateProfile: DateProfile },\n) {\n  let resourceSource = reduceResourceSource(state && state.resourceSource, action, context)\n  let resourceStore = reduceResourceStore(state && state.resourceStore, action, resourceSource, context)\n  let resourceEntityExpansions = reduceResourceEntityExpansions(state && state.resourceEntityExpansions, action)\n\n  return {\n    resourceSource,\n    resourceStore,\n    resourceEntityExpansions,\n  }\n}\n","import { ResourceAction } from './resource-action'\n\nexport type ResourceEntityExpansions = { [id: string]: boolean }\n\nexport function reduceResourceEntityExpansions(\n  expansions: ResourceEntityExpansions | null,\n  action: ResourceAction | null,\n): ResourceEntityExpansions {\n  if (!expansions || !action) {\n    return {}\n  }\n\n  switch (action.type) {\n    case 'SET_RESOURCE_ENTITY_EXPANDED':\n      return {\n        ...expansions,\n        [action.id]: action.isExpanded,\n      }\n\n    default:\n      return expansions\n  }\n}\n","import { Hit } from '@fullcalendar/common'\n\nexport function transformDateSelectionJoin(hit0: Hit, hit1: Hit) {\n  let resourceId0 = hit0.dateSpan.resourceId\n  let resourceId1 = hit1.dateSpan.resourceId\n\n  if (resourceId0 && resourceId1) {\n    return { resourceId: resourceId0 }\n  }\n\n  return null\n}\n","import { DateSpan } from '@fullcalendar/common'\n\nexport function transformExternalDef(dateSpan: DateSpan) {\n  return dateSpan.resourceId ?\n    { resourceId: dateSpan.resourceId } :\n    {}\n}\n","import { createElement, VNode, Fragment } from '@fullcalendar/common'\n\n/*\nRenders the DOM responsible for the subrow expander area,\nas well as the space before it (used to align expanders of similar depths)\n*/\nexport function ExpanderIcon({ depth, hasChildren, isExpanded, onExpanderClick }): VNode {\n  let nodes: VNode[] = []\n\n  for (let i = 0; i < depth; i += 1) {\n    nodes.push(\n      <span className=\"fc-icon\" />,\n    )\n  }\n\n  let iconClassNames = ['fc-icon']\n  if (hasChildren) {\n    if (isExpanded) {\n      iconClassNames.push('fc-icon-minus-square')\n    } else {\n      iconClassNames.push('fc-icon-plus-square')\n    }\n  }\n\n  nodes.push(\n    <span\n      className={'fc-datagrid-expander' + (hasChildren ? '' : ' fc-datagrid-expander-placeholder')}\n      onClick={onExpanderClick}\n    >\n      <span className={iconClassNames.join(' ')} />\n    </span>,\n  )\n\n  return createElement(Fragment, {}, ...nodes)\n}\n","import { ViewContext, ViewApi } from '@fullcalendar/common'\nimport { Resource, ResourceApi } from '@fullcalendar/resource-common'\n\n// hook props\n// ----------\n\nexport interface HookPropsInput {\n  resource: Resource\n  fieldValue: any\n  context: ViewContext\n}\n\nexport interface HookProps {\n  resource: ResourceApi\n  fieldValue: any\n  view: ViewApi\n}\n\nexport function refineHookProps(raw: HookPropsInput): HookProps {\n  return {\n    resource: new ResourceApi(raw.context, raw.resource),\n    fieldValue: raw.fieldValue,\n    view: raw.context.viewApi,\n  }\n}\n","import { createElement, BaseComponent, Fragment, ContentHook } from '@fullcalendar/common'\nimport { ColSpec } from '@fullcalendar/resource-common'\nimport { HookProps } from './spreadsheet-cell-util'\n\nexport interface SpreadsheetIndividualCellInnerProps {\n  hookProps: HookProps\n  colSpec: ColSpec\n}\n\nexport class SpreadsheetIndividualCellInner extends BaseComponent<SpreadsheetIndividualCellInnerProps> { // doesn't need context?\n  render() {\n    let { props } = this\n\n    return (\n      <ContentHook hookProps={props.hookProps} content={props.colSpec.cellContent} defaultContent={renderResourceInner}>\n        {(innerElRef, innerContent) => (\n          <span className=\"fc-datagrid-cell-main\" ref={innerElRef}>\n            {innerContent}\n          </span>\n        )}\n      </ContentHook>\n    )\n  }\n}\n\nfunction renderResourceInner(hookProps) {\n  return hookProps.fieldValue || <Fragment>&nbsp;</Fragment>\n}\n","import {\n  createElement, BaseComponent, CssDimValue, MountHook,\n  buildClassNameNormalizer, memoizeObjArg,\n} from '@fullcalendar/common'\nimport { Resource, ColSpec } from '@fullcalendar/resource-common'\nimport { ExpanderIcon } from './ExpanderIcon'\nimport { refineHookProps, HookProps } from './spreadsheet-cell-util'\nimport { SpreadsheetIndividualCellInner } from './SpreadsheetIndividualCellInner'\n\nexport interface SpreadsheetIndividualCellProps {\n  colSpec: ColSpec\n  resource: Resource\n  fieldValue: any\n  depth: number\n  hasChildren: boolean\n  isExpanded: boolean\n  innerHeight: CssDimValue\n}\n\n// worth making a PureComponent? (because of innerHeight)\nexport class SpreadsheetIndividualCell extends BaseComponent<SpreadsheetIndividualCellProps> {\n  refineHookProps = memoizeObjArg(refineHookProps)\n  normalizeClassNames = buildClassNameNormalizer<HookProps>()\n\n  render() {\n    let { props, context } = this\n    let { colSpec } = props\n\n    let hookProps = this.refineHookProps({\n      resource: props.resource,\n      fieldValue: props.fieldValue,\n      context,\n    })\n    let customClassNames = this.normalizeClassNames(colSpec.cellClassNames, hookProps)\n\n    return (\n      <MountHook hookProps={hookProps} didMount={colSpec.cellDidMount} willUnmount={colSpec.cellWillUnmount}>\n        {(rootElRef) => (\n          <td\n            ref={rootElRef}\n            role=\"gridcell\"\n            data-resource-id={props.resource.id}\n            className={[\n              'fc-datagrid-cell',\n              'fc-resource',\n            ].concat(customClassNames).join(' ')}\n          >\n            <div className=\"fc-datagrid-cell-frame\" style={{ height: props.innerHeight }}>\n              <div className=\"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner\">\n                {colSpec.isMain && (\n                  <ExpanderIcon\n                    depth={props.depth}\n                    hasChildren={props.hasChildren}\n                    isExpanded={props.isExpanded}\n                    onExpanderClick={this.onExpanderClick}\n                  />\n                )}\n                <SpreadsheetIndividualCellInner hookProps={hookProps} colSpec={colSpec} />\n              </div>\n            </div>\n          </td>\n        )}\n      </MountHook>\n    )\n  }\n\n  onExpanderClick = (ev: UIEvent) => {\n    let { props } = this\n\n    if (props.hasChildren) {\n      this.context.dispatch({\n        type: 'SET_RESOURCE_ENTITY_EXPANDED',\n        id: props.resource.id,\n        isExpanded: !props.isExpanded,\n      })\n    }\n  }\n}\n","import { createElement, BaseComponent, Fragment, RenderHook } from '@fullcalendar/common'\nimport { ColSpec, ColCellContentArg } from '@fullcalendar/resource-common'\n\nexport interface SpreadsheetGroupCellProps {\n  colSpec: ColSpec\n  fieldValue: any\n  rowSpan: number\n}\n\n// for VERTICAL cell grouping, in spreadsheet area\nexport class SpreadsheetGroupCell extends BaseComponent<SpreadsheetGroupCellProps> {\n  render() {\n    let { props, context } = this\n    let { colSpec } = props\n    let hookProps: ColCellContentArg = {\n      groupValue: props.fieldValue,\n      view: context.viewApi,\n    }\n\n    // a grouped cell. no data that is specific to this specific resource\n    // `colSpec` is for the group. a GroupSpec :(\n    return (\n      <RenderHook<ColCellContentArg>\n        hookProps={hookProps}\n        classNames={colSpec.cellClassNames}\n        content={colSpec.cellContent}\n        defaultContent={renderGroupInner}\n        didMount={colSpec.cellDidMount}\n        willUnmount={colSpec.cellWillUnmount}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent) => (\n          // TODO: make data-attr with group value?\n          <td\n            ref={rootElRef}\n            role=\"gridcell\"\n            rowSpan={props.rowSpan}\n            className={['fc-datagrid-cell', 'fc-resource-group'].concat(classNames).join(' ')}\n          >\n            <div className=\"fc-datagrid-cell-frame fc-datagrid-cell-frame-liquid\">\n              {/* ^needed for stickiness in some browsers */}\n              <div className=\"fc-datagrid-cell-cushion fc-sticky\" ref={innerElRef}>\n                {innerContent}\n              </div>\n            </div>\n          </td>\n        )}\n      </RenderHook>\n    )\n  }\n}\n\nfunction renderGroupInner(hookProps) {\n  return hookProps.groupValue || <Fragment>&nbsp;</Fragment>\n}\n","import { createElement, BaseComponent, ViewContext, isArraysEqual, CssDimValue } from '@fullcalendar/common'\nimport { Resource, buildResourceFields, ColSpec, getPublicId } from '@fullcalendar/resource-common'\nimport { SpreadsheetIndividualCell } from './SpreadsheetIndividualCell'\nimport { SpreadsheetGroupCell } from './SpreadsheetGroupCell'\n\nexport interface SpreadsheetRowProps {\n  colSpecs: ColSpec[]\n  rowSpans: number[]\n  depth: number\n  isExpanded: boolean\n  hasChildren: boolean\n  resource: Resource\n  innerHeight: CssDimValue // bad name! inner vs innerinner\n}\n\nexport class SpreadsheetRow extends BaseComponent<SpreadsheetRowProps, ViewContext> {\n  render() {\n    let { props } = this\n    let { resource, rowSpans, depth } = props\n    let resourceFields = buildResourceFields(resource) // slightly inefficient. already done up the call stack\n\n    return (\n      <tr role=\"row\">\n        {props.colSpecs.map((colSpec, i) => {\n          let rowSpan = rowSpans[i]\n\n          if (rowSpan === 0) { // not responsible for group-based rows. VRowGroup is\n            return null\n          }\n\n          if (rowSpan == null) {\n            rowSpan = 1\n          }\n\n          let fieldValue = colSpec.field ? resourceFields[colSpec.field] :\n            (resource.title || getPublicId(resource.id))\n\n          if (rowSpan > 1) {\n            return (\n              <SpreadsheetGroupCell\n                key={i} // eslint-disable-line react/no-array-index-key\n                colSpec={colSpec}\n                fieldValue={fieldValue}\n                rowSpan={rowSpan}\n              />\n            )\n          }\n\n          return (\n            <SpreadsheetIndividualCell\n              key={i} // eslint-disable-line react/no-array-index-key\n              colSpec={colSpec}\n              resource={resource}\n              fieldValue={fieldValue}\n              depth={depth}\n              hasChildren={props.hasChildren}\n              isExpanded={props.isExpanded}\n              innerHeight={props.innerHeight}\n            />\n          )\n        })}\n      </tr>\n    )\n  }\n}\n\nSpreadsheetRow.addPropsEquality({\n  rowSpans: isArraysEqual,\n})\n","import { createElement, Fragment, BaseComponent, ViewContext, CssDimValue, createRef, RenderHook, RefObject } from '@fullcalendar/common'\nimport { Group, isGroupsEqual, ColCellContentArg } from '@fullcalendar/resource-common'\nimport { ExpanderIcon } from './ExpanderIcon'\n\nexport interface SpreadsheetGroupRowProps {\n  spreadsheetColCnt: number\n  id: string // 'field:value'\n  isExpanded: boolean\n  group: Group\n  innerHeight: CssDimValue\n}\n\n// for HORIZONTAL cell grouping, in spreadsheet area\nexport class SpreadsheetGroupRow extends BaseComponent<SpreadsheetGroupRowProps, ViewContext> {\n  innerInnerRef: RefObject<HTMLDivElement> = createRef<HTMLDivElement>()\n\n  render() {\n    let { props, context } = this\n    let hookProps: ColCellContentArg = { groupValue: props.group.value, view: context.viewApi }\n    let spec = props.group.spec\n\n    return (\n      <tr role=\"row\">\n        <RenderHook<ColCellContentArg>\n          hookProps={hookProps}\n          classNames={spec.labelClassNames}\n          content={spec.labelContent}\n          defaultContent={renderCellInner}\n          didMount={spec.labelDidMount}\n          willUnmount={spec.labelWillUnmount}\n        >\n          {(rootElRef, classNames, innerElRef, innerContent) => (\n            <th\n              ref={rootElRef}\n              // ARIA TODO: not really a columnheader\n              // extremely tedious to make this aria-compliant,\n              // to assign multiple headers to each cell\n              // https://www.w3.org/WAI/tutorials/tables/multi-level/\n              role=\"columnheader\"\n              scope=\"colgroup\"\n              colSpan={props.spreadsheetColCnt}\n              className={\n                [\n                  'fc-datagrid-cell',\n                  'fc-resource-group',\n                  context.theme.getClass('tableCellShaded'),\n                ].concat(classNames).join(' ')\n              }\n            >\n              <div className=\"fc-datagrid-cell-frame\" style={{ height: props.innerHeight }}>\n                <div className=\"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner\" ref={this.innerInnerRef}>\n                  <ExpanderIcon\n                    depth={0}\n                    hasChildren\n                    isExpanded={props.isExpanded}\n                    onExpanderClick={this.onExpanderClick}\n                  />\n                  <span className=\"fc-datagrid-cell-main\" ref={innerElRef}>\n                    {innerContent}\n                  </span>\n                </div>\n              </div>\n            </th>\n          )}\n        </RenderHook>\n      </tr>\n    )\n  }\n\n  onExpanderClick = () => {\n    let { props } = this\n\n    this.context.dispatch({\n      type: 'SET_RESOURCE_ENTITY_EXPANDED',\n      id: props.id,\n      isExpanded: !props.isExpanded,\n    })\n  }\n}\n\nSpreadsheetGroupRow.addPropsEquality({\n  group: isGroupsEqual,\n})\n\nfunction renderCellInner(hookProps) {\n  return hookProps.groupValue || <Fragment>&nbsp;</Fragment>\n}\n","import {\n  VNode, createElement, Fragment,\n  BaseComponent, ElementDragging, elementClosest, PointerDragEvent, RefMap, findElements, RenderHook,\n} from '@fullcalendar/common'\nimport { ColSpec, ColHeaderContentArg, ColHeaderRenderHooks } from '@fullcalendar/resource-common'\n\nexport interface SpreadsheetHeaderProps {\n  superHeaderRendering: ColHeaderRenderHooks\n  colSpecs: ColSpec[]\n  rowInnerHeights: number[]\n  onColWidthChange?: (colWidths: number[]) => void\n}\n\nconst SPREADSHEET_COL_MIN_WIDTH = 20\n\nexport class SpreadsheetHeader extends BaseComponent<SpreadsheetHeaderProps> {\n  private resizerElRefs = new RefMap<HTMLElement>(this._handleColResizerEl.bind(this))\n  private colDraggings: { [index: string]: ElementDragging } = {}\n\n  render() {\n    let { colSpecs, superHeaderRendering, rowInnerHeights } = this.props\n    let hookProps: ColHeaderContentArg = { view: this.context.viewApi }\n    let rowNodes: VNode[] = []\n\n    rowInnerHeights = rowInnerHeights.slice() // copy, because we're gonna pop\n\n    if (superHeaderRendering) {\n      let rowInnerHeight = rowInnerHeights.shift()\n      rowNodes.push(\n        <tr key=\"row-super\" role=\"row\">\n          <RenderHook\n            hookProps={hookProps}\n            classNames={superHeaderRendering.headerClassNames}\n            content={superHeaderRendering.headerContent}\n            didMount={superHeaderRendering.headerDidMount}\n            willUnmount={superHeaderRendering.headerWillUnmount}\n          >\n            {(rootElRef, classNames, innerElRef, innerContent) => (\n              <th\n                ref={rootElRef}\n                role=\"columnheader\"\n                scope=\"colgroup\"\n                colSpan={colSpecs.length}\n                className={[\n                  'fc-datagrid-cell',\n                  'fc-datagrid-cell-super',\n                ].concat(classNames).join(' ')}\n              >\n                <div className=\"fc-datagrid-cell-frame\" style={{ height: rowInnerHeight }}>\n                  <div className=\"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner\" ref={innerElRef}>\n                    {innerContent}\n                  </div>\n                </div>\n              </th>\n            )}\n          </RenderHook>\n        </tr>,\n      )\n    }\n\n    let rowInnerHeight = rowInnerHeights.shift()\n    rowNodes.push(\n      <tr key=\"row\" role=\"row\">\n        {colSpecs.map((colSpec, i) => {\n          let isLastCol = i === (colSpecs.length - 1)\n\n          // need empty inner div for abs positioning for resizer\n          return (\n            <RenderHook\n              key={i} // eslint-disable-line react/no-array-index-key\n              hookProps={hookProps}\n              classNames={colSpec.headerClassNames}\n              content={colSpec.headerContent}\n              didMount={colSpec.headerDidMount}\n              willUnmount={colSpec.headerWillUnmount}\n            >\n              {(rootElRef, classNames, innerElRef, innerContent) => (\n                <th\n                  ref={rootElRef}\n                  role=\"columnheader\"\n                  className={['fc-datagrid-cell'].concat(classNames).join(' ')}\n                >\n                  <div className=\"fc-datagrid-cell-frame\" style={{ height: rowInnerHeight }}>\n                    <div className=\"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner\">\n                      {colSpec.isMain && (\n                        <span className=\"fc-datagrid-expander fc-datagrid-expander-placeholder\">\n                          <span className=\"fc-icon\" />\n                        </span>\n                      )}\n                      <span className=\"fc-datagrid-cell-main\" ref={innerElRef}>\n                        {innerContent}\n                      </span>\n                    </div>\n                    {!isLastCol &&\n                      <div className=\"fc-datagrid-cell-resizer\" ref={this.resizerElRefs.createRef(i)} />}\n                  </div>\n                </th>\n              )}\n            </RenderHook>\n          )\n        })}\n      </tr>,\n    )\n\n    return (<Fragment>{rowNodes}</Fragment>)\n  }\n\n  _handleColResizerEl(resizerEl: HTMLElement | null, index: string) {\n    let { colDraggings } = this\n\n    if (!resizerEl) {\n      let dragging = colDraggings[index]\n\n      if (dragging) {\n        dragging.destroy()\n        delete colDraggings[index]\n      }\n    } else {\n      let dragging = this.initColResizing(resizerEl, parseInt(index, 10))\n\n      if (dragging) {\n        colDraggings[index] = dragging\n      }\n    }\n  }\n\n  initColResizing(resizerEl: HTMLElement, index: number) {\n    let { pluginHooks, isRtl } = this.context\n    let { onColWidthChange } = this.props\n    let ElementDraggingImpl = pluginHooks.elementDraggingImpl\n\n    if (ElementDraggingImpl) {\n      let dragging = new ElementDraggingImpl(resizerEl)\n      let startWidth: number // of just the single column\n      let currentWidths: number[] // of all columns\n\n      dragging.emitter.on('dragstart', () => {\n        let allCells = findElements(elementClosest(resizerEl, 'tr'), 'th')\n\n        currentWidths = allCells.map((cellEl) => (\n          cellEl.getBoundingClientRect().width\n        ))\n        startWidth = currentWidths[index]\n      })\n\n      dragging.emitter.on('dragmove', (pev: PointerDragEvent) => {\n        currentWidths[index] = Math.max(startWidth + pev.deltaX * (isRtl ? -1 : 1), SPREADSHEET_COL_MIN_WIDTH)\n\n        if (onColWidthChange) {\n          onColWidthChange(currentWidths.slice()) // send a copy since currentWidths continues to be mutated\n        }\n      })\n\n      dragging.setAutoScrollEnabled(false) // because gets weird with auto-scrolling time area\n\n      return dragging\n    }\n\n    return null\n  }\n}\n","import { createElement, BaseComponent, ContentHook } from '@fullcalendar/common'\nimport { Resource, ResourceApi, ResourceLaneContentArg } from '@fullcalendar/resource-common'\n\nexport interface ResourceTimelineLaneMiscProps {\n  resource: Resource\n}\n\nexport class ResourceTimelineLaneMisc extends BaseComponent<ResourceTimelineLaneMiscProps> {\n  render() {\n    let { props, context } = this\n    let hookProps: ResourceLaneContentArg = { resource: new ResourceApi(context, props.resource) } // just easier to make directly\n\n    return (\n      <ContentHook hookProps={hookProps} content={context.options.resourceLaneContent}>\n        {(innerElRef, innerContent) => (\n          innerContent && // TODO: test how this would interfere with height\n            <div className=\"fc-timeline-lane-misc\" ref={innerElRef}>{innerContent}</div>\n        )}\n      </ContentHook>\n    )\n  }\n}\n","import {\n  createElement, Ref, BaseComponent, CssDimValue,\n  buildClassNameNormalizer, MountHook, elementClosest, memoizeObjArg,\n} from '@fullcalendar/common'\nimport { Resource, ResourceApi, ResourceLaneContentArg, ResourceLaneHookPropsInput } from '@fullcalendar/resource-common'\nimport { TimelineLane, TimelineLaneCoreProps } from '@fullcalendar/timeline'\nimport { ResourceTimelineLaneMisc } from './ResourceTimelineLaneMisc'\n\nexport interface ResourceTimelineLaneProps extends TimelineLaneCoreProps {\n  elRef: Ref<HTMLTableRowElement>\n  resource: Resource\n  innerHeight: CssDimValue\n  onHeightChange?: (rowEl: HTMLTableRowElement, isStable: boolean) => void\n}\n\nexport class ResourceTimelineLane extends BaseComponent<ResourceTimelineLaneProps> {\n  refineHookProps = memoizeObjArg(refineHookProps)\n  normalizeClassNames = buildClassNameNormalizer<ResourceLaneContentArg>()\n\n  render() {\n    let { props, context } = this\n    let { options } = context\n    let hookProps = this.refineHookProps({ resource: props.resource, context })\n    let customClassNames = this.normalizeClassNames(options.resourceLaneClassNames, hookProps)\n\n    return (\n      <tr ref={props.elRef}>\n        <MountHook hookProps={hookProps} didMount={options.resourceLaneDidMount} willUnmount={options.resourceLaneWillUnmount}>\n          {(rootElRef) => (\n            <td\n              ref={rootElRef}\n              className={['fc-timeline-lane', 'fc-resource'].concat(customClassNames).join(' ')}\n              data-resource-id={props.resource.id}\n            >\n              <div className=\"fc-timeline-lane-frame\" style={{ height: props.innerHeight }}>\n                <ResourceTimelineLaneMisc resource={props.resource} />\n                <TimelineLane\n                  dateProfile={props.dateProfile}\n                  tDateProfile={props.tDateProfile}\n                  nowDate={props.nowDate}\n                  todayRange={props.todayRange}\n                  nextDayThreshold={props.nextDayThreshold}\n                  businessHours={props.businessHours}\n                  eventStore={props.eventStore}\n                  eventUiBases={props.eventUiBases}\n                  dateSelection={props.dateSelection}\n                  eventSelection={props.eventSelection}\n                  eventDrag={props.eventDrag}\n                  eventResize={props.eventResize}\n                  timelineCoords={props.timelineCoords}\n                  onHeightChange={this.handleHeightChange}\n                  resourceId={props.resource.id}\n                />\n              </div>\n            </td>\n          )}\n        </MountHook>\n      </tr>\n    ) // important NOT to do liquid-height. dont want to shrink height smaller than content\n  }\n\n  handleHeightChange = (innerEl: HTMLElement, isStable: boolean) => {\n    if (this.props.onHeightChange) {\n      this.props.onHeightChange(\n        // would want to use own <tr> ref, but not guaranteed to be ready when this fires\n        elementClosest(innerEl, 'tr') as HTMLTableRowElement,\n        isStable,\n      )\n    }\n  }\n}\n\nfunction refineHookProps(raw: ResourceLaneHookPropsInput): ResourceLaneContentArg {\n  return {\n    resource: new ResourceApi(raw.context, raw.resource),\n  }\n}\n","import { createElement, Ref, BaseComponent, CssDimValue, RenderHook } from '@fullcalendar/common'\nimport { GroupLaneRenderHooks, ColCellContentArg } from '@fullcalendar/resource-common'\n\nexport interface DividerRowProps {\n  elRef?: Ref<HTMLTableRowElement>\n  innerHeight: CssDimValue\n  groupValue: any\n  renderingHooks: GroupLaneRenderHooks\n}\n\n/*\nparallels the SpreadsheetGroupRow\n*/\nexport class DividerRow extends BaseComponent<DividerRowProps> {\n  render() {\n    let { props } = this\n    let { renderingHooks } = this.props\n    let hookProps: ColCellContentArg = { groupValue: props.groupValue, view: this.context.viewApi }\n\n    return (\n      <tr ref={props.elRef}>\n        <RenderHook\n          hookProps={hookProps}\n          classNames={renderingHooks.laneClassNames}\n          content={renderingHooks.laneContent}\n          didMount={renderingHooks.laneDidMount}\n          willUnmount={renderingHooks.laneWillUnmount}\n        >\n          {(rootElRef, classNames, innerElRef, innerContent) => (\n            <td\n              ref={rootElRef}\n              className={\n                [\n                  'fc-timeline-lane',\n                  'fc-resource-group',\n                  this.context.theme.getClass('tableCellShaded'),\n                ].concat(classNames).join(' ')\n              }\n            >\n              <div style={{ height: props.innerHeight }} ref={innerElRef}>\n                {innerContent}\n              </div>\n            </td>\n          )}\n        </RenderHook>\n      </tr>\n    )\n  }\n}\n","import {\n  createElement, SplittableProps, EventStore, BaseComponent, RefMap,\n  DateMarker, DateRange, DateProfile,\n} from '@fullcalendar/common'\nimport { GroupNode, ResourceNode } from '@fullcalendar/resource-common'\nimport { TimelineDateProfile, TimelineCoords } from '@fullcalendar/timeline'\nimport { ResourceTimelineLane } from './ResourceTimelineLane'\nimport { DividerRow } from './DividerRow'\n\nexport interface ResourceTimelineLanesBodyProps extends ResourceTimelineLanesContentProps {\n  rowElRefs: RefMap<HTMLElement> // indexed by NUMERICAL INDEX, not node.id\n}\n\nexport interface ResourceTimelineLanesContentProps {\n  rowNodes: (GroupNode | ResourceNode)[]\n  splitProps: { [resourceId: string]: SplittableProps }\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  nowDate: DateMarker\n  todayRange: DateRange\n  fallbackBusinessHours: EventStore | null\n  innerHeights: number[]\n  slatCoords: TimelineCoords | null\n  onRowHeightChange?: (rowEl: HTMLTableRowElement, isStable: boolean) => void\n}\n\nexport class ResourceTimelineLanesBody extends BaseComponent<ResourceTimelineLanesBodyProps> { // TODO: this technique more\n  render() {\n    let { props, context } = this\n    let { rowElRefs, innerHeights } = props\n\n    return (\n      <tbody>\n        {props.rowNodes.map((node, index) => {\n          if ((node as GroupNode).group) {\n            return (\n              <DividerRow\n                key={node.id}\n                elRef={rowElRefs.createRef(node.id)}\n                groupValue={(node as GroupNode).group.value}\n                renderingHooks={(node as GroupNode).group.spec}\n                innerHeight={innerHeights[index] || ''}\n              />\n            )\n          }\n\n          if ((node as ResourceNode).resource) {\n            let resource = (node as ResourceNode).resource\n\n            return (\n              <ResourceTimelineLane\n                key={node.id}\n                elRef={rowElRefs.createRef(node.id)}\n                {...props.splitProps[resource.id]}\n                resource={resource}\n                dateProfile={props.dateProfile}\n                tDateProfile={props.tDateProfile}\n                nowDate={props.nowDate}\n                todayRange={props.todayRange}\n                nextDayThreshold={context.options.nextDayThreshold}\n                businessHours={resource.businessHours || props.fallbackBusinessHours}\n                innerHeight={innerHeights[index] || ''}\n                timelineCoords={props.slatCoords}\n                onHeightChange={props.onRowHeightChange}\n              />\n            )\n          }\n\n          return null\n        })}\n      </tbody>\n    )\n  }\n}\n","import { createElement, PositionCache, createRef, BaseComponent, CssDimValue, RefMap } from '@fullcalendar/common'\nimport { GroupNode, ResourceNode } from '@fullcalendar/resource-common'\nimport { ResourceTimelineLanesBody, ResourceTimelineLanesContentProps } from './ResourceTimelineLanesBody'\n\nexport interface ResourceTimelineLanesProps extends ResourceTimelineLanesContentProps {\n  minHeight: CssDimValue\n  clientWidth: number | null\n  tableMinWidth: CssDimValue\n  onRowCoords?: (rowCoords: PositionCache) => void\n}\n\nexport class ResourceTimelineLanes extends BaseComponent<ResourceTimelineLanesProps> {\n  private rootElRef = createRef<HTMLTableElement>()\n  private rowElRefs = new RefMap<HTMLElement>()\n\n  render() {\n    let { props, context } = this\n\n    return (\n      <table\n        ref={this.rootElRef}\n        aria-hidden\n        className={'fc-scrollgrid-sync-table ' + context.theme.getClass('table')}\n        style={{\n          minWidth: props.tableMinWidth,\n          width: props.clientWidth,\n          height: props.minHeight,\n        }}\n      >\n        <ResourceTimelineLanesBody\n          rowElRefs={this.rowElRefs}\n          rowNodes={props.rowNodes}\n          dateProfile={props.dateProfile}\n          tDateProfile={props.tDateProfile}\n          nowDate={props.nowDate}\n          todayRange={props.todayRange}\n          splitProps={props.splitProps}\n          fallbackBusinessHours={props.fallbackBusinessHours}\n          slatCoords={props.slatCoords}\n          innerHeights={props.innerHeights}\n          onRowHeightChange={props.onRowHeightChange}\n        />\n      </table>\n    )\n  }\n\n  componentDidMount() {\n    this.updateCoords()\n  }\n\n  componentDidUpdate() {\n    this.updateCoords()\n  }\n\n  componentWillUnmount() {\n    if (this.props.onRowCoords) {\n      this.props.onRowCoords(null)\n    }\n  }\n\n  updateCoords() {\n    let { props } = this\n\n    if (props.onRowCoords && props.clientWidth !== null) { // a populated clientWidth means sizing has stabilized\n      this.props.onRowCoords(\n        new PositionCache(\n          this.rootElRef.current,\n          collectRowEls(this.rowElRefs.currentMap, props.rowNodes),\n          false,\n          true, // isVertical\n        ),\n      )\n    }\n  }\n}\n\nfunction collectRowEls(elMap: { [key: string]: HTMLElement }, rowNodes: (GroupNode | ResourceNode)[]) {\n  return rowNodes.map((rowNode) => elMap[rowNode.id])\n}\n","import {\n  createElement, PositionCache, Duration, EventStore, DateSpan, EventUiHash, EventInteractionState,\n  DateComponent, Hit, createRef, CssDimValue, VNode, memoize, NowTimer, greatestDurationDenominator,\n  DateMarker, DateRange, NowIndicatorRoot, DateProfile, Fragment,\n} from '@fullcalendar/common'\nimport { ResourceHash, GroupNode, ResourceNode, ResourceSplitter } from '@fullcalendar/resource-common'\nimport {\n  TimelineDateProfile, TimelineCoords, TimelineSlats,\n  TimelineLaneSlicer, TimelineLaneBg, TimelineLaneSeg,\n  coordToCss,\n} from '@fullcalendar/timeline'\nimport { ResourceTimelineLanes } from './ResourceTimelineLanes'\n\nexport interface ResourceTimelineGridProps {\n  dateProfile: DateProfile\n  tDateProfile: TimelineDateProfile\n  rowNodes: (GroupNode | ResourceNode)[]\n  businessHours: EventStore | null\n  dateSelection: DateSpan | null\n  eventStore: EventStore\n  eventUiBases: EventUiHash\n  eventSelection: string\n  eventDrag: EventInteractionState | null\n  eventResize: EventInteractionState | null\n  resourceStore: ResourceHash\n  nextDayThreshold: Duration\n  clientWidth: number | null\n  clientHeight: number | null\n  tableMinWidth: CssDimValue\n  tableColGroupNode: VNode\n  expandRows: boolean\n  rowInnerHeights: number[]\n  onSlatCoords?: (slatCoords: TimelineCoords) => void\n  onRowCoords?: (rowCoords: PositionCache) => void\n  onScrollLeftRequest?: (scrollLeft: number) => void\n  onRowHeightChange?: (rowEl: HTMLTableRowElement, isStable: boolean) => void\n}\n\ninterface ResourceTimelineGridState {\n  slatCoords: TimelineCoords | null\n}\n\nexport class ResourceTimelineGrid extends DateComponent<ResourceTimelineGridProps, ResourceTimelineGridState> {\n  private computeHasResourceBusinessHours = memoize(computeHasResourceBusinessHours)\n  private resourceSplitter = new ResourceSplitter() // doesn't let it do businessHours tho\n  private bgSlicer = new TimelineLaneSlicer()\n  private slatsRef = createRef<TimelineSlats>() // needed for Hit creation :(\n  private rowCoords: PositionCache // for queryHit\n\n  state: ResourceTimelineGridState = {\n    slatCoords: null,\n  }\n\n  render() {\n    let { props, state, context } = this\n    let { dateProfile, tDateProfile } = props\n    let timerUnit = greatestDurationDenominator(tDateProfile.slotDuration).unit\n    let hasResourceBusinessHours = this.computeHasResourceBusinessHours(props.rowNodes)\n\n    let splitProps = this.resourceSplitter.splitProps(props)\n    let bgLaneProps = splitProps['']\n    let bgSlicedProps = this.bgSlicer.sliceProps(\n      bgLaneProps,\n      dateProfile,\n      tDateProfile.isTimeScale ? null : props.nextDayThreshold,\n      context, // wish we didn't need to pass in the rest of these args...\n      dateProfile,\n      context.dateProfileGenerator,\n      tDateProfile,\n      context.dateEnv,\n    )\n\n    // WORKAROUND: make ignore slatCoords when out of sync with dateProfile\n    let slatCoords = state.slatCoords && state.slatCoords.dateProfile === props.dateProfile ? state.slatCoords : null\n\n    return (\n      <div\n        ref={this.handleEl}\n        className={[\n          'fc-timeline-body',\n          props.expandRows ? 'fc-timeline-body-expandrows' : '',\n        ].join(' ')}\n        style={{ minWidth: props.tableMinWidth }}\n      >\n        <NowTimer unit={timerUnit}>\n          {(nowDate: DateMarker, todayRange: DateRange) => (\n            <Fragment>\n              <TimelineSlats\n                ref={this.slatsRef}\n                dateProfile={dateProfile}\n                tDateProfile={tDateProfile}\n                nowDate={nowDate}\n                todayRange={todayRange}\n                clientWidth={props.clientWidth}\n                tableColGroupNode={props.tableColGroupNode}\n                tableMinWidth={props.tableMinWidth}\n                onCoords={this.handleSlatCoords}\n                onScrollLeftRequest={props.onScrollLeftRequest}\n              />\n              <TimelineLaneBg\n                businessHourSegs={hasResourceBusinessHours ? null : bgSlicedProps.businessHourSegs}\n                bgEventSegs={bgSlicedProps.bgEventSegs}\n                timelineCoords={slatCoords}\n                // empty array will result in unnecessary rerenders?\n                eventResizeSegs={(bgSlicedProps.eventResize ? bgSlicedProps.eventResize.segs as TimelineLaneSeg[] : [])}\n                dateSelectionSegs={bgSlicedProps.dateSelectionSegs}\n                nowDate={nowDate}\n                todayRange={todayRange}\n              />\n              <ResourceTimelineLanes\n                rowNodes={props.rowNodes}\n                dateProfile={dateProfile}\n                tDateProfile={props.tDateProfile}\n                nowDate={nowDate}\n                todayRange={todayRange}\n                splitProps={splitProps}\n                fallbackBusinessHours={hasResourceBusinessHours ? props.businessHours : null}\n                clientWidth={props.clientWidth}\n                minHeight={props.expandRows ? props.clientHeight : ''}\n                tableMinWidth={props.tableMinWidth}\n                innerHeights={props.rowInnerHeights}\n                slatCoords={slatCoords}\n                onRowCoords={this.handleRowCoords}\n                onRowHeightChange={props.onRowHeightChange}\n              />\n              {(context.options.nowIndicator && slatCoords && slatCoords.isDateInRange(nowDate)) && (\n                <div className=\"fc-timeline-now-indicator-container\">\n                  <NowIndicatorRoot isAxis={false} date={nowDate}>\n                    {(rootElRef, classNames, innerElRef, innerContent) => (\n                      <div\n                        ref={rootElRef}\n                        className={['fc-timeline-now-indicator-line'].concat(classNames).join(' ')}\n                        style={coordToCss(slatCoords.dateToCoord(nowDate), context.isRtl)}\n                      >\n                        {innerContent}\n                      </div>\n                    )}\n                  </NowIndicatorRoot>\n                </div>\n              )}\n            </Fragment>\n          )}\n        </NowTimer>\n      </div>\n    )\n  }\n\n  handleEl = (el: HTMLElement | null) => {\n    if (el) {\n      this.context.registerInteractiveComponent(this, { el })\n    } else {\n      this.context.unregisterInteractiveComponent(this)\n    }\n  }\n\n  handleSlatCoords = (slatCoords: TimelineCoords | null) => {\n    this.setState({ slatCoords })\n\n    if (this.props.onSlatCoords) {\n      this.props.onSlatCoords(slatCoords)\n    }\n  }\n\n  handleRowCoords = (rowCoords: PositionCache | null) => {\n    this.rowCoords = rowCoords\n\n    if (this.props.onRowCoords) {\n      this.props.onRowCoords(rowCoords)\n    }\n  }\n\n  // Hit System\n  // ------------------------------------------------------------------------------------------\n\n  queryHit(positionLeft: number, positionTop: number): Hit {\n    let rowCoords = this.rowCoords\n    let rowIndex = rowCoords.topToIndex(positionTop)\n\n    if (rowIndex != null) {\n      let resource = (this.props.rowNodes[rowIndex] as ResourceNode).resource\n\n      if (resource) { // not a group\n        let slatHit = this.slatsRef.current.positionToHit(positionLeft)\n\n        if (slatHit) {\n          return {\n            dateProfile: this.props.dateProfile,\n            dateSpan: {\n              range: slatHit.dateSpan.range,\n              allDay: slatHit.dateSpan.allDay,\n              resourceId: resource.id,\n            },\n            rect: {\n              left: slatHit.left,\n              right: slatHit.right,\n              top: rowCoords.tops[rowIndex],\n              bottom: rowCoords.bottoms[rowIndex],\n            },\n            dayEl: slatHit.dayEl,\n            layer: 0,\n          }\n        }\n      }\n    }\n\n    return null\n  }\n}\n\nfunction computeHasResourceBusinessHours(rowNodes: (GroupNode | ResourceNode)[]) {\n  for (let node of rowNodes) {\n    let resource = (node as ResourceNode).resource\n\n    if (resource && resource.businessHours) {\n      return true\n    }\n  }\n\n  return false\n}\n","import {\n  createElement, createRef, ElementDragging, PointerDragEvent, BaseComponent, ColProps,\n  ChunkConfigRowContent, ChunkConfigContent, ScrollGridSectionConfig,\n  renderScrollShim,\n  getStickyHeaderDates,\n  getStickyFooterScrollbar,\n  config,\n} from '@fullcalendar/common'\nimport { ScrollGrid } from '@fullcalendar/scrollgrid'\n\nconst MIN_RESOURCE_AREA_WIDTH = 30 // definitely bigger than scrollbars\n\nexport interface ResourceTimelineViewLayoutProps {\n  spreadsheetCols: ColProps[]\n  spreadsheetHeaderRows: ChunkConfigRowContent\n  spreadsheetBodyRows: ChunkConfigRowContent\n  timeCols: ColProps[]\n  timeHeaderContent: ChunkConfigContent\n  timeBodyContent: ChunkConfigContent\n  forPrint: boolean\n  isHeightAuto: boolean\n}\n\ninterface ResourceTimelineViewLayoutState {\n  resourceAreaWidthOverride: number | null\n}\n\n// RENAME?\nexport class ResourceTimelineViewLayout extends BaseComponent<ResourceTimelineViewLayoutProps, ResourceTimelineViewLayoutState> {\n  private scrollGridRef = createRef<ScrollGrid>()\n  private timeBodyScrollerElRef = createRef<HTMLDivElement>()\n  private spreadsheetHeaderChunkElRef = createRef<HTMLTableCellElement>()\n  private spreadsheetResizerDragging: ElementDragging\n  private rootElRef = createRef<HTMLElement>()\n  private ensureScrollGridResizeId: number = 0\n\n  state = {\n    resourceAreaWidthOverride: null,\n  }\n\n  render() {\n    let { props, state, context } = this\n    let { options } = context\n    let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(options)\n    let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(options)\n\n    let sections: ScrollGridSectionConfig[] = [\n      {\n        type: 'header',\n        key: 'header',\n        syncRowHeights: true,\n        isSticky: stickyHeaderDates,\n        chunks: [\n          {\n            key: 'datagrid',\n            elRef: this.spreadsheetHeaderChunkElRef,\n            // TODO: allow the content to specify this. have general-purpose 'content' with obj with keys\n            tableClassName: 'fc-datagrid-header',\n            rowContent: props.spreadsheetHeaderRows,\n          },\n          {\n            key: 'divider',\n            outerContent: (\n              <td role=\"presentation\" className={'fc-resource-timeline-divider ' + context.theme.getClass('tableCellShaded')} />\n            ),\n          },\n          {\n            key: 'timeline',\n            content: props.timeHeaderContent,\n          },\n        ],\n      },\n      {\n        type: 'body',\n        key: 'body',\n        syncRowHeights: true,\n        liquid: true,\n        expandRows: Boolean(options.expandRows),\n        chunks: [\n          {\n            key: 'datagrid',\n            tableClassName: 'fc-datagrid-body',\n            rowContent: props.spreadsheetBodyRows,\n          },\n          {\n            key: 'divider',\n            outerContent: (\n              <td role=\"presentation\" className={'fc-resource-timeline-divider ' + context.theme.getClass('tableCellShaded')} />\n            ),\n          },\n          {\n            key: 'timeline',\n            scrollerElRef: this.timeBodyScrollerElRef,\n            content: props.timeBodyContent,\n          },\n        ],\n      },\n    ]\n\n    if (stickyFooterScrollbar) {\n      sections.push({\n        type: 'footer',\n        key: 'footer',\n        isSticky: true,\n        chunks: [\n          {\n            key: 'datagrid',\n            content: renderScrollShim,\n          },\n          {\n            key: 'divider',\n            outerContent: (\n              <td role=\"presentation\" className={'fc-resource-timeline-divider ' + context.theme.getClass('tableCellShaded')} />\n            ),\n          },\n          {\n            key: 'timeline',\n            content: renderScrollShim,\n          },\n        ],\n      })\n    }\n\n    let resourceAreaWidth = state.resourceAreaWidthOverride != null\n      ? state.resourceAreaWidthOverride\n      : options.resourceAreaWidth\n\n    return (\n      <ScrollGrid\n        ref={this.scrollGridRef}\n        elRef={this.rootElRef}\n        liquid={!props.isHeightAuto && !props.forPrint}\n        collapsibleWidth={false}\n        colGroups={[\n          { cols: props.spreadsheetCols, width: resourceAreaWidth },\n          { cols: [] }, // for the divider\n          { cols: props.timeCols },\n        ]}\n        sections={sections}\n      />\n    )\n  }\n\n  forceTimeScroll(left: number) {\n    let scrollGrid = this.scrollGridRef.current\n    scrollGrid.forceScrollLeft(2, left) // 2 = the time area\n  }\n\n  forceResourceScroll(top: number) {\n    let scrollGrid = this.scrollGridRef.current\n    scrollGrid.forceScrollTop(1, top) // 1 = the body\n  }\n\n  getResourceScroll(): number {\n    let timeBodyScrollerEl = this.timeBodyScrollerElRef.current\n    return timeBodyScrollerEl.scrollTop\n  }\n\n  // Resource Area Resizing\n  // ------------------------------------------------------------------------------------------\n  // NOTE: a callback Ref for the resizer was firing multiple times with same elements (Preact)\n  // that's why we use spreadsheetResizerElRef instead\n\n  componentDidMount() {\n    this.initSpreadsheetResizing()\n  }\n\n  componentWillUnmount() {\n    this.destroySpreadsheetResizing()\n  }\n\n  initSpreadsheetResizing() {\n    let { isRtl, pluginHooks } = this.context\n    let ElementDraggingImpl = pluginHooks.elementDraggingImpl\n    let spreadsheetHeadEl = this.spreadsheetHeaderChunkElRef.current\n\n    if (ElementDraggingImpl) {\n      let rootEl = this.rootElRef.current\n      let dragging = this.spreadsheetResizerDragging = new ElementDraggingImpl(rootEl, '.fc-resource-timeline-divider')\n      let dragStartWidth\n      let viewWidth\n\n      dragging.emitter.on('dragstart', () => {\n        dragStartWidth = spreadsheetHeadEl.getBoundingClientRect().width\n        viewWidth = rootEl.getBoundingClientRect().width\n      })\n\n      dragging.emitter.on('dragmove', (pev: PointerDragEvent) => {\n        let newWidth = dragStartWidth + pev.deltaX * (isRtl ? -1 : 1)\n        newWidth = Math.max(newWidth, MIN_RESOURCE_AREA_WIDTH)\n        newWidth = Math.min(newWidth, viewWidth - MIN_RESOURCE_AREA_WIDTH)\n\n        // scrollgrid will ignore resize requests if there are too many :|\n        this.setState({\n          resourceAreaWidthOverride: newWidth,\n        }, this.ensureScrollGridResize)\n      })\n\n      dragging.setAutoScrollEnabled(false) // because gets weird with auto-scrolling time area\n    }\n  }\n\n  destroySpreadsheetResizing() {\n    if (this.spreadsheetResizerDragging) {\n      this.spreadsheetResizerDragging.destroy()\n    }\n  }\n\n  /*\n  ghetto debounce. don't race with ScrollGrid's resizing delay. solves #6140\n  */\n  ensureScrollGridResize = () => {\n    if (this.ensureScrollGridResizeId) {\n      clearTimeout(this.ensureScrollGridResizeId)\n    }\n    this.ensureScrollGridResizeId = setTimeout(() => {\n      this.scrollGridRef.current.handleSizing(false)\n    }, config.SCROLLGRID_RESIZE_INTERVAL + 1)\n  }\n}\n","import {\n  createElement, createRef, ViewContext, memoize,\n  Fragment, CssDimValue, ChunkContentCallbackArgs, isArraysEqual, PositionCache,\n  ScrollRequest, ScrollResponder, ViewRoot, BaseComponent, ViewOptionsRefined,\n} from '@fullcalendar/common'\nimport {\n  buildTimelineDateProfile, TimelineHeader,\n  buildSlatCols,\n  TimelineCoords,\n  TimelineDateProfile,\n} from '@fullcalendar/timeline'\nimport {\n  GroupNode, ResourceNode, ResourceViewProps, buildRowNodes,\n  ColSpec, GroupSpec, DEFAULT_RESOURCE_ORDER,\n} from '@fullcalendar/resource-common'\nimport { __assign } from 'tslib'\nimport { SpreadsheetRow } from './SpreadsheetRow'\nimport { SpreadsheetGroupRow } from './SpreadsheetGroupRow'\nimport { SpreadsheetHeader } from './SpreadsheetHeader'\nimport { ResourceTimelineGrid } from './ResourceTimelineGrid'\nimport { ResourceTimelineViewLayout } from './ResourceTimelineViewLayout'\n\ninterface ResourceTimelineViewState {\n  resourceAreaWidth: CssDimValue\n  spreadsheetColWidths: number[]\n  slatCoords?: TimelineCoords\n  slotCushionMaxWidth?: number\n}\n\ninterface ResourceTimelineViewSnapshot {\n  resourceScroll?: ResourceScrollState\n}\n\ninterface ResourceScrollState {\n  rowId: string\n  fromBottom: number\n}\n\nexport class ResourceTimelineView extends BaseComponent<ResourceViewProps, ResourceTimelineViewState> {\n  private processColOptions = memoize(processColOptions)\n  private buildTimelineDateProfile = memoize(buildTimelineDateProfile)\n  private hasNesting = memoize(hasNesting)\n  private buildRowNodes = memoize(buildRowNodes)\n  private layoutRef = createRef<ResourceTimelineViewLayout>()\n  private rowNodes: (GroupNode | ResourceNode)[] = []\n  private renderedRowNodes: (GroupNode | ResourceNode)[] = []\n  private buildRowIndex = memoize(buildRowIndex)\n  private rowCoords: PositionCache\n  private scrollResponder: ScrollResponder\n\n  constructor(props: ResourceViewProps, context: ViewContext) {\n    super(props, context)\n\n    this.state = {\n      resourceAreaWidth: context.options.resourceAreaWidth,\n      spreadsheetColWidths: [],\n    }\n  }\n\n  render() {\n    let { props, state, context } = this\n    let { options, viewSpec } = context\n    let { superHeaderRendering, groupSpecs, orderSpecs, isVGrouping, colSpecs } = this.processColOptions(context.options)\n\n    let tDateProfile = this.buildTimelineDateProfile(\n      props.dateProfile,\n      context.dateEnv,\n      options,\n      context.dateProfileGenerator,\n    )\n\n    let rowNodes = this.rowNodes = this.buildRowNodes(\n      props.resourceStore,\n      groupSpecs,\n      orderSpecs,\n      isVGrouping,\n      props.resourceEntityExpansions,\n      options.resourcesInitiallyExpanded,\n    )\n\n    let extraClassNames = [\n      'fc-resource-timeline',\n      this.hasNesting(rowNodes) ? '' : 'fc-resource-timeline-flat', // flat means there's no nesting\n      'fc-timeline',\n      options.eventOverlap === false ? 'fc-timeline-overlap-disabled' : 'fc-timeline-overlap-enabled',\n    ]\n\n    let { slotMinWidth } = options\n    let slatCols = buildSlatCols(tDateProfile, slotMinWidth || this.computeFallbackSlotMinWidth(tDateProfile))\n\n    return (\n      <ViewRoot viewSpec={viewSpec}>\n        {(rootElRef, classNames) => (\n          <div ref={rootElRef} className={extraClassNames.concat(classNames).join(' ')}>\n            <ResourceTimelineViewLayout\n              ref={this.layoutRef}\n              forPrint={props.forPrint}\n              isHeightAuto={props.isHeightAuto}\n              spreadsheetCols={\n                buildSpreadsheetCols(colSpecs, state.spreadsheetColWidths, '')\n              }\n              spreadsheetHeaderRows={(contentArg: ChunkContentCallbackArgs) => (\n                <SpreadsheetHeader // TODO: rename to SpreadsheetHeaderRows\n                  superHeaderRendering={superHeaderRendering}\n                  colSpecs={colSpecs}\n                  onColWidthChange={this.handleColWidthChange}\n                  rowInnerHeights={contentArg.rowSyncHeights}\n                />\n              )}\n              spreadsheetBodyRows={(contentArg: ChunkContentCallbackArgs) => (\n                <Fragment>\n                  {this.renderSpreadsheetRows(rowNodes, colSpecs, contentArg.rowSyncHeights)}\n                </Fragment>\n              )}\n              timeCols={slatCols}\n              timeHeaderContent={(contentArg: ChunkContentCallbackArgs) => (\n                <TimelineHeader\n                  clientWidth={contentArg.clientWidth}\n                  clientHeight={contentArg.clientHeight}\n                  tableMinWidth={contentArg.tableMinWidth}\n                  tableColGroupNode={contentArg.tableColGroupNode}\n                  dateProfile={props.dateProfile}\n                  tDateProfile={tDateProfile}\n                  slatCoords={state.slatCoords}\n                  rowInnerHeights={contentArg.rowSyncHeights}\n                  onMaxCushionWidth={slotMinWidth ? null : this.handleMaxCushionWidth}\n                />\n              )}\n              timeBodyContent={(contentArg: ChunkContentCallbackArgs) => (\n                <ResourceTimelineGrid\n                  dateProfile={props.dateProfile}\n                  clientWidth={contentArg.clientWidth}\n                  clientHeight={contentArg.clientHeight}\n                  tableMinWidth={contentArg.tableMinWidth}\n                  tableColGroupNode={contentArg.tableColGroupNode}\n                  expandRows={contentArg.expandRows}\n                  tDateProfile={tDateProfile}\n                  rowNodes={rowNodes}\n                  businessHours={props.businessHours}\n                  dateSelection={props.dateSelection}\n                  eventStore={props.eventStore}\n                  eventUiBases={props.eventUiBases}\n                  eventSelection={props.eventSelection}\n                  eventDrag={props.eventDrag}\n                  eventResize={props.eventResize}\n                  resourceStore={props.resourceStore}\n                  nextDayThreshold={context.options.nextDayThreshold}\n                  rowInnerHeights={contentArg.rowSyncHeights}\n                  onSlatCoords={this.handleSlatCoords}\n                  onRowCoords={this.handleRowCoords}\n                  onScrollLeftRequest={this.handleScrollLeftRequest}\n                  onRowHeightChange={contentArg.reportRowHeightChange}\n                />\n              )}\n            />\n          </div>\n        )}\n      </ViewRoot>\n    )\n  }\n\n  renderSpreadsheetRows(nodes: (ResourceNode | GroupNode)[], colSpecs: ColSpec[], rowSyncHeights: number[]) {\n    return nodes.map((node, index) => {\n      if ((node as GroupNode).group) {\n        return (\n          <SpreadsheetGroupRow\n            key={node.id}\n            id={node.id}\n            spreadsheetColCnt={colSpecs.length}\n            isExpanded={node.isExpanded}\n            group={(node as GroupNode).group}\n            innerHeight={rowSyncHeights[index] || ''}\n          />\n        )\n      }\n\n      if ((node as ResourceNode).resource) {\n        return (\n          <SpreadsheetRow\n            key={node.id}\n            colSpecs={colSpecs}\n            rowSpans={(node as ResourceNode).rowSpans}\n            depth={(node as ResourceNode).depth}\n            isExpanded={node.isExpanded}\n            hasChildren={(node as ResourceNode).hasChildren}\n            resource={(node as ResourceNode).resource}\n            innerHeight={rowSyncHeights[index] || ''}\n          />\n        )\n      }\n\n      return null\n    })\n  }\n\n  componentDidMount() {\n    this.renderedRowNodes = this.rowNodes\n    this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest)\n  }\n\n  getSnapshotBeforeUpdate(): ResourceTimelineViewSnapshot {\n    if (!this.props.forPrint) { // because print-view is always zero?\n      return { resourceScroll: this.queryResourceScroll() }\n    }\n    return {}\n  }\n\n  componentDidUpdate(prevProps: ResourceViewProps, prevState: ResourceTimelineViewState, snapshot: ResourceTimelineViewSnapshot) {\n    this.renderedRowNodes = this.rowNodes\n\n    this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile)\n\n    if (snapshot.resourceScroll) {\n      this.handleScrollRequest(snapshot.resourceScroll) // TODO: this gets triggered too often\n    }\n  }\n\n  componentWillUnmount() {\n    this.scrollResponder.detach()\n  }\n\n  handleSlatCoords = (slatCoords: TimelineCoords) => {\n    this.setState({ slatCoords })\n  }\n\n  handleRowCoords = (rowCoords: PositionCache) => {\n    this.rowCoords = rowCoords\n    this.scrollResponder.update(false) // TODO: could eliminate this if rowCoords lived in state\n  }\n\n  handleMaxCushionWidth = (slotCushionMaxWidth) => {\n    this.setState({\n      slotCushionMaxWidth: Math.ceil(slotCushionMaxWidth), // for less rerendering TODO: DRY\n    })\n  }\n\n  computeFallbackSlotMinWidth(tDateProfile: TimelineDateProfile) { // TODO: duplicate definition\n    return Math.max(30, ((this.state.slotCushionMaxWidth || 0) / tDateProfile.slotsPerLabel))\n  }\n\n  // Scrolling\n  // ------------------------------------------------------------------------------------------------------------------\n  // this is useful for scrolling prev/next dates while resource is scrolled down\n\n  handleScrollLeftRequest = (scrollLeft: number) => { // for ResourceTimelineGrid\n    let layout = this.layoutRef.current\n    layout.forceTimeScroll(scrollLeft)\n  }\n\n  handleScrollRequest = (request: ScrollRequest & ResourceScrollState) => { // only handles resource scroll\n    let { rowCoords } = this\n    let layout = this.layoutRef.current\n    let rowId = request.rowId || request.resourceId\n\n    if (rowCoords) {\n      if (rowId) {\n        let rowIdToIndex = this.buildRowIndex(this.renderedRowNodes)\n        let index = rowIdToIndex[rowId]\n\n        if (index != null) {\n          let scrollTop =\n            (request.fromBottom != null ?\n              rowCoords.bottoms[index] - request.fromBottom : // pixels from bottom edge\n              rowCoords.tops[index] // just use top edge\n            )\n          layout.forceResourceScroll(scrollTop)\n        }\n      }\n\n      return true\n    }\n    return null\n  }\n\n  queryResourceScroll(): ResourceScrollState {\n    let { rowCoords, renderedRowNodes } = this\n\n    if (rowCoords) {\n      let layout = this.layoutRef.current\n      let trBottoms = rowCoords.bottoms\n      let scrollTop = layout.getResourceScroll()\n      let scroll = {} as any\n\n      for (let i = 0; i < trBottoms.length; i += 1) {\n        let rowNode = renderedRowNodes[i]\n        let elBottom = trBottoms[i] - scrollTop // from the top of the scroller\n\n        if (elBottom > 0) {\n          scroll.rowId = rowNode.id\n          scroll.fromBottom = elBottom\n          break\n        }\n      }\n\n      return scroll\n    }\n    return null\n  }\n\n  // Resource INDIVIDUAL-Column Area Resizing\n  // ------------------------------------------------------------------------------------------\n\n  handleColWidthChange = (colWidths: number[]) => {\n    this.setState({\n      spreadsheetColWidths: colWidths,\n    })\n  }\n}\n\nResourceTimelineView.addStateEquality({\n  spreadsheetColWidths: isArraysEqual,\n})\n\nfunction buildRowIndex(rowNodes: (GroupNode | ResourceNode)[]) {\n  let rowIdToIndex: { [id: string]: number } = {}\n\n  for (let i = 0; i < rowNodes.length; i += 1) {\n    rowIdToIndex[rowNodes[i].id] = i\n  }\n\n  return rowIdToIndex\n}\n\nfunction buildSpreadsheetCols(colSpecs: ColSpec[], forcedWidths: number[], fallbackWidth: CssDimValue = '') {\n  return colSpecs.map((colSpec, i) => ({\n    className: colSpec.isMain ? 'fc-main-col' : '',\n    width: forcedWidths[i] || colSpec.width || fallbackWidth,\n  }))\n}\n\nfunction hasNesting(nodes: (GroupNode | ResourceNode)[]) {\n  for (let node of nodes) {\n    if ((node as GroupNode).group) {\n      return true\n    }\n\n    if ((node as ResourceNode).resource) {\n      if ((node as ResourceNode).hasChildren) {\n        return true\n      }\n    }\n  }\n\n  return false\n}\n\nfunction processColOptions(options: ViewOptionsRefined) {\n  let allColSpecs: ColSpec[] = options.resourceAreaColumns || []\n  let superHeaderRendering = null\n\n  if (!allColSpecs.length) {\n    allColSpecs.push({\n      headerClassNames: options.resourceAreaHeaderClassNames,\n      headerContent: options.resourceAreaHeaderContent || 'Resources', // TODO: view.defaults\n      headerDidMount: options.resourceAreaHeaderDidMount,\n      headerWillUnmount: options.resourceAreaHeaderWillUnmount,\n    })\n  } else if (options.resourceAreaHeaderContent) { // weird way to determine if content\n    superHeaderRendering = {\n      headerClassNames: options.resourceAreaHeaderClassNames,\n      headerContent: options.resourceAreaHeaderContent,\n      headerDidMount: options.resourceAreaHeaderDidMount,\n      headerWillUnmount: options.resourceAreaHeaderWillUnmount,\n    }\n  }\n\n  let plainColSpecs: ColSpec[] = []\n  let groupColSpecs: ColSpec[] = [] // part of the colSpecs, but filtered out in order to put first\n  let groupSpecs: GroupSpec[] = []\n  let isVGrouping = false\n\n  for (let colSpec of allColSpecs) {\n    if (colSpec.group) {\n      groupColSpecs.push({\n        ...colSpec,\n        cellClassNames: colSpec.cellClassNames || options.resourceGroupLabelClassNames,\n        cellContent: colSpec.cellContent || options.resourceGroupLabelContent,\n        cellDidMount: colSpec.cellDidMount || options.resourceGroupLabelDidMount,\n        cellWillUnmount: colSpec.cellWillUnmount || options.resourceGroupLaneWillUnmount,\n      })\n    } else {\n      plainColSpecs.push(colSpec)\n    }\n  }\n\n  // BAD: mutates a user-supplied option\n  let mainColSpec = plainColSpecs[0]\n  mainColSpec.isMain = true\n  mainColSpec.cellClassNames = mainColSpec.cellClassNames || options.resourceLabelClassNames\n  mainColSpec.cellContent = mainColSpec.cellContent || options.resourceLabelContent\n  mainColSpec.cellDidMount = mainColSpec.cellDidMount || options.resourceLabelDidMount\n  mainColSpec.cellWillUnmount = mainColSpec.cellWillUnmount || options.resourceLabelWillUnmount\n\n  if (groupColSpecs.length) {\n    groupSpecs = groupColSpecs\n    isVGrouping = true\n  } else {\n    let hGroupField = options.resourceGroupField\n    if (hGroupField) {\n      groupSpecs.push({\n        field: hGroupField,\n\n        labelClassNames: options.resourceGroupLabelClassNames,\n        labelContent: options.resourceGroupLabelContent,\n        labelDidMount: options.resourceGroupLabelDidMount,\n        labelWillUnmount: options.resourceGroupLabelWillUnmount,\n\n        laneClassNames: options.resourceGroupLaneClassNames,\n        laneContent: options.resourceGroupLaneContent,\n        laneDidMount: options.resourceGroupLaneDidMount,\n        laneWillUnmount: options.resourceGroupLaneWillUnmount,\n      })\n    }\n  }\n\n  let allOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER\n  let plainOrderSpecs = []\n\n  for (let orderSpec of allOrderSpecs) {\n    let isGroup = false\n    for (let groupSpec of groupSpecs) {\n      if (groupSpec.field === orderSpec.field) {\n        groupSpec.order = orderSpec.order // -1, 0, 1\n        isGroup = true\n        break\n      }\n    }\n    if (!isGroup) {\n      plainOrderSpecs.push(orderSpec)\n    }\n  }\n\n  return {\n    superHeaderRendering,\n    isVGrouping,\n    groupSpecs,\n    colSpecs: groupColSpecs.concat(plainColSpecs),\n    orderSpecs: plainOrderSpecs,\n  }\n}\n","import { createPlugin } from '@fullcalendar/common'\n\nimport premiumCommonPlugin from '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n// ensure ambient declarations\nimport '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n\nimport timelinePlugin from '@fullcalendar/timeline'\nimport resourceCommonPlugin from '@fullcalendar/resource-common'\nimport { ResourceTimelineView } from './ResourceTimelineView'\nimport './main.css'\n\nexport { ResourceTimelineView }\nexport { ResourceTimelineLane } from './ResourceTimelineLane'\nexport { SpreadsheetRow } from './SpreadsheetRow'\n\nexport default createPlugin({\n  deps: [\n    premiumCommonPlugin,\n    resourceCommonPlugin,\n    timelinePlugin,\n  ],\n  initialView: 'resourceTimelineDay',\n  views: {\n\n    resourceTimeline: {\n      type: 'timeline', // inherit configuration\n      component: ResourceTimelineView,\n      needsResourceData: true,\n      resourceAreaWidth: '30%',\n      resourcesInitiallyExpanded: true,\n      eventResizableFromStart: true, // TODO: not DRY with this same setting in the main timeline config\n    },\n\n    resourceTimelineDay: {\n      type: 'resourceTimeline',\n      duration: { days: 1 },\n    },\n\n    resourceTimelineWeek: {\n      type: 'resourceTimeline',\n      duration: { weeks: 1 },\n    },\n\n    resourceTimelineMonth: {\n      type: 'resourceTimeline',\n      duration: { months: 1 },\n    },\n\n    resourceTimelineYear: {\n      type: 'resourceTimeline',\n      duration: { years: 1 },\n    },\n\n  },\n})\n","import { config, elementClosest, Emitter, PointerDragEvent } from '@fullcalendar/common'\n\nconfig.touchMouseIgnoreWait = 500\n\nlet ignoreMouseDepth = 0\nlet listenerCnt = 0\nlet isWindowTouchMoveCancelled = false\n\n/*\nUses a \"pointer\" abstraction, which monitors UI events for both mouse and touch.\nTracks when the pointer \"drags\" on a certain element, meaning down+move+up.\n\nAlso, tracks if there was touch-scrolling.\nAlso, can prevent touch-scrolling from happening.\nAlso, can fire pointermove events when scrolling happens underneath, even when no real pointer movement.\n\nemits:\n- pointerdown\n- pointermove\n- pointerup\n*/\nexport class PointerDragging {\n  containerEl: EventTarget\n  subjectEl: HTMLElement | null = null\n  emitter: Emitter<any>\n\n  // options that can be directly assigned by caller\n  selector: string = '' // will cause subjectEl in all emitted events to be this element\n  handleSelector: string = ''\n  shouldIgnoreMove: boolean = false\n  shouldWatchScroll: boolean = true // for simulating pointermove on scroll\n\n  // internal states\n  isDragging: boolean = false\n  isTouchDragging: boolean = false\n  wasTouchScroll: boolean = false\n  origPageX: number\n  origPageY: number\n  prevPageX: number\n  prevPageY: number\n  prevScrollX: number // at time of last pointer pageX/pageY capture\n  prevScrollY: number // \"\n\n  constructor(containerEl: EventTarget) {\n    this.containerEl = containerEl\n    this.emitter = new Emitter()\n    containerEl.addEventListener('mousedown', this.handleMouseDown as EventListener)\n    containerEl.addEventListener('touchstart', this.handleTouchStart as EventListener, { passive: true })\n    listenerCreated()\n  }\n\n  destroy() {\n    this.containerEl.removeEventListener('mousedown', this.handleMouseDown as EventListener)\n    this.containerEl.removeEventListener('touchstart', this.handleTouchStart as EventListener, { passive: true } as AddEventListenerOptions)\n    listenerDestroyed()\n  }\n\n  tryStart(ev: UIEvent): boolean {\n    let subjectEl = this.querySubjectEl(ev)\n    let downEl = ev.target as HTMLElement\n\n    if (\n      subjectEl &&\n      (!this.handleSelector || elementClosest(downEl, this.handleSelector))\n    ) {\n      this.subjectEl = subjectEl\n      this.isDragging = true // do this first so cancelTouchScroll will work\n      this.wasTouchScroll = false\n\n      return true\n    }\n\n    return false\n  }\n\n  cleanup() {\n    isWindowTouchMoveCancelled = false\n    this.isDragging = false\n    this.subjectEl = null\n    // keep wasTouchScroll around for later access\n    this.destroyScrollWatch()\n  }\n\n  querySubjectEl(ev: UIEvent): HTMLElement {\n    if (this.selector) {\n      return elementClosest(ev.target as HTMLElement, this.selector)\n    }\n    return this.containerEl as HTMLElement\n  }\n\n  // Mouse\n  // ----------------------------------------------------------------------------------------------------\n\n  handleMouseDown = (ev: MouseEvent) => {\n    if (\n      !this.shouldIgnoreMouse() &&\n      isPrimaryMouseButton(ev) &&\n      this.tryStart(ev)\n    ) {\n      let pev = this.createEventFromMouse(ev, true)\n      this.emitter.trigger('pointerdown', pev)\n      this.initScrollWatch(pev)\n\n      if (!this.shouldIgnoreMove) {\n        document.addEventListener('mousemove', this.handleMouseMove)\n      }\n\n      document.addEventListener('mouseup', this.handleMouseUp)\n    }\n  }\n\n  handleMouseMove = (ev: MouseEvent) => {\n    let pev = this.createEventFromMouse(ev)\n    this.recordCoords(pev)\n    this.emitter.trigger('pointermove', pev)\n  }\n\n  handleMouseUp = (ev: MouseEvent) => {\n    document.removeEventListener('mousemove', this.handleMouseMove)\n    document.removeEventListener('mouseup', this.handleMouseUp)\n\n    this.emitter.trigger('pointerup', this.createEventFromMouse(ev))\n\n    this.cleanup() // call last so that pointerup has access to props\n  }\n\n  shouldIgnoreMouse() {\n    return ignoreMouseDepth || this.isTouchDragging\n  }\n\n  // Touch\n  // ----------------------------------------------------------------------------------------------------\n\n  handleTouchStart = (ev: TouchEvent) => {\n    if (this.tryStart(ev)) {\n      this.isTouchDragging = true\n\n      let pev = this.createEventFromTouch(ev, true)\n      this.emitter.trigger('pointerdown', pev)\n      this.initScrollWatch(pev)\n\n      // unlike mouse, need to attach to target, not document\n      // https://stackoverflow.com/a/45760014\n      let targetEl = ev.target as HTMLElement\n\n      if (!this.shouldIgnoreMove) {\n        targetEl.addEventListener('touchmove', this.handleTouchMove)\n      }\n\n      targetEl.addEventListener('touchend', this.handleTouchEnd)\n      targetEl.addEventListener('touchcancel', this.handleTouchEnd) // treat it as a touch end\n\n      // attach a handler to get called when ANY scroll action happens on the page.\n      // this was impossible to do with normal on/off because 'scroll' doesn't bubble.\n      // http://stackoverflow.com/a/32954565/96342\n      window.addEventListener(\n        'scroll',\n        this.handleTouchScroll,\n        true, // useCapture\n      )\n    }\n  }\n\n  handleTouchMove = (ev: TouchEvent) => {\n    let pev = this.createEventFromTouch(ev)\n    this.recordCoords(pev)\n    this.emitter.trigger('pointermove', pev)\n  }\n\n  handleTouchEnd = (ev: TouchEvent) => {\n    if (this.isDragging) { // done to guard against touchend followed by touchcancel\n      let targetEl = ev.target as HTMLElement\n\n      targetEl.removeEventListener('touchmove', this.handleTouchMove)\n      targetEl.removeEventListener('touchend', this.handleTouchEnd)\n      targetEl.removeEventListener('touchcancel', this.handleTouchEnd)\n      window.removeEventListener('scroll', this.handleTouchScroll, true) // useCaptured=true\n\n      this.emitter.trigger('pointerup', this.createEventFromTouch(ev))\n\n      this.cleanup() // call last so that pointerup has access to props\n      this.isTouchDragging = false\n      startIgnoringMouse()\n    }\n  }\n\n  handleTouchScroll = () => {\n    this.wasTouchScroll = true\n  }\n\n  // can be called by user of this class, to cancel touch-based scrolling for the current drag\n  cancelTouchScroll() {\n    if (this.isDragging) {\n      isWindowTouchMoveCancelled = true\n    }\n  }\n\n  // Scrolling that simulates pointermoves\n  // ----------------------------------------------------------------------------------------------------\n\n  initScrollWatch(ev: PointerDragEvent) {\n    if (this.shouldWatchScroll) {\n      this.recordCoords(ev)\n      window.addEventListener('scroll', this.handleScroll, true) // useCapture=true\n    }\n  }\n\n  recordCoords(ev: PointerDragEvent) {\n    if (this.shouldWatchScroll) {\n      this.prevPageX = (ev as any).pageX\n      this.prevPageY = (ev as any).pageY\n      this.prevScrollX = window.pageXOffset\n      this.prevScrollY = window.pageYOffset\n    }\n  }\n\n  handleScroll = (ev: UIEvent) => {\n    if (!this.shouldIgnoreMove) {\n      let pageX = (window.pageXOffset - this.prevScrollX) + this.prevPageX\n      let pageY = (window.pageYOffset - this.prevScrollY) + this.prevPageY\n\n      this.emitter.trigger('pointermove', {\n        origEvent: ev,\n        isTouch: this.isTouchDragging,\n        subjectEl: this.subjectEl,\n        pageX,\n        pageY,\n        deltaX: pageX - this.origPageX,\n        deltaY: pageY - this.origPageY,\n      } as PointerDragEvent)\n    }\n  }\n\n  destroyScrollWatch() {\n    if (this.shouldWatchScroll) {\n      window.removeEventListener('scroll', this.handleScroll, true) // useCaptured=true\n    }\n  }\n\n  // Event Normalization\n  // ----------------------------------------------------------------------------------------------------\n\n  createEventFromMouse(ev: MouseEvent, isFirst?: boolean): PointerDragEvent {\n    let deltaX = 0\n    let deltaY = 0\n\n    // TODO: repeat code\n    if (isFirst) {\n      this.origPageX = ev.pageX\n      this.origPageY = ev.pageY\n    } else {\n      deltaX = ev.pageX - this.origPageX\n      deltaY = ev.pageY - this.origPageY\n    }\n\n    return {\n      origEvent: ev,\n      isTouch: false,\n      subjectEl: this.subjectEl,\n      pageX: ev.pageX,\n      pageY: ev.pageY,\n      deltaX,\n      deltaY,\n    }\n  }\n\n  createEventFromTouch(ev: TouchEvent, isFirst?: boolean): PointerDragEvent {\n    let touches = ev.touches\n    let pageX\n    let pageY\n    let deltaX = 0\n    let deltaY = 0\n\n    // if touch coords available, prefer,\n    // because FF would give bad ev.pageX ev.pageY\n    if (touches && touches.length) {\n      pageX = touches[0].pageX\n      pageY = touches[0].pageY\n    } else {\n      pageX = (ev as any).pageX\n      pageY = (ev as any).pageY\n    }\n\n    // TODO: repeat code\n    if (isFirst) {\n      this.origPageX = pageX\n      this.origPageY = pageY\n    } else {\n      deltaX = pageX - this.origPageX\n      deltaY = pageY - this.origPageY\n    }\n\n    return {\n      origEvent: ev,\n      isTouch: true,\n      subjectEl: this.subjectEl,\n      pageX,\n      pageY,\n      deltaX,\n      deltaY,\n    }\n  }\n}\n\n// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)\nfunction isPrimaryMouseButton(ev: MouseEvent) {\n  return ev.button === 0 && !ev.ctrlKey\n}\n\n// Ignoring fake mouse events generated by touch\n// ----------------------------------------------------------------------------------------------------\n\nfunction startIgnoringMouse() { // can be made non-class function\n  ignoreMouseDepth += 1\n\n  setTimeout(() => {\n    ignoreMouseDepth -= 1\n  }, config.touchMouseIgnoreWait)\n}\n\n// We want to attach touchmove as early as possible for Safari\n// ----------------------------------------------------------------------------------------------------\n\nfunction listenerCreated() {\n  listenerCnt += 1\n\n  if (listenerCnt === 1) {\n    window.addEventListener('touchmove', onWindowTouchMove, { passive: false })\n  }\n}\n\nfunction listenerDestroyed() {\n  listenerCnt -= 1\n\n  if (!listenerCnt) {\n    window.removeEventListener('touchmove', onWindowTouchMove, { passive: false } as AddEventListenerOptions)\n  }\n}\n\nfunction onWindowTouchMove(ev: UIEvent) {\n  if (isWindowTouchMoveCancelled) {\n    ev.preventDefault()\n  }\n}\n","import { removeElement, applyStyle, whenTransitionDone, Rect } from '@fullcalendar/common'\n\n/*\nAn effect in which an element follows the movement of a pointer across the screen.\nThe moving element is a clone of some other element.\nMust call start + handleMove + stop.\n*/\nexport class ElementMirror {\n  isVisible: boolean = false // must be explicitly enabled\n  origScreenX?: number\n  origScreenY?: number\n  deltaX?: number\n  deltaY?: number\n  sourceEl: HTMLElement | null = null\n  mirrorEl: HTMLElement | null = null\n  sourceElRect: Rect | null = null // screen coords relative to viewport\n\n  // options that can be set directly by caller\n  parentNode: HTMLElement = document.body // HIGHLY SUGGESTED to set this to sidestep ShadowDOM issues\n  zIndex: number = 9999\n  revertDuration: number = 0\n\n  start(sourceEl: HTMLElement, pageX: number, pageY: number) {\n    this.sourceEl = sourceEl\n    this.sourceElRect = this.sourceEl.getBoundingClientRect()\n    this.origScreenX = pageX - window.pageXOffset\n    this.origScreenY = pageY - window.pageYOffset\n    this.deltaX = 0\n    this.deltaY = 0\n    this.updateElPosition()\n  }\n\n  handleMove(pageX: number, pageY: number) {\n    this.deltaX = (pageX - window.pageXOffset) - this.origScreenX!\n    this.deltaY = (pageY - window.pageYOffset) - this.origScreenY!\n    this.updateElPosition()\n  }\n\n  // can be called before start\n  setIsVisible(bool: boolean) {\n    if (bool) {\n      if (!this.isVisible) {\n        if (this.mirrorEl) {\n          this.mirrorEl.style.display = ''\n        }\n\n        this.isVisible = bool // needs to happen before updateElPosition\n        this.updateElPosition() // because was not updating the position while invisible\n      }\n    } else if (this.isVisible) {\n      if (this.mirrorEl) {\n        this.mirrorEl.style.display = 'none'\n      }\n\n      this.isVisible = bool\n    }\n  }\n\n  // always async\n  stop(needsRevertAnimation: boolean, callback: () => void) {\n    let done = () => {\n      this.cleanup()\n      callback()\n    }\n\n    if (\n      needsRevertAnimation &&\n      this.mirrorEl &&\n      this.isVisible &&\n      this.revertDuration && // if 0, transition won't work\n      (this.deltaX || this.deltaY) // if same coords, transition won't work\n    ) {\n      this.doRevertAnimation(done, this.revertDuration)\n    } else {\n      setTimeout(done, 0)\n    }\n  }\n\n  doRevertAnimation(callback: () => void, revertDuration: number) {\n    let mirrorEl = this.mirrorEl!\n    let finalSourceElRect = this.sourceEl!.getBoundingClientRect() // because autoscrolling might have happened\n\n    mirrorEl.style.transition =\n      'top ' + revertDuration + 'ms,' +\n      'left ' + revertDuration + 'ms'\n\n    applyStyle(mirrorEl, {\n      left: finalSourceElRect.left,\n      top: finalSourceElRect.top,\n    })\n\n    whenTransitionDone(mirrorEl, () => {\n      mirrorEl.style.transition = ''\n      callback()\n    })\n  }\n\n  cleanup() {\n    if (this.mirrorEl) {\n      removeElement(this.mirrorEl)\n      this.mirrorEl = null\n    }\n\n    this.sourceEl = null\n  }\n\n  updateElPosition() {\n    if (this.sourceEl && this.isVisible) {\n      applyStyle(this.getMirrorEl(), {\n        left: this.sourceElRect!.left + this.deltaX!,\n        top: this.sourceElRect!.top + this.deltaY!,\n      })\n    }\n  }\n\n  getMirrorEl(): HTMLElement {\n    let sourceElRect = this.sourceElRect!\n    let mirrorEl = this.mirrorEl\n\n    if (!mirrorEl) {\n      mirrorEl = this.mirrorEl = this.sourceEl!.cloneNode(true) as HTMLElement // cloneChildren=true\n\n      // we don't want long taps or any mouse interaction causing selection/menus.\n      // would use preventSelection(), but that prevents selectstart, causing problems.\n      mirrorEl.classList.add('fc-unselectable')\n\n      mirrorEl.classList.add('fc-event-dragging')\n\n      applyStyle(mirrorEl, {\n        position: 'fixed',\n        zIndex: this.zIndex,\n        visibility: '', // in case original element was hidden by the drag effect\n        boxSizing: 'border-box', // for easy width/height\n        width: sourceElRect.right - sourceElRect.left, // explicit height in case there was a 'right' value\n        height: sourceElRect.bottom - sourceElRect.top, // explicit width in case there was a 'bottom' value\n        right: 'auto', // erase and set width instead\n        bottom: 'auto', // erase and set height instead\n        margin: 0,\n      })\n\n      this.parentNode.appendChild(mirrorEl)\n    }\n\n    return mirrorEl\n  }\n}\n","import { Rect, ScrollController } from '@fullcalendar/common'\n\n/*\nIs a cache for a given element's scroll information (all the info that ScrollController stores)\nin addition the \"client rectangle\" of the element.. the area within the scrollbars.\n\nThe cache can be in one of two modes:\n- doesListening:false - ignores when the container is scrolled by someone else\n- doesListening:true - watch for scrolling and update the cache\n*/\nexport abstract class ScrollGeomCache extends ScrollController {\n  clientRect: Rect\n  origScrollTop: number\n  origScrollLeft: number\n\n  protected scrollController: ScrollController\n  protected doesListening: boolean\n  protected scrollTop: number\n  protected scrollLeft: number\n  protected scrollWidth: number\n  protected scrollHeight: number\n  protected clientWidth: number\n  protected clientHeight: number\n\n  constructor(scrollController: ScrollController, doesListening: boolean) {\n    super()\n    this.scrollController = scrollController\n    this.doesListening = doesListening\n    this.scrollTop = this.origScrollTop = scrollController.getScrollTop()\n    this.scrollLeft = this.origScrollLeft = scrollController.getScrollLeft()\n    this.scrollWidth = scrollController.getScrollWidth()\n    this.scrollHeight = scrollController.getScrollHeight()\n    this.clientWidth = scrollController.getClientWidth()\n    this.clientHeight = scrollController.getClientHeight()\n    this.clientRect = this.computeClientRect() // do last in case it needs cached values\n\n    if (this.doesListening) {\n      this.getEventTarget().addEventListener('scroll', this.handleScroll)\n    }\n  }\n\n  abstract getEventTarget(): EventTarget\n  abstract computeClientRect(): Rect\n\n  destroy() {\n    if (this.doesListening) {\n      this.getEventTarget().removeEventListener('scroll', this.handleScroll)\n    }\n  }\n\n  handleScroll = () => {\n    this.scrollTop = this.scrollController.getScrollTop()\n    this.scrollLeft = this.scrollController.getScrollLeft()\n    this.handleScrollChange()\n  }\n\n  getScrollTop() {\n    return this.scrollTop\n  }\n\n  getScrollLeft() {\n    return this.scrollLeft\n  }\n\n  setScrollTop(top: number) {\n    this.scrollController.setScrollTop(top)\n\n    if (!this.doesListening) {\n      // we are not relying on the element to normalize out-of-bounds scroll values\n      // so we need to sanitize ourselves\n      this.scrollTop = Math.max(Math.min(top, this.getMaxScrollTop()), 0)\n\n      this.handleScrollChange()\n    }\n  }\n\n  setScrollLeft(top: number) {\n    this.scrollController.setScrollLeft(top)\n\n    if (!this.doesListening) {\n      // we are not relying on the element to normalize out-of-bounds scroll values\n      // so we need to sanitize ourselves\n      this.scrollLeft = Math.max(Math.min(top, this.getMaxScrollLeft()), 0)\n\n      this.handleScrollChange()\n    }\n  }\n\n  getClientWidth() {\n    return this.clientWidth\n  }\n\n  getClientHeight() {\n    return this.clientHeight\n  }\n\n  getScrollWidth() {\n    return this.scrollWidth\n  }\n\n  getScrollHeight() {\n    return this.scrollHeight\n  }\n\n  handleScrollChange() {\n  }\n}\n","import { computeInnerRect, ElementScrollController } from '@fullcalendar/common'\nimport { ScrollGeomCache } from './ScrollGeomCache'\n\nexport class ElementScrollGeomCache extends ScrollGeomCache {\n  constructor(el: HTMLElement, doesListening: boolean) {\n    super(new ElementScrollController(el), doesListening)\n  }\n\n  getEventTarget(): EventTarget {\n    return (this.scrollController as ElementScrollController).el\n  }\n\n  computeClientRect() {\n    return computeInnerRect((this.scrollController as ElementScrollController).el)\n  }\n}\n","import { Rect, WindowScrollController } from '@fullcalendar/common'\nimport { ScrollGeomCache } from './ScrollGeomCache'\n\nexport class WindowScrollGeomCache extends ScrollGeomCache {\n  constructor(doesListening: boolean) {\n    super(new WindowScrollController(), doesListening)\n  }\n\n  getEventTarget(): EventTarget {\n    return window\n  }\n\n  computeClientRect(): Rect {\n    return {\n      left: this.scrollLeft,\n      right: this.scrollLeft + this.clientWidth,\n      top: this.scrollTop,\n      bottom: this.scrollTop + this.clientHeight,\n    }\n  }\n\n  // the window is the only scroll object that changes it's rectangle relative\n  // to the document's topleft as it scrolls\n  handleScrollChange() {\n    this.clientRect = this.computeClientRect()\n  }\n}\n","import { getElRoot } from '@fullcalendar/common'\nimport { ScrollGeomCache } from '../ScrollGeomCache'\nimport { ElementScrollGeomCache } from '../ElementScrollGeomCache'\nimport { WindowScrollGeomCache } from '../WindowScrollGeomCache'\n\ninterface Edge {\n  scrollCache: ScrollGeomCache\n  name: 'top' | 'left' | 'right' | 'bottom'\n  distance: number // how many pixels the current pointer is from the edge\n}\n\n// If available we are using native \"performance\" API instead of \"Date\"\n// Read more about it on MDN:\n// https://developer.mozilla.org/en-US/docs/Web/API/Performance\nconst getTime = typeof performance === 'function' ? (performance as any).now : Date.now\n\n/*\nFor a pointer interaction, automatically scrolls certain scroll containers when the pointer\napproaches the edge.\n\nThe caller must call start + handleMove + stop.\n*/\nexport class AutoScroller {\n  // options that can be set by caller\n  isEnabled: boolean = true\n  scrollQuery: (Window | string)[] = [window, '.fc-scroller']\n  edgeThreshold: number = 50 // pixels\n  maxVelocity: number = 300 // pixels per second\n\n  // internal state\n  pointerScreenX: number | null = null\n  pointerScreenY: number | null = null\n  isAnimating: boolean = false\n  scrollCaches: ScrollGeomCache[] | null = null\n  msSinceRequest?: number\n\n  // protect against the initial pointerdown being too close to an edge and starting the scroll\n  everMovedUp: boolean = false\n  everMovedDown: boolean = false\n  everMovedLeft: boolean = false\n  everMovedRight: boolean = false\n\n  start(pageX: number, pageY: number, scrollStartEl: HTMLElement) {\n    if (this.isEnabled) {\n      this.scrollCaches = this.buildCaches(scrollStartEl)\n      this.pointerScreenX = null\n      this.pointerScreenY = null\n      this.everMovedUp = false\n      this.everMovedDown = false\n      this.everMovedLeft = false\n      this.everMovedRight = false\n      this.handleMove(pageX, pageY)\n    }\n  }\n\n  handleMove(pageX: number, pageY: number) {\n    if (this.isEnabled) {\n      let pointerScreenX = pageX - window.pageXOffset\n      let pointerScreenY = pageY - window.pageYOffset\n\n      let yDelta = this.pointerScreenY === null ? 0 : pointerScreenY - this.pointerScreenY\n      let xDelta = this.pointerScreenX === null ? 0 : pointerScreenX - this.pointerScreenX\n\n      if (yDelta < 0) {\n        this.everMovedUp = true\n      } else if (yDelta > 0) {\n        this.everMovedDown = true\n      }\n\n      if (xDelta < 0) {\n        this.everMovedLeft = true\n      } else if (xDelta > 0) {\n        this.everMovedRight = true\n      }\n\n      this.pointerScreenX = pointerScreenX\n      this.pointerScreenY = pointerScreenY\n\n      if (!this.isAnimating) {\n        this.isAnimating = true\n        this.requestAnimation(getTime())\n      }\n    }\n  }\n\n  stop() {\n    if (this.isEnabled) {\n      this.isAnimating = false // will stop animation\n\n      for (let scrollCache of this.scrollCaches!) {\n        scrollCache.destroy()\n      }\n\n      this.scrollCaches = null\n    }\n  }\n\n  requestAnimation(now: number) {\n    this.msSinceRequest = now\n    requestAnimationFrame(this.animate)\n  }\n\n  private animate = () => {\n    if (this.isAnimating) { // wasn't cancelled between animation calls\n      let edge = this.computeBestEdge(\n        this.pointerScreenX! + window.pageXOffset,\n        this.pointerScreenY! + window.pageYOffset,\n      )\n\n      if (edge) {\n        let now = getTime()\n        this.handleSide(edge, (now - this.msSinceRequest!) / 1000)\n        this.requestAnimation(now)\n      } else {\n        this.isAnimating = false // will stop animation\n      }\n    }\n  }\n\n  private handleSide(edge: Edge, seconds: number) {\n    let { scrollCache } = edge\n    let { edgeThreshold } = this\n    let invDistance = edgeThreshold - edge.distance\n    let velocity = // the closer to the edge, the faster we scroll\n      ((invDistance * invDistance) / (edgeThreshold * edgeThreshold)) * // quadratic\n      this.maxVelocity * seconds\n    let sign = 1\n\n    switch (edge.name) {\n      case 'left':\n        sign = -1\n        // falls through\n      case 'right':\n        scrollCache.setScrollLeft(scrollCache.getScrollLeft() + velocity * sign)\n        break\n\n      case 'top':\n        sign = -1\n        // falls through\n      case 'bottom':\n        scrollCache.setScrollTop(scrollCache.getScrollTop() + velocity * sign)\n        break\n    }\n  }\n\n  // left/top are relative to document topleft\n  private computeBestEdge(left: number, top: number): Edge | null {\n    let { edgeThreshold } = this\n    let bestSide: Edge | null = null\n    let scrollCaches = this.scrollCaches || []\n\n    for (let scrollCache of scrollCaches) {\n      let rect = scrollCache.clientRect\n      let leftDist = left - rect.left\n      let rightDist = rect.right - left\n      let topDist = top - rect.top\n      let bottomDist = rect.bottom - top\n\n      // completely within the rect?\n      if (leftDist >= 0 && rightDist >= 0 && topDist >= 0 && bottomDist >= 0) {\n        if (\n          topDist <= edgeThreshold && this.everMovedUp && scrollCache.canScrollUp() &&\n          (!bestSide || bestSide.distance > topDist)\n        ) {\n          bestSide = { scrollCache, name: 'top', distance: topDist }\n        }\n\n        if (\n          bottomDist <= edgeThreshold && this.everMovedDown && scrollCache.canScrollDown() &&\n          (!bestSide || bestSide.distance > bottomDist)\n        ) {\n          bestSide = { scrollCache, name: 'bottom', distance: bottomDist }\n        }\n\n        if (\n          leftDist <= edgeThreshold && this.everMovedLeft && scrollCache.canScrollLeft() &&\n          (!bestSide || bestSide.distance > leftDist)\n        ) {\n          bestSide = { scrollCache, name: 'left', distance: leftDist }\n        }\n\n        if (\n          rightDist <= edgeThreshold && this.everMovedRight && scrollCache.canScrollRight() &&\n          (!bestSide || bestSide.distance > rightDist)\n        ) {\n          bestSide = { scrollCache, name: 'right', distance: rightDist }\n        }\n      }\n    }\n\n    return bestSide\n  }\n\n  private buildCaches(scrollStartEl: HTMLElement) {\n    return this.queryScrollEls(scrollStartEl).map((el) => {\n      if (el === window) {\n        return new WindowScrollGeomCache(false) // false = don't listen to user-generated scrolls\n      }\n      return new ElementScrollGeomCache(el, false) // false = don't listen to user-generated scrolls\n    })\n  }\n\n  private queryScrollEls(scrollStartEl: HTMLElement) {\n    let els = []\n\n    for (let query of this.scrollQuery) {\n      if (typeof query === 'object') {\n        els.push(query)\n      } else {\n        els.push(...Array.prototype.slice.call(\n          getElRoot(scrollStartEl).querySelectorAll(query),\n        ))\n      }\n    }\n\n    return els\n  }\n}\n","import {\n  PointerDragEvent,\n  preventSelection,\n  allowSelection,\n  preventContextMenu,\n  allowContextMenu,\n  ElementDragging,\n} from '@fullcalendar/common'\nimport { PointerDragging } from './PointerDragging'\nimport { ElementMirror } from './ElementMirror'\nimport { AutoScroller } from './AutoScroller'\n\n/*\nMonitors dragging on an element. Has a number of high-level features:\n- minimum distance required before dragging\n- minimum wait time (\"delay\") before dragging\n- a mirror element that follows the pointer\n*/\nexport class FeaturefulElementDragging extends ElementDragging {\n  pointer: PointerDragging\n  mirror: ElementMirror\n  autoScroller: AutoScroller\n\n  // options that can be directly set by caller\n  // the caller can also set the PointerDragging's options as well\n  delay: number | null = null\n  minDistance: number = 0\n  touchScrollAllowed: boolean = true // prevents drag from starting and blocks scrolling during drag\n\n  mirrorNeedsRevert: boolean = false\n  isInteracting: boolean = false // is the user validly moving the pointer? lasts until pointerup\n  isDragging: boolean = false // is it INTENTFULLY dragging? lasts until after revert animation\n  isDelayEnded: boolean = false\n  isDistanceSurpassed: boolean = false\n  delayTimeoutId: number | null = null\n\n  constructor(private containerEl: HTMLElement, selector?: string) {\n    super(containerEl)\n\n    let pointer = this.pointer = new PointerDragging(containerEl)\n    pointer.emitter.on('pointerdown', this.onPointerDown)\n    pointer.emitter.on('pointermove', this.onPointerMove)\n    pointer.emitter.on('pointerup', this.onPointerUp)\n\n    if (selector) {\n      pointer.selector = selector\n    }\n\n    this.mirror = new ElementMirror()\n    this.autoScroller = new AutoScroller()\n  }\n\n  destroy() {\n    this.pointer.destroy()\n\n    // HACK: simulate a pointer-up to end the current drag\n    // TODO: fire 'dragend' directly and stop interaction. discourage use of pointerup event (b/c might not fire)\n    this.onPointerUp({} as any)\n  }\n\n  onPointerDown = (ev: PointerDragEvent) => {\n    if (!this.isDragging) { // so new drag doesn't happen while revert animation is going\n      this.isInteracting = true\n      this.isDelayEnded = false\n      this.isDistanceSurpassed = false\n\n      preventSelection(document.body)\n      preventContextMenu(document.body)\n\n      // prevent links from being visited if there's an eventual drag.\n      // also prevents selection in older browsers (maybe?).\n      // not necessary for touch, besides, browser would complain about passiveness.\n      if (!ev.isTouch) {\n        ev.origEvent.preventDefault()\n      }\n\n      this.emitter.trigger('pointerdown', ev)\n\n      if (\n        this.isInteracting && // not destroyed via pointerdown handler\n        !this.pointer.shouldIgnoreMove\n      ) {\n        // actions related to initiating dragstart+dragmove+dragend...\n\n        this.mirror.setIsVisible(false) // reset. caller must set-visible\n        this.mirror.start(ev.subjectEl as HTMLElement, ev.pageX, ev.pageY) // must happen on first pointer down\n\n        this.startDelay(ev)\n\n        if (!this.minDistance) {\n          this.handleDistanceSurpassed(ev)\n        }\n      }\n    }\n  }\n\n  onPointerMove = (ev: PointerDragEvent) => {\n    if (this.isInteracting) {\n      this.emitter.trigger('pointermove', ev)\n\n      if (!this.isDistanceSurpassed) {\n        let minDistance = this.minDistance\n        let distanceSq // current distance from the origin, squared\n        let { deltaX, deltaY } = ev\n\n        distanceSq = deltaX * deltaX + deltaY * deltaY\n        if (distanceSq >= minDistance * minDistance) { // use pythagorean theorem\n          this.handleDistanceSurpassed(ev)\n        }\n      }\n\n      if (this.isDragging) {\n        // a real pointer move? (not one simulated by scrolling)\n        if (ev.origEvent.type !== 'scroll') {\n          this.mirror.handleMove(ev.pageX, ev.pageY)\n          this.autoScroller.handleMove(ev.pageX, ev.pageY)\n        }\n\n        this.emitter.trigger('dragmove', ev)\n      }\n    }\n  }\n\n  onPointerUp = (ev: PointerDragEvent) => {\n    if (this.isInteracting) {\n      this.isInteracting = false\n\n      allowSelection(document.body)\n      allowContextMenu(document.body)\n\n      this.emitter.trigger('pointerup', ev) // can potentially set mirrorNeedsRevert\n\n      if (this.isDragging) {\n        this.autoScroller.stop()\n        this.tryStopDrag(ev) // which will stop the mirror\n      }\n\n      if (this.delayTimeoutId) {\n        clearTimeout(this.delayTimeoutId)\n        this.delayTimeoutId = null\n      }\n    }\n  }\n\n  startDelay(ev: PointerDragEvent) {\n    if (typeof this.delay === 'number') {\n      this.delayTimeoutId = setTimeout(() => {\n        this.delayTimeoutId = null\n        this.handleDelayEnd(ev)\n      }, this.delay) as any // not assignable to number!\n    } else {\n      this.handleDelayEnd(ev)\n    }\n  }\n\n  handleDelayEnd(ev: PointerDragEvent) {\n    this.isDelayEnded = true\n    this.tryStartDrag(ev)\n  }\n\n  handleDistanceSurpassed(ev: PointerDragEvent) {\n    this.isDistanceSurpassed = true\n    this.tryStartDrag(ev)\n  }\n\n  tryStartDrag(ev: PointerDragEvent) {\n    if (this.isDelayEnded && this.isDistanceSurpassed) {\n      if (!this.pointer.wasTouchScroll || this.touchScrollAllowed) {\n        this.isDragging = true\n        this.mirrorNeedsRevert = false\n\n        this.autoScroller.start(ev.pageX, ev.pageY, this.containerEl)\n        this.emitter.trigger('dragstart', ev)\n\n        if (this.touchScrollAllowed === false) {\n          this.pointer.cancelTouchScroll()\n        }\n      }\n    }\n  }\n\n  tryStopDrag(ev: PointerDragEvent) {\n    // .stop() is ALWAYS asynchronous, which we NEED because we want all pointerup events\n    // that come from the document to fire beforehand. much more convenient this way.\n    this.mirror.stop(\n      this.mirrorNeedsRevert,\n      this.stopDrag.bind(this, ev), // bound with args\n    )\n  }\n\n  stopDrag(ev: PointerDragEvent) {\n    this.isDragging = false\n    this.emitter.trigger('dragend', ev)\n  }\n\n  // fill in the implementations...\n\n  setIgnoreMove(bool: boolean) {\n    this.pointer.shouldIgnoreMove = bool\n  }\n\n  setMirrorIsVisible(bool: boolean) {\n    this.mirror.setIsVisible(bool)\n  }\n\n  setMirrorNeedsRevert(bool: boolean) {\n    this.mirrorNeedsRevert = bool\n  }\n\n  setAutoScrollEnabled(bool: boolean) {\n    this.autoScroller.isEnabled = bool\n  }\n}\n","import {\n  getClippingParents, computeRect,\n  pointInsideRect, Rect,\n} from '@fullcalendar/common'\nimport { ElementScrollGeomCache } from './ElementScrollGeomCache'\n\n/*\nWhen this class is instantiated, it records the offset of an element (relative to the document topleft),\nand continues to monitor scrolling, updating the cached coordinates if it needs to.\nDoes not access the DOM after instantiation, so highly performant.\n\nAlso keeps track of all scrolling/overflow:hidden containers that are parents of the given element\nand an determine if a given point is inside the combined clipping rectangle.\n*/\nexport class OffsetTracker { // ElementOffsetTracker\n  scrollCaches: ElementScrollGeomCache[]\n  origRect: Rect\n\n  constructor(el: HTMLElement) {\n    this.origRect = computeRect(el)\n\n    // will work fine for divs that have overflow:hidden\n    this.scrollCaches = getClippingParents(el).map(\n      (scrollEl) => new ElementScrollGeomCache(scrollEl, true), // listen=true\n    )\n  }\n\n  destroy() {\n    for (let scrollCache of this.scrollCaches) {\n      scrollCache.destroy()\n    }\n  }\n\n  computeLeft() {\n    let left = this.origRect.left\n\n    for (let scrollCache of this.scrollCaches) {\n      left += scrollCache.origScrollLeft - scrollCache.getScrollLeft()\n    }\n\n    return left\n  }\n\n  computeTop() {\n    let top = this.origRect.top\n\n    for (let scrollCache of this.scrollCaches) {\n      top += scrollCache.origScrollTop - scrollCache.getScrollTop()\n    }\n\n    return top\n  }\n\n  isWithinClipping(pageX: number, pageY: number): boolean {\n    let point = { left: pageX, top: pageY }\n\n    for (let scrollCache of this.scrollCaches) {\n      if (\n        !isIgnoredClipping(scrollCache.getEventTarget()) &&\n        !pointInsideRect(point, scrollCache.clientRect)\n      ) {\n        return false\n      }\n    }\n\n    return true\n  }\n}\n\n// certain clipping containers should never constrain interactions, like <html> and <body>\n// https://github.com/fullcalendar/fullcalendar/issues/3615\nfunction isIgnoredClipping(node: EventTarget) {\n  let tagName = (node as HTMLElement).tagName\n\n  return tagName === 'HTML' || tagName === 'BODY'\n}\n","import {\n  Emitter, PointerDragEvent,\n  isDateSpansEqual,\n  computeRect,\n  constrainPoint, intersectRects, getRectCenter, diffPoints, Point,\n  rangeContainsRange,\n  Hit,\n  InteractionSettingsStore,\n  mapHash,\n  ElementDragging,\n} from '@fullcalendar/common'\nimport { OffsetTracker } from '../OffsetTracker'\n\n/*\nTracks movement over multiple droppable areas (aka \"hits\")\nthat exist in one or more DateComponents.\nRelies on an existing draggable.\n\nemits:\n- pointerdown\n- dragstart\n- hitchange - fires initially, even if not over a hit\n- pointerup\n- (hitchange - again, to null, if ended over a hit)\n- dragend\n*/\nexport class HitDragging {\n  droppableStore: InteractionSettingsStore\n  dragging: ElementDragging\n  emitter: Emitter<any>\n\n  // options that can be set by caller\n  useSubjectCenter: boolean = false\n  requireInitial: boolean = true // if doesn't start out on a hit, won't emit any events\n\n  // internal state\n  offsetTrackers: { [componentUid: string]: OffsetTracker }\n  initialHit: Hit | null = null\n  movingHit: Hit | null = null\n  finalHit: Hit | null = null // won't ever be populated if shouldIgnoreMove\n  coordAdjust?: Point\n\n  constructor(dragging: ElementDragging, droppableStore: InteractionSettingsStore) {\n    this.droppableStore = droppableStore\n\n    dragging.emitter.on('pointerdown', this.handlePointerDown)\n    dragging.emitter.on('dragstart', this.handleDragStart)\n    dragging.emitter.on('dragmove', this.handleDragMove)\n    dragging.emitter.on('pointerup', this.handlePointerUp)\n    dragging.emitter.on('dragend', this.handleDragEnd)\n\n    this.dragging = dragging\n    this.emitter = new Emitter()\n  }\n\n  handlePointerDown = (ev: PointerDragEvent) => {\n    let { dragging } = this\n\n    this.initialHit = null\n    this.movingHit = null\n    this.finalHit = null\n\n    this.prepareHits()\n    this.processFirstCoord(ev)\n\n    if (this.initialHit || !this.requireInitial) {\n      dragging.setIgnoreMove(false)\n\n      // TODO: fire this before computing processFirstCoord, so listeners can cancel. this gets fired by almost every handler :(\n      this.emitter.trigger('pointerdown', ev)\n    } else {\n      dragging.setIgnoreMove(true)\n    }\n  }\n\n  // sets initialHit\n  // sets coordAdjust\n  processFirstCoord(ev: PointerDragEvent) {\n    let origPoint = { left: ev.pageX, top: ev.pageY }\n    let adjustedPoint = origPoint\n    let subjectEl = ev.subjectEl\n    let subjectRect\n\n    if (subjectEl instanceof HTMLElement) { // i.e. not a Document/ShadowRoot\n      subjectRect = computeRect(subjectEl)\n      adjustedPoint = constrainPoint(adjustedPoint, subjectRect)\n    }\n\n    let initialHit = this.initialHit = this.queryHitForOffset(adjustedPoint.left, adjustedPoint.top)\n    if (initialHit) {\n      if (this.useSubjectCenter && subjectRect) {\n        let slicedSubjectRect = intersectRects(subjectRect, initialHit.rect)\n        if (slicedSubjectRect) {\n          adjustedPoint = getRectCenter(slicedSubjectRect)\n        }\n      }\n\n      this.coordAdjust = diffPoints(adjustedPoint, origPoint)\n    } else {\n      this.coordAdjust = { left: 0, top: 0 }\n    }\n  }\n\n  handleDragStart = (ev: PointerDragEvent) => {\n    this.emitter.trigger('dragstart', ev)\n    this.handleMove(ev, true) // force = fire even if initially null\n  }\n\n  handleDragMove = (ev: PointerDragEvent) => {\n    this.emitter.trigger('dragmove', ev)\n    this.handleMove(ev)\n  }\n\n  handlePointerUp = (ev: PointerDragEvent) => {\n    this.releaseHits()\n    this.emitter.trigger('pointerup', ev)\n  }\n\n  handleDragEnd = (ev: PointerDragEvent) => {\n    if (this.movingHit) {\n      this.emitter.trigger('hitupdate', null, true, ev)\n    }\n\n    this.finalHit = this.movingHit\n    this.movingHit = null\n    this.emitter.trigger('dragend', ev)\n  }\n\n  handleMove(ev: PointerDragEvent, forceHandle?: boolean) {\n    let hit = this.queryHitForOffset(\n      ev.pageX + this.coordAdjust!.left,\n      ev.pageY + this.coordAdjust!.top,\n    )\n\n    if (forceHandle || !isHitsEqual(this.movingHit, hit)) {\n      this.movingHit = hit\n      this.emitter.trigger('hitupdate', hit, false, ev)\n    }\n  }\n\n  prepareHits() {\n    this.offsetTrackers = mapHash(this.droppableStore, (interactionSettings) => {\n      interactionSettings.component.prepareHits()\n      return new OffsetTracker(interactionSettings.el)\n    })\n  }\n\n  releaseHits() {\n    let { offsetTrackers } = this\n\n    for (let id in offsetTrackers) {\n      offsetTrackers[id].destroy()\n    }\n\n    this.offsetTrackers = {}\n  }\n\n  queryHitForOffset(offsetLeft: number, offsetTop: number): Hit | null {\n    let { droppableStore, offsetTrackers } = this\n    let bestHit: Hit | null = null\n\n    for (let id in droppableStore) {\n      let component = droppableStore[id].component\n      let offsetTracker = offsetTrackers[id]\n\n      if (\n        offsetTracker && // wasn't destroyed mid-drag\n        offsetTracker.isWithinClipping(offsetLeft, offsetTop)\n      ) {\n        let originLeft = offsetTracker.computeLeft()\n        let originTop = offsetTracker.computeTop()\n        let positionLeft = offsetLeft - originLeft\n        let positionTop = offsetTop - originTop\n        let { origRect } = offsetTracker\n        let width = origRect.right - origRect.left\n        let height = origRect.bottom - origRect.top\n\n        if (\n          // must be within the element's bounds\n          positionLeft >= 0 && positionLeft < width &&\n          positionTop >= 0 && positionTop < height\n        ) {\n          let hit = component.queryHit(positionLeft, positionTop, width, height)\n          if (\n            hit && (\n              // make sure the hit is within activeRange, meaning it's not a dead cell\n              rangeContainsRange(hit.dateProfile.activeRange, hit.dateSpan.range)\n            ) &&\n            (!bestHit || hit.layer > bestHit.layer)\n          ) {\n            hit.componentId = id\n            hit.context = component.context\n\n            // TODO: better way to re-orient rectangle\n            hit.rect.left += originLeft\n            hit.rect.right += originLeft\n            hit.rect.top += originTop\n            hit.rect.bottom += originTop\n\n            bestHit = hit\n          }\n        }\n      }\n    }\n\n    return bestHit\n  }\n}\n\nexport function isHitsEqual(hit0: Hit | null, hit1: Hit | null): boolean {\n  if (!hit0 && !hit1) {\n    return true\n  }\n\n  if (Boolean(hit0) !== Boolean(hit1)) {\n    return false\n  }\n\n  return isDateSpansEqual(hit0!.dateSpan, hit1!.dateSpan)\n}\n","import { DateSpan, CalendarContext, DatePointApi, DateEnv, ViewApi, EventApi } from '@fullcalendar/common'\nimport { __assign } from 'tslib'\n\nexport interface DropArg extends DatePointApi {\n  draggedEl: HTMLElement\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\nexport type EventReceiveArg = EventReceiveLeaveArg\nexport type EventLeaveArg = EventReceiveLeaveArg\nexport interface EventReceiveLeaveArg { // will this become public?\n  draggedEl: HTMLElement\n  event: EventApi\n  relatedEvents: EventApi[]\n  revert: () => void\n  view: ViewApi\n}\n\nexport function buildDatePointApiWithContext(dateSpan: DateSpan, context: CalendarContext) {\n  let props = {} as DatePointApi\n\n  for (let transform of context.pluginHooks.datePointTransforms) {\n    __assign(props, transform(dateSpan, context))\n  }\n\n  __assign(props, buildDatePointApi(dateSpan, context.dateEnv))\n\n  return props\n}\n\nexport function buildDatePointApi(span: DateSpan, dateEnv: DateEnv): DatePointApi {\n  return {\n    date: dateEnv.toDate(span.range.start),\n    dateStr: dateEnv.formatIso(span.range.start, { omitTime: span.allDay }),\n    allDay: span.allDay,\n  }\n}\n","import {\n  PointerDragEvent, Interaction, InteractionSettings, interactionSettingsToStore,\n  DatePointApi,\n  ViewApi,\n} from '@fullcalendar/common'\nimport { FeaturefulElementDragging } from '../dnd/FeaturefulElementDragging'\nimport { HitDragging, isHitsEqual } from './HitDragging'\nimport { buildDatePointApiWithContext } from '../utils'\n\nexport interface DateClickArg extends DatePointApi {\n  dayEl: HTMLElement\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\n/*\nMonitors when the user clicks on a specific date/time of a component.\nA pointerdown+pointerup on the same \"hit\" constitutes a click.\n*/\nexport class DateClicking extends Interaction {\n  dragging: FeaturefulElementDragging\n  hitDragging: HitDragging\n\n  constructor(settings: InteractionSettings) {\n    super(settings)\n\n    // we DO want to watch pointer moves because otherwise finalHit won't get populated\n    this.dragging = new FeaturefulElementDragging(settings.el)\n    this.dragging.autoScroller.isEnabled = false\n\n    let hitDragging = this.hitDragging = new HitDragging(this.dragging, interactionSettingsToStore(settings))\n    hitDragging.emitter.on('pointerdown', this.handlePointerDown)\n    hitDragging.emitter.on('dragend', this.handleDragEnd)\n  }\n\n  destroy() {\n    this.dragging.destroy()\n  }\n\n  handlePointerDown = (pev: PointerDragEvent) => {\n    let { dragging } = this\n    let downEl = pev.origEvent.target as HTMLElement\n\n    // do this in pointerdown (not dragend) because DOM might be mutated by the time dragend is fired\n    dragging.setIgnoreMove(\n      !this.component.isValidDateDownEl(downEl),\n    )\n  }\n\n  // won't even fire if moving was ignored\n  handleDragEnd = (ev: PointerDragEvent) => {\n    let { component } = this\n    let { pointer } = this.dragging\n\n    if (!pointer.wasTouchScroll) {\n      let { initialHit, finalHit } = this.hitDragging\n\n      if (initialHit && finalHit && isHitsEqual(initialHit, finalHit)) {\n        let { context } = component\n        let arg: DateClickArg = {\n          ...buildDatePointApiWithContext(initialHit.dateSpan, context),\n          dayEl: initialHit.dayEl,\n          jsEvent: ev.origEvent as MouseEvent,\n          view: context.viewApi || context.calendarApi.view,\n        }\n\n        context.emitter.trigger('dateClick', arg)\n      }\n    }\n  }\n}\n","import {\n  compareNumbers, enableCursor, disableCursor, DateComponent, Hit,\n  DateSpan, PointerDragEvent, dateSelectionJoinTransformer,\n  Interaction, InteractionSettings, interactionSettingsToStore,\n  triggerDateSelect, isDateSelectionValid,\n} from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { HitDragging } from './HitDragging'\nimport { FeaturefulElementDragging } from '../dnd/FeaturefulElementDragging'\n\n/*\nTracks when the user selects a portion of time of a component,\nconstituted by a drag over date cells, with a possible delay at the beginning of the drag.\n*/\nexport class DateSelecting extends Interaction {\n  dragging: FeaturefulElementDragging\n  hitDragging: HitDragging\n  dragSelection: DateSpan | null = null\n\n  constructor(settings: InteractionSettings) {\n    super(settings)\n    let { component } = settings\n    let { options } = component.context\n\n    let dragging = this.dragging = new FeaturefulElementDragging(settings.el)\n    dragging.touchScrollAllowed = false\n    dragging.minDistance = options.selectMinDistance || 0\n    dragging.autoScroller.isEnabled = options.dragScroll\n\n    let hitDragging = this.hitDragging = new HitDragging(this.dragging, interactionSettingsToStore(settings))\n    hitDragging.emitter.on('pointerdown', this.handlePointerDown)\n    hitDragging.emitter.on('dragstart', this.handleDragStart)\n    hitDragging.emitter.on('hitupdate', this.handleHitUpdate)\n    hitDragging.emitter.on('pointerup', this.handlePointerUp)\n  }\n\n  destroy() {\n    this.dragging.destroy()\n  }\n\n  handlePointerDown = (ev: PointerDragEvent) => {\n    let { component, dragging } = this\n    let { options } = component.context\n\n    let canSelect = options.selectable &&\n      component.isValidDateDownEl(ev.origEvent.target as HTMLElement)\n\n    // don't bother to watch expensive moves if component won't do selection\n    dragging.setIgnoreMove(!canSelect)\n\n    // if touch, require user to hold down\n    dragging.delay = ev.isTouch ? getComponentTouchDelay(component) : null\n  }\n\n  handleDragStart = (ev: PointerDragEvent) => {\n    this.component.context.calendarApi.unselect(ev) // unselect previous selections\n  }\n\n  handleHitUpdate = (hit: Hit | null, isFinal: boolean) => {\n    let { context } = this.component\n    let dragSelection: DateSpan | null = null\n    let isInvalid = false\n\n    if (hit) {\n      let initialHit = this.hitDragging.initialHit!\n      let disallowed = hit.componentId === initialHit.componentId\n        && this.isHitComboAllowed\n        && !this.isHitComboAllowed(initialHit, hit)\n\n      if (!disallowed) {\n        dragSelection = joinHitsIntoSelection(\n          initialHit,\n          hit,\n          context.pluginHooks.dateSelectionTransformers,\n        )\n      }\n\n      if (!dragSelection || !isDateSelectionValid(dragSelection, hit.dateProfile, context)) {\n        isInvalid = true\n        dragSelection = null\n      }\n    }\n\n    if (dragSelection) {\n      context.dispatch({ type: 'SELECT_DATES', selection: dragSelection })\n    } else if (!isFinal) { // only unselect if moved away while dragging\n      context.dispatch({ type: 'UNSELECT_DATES' })\n    }\n\n    if (!isInvalid) {\n      enableCursor()\n    } else {\n      disableCursor()\n    }\n\n    if (!isFinal) {\n      this.dragSelection = dragSelection // only clear if moved away from all hits while dragging\n    }\n  }\n\n  handlePointerUp = (pev: PointerDragEvent) => {\n    if (this.dragSelection) {\n      // selection is already rendered, so just need to report selection\n      triggerDateSelect(this.dragSelection, pev, this.component.context)\n\n      this.dragSelection = null\n    }\n  }\n}\n\nfunction getComponentTouchDelay(component: DateComponent<any>): number {\n  let { options } = component.context\n  let delay = options.selectLongPressDelay\n\n  if (delay == null) {\n    delay = options.longPressDelay\n  }\n\n  return delay\n}\n\nfunction joinHitsIntoSelection(hit0: Hit, hit1: Hit, dateSelectionTransformers: dateSelectionJoinTransformer[]): DateSpan {\n  let dateSpan0 = hit0.dateSpan\n  let dateSpan1 = hit1.dateSpan\n  let ms = [\n    dateSpan0.range.start,\n    dateSpan0.range.end,\n    dateSpan1.range.start,\n    dateSpan1.range.end,\n  ]\n\n  ms.sort(compareNumbers)\n\n  let props = {} as DateSpan\n\n  for (let transformer of dateSelectionTransformers) {\n    let res = transformer(hit0, hit1)\n\n    if (res === false) {\n      return null\n    }\n\n    if (res) {\n      __assign(props, res)\n    }\n  }\n\n  props.range = { start: ms[0], end: ms[3] }\n  props.allDay = dateSpan0.allDay\n\n  return props\n}\n","import {\n  DateComponent, Seg,\n  PointerDragEvent, Hit,\n  EventMutation, applyMutationToEventStore,\n  startOfDay,\n  elementClosest,\n  EventStore, getRelevantEvents, createEmptyEventStore,\n  EventInteractionState,\n  diffDates, enableCursor, disableCursor,\n  EventRenderRange, getElSeg,\n  EventApi,\n  eventDragMutationMassager,\n  Interaction, InteractionSettings, interactionSettingsStore,\n  EventDropTransformers,\n  CalendarContext,\n  ViewApi,\n  EventChangeArg,\n  buildEventApis,\n  EventAddArg,\n  EventRemoveArg,\n  isInteractionValid,\n  getElRoot,\n} from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { HitDragging, isHitsEqual } from './HitDragging'\nimport { FeaturefulElementDragging } from '../dnd/FeaturefulElementDragging'\nimport { buildDatePointApiWithContext } from '../utils'\n\nexport type EventDragStopArg = EventDragArg\nexport type EventDragStartArg = EventDragArg\n\nexport interface EventDragArg {\n  el: HTMLElement\n  event: EventApi\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\nexport class EventDragging extends Interaction { // TODO: rename to EventSelectingAndDragging\n  // TODO: test this in IE11\n  // QUESTION: why do we need it on the resizable???\n  static SELECTOR = '.fc-event-draggable, .fc-event-resizable'\n\n  dragging: FeaturefulElementDragging\n  hitDragging: HitDragging\n\n  // internal state\n  subjectEl: HTMLElement | null = null\n  subjectSeg: Seg | null = null // the seg being selected/dragged\n  isDragging: boolean = false\n  eventRange: EventRenderRange | null = null\n  relevantEvents: EventStore | null = null // the events being dragged\n  receivingContext: CalendarContext | null = null\n  validMutation: EventMutation | null = null\n  mutatedRelevantEvents: EventStore | null = null\n\n  constructor(settings: InteractionSettings) {\n    super(settings)\n    let { component } = this\n    let { options } = component.context\n\n    let dragging = this.dragging = new FeaturefulElementDragging(settings.el)\n    dragging.pointer.selector = EventDragging.SELECTOR\n    dragging.touchScrollAllowed = false\n    dragging.autoScroller.isEnabled = options.dragScroll\n\n    let hitDragging = this.hitDragging = new HitDragging(this.dragging, interactionSettingsStore)\n    hitDragging.useSubjectCenter = settings.useEventCenter\n    hitDragging.emitter.on('pointerdown', this.handlePointerDown)\n    hitDragging.emitter.on('dragstart', this.handleDragStart)\n    hitDragging.emitter.on('hitupdate', this.handleHitUpdate)\n    hitDragging.emitter.on('pointerup', this.handlePointerUp)\n    hitDragging.emitter.on('dragend', this.handleDragEnd)\n  }\n\n  destroy() {\n    this.dragging.destroy()\n  }\n\n  handlePointerDown = (ev: PointerDragEvent) => {\n    let origTarget = ev.origEvent.target as HTMLElement\n    let { component, dragging } = this\n    let { mirror } = dragging\n    let { options } = component.context\n    let initialContext = component.context\n    this.subjectEl = ev.subjectEl as HTMLElement\n    let subjectSeg = this.subjectSeg = getElSeg(ev.subjectEl as HTMLElement)!\n    let eventRange = this.eventRange = subjectSeg.eventRange!\n    let eventInstanceId = eventRange.instance!.instanceId\n\n    this.relevantEvents = getRelevantEvents(\n      initialContext.getCurrentData().eventStore,\n      eventInstanceId,\n    )\n\n    dragging.minDistance = ev.isTouch ? 0 : options.eventDragMinDistance\n    dragging.delay =\n      // only do a touch delay if touch and this event hasn't been selected yet\n      (ev.isTouch && eventInstanceId !== component.props.eventSelection) ?\n        getComponentTouchDelay(component) :\n        null\n\n    if (options.fixedMirrorParent) {\n      mirror.parentNode = options.fixedMirrorParent\n    } else {\n      mirror.parentNode = elementClosest(origTarget, '.fc')\n    }\n\n    mirror.revertDuration = options.dragRevertDuration\n\n    let isValid =\n      component.isValidSegDownEl(origTarget) &&\n      !elementClosest(origTarget, '.fc-event-resizer') // NOT on a resizer\n\n    dragging.setIgnoreMove(!isValid)\n\n    // disable dragging for elements that are resizable (ie, selectable)\n    // but are not draggable\n    this.isDragging = isValid &&\n      (ev.subjectEl as HTMLElement).classList.contains('fc-event-draggable')\n  }\n\n  handleDragStart = (ev: PointerDragEvent) => {\n    let initialContext = this.component.context\n    let eventRange = this.eventRange!\n    let eventInstanceId = eventRange.instance.instanceId\n\n    if (ev.isTouch) {\n      // need to select a different event?\n      if (eventInstanceId !== this.component.props.eventSelection) {\n        initialContext.dispatch({ type: 'SELECT_EVENT', eventInstanceId })\n      }\n    } else {\n      // if now using mouse, but was previous touch interaction, clear selected event\n      initialContext.dispatch({ type: 'UNSELECT_EVENT' })\n    }\n\n    if (this.isDragging) {\n      initialContext.calendarApi.unselect(ev) // unselect *date* selection\n      initialContext.emitter.trigger('eventDragStart', {\n        el: this.subjectEl,\n        event: new EventApi(initialContext, eventRange.def, eventRange.instance),\n        jsEvent: ev.origEvent as MouseEvent, // Is this always a mouse event? See #4655\n        view: initialContext.viewApi,\n      } as EventDragStartArg)\n    }\n  }\n\n  handleHitUpdate = (hit: Hit | null, isFinal: boolean) => {\n    if (!this.isDragging) {\n      return\n    }\n\n    let relevantEvents = this.relevantEvents!\n    let initialHit = this.hitDragging.initialHit!\n    let initialContext = this.component.context\n\n    // states based on new hit\n    let receivingContext: CalendarContext | null = null\n    let mutation: EventMutation | null = null\n    let mutatedRelevantEvents: EventStore | null = null\n    let isInvalid = false\n    let interaction: EventInteractionState = {\n      affectedEvents: relevantEvents,\n      mutatedEvents: createEmptyEventStore(),\n      isEvent: true,\n    }\n\n    if (hit) {\n      receivingContext = hit.context\n      let receivingOptions = receivingContext.options\n\n      if (\n        initialContext === receivingContext ||\n        (receivingOptions.editable && receivingOptions.droppable)\n      ) {\n        mutation = computeEventMutation(initialHit, hit, receivingContext.getCurrentData().pluginHooks.eventDragMutationMassagers)\n\n        if (mutation) {\n          mutatedRelevantEvents = applyMutationToEventStore(\n            relevantEvents,\n            receivingContext.getCurrentData().eventUiBases,\n            mutation,\n            receivingContext,\n          )\n          interaction.mutatedEvents = mutatedRelevantEvents\n\n          if (!isInteractionValid(interaction, hit.dateProfile, receivingContext)) {\n            isInvalid = true\n            mutation = null\n            mutatedRelevantEvents = null\n            interaction.mutatedEvents = createEmptyEventStore()\n          }\n        }\n      } else {\n        receivingContext = null\n      }\n    }\n\n    this.displayDrag(receivingContext, interaction)\n\n    if (!isInvalid) {\n      enableCursor()\n    } else {\n      disableCursor()\n    }\n\n    if (!isFinal) {\n      if (\n        initialContext === receivingContext && // TODO: write test for this\n        isHitsEqual(initialHit, hit)\n      ) {\n        mutation = null\n      }\n\n      this.dragging.setMirrorNeedsRevert(!mutation)\n\n      // render the mirror if no already-rendered mirror\n      // TODO: wish we could somehow wait for dispatch to guarantee render\n      this.dragging.setMirrorIsVisible(\n        !hit || !getElRoot(this.subjectEl).querySelector('.fc-event-mirror'), // TODO: turn className into constant\n      )\n\n      // assign states based on new hit\n      this.receivingContext = receivingContext\n      this.validMutation = mutation\n      this.mutatedRelevantEvents = mutatedRelevantEvents\n    }\n  }\n\n  handlePointerUp = () => {\n    if (!this.isDragging) {\n      this.cleanup() // because handleDragEnd won't fire\n    }\n  }\n\n  handleDragEnd = (ev: PointerDragEvent) => {\n    if (this.isDragging) {\n      let initialContext = this.component.context\n      let initialView = initialContext.viewApi\n      let { receivingContext, validMutation } = this\n      let eventDef = this.eventRange!.def\n      let eventInstance = this.eventRange!.instance\n      let eventApi = new EventApi(initialContext, eventDef, eventInstance)\n      let relevantEvents = this.relevantEvents!\n      let mutatedRelevantEvents = this.mutatedRelevantEvents!\n      let { finalHit } = this.hitDragging\n\n      this.clearDrag() // must happen after revert animation\n\n      initialContext.emitter.trigger('eventDragStop', {\n        el: this.subjectEl,\n        event: eventApi,\n        jsEvent: ev.origEvent as MouseEvent, // Is this always a mouse event? See #4655\n        view: initialView,\n      } as EventDragStopArg)\n\n      if (validMutation) {\n        // dropped within same calendar\n        if (receivingContext === initialContext) {\n          let updatedEventApi = new EventApi(\n            initialContext,\n            mutatedRelevantEvents.defs[eventDef.defId],\n            eventInstance ? mutatedRelevantEvents.instances[eventInstance.instanceId] : null,\n          )\n\n          initialContext.dispatch({\n            type: 'MERGE_EVENTS',\n            eventStore: mutatedRelevantEvents,\n          })\n\n          let eventChangeArg: EventChangeArg = {\n            oldEvent: eventApi,\n            event: updatedEventApi,\n            relatedEvents: buildEventApis(mutatedRelevantEvents, initialContext, eventInstance),\n            revert() {\n              initialContext.dispatch({\n                type: 'MERGE_EVENTS',\n                eventStore: relevantEvents, // the pre-change data\n              })\n            },\n          }\n\n          let transformed: ReturnType<EventDropTransformers> = {}\n          for (let transformer of initialContext.getCurrentData().pluginHooks.eventDropTransformers) {\n            __assign(transformed, transformer(validMutation, initialContext))\n          }\n\n          initialContext.emitter.trigger('eventDrop', {\n            ...eventChangeArg,\n            ...transformed,\n            el: ev.subjectEl as HTMLElement,\n            delta: validMutation.datesDelta!,\n            jsEvent: ev.origEvent as MouseEvent, // bad\n            view: initialView,\n          })\n\n          initialContext.emitter.trigger('eventChange', eventChangeArg)\n\n        // dropped in different calendar\n        } else if (receivingContext) {\n          let eventRemoveArg: EventRemoveArg = {\n            event: eventApi,\n            relatedEvents: buildEventApis(relevantEvents, initialContext, eventInstance),\n            revert() {\n              initialContext.dispatch({\n                type: 'MERGE_EVENTS',\n                eventStore: relevantEvents,\n              })\n            },\n          }\n\n          initialContext.emitter.trigger('eventLeave', {\n            ...eventRemoveArg,\n            draggedEl: ev.subjectEl as HTMLElement,\n            view: initialView,\n          })\n\n          initialContext.dispatch({\n            type: 'REMOVE_EVENTS',\n            eventStore: relevantEvents,\n          })\n\n          initialContext.emitter.trigger('eventRemove', eventRemoveArg)\n\n          let addedEventDef = mutatedRelevantEvents.defs[eventDef.defId]\n          let addedEventInstance = mutatedRelevantEvents.instances[eventInstance.instanceId]\n          let addedEventApi = new EventApi(receivingContext, addedEventDef, addedEventInstance)\n\n          receivingContext.dispatch({\n            type: 'MERGE_EVENTS',\n            eventStore: mutatedRelevantEvents,\n          })\n\n          let eventAddArg: EventAddArg = {\n            event: addedEventApi,\n            relatedEvents: buildEventApis(mutatedRelevantEvents, receivingContext, addedEventInstance),\n            revert() {\n              receivingContext.dispatch({\n                type: 'REMOVE_EVENTS',\n                eventStore: mutatedRelevantEvents,\n              })\n            },\n          }\n\n          receivingContext.emitter.trigger('eventAdd', eventAddArg)\n\n          if (ev.isTouch) {\n            receivingContext.dispatch({\n              type: 'SELECT_EVENT',\n              eventInstanceId: eventInstance.instanceId,\n            })\n          }\n\n          receivingContext.emitter.trigger('drop', {\n            ...buildDatePointApiWithContext(finalHit.dateSpan, receivingContext),\n            draggedEl: ev.subjectEl as HTMLElement,\n            jsEvent: ev.origEvent as MouseEvent, // Is this always a mouse event? See #4655\n            view: finalHit.context.viewApi,\n          })\n\n          receivingContext.emitter.trigger('eventReceive', {\n            ...eventAddArg,\n            draggedEl: ev.subjectEl as HTMLElement,\n            view: finalHit.context.viewApi,\n          })\n        }\n      } else {\n        initialContext.emitter.trigger('_noEventDrop')\n      }\n    }\n\n    this.cleanup()\n  }\n\n  // render a drag state on the next receivingCalendar\n  displayDrag(nextContext: CalendarContext | null, state: EventInteractionState) {\n    let initialContext = this.component.context\n    let prevContext = this.receivingContext\n\n    // does the previous calendar need to be cleared?\n    if (prevContext && prevContext !== nextContext) {\n      // does the initial calendar need to be cleared?\n      // if so, don't clear all the way. we still need to to hide the affectedEvents\n      if (prevContext === initialContext) {\n        prevContext.dispatch({\n          type: 'SET_EVENT_DRAG',\n          state: {\n            affectedEvents: state.affectedEvents,\n            mutatedEvents: createEmptyEventStore(),\n            isEvent: true,\n          },\n        })\n\n      // completely clear the old calendar if it wasn't the initial\n      } else {\n        prevContext.dispatch({ type: 'UNSET_EVENT_DRAG' })\n      }\n    }\n\n    if (nextContext) {\n      nextContext.dispatch({ type: 'SET_EVENT_DRAG', state })\n    }\n  }\n\n  clearDrag() {\n    let initialCalendar = this.component.context\n    let { receivingContext } = this\n\n    if (receivingContext) {\n      receivingContext.dispatch({ type: 'UNSET_EVENT_DRAG' })\n    }\n\n    // the initial calendar might have an dummy drag state from displayDrag\n    if (initialCalendar !== receivingContext) {\n      initialCalendar.dispatch({ type: 'UNSET_EVENT_DRAG' })\n    }\n  }\n\n  cleanup() { // reset all internal state\n    this.subjectSeg = null\n    this.isDragging = false\n    this.eventRange = null\n    this.relevantEvents = null\n    this.receivingContext = null\n    this.validMutation = null\n    this.mutatedRelevantEvents = null\n  }\n}\n\nfunction computeEventMutation(hit0: Hit, hit1: Hit, massagers: eventDragMutationMassager[]): EventMutation {\n  let dateSpan0 = hit0.dateSpan\n  let dateSpan1 = hit1.dateSpan\n  let date0 = dateSpan0.range.start\n  let date1 = dateSpan1.range.start\n  let standardProps = {} as any\n\n  if (dateSpan0.allDay !== dateSpan1.allDay) {\n    standardProps.allDay = dateSpan1.allDay\n    standardProps.hasEnd = hit1.context.options.allDayMaintainDuration\n\n    if (dateSpan1.allDay) {\n      // means date1 is already start-of-day,\n      // but date0 needs to be converted\n      date0 = startOfDay(date0)\n    }\n  }\n\n  let delta = diffDates(\n    date0, date1,\n    hit0.context.dateEnv,\n    hit0.componentId === hit1.componentId ?\n      hit0.largeUnit :\n      null,\n  )\n\n  if (delta.milliseconds) { // has hours/minutes/seconds\n    standardProps.allDay = false\n  }\n\n  let mutation: EventMutation = {\n    datesDelta: delta,\n    standardProps,\n  }\n\n  for (let massager of massagers) {\n    massager(mutation, hit0, hit1)\n  }\n\n  return mutation\n}\n\nfunction getComponentTouchDelay(component: DateComponent<any>): number | null {\n  let { options } = component.context\n  let delay = options.eventLongPressDelay\n\n  if (delay == null) {\n    delay = options.longPressDelay\n  }\n\n  return delay\n}\n","import {\n  Seg, Hit,\n  EventMutation, applyMutationToEventStore,\n  elementClosest,\n  PointerDragEvent,\n  EventStore, getRelevantEvents, createEmptyEventStore,\n  diffDates, enableCursor, disableCursor,\n  DateRange,\n  EventApi,\n  EventRenderRange, getElSeg,\n  createDuration,\n  EventInteractionState,\n  Interaction, InteractionSettings, interactionSettingsToStore, ViewApi, Duration, EventChangeArg, buildEventApis, isInteractionValid,\n} from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { HitDragging, isHitsEqual } from './HitDragging'\nimport { FeaturefulElementDragging } from '../dnd/FeaturefulElementDragging'\n\nexport type EventResizeStartArg = EventResizeStartStopArg\nexport type EventResizeStopArg = EventResizeStartStopArg\n\nexport interface EventResizeStartStopArg {\n  el: HTMLElement\n  event: EventApi\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\nexport interface EventResizeDoneArg extends EventChangeArg {\n  el: HTMLElement\n  startDelta: Duration\n  endDelta: Duration\n  jsEvent: MouseEvent\n  view: ViewApi\n}\n\nexport class EventResizing extends Interaction {\n  dragging: FeaturefulElementDragging\n  hitDragging: HitDragging\n\n  // internal state\n  draggingSegEl: HTMLElement | null = null\n  draggingSeg: Seg | null = null // TODO: rename to resizingSeg? subjectSeg?\n  eventRange: EventRenderRange | null = null\n  relevantEvents: EventStore | null = null\n  validMutation: EventMutation | null = null\n  mutatedRelevantEvents: EventStore | null = null\n\n  constructor(settings: InteractionSettings) {\n    super(settings)\n    let { component } = settings\n\n    let dragging = this.dragging = new FeaturefulElementDragging(settings.el)\n    dragging.pointer.selector = '.fc-event-resizer'\n    dragging.touchScrollAllowed = false\n    dragging.autoScroller.isEnabled = component.context.options.dragScroll\n\n    let hitDragging = this.hitDragging = new HitDragging(this.dragging, interactionSettingsToStore(settings))\n    hitDragging.emitter.on('pointerdown', this.handlePointerDown)\n    hitDragging.emitter.on('dragstart', this.handleDragStart)\n    hitDragging.emitter.on('hitupdate', this.handleHitUpdate)\n    hitDragging.emitter.on('dragend', this.handleDragEnd)\n  }\n\n  destroy() {\n    this.dragging.destroy()\n  }\n\n  handlePointerDown = (ev: PointerDragEvent) => {\n    let { component } = this\n    let segEl = this.querySegEl(ev)\n    let seg = getElSeg(segEl)\n    let eventRange = this.eventRange = seg.eventRange!\n\n    this.dragging.minDistance = component.context.options.eventDragMinDistance\n\n    // if touch, need to be working with a selected event\n    this.dragging.setIgnoreMove(\n      !this.component.isValidSegDownEl(ev.origEvent.target as HTMLElement) ||\n      (ev.isTouch && this.component.props.eventSelection !== eventRange.instance!.instanceId),\n    )\n  }\n\n  handleDragStart = (ev: PointerDragEvent) => {\n    let { context } = this.component\n    let eventRange = this.eventRange!\n\n    this.relevantEvents = getRelevantEvents(\n      context.getCurrentData().eventStore,\n      this.eventRange.instance!.instanceId,\n    )\n\n    let segEl = this.querySegEl(ev)\n    this.draggingSegEl = segEl\n    this.draggingSeg = getElSeg(segEl)\n\n    context.calendarApi.unselect()\n    context.emitter.trigger('eventResizeStart', {\n      el: segEl,\n      event: new EventApi(context, eventRange.def, eventRange.instance),\n      jsEvent: ev.origEvent as MouseEvent, // Is this always a mouse event? See #4655\n      view: context.viewApi,\n    } as EventResizeStartArg)\n  }\n\n  handleHitUpdate = (hit: Hit | null, isFinal: boolean, ev: PointerDragEvent) => {\n    let { context } = this.component\n    let relevantEvents = this.relevantEvents!\n    let initialHit = this.hitDragging.initialHit!\n    let eventInstance = this.eventRange.instance!\n    let mutation: EventMutation | null = null\n    let mutatedRelevantEvents: EventStore | null = null\n    let isInvalid = false\n    let interaction: EventInteractionState = {\n      affectedEvents: relevantEvents,\n      mutatedEvents: createEmptyEventStore(),\n      isEvent: true,\n    }\n\n    if (hit) {\n      let disallowed = hit.componentId === initialHit.componentId\n        && this.isHitComboAllowed\n        && !this.isHitComboAllowed(initialHit, hit)\n\n      if (!disallowed) {\n        mutation = computeMutation(\n          initialHit,\n          hit,\n          (ev.subjectEl as HTMLElement).classList.contains('fc-event-resizer-start'),\n          eventInstance.range,\n        )\n      }\n    }\n\n    if (mutation) {\n      mutatedRelevantEvents = applyMutationToEventStore(relevantEvents, context.getCurrentData().eventUiBases, mutation, context)\n      interaction.mutatedEvents = mutatedRelevantEvents\n\n      if (!isInteractionValid(interaction, hit.dateProfile, context)) {\n        isInvalid = true\n        mutation = null\n        mutatedRelevantEvents = null\n        interaction.mutatedEvents = null\n      }\n    }\n\n    if (mutatedRelevantEvents) {\n      context.dispatch({\n        type: 'SET_EVENT_RESIZE',\n        state: interaction,\n      })\n    } else {\n      context.dispatch({ type: 'UNSET_EVENT_RESIZE' })\n    }\n\n    if (!isInvalid) {\n      enableCursor()\n    } else {\n      disableCursor()\n    }\n\n    if (!isFinal) {\n      if (mutation && isHitsEqual(initialHit, hit)) {\n        mutation = null\n      }\n\n      this.validMutation = mutation\n      this.mutatedRelevantEvents = mutatedRelevantEvents\n    }\n  }\n\n  handleDragEnd = (ev: PointerDragEvent) => {\n    let { context } = this.component\n    let eventDef = this.eventRange!.def\n    let eventInstance = this.eventRange!.instance\n    let eventApi = new EventApi(context, eventDef, eventInstance)\n    let relevantEvents = this.relevantEvents!\n    let mutatedRelevantEvents = this.mutatedRelevantEvents!\n\n    context.emitter.trigger('eventResizeStop', {\n      el: this.draggingSegEl,\n      event: eventApi,\n      jsEvent: ev.origEvent as MouseEvent, // Is this always a mouse event? See #4655\n      view: context.viewApi,\n    } as EventResizeStopArg)\n\n    if (this.validMutation) {\n      let updatedEventApi = new EventApi(\n        context,\n        mutatedRelevantEvents.defs[eventDef.defId],\n        eventInstance ? mutatedRelevantEvents.instances[eventInstance.instanceId] : null,\n      )\n\n      context.dispatch({\n        type: 'MERGE_EVENTS',\n        eventStore: mutatedRelevantEvents,\n      })\n\n      let eventChangeArg: EventChangeArg = {\n        oldEvent: eventApi,\n        event: updatedEventApi,\n        relatedEvents: buildEventApis(mutatedRelevantEvents, context, eventInstance),\n        revert() {\n          context.dispatch({\n            type: 'MERGE_EVENTS',\n            eventStore: relevantEvents, // the pre-change events\n          })\n        },\n      }\n\n      context.emitter.trigger('eventResize', {\n        ...eventChangeArg,\n        el: this.draggingSegEl,\n        startDelta: this.validMutation.startDelta || createDuration(0),\n        endDelta: this.validMutation.endDelta || createDuration(0),\n        jsEvent: ev.origEvent as MouseEvent,\n        view: context.viewApi,\n      })\n\n      context.emitter.trigger('eventChange', eventChangeArg)\n    } else {\n      context.emitter.trigger('_noEventResize')\n    }\n\n    // reset all internal state\n    this.draggingSeg = null\n    this.relevantEvents = null\n    this.validMutation = null\n\n    // okay to keep eventInstance around. useful to set it in handlePointerDown\n  }\n\n  querySegEl(ev: PointerDragEvent) {\n    return elementClosest(ev.subjectEl as HTMLElement, '.fc-event')\n  }\n}\n\nfunction computeMutation(\n  hit0: Hit,\n  hit1: Hit,\n  isFromStart: boolean,\n  instanceRange: DateRange,\n): EventMutation | null {\n  let dateEnv = hit0.context.dateEnv\n  let date0 = hit0.dateSpan.range.start\n  let date1 = hit1.dateSpan.range.start\n\n  let delta = diffDates(\n    date0, date1,\n    dateEnv,\n    hit0.largeUnit,\n  )\n\n  if (isFromStart) {\n    if (dateEnv.add(instanceRange.start, delta) < instanceRange.end) {\n      return { startDelta: delta }\n    }\n  } else if (dateEnv.add(instanceRange.end, delta) > instanceRange.start) {\n    return { endDelta: delta }\n  }\n\n  return null\n}\n","import {\n  DateSelectionApi,\n  PointerDragEvent,\n  elementClosest,\n  CalendarContext,\n  getEventTargetViaRoot,\n} from '@fullcalendar/common'\nimport { PointerDragging } from '../dnd/PointerDragging'\nimport { EventDragging } from './EventDragging'\n\nexport class UnselectAuto {\n  documentPointer: PointerDragging // for unfocusing\n  isRecentPointerDateSelect = false // wish we could use a selector to detect date selection, but uses hit system\n  matchesCancel = false\n  matchesEvent = false\n\n  constructor(private context: CalendarContext) {\n    let documentPointer = this.documentPointer = new PointerDragging(document)\n    documentPointer.shouldIgnoreMove = true\n    documentPointer.shouldWatchScroll = false\n    documentPointer.emitter.on('pointerdown', this.onDocumentPointerDown)\n    documentPointer.emitter.on('pointerup', this.onDocumentPointerUp)\n\n    /*\n    TODO: better way to know about whether there was a selection with the pointer\n    */\n    context.emitter.on('select', this.onSelect)\n  }\n\n  destroy() {\n    this.context.emitter.off('select', this.onSelect)\n    this.documentPointer.destroy()\n  }\n\n  onSelect = (selectInfo: DateSelectionApi) => {\n    if (selectInfo.jsEvent) {\n      this.isRecentPointerDateSelect = true\n    }\n  }\n\n  onDocumentPointerDown = (pev: PointerDragEvent) => {\n    let unselectCancel = this.context.options.unselectCancel\n    let downEl = getEventTargetViaRoot(pev.origEvent) as HTMLElement\n\n    this.matchesCancel = !!elementClosest(downEl, unselectCancel)\n    this.matchesEvent = !!elementClosest(downEl, EventDragging.SELECTOR) // interaction started on an event?\n  }\n\n  onDocumentPointerUp = (pev: PointerDragEvent) => {\n    let { context } = this\n    let { documentPointer } = this\n    let calendarState = context.getCurrentData()\n\n    // touch-scrolling should never unfocus any type of selection\n    if (!documentPointer.wasTouchScroll) {\n      if (\n        calendarState.dateSelection && // an existing date selection?\n        !this.isRecentPointerDateSelect // a new pointer-initiated date selection since last onDocumentPointerUp?\n      ) {\n        let unselectAuto = context.options.unselectAuto\n\n        if (unselectAuto && (!unselectAuto || !this.matchesCancel)) {\n          context.calendarApi.unselect(pev)\n        }\n      }\n\n      if (\n        calendarState.eventSelection && // an existing event selected?\n        !this.matchesEvent // interaction DIDN'T start on an event\n      ) {\n        context.dispatch({ type: 'UNSELECT_EVENT' })\n      }\n    }\n\n    this.isRecentPointerDateSelect = false\n  }\n}\n","import { identity, Identity, EventDropArg } from '@fullcalendar/common'\n\n// public\nimport {\n  DateClickArg,\n  EventDragStartArg, EventDragStopArg,\n  EventResizeStartArg, EventResizeStopArg, EventResizeDoneArg,\n  DropArg, EventReceiveArg, EventLeaveArg,\n} from './api-type-deps'\n\nexport const OPTION_REFINERS = {\n  fixedMirrorParent: identity as Identity<HTMLElement>,\n}\n\nexport const LISTENER_REFINERS = {\n  dateClick: identity as Identity<(arg: DateClickArg) => void>,\n  eventDragStart: identity as Identity<(arg: EventDragStartArg) => void>,\n  eventDragStop: identity as Identity<(arg: EventDragStopArg) => void>,\n  eventDrop: identity as Identity<(arg: EventDropArg) => void>,\n  eventResizeStart: identity as Identity<(arg: EventResizeStartArg) => void>,\n  eventResizeStop: identity as Identity<(arg: EventResizeStopArg) => void>,\n  eventResize: identity as Identity<(arg: EventResizeDoneArg) => void>,\n  drop: identity as Identity<(arg: DropArg) => void>,\n  eventReceive: identity as Identity<(arg: EventReceiveArg) => void>,\n  eventLeave: identity as Identity<(arg: EventLeaveArg) => void>,\n}\n","import {\n  Hit,\n  interactionSettingsStore,\n  PointerDragEvent,\n  parseEventDef, createEventInstance, EventTuple,\n  createEmptyEventStore, eventTupleToStore,\n  config,\n  DateSpan, DatePointApi,\n  EventInteractionState,\n  DragMetaInput, DragMeta, parseDragMeta,\n  EventApi,\n  elementMatches,\n  enableCursor, disableCursor,\n  isInteractionValid,\n  ElementDragging,\n  ViewApi,\n  CalendarContext,\n  getDefaultEventEnd,\n  refineEventDef,\n} from '@fullcalendar/common'\nimport { __assign } from 'tslib'\nimport { HitDragging } from '../interactions/HitDragging'\nimport { buildDatePointApiWithContext } from '../utils'\n\nexport type DragMetaGenerator = DragMetaInput | ((el: HTMLElement) => DragMetaInput)\n\nexport interface ExternalDropApi extends DatePointApi {\n  draggedEl: HTMLElement\n  jsEvent: UIEvent\n  view: ViewApi\n}\n\n/*\nGiven an already instantiated draggable object for one-or-more elements,\nInterprets any dragging as an attempt to drag an events that lives outside\nof a calendar onto a calendar.\n*/\nexport class ExternalElementDragging {\n  hitDragging: HitDragging\n  receivingContext: CalendarContext | null = null\n  droppableEvent: EventTuple | null = null // will exist for all drags, even if create:false\n  suppliedDragMeta: DragMetaGenerator | null = null\n  dragMeta: DragMeta | null = null\n\n  constructor(dragging: ElementDragging, suppliedDragMeta?: DragMetaGenerator) {\n    let hitDragging = this.hitDragging = new HitDragging(dragging, interactionSettingsStore)\n    hitDragging.requireInitial = false // will start outside of a component\n    hitDragging.emitter.on('dragstart', this.handleDragStart)\n    hitDragging.emitter.on('hitupdate', this.handleHitUpdate)\n    hitDragging.emitter.on('dragend', this.handleDragEnd)\n\n    this.suppliedDragMeta = suppliedDragMeta\n  }\n\n  handleDragStart = (ev: PointerDragEvent) => {\n    this.dragMeta = this.buildDragMeta(ev.subjectEl as HTMLElement)\n  }\n\n  buildDragMeta(subjectEl: HTMLElement) {\n    if (typeof this.suppliedDragMeta === 'object') {\n      return parseDragMeta(this.suppliedDragMeta)\n    }\n    if (typeof this.suppliedDragMeta === 'function') {\n      return parseDragMeta(this.suppliedDragMeta(subjectEl))\n    }\n    return getDragMetaFromEl(subjectEl)\n  }\n\n  handleHitUpdate = (hit: Hit | null, isFinal: boolean, ev: PointerDragEvent) => {\n    let { dragging } = this.hitDragging\n    let receivingContext: CalendarContext | null = null\n    let droppableEvent: EventTuple | null = null\n    let isInvalid = false\n    let interaction: EventInteractionState = {\n      affectedEvents: createEmptyEventStore(),\n      mutatedEvents: createEmptyEventStore(),\n      isEvent: this.dragMeta!.create,\n    }\n\n    if (hit) {\n      receivingContext = hit.context\n\n      if (this.canDropElOnCalendar(ev.subjectEl as HTMLElement, receivingContext)) {\n        droppableEvent = computeEventForDateSpan(\n          hit.dateSpan,\n          this.dragMeta!,\n          receivingContext,\n        )\n\n        interaction.mutatedEvents = eventTupleToStore(droppableEvent)\n        isInvalid = !isInteractionValid(interaction, hit.dateProfile, receivingContext)\n\n        if (isInvalid) {\n          interaction.mutatedEvents = createEmptyEventStore()\n          droppableEvent = null\n        }\n      }\n    }\n\n    this.displayDrag(receivingContext, interaction)\n\n    // show mirror if no already-rendered mirror element OR if we are shutting down the mirror (?)\n    // TODO: wish we could somehow wait for dispatch to guarantee render\n    dragging.setMirrorIsVisible(\n      isFinal || !droppableEvent || !document.querySelector('.fc-event-mirror'), // TODO: turn className into constant\n      // TODO: somehow query FullCalendars WITHIN shadow-roots for existing event-mirror els\n    )\n\n    if (!isInvalid) {\n      enableCursor()\n    } else {\n      disableCursor()\n    }\n\n    if (!isFinal) {\n      dragging.setMirrorNeedsRevert(!droppableEvent)\n\n      this.receivingContext = receivingContext\n      this.droppableEvent = droppableEvent\n    }\n  }\n\n  handleDragEnd = (pev: PointerDragEvent) => {\n    let { receivingContext, droppableEvent } = this\n\n    this.clearDrag()\n\n    if (receivingContext && droppableEvent) {\n      let finalHit = this.hitDragging.finalHit!\n      let finalView = finalHit.context.viewApi\n      let dragMeta = this.dragMeta!\n\n      receivingContext.emitter.trigger('drop', {\n        ...buildDatePointApiWithContext(finalHit.dateSpan, receivingContext),\n        draggedEl: pev.subjectEl as HTMLElement,\n        jsEvent: pev.origEvent as MouseEvent, // Is this always a mouse event? See #4655\n        view: finalView,\n      })\n\n      if (dragMeta.create) {\n        let addingEvents = eventTupleToStore(droppableEvent)\n\n        receivingContext.dispatch({\n          type: 'MERGE_EVENTS',\n          eventStore: addingEvents,\n        })\n\n        if (pev.isTouch) {\n          receivingContext.dispatch({\n            type: 'SELECT_EVENT',\n            eventInstanceId: droppableEvent.instance.instanceId,\n          })\n        }\n\n        // signal that an external event landed\n        receivingContext.emitter.trigger('eventReceive', {\n          event: new EventApi(\n            receivingContext,\n            droppableEvent.def,\n            droppableEvent.instance,\n          ),\n          relatedEvents: [],\n          revert() {\n            receivingContext.dispatch({\n              type: 'REMOVE_EVENTS',\n              eventStore: addingEvents,\n            })\n          },\n          draggedEl: pev.subjectEl as HTMLElement,\n          view: finalView,\n        })\n      }\n    }\n\n    this.receivingContext = null\n    this.droppableEvent = null\n  }\n\n  displayDrag(nextContext: CalendarContext | null, state: EventInteractionState) {\n    let prevContext = this.receivingContext\n\n    if (prevContext && prevContext !== nextContext) {\n      prevContext.dispatch({ type: 'UNSET_EVENT_DRAG' })\n    }\n\n    if (nextContext) {\n      nextContext.dispatch({ type: 'SET_EVENT_DRAG', state })\n    }\n  }\n\n  clearDrag() {\n    if (this.receivingContext) {\n      this.receivingContext.dispatch({ type: 'UNSET_EVENT_DRAG' })\n    }\n  }\n\n  canDropElOnCalendar(el: HTMLElement, receivingContext: CalendarContext): boolean {\n    let dropAccept = receivingContext.options.dropAccept\n\n    if (typeof dropAccept === 'function') {\n      return dropAccept.call(receivingContext.calendarApi, el)\n    }\n\n    if (typeof dropAccept === 'string' && dropAccept) {\n      return Boolean(elementMatches(el, dropAccept))\n    }\n\n    return true\n  }\n}\n\n// Utils for computing event store from the DragMeta\n// ----------------------------------------------------------------------------------------------------\n\nfunction computeEventForDateSpan(dateSpan: DateSpan, dragMeta: DragMeta, context: CalendarContext): EventTuple {\n  let defProps = { ...dragMeta.leftoverProps }\n\n  for (let transform of context.pluginHooks.externalDefTransforms) {\n    __assign(defProps, transform(dateSpan, dragMeta))\n  }\n\n  let { refined, extra } = refineEventDef(defProps, context)\n  let def = parseEventDef(\n    refined,\n    extra,\n    dragMeta.sourceId,\n    dateSpan.allDay,\n    context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd\n    context,\n  )\n\n  let start = dateSpan.range.start\n\n  // only rely on time info if drop zone is all-day,\n  // otherwise, we already know the time\n  if (dateSpan.allDay && dragMeta.startTime) {\n    start = context.dateEnv.add(start, dragMeta.startTime)\n  }\n\n  let end = dragMeta.duration ?\n    context.dateEnv.add(start, dragMeta.duration) :\n    getDefaultEventEnd(dateSpan.allDay, start, context)\n\n  let instance = createEventInstance(def.defId, { start, end })\n\n  return { def, instance }\n}\n\n// Utils for extracting data from element\n// ----------------------------------------------------------------------------------------------------\n\nfunction getDragMetaFromEl(el: HTMLElement): DragMeta {\n  let str = getEmbeddedElData(el, 'event')\n  let obj = str ?\n    JSON.parse(str) :\n    { create: false } // if no embedded data, assume no event creation\n\n  return parseDragMeta(obj)\n}\n\nconfig.dataAttrPrefix = ''\n\nfunction getEmbeddedElData(el: HTMLElement, name: string): string {\n  let prefix = config.dataAttrPrefix\n  let prefixedName = (prefix ? prefix + '-' : '') + name\n\n  return el.getAttribute('data-' + prefixedName) || ''\n}\n","import { BASE_OPTION_DEFAULTS, PointerDragEvent } from '@fullcalendar/common'\nimport { FeaturefulElementDragging } from '../dnd/FeaturefulElementDragging'\nimport { ExternalElementDragging, DragMetaGenerator } from './ExternalElementDragging'\n\nexport interface ExternalDraggableSettings {\n  eventData?: DragMetaGenerator\n  itemSelector?: string\n  minDistance?: number\n  longPressDelay?: number\n  appendTo?: HTMLElement\n}\n\n/*\nMakes an element (that is *external* to any calendar) draggable.\nCan pass in data that determines how an event will be created when dropped onto a calendar.\nLeverages FullCalendar's internal drag-n-drop functionality WITHOUT a third-party drag system.\n*/\nexport class ExternalDraggable {\n  dragging: FeaturefulElementDragging\n  settings: ExternalDraggableSettings\n\n  constructor(el: HTMLElement, settings: ExternalDraggableSettings = {}) {\n    this.settings = settings\n\n    let dragging = this.dragging = new FeaturefulElementDragging(el)\n    dragging.touchScrollAllowed = false\n\n    if (settings.itemSelector != null) {\n      dragging.pointer.selector = settings.itemSelector\n    }\n\n    if (settings.appendTo != null) {\n      dragging.mirror.parentNode = settings.appendTo // TODO: write tests\n    }\n\n    dragging.emitter.on('pointerdown', this.handlePointerDown)\n    dragging.emitter.on('dragstart', this.handleDragStart)\n\n    new ExternalElementDragging(dragging, settings.eventData) // eslint-disable-line no-new\n  }\n\n  handlePointerDown = (ev: PointerDragEvent) => {\n    let { dragging } = this\n    let { minDistance, longPressDelay } = this.settings\n\n    dragging.minDistance =\n      minDistance != null ?\n        minDistance :\n        (ev.isTouch ? 0 : BASE_OPTION_DEFAULTS.eventDragMinDistance)\n\n    dragging.delay =\n      ev.isTouch ? // TODO: eventually read eventLongPressDelay instead vvv\n        (longPressDelay != null ? longPressDelay : BASE_OPTION_DEFAULTS.longPressDelay) :\n        0\n  }\n\n  handleDragStart = (ev: PointerDragEvent) => {\n    if (\n      ev.isTouch &&\n      this.dragging.delay &&\n      (ev.subjectEl as HTMLElement).classList.contains('fc-event')\n    ) {\n      this.dragging.mirror.getMirrorEl().classList.add('fc-event-selected')\n    }\n  }\n\n  destroy() {\n    this.dragging.destroy()\n  }\n}\n","import { PointerDragEvent, ElementDragging } from '@fullcalendar/common'\nimport { PointerDragging } from '../dnd/PointerDragging'\n\n/*\nDetects when a *THIRD-PARTY* drag-n-drop system interacts with elements.\nThe third-party system is responsible for drawing the visuals effects of the drag.\nThis class simply monitors for pointer movements and fires events.\nIt also has the ability to hide the moving element (the \"mirror\") during the drag.\n*/\nexport class InferredElementDragging extends ElementDragging {\n  pointer: PointerDragging\n  shouldIgnoreMove: boolean = false\n  mirrorSelector: string = ''\n  currentMirrorEl: HTMLElement | null = null\n\n  constructor(containerEl: HTMLElement) {\n    super(containerEl)\n\n    let pointer = this.pointer = new PointerDragging(containerEl)\n    pointer.emitter.on('pointerdown', this.handlePointerDown)\n    pointer.emitter.on('pointermove', this.handlePointerMove)\n    pointer.emitter.on('pointerup', this.handlePointerUp)\n  }\n\n  destroy() {\n    this.pointer.destroy()\n  }\n\n  handlePointerDown = (ev: PointerDragEvent) => {\n    this.emitter.trigger('pointerdown', ev)\n\n    if (!this.shouldIgnoreMove) {\n      // fire dragstart right away. does not support delay or min-distance\n      this.emitter.trigger('dragstart', ev)\n    }\n  }\n\n  handlePointerMove = (ev: PointerDragEvent) => {\n    if (!this.shouldIgnoreMove) {\n      this.emitter.trigger('dragmove', ev)\n    }\n  }\n\n  handlePointerUp = (ev: PointerDragEvent) => {\n    this.emitter.trigger('pointerup', ev)\n\n    if (!this.shouldIgnoreMove) {\n      // fire dragend right away. does not support a revert animation\n      this.emitter.trigger('dragend', ev)\n    }\n  }\n\n  setIgnoreMove(bool: boolean) {\n    this.shouldIgnoreMove = bool\n  }\n\n  setMirrorIsVisible(bool: boolean) {\n    if (bool) {\n      // restore a previously hidden element.\n      // use the reference in case the selector class has already been removed.\n      if (this.currentMirrorEl) {\n        this.currentMirrorEl.style.visibility = ''\n        this.currentMirrorEl = null\n      }\n    } else {\n      let mirrorEl = this.mirrorSelector\n        // TODO: somehow query FullCalendars WITHIN shadow-roots\n        ? document.querySelector(this.mirrorSelector) as HTMLElement\n        : null\n\n      if (mirrorEl) {\n        this.currentMirrorEl = mirrorEl\n        mirrorEl.style.visibility = 'hidden'\n      }\n    }\n  }\n}\n","import { ExternalElementDragging, DragMetaGenerator } from './ExternalElementDragging'\nimport { InferredElementDragging } from './InferredElementDragging'\n\nexport interface ThirdPartyDraggableSettings {\n  eventData?: DragMetaGenerator\n  itemSelector?: string\n  mirrorSelector?: string\n}\n\n/*\nBridges third-party drag-n-drop systems with FullCalendar.\nMust be instantiated and destroyed by caller.\n*/\nexport class ThirdPartyDraggable {\n  dragging: InferredElementDragging\n\n  constructor(\n    containerOrSettings?: EventTarget | ThirdPartyDraggableSettings,\n    settings?: ThirdPartyDraggableSettings,\n  ) {\n    let containerEl: EventTarget = document\n\n    if (\n      // wish we could just test instanceof EventTarget, but doesn't work in IE11\n      containerOrSettings === document ||\n      containerOrSettings instanceof Element\n    ) {\n      containerEl = containerOrSettings as EventTarget\n      settings = settings || {}\n    } else {\n      settings = (containerOrSettings || {}) as ThirdPartyDraggableSettings\n    }\n\n    let dragging = this.dragging = new InferredElementDragging(containerEl as HTMLElement)\n\n    if (typeof settings.itemSelector === 'string') {\n      dragging.pointer.selector = settings.itemSelector\n    } else if (containerEl === document) {\n      dragging.pointer.selector = '[data-event]'\n    }\n\n    if (typeof settings.mirrorSelector === 'string') {\n      dragging.mirrorSelector = settings.mirrorSelector\n    }\n\n    new ExternalElementDragging(dragging, settings.eventData) // eslint-disable-line no-new\n  }\n\n  destroy() {\n    this.dragging.destroy()\n  }\n}\n","import { createPlugin } from '@fullcalendar/common'\nimport { DateClicking } from './interactions/DateClicking'\nimport { DateSelecting } from './interactions/DateSelecting'\nimport { EventDragging } from './interactions/EventDragging'\nimport { EventResizing } from './interactions/EventResizing'\nimport { UnselectAuto } from './interactions/UnselectAuto'\nimport { FeaturefulElementDragging } from './dnd/FeaturefulElementDragging'\nimport { OPTION_REFINERS, LISTENER_REFINERS } from './options'\nimport './options-declare'\n\nexport default createPlugin({\n  componentInteractions: [DateClicking, DateSelecting, EventDragging, EventResizing],\n  calendarInteractions: [UnselectAuto],\n  elementDraggingImpl: FeaturefulElementDragging,\n  optionRefiners: OPTION_REFINERS,\n  listenerRefiners: LISTENER_REFINERS,\n})\n\nexport * from './api-type-deps'\nexport { FeaturefulElementDragging }\nexport { PointerDragging } from './dnd/PointerDragging'\nexport { ExternalDraggable as Draggable } from './interactions-external/ExternalDraggable'\nexport { ThirdPartyDraggable } from './interactions-external/ThirdPartyDraggable'\n","import {\n  BaseComponent, DateMarker, createElement, DateRange, getDateMeta,\n  RenderHook, DayHeaderContentArg, getDayClassNames, formatDayString, Fragment, buildNavLinkAttrs, getUniqueDomId,\n} from '@fullcalendar/common'\n\nexport interface ListViewHeaderRowProps {\n  cellId: string\n  dayDate: DateMarker\n  todayRange: DateRange\n}\n\ninterface HookProps extends DayHeaderContentArg { // doesn't enforce much since DayCellContentArg allow extra props\n  textId: string // for aria-labelledby\n  text: string\n  sideText: string\n}\n\nexport class ListViewHeaderRow extends BaseComponent<ListViewHeaderRowProps> {\n  state = {\n    textId: getUniqueDomId(),\n  }\n\n  render() {\n    let { theme, dateEnv, options, viewApi } = this.context\n    let { cellId, dayDate, todayRange } = this.props\n    let { textId } = this.state\n    let dayMeta = getDateMeta(dayDate, todayRange)\n\n    // will ever be falsy?\n    let text = options.listDayFormat ? dateEnv.format(dayDate, options.listDayFormat) : ''\n\n    // will ever be falsy? also, BAD NAME \"alt\"\n    let sideText = options.listDaySideFormat ? dateEnv.format(dayDate, options.listDaySideFormat) : ''\n\n    let hookProps: HookProps = {\n      date: dateEnv.toDate(dayDate),\n      view: viewApi,\n      textId,\n      text,\n      sideText,\n      navLinkAttrs: buildNavLinkAttrs(this.context, dayDate),\n      sideNavLinkAttrs: buildNavLinkAttrs(this.context, dayDate, 'day', false),\n      ...dayMeta,\n    }\n\n    let classNames = ['fc-list-day'].concat(\n      getDayClassNames(dayMeta, theme),\n    )\n\n    // TODO: make a reusable HOC for dayHeader (used in daygrid/timegrid too)\n    return (\n      <RenderHook<HookProps>\n        hookProps={hookProps}\n        classNames={options.dayHeaderClassNames}\n        content={options.dayHeaderContent}\n        defaultContent={renderInnerContent}\n        didMount={options.dayHeaderDidMount}\n        willUnmount={options.dayHeaderWillUnmount}\n      >\n        {(rootElRef, customClassNames, innerElRef, innerContent) => (\n          <tr\n            ref={rootElRef}\n            className={classNames.concat(customClassNames).join(' ')}\n            data-date={formatDayString(dayDate)}\n          >\n            {/* TODO: force-hide top border based on :first-child */}\n            <th scope=\"colgroup\" colSpan={3} id={cellId} aria-labelledby={textId}>\n              <div className={'fc-list-day-cushion ' + theme.getClass('tableCellShaded')} ref={innerElRef}>\n                {innerContent}\n              </div>\n            </th>\n          </tr>\n        )}\n      </RenderHook>\n    )\n  }\n}\n\nfunction renderInnerContent(props: HookProps) {\n  return (\n    <Fragment>\n      {props.text && (\n        <a id={props.textId} className=\"fc-list-day-text\" {...props.navLinkAttrs}>\n          {props.text}\n        </a>\n      )}\n      {props.sideText && (/* not keyboard tabbable */\n        <a aria-hidden className=\"fc-list-day-side-text\" {...props.sideNavLinkAttrs}>\n          {props.sideText}\n        </a>\n      )}\n    </Fragment>\n  )\n}\n","import {\n  MinimalEventProps, BaseComponent, ViewContext, createElement, AllDayContentArg,\n  Seg, isMultiDayRange, DateFormatter, buildSegTimeText, createFormatter, EventRoot, ComponentChildren, RenderHook, getSegAnchorAttrs,\n} from '@fullcalendar/common'\n\nconst DEFAULT_TIME_FORMAT = createFormatter({\n  hour: 'numeric',\n  minute: '2-digit',\n  meridiem: 'short',\n})\n\nexport interface ListViewEventRowProps extends MinimalEventProps {\n  timeHeaderId: string\n  eventHeaderId: string\n  dateHeaderId: string\n}\n\nexport class ListViewEventRow extends BaseComponent<ListViewEventRowProps> {\n  render() {\n    let { props, context } = this\n    let { seg, timeHeaderId, eventHeaderId, dateHeaderId } = props\n    let timeFormat = context.options.eventTimeFormat || DEFAULT_TIME_FORMAT\n\n    return (\n      <EventRoot\n        seg={seg}\n        timeText=\"\" // BAD. because of all-day content\n        disableDragging\n        disableResizing\n        defaultContent={() => renderEventInnerContent(seg, context) /* weird */}\n        isPast={props.isPast}\n        isFuture={props.isFuture}\n        isToday={props.isToday}\n        isSelected={props.isSelected}\n        isDragging={props.isDragging}\n        isResizing={props.isResizing}\n        isDateSelecting={props.isDateSelecting}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent, hookProps) => (\n          <tr className={['fc-list-event', hookProps.event.url ? 'fc-event-forced-url' : ''].concat(classNames).join(' ')} ref={rootElRef}>\n            {buildTimeContent(seg, timeFormat, context, timeHeaderId, dateHeaderId)}\n            <td aria-hidden className=\"fc-list-event-graphic\">\n              <span className=\"fc-list-event-dot\" style={{ borderColor: hookProps.borderColor || hookProps.backgroundColor }} />\n            </td>\n            <td ref={innerElRef} headers={`${eventHeaderId} ${dateHeaderId}`} className=\"fc-list-event-title\">\n              {innerContent}\n            </td>\n          </tr>\n        )}\n      </EventRoot>\n    )\n  }\n}\n\nfunction renderEventInnerContent(seg: Seg, context: ViewContext) {\n  let interactiveAttrs = getSegAnchorAttrs(seg, context)\n  return (\n    <a {...interactiveAttrs}>\n      {/* TODO: document how whole row become clickable */}\n      {seg.eventRange.def.title}\n    </a>\n  )\n}\n\nfunction buildTimeContent(\n  seg: Seg,\n  timeFormat: DateFormatter,\n  context: ViewContext,\n  timeHeaderId: string,\n  dateHeaderId: string,\n): ComponentChildren {\n  let { options } = context\n\n  if (options.displayEventTime !== false) {\n    let eventDef = seg.eventRange.def\n    let eventInstance = seg.eventRange.instance\n    let doAllDay = false\n    let timeText: string\n\n    if (eventDef.allDay) {\n      doAllDay = true\n    } else if (isMultiDayRange(seg.eventRange.range)) { // TODO: use (!isStart || !isEnd) instead?\n      if (seg.isStart) {\n        timeText = buildSegTimeText(\n          seg,\n          timeFormat,\n          context,\n          null,\n          null,\n          eventInstance.range.start,\n          seg.end,\n        )\n      } else if (seg.isEnd) {\n        timeText = buildSegTimeText(\n          seg,\n          timeFormat,\n          context,\n          null,\n          null,\n          seg.start,\n          eventInstance.range.end,\n        )\n      } else {\n        doAllDay = true\n      }\n    } else {\n      timeText = buildSegTimeText(\n        seg,\n        timeFormat,\n        context,\n      )\n    }\n\n    if (doAllDay) {\n      let hookProps: AllDayContentArg = {\n        text: context.options.allDayText,\n        view: context.viewApi,\n      }\n\n      return (\n        <RenderHook<AllDayContentArg> // needed?\n          hookProps={hookProps}\n          classNames={options.allDayClassNames}\n          content={options.allDayContent}\n          defaultContent={renderAllDayInner}\n          didMount={options.allDayDidMount}\n          willUnmount={options.allDayWillUnmount}\n        >\n          {(rootElRef, classNames, innerElRef, innerContent) => (\n            <td ref={rootElRef} headers={`${timeHeaderId} ${dateHeaderId}`} className={['fc-list-event-time'].concat(classNames).join(' ')}>\n              {innerContent}\n            </td>\n          )}\n        </RenderHook>\n      )\n    }\n\n    return (\n      <td className=\"fc-list-event-time\">\n        {timeText}\n      </td>\n    )\n  }\n\n  return null\n}\n\nfunction renderAllDayInner(hookProps) {\n  return hookProps.text\n}\n","import {\n  createElement,\n  ViewProps,\n  Scroller,\n  DateMarker,\n  addDays,\n  startOfDay,\n  DateRange,\n  intersectRanges,\n  DateProfile,\n  EventUiHash,\n  EventRenderRange,\n  sliceEventStore,\n  EventStore,\n  memoize,\n  Seg,\n  VNode,\n  sortEventSegs,\n  getSegMeta,\n  NowTimer,\n  ViewRoot,\n  RenderHook,\n  DateComponent,\n  ViewApi,\n  MountArg,\n  getUniqueDomId,\n  formatDayString,\n} from '@fullcalendar/common'\nimport { ListViewHeaderRow } from './ListViewHeaderRow'\nimport { ListViewEventRow } from './ListViewEventRow'\n\nexport interface NoEventsContentArg {\n  text: string\n  view: ViewApi\n}\n\nexport type NoEventsMountArg = MountArg<NoEventsContentArg>\n\n/*\nResponsible for the scroller, and forwarding event-related actions into the \"grid\".\n*/\nexport class ListView extends DateComponent<ViewProps> {\n  private computeDateVars = memoize(computeDateVars)\n  private eventStoreToSegs = memoize(this._eventStoreToSegs)\n  state = {\n    timeHeaderId: getUniqueDomId(),\n    eventHeaderId: getUniqueDomId(),\n    dateHeaderIdRoot: getUniqueDomId(),\n  }\n\n  render() {\n    let { props, context } = this\n\n    let extraClassNames = [\n      'fc-list',\n      context.theme.getClass('table'), // just for the outer border. will be on div\n      context.options.stickyHeaderDates !== false ? 'fc-list-sticky' : '',\n    ]\n\n    let { dayDates, dayRanges } = this.computeDateVars(props.dateProfile)\n    let eventSegs = this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges)\n\n    return (\n      <ViewRoot viewSpec={context.viewSpec} elRef={this.setRootEl}>\n        {(rootElRef, classNames) => (\n          <div ref={rootElRef} className={extraClassNames.concat(classNames).join(' ')}>\n            <Scroller\n              liquid={!props.isHeightAuto}\n              overflowX={props.isHeightAuto ? 'visible' : 'hidden'}\n              overflowY={props.isHeightAuto ? 'visible' : 'auto'}\n            >\n              {eventSegs.length > 0 ?\n                this.renderSegList(eventSegs, dayDates) :\n                this.renderEmptyMessage()}\n            </Scroller>\n          </div>\n        )}\n      </ViewRoot>\n    )\n  }\n\n  setRootEl = (rootEl: HTMLDivElement | null) => {\n    if (rootEl) {\n      this.context.registerInteractiveComponent(this, { // TODO: make aware that it doesn't do Hits\n        el: rootEl,\n      })\n    } else {\n      this.context.unregisterInteractiveComponent(this)\n    }\n  }\n\n  renderEmptyMessage() {\n    let { options, viewApi } = this.context\n    let hookProps: NoEventsContentArg = {\n      text: options.noEventsText,\n      view: viewApi,\n    }\n\n    return (\n      <RenderHook<NoEventsContentArg> // needed???\n        hookProps={hookProps}\n        classNames={options.noEventsClassNames}\n        content={options.noEventsContent}\n        defaultContent={renderNoEventsInner}\n        didMount={options.noEventsDidMount}\n        willUnmount={options.noEventsWillUnmount}\n      >\n        {(rootElRef, classNames, innerElRef, innerContent) => (\n          <div className={['fc-list-empty'].concat(classNames).join(' ')} ref={rootElRef}>\n            <div className=\"fc-list-empty-cushion\" ref={innerElRef}>\n              {innerContent}\n            </div>\n          </div>\n        )}\n      </RenderHook>\n    )\n  }\n\n  renderSegList(allSegs: Seg[], dayDates: DateMarker[]) {\n    let { theme, options } = this.context\n    let { timeHeaderId, eventHeaderId, dateHeaderIdRoot } = this.state\n    let segsByDay = groupSegsByDay(allSegs) // sparse array\n\n    return (\n      <NowTimer unit=\"day\">\n        {(nowDate: DateMarker, todayRange: DateRange) => {\n          let innerNodes: VNode[] = []\n\n          for (let dayIndex = 0; dayIndex < segsByDay.length; dayIndex += 1) {\n            let daySegs = segsByDay[dayIndex]\n\n            if (daySegs) { // sparse array, so might be undefined\n              let dayStr = formatDayString(dayDates[dayIndex])\n              let dateHeaderId = dateHeaderIdRoot + '-' + dayStr\n\n              // append a day header\n              innerNodes.push(\n                <ListViewHeaderRow\n                  key={dayStr}\n                  cellId={dateHeaderId}\n                  dayDate={dayDates[dayIndex]}\n                  todayRange={todayRange}\n                />,\n              )\n\n              daySegs = sortEventSegs(daySegs, options.eventOrder)\n\n              for (let seg of daySegs) {\n                innerNodes.push(\n                  <ListViewEventRow\n                    key={dayStr + ':' + seg.eventRange.instance.instanceId /* are multiple segs for an instanceId */}\n                    seg={seg}\n                    isDragging={false}\n                    isResizing={false}\n                    isDateSelecting={false}\n                    isSelected={false}\n                    timeHeaderId={timeHeaderId}\n                    eventHeaderId={eventHeaderId}\n                    dateHeaderId={dateHeaderId}\n                    {...getSegMeta(seg, todayRange, nowDate)}\n                  />,\n                )\n              }\n            }\n          }\n\n          return (\n            <table className={'fc-list-table ' + theme.getClass('table')}>\n              <thead>\n                <tr>\n                  <th scope=\"col\" id={timeHeaderId}>{options.timeHint}</th>\n                  <th scope=\"col\" aria-hidden />\n                  <th scope=\"col\" id={eventHeaderId}>{options.eventHint}</th>\n                </tr>\n              </thead>\n              <tbody>{innerNodes}</tbody>\n            </table>\n          )\n        }}\n      </NowTimer>\n    )\n  }\n\n  _eventStoreToSegs(eventStore: EventStore, eventUiBases: EventUiHash, dayRanges: DateRange[]): Seg[] {\n    return this.eventRangesToSegs(\n      sliceEventStore(\n        eventStore,\n        eventUiBases,\n        this.props.dateProfile.activeRange,\n        this.context.options.nextDayThreshold,\n      ).fg,\n      dayRanges,\n    )\n  }\n\n  eventRangesToSegs(eventRanges: EventRenderRange[], dayRanges: DateRange[]) {\n    let segs = []\n\n    for (let eventRange of eventRanges) {\n      segs.push(...this.eventRangeToSegs(eventRange, dayRanges))\n    }\n\n    return segs\n  }\n\n  eventRangeToSegs(eventRange: EventRenderRange, dayRanges: DateRange[]) {\n    let { dateEnv } = this.context\n    let { nextDayThreshold } = this.context.options\n    let range = eventRange.range\n    let allDay = eventRange.def.allDay\n    let dayIndex\n    let segRange\n    let seg\n    let segs = []\n\n    for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex += 1) {\n      segRange = intersectRanges(range, dayRanges[dayIndex])\n\n      if (segRange) {\n        seg = {\n          component: this,\n          eventRange,\n          start: segRange.start,\n          end: segRange.end,\n          isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(),\n          isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(),\n          dayIndex,\n        }\n\n        segs.push(seg)\n\n        // detect when range won't go fully into the next day,\n        // and mutate the latest seg to the be the end.\n        if (\n          !seg.isEnd && !allDay &&\n          dayIndex + 1 < dayRanges.length &&\n          range.end <\n            dateEnv.add(\n              dayRanges[dayIndex + 1].start,\n              nextDayThreshold,\n            )\n        ) {\n          seg.end = range.end\n          seg.isEnd = true\n          break\n        }\n      }\n    }\n\n    return segs\n  }\n}\n\nfunction renderNoEventsInner(hookProps) {\n  return hookProps.text\n}\n\nfunction computeDateVars(dateProfile: DateProfile) {\n  let dayStart = startOfDay(dateProfile.renderRange.start)\n  let viewEnd = dateProfile.renderRange.end\n  let dayDates: DateMarker[] = []\n  let dayRanges: DateRange[] = []\n\n  while (dayStart < viewEnd) {\n    dayDates.push(dayStart)\n\n    dayRanges.push({\n      start: dayStart,\n      end: addDays(dayStart, 1),\n    })\n\n    dayStart = addDays(dayStart, 1)\n  }\n\n  return { dayDates, dayRanges }\n}\n\n// Returns a sparse array of arrays, segs grouped by their dayIndex\nfunction groupSegsByDay(segs): Seg[][] {\n  let segsByDay = [] // sparse array\n  let i\n  let seg\n\n  for (i = 0; i < segs.length; i += 1) {\n    seg = segs[i];\n    (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n      .push(seg)\n  }\n\n  return segsByDay\n}\n","import {\n  identity,\n  Identity,\n  ClassNamesGenerator,\n  CustomContentGenerator,\n  DidMountHandler,\n  WillUnmountHandler,\n  createFormatter,\n  FormatterInput,\n} from '@fullcalendar/common'\n\n// public\nimport {\n  NoEventsContentArg,\n  NoEventsMountArg,\n} from './api-type-deps'\n\nexport const OPTION_REFINERS = {\n  listDayFormat: createFalsableFormatter, // defaults specified in list plugins\n  listDaySideFormat: createFalsableFormatter, // \"\n\n  noEventsClassNames: identity as Identity<ClassNamesGenerator<NoEventsContentArg>>,\n  noEventsContent: identity as Identity<CustomContentGenerator<NoEventsContentArg>>,\n  noEventsDidMount: identity as Identity<DidMountHandler<NoEventsMountArg>>,\n  noEventsWillUnmount: identity as Identity<WillUnmountHandler<NoEventsMountArg>>,\n\n  // noEventsText is defined in base options\n}\n\nfunction createFalsableFormatter(input: FormatterInput | false) {\n  return input === false ? null : createFormatter(input)\n}\n","import { createPlugin } from '@fullcalendar/common'\nimport { ListView } from './ListView'\nimport { OPTION_REFINERS } from './options'\nimport './options-declare'\nimport './main.css'\n\nexport { ListView }\nexport * from './api-type-deps'\n\nexport default createPlugin({\n  optionRefiners: OPTION_REFINERS,\n  views: {\n\n    list: {\n      component: ListView,\n      buttonTextKey: 'list', // what to lookup in locale files\n      listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' }, // like \"January 1, 2016\"\n    },\n\n    listDay: {\n      type: 'list',\n      duration: { days: 1 },\n      listDayFormat: { weekday: 'long' }, // day-of-week is all we need. full date is probably in headerToolbar\n    },\n\n    listWeek: {\n      type: 'list',\n      duration: { weeks: 1 },\n      listDayFormat: { weekday: 'long' }, // day-of-week is more important\n      listDaySideFormat: { month: 'long', day: 'numeric', year: 'numeric' },\n    },\n\n    listMonth: {\n      type: 'list',\n      duration: { month: 1 },\n      listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have\n    },\n\n    listYear: {\n      type: 'list',\n      duration: { year: 1 },\n      listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have\n    },\n\n  },\n})\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"import { RRule, RRuleSet, rrulestr, Options as RRuleOptions } from 'rrule'\nimport {\n  RecurringType,\n  EventRefined,\n  DateEnv,\n  DateRange,\n  DateMarker,\n  createPlugin,\n  parseMarker,\n  DateInput,\n} from '@fullcalendar/common'\nimport { RRULE_EVENT_REFINERS, RRuleInputObject } from './event-refiners'\nimport './event-declare'\n\ninterface EventRRuleData {\n  rruleSet: RRuleSet\n  isTimeZoneSpecified: boolean\n}\n\nlet recurring: RecurringType<EventRRuleData> = {\n  parse(eventProps: EventRefined, dateEnv: DateEnv) {\n    if (eventProps.rrule != null) {\n      let eventRRuleData = parseEventRRule(eventProps, dateEnv)\n\n      if (eventRRuleData) {\n        return {\n          typeData: { rruleSet: eventRRuleData.rruleSet, isTimeZoneSpecified: eventRRuleData.isTimeZoneSpecified },\n          allDayGuess: !eventRRuleData.isTimeSpecified,\n          duration: eventProps.duration,\n        }\n      }\n    }\n\n    return null\n  },\n  expand(eventRRuleData: EventRRuleData, framingRange: DateRange, dateEnv: DateEnv): DateMarker[] {\n    let dates: DateMarker[]\n\n    if (eventRRuleData.isTimeZoneSpecified) {\n      dates = eventRRuleData.rruleSet.between(\n        dateEnv.toDate(framingRange.start), // rrule lib will treat as UTC-zoned\n        dateEnv.toDate(framingRange.end), // (same)\n        true, // inclusive (will give extra events at start, see https://github.com/jakubroztocil/rrule/issues/84)\n      ).map((date) => dateEnv.createMarker(date)) // convert UTC-zoned-date to locale datemarker\n    } else {\n      // when no timezone in given start/end, the rrule lib will assume UTC,\n      // which is same as our DateMarkers. no need to manipulate\n      dates = eventRRuleData.rruleSet.between(\n        framingRange.start,\n        framingRange.end,\n        true, // inclusive (will give extra events at start, see https://github.com/jakubroztocil/rrule/issues/84)\n      )\n    }\n    return dates\n  },\n}\n\nexport default createPlugin({\n  recurringTypes: [recurring],\n  eventRefiners: RRULE_EVENT_REFINERS,\n})\n\nfunction parseEventRRule(eventProps: EventRefined, dateEnv: DateEnv) {\n  let rruleSet: RRuleSet\n  let isTimeSpecified = false\n  let isTimeZoneSpecified = false\n\n  if (typeof eventProps.rrule === 'string') {\n    let res = parseRRuleString(eventProps.rrule)\n    rruleSet = res.rruleSet\n    isTimeSpecified = res.isTimeSpecified\n    isTimeZoneSpecified = res.isTimeZoneSpecified\n  }\n\n  if (typeof eventProps.rrule === 'object' && eventProps.rrule) { // non-null object\n    let res = parseRRuleObject(eventProps.rrule, dateEnv)\n    rruleSet = new RRuleSet()\n    rruleSet.rrule(res.rrule)\n    isTimeSpecified = res.isTimeSpecified\n    isTimeZoneSpecified = res.isTimeZoneSpecified\n  }\n\n  // convery to arrays. TODO: general util?\n  let exdateInputs: DateInput[] = [].concat(eventProps.exdate || [])\n  let exruleInputs: RRuleInputObject[] = [].concat(eventProps.exrule || [])\n\n  for (let exdateInput of exdateInputs) {\n    let res = parseMarker(exdateInput)\n    isTimeSpecified = isTimeSpecified || !res.isTimeUnspecified\n    isTimeZoneSpecified = isTimeZoneSpecified || res.timeZoneOffset !== null\n    rruleSet.exdate(\n      new Date(res.marker.valueOf() - (res.timeZoneOffset || 0) * 60 * 1000), // NOT DRY\n    )\n  }\n\n  // TODO: exrule is deprecated. what to do? (https://icalendar.org/iCalendar-RFC-5545/a-3-deprecated-features.html)\n  for (let exruleInput of exruleInputs) {\n    let res = parseRRuleObject(exruleInput, dateEnv)\n    isTimeSpecified = isTimeSpecified || res.isTimeSpecified\n    isTimeZoneSpecified = isTimeZoneSpecified || res.isTimeZoneSpecified\n    rruleSet.exrule(res.rrule)\n  }\n\n  return { rruleSet, isTimeSpecified, isTimeZoneSpecified }\n}\n\nfunction parseRRuleObject(rruleInput: RRuleInputObject, dateEnv: DateEnv) {\n  let isTimeSpecified = false\n  let isTimeZoneSpecified = false\n\n  function processDateInput(dateInput: DateInput) {\n    if (typeof dateInput === 'string') {\n      let markerData = parseMarker(dateInput)\n      if (markerData) {\n        isTimeSpecified = isTimeSpecified || !markerData.isTimeUnspecified\n        isTimeZoneSpecified = isTimeZoneSpecified || markerData.timeZoneOffset !== null\n        return new Date(markerData.marker.valueOf() - (markerData.timeZoneOffset || 0) * 60 * 1000) // NOT DRY\n      }\n      return null\n    }\n    return dateInput as Date // TODO: what about number timestamps?\n  }\n\n  let rruleOptions: Partial<RRuleOptions> = {\n    ...rruleInput,\n    dtstart: processDateInput(rruleInput.dtstart),\n    until: processDateInput(rruleInput.until),\n    freq: convertConstant(rruleInput.freq),\n    wkst: rruleInput.wkst == null\n      ? (dateEnv.weekDow - 1 + 7) % 7 // convert Sunday-first to Monday-first\n      : convertConstant(rruleInput.wkst),\n    byweekday: convertConstants(rruleInput.byweekday),\n  }\n\n  return { rrule: new RRule(rruleOptions), isTimeSpecified, isTimeZoneSpecified }\n}\n\nfunction parseRRuleString(str) {\n  let rruleSet = rrulestr(str, { forceset: true }) as RRuleSet\n  let analysis = analyzeRRuleString(str)\n\n  return { rruleSet, ...analysis }\n}\n\nfunction analyzeRRuleString(str) {\n  let isTimeSpecified = false\n  let isTimeZoneSpecified = false\n\n  function processMatch(whole: string, introPart: string, datePart: string) {\n    let result = parseMarker(datePart)\n    isTimeSpecified = isTimeSpecified || !result.isTimeUnspecified\n    isTimeZoneSpecified = isTimeZoneSpecified || result.timeZoneOffset !== null\n  }\n\n  str.replace(/\\b(DTSTART:)([^\\n]*)/, processMatch)\n  str.replace(/\\b(EXDATE:)([^\\n]*)/, processMatch)\n  str.replace(/\\b(UNTIL=)([^;\\n]*)/, processMatch)\n\n  return { isTimeSpecified, isTimeZoneSpecified }\n}\n\nfunction convertConstants(input): number | null | number[] | null[] {\n  if (Array.isArray(input)) {\n    return input.map(convertConstant)\n  }\n  return convertConstant(input)\n}\n\nfunction convertConstant(input): number | null {\n  if (typeof input === 'string') {\n    return RRule[input.toUpperCase()]\n  }\n  return input\n}\n","import { createDuration, DateInput, identity, Identity } from '@fullcalendar/common'\nimport { Options as RRuleOptions } from 'rrule'\n\nexport type RRuleInputObjectFull = Omit<RRuleOptions, 'dtstart' | 'until' | 'freq' | 'wkst' | 'byweekday'> & {\n  dtstart: RRuleOptions['dtstart'] | DateInput\n  until: RRuleOptions['until'] | DateInput\n  freq: RRuleOptions['freq'] | string\n  wkst: RRuleOptions['wkst'] | string\n  byweekday: RRuleOptions['byweekday'] | string | string[]\n}\n\nexport type RRuleInputObject = Partial<RRuleInputObjectFull>\nexport type RRuleInput = RRuleInputObject | string\n\nexport const RRULE_EVENT_REFINERS = {\n  rrule: identity as Identity<RRuleInput>,\n  exrule: identity as Identity<RRuleInputObject | RRuleInputObject[]>,\n  exdate: identity as Identity<DateInput | DateInput[]>,\n  duration: createDuration,\n}\n","import {\n  createPlugin,\n  findElements,\n  flushSync,\n  CalendarContext,\n  removeExact,\n  config,\n} from '@fullcalendar/common'\n\nimport premiumCommonPlugin from '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n// ensure ambient declarations. TODO: remove?\nimport '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n\nimport './main.css'\n\nconfig.COLLAPSIBLE_WIDTH_THRESHOLD = 1200\n\nlet contexts: CalendarContext[] = []\nlet undoFuncs: (() => void)[] = []\n\nexport default createPlugin({\n  deps: [\n    premiumCommonPlugin,\n  ],\n  contextInit(context) {\n    if (!contexts.length) {\n      attachGlobalHandlers()\n    }\n    contexts.push(context)\n    context.calendarApi.on('_unmount', () => {\n      removeExact(contexts, context)\n      if (!contexts.length) {\n        removeGlobalHandlers()\n      }\n    })\n  },\n})\n\nfunction attachGlobalHandlers() {\n  window.addEventListener('beforeprint', handleBeforePrint)\n  window.addEventListener('afterprint', handleAfterPrint)\n\n  // // for testing\n  // let forPrint = false\n  // document.addEventListener('keypress', (ev) => {\n  //   if (ev.key === 'p') {\n  //     forPrint = !forPrint\n  //     if (forPrint) {\n  //       handleBeforePrint()\n  //     } else {\n  //       handleAfterPrint()\n  //     }\n  //   }\n  // })\n}\n\nfunction removeGlobalHandlers() {\n  window.removeEventListener('beforeprint', handleBeforePrint)\n  window.removeEventListener('afterprint', handleAfterPrint)\n}\n\nfunction handleBeforePrint() {\n  let scrollEls = queryScrollerEls()\n  let scrollCoords = queryScrollerCoords(scrollEls)\n\n  for (let context of contexts) {\n    context.emitter.trigger('_beforeprint')\n  }\n\n  flushSync(() => { // because printing grabs DOM immediately after\n    killHorizontalScrolling(scrollEls, scrollCoords)\n    undoFuncs.push(() => restoreScrollerCoords(scrollEls, scrollCoords))\n    undoFuncs.push(freezeScrollgridWidths())\n  })\n}\n\nfunction handleAfterPrint() {\n  for (let context of contexts) {\n    context.emitter.trigger('_afterprint')\n  }\n\n  flushSync(() => { // guarantee that there are real scrollers\n    while (undoFuncs.length) {\n      undoFuncs.shift()()\n    }\n  })\n}\n\n// scrollgrid widths\n\nfunction freezeScrollgridWidths() {\n  let els = findElements(document.body, '.fc-scrollgrid')\n  els.forEach(freezeScrollGridWidth)\n  return () => els.forEach(unfreezeScrollGridWidth)\n}\n\nfunction freezeScrollGridWidth(el: HTMLElement) {\n  let elWidth = el.getBoundingClientRect().width\n\n  // along with collapsibleWidth, this is a hack for #5707\n  if (!el.classList.contains('fc-scrollgrid-collapsible') || elWidth < config.COLLAPSIBLE_WIDTH_THRESHOLD) {\n    el.style.width = elWidth + 'px'\n  }\n}\n\nfunction unfreezeScrollGridWidth(el) {\n  el.style.width = ''\n}\n\n// scrollers\n// TODO: use scroll normalization!? yes\n\nfunction queryScrollerEls() {\n  return findElements(document.body, '.fc-scroller-harness > .fc-scroller')\n}\n\ninterface ScrollerCoords {\n  scrollLeft: number\n  scrollTop: number\n  overflowX: string\n  overflowY: string\n  marginBottom: string\n}\n\nfunction queryScrollerCoords(els: HTMLElement[]): ScrollerCoords[] {\n  return els.map((el) => {\n    let computedStyle = window.getComputedStyle(el)\n\n    return {\n      scrollLeft: el.scrollLeft,\n      scrollTop: el.scrollTop,\n      overflowX: computedStyle.overflowX,\n      overflowY: computedStyle.overflowY,\n      marginBottom: computedStyle.marginBottom,\n    }\n  })\n}\n\nfunction killHorizontalScrolling(els: HTMLElement[], coords: ScrollerCoords[]) {\n  els.forEach((el, i) => {\n    el.style.overflowX = 'visible' // need to clear X/Y to get true overflow\n    el.style.overflowY = 'visible' // \"\n    el.style.marginBottom = '' // for clipping away scrollbar. disable\n    el.style.left = -coords[i].scrollLeft + 'px' // simulate scrollLeft! will be position:relative\n  })\n}\n\nfunction restoreScrollerCoords(els: HTMLElement[], coords: ScrollerCoords[]) { // restores vertical scrolling too\n  els.forEach((el, i) => {\n    let c = coords[i]\n    el.style.overflowX = c.overflowX\n    el.style.overflowY = c.overflowY\n    el.style.marginBottom = c.marginBottom\n    el.style.left = ''\n    el.scrollLeft = c.scrollLeft\n    el.scrollTop = c.scrollTop\n  })\n}\n","export default function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, _typeof(obj);\n}","export default function requiredArgs(required, args) {\n  if (args.length < required) {\n    throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n  }\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport default function isDate(value) {\n  requiredArgs(1, arguments);\n  return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport default function toDate(argument) {\n  requiredArgs(1, arguments);\n  var argStr = Object.prototype.toString.call(argument);\n\n  // Clone the date\n  if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n    // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n    return new Date(argument.getTime());\n  } else if (typeof argument === 'number' || argStr === '[object Number]') {\n    return new Date(argument);\n  } else {\n    if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n      // eslint-disable-next-line no-console\n      console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\");\n      // eslint-disable-next-line no-console\n      console.warn(new Error().stack);\n    }\n    return new Date(NaN);\n  }\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport default function isValid(dirtyDate) {\n  requiredArgs(1, arguments);\n  if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n    return false;\n  }\n  var date = toDate(dirtyDate);\n  return !isNaN(Number(date));\n}","export default function toInteger(dirtyNumber) {\n  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n    return NaN;\n  }\n  var number = Number(dirtyNumber);\n  if (isNaN(number)) {\n    return number;\n  }\n  return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var timestamp = toDate(dirtyDate).getTime();\n  var amount = toInteger(dirtyAmount);\n  return new Date(timestamp + amount);\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMilliseconds(dirtyDate, -amount);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var timestamp = date.getTime();\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n  var startOfYearTimestamp = date.getTime();\n  var difference = timestamp - startOfYearTimestamp;\n  return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n  requiredArgs(1, arguments);\n  var weekStartsOn = 1;\n  var date = toDate(dirtyDate);\n  var day = date.getUTCDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setUTCDate(date.getUTCDate() - diff);\n  date.setUTCHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getUTCFullYear();\n  var fourthOfJanuaryOfNextYear = new Date(0);\n  fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n  fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n  var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n  var fourthOfJanuaryOfThisYear = new Date(0);\n  fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n  fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n  var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n  if (date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var year = getUTCISOWeekYear(dirtyDate);\n  var fourthOfJanuary = new Date(0);\n  fourthOfJanuary.setUTCFullYear(year, 0, 4);\n  fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n  var date = startOfUTCISOWeek(fourthOfJanuary);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();\n\n  // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","var defaultOptions = {};\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n\n  // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n  var date = toDate(dirtyDate);\n  var day = date.getUTCDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setUTCDate(date.getUTCDate() - diff);\n  date.setUTCHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getUTCFullYear();\n  var defaultOptions = getDefaultOptions();\n  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n\n  // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n    throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n  }\n  var firstWeekOfNextYear = new Date(0);\n  firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n  firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n  var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n  var firstWeekOfThisYear = new Date(0);\n  firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n  firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n  var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n  if (date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n  var year = getUTCWeekYear(dirtyDate, options);\n  var firstWeek = new Date(0);\n  firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n  firstWeek.setUTCHours(0, 0, 0, 0);\n  var date = startOfUTCWeek(firstWeek, options);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();\n\n  // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n  var sign = number < 0 ? '-' : '';\n  var output = Math.abs(number).toString();\n  while (output.length < targetLength) {\n    output = '0' + output;\n  }\n  return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* |                                |\n * |  d  | Day of month                   |  D  |                                |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  m  | Minute                         |  M  | Month                          |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  y  | Year (abs)                     |  Y  |                                |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\nvar formatters = {\n  // Year\n  y: function y(date, token) {\n    // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n    // | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n    // |----------|-------|----|-------|-------|-------|\n    // | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n    // | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n    // | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n    // | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n    // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n    var signedYear = date.getUTCFullYear();\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    var year = signedYear > 0 ? signedYear : 1 - signedYear;\n    return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n  },\n  // Month\n  M: function M(date, token) {\n    var month = date.getUTCMonth();\n    return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n  },\n  // Day of the month\n  d: function d(date, token) {\n    return addLeadingZeros(date.getUTCDate(), token.length);\n  },\n  // AM or PM\n  a: function a(date, token) {\n    var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n    switch (token) {\n      case 'a':\n      case 'aa':\n        return dayPeriodEnumValue.toUpperCase();\n      case 'aaa':\n        return dayPeriodEnumValue;\n      case 'aaaaa':\n        return dayPeriodEnumValue[0];\n      case 'aaaa':\n      default:\n        return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n    }\n  },\n  // Hour [1-12]\n  h: function h(date, token) {\n    return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n  },\n  // Hour [0-23]\n  H: function H(date, token) {\n    return addLeadingZeros(date.getUTCHours(), token.length);\n  },\n  // Minute\n  m: function m(date, token) {\n    return addLeadingZeros(date.getUTCMinutes(), token.length);\n  },\n  // Second\n  s: function s(date, token) {\n    return addLeadingZeros(date.getUTCSeconds(), token.length);\n  },\n  // Fraction of second\n  S: function S(date, token) {\n    var numberOfDigits = token.length;\n    var milliseconds = date.getUTCMilliseconds();\n    var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n    return addLeadingZeros(fractionalSeconds, token.length);\n  }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n  am: 'am',\n  pm: 'pm',\n  midnight: 'midnight',\n  noon: 'noon',\n  morning: 'morning',\n  afternoon: 'afternoon',\n  evening: 'evening',\n  night: 'night'\n};\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |\n * |  p! | Long localized time            |  P! | Long localized date            |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n  // Era\n  G: function G(date, token, localize) {\n    var era = date.getUTCFullYear() > 0 ? 1 : 0;\n    switch (token) {\n      // AD, BC\n      case 'G':\n      case 'GG':\n      case 'GGG':\n        return localize.era(era, {\n          width: 'abbreviated'\n        });\n      // A, B\n      case 'GGGGG':\n        return localize.era(era, {\n          width: 'narrow'\n        });\n      // Anno Domini, Before Christ\n      case 'GGGG':\n      default:\n        return localize.era(era, {\n          width: 'wide'\n        });\n    }\n  },\n  // Year\n  y: function y(date, token, localize) {\n    // Ordinal number\n    if (token === 'yo') {\n      var signedYear = date.getUTCFullYear();\n      // Returns 1 for 1 BC (which is year 0 in JavaScript)\n      var year = signedYear > 0 ? signedYear : 1 - signedYear;\n      return localize.ordinalNumber(year, {\n        unit: 'year'\n      });\n    }\n    return lightFormatters.y(date, token);\n  },\n  // Local week-numbering year\n  Y: function Y(date, token, localize, options) {\n    var signedWeekYear = getUTCWeekYear(date, options);\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n    // Two digit year\n    if (token === 'YY') {\n      var twoDigitYear = weekYear % 100;\n      return addLeadingZeros(twoDigitYear, 2);\n    }\n\n    // Ordinal number\n    if (token === 'Yo') {\n      return localize.ordinalNumber(weekYear, {\n        unit: 'year'\n      });\n    }\n\n    // Padding\n    return addLeadingZeros(weekYear, token.length);\n  },\n  // ISO week-numbering year\n  R: function R(date, token) {\n    var isoWeekYear = getUTCISOWeekYear(date);\n\n    // Padding\n    return addLeadingZeros(isoWeekYear, token.length);\n  },\n  // Extended year. This is a single number designating the year of this calendar system.\n  // The main difference between `y` and `u` localizers are B.C. years:\n  // | Year | `y` | `u` |\n  // |------|-----|-----|\n  // | AC 1 |   1 |   1 |\n  // | BC 1 |   1 |   0 |\n  // | BC 2 |   2 |  -1 |\n  // Also `yy` always returns the last two digits of a year,\n  // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n  u: function u(date, token) {\n    var year = date.getUTCFullYear();\n    return addLeadingZeros(year, token.length);\n  },\n  // Quarter\n  Q: function Q(date, token, localize) {\n    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'Q':\n        return String(quarter);\n      // 01, 02, 03, 04\n      case 'QQ':\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case 'Qo':\n        return localize.ordinalNumber(quarter, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n      case 'QQQ':\n        return localize.quarter(quarter, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case 'QQQQQ':\n        return localize.quarter(quarter, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // 1st quarter, 2nd quarter, ...\n      case 'QQQQ':\n      default:\n        return localize.quarter(quarter, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone quarter\n  q: function q(date, token, localize) {\n    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'q':\n        return String(quarter);\n      // 01, 02, 03, 04\n      case 'qq':\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case 'qo':\n        return localize.ordinalNumber(quarter, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n      case 'qqq':\n        return localize.quarter(quarter, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case 'qqqqq':\n        return localize.quarter(quarter, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // 1st quarter, 2nd quarter, ...\n      case 'qqqq':\n      default:\n        return localize.quarter(quarter, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // Month\n  M: function M(date, token, localize) {\n    var month = date.getUTCMonth();\n    switch (token) {\n      case 'M':\n      case 'MM':\n        return lightFormatters.M(date, token);\n      // 1st, 2nd, ..., 12th\n      case 'Mo':\n        return localize.ordinalNumber(month + 1, {\n          unit: 'month'\n        });\n      // Jan, Feb, ..., Dec\n      case 'MMM':\n        return localize.month(month, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // J, F, ..., D\n      case 'MMMMM':\n        return localize.month(month, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // January, February, ..., December\n      case 'MMMM':\n      default:\n        return localize.month(month, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone month\n  L: function L(date, token, localize) {\n    var month = date.getUTCMonth();\n    switch (token) {\n      // 1, 2, ..., 12\n      case 'L':\n        return String(month + 1);\n      // 01, 02, ..., 12\n      case 'LL':\n        return addLeadingZeros(month + 1, 2);\n      // 1st, 2nd, ..., 12th\n      case 'Lo':\n        return localize.ordinalNumber(month + 1, {\n          unit: 'month'\n        });\n      // Jan, Feb, ..., Dec\n      case 'LLL':\n        return localize.month(month, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // J, F, ..., D\n      case 'LLLLL':\n        return localize.month(month, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // January, February, ..., December\n      case 'LLLL':\n      default:\n        return localize.month(month, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // Local week of year\n  w: function w(date, token, localize, options) {\n    var week = getUTCWeek(date, options);\n    if (token === 'wo') {\n      return localize.ordinalNumber(week, {\n        unit: 'week'\n      });\n    }\n    return addLeadingZeros(week, token.length);\n  },\n  // ISO week of year\n  I: function I(date, token, localize) {\n    var isoWeek = getUTCISOWeek(date);\n    if (token === 'Io') {\n      return localize.ordinalNumber(isoWeek, {\n        unit: 'week'\n      });\n    }\n    return addLeadingZeros(isoWeek, token.length);\n  },\n  // Day of the month\n  d: function d(date, token, localize) {\n    if (token === 'do') {\n      return localize.ordinalNumber(date.getUTCDate(), {\n        unit: 'date'\n      });\n    }\n    return lightFormatters.d(date, token);\n  },\n  // Day of year\n  D: function D(date, token, localize) {\n    var dayOfYear = getUTCDayOfYear(date);\n    if (token === 'Do') {\n      return localize.ordinalNumber(dayOfYear, {\n        unit: 'dayOfYear'\n      });\n    }\n    return addLeadingZeros(dayOfYear, token.length);\n  },\n  // Day of week\n  E: function E(date, token, localize) {\n    var dayOfWeek = date.getUTCDay();\n    switch (token) {\n      // Tue\n      case 'E':\n      case 'EE':\n      case 'EEE':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n      case 'EEEEE':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n      case 'EEEEEE':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n      case 'EEEE':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Local day of week\n  e: function e(date, token, localize, options) {\n    var dayOfWeek = date.getUTCDay();\n    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (Nth day of week with current locale or weekStartsOn)\n      case 'e':\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case 'ee':\n        return addLeadingZeros(localDayOfWeek, 2);\n      // 1st, 2nd, ..., 7th\n      case 'eo':\n        return localize.ordinalNumber(localDayOfWeek, {\n          unit: 'day'\n        });\n      case 'eee':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n      case 'eeeee':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n      case 'eeeeee':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n      case 'eeee':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone local day of week\n  c: function c(date, token, localize, options) {\n    var dayOfWeek = date.getUTCDay();\n    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (same as in `e`)\n      case 'c':\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case 'cc':\n        return addLeadingZeros(localDayOfWeek, token.length);\n      // 1st, 2nd, ..., 7th\n      case 'co':\n        return localize.ordinalNumber(localDayOfWeek, {\n          unit: 'day'\n        });\n      case 'ccc':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // T\n      case 'ccccc':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // Tu\n      case 'cccccc':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'standalone'\n        });\n      // Tuesday\n      case 'cccc':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // ISO day of week\n  i: function i(date, token, localize) {\n    var dayOfWeek = date.getUTCDay();\n    var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n    switch (token) {\n      // 2\n      case 'i':\n        return String(isoDayOfWeek);\n      // 02\n      case 'ii':\n        return addLeadingZeros(isoDayOfWeek, token.length);\n      // 2nd\n      case 'io':\n        return localize.ordinalNumber(isoDayOfWeek, {\n          unit: 'day'\n        });\n      // Tue\n      case 'iii':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n      case 'iiiii':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n      case 'iiiiii':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n      case 'iiii':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // AM or PM\n  a: function a(date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n    switch (token) {\n      case 'a':\n      case 'aa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      case 'aaa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }).toLowerCase();\n      case 'aaaaa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      case 'aaaa':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // AM, PM, midnight, noon\n  b: function b(date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue;\n    if (hours === 12) {\n      dayPeriodEnumValue = dayPeriodEnum.noon;\n    } else if (hours === 0) {\n      dayPeriodEnumValue = dayPeriodEnum.midnight;\n    } else {\n      dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n    }\n    switch (token) {\n      case 'b':\n      case 'bb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      case 'bbb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }).toLowerCase();\n      case 'bbbbb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      case 'bbbb':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // in the morning, in the afternoon, in the evening, at night\n  B: function B(date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue;\n    if (hours >= 17) {\n      dayPeriodEnumValue = dayPeriodEnum.evening;\n    } else if (hours >= 12) {\n      dayPeriodEnumValue = dayPeriodEnum.afternoon;\n    } else if (hours >= 4) {\n      dayPeriodEnumValue = dayPeriodEnum.morning;\n    } else {\n      dayPeriodEnumValue = dayPeriodEnum.night;\n    }\n    switch (token) {\n      case 'B':\n      case 'BB':\n      case 'BBB':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      case 'BBBBB':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      case 'BBBB':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Hour [1-12]\n  h: function h(date, token, localize) {\n    if (token === 'ho') {\n      var hours = date.getUTCHours() % 12;\n      if (hours === 0) hours = 12;\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n    return lightFormatters.h(date, token);\n  },\n  // Hour [0-23]\n  H: function H(date, token, localize) {\n    if (token === 'Ho') {\n      return localize.ordinalNumber(date.getUTCHours(), {\n        unit: 'hour'\n      });\n    }\n    return lightFormatters.H(date, token);\n  },\n  // Hour [0-11]\n  K: function K(date, token, localize) {\n    var hours = date.getUTCHours() % 12;\n    if (token === 'Ko') {\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n    return addLeadingZeros(hours, token.length);\n  },\n  // Hour [1-24]\n  k: function k(date, token, localize) {\n    var hours = date.getUTCHours();\n    if (hours === 0) hours = 24;\n    if (token === 'ko') {\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n    return addLeadingZeros(hours, token.length);\n  },\n  // Minute\n  m: function m(date, token, localize) {\n    if (token === 'mo') {\n      return localize.ordinalNumber(date.getUTCMinutes(), {\n        unit: 'minute'\n      });\n    }\n    return lightFormatters.m(date, token);\n  },\n  // Second\n  s: function s(date, token, localize) {\n    if (token === 'so') {\n      return localize.ordinalNumber(date.getUTCSeconds(), {\n        unit: 'second'\n      });\n    }\n    return lightFormatters.s(date, token);\n  },\n  // Fraction of second\n  S: function S(date, token) {\n    return lightFormatters.S(date, token);\n  },\n  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n  X: function X(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n    if (timezoneOffset === 0) {\n      return 'Z';\n    }\n    switch (token) {\n      // Hours and optional minutes\n      case 'X':\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XX`\n      case 'XXXX':\n      case 'XX':\n        // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XXX`\n      case 'XXXXX':\n      case 'XXX': // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n  x: function x(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n    switch (token) {\n      // Hours and optional minutes\n      case 'x':\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xx`\n      case 'xxxx':\n      case 'xx':\n        // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xxx`\n      case 'xxxxx':\n      case 'xxx': // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (GMT)\n  O: function O(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n    switch (token) {\n      // Short\n      case 'O':\n      case 'OO':\n      case 'OOO':\n        return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n      // Long\n      case 'OOOO':\n      default:\n        return 'GMT' + formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (specific non-location)\n  z: function z(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n    switch (token) {\n      // Short\n      case 'z':\n      case 'zz':\n      case 'zzz':\n        return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n      // Long\n      case 'zzzz':\n      default:\n        return 'GMT' + formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Seconds timestamp\n  t: function t(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timestamp = Math.floor(originalDate.getTime() / 1000);\n    return addLeadingZeros(timestamp, token.length);\n  },\n  // Milliseconds timestamp\n  T: function T(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timestamp = originalDate.getTime();\n    return addLeadingZeros(timestamp, token.length);\n  }\n};\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n  var sign = offset > 0 ? '-' : '+';\n  var absOffset = Math.abs(offset);\n  var hours = Math.floor(absOffset / 60);\n  var minutes = absOffset % 60;\n  if (minutes === 0) {\n    return sign + String(hours);\n  }\n  var delimiter = dirtyDelimiter || '';\n  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n  if (offset % 60 === 0) {\n    var sign = offset > 0 ? '-' : '+';\n    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n  }\n  return formatTimezone(offset, dirtyDelimiter);\n}\nfunction formatTimezone(offset, dirtyDelimiter) {\n  var delimiter = dirtyDelimiter || '';\n  var sign = offset > 0 ? '-' : '+';\n  var absOffset = Math.abs(offset);\n  var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n  var minutes = addLeadingZeros(absOffset % 60, 2);\n  return sign + hours + delimiter + minutes;\n}\nexport default formatters;","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n  switch (pattern) {\n    case 'P':\n      return formatLong.date({\n        width: 'short'\n      });\n    case 'PP':\n      return formatLong.date({\n        width: 'medium'\n      });\n    case 'PPP':\n      return formatLong.date({\n        width: 'long'\n      });\n    case 'PPPP':\n    default:\n      return formatLong.date({\n        width: 'full'\n      });\n  }\n};\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n  switch (pattern) {\n    case 'p':\n      return formatLong.time({\n        width: 'short'\n      });\n    case 'pp':\n      return formatLong.time({\n        width: 'medium'\n      });\n    case 'ppp':\n      return formatLong.time({\n        width: 'long'\n      });\n    case 'pppp':\n    default:\n      return formatLong.time({\n        width: 'full'\n      });\n  }\n};\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n  var matchResult = pattern.match(/(P+)(p+)?/) || [];\n  var datePattern = matchResult[1];\n  var timePattern = matchResult[2];\n  if (!timePattern) {\n    return dateLongFormatter(pattern, formatLong);\n  }\n  var dateTimeFormat;\n  switch (datePattern) {\n    case 'P':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'short'\n      });\n      break;\n    case 'PP':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'medium'\n      });\n      break;\n    case 'PPP':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'long'\n      });\n      break;\n    case 'PPPP':\n    default:\n      dateTimeFormat = formatLong.dateTime({\n        width: 'full'\n      });\n      break;\n  }\n  return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\nvar longFormatters = {\n  p: timeLongFormatter,\n  P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n  var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n  utcDate.setUTCFullYear(date.getFullYear());\n  return date.getTime() - utcDate.getTime();\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n  return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n  return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n  if (token === 'YYYY') {\n    throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'YY') {\n    throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'D') {\n    throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'DD') {\n    throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  }\n}","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: 'less than a second',\n    other: 'less than {{count}} seconds'\n  },\n  xSeconds: {\n    one: '1 second',\n    other: '{{count}} seconds'\n  },\n  halfAMinute: 'half a minute',\n  lessThanXMinutes: {\n    one: 'less than a minute',\n    other: 'less than {{count}} minutes'\n  },\n  xMinutes: {\n    one: '1 minute',\n    other: '{{count}} minutes'\n  },\n  aboutXHours: {\n    one: 'about 1 hour',\n    other: 'about {{count}} hours'\n  },\n  xHours: {\n    one: '1 hour',\n    other: '{{count}} hours'\n  },\n  xDays: {\n    one: '1 day',\n    other: '{{count}} days'\n  },\n  aboutXWeeks: {\n    one: 'about 1 week',\n    other: 'about {{count}} weeks'\n  },\n  xWeeks: {\n    one: '1 week',\n    other: '{{count}} weeks'\n  },\n  aboutXMonths: {\n    one: 'about 1 month',\n    other: 'about {{count}} months'\n  },\n  xMonths: {\n    one: '1 month',\n    other: '{{count}} months'\n  },\n  aboutXYears: {\n    one: 'about 1 year',\n    other: 'about {{count}} years'\n  },\n  xYears: {\n    one: '1 year',\n    other: '{{count}} years'\n  },\n  overXYears: {\n    one: 'over 1 year',\n    other: 'over {{count}} years'\n  },\n  almostXYears: {\n    one: 'almost 1 year',\n    other: 'almost {{count}} years'\n  }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n  var result;\n  var tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === 'string') {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace('{{count}}', count.toString());\n  }\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'in ' + result;\n    } else {\n      return result + ' ago';\n    }\n  }\n  return result;\n};\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n  return function () {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    // TODO: Remove String()\n    var width = options.width ? String(options.width) : args.defaultWidth;\n    var format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE, MMMM do, y',\n  long: 'MMMM do, y',\n  medium: 'MMM d, y',\n  short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n  full: 'h:mm:ss a zzzz',\n  long: 'h:mm:ss a z',\n  medium: 'h:mm:ss a',\n  short: 'h:mm a'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: 'P'\n};\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n  return formatRelativeLocale[token];\n};\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n  return function (dirtyIndex, options) {\n    var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n    var valuesArray;\n    if (context === 'formatting' && args.formattingValues) {\n      var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n      valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      var _defaultWidth = args.defaultWidth;\n      var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n      valuesArray = args.values[_width] || args.values[_defaultWidth];\n    }\n    var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;\n    // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}","export default function buildMatchFn(args) {\n  return function (string) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var width = options.width;\n    var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n    var matchResult = string.match(matchPattern);\n    if (!matchResult) {\n      return null;\n    }\n    var matchedString = matchResult[0];\n    var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n    var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n      return pattern.test(matchedString);\n    }) : findKey(parsePatterns, function (pattern) {\n      return pattern.test(matchedString);\n    });\n    var value;\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback ? options.valueCallback(value) : value;\n    var rest = string.slice(matchedString.length);\n    return {\n      value: value,\n      rest: rest\n    };\n  };\n}\nfunction findKey(object, predicate) {\n  for (var key in object) {\n    if (object.hasOwnProperty(key) && predicate(object[key])) {\n      return key;\n    }\n  }\n  return undefined;\n}\nfunction findIndex(array, predicate) {\n  for (var key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n  return undefined;\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n  any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function valueCallback(value) {\n      return parseInt(value, 10);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function valueCallback(index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'any',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","export default function buildMatchPatternFn(args) {\n  return function (string) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    var matchedString = matchResult[0];\n    var parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n    value = options.valueCallback ? options.valueCallback(value) : value;\n    var rest = string.slice(matchedString.length);\n    return {\n      value: value,\n      rest: rest\n    };\n  };\n}","import defaultLocale from \"../../locale/en-US/index.js\";\nexport default defaultLocale;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n  code: 'en-US',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1\n  }\n};\nexport default locale;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['B', 'A'],\n  abbreviated: ['BC', 'AD'],\n  wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n  narrow: ['1', '2', '3', '4'],\n  abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n  wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nvar monthValues = {\n  narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n  abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n  wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n  narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n  short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n  abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n  wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mi',\n    noon: 'n',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  }\n};\nvar formattingDayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mi',\n    noon: 'n',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n  var number = Number(dirtyNumber);\n\n  // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  var rem100 = number % 100;\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + 'st';\n      case 2:\n        return number + 'nd';\n      case 3:\n        return number + 'rd';\n    }\n  }\n  return number + 'th';\n};\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function argumentCallback(quarter) {\n      return quarter - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide',\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: 'wide'\n  })\n};\nexport default localize;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          | a..aa   | AM, PM                            |       |\n * |                                 | aaa     | am, pm                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |\n * |                                 | bbb     | am, pm, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 001, ..., 999                |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |\n * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 04/29/1453                        | 7     |\n * |                                 | PP      | Apr 29, 1453                      | 7     |\n * |                                 | PPP     | April 29th, 1453                  | 7     |\n * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |\n * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n *    and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n *    so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n  var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n  requiredArgs(2, arguments);\n  var formatStr = String(dirtyFormatStr);\n  var defaultOptions = getDefaultOptions();\n  var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);\n\n  // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n    throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n  }\n  var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);\n\n  // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n  if (!locale.localize) {\n    throw new RangeError('locale must contain localize property');\n  }\n  if (!locale.formatLong) {\n    throw new RangeError('locale must contain formatLong property');\n  }\n  var originalDate = toDate(dirtyDate);\n  if (!isValid(originalDate)) {\n    throw new RangeError('Invalid time value');\n  }\n\n  // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n  // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n  // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n  var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n  var utcDate = subMilliseconds(originalDate, timezoneOffset);\n  var formatterOptions = {\n    firstWeekContainsDate: firstWeekContainsDate,\n    weekStartsOn: weekStartsOn,\n    locale: locale,\n    _originalDate: originalDate\n  };\n  var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n    var firstCharacter = substring[0];\n    if (firstCharacter === 'p' || firstCharacter === 'P') {\n      var longFormatter = longFormatters[firstCharacter];\n      return longFormatter(substring, locale.formatLong);\n    }\n    return substring;\n  }).join('').match(formattingTokensRegExp).map(function (substring) {\n    // Replace two single quote characters with one single quote character\n    if (substring === \"''\") {\n      return \"'\";\n    }\n    var firstCharacter = substring[0];\n    if (firstCharacter === \"'\") {\n      return cleanEscapedString(substring);\n    }\n    var formatter = formatters[firstCharacter];\n    if (formatter) {\n      if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n      }\n      if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n      }\n      return formatter(utcDate, substring, locale.localize, formatterOptions);\n    }\n    if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n      throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n    }\n    return substring;\n  }).join('');\n  return result;\n}\nfunction cleanEscapedString(input) {\n  var matched = input.match(escapedStringRegExp);\n  if (!matched) {\n    return input;\n  }\n  return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInYear = 365.2425;\n\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInMinute = 60000;\n\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInHour = 3600000;\n\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInSecond = 1000;\n\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\nexport var minTime = -maxTime;\n\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var minutesInHour = 60;\n\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInQuarter = 3;\n\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInYear = 12;\n\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var quartersInYear = 4;\n\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInHour = 3600;\n\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMinute = 60;\n\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInDay = secondsInHour * 24;\n\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInWeek = secondsInDay * 7;\n\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInYear = secondsInDay * daysInYear;\n\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMonth = secondsInYear / 12;\n\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInQuarter = secondsInMonth * 3;","import { millisecondsInHour, millisecondsInMinute } from \"../constants/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * @param {String} argument - the value to convert\n * @param {Object} [options] - an object with options.\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport default function parseISO(argument, options) {\n  var _options$additionalDi;\n  requiredArgs(1, arguments);\n  var additionalDigits = toInteger((_options$additionalDi = options === null || options === void 0 ? void 0 : options.additionalDigits) !== null && _options$additionalDi !== void 0 ? _options$additionalDi : 2);\n  if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n    throw new RangeError('additionalDigits must be 0, 1 or 2');\n  }\n  if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n    return new Date(NaN);\n  }\n  var dateStrings = splitDateString(argument);\n  var date;\n  if (dateStrings.date) {\n    var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n    date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n  }\n  if (!date || isNaN(date.getTime())) {\n    return new Date(NaN);\n  }\n  var timestamp = date.getTime();\n  var time = 0;\n  var offset;\n  if (dateStrings.time) {\n    time = parseTime(dateStrings.time);\n    if (isNaN(time)) {\n      return new Date(NaN);\n    }\n  }\n  if (dateStrings.timezone) {\n    offset = parseTimezone(dateStrings.timezone);\n    if (isNaN(offset)) {\n      return new Date(NaN);\n    }\n  } else {\n    var dirtyDate = new Date(timestamp + time);\n    // js parsed string assuming it's in UTC timezone\n    // but we need it to be parsed in our timezone\n    // so we use utc values to build date in our timezone.\n    // Year values from 0 to 99 map to the years 1900 to 1999\n    // so set year explicitly with setFullYear.\n    var result = new Date(0);\n    result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate());\n    result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds());\n    return result;\n  }\n  return new Date(timestamp + time + offset);\n}\nvar patterns = {\n  dateTimeDelimiter: /[T ]/,\n  timeZoneDelimiter: /[Z ]/i,\n  timezone: /([Z+-].*)$/\n};\nvar dateRegex = /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nvar timeRegex = /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nvar timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\nfunction splitDateString(dateString) {\n  var dateStrings = {};\n  var array = dateString.split(patterns.dateTimeDelimiter);\n  var timeString;\n\n  // The regex match should only return at maximum two array elements.\n  // [date], [time], or [date, time].\n  if (array.length > 2) {\n    return dateStrings;\n  }\n  if (/:/.test(array[0])) {\n    timeString = array[0];\n  } else {\n    dateStrings.date = array[0];\n    timeString = array[1];\n    if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n      dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n      timeString = dateString.substr(dateStrings.date.length, dateString.length);\n    }\n  }\n  if (timeString) {\n    var token = patterns.timezone.exec(timeString);\n    if (token) {\n      dateStrings.time = timeString.replace(token[1], '');\n      dateStrings.timezone = token[1];\n    } else {\n      dateStrings.time = timeString;\n    }\n  }\n  return dateStrings;\n}\nfunction parseYear(dateString, additionalDigits) {\n  var regex = new RegExp('^(?:(\\\\d{4}|[+-]\\\\d{' + (4 + additionalDigits) + '})|(\\\\d{2}|[+-]\\\\d{' + (2 + additionalDigits) + '})$)');\n  var captures = dateString.match(regex);\n  // Invalid ISO-formatted year\n  if (!captures) return {\n    year: NaN,\n    restDateString: ''\n  };\n  var year = captures[1] ? parseInt(captures[1]) : null;\n  var century = captures[2] ? parseInt(captures[2]) : null;\n\n  // either year or century is null, not both\n  return {\n    year: century === null ? year : century * 100,\n    restDateString: dateString.slice((captures[1] || captures[2]).length)\n  };\n}\nfunction parseDate(dateString, year) {\n  // Invalid ISO-formatted year\n  if (year === null) return new Date(NaN);\n  var captures = dateString.match(dateRegex);\n  // Invalid ISO-formatted string\n  if (!captures) return new Date(NaN);\n  var isWeekDate = !!captures[4];\n  var dayOfYear = parseDateUnit(captures[1]);\n  var month = parseDateUnit(captures[2]) - 1;\n  var day = parseDateUnit(captures[3]);\n  var week = parseDateUnit(captures[4]);\n  var dayOfWeek = parseDateUnit(captures[5]) - 1;\n  if (isWeekDate) {\n    if (!validateWeekDate(year, week, dayOfWeek)) {\n      return new Date(NaN);\n    }\n    return dayOfISOWeekYear(year, week, dayOfWeek);\n  } else {\n    var date = new Date(0);\n    if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {\n      return new Date(NaN);\n    }\n    date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n    return date;\n  }\n}\nfunction parseDateUnit(value) {\n  return value ? parseInt(value) : 1;\n}\nfunction parseTime(timeString) {\n  var captures = timeString.match(timeRegex);\n  if (!captures) return NaN; // Invalid ISO-formatted time\n\n  var hours = parseTimeUnit(captures[1]);\n  var minutes = parseTimeUnit(captures[2]);\n  var seconds = parseTimeUnit(captures[3]);\n  if (!validateTime(hours, minutes, seconds)) {\n    return NaN;\n  }\n  return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000;\n}\nfunction parseTimeUnit(value) {\n  return value && parseFloat(value.replace(',', '.')) || 0;\n}\nfunction parseTimezone(timezoneString) {\n  if (timezoneString === 'Z') return 0;\n  var captures = timezoneString.match(timezoneRegex);\n  if (!captures) return 0;\n  var sign = captures[1] === '+' ? -1 : 1;\n  var hours = parseInt(captures[2]);\n  var minutes = captures[3] && parseInt(captures[3]) || 0;\n  if (!validateTimezone(hours, minutes)) {\n    return NaN;\n  }\n  return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n  var date = new Date(0);\n  date.setUTCFullYear(isoWeekYear, 0, 4);\n  var fourthOfJanuaryDay = date.getUTCDay() || 7;\n  var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n  date.setUTCDate(date.getUTCDate() + diff);\n  return date;\n}\n\n// Validation functions\n\n// February is null to handle the leap year (using ||)\nvar daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction isLeapYearIndex(year) {\n  return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\nfunction validateDate(year, month, date) {\n  return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));\n}\nfunction validateDayOfYearDate(year, dayOfYear) {\n  return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\nfunction validateWeekDate(_year, week, day) {\n  return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\nfunction validateTime(hours, minutes, seconds) {\n  if (hours === 24) {\n    return minutes === 0 && seconds === 0;\n  }\n  return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;\n}\nfunction validateTimezone(_hours, minutes) {\n  return minutes >= 0 && minutes <= 59;\n}","import { Calendar } from '@fullcalendar/core';\nimport dayGridPlugin from '@fullcalendar/daygrid';\nimport timeGridPlugin from '@fullcalendar/timegrid';\nimport resourceTimelinePlugin from '@fullcalendar/resource-timeline';\nimport interactionPlugin from '@fullcalendar/interaction';\nimport listPlugin from '@fullcalendar/list';\nimport rrulePlugin from '@fullcalendar/rrule';\nimport adaptivePlugin from '@fullcalendar/adaptive';\nimport './calendar.css';\nimport { rrulestr } from 'rrule';\nimport { parseISO, format } from 'date-fns';\n\nconst LOCATIONS_QUERY = '.calendar-categories';\nconst CALENDAR_WRAPPER = '.calendar-display';\n\nclass CalendarRenderer {\n  _data = [];\n  _options = {};\n  _parentID;\n  _parentEl;\n  _calendarEl;\n  _calendar;\n  _storageKey = 'jag-calendars';\n\n  constructor(data, parentEl) {\n    this._data = data;\n    this._parentID = parentEl;\n    this._parentEl = document.getElementById(parentEl);\n    this._viewKey = `calendar-${parentEl}-view`;\n    this._calendarEl = this._parentEl.querySelector(CALENDAR_WRAPPER);\n  }\n\n  fixAriaHiddenFocusables() {\n    const focusableSelector = [\n      'a[href]',\n      'area[href]',\n      'button',\n      'input',\n      'select',\n      'textarea',\n      'summary',\n      '[tabindex]',\n      '[contenteditable=\"true\"]'\n    ].join(',');\n\n    this._calendarEl\n      .querySelectorAll('.fc-scrollgrid-sync-table[aria-hidden=\"true\"], [aria-hidden=\"true\"]')\n      .forEach((hiddenContainer) => {\n        hiddenContainer\n          .querySelectorAll(focusableSelector)\n          .forEach((focusable) => {\n            focusable.setAttribute('tabindex', '-1');\n            focusable.setAttribute('aria-hidden', 'true');\n\n            if (focusable.tagName.toLowerCase() === 'a') {\n              if (!focusable.hasAttribute('data-original-href')) {\n                focusable.setAttribute(\n                  'data-original-href',\n                  focusable.getAttribute('href') || ''\n                );\n              }\n\n              focusable.removeAttribute('href');\n              focusable.setAttribute('role', 'presentation');\n            }\n          });\n      });\n  }\n\n  fixFullCalendarScrollableRegions() {\n    this._calendarEl\n      .querySelectorAll('.fc-scroller')\n      .forEach((scroller) => {\n        const style = window.getComputedStyle(scroller);\n\n        const isScrollable =\n          ['auto', 'scroll'].includes(style.overflowX) ||\n          ['auto', 'scroll'].includes(style.overflowY) ||\n          scroller.scrollWidth > scroller.clientWidth ||\n          scroller.scrollHeight > scroller.clientHeight;\n\n        if (isScrollable) {\n          scroller.setAttribute('tabindex', '0');\n        }\n\n        scroller.removeAttribute('role');\n        scroller.removeAttribute('aria-label');\n        scroller.removeAttribute('aria-labelledby');\n      });\n  }\n\n  fixFullCalendarGridRoles() {\n    this._calendarEl\n      .querySelectorAll('table.fc-scrollgrid[role=\"grid\"]')\n      .forEach((grid) => {\n        grid.removeAttribute('role');\n      });\n\n    this._calendarEl\n      .querySelectorAll('thead[role=\"rowgroup\"], tbody[role=\"rowgroup\"], tfoot[role=\"rowgroup\"]')\n      .forEach((section) => {\n        section.removeAttribute('role');\n      });\n\n    this._calendarEl\n      .querySelectorAll('th[role=\"presentation\"], td[role=\"presentation\"]')\n      .forEach((cell) => {\n        cell.removeAttribute('role');\n      });\n\n    this._calendarEl\n      .querySelectorAll('.fc-scroller')\n      .forEach((scroller) => {\n        scroller.removeAttribute('role');\n        scroller.removeAttribute('aria-label');\n        scroller.removeAttribute('aria-labelledby');\n      });\n  }\n\n  applyAccessibilityFixes() {\n    const runFixes = () => {\n      this.fixAriaHiddenFocusables();\n      this.fixFullCalendarScrollableRegions();\n      this.fixFullCalendarGridRoles();\n    };\n\n    runFixes();\n    window.requestAnimationFrame(runFixes);\n    window.setTimeout(runFixes, 50);\n    window.setTimeout(runFixes, 250);\n  }\n\n  getViewStorage() {\n    let value = localStorage.getItem(this._storageKey);\n\n    if (value) {\n      value = JSON.parse(value);\n    } else {\n      value = {};\n    }\n\n    return value;\n  }\n\n  setViewStorage(view, start) {\n    const value = this.getViewStorage();\n\n    value[this._parentID] = {\n      view,\n      start\n    };\n\n    localStorage.setItem(this._storageKey, JSON.stringify(value));\n  }\n\n  buildCalendar() {\n    const existingDatesSet = this._data.datesSet;\n    const existingViewDidMount = this._data.viewDidMount;\n    const existingEventDidMount = this._data.eventDidMount;\n\n    this._options = Object.assign({}, this._data, {\n      plugins: [\n        dayGridPlugin,\n        timeGridPlugin,\n        listPlugin,\n        rrulePlugin,\n        resourceTimelinePlugin,\n        interactionPlugin,\n        adaptivePlugin,\n      ],\n\n      datesSet: (info) => {\n        this.setViewStorage(info.view.type, info.start);\n\n        if (typeof existingDatesSet === 'function') {\n          existingDatesSet(info);\n        }\n\n        this.applyAccessibilityFixes();\n      },\n\n      viewDidMount: (info) => {\n        if (typeof existingViewDidMount === 'function') {\n          existingViewDidMount(info);\n        }\n\n        this.applyAccessibilityFixes();\n      },\n\n      eventDidMount: (info) => {\n        if (typeof existingEventDidMount === 'function') {\n          existingEventDidMount(info);\n        }\n\n        this.applyAccessibilityFixes();\n      }\n    });\n\n    this._calendar = new Calendar(this._calendarEl, this._options);\n\n    const storageValue = this.getViewStorage();\n    const calendarSettings = storageValue[this._parentID];\n\n    if (calendarSettings) {\n      this._calendar.changeView(calendarSettings.view, calendarSettings.start);\n    }\n  }\n\n  render() {\n    if (!this._calendar) {\n      this.buildCalendar();\n    }\n\n    this._calendar.render();\n    this.applyAccessibilityFixes();\n    this.setupFilters();\n  }\n\n  setupFilters() {\n    const parentEl = this._parentEl.querySelector(LOCATIONS_QUERY);\n\n    if (parentEl) {\n      const filterBtns = parentEl.querySelectorAll('[data-id]');\n\n      for (let btn of filterBtns) {\n        btn.addEventListener('click', (e) => {\n          const isActive = btn.classList.toggle('active');\n          const id = parseInt(btn.getAttribute('data-id'), 10);\n\n          for (let evt of this._calendar.getEvents()) {\n            if (evt.extendedProps.filterId === id) {\n              evt.setProp('display', isActive ? 'auto' : 'none');\n            }\n          }\n\n          this.applyAccessibilityFixes();\n          e.preventDefault();\n        });\n      }\n    }\n  }\n}\n\nwindow.addEventListener('load', () => {\n  if ('_jagCalendars' in window) {\n    for (const calData of window._jagCalendars) {\n      const el = calData.id;\n      delete calData.id;\n\n      (new CalendarRenderer(calData, el)).render();\n    }\n  }\n\n  const convertDates = document.querySelectorAll('[data-jag-date]');\n\n  convertDates.forEach(item => {\n    const d = parseISO(item.textContent);\n    const formatter = 'jagDateFormat' in item.dataset ? item.dataset.jagDateFormat : 'PPpp';\n\n    item.textContent = format(d, formatter);\n    item.parentElement.classList.remove('invisible');\n  });\n\n  const convertRrules = document.querySelectorAll('[data-jag-rrule]');\n\n  convertRrules.forEach(item => {\n    const rrule = rrulestr(item.dataset.jagRrule);\n\n    item.textContent = `Repeats ${rrule.toText()}`;\n    item.parentElement.classList.remove('invisible');\n  });\n});"],"names":["$c106e002a49a00cb$var$extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","$c106e002a49a00cb$export$a8ba968b8961cb8a","TypeError","String","__","this","constructor","create","$c106e002a49a00cb$export$18ce0697a983be9b","assign","t","s","i","n","arguments","length","apply","$c106e002a49a00cb$export$1216008129fb82ed","to","from","pack","ar","l","slice","concat","options","vnodeId","inEvent","rerenderQueue","prevDebounce","microTick","EMPTY_OBJ","EMPTY_ARR","IS_NON_DIMENSIONAL","obj","props","removeNode","node","parentNode","removeChild","createElement","type","children","key","ref","normalizedProps","defaultProps","createVNode","original","vnode","__k","__b","__e","__d","__c","__h","__v","createRef","current","Fragment","setStyle","style","value","setProperty","test","dom","name","oldValue","isSvg","useCapture","o","cssText","replace","toLowerCase","addEventListener","eventProxyCapture","eventProxy","removeEventListener","e","indexOf","removeAttribute","setAttribute","event","Component","context","getDomSibling","childIndex","sibling","updateParentDomPointers","child","base","defer","cb","setTimeout","enqueueRender","c","push","process","__r","debounceRendering","renderQueueLength","component","commitQueue","oldVNode","oldDom","parentDom","sort","a","shift","__P","diff","ownerSVGElement","commitRoot","diffChildren","renderResult","newParentVNode","oldParentVNode","globalContext","excessDomChildren","isHydrating","j","childVNode","newDom","firstChildDom","refs","oldChildren","oldChildrenLength","isArray","reorderChildren","placeChild","getLastDom","nextSibling","unmount","applyRef","tmp","toChildArray","out","some","nextDom","sibDom","outer","appendChild","insertBefore","lastDom","newVNode","isNew","oldProps","oldState","snapshot","clearProcessingException","newProps","provider","componentContext","renderHook","count","newType","contextType","__E","render","doRender","sub","state","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","forEach","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","oldHtml","newHtml","nodeType","localName","document","createTextNode","createElementNS","is","data","childNodes","dangerouslySetInnerHTML","attributes","__html","innerHTML","hydrate","diffProps","checked","diffElementNodes","diffed","root","parentVNode","skipRemove","r","componentWillUnmount","replaceNode","firstChild","createContext","defaultValue","contextId","Consumer","contextValue","Provider","subs","ctx","_props","old","splice","error","errorInfo","ctor","handled","getDerivedStateFromError","setState","componentDidCatch","update","callback","forceUpdate","Promise","then","bind","resolve","currentComponent","previousComponent","prevRaf","afterPaintEffects","EMPTY","oldBeforeDiff","oldBeforeRender","oldAfterDiff","oldCommit","oldBeforeUnmount","flushAfterPaintEffects","__H","invokeCleanup","invokeEffect","hooks","hookItem","__N","_pendingArgs","requestAnimationFrame","afterNextFrame","__V","filter","hasErrored","HAS_RAF","raf","done","clearTimeout","timeout","cancelAnimationFrame","hook","comp","cleanup","shallowDiffers","PureComponent","isPureReactComponent","oldDiffHook","__f","Symbol","for","oldCatchError","oldUnmount","detachedClone","detachedParent","effect","map","removeOriginal","originalParent","Suspense","__u","_suspenders","suspended","__a","SuspenseList","_next","_map","__R","promise","suspendingVNode","suspendingComponent","resolved","onResolved","onSuspensionComplete","suspendedVNode","pop","wasHydrating","detachedComponent","__O","fallback","list","delete","revealOrder","size","ContextProvider","Portal","_this","container","_container","_temp","before","createPortal","el","containerInfo","delegated","get","unsuspend","wrappedUnsuspend","Map","reverse","set","REACT_ELEMENT_TYPE","CAMEL_PROPS","IS_DOM","onChangeInputType","isReactComponent","defineProperty","configurable","v","writable","oldEventHook","empty","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","persist","nativeEvent","classNameDescriptor","class","oldVNodeHook","nonCustomElement","multiple","selected","className","enumerable","$$typeof","$35f3970641c15c1a$var$globalObj","globalThis","window","FullCalendarVDom","console","warn","$450fc775b2f7950e$export$16fa2f45be04daa8","$450fc775b2f7950e$export$c8a8987d4410bf2d","$450fc775b2f7950e$export$b3890eb0ae9dca99","$450fc775b2f7950e$export$7d1e3a5e95ceca43","$450fc775b2f7950e$export$ffb0004e005737fa","ContextType","$450fc775b2f7950e$export$fd42f52fd3ae1109","origProvider","subs_1","$a35043596f133777$export$d39a5bbd09211389","flushSync","runBeforeFlush","oldDebounceRendering","$450fc775b2f7950e$export$41c562ebe57d11e2","callbackQ","$35f3970641c15c1a$var$FakeComponent","unmountComponentAtNode","_super","FakeComponent","Error","$3efb26165a3816bf$export$16fa2f45be04daa8","$3efb26165a3816bf$export$c8a8987d4410bf2d","$3efb26165a3816bf$export$b3890eb0ae9dca99","$3efb26165a3816bf$export$7d1e3a5e95ceca43","$3efb26165a3816bf$export$ffb0004e005737fa","$3efb26165a3816bf$export$fd42f52fd3ae1109","$3efb26165a3816bf$export$d39a5bbd09211389","$3efb26165a3816bf$export$cd75ccfd720a3cd4","$3efb26165a3816bf$export$502457920280e6be","EventSourceApi","internalEventSource","remove","dispatch","sourceId","refetch","sourceIds","isRefetch","publicId","meta","url","format","$43e662060fcac00e$export$f883456a56996078","$43e662060fcac00e$export$5cff598b30ff4f8e","selector","closest","documentElement","contains","$43e662060fcac00e$export$c33a404b21a1fad3","parentElement","matches","matchesSelector","msMatchesSelector","$43e662060fcac00e$export$4f40ef884a648496","containers","HTMLElement","allMatches","querySelectorAll","$43e662060fcac00e$export$1372881cf0aae260","parent","parents","childNode","$43e662060fcac00e$var$PIXEL_PROP_RE","$43e662060fcac00e$export$d63a6b7859608045","propName","$43e662060fcac00e$export$3b94d1dd31c90354","val","$43e662060fcac00e$export$379f25805b90f1ec","ev","_b","_a","composedPath","target","$43e662060fcac00e$export$cb92af6dcd7f7aba","getRootNode","guid","$43e662060fcac00e$export$1d0323b7504f8e12","$43e662060fcac00e$export$fa3b29edae795ef4","preventDefault","$43e662060fcac00e$export$901e325d0576c774","eventType","handler","attachedHandler","matchedChild","$43e662060fcac00e$var$buildDelegationHandler","$43e662060fcac00e$var$transitionEventNames","$43e662060fcac00e$export$950d0ac4d3d5577a","realCallback","eventName","$43e662060fcac00e$export$e3f1b50e36bb94c7","onClick","$43e662060fcac00e$var$createAriaKeyboardAttrs","tabIndex","onKeyDown","$43e662060fcac00e$var$guidNumber","$43e662060fcac00e$export$46e8f25c7328f77e","$43e662060fcac00e$export$a6e5872a7671000d","body","classList","add","$43e662060fcac00e$export$f37e6a9f6455c89a","$43e662060fcac00e$export$b3002a74c1b9a5fd","$43e662060fcac00e$export$88350bbed77ff084","$43e662060fcac00e$export$dce06f7a987c0103","input","token","specs","tokens","split","charAt","field","substring","order","func","$43e662060fcac00e$export$2176dffff1079231","obj0","obj1","fieldSpecs","cmp","$43e662060fcac00e$export$646d6b080f82a3ba","fieldSpec","$43e662060fcac00e$export$41a6fefeaec0a6ac","localeCompare","$43e662060fcac00e$export$36cf564d487b5178","len","substr","$43e662060fcac00e$var$formatWithOrdinals","formatter","args","fallbackText","reduce","str","arg","index","$43e662060fcac00e$export$dcb32d3e7e407924","$43e662060fcac00e$export$357fc28f6427af8b","$43e662060fcac00e$export$ad4ca79d1f708efe","cellEl","allWidthEl","querySelector","contentWidthEl","getBoundingClientRect","width","$43e662060fcac00e$var$DAY_IDS","$43e662060fcac00e$export$ef501a2bb4f3ee6b","m","$43e662060fcac00e$var$dateToUtcArray","$43e662060fcac00e$var$arrayToUtcDate","$43e662060fcac00e$export$dd412b56f1e4d8aa","$43e662060fcac00e$export$bbb13e1d76936ae","$43e662060fcac00e$export$543488ac006ce21a","m0","m1","valueOf","$43e662060fcac00e$export$8edf9e7013c1090d","$43e662060fcac00e$var$timeAsMs","Math","round","$43e662060fcac00e$export$63fa379ae8a9ba2","getUTCFullYear","getUTCMonth","getUTCDate","$43e662060fcac00e$var$weekOfGivenYear","marker","year","dow","doy","firstWeekStart","$43e662060fcac00e$var$firstWeekOffset","dayStart","days","floor","fwd","getUTCDay","$43e662060fcac00e$var$dateToLocalArray","date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","$43e662060fcac00e$var$arrayToLocalDate","Date","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","UTC","$43e662060fcac00e$export$c03bb0116ee09d4b","isNaN","$43e662060fcac00e$export$96c841dd215511f1","defId","range","forcedStartTzo","forcedEndTzo","instanceId","$43e662060fcac00e$var$hasOwnProperty","$43e662060fcac00e$var$mergeProps","propObjs","complexPropsMap","dest","name_1","complexObjs","unshift","undefined","name_2","$43e662060fcac00e$export$ed954562110f0354","hash","filtered","$43e662060fcac00e$export$91196e1cbf9624ab","newHash","$43e662060fcac00e$var$arrayToHash","_i","a_1","$43e662060fcac00e$var$hashValuesToArray","$43e662060fcac00e$export$993f2bdbbfaafc38","$43e662060fcac00e$export$152a9632f96a262f","keys","$43e662060fcac00e$export$de53126da096c943","equalityFuncs","$43e662060fcac00e$var$isObjValsEqual","val0","val1","comparator","$43e662060fcac00e$export$4a5670a7d3bbcfbd","startIndex","endIndex","step","res","$43e662060fcac00e$var$expandRecurring","eventStore","framingRange","dateEnv","pluginHooks","defs","instances","instance","recurringDef","def","duration","allDay","defaultAllDayEventDuration","defaultTimedEventDuration","starts_1","$43e662060fcac00e$var$expandRecurringRanges","recurringTypes","start","end","eventDef","markers","typeId","expand","typeData","subtract","$43e662060fcac00e$var$INTERNAL_UNITS","$43e662060fcac00e$var$PARSE_RE","$43e662060fcac00e$export$422beedd633f85fe","unit","exec","sign","years","months","parseInt","milliseconds","$43e662060fcac00e$var$parseString","$43e662060fcac00e$var$parseObject","month","day","hours","hour","minutes","minute","seconds","second","millisecond","ms","weeks","week","specifiedWeeks","$43e662060fcac00e$export$467694d9120dacea","dur","$43e662060fcac00e$export$d90cff250d80b8d5","d0","d1","$43e662060fcac00e$export$17fdd47e53b97122","$43e662060fcac00e$var$asRoughDays","$43e662060fcac00e$export$5590c09fe16f8d5e","$43e662060fcac00e$export$3a633728a1eebb5","$43e662060fcac00e$export$dc3c42cc5deacde6","$43e662060fcac00e$export$168b595a160290d4","numerator","denominator","localRes","$43e662060fcac00e$export$e10aa51e1e046d40","$43e662060fcac00e$export$b237c62ca38e16ea","timeZoneOffset","stripZeroTime","toISOString","$43e662060fcac00e$var$formatTimeZoneOffset","$43e662060fcac00e$export$a17918f860b79681","doIso","abs","mins","$43e662060fcac00e$export$16efc2a7f799d47c","array","exactVal","removeCnt","$43e662060fcac00e$export$845bfa6268d59b47","a0","a1","equalityFunc","$43e662060fcac00e$export$fc10aeed3a532e2a","workerFunc","resEquality","teardownFunc","currentArgs","currentRes","newArgs","$43e662060fcac00e$export$afdcbe8ba78a3f37","currentArg","newArg","$43e662060fcac00e$export$af1c22a90aeab49a","currentArgSets","currentResults","newArgSets","currentLen","newLen","$43e662060fcac00e$export$5d1c50bebdccff09","currentArgHash","currentResHash","newArgHash","newResHash","$43e662060fcac00e$var$EXTENDED_SETTINGS_AND_SEVERITIES","separator","omitZeroMinute","meridiem","omitCommas","$43e662060fcac00e$var$STANDARD_DATE_PROP_SEVERITIES","timeZoneName","era","weekday","$43e662060fcac00e$var$MERIDIEM_RE","$43e662060fcac00e$var$COMMA_RE","$43e662060fcac00e$var$MULTI_SPACE_RE","$43e662060fcac00e$var$LTR_RE","$43e662060fcac00e$var$UTC_RE","$43e662060fcac00e$var$NativeFormatter","NativeFormatter","formatSettings","standardDateProps","extendedSettings","severity","max","buildFormattingFunc","$43e662060fcac00e$var$buildFormattingFunc","formatRange","betterDefaultSeparator","ca","diffSeverity","calendarSystem","getMarkerYear","getMarkerMonth","getMarkerDay","biggestUnitForPartial","full0","full1","partialFormattingFunc","biggestUnit","partialOptions","$43e662060fcac00e$var$computePartialFormattingOptions","partial0","partial1","insertion","i0","found0","before0","after0","i1","found1","before1","after1","after","$43e662060fcac00e$var$findCommonInsertion","defaultSeparator","getLargestUnit","standardDatePropCnt","num","weekText","weekTextLong","locale","display","parts","simpleNumberFormat","direction","join","$43e662060fcac00e$var$formatWeekNumber","computeWeekNumber","$43e662060fcac00e$var$sanitizeSettings","timeZone","zeroFormat","normalFormat","Intl","DateTimeFormat","codes","zeroProps","tzoStr","replaced","$43e662060fcac00e$var$injectTzoStr","trim","toLocaleLowerCase","$43e662060fcac00e$var$postProcess","$43e662060fcac00e$var$buildNativeFormattingFunc","$43e662060fcac00e$var$expandZonedMarker","dateInfo","markerToArray","$43e662060fcac00e$var$createVerboseFormattingArg","startInfo","localeCodes","$43e662060fcac00e$var$CmdFormatter","CmdFormatter","cmdStr","cmdFormatter","$43e662060fcac00e$var$FuncFormatter","FuncFormatter","$43e662060fcac00e$export$18fadbe56dfcb1a1","$43e662060fcac00e$export$f4b66a915746e831","navLinkDayClick","$43e662060fcac00e$export$f0954fd7d5368655","navLinkWeekClick","bootstrapFontAwesome","buttonIcons","customButtons","nextDayThreshold","scrollTime","scrollTimeReset","Boolean","slotMinTime","slotMaxTime","dayPopoverFormat","slotDuration","snapDuration","headerToolbar","footerToolbar","defaultRangeSeparator","titleRangeSeparator","forceEventDuration","dayHeaders","dayHeaderFormat","dayHeaderClassNames","dayHeaderContent","dayHeaderDidMount","dayHeaderWillUnmount","dayCellClassNames","dayCellContent","dayCellDidMount","dayCellWillUnmount","initialView","aspectRatio","Number","weekends","weekNumberCalculation","weekNumbers","weekNumberClassNames","weekNumberContent","weekNumberDidMount","weekNumberWillUnmount","editable","viewClassNames","viewDidMount","viewWillUnmount","nowIndicator","nowIndicatorClassNames","nowIndicatorContent","nowIndicatorDidMount","nowIndicatorWillUnmount","showNonCurrentDates","lazyFetching","startParam","endParam","timeZoneParam","locales","themeSystem","dragRevertDuration","dragScroll","allDayMaintainDuration","unselectAuto","dropAccept","eventOrder","eventOrderStrict","handleWindowResize","windowResizeDelay","longPressDelay","eventDragMinDistance","expandRows","height","contentHeight","weekNumberFormat","eventResizableFromStart","displayEventTime","displayEventEnd","progressiveEventRendering","businessHours","initialDate","now","eventDataTransform","stickyHeaderDates","stickyFooterScrollbar","viewHeight","defaultAllDay","eventSourceFailure","eventSourceSuccess","eventDisplay","eventStartEditable","eventDurationEditable","eventOverlap","eventConstraint","eventAllow","eventBackgroundColor","eventBorderColor","eventTextColor","eventColor","eventClassNames","eventContent","eventDidMount","eventWillUnmount","selectConstraint","selectOverlap","selectAllow","droppable","unselectCancel","slotLabelFormat","slotLaneClassNames","slotLaneContent","slotLaneDidMount","slotLaneWillUnmount","slotLabelClassNames","slotLabelContent","slotLabelDidMount","slotLabelWillUnmount","dayMaxEvents","dayMaxEventRows","dayMinWidth","slotLabelInterval","allDayText","allDayClassNames","allDayContent","allDayDidMount","allDayWillUnmount","slotMinWidth","navLinks","eventTimeFormat","rerenderDelay","moreLinkText","moreLinkHint","selectMinDistance","selectable","selectLongPressDelay","eventLongPressDelay","selectMirror","eventMaxStack","eventMinHeight","eventMinWidth","eventShortHeight","slotEventOverlap","plugins","firstDay","dayCount","dateAlignment","dateIncrement","hiddenDays","monthMode","fixedWeekCount","validRange","visibleRange","titleFormat","eventInteractive","noEventsText","viewHint","navLinkHint","closeHint","timeHint","eventHint","moreLinkClick","moreLinkClassNames","moreLinkContent","moreLinkDidMount","moreLinkWillUnmount","$43e662060fcac00e$export$5e00211d92edd7cf","center","$43e662060fcac00e$var$CALENDAR_LISTENER_REFINERS","datesSet","eventsSet","eventAdd","eventChange","eventRemove","windowResize","eventClick","eventMouseEnter","eventMouseLeave","select","unselect","loading","_unmount","_beforeprint","_afterprint","_noEventDrop","_noEventResize","_resize","_scrollRequest","$43e662060fcac00e$var$CALENDAR_OPTION_REFINERS","buttonText","buttonHints","views","initialEvents","events","eventSources","$43e662060fcac00e$var$COMPLEX_OPTION_COMPARATORS","$43e662060fcac00e$var$isMaybeObjectsEqual","$43e662060fcac00e$var$VIEW_OPTION_REFINERS","buttonTextKey","dateProfileGeneratorClass","usesMinMaxTime","classNames","content","didMount","willUnmount","$43e662060fcac00e$var$mergeRawOptions","optionSets","$43e662060fcac00e$export$670c44f3cf15ac92","refiners","refined","extra","raw","$43e662060fcac00e$var$parseEvents","rawEvents","eventSource","allowOpenRange","eventRefiners","$43e662060fcac00e$var$buildEventRefiners","rawEvents_1","tuple","$43e662060fcac00e$var$parseEvent","$43e662060fcac00e$export$d073396977c915aa","$43e662060fcac00e$export$9cb69b709b357531","def_1","newStore","$43e662060fcac00e$export$e7b77297ae4377d9","lookDef","def0","def1","groupId","$43e662060fcac00e$export$4f70abc76208e16e","store0","store1","filterFunc","$43e662060fcac00e$export$152a6772780e1564","$43e662060fcac00e$var$EVENT_UI_REFINERS","startEditable","durationEditable","constraint","overlap","allow","color","backgroundColor","borderColor","textColor","$43e662060fcac00e$var$EMPTY_EVENT_UI","constraints","allows","$43e662060fcac00e$export$655f118cda3aa662","$43e662060fcac00e$var$normalizeConstraint","$43e662060fcac00e$export$f2bfdbbd55231856","uis","$43e662060fcac00e$var$combineTwoEventUis","item0","item1","$43e662060fcac00e$var$EVENT_NON_DATE_REFINERS","id","title","interactive","$43e662060fcac00e$var$EVENT_DATE_REFINERS","$43e662060fcac00e$var$EVENT_REFINERS","extendedProps","$43e662060fcac00e$export$75efacd7e24b08e8","$43e662060fcac00e$var$computeIsDefaultAllDay","recurringRes","parsed","parse","allDayGuess","$43e662060fcac00e$var$parseRecurring","$43e662060fcac00e$export$481289891832cced","singleRes","startMeta","endMeta","startMarker","hasEnd","endMarker","startInput","createMarkerMeta","isTimeUnspecified","forcedTzo","$43e662060fcac00e$var$parseSingle","ui","eventDefMemberAdders","memberAdder","freeze","$43e662060fcac00e$var$computeAlignedDayRange","timedRange","dayCnt","$43e662060fcac00e$export$663ccb5b93843754","startDay","endDay","endTimeMS","$43e662060fcac00e$export$2ca74ab06566d6c0","$43e662060fcac00e$export$811e73c81b6e6fc8","date0","date1","largeUnit","diffWholeYears","diffWholeMonths","m0day","m1day","$43e662060fcac00e$var$invertRanges","ranges","constraintRange","dateRange","invertedRanges","$43e662060fcac00e$var$compareRanges","range0","range1","$43e662060fcac00e$export$10b8b2dd164d205b","newRange","min","$43e662060fcac00e$export$d5199baccda9ad64","$43e662060fcac00e$export$2c83ce4d9197ad00","$43e662060fcac00e$export$4762e65ce09a0e6b","outerRange","innerRange","$43e662060fcac00e$export$66821f226442fa3f","$43e662060fcac00e$export$8d09c0307447d6a7","eventUiBases","inverseBgByGroupId","inverseBgByDefId","defByGroupId","bgRanges","fgRanges","eventUis","$43e662060fcac00e$var$compileEventUis","origRange","normalRange","slicedRange","isStart","isEnd","invertedRanges_1","invertedRange","invertedRanges_2","bg","fg","$43e662060fcac00e$export$6d8c4c4d21e3f5fb","seg","fcSeg","$43e662060fcac00e$export$20dbffad3e641d3b","eventDefs","$43e662060fcac00e$var$compileEventUi","$43e662060fcac00e$export$477aa003f1e3906b","segs","eventOrderSpecs","objs","$43e662060fcac00e$export$c605f45eb93a721b","_seg","eventRange","$43e662060fcac00e$export$d549caae5f4b3a16","transformers","isDraggableTransformers","transformers_1","transformer","$43e662060fcac00e$export$c10821b9393c5d46","$43e662060fcac00e$export$c0b8afdfb5703286","$43e662060fcac00e$export$ec83b8881e4ae61b","timeFormat","defaultDisplayEventTime","defaultDisplayEventEnd","startOverride","endOverride","eventInstance","wholeEventStart","wholeEventEnd","segStart","segEnd","isStartDay","isEndDay","$43e662060fcac00e$export$ef1f26597bf22ea1","todayRange","nowDate","segRange","isPast","isFuture","isToday","$43e662060fcac00e$export$70e5088206c4e991","$43e662060fcac00e$export$2d3b1ef0ce6fac68","href","emitter","hasHandlers","trigger","$43e662060fcac00e$export$93eb4f9737fcca43","jsEvent","view","viewApi","$43e662060fcac00e$var$STANDARD_PROPS","$43e662060fcac00e$var$parseDateSpan","defaultDuration","span","standardProps","$43e662060fcac00e$var$parseOpenDateSpan","$43e662060fcac00e$var$buildRangeApiWithTimeZone","omitTime","$43e662060fcac00e$var$buildRangeApi","toDate","startStr","formatIso","endStr","$43e662060fcac00e$export$e7e185b02bb3cbaa","selection","pev","__assign_1","$43e662060fcac00e$var$buildDateSpanApiWithContext","origEvent","calendarApi","dateSpan","dateSpanTransforms","transform","$43e662060fcac00e$export$8e8c4e1be5c0ba8c","$43e662060fcac00e$export$8a7f681663cb7328","eventConfigBase","mutation","eventConfigs","$43e662060fcac00e$var$applyMutationToEventDef","$43e662060fcac00e$var$applyMutationToEventInstance","eventConfig","startDelta","endDelta","copy","eventDefMutationAppliers","applier","forceAllDay","clearEnd","datesDelta","ViewApi","getCurrentData","viewTitle","dateProfile","activeRange","currentRange","getOption","$43e662060fcac00e$var$EVENT_SOURCE_REFINERS","success","failure","$43e662060fcac00e$var$parseEventSource","rawObj","$43e662060fcac00e$var$buildEventSourceRefiners","metaRes","eventSourceDefs","parseMeta","sourceDefId","$43e662060fcac00e$var$buildEventSourceMeta","_raw","isFetching","latestFetchId","fetchRange","eventSourceRefiners","$43e662060fcac00e$var$getNow","nowInput","createNowMarker","createMarker","CalendarApi","currentDataManager","action","batchRendering","updateSize","setOption","optionName","rawOptionValue","currentCalendarOptionsInput","getAvailableLocaleCodes","availableRawLocales","on","handlerName","currentCalendarOptionsRefiners","off","changeView","viewType","dateOrRange","dateMarker","zoomTo","spec","viewSpecs","getUnitViewSpec","toolbarConfig","viewTypes","header","viewsWithButtons","footer","singleUnit","prev","next","prevYear","addYears","currentDate","nextYear","today","calendarOptions","gotoDate","zonedDateInput","incrementDate","deltaInput","delta","formatDate","settings","dateOrObj","endDate","selectionInput","dateSelection","$43e662060fcac00e$var$triggerDateUnselect","addEvent","eventInput","sourceInput","_def","_instance","triggerEventAdd","$43e662060fcac00e$export$3162eb7d9c1ea8ff","sourceApi","getEventSourceById","newEventApi","eventApi","relatedEvents","revert","$43e662060fcac00e$var$eventApiToStore","getEventById","getEvents","currentData","$43e662060fcac00e$export$e0621cdf92fcaf7e","removeAllEvents","getEventSources","sourceHash","sourceApis","internalId","addEventSource","sources","removeAllEventSources","refetchEvents","scrollToTime","timeInput","time","EventApi","_context","setProp","mutate","setExtendedProp","setStart","granularity","maintainDuration","setEnd","endInput","setDates","instanceRange","moveStart","moveEnd","moveDates","setAllDay","formatInput","context_1","eventStore_1","relevantEvents","oldEvent","asStore","toPlainObject","collapseColor","collapseExtendedProps","toJSON","excludeInstance","eventApis","excludeInstanceId","$43e662060fcac00e$var$calendarSystemClassMap","theClass","$43e662060fcac00e$var$GregorianCalendarSystem","GregorianCalendarSystem","arrayToMarker","arr","$43e662060fcac00e$var$ISO_RE","$43e662060fcac00e$export$1d3696c478d68206","DateEnv","isNamedTimeZone","namedTimeZoneImpl","canComputeOffset","$43e662060fcac00e$var$createCalendarSystem","weekDow","weekDoy","weekNumberFunc","timestampToMarker","getYear","addMonths","greatestWholeUnit","$43e662060fcac00e$export$6be786466faceb24","$43e662060fcac00e$var$diffHours","$43e662060fcac00e$var$diffMinutes","$43e662060fcac00e$var$diffSeconds","countDurationsBetween","$43e662060fcac00e$var$asRoughMonths","startOf","startOfYear","startOfMonth","startOfWeek","$43e662060fcac00e$var$startOfHour","$43e662060fcac00e$var$startOfMinute","$43e662060fcac00e$var$startOfSecond","y","w","nextW","$43e662060fcac00e$var$weekOfYear","dateOptions","offsetForMarker","isEndExclusive","extraOptions","omitTimeZoneOffset","timestampToArray","getTimezoneOffset","offsetForArray","$43e662060fcac00e$export$794e7bef9c0b12d9","$43e662060fcac00e$var$MINIMAL_RAW_EN_LOCALE","code","$43e662060fcac00e$var$RAW_EN_LOCALE","eventCnt","$43e662060fcac00e$var$organizeRawLocales","explicitRawLocales","defaultCode","allRawLocales","rawLocaleMap","en","allRawLocales_1","rawLocale","$43e662060fcac00e$var$buildLocale","inputSingular","available","codeArg","simpleId","$43e662060fcac00e$var$queryRawLocale","$43e662060fcac00e$var$parseLocale","$43e662060fcac00e$var$queryLocale","merged","NumberFormat","$43e662060fcac00e$var$canVGrowWithinCell","$43e662060fcac00e$var$DEF_DEFAULTS","startTime","endTime","daysOfWeek","$43e662060fcac00e$export$d29881b6976265fc","rawDefs","rawDef","$43e662060fcac00e$var$refineInputs","$43e662060fcac00e$export$aedb7b212a60242f","point","rect","left","right","top","bottom","$43e662060fcac00e$export$654d4a60b52c6ff5","rect1","rect2","$43e662060fcac00e$export$8a68e5f6acc5c472","deltaX","deltaY","$43e662060fcac00e$export$e2456a15fce484f1","$43e662060fcac00e$export$194e14e2cfa978a1","position","possible","offsetHeight","$43e662060fcac00e$var$computeCanVGrowWithinCell","$43e662060fcac00e$var$EMPTY_EVENT_STORE","Splitter","getKeysForEventDefs","_getKeysForEventDefs","splitDateSelection","_splitDateSpan","splitEventStore","_splitEventStore","splitIndividualUi","_splitIndividualUi","splitEventDrag","_splitInteraction","splitEventResize","eventUiBuilders","splitProps","keyInfos","getKeyInfo","defKeys","dateSelections","individualUi","eventStores","eventDrags","eventDrag","eventResizes","eventResize","info","$43e662060fcac00e$var$buildEventUiForKey","keyInfo","buildEventUi","eventSelection","dateSpans","keys_1","getKeysForDateSpan","getKeysForEventDef","splitStores","_c","splitHashes","interaction","splitStates","affectedStores_1","affectedEvents","mutatedKeysByDefId","mutatedEvents","mutatedStores_1","populate","isEvent","allUi","eventUiForKey","baseParts","stuff","$43e662060fcac00e$export$fb028af5cc95163e","isDisabled","isOther","$43e662060fcac00e$export$7f2b3fa25885b709","theme","getClass","$43e662060fcac00e$export$2f9ba082c707ab69","$43e662060fcac00e$var$DAY_FORMAT","$43e662060fcac00e$var$WEEK_FORMAT","$43e662060fcac00e$export$7b2ca40fecf1c40a","isTabbable","dateStr","zonedDate","handleInteraction","customAction","$43e662060fcac00e$var$_scrollbarWidths","$43e662060fcac00e$var$_isRtlScrollbarOnLeft","$43e662060fcac00e$export$58b6a65b9d8f0fae","outerEl","border","padding","overflow","$43e662060fcac00e$var$computeIsRtlScrollbarOnLeft","$43e662060fcac00e$export$4728df3b715b37e6","$43e662060fcac00e$var$computeScrollbarWidthsForEl","$43e662060fcac00e$var$computeScrollbarWidths","x","clientHeight","offsetWidth","clientWidth","$43e662060fcac00e$export$a473895c22a47d87","getPadding","computedStyle","getComputedStyle","borderLeft","borderLeftWidth","borderRight","borderRightWidth","borderTop","borderTopWidth","borderBottom","borderBottomWidth","badScrollbarWidths","scrollbarLeftRight","scrollbarBottom","scrollbarLeft","scrollbarRight","paddingLeft","paddingRight","paddingTop","paddingBottom","$43e662060fcac00e$export$3df9831bc9cfcdb2","goWithinPadding","doFromWindowViewport","outerRect","$43e662060fcac00e$export$ae9a4027f9d7eee2","edges","pageXOffset","pageYOffset","$43e662060fcac00e$export$823f545609f8a8be","overflowY","overflowX","$43e662060fcac00e$export$c1cad4ab46591e9","isResolved","wrappedSuccess","wrappedFailure","Emitter","handlers","thisContext","setThisContext","setOptions","$43e662060fcac00e$var$addToHash","$43e662060fcac00e$var$removeFromHash","attachedHandlers","optionHandler","handlers_1","PositionCache","originEl","els","isHorizontal","isVertical","originClientRect","buildElHorizontals","buildElVerticals","originClientLeft","lefts","rights","originClientTop","tops","bottoms","leftToIndex","leftPosition","topToIndex","topPosition","getWidth","leftIndex","getHeight","topIndex","ScrollController","getMaxScrollTop","getScrollHeight","getClientHeight","getMaxScrollLeft","getScrollWidth","getClientWidth","canScrollVertically","canScrollHorizontally","canScrollUp","getScrollTop","canScrollDown","canScrollLeft","getScrollLeft","canScrollRight","ElementScrollController","scrollTop","scrollLeft","setScrollTop","setScrollLeft","scrollWidth","scrollHeight","$43e662060fcac00e$export$fe3286d8cd36b08","WindowScrollController","scroll","Theme","iconOverrideOption","setIconOverride","iconOverrideHash","iconClassesCopy","buttonName","iconClasses","applyIconOverridePrefix","prefix","iconOverridePrefix","classes","getIconClass","isRtl","rtlIconClasses","baseIconClass","getCustomButtonIconClass","customButtonProps","iconOverrideCustomButtonOption","$43e662060fcac00e$export$14faa19a0f3bbeb2","ScrollResponder","execFunc","handleScrollRequest","request","queuedRequest","drain","fireInitialScroll","detach","isDatesNew","$43e662060fcac00e$export$81a3193a926b167b","$43e662060fcac00e$var$buildViewContext","viewSpec","viewOptions","dateProfileGenerator","registerInteractiveComponent","unregisterInteractiveComponent","addResizeHandler","removeResizeHandler","createScrollResponder","$43e662060fcac00e$export$15e4378688bbcd68","$43e662060fcac00e$var$PureComponent","nextProps","nextState","debug","log","propEquality","stateEquality","safeSetState","newState","addPropsEquality","$43e662060fcac00e$var$addPropsEquality","addStateEquality","$43e662060fcac00e$var$addStateEquality","BaseComponent","$43e662060fcac00e$export$4bb192c7cacf928f","DateComponent","uid","prepareHits","queryHit","positionLeft","positionTop","elWidth","elHeight","isValidSegDownEl","isValidDateDownEl","$43e662060fcac00e$export$55ae5207ce896a6b","$43e662060fcac00e$export$ae829ec7b2625219","deps","reducers","isLoadingFuncs","contextInit","eventDragMutationMassagers","dateSelectionTransformers","datePointTransforms","viewPropsTransformers","isPropsValid","externalDefTransforms","viewContainerAppends","eventDropTransformers","componentInteractions","calendarInteractions","themeClasses","namedTimeZonedImpl","elementDraggingImpl","optionChangeHandlers","scrollGridImpl","contentTypeHandlers","listenerRefiners","optionRefiners","propSetHandlers","$43e662060fcac00e$var$buildBuildPluginHooks","currentHooks","currentOverrideDefs","currentGlobalDefs","overrideDefs","globalDefs","pluginDefs","isAdded","addDefs","defs_1","hooks1","hooks0","$43e662060fcac00e$var$buildPluginHooks","$43e662060fcac00e$var$StandardTheme","StandardTheme","$43e662060fcac00e$var$ensureViewDef","defaultConfigs","overrideConfigs","viewDef","defaultConfig","overrideConfig","queryProp","theComponent","superType","superDef","defaults","rawOptions","overrides","$43e662060fcac00e$var$buildViewDef","tableCellShaded","buttonGroup","button","buttonActive","close","RenderHook","rootElRef","handleRootEl","elRef","hookProps","$43e662060fcac00e$export$4a3ddc183cfc571","$43e662060fcac00e$export$69efde54d6f19f95","defaultContent","backupElRef","innerElRef","innerContent","$43e662060fcac00e$var$normalizeClassNames","$43e662060fcac00e$export$b4813ee70bcd7c03","renderId","$43e662060fcac00e$var$ContentHookInner","ContentHookInner","renderInnerContent","updateCustomContent","customContentInfo","destroy","getInnerContent","getContentMeta","contentKey","contentVal","buildLifecycleFuncs","$43e662060fcac00e$var$normalizeContent","searchKey","MountHook","rootEl","$43e662060fcac00e$export$30c6fc96ccf3eff5","currentGenerator","currentHookProps","currentClassNames","generator","ViewRoot","normalizeClassNames","customClassNames","$43e662060fcac00e$var$parseViewConfigs","inputs","$43e662060fcac00e$var$parseViewConfig","viewProps","$43e662060fcac00e$export$149098a681d839c0","viewElRef","$43e662060fcac00e$export$3cc43e30011f72c5","$43e662060fcac00e$var$buildViewSpecs","defaultInputs","optionOverrides","dynamicOptionOverrides","localeDefaults","viewDefs","$43e662060fcac00e$var$compileViewDefs","durationInput","durationUnit","singleUnitOverrides","json","JSON","stringify","$43e662060fcac00e$var$durationInputMap","$43e662060fcac00e$var$createDurationCached","denom","queryButtonText","optionsSubset","buttonTextMap","queryButtonTitle","buttonKey","optionDefaults","buttonTextOverride","buttonTextDefault","buttonTitleOverride","buttonHint","buttonTitleDefault","$43e662060fcac00e$var$buildViewSpec","DateProfileGenerator","initHiddenDays","buildPrev","currentDateProfile","forceToValid","prevDate","currentRangeUnit","build","buildNext","nextDate","currentInfo","isRangeAllDay","renderRange","isValid","buildValidRange","trimHiddenDays","buildCurrentRangeInfo","buildRenderRange","adjustActiveRange","buildDateIncrement","validRangeInput","simpleInput","refineRange","buildRangeFromDuration","buildRangeFromDayCount","buildCustomVisibleRange","getFallbackDuration","computeRes","isHiddenDay","skipHiddenDays","runningCount","visibleRangeInput","customAlignment","rangeInput","isHiddenDayHash","inc","isExclusive","$43e662060fcac00e$var$initEventSources","$43e662060fcac00e$var$addSources","rawSources","rawSources_1","source","$43e662060fcac00e$var$parseInitialSources","$43e662060fcac00e$var$reduceEventSources","eventSourceHash","$43e662060fcac00e$var$fetchDirtySources","$43e662060fcac00e$var$fetchSourcesByIds","$43e662060fcac00e$var$excludeStaticSources","fetchId","$43e662060fcac00e$var$receiveResponse","$43e662060fcac00e$var$computeEventSourcesLoading","sources_1","$43e662060fcac00e$var$doesSourceNeedRange","$43e662060fcac00e$var$isSourceDirty","prevSources","sourceIdHash","nextSources","$43e662060fcac00e$var$fetchSource","sourceDef","fetch","xhr","message","ignoreRange","$43e662060fcac00e$var$reduceEventStore","subset","calEachTransform","sourceEachTransform","$43e662060fcac00e$var$transformEachRawEvent","$43e662060fcac00e$var$transformRawEvents","$43e662060fcac00e$var$excludeEventsBySourceId","$43e662060fcac00e$var$receiveRawEvents","expandRange","$43e662060fcac00e$var$addEvent","master","filteredDefs","filteredInstances","$43e662060fcac00e$var$excludeSubEventStore","refinedEvents","rawEvent","refinedEvent","$43e662060fcac00e$var$reduceDateSelection","currentSelection","$43e662060fcac00e$var$reduceSelectedEvent","currentInstanceId","eventInstanceId","$43e662060fcac00e$var$reduceEventDrag","currentDrag","newDrag","$43e662060fcac00e$var$reduceEventResize","currentResize","newResize","$43e662060fcac00e$var$parseToolbars","calendarOptionOverrides","$43e662060fcac00e$var$parseToolbar","sectionStrHash","sectionWidgets","hasTitle","sectionName","sectionRes","$43e662060fcac00e$var$parseSection","widgets","sectionStr","calendarCustomButtons","calendarButtonTextOverrides","calendarButtonText","calendarButtonHintOverrides","calendarButtonHints","sectionSubstrs","buttonGroupStr","buttonClick","buttonIcon","click","text","hint","textFallback","prevOrNext","navUnit","$43e662060fcac00e$export$6e7cca02180030a3","method","params","successCallback","failureCallback","toUpperCase","$43e662060fcac00e$var$encodeParams","$43e662060fcac00e$var$injectQueryStringParams","XMLHttpRequest","open","setRequestHeader","onload","status","responseText","err","onerror","send","encodeURIComponent","$43e662060fcac00e$var$handleEventSources","unfoundSources","newInputs","inputs_1","inputFound","unfoundSources_1","unfoundSource","newInputs_1","newInput","$43e662060fcac00e$export$905153d94e0757fa","extraParams","requestParams","customRequestParams","$43e662060fcac00e$var$buildRequestParams","errorMessage","startRecur","endRecur","recurringData","clippedFramingRange","dowHash","dayMarker","instanceStarts","instanceStart","$43e662060fcac00e$var$expandRanges","html","currentEl","currentHtml","domNodes","currentDomNodes","newDomNodes","newDomNodes_1","newNode","DelayedRunner","drainedOption","isRunning","isDirty","pauseDepths","timeoutId","delay","isPaused","tryDrain","pause","scope","resume","force","drained","clear","$43e662060fcac00e$var$TaskRunner","TaskRunner","runTaskOption","queue","delayedRunner","$43e662060fcac00e$export$b2a465aff6f1d2a","task","completedTasks","runTask","$43e662060fcac00e$var$buildTitle","$43e662060fcac00e$var$buildTitleFormat","CalendarDataManager","computeOptionsData","_computeOptionsData","computeCurrentViewData","_computeCurrentViewData","organizeRawLocales","buildLocale","buildPluginHooks","buildDateEnv","$43e662060fcac00e$var$buildDateEnv","buildTheme","$43e662060fcac00e$var$buildTheme","parseToolbars","buildViewSpecs","buildDateProfileGenerator","$43e662060fcac00e$var$buildDateProfileGenerator","buildViewApi","$43e662060fcac00e$var$buildViewApi","buildViewUiProps","$43e662060fcac00e$var$buildViewUiProps","buildEventUiBySource","$43e662060fcac00e$var$buildEventUiBySource","buildEventUiBases","$43e662060fcac00e$var$buildEventUiBases","parseContextBusinessHours","$43e662060fcac00e$var$parseContextBusinessHours","buildTitle","$43e662060fcac00e$export$4293555f241ae35a","actionRunner","_handleAction","updateData","currentCalendarOptionsRefined","currentViewOptionsInput","currentViewOptionsRefined","optionsData","currentViewType","currentViewData","initialDateInput","calendarContext","initialState","renderableEventStore","selectionConfig","contextAndState","reducer","$43e662060fcac00e$var$computeIsLoading","resetOptions","append","$43e662060fcac00e$var$reduceDynamicOptionOverrides","$43e662060fcac00e$var$reduceViewType","$43e662060fcac00e$var$reduceCurrentDate","dp","$43e662060fcac00e$var$reduceDateProfile","eventUiSingleBase","eventUiBySource","wasLoading","isLoading","onAction","oldDateEnv","newDateEnv","oldData","changeHandlers","oldCalendarOptions","newCalendarOptions","onData","processRawCalendarOptions","refinedOptions","availableLocaleData","$43e662060fcac00e$var$warnUnknownOptions","currentRaw","currentRefined","anyChanges","processRawViewOptions","explicitLocale","$43e662060fcac00e$export$ee91c713db7a94a8","$43e662060fcac00e$export$5a5fa4d48a5508bd","$43e662060fcac00e$export$13ac83fec5d06115","isLoadingFunc","viewName","CalendarDataProvider","handleData","dataManager","$43e662060fcac00e$export$12f075fef39cbe71","prevProps","newOptionOverrides","SegHierarchy","strictOrder","allowReslicing","maxCoord","maxStackCnt","levelCoords","entriesByLevel","stackCnts","addSegs","hiddenEntries","insertEntry","entry","findInsertion","isInsertionValid","insertEntryAt","handleInvalidInsertion","levelCoord","thickness","stackCnt","touchingEntry","splitEntry","barrier","partCnt","splitHiddenEntries","entrySpan","barrierSpan","$43e662060fcac00e$export$27bf8845080f9efc","lateral","$43e662060fcac00e$var$insertAt","level","$43e662060fcac00e$export$73e3e4bb89c64c2d","newEntry","levelCnt","candidateCoord","touchingLevel","touchingLateral","trackingLevel","trackingCoord","trackingEntries","trackingEntry","searchRes","$43e662060fcac00e$export$2e0ae67339d5f1ac","$43e662060fcac00e$export$370c20e3b7e58c62","lateralIndex","trackingEntryBottom","destLevel","destLateral","toRects","rects","entries","entries_1","$43e662060fcac00e$export$9926610479b47737","span0","span1","merges","entries_2","filteredMerges","hungryMerge","merges_1","merge","item","searchVal","getItemVal","middleIndex","middleVal","Interaction","isHitComboAllowed","$43e662060fcac00e$export$ebb60ef140fd716","$43e662060fcac00e$export$1c84a6929e3d23a8","ElementDragging","setMirrorIsVisible","bool","setMirrorNeedsRevert","setAutoScrollEnabled","$43e662060fcac00e$export$e506a1d27d1eaa20","$43e662060fcac00e$var$DRAG_META_REFINERS","$43e662060fcac00e$export$44daa58420834cbf","leftoverProps","$43e662060fcac00e$var$ToolbarSection","ToolbarSection","widgetGroups","widgetGroup","renderWidgetGroup","isOnlyButtons","widgetGroup_1","widget","titleId","isPressed","activeButton","isTodayEnabled","isPrevEnabled","isNextEnabled","buttonClasses","disabled","groupClassName","$43e662060fcac00e$var$Toolbar","Toolbar","startContent","endContent","model","extraClassName","forceLtr","centerContent","renderSection","$43e662060fcac00e$var$ViewContainer","ViewContainer","availableWidth","handleEl","updateAvailableWidth","handleResize","liquid","labeledById","$43e662060fcac00e$var$EventClicking","EventClicking","handleSegClick","segEl","hasUrlContainer","location","$43e662060fcac00e$export$a13296960cae0384","$43e662060fcac00e$var$EventHovering","EventHovering","onMouseEnter","onMouseLeave","currentMatchedChild","handleEventElRemove","currentSegEl","handleSegLeave","handleSegEnter","triggerEvent","removeHoverListeners","mouseOverEv","realOnMouseLeave_1","mouseLeaveEv","publicEvName","CalendarContent","buildViewContext","buildViewPropTransformers","$43e662060fcac00e$var$buildViewPropTransformers","buildToolbarProps","$43e662060fcac00e$var$buildToolbarProps","headerRef","footerRef","interactionsStore","viewLabelId","settingsInput","useEventCenter","$43e662060fcac00e$var$parseInteractionSettings","interactions","TheInteractionClass","listeners","listeners_1","resizeRunner","viewAspectRatio","toolbarProps","viewVGrow","isHeightAuto","forPrint","viewContext","renderView","buildAppendContent","CalendarInteractionClass","ViewComponent","todayInfo","prevInfo","nextInfo","theClasses","TheClass","CalendarRoot","handleBeforePrint","handleAfterPrint","$43e662060fcac00e$export$23d39d043626c34c","datesRepDistinctDays","$43e662060fcac00e$var$CLASS_NAME","renderInner","TableDateCell","dayMeta","navLinkAttrs","colCnt","extraHookProps","role","colSpan","extraDataAttrs","isSticky","$43e662060fcac00e$var$WEEKDAY_FORMAT","TableDowCell","dateMeta","extraClassNames","NowTimer","initialNowDate","initialNowQueriedMs","computeTiming","currentState","unroundedNow","currentUnitStart","nextUnitStart","waitMs","$43e662060fcac00e$var$buildDayRange","DayHeader","createDayHeaderFormatter","$43e662060fcac00e$var$createDayHeaderFormatter","dates","renderIntro","$43e662060fcac00e$export$c892dbfcb27e83ff","$43e662060fcac00e$export$c74a2dd098858db4","$43e662060fcac00e$export$521e40a6df7e3be2","explicitFormat","dateCnt","DaySeriesModel","indices","dayIndex","cnt","sliceRange","firstIndex","getDateDayIndex","lastIndex","clippedFirstIndex","clippedLastIndex","ceil","dayOffset","DayTableModel","daySeries","breakOnWeeks","daysPerRow","rowCnt","cells","buildCells","headerDates","buildHeaderDates","rows","row","col","buildCell","seriesSeg","nextIndex","firstCol","lastCol","Slicer","sliceBusinessHours","_sliceBusinessHours","sliceDateSelection","_sliceDateSpan","sliceEventStore","_sliceEventStore","sliceEventDrag","_sliceInteraction","sliceEventResize","forceDayIfListItem","sliceProps","extraArgs","eventSegs","dateSelectionSegs","businessHourSegs","fgEventSegs","bgEventSegs","sliceNowDate","$43e662060fcac00e$var$computeActiveRange","rangeRes","sliceEventRanges","affectedInstances","$43e662060fcac00e$var$fabricateEventRange","segs_1","eventRanges","eventRanges_1","sliceEventRange","segs_2","isComponentAllDay","$43e662060fcac00e$export$69211496272de756","$43e662060fcac00e$var$isNewPropsValid","$43e662060fcac00e$export$c0e913d825ef0f33","calendarState","$43e662060fcac00e$export$282c10f544ab8f4f","dateSpanMeta","filterConfig","subjectEventStore","subjectDefs","subjectInstances","subjectConfigs","otherEventStore","removals","otherDefs","otherInstances","otherConfigs","subjectInstanceId","subjectInstance","subjectRange","subjectConfig","subjectDef","$43e662060fcac00e$var$allConstraintsPass","eventOverlapFunc","otherInstanceId","otherInstance","calendarEventStore","subjectAllow","subjectDateSpan","origDef","origInstance","$43e662060fcac00e$var$isInteractionPropsValid","relevantEventStore","relevantDefs","relevantInstances","selectionRange","selectOverlapFunc","relevantInstanceId","relevantInstance","selectionAllow","$43e662060fcac00e$var$isDateSelectionPropsValid","businessHoursUnexpanded","constraints_1","$43e662060fcac00e$var$anyRangesContainRange","$43e662060fcac00e$var$constraintToRanges","$43e662060fcac00e$var$eventStoreToRanges","outerRanges","outerRanges_1","$43e662060fcac00e$var$VISIBLE_HIDDEN_RE","Scroller","liquidIsAbsolute","isAbsolute","overcomeLeft","overcomeRight","overcomeBottom","marginLeft","marginRight","marginBottom","maxHeight","needsXScrolling","realClientWidth","getYScrollbarWidth","needsYScrolling","realClientHeight","getXScrollbarWidth","RefMap","masterCallback","currentMap","depths","callbackMap","handleValue","removed","added","refCallback","collect","getAll","$43e662060fcac00e$export$d95ce3f334f269b6","chunkEls","largestWidth","shrinkCells_1","shrinkCell","$43e662060fcac00e$export$321e0bbcf68e778","sectionConfig","$43e662060fcac00e$export$313f0971aa3ab7f2","$43e662060fcac00e$export$6768d656b6f5cf2e","chunkConfig","isHeader","tableClassName","syncRowHeights","minWidth","tableMinWidth","tableColGroupNode","rowContent","$43e662060fcac00e$export$fdb72be6ac63a5be","cols0","cols1","$43e662060fcac00e$export$554f91a819429360","cols","shrinkWidth","colNodes","cols_1","colProps","$43e662060fcac00e$export$bd697699decd801f","$43e662060fcac00e$export$cfd72b97762e58be","cols_2","$43e662060fcac00e$export$dfbc7ec6a3820213","$43e662060fcac00e$export$d5d0d55b8acf4763","wholeTableVGrow","$43e662060fcac00e$export$56b0c0712f22dfa","$43e662060fcac00e$export$4c2e0faedbd2c494","$43e662060fcac00e$export$fb1a8b233e769611","SimpleScrollGrid","processCols","renderMicroColGroup","scrollerRefs","$43e662060fcac00e$export$1c8262ba2f426129","scrollerElRefs","_handleScrollerEl","forceYScrollbars","scrollerClientWidths","scrollerClientHeights","handleSizing","computeShrinkWidth","computeScrollerDims","sectionConfigs","sections","microColGroupNode","collapsibleWidth","currentConfig","configCnt","configI","headSectionNodes","bodySectionNodes","footSectionNodes","isBuggy","roleAttrs","outerContent","renderChunkTd","chunk","isLiquid","sectionKey","rowSyncHeights","reportRowHeightChange","$43e662060fcac00e$export$76d6749d1cf8513c","scrollerEl","section","sections_1","$43e662060fcac00e$var$getSectionByKey","scrollerElRef","scrollbarWidth","scroller","harnessEl","$43e662060fcac00e$export$604a060af1aa4116","EventRoot","timeText","isDraggable","disableDragging","isStartResizable","disableResizing","isEndResizable","isMirror","isDragging","isResizing","isDateSelecting","isSelected","standardClassNames","$43e662060fcac00e$export$2c069c95f96f428a","StandardEvent","defaultTimeFormat","$43e662060fcac00e$export$44b39cd70886cf9a","innerProps","$43e662060fcac00e$export$b89f70b03c73dff5","isAxis","$43e662060fcac00e$var$DAY_NUM_FORMAT","DayCellContent","$43e662060fcac00e$var$refineDayCellHookProps","showDayNumber","extraProps","dayNumberText","DayCellRoot","refineHookProps","dataAttrs","$43e662060fcac00e$export$79e3d40f76645ac6","fillType","$43e662060fcac00e$export$387454c9d1899949","$43e662060fcac00e$var$renderInnerContent","$43e662060fcac00e$export$36cf0d3fe418e146","defaultFormat","$43e662060fcac00e$var$renderInner","$43e662060fcac00e$var$Popover","Popover","handleDocumentMouseDown","handleCloseClick","handleDocumentKeyDown","onClose","extraAttrs","parentEl","alignmentEl","alignGridTop","alignmentRect","clippingParents","clippingParents_1","intersection","$43e662060fcac00e$var$computeClippedClientRect","popoverDims","popoverTop","popoverLeft","origin_1","offsetParent","$43e662060fcac00e$var$MorePopover","MorePopover","startDate","$43e662060fcac00e$export$597f9002a82e65d9","dayClassNames","$43e662060fcac00e$export$c0cb192d64fa36cd","extraDateSpan","dayEl","layer","$43e662060fcac00e$export$19285a5b05c4ea7c","MoreLinkRoot","linkElRef","isPopoverOpen","popoverId","handleClick","$43e662060fcac00e$var$computeRange","buildPublicSeg","allDayDate","allSegs","hiddenSegs","handlePopoverClose","moreCnt","shortText","$43e662060fcac00e$var$renderMoreLinkInner","alignmentElRef","popoverContent","updateParentEl","$43e662060fcac00e$export$3fcd761a5bd0e0a6","$43e662060fcac00e$var$pickLatestEnd","$43e662060fcac00e$var$pickEarliestStart","seg0","seg1","Calendar","isRendering","isRendered","customContentRenderId","handleAction","renderRunner","handleRenderRequest","currentData_1","$43e662060fcac00e$export$4b8921cdafe76873","setClassNames","setHeight","$43e662060fcac00e$export$d13df88085f0591c","wasRendering","pauseRendering","resumeRendering","classNames_1","$43e662060fcac00e$export$7e525c799780ca59","TableView","headerElRef","renderSimpleLayout","headerRowContent","bodyContent","renderHScrollLayout","ScrollGrid","chunks","colGroups","$6c2aa10bd875c4d5$var$splitSegsByRow","byRow","$6c2aa10bd875c4d5$var$splitSegsByFirstCol","byCol","$6c2aa10bd875c4d5$var$splitInteractionByRow","$6c2aa10bd875c4d5$var$TableCellTop","TableCellTop","$6c2aa10bd875c4d5$var$renderTopInner","forceDayTop","dayNumberId","$6c2aa10bd875c4d5$var$DEFAULT_TABLE_EVENT_TIME_FORMAT","$6c2aa10bd875c4d5$var$hasListItemDisplay","$6c2aa10bd875c4d5$var$TableBlockEvent","TableBlockEvent","$43e662060fcac00e$export$2427d8cdb510b141","$6c2aa10bd875c4d5$var$TableListItemEvent","TableListItemEvent","$6c2aa10bd875c4d5$var$renderInnerContent","$6c2aa10bd875c4d5$var$TableCellMoreLink","TableCellMoreLink","compileSegs","$6c2aa10bd875c4d5$var$compileSegs","singlePlacements","invisibleSegs","$43e662060fcac00e$export$83c8e512fe741590","isForcedInvisible","visibility","isExpanded","singlePlacements_1","placement","isVisible","$6c2aa10bd875c4d5$var$DEFAULT_WEEK_NUM_FORMAT","$6c2aa10bd875c4d5$var$TableCell","TableCell","dayElRef","rootDataAttrs","showWeekNumber","weekElRef","weekClassNames","fgContentElRef","fgContent","marginTop","moreMarginTop","bgContent","$6c2aa10bd875c4d5$var$computeFgSegPlacement","eventInstanceHeights","maxContentHeight","hierarchy","$6c2aa10bd875c4d5$var$DayGridSegHierarchy","hiddenConsumes","segInputs","unknownHeightSegs","eventHeight","allRects","rectsByEachCol","rects_3","$6c2aa10bd875c4d5$var$groupRectsByEachCol","singleColPlacements","multiColPlacements","leftoverMargins","currentHeight","currentMarginTop","rects_1","$6c2aa10bd875c4d5$var$resliceSeg","absoluteTop","multiPlacements","rects_2","isFirstCol","$6c2aa10bd875c4d5$var$placeRects","moreCnts","moreMarginTops","unknownHeightSegs_1","hiddenEntries_1","hiddenEntry","hiddenSpan","spanStart","spanEnd","DayGridSegHierarchy","forceHidden","excludeHidden","touchingEntryId","placeholderEntry","$43e662060fcac00e$export$5b5f09cccae2e90","$6c2aa10bd875c4d5$var$TableRow","TableRow","cellElRefs","frameElRefs","fgElRefs","segHarnessRefs","framePositions","businessHoursByCol","bgEventSegsByCol","highlightSegsByCol","getHighlightSegs","mirrorSegsByCol","getMirrorSegs","cell","normalFgNodes","renderFgSegs","mirrorFgNodes","mirrorSegs","colPlacements","topsByInstanceId","colPlacements_1","placements_1","$6c2aa10bd875c4d5$var$buildAbsoluteTopHash","$6c2aa10bd875c4d5$var$buildMirrorPlacements","showDayNumbers","showWeekNumbers","renderFillSegs","updateSizing","prevState","currentProps","segPlacements","nodes","segPlacements_1","leftRightCss","isExternalSizingChange","frameEls","$43e662060fcac00e$export$227c7800aad03f8e","oldInstanceHeights","newInstanceHeights","queryEventInstanceHeights","limitByContentHeight","computeMaxContentHeight","segElMap","firstKey","fcContainerEl","getCellEls","elMap","Table","splitBusinessHourSegs","splitBgEventSegs","splitFgEventSegs","splitDateSelectionSegs","rowRefs","businessHourSegsByRow","bgEventSegsByRow","fgEventSegsByRow","dateSelectionSegsByRow","eventDragByRow","eventResizeByRow","limitViaBalanced","colGroupNode","renderRowIntro","$6c2aa10bd875c4d5$var$isSegAllDay","rowPositions","rowObj","colPositions","getCellRange","getCellEl","DayTableSlicer","dayTableModel","$43e662060fcac00e$export$2e88304c26ab33c0","DayTable","slicer","$6c2aa10bd875c4d5$export$eb38be9553e58392","tableRef","$6c2aa10bd875c4d5$export$54ec01a60f47d33d","headerAlignElRef","$6c2aa10bd875c4d5$export$61e79f95d746b006","$43e662060fcac00e$export$2913676c72e071b2","$43e662060fcac00e$export$4dfc1eca91fcaeff","dayGrid","DayTableView","buildDayTableModel","headerContent","$43e662060fcac00e$export$e609c88ebe4c173f","contentArg","$6c2aa10bd875c4d5$export$cd402b7558adf371","$6c2aa10bd875c4d5$export$b3c27e869d856b7","TableDateProfileGenerator","endOfWeek","dayGridDay","dayGridWeek","dayGridMonth","$06cea29e8ca64b2f$var$AllDaySplitter","AllDaySplitter","timed","$43e662060fcac00e$export$980082fdfafd21f8","$06cea29e8ca64b2f$var$DEFAULT_SLAT_LABEL_FORMAT","$06cea29e8ca64b2f$var$TimeColsAxisCell","isLabeled","isoTimeStr","labelFormat","$06cea29e8ca64b2f$var$renderInnerContent","$06cea29e8ca64b2f$var$TimeBodyAxis","TimeBodyAxis","slatMetas","slatMeta","$06cea29e8ca64b2f$var$DEFAULT_WEEK_NUM_FORMAT","TimeColsView","allDaySplitter","slatCoords","handleScrollTopRequest","renderHeadAxis","rowKey","frameHeight","renderTableRowAxis","rowHeight","$06cea29e8ca64b2f$var$renderAllDayInner","handleSlatCoords","timeContent","isNowIndicator","nowIndicatorTop","safeComputeTop","getAllDayMaxEventProps","TimeColsSlatsCoords","positions","startOfDayDate","timeMs","computeTimeTop","computeDateTop","when","slatIndex","slatRemainder","slatCoverage","$06cea29e8ca64b2f$var$TimeColsSlatsBody","TimeColsSlatsBody","slatElRefs","axis","$06cea29e8ca64b2f$var$TimeColsSlats","TimeColsSlats","minHeight","onCoords","$06cea29e8ca64b2f$export$bbb5c25f46ae511d","$06cea29e8ca64b2f$var$splitSegsByCol","segsByCol","$06cea29e8ca64b2f$var$splitInteractionByCol","$06cea29e8ca64b2f$var$TimeColMoreLink","TimeColMoreLink","$06cea29e8ca64b2f$var$renderMoreLinkInner","$06cea29e8ca64b2f$var$renderPlainFgSegs","$06cea29e8ca64b2f$var$buildPositioning","topLevelNodes","totalThickness","stretchNode","hiddenGroups","web","buildNode","$06cea29e8ca64b2f$var$cacheable","siblingRange","subjectLevel","subjectLateral","subjectEntry","afterSubject","searchIndex","lateralStart","lateralEnd","$06cea29e8ca64b2f$var$findNextLevelSegs","nextLevelRes","$06cea29e8ca64b2f$var$buildNodes","nextLevelNodes","$06cea29e8ca64b2f$var$buildWeb","startCoord","prevThickness","endCoord","allThickness","thicknessFraction","newChildren","nextLevelNodes_1","newThickness","segRects","processNode","stackDepth","stackForward","processNodes","nodes_1","$06cea29e8ca64b2f$var$webToRects","pairs","$06cea29e8ca64b2f$var$cmpDescPressures","$06cea29e8ca64b2f$var$extractNode","keyFunc","workFunc","cache","$06cea29e8ca64b2f$var$computeSegVCoords","colDate","vcoords","$06cea29e8ca64b2f$var$DEFAULT_TIME_FORMAT","$06cea29e8ca64b2f$var$TimeColEvent","TimeColEvent","isShort","$06cea29e8ca64b2f$var$TimeColMisc","TimeColMisc","$06cea29e8ca64b2f$var$TimeCol","TimeCol","sortEventSegs","isSelectMirror","interactionAffectedInstances","sortedFgSegs","renderNowIndicator","nowIndicatorSegs","segIsInvisible","renderPositionedFgSegs","segVCoords","dumbSegs","segRects_1","segRect","dumbSegs_1","dumbSeg","$06cea29e8ca64b2f$var$computeFgSegPlacements","renderHiddenGroups","segPlacement","vStyle","$06cea29e8ca64b2f$var$computeSegVStyle","hStyle","computeSegHStyle","isInset","hiddenGroup","segEntries","positionCss","segEntry","segHCoords","shouldOverlap","nearCoord","farCoord","zIndex","hiddenInstances","$06cea29e8ca64b2f$var$TimeColsContent","TimeColsContent","splitNowIndicatorSegs","nowIndicatorSegsByRow","updateCoords","onColCoords","TimeCols","processSlotOptions","$06cea29e8ca64b2f$var$processSlotOptions","onScrollTopRequest","top_1","handleColCoords","colCoords","onSlatCoords","scrollResponder","snapsPerSlot","colIndex","slatTop","slatHeight","partial","snapIndex","dayDate","snapDurationOverride","DayTimeColsSlicer","dayRanges","DayTimeCols","buildDayRanges","$06cea29e8ca64b2f$export$718c171dfac2fa3a","$06cea29e8ca64b2f$export$ca63779cde537f3d","timeColsRef","$06cea29e8ca64b2f$export$6d0b14d80f61b392","$06cea29e8ca64b2f$var$STOCK_SUB_DURATIONS","$06cea29e8ca64b2f$export$717bdb379477c13e","explicitLabelInterval","slatTime","slatIterator","labelInterval","slotsPerLabel","$06cea29e8ca64b2f$var$computeLabelInterval","metas","DayTimeColsView","buildTimeColsModel","$06cea29e8ca64b2f$export$5596a640484dddd2","buildSlatMetas","hasAttachedAxis","hasDetachedAxis","allDaySlot","timeGridContent","$06cea29e8ca64b2f$export$a1033d45b156b3eb","$06cea29e8ca64b2f$export$667ac525945c6ff8","timeGrid","$06cea29e8ca64b2f$export$4b78a540ee976f33","timeGridDay","timeGridWeek","$a25f57e71e762f6b$var$RELEASE_DATE","$a25f57e71e762f6b$var$UPGRADE_WINDOW","$a25f57e71e762f6b$var$PRESET_LICENSE_KEYS","$a25f57e71e762f6b$var$CSS","background","borderStyle","borderWidth","fontSize","borderTopRightRadius","$bf0dec7f7c840f68$var$_rtlScrollSystem","schedulerLicenseKey","currentUrl","status_1","match","purchaseDate","releaseDate","mockSchedulerReleaseDate","$a25f57e71e762f6b$var$processLicenseKey","$bf0dec7f7c840f68$var$WHEEL_EVENT_NAMES","$bf0dec7f7c840f68$var$ScrollListener","ScrollListener","isScrolling","isTouching","isRecentlyWheeled","isRecentlyScrolled","wheelWaiter","_handleWheelWaited","scrollWaiter","_handleScrollWaited","handleScroll","startScroll","handleWheel","handleTouchStart","handleTouchEnd","endScroll","passive","WHEEL_EVENT_NAMES_1","WHEEL_EVENT_NAMES_2","$bf0dec7f7c840f68$var$getScrollFromLeftEdge","$bf0dec7f7c840f68$var$getRtlScrollSystem","$bf0dec7f7c840f68$export$1fcf43561f595dcf","system","$bf0dec7f7c840f68$var$detectRtlScrollSystem","$bf0dec7f7c840f68$var$_isStickySupported","$bf0dec7f7c840f68$var$IS_MS_EDGE","navigator","userAgent","$bf0dec7f7c840f68$var$StickyScrolling","StickyScrolling","scrollEl","usingRelative","elGeoms","queryElGeoms","viewportWidth","viewportHeight","elDestinations","naturalBound","parentBound","parentWidth","parentHeight","$bf0dec7f7c840f68$var$assignRelativePositions","computeElDestinations","textAlign","$bf0dec7f7c840f68$var$assignStickyPositions","$bf0dec7f7c840f68$var$computeStickySupported","$bf0dec7f7c840f68$var$getStickySupported","listener","canvasOrigin","$bf0dec7f7c840f68$var$getScrollCanvasOrigin","els_1","elRect","computedStyles","parseFloat","viewportTop","viewportLeft","viewportRight","elGeom","destLeft","destTop","$bf0dec7f7c840f68$var$ClippedScroller","ClippedScroller","xScrollbarWidth","yScrollbarWidth","handleScroller","scrollerRef","isScrollbarOnLeft","$bf0dec7f7c840f68$var$ScrollSyncer","ScrollSyncer","scrollEls","scrollListeners","bindScroller","scrollListener","isWheel","isTouch","masterEl","assignMaster","scrollEls_1","otherEl","forceScrollLeft","forceScrollTop","compileColGroupStats","$bf0dec7f7c840f68$var$compileColGroupStat","$bf0dec7f7c840f68$var$isColGroupStatsEqual","renderMicroColGroups","clippedScrollerRefs","chunkElRefs","_handleChunkEl","stickyScrollings","scrollSyncersBySection","scrollSyncersByColumn","rowUnstableMap","rowInnerMaxHeightMap","anyRowHeightsChanged","recentSizingCnt","shrinkWidths","forceXScrollbars","sectionRowMaxHeights","isForcedResize","sectionRowMaxHeightsChanged","allowSizing","otherState","computeSectionRowMaxHeights","computeShrinkWidths","updateStickyScrolling","handleRowHeightChange","rowEl","isStable","innerMaxHeight","$bf0dec7f7c840f68$var$getRowInnerMaxHeight","has","colGroupStats","colGroup","microColGroupNodes","stat","getDims","colGroupStat","totalColWidth","$bf0dec7f7c840f68$var$renderMacroColGroup","sectionIndex","renderChunk","chunkIndex","rowHeights","sectionCnt","chunksPerSection","isVScrollSide","isLastSection","allowXScrolling","allowYScrolling","chunkVGrow","totalColMinWidth","getStickyScrolling","$bf0dec7f7c840f68$var$initStickyScrolling","$bf0dec7f7c840f68$var$destroyStickyScrolling","getScrollSyncersBySection","$bf0dec7f7c840f68$var$initScrollSyncer","$bf0dec7f7c840f68$var$destroyScrollSyncer","getScrollSyncersByColumn","updateScrollSyncers","destroyStickyScrolling","destroyScrollSyncers","lastSizingDate","SCROLLGRID_RESIZE_INTERVAL","hasShrinkCol","newHeightMap","sectionI","assignableHeights","rowHeightsByChunk","chunkI","chunkEl","isEqualRowCnt","rowHeightsAcrossChunks","h","chunkHeightSums","$bf0dec7f7c840f68$var$sumNumbers","maxTotalSum","rowInChunkCnt","rowInChunkTotalHeight","rowInChunkHeightOthers","rowInChunkHeightFirst","rowInChunkHeights","sideScrollI","lastSectionI","currentScrollers","scrollerEls","argsByKey","stickyScrolling","scrollElsBySection","scrollElsByColumn","scrollElMap","getChunkConfigByIndex","scrollSyncer","numbers","sum","numbers_1","innerHeights","$bf0dec7f7c840f68$var$getElHeight","colGroupConfig","$bf0dec7f7c840f68$var$sumColProp","total","$bf0dec7f7c840f68$export$3747862e7926fa1a","$bf0dec7f7c840f68$var$COL_GROUP_STAT_EQUALITY","stat0","stat1","$a25f57e71e762f6b$export$2e2bcd8739ae039","$4f72a31a6e06ab1a$var$MIN_AUTO_LABELS","$4f72a31a6e06ab1a$var$MAX_AUTO_SLOTS_PER_LABEL","$4f72a31a6e06ab1a$var$MAX_AUTO_CELLS","MAX_TIMELINE_SLOTS","$4f72a31a6e06ab1a$var$STOCK_SUB_DURATIONS","$4f72a31a6e06ab1a$export$7a690ea36c57308f","allOptions","tDateProfile","$4f72a31a6e06ab1a$var$validateLabelAndSlot","$4f72a31a6e06ab1a$var$ensureLabelInterval","STOCK_SUB_DURATIONS_3","trySlotDuration","$4f72a31a6e06ab1a$var$ensureSlotDuration","rawFormats","format1","format2","weekNumbersVisible","format0","$4f72a31a6e06ab1a$var$currentRangeAs","$4f72a31a6e06ab1a$var$computeHeaderFormats","headerFormats","rawFormat","isTimeScale","slotUnit","emphasizeWeeks","rawSnapDuration","timeWindowMs","normalizedStart","$4f72a31a6e06ab1a$var$normalizeDate","normalizedEnd","normalizedRange","slotDates","$4f72a31a6e06ab1a$var$isValidDate","snapDiff","snapDiffToIndex","snapIndexToDiff","snapCnt","slotCnt","isWeekStarts","prevWeekNumber","slotDates_1","slotDate","weekNumber","isWeekStart","$4f72a31a6e06ab1a$var$buildIsWeekStarts","cellRows","formats","slotAsDays","guessedSlotUnit","rowUnitsFromFormats","rowCells","leadingCell","isLastRow","isSuperRow","newCell","rowUnit","colspan","$4f72a31a6e06ab1a$var$buildCellObject","weekStart","$4f72a31a6e06ab1a$var$buildCellRows","normalDate","STOCK_SUB_DURATIONS_1","tryLabelInterval","STOCK_SUB_DURATIONS_2","$4f72a31a6e06ab1a$var$TimelineHeaderThInner","TimelineHeaderThInner","$4f72a31a6e06ab1a$var$renderInnerContent","$4f72a31a6e06ab1a$var$refineHookProps","$4f72a31a6e06ab1a$var$TimelineHeaderTh","TimelineHeaderTh","buildCellNavLinkAttrs","$4f72a31a6e06ab1a$var$buildCellNavLinkAttrs","rowLevel","rowInnerHeight","cellDate","TimelineHeaderRows","rowInnerHeights","isLast","isChrono","TimelineCoords","slatRootEl","slatEls","outerCoordCache","innerCoordCache","isDateInRange","dateToCoord","slotCoverage","computeDateSnapCoverage","slotIndex","rangeToCoords","durationToCoord","coord","coordFromLeft","$4f72a31a6e06ab1a$var$computeDateSnapCoverage","snapDiffInt","snapCoverage","$4f72a31a6e06ab1a$export$2732ad39246ebe3","hcoord","$4f72a31a6e06ab1a$export$f2f1be06fae7046d","hcoords","TimelineHeader","timerUnit","$4f72a31a6e06ab1a$export$e6d314ec26f9e99","onMaxCushionWidth","computeMaxCushionWidth","$4f72a31a6e06ab1a$var$TimelineSlatCell","TimelineSlatCell","isEm","isDay","$4f72a31a6e06ab1a$var$TimelineSlatsBody","TimelineSlatsBody","TimelineSlats","onScrollLeftRequest","coords","$4f72a31a6e06ab1a$export$8171069c95d891da","positionToHit","slatWidth","localSnapIndex","$4f72a31a6e06ab1a$var$computeSegHCoords","timelineCoords","TimelineLaneBg","highlightSeg","eventResizeSegs","renderSegs","TimelineLaneSlicer","dayRange","$4f72a31a6e06ab1a$var$normalizeRange","$4f72a31a6e06ab1a$var$DEFAULT_TIME_FORMAT","$4f72a31a6e06ab1a$var$TimelineEvent","TimelineEvent","$4f72a31a6e06ab1a$var$TimelineLaneMoreLink","TimelineLaneMoreLink","resourceId","TimelineLane","$4f72a31a6e06ab1a$export$4f85b2ebf2560a9d","harnessElRefs","moreElRefs","moreLinkHeights","slicedProps","fgSegs","crudePlacements","hiddenPlacements","moreLinkInputs","moreLinkCrudePlacements","extractSeg","sortedSegs","visiblePlacements","visibleRects_1","segIndex","$4f72a31a6e06ab1a$var$computeFgSegPlacements","fgPlacements","fgHeight","$4f72a31a6e06ab1a$export$99fcc43eeba6ef9b","placements","$4f72a31a6e06ab1a$var$buildAbsoluteTopHash","$4f72a31a6e06ab1a$var$buildMirrorPlacements","innerEl","onHeightChange","moreEl","syncParentMinHeight","isoStr","$4f72a31a6e06ab1a$export$2dc5703e984b268b","$4f72a31a6e06ab1a$var$TimelineGrid","TimelineGrid","slatsRef","handeEl","handleCoords","$4f72a31a6e06ab1a$export$66a228e82866e14a","slatHit","$4f72a31a6e06ab1a$export$7d57d580da3a3aa2","timeline","TimelineView","buildTimelineDateProfile","scrollGridRef","slotCushionMaxWidth","handleScrollLeftRequest","handleMaxCushionWidth","slatCols","computeFallbackSlotMinWidth","$4f72a31a6e06ab1a$export$c067d86a81dc4cf2","timelineDay","timelineWeek","timelineMonth","timelineYear","$5b04dbccb5369b88$var$computeResourceEditable","resourceEditable","eventResourceEditable","$5b04dbccb5369b88$var$ResourceDataAdder","ResourceDataAdder","filterResources","$5b04dbccb5369b88$var$filterResources","calendarProps","needsResourceData","resourceStore","filterResourcesWithEvents","resourceEntityExpansions","doFilterResourcesWithEvents","instancesInRange","eventInstances","$5b04dbccb5369b88$var$filterEventInstancesInRange","hasEvents_1","hasEvents","resourceIds","$5b04dbccb5369b88$var$computeHasEvents","resource","parentId","$5b04dbccb5369b88$var$computeAncestorHasEvents","$5b04dbccb5369b88$var$ResourceEventConfigAdder","ResourceEventConfigAdder","buildResourceEventUis","$5b04dbccb5369b88$var$buildResourceEventUis","injectResourceEventUis","$5b04dbccb5369b88$var$injectResourceEventUis","resourceEventUis","eventUi","origEventUi","$5b04dbccb5369b88$var$injectResourceEventUi","$5b04dbccb5369b88$var$defs","$5b04dbccb5369b88$var$registerResourceSourceDef","$5b04dbccb5369b88$var$getResourceSourceDef","$5b04dbccb5369b88$var$RESOURCE_SOURCE_REFINERS","resources","$5b04dbccb5369b88$var$parseResourceSource","inputObj","$5b04dbccb5369b88$var$warnUnknownProps","$5b04dbccb5369b88$var$buildResourceSourceMeta","$5b04dbccb5369b88$var$reduceResourceSource","$5b04dbccb5369b88$var$createSource","initialResources","refetchResourcesOnNavigate","resourceSourceInput","$5b04dbccb5369b88$var$doesSourceIgnoreRange","$5b04dbccb5369b88$var$fetchSource","$5b04dbccb5369b88$var$handleRangeChange","$5b04dbccb5369b88$var$receiveResponse","resourceSource","rawResources","$5b04dbccb5369b88$var$PRIVATE_ID_PREFIX","$5b04dbccb5369b88$var$RESOURCE_REFINERS","eventEditable","$5b04dbccb5369b88$var$parseResource","store","$5b04dbccb5369b88$export$b4d37adafdd7ac77","$5b04dbccb5369b88$var$reduceResourceStore","existingStore","nextStore","$5b04dbccb5369b88$var$receiveRawResources","additions","resourceHash","childResourceId","$5b04dbccb5369b88$var$removeResource","existingResource","$5b04dbccb5369b88$var$setResourceProp","propValue","$5b04dbccb5369b88$var$setResourceExtendedProp","$5b04dbccb5369b88$var$EVENT_REFINERS","ResourceApi","_resource","oldResource","sync","internalResource","getParent","getChildren","thisResourceId","childApis","internal","collapseEventColor","addResource","scrollTo","$5b04dbccb5369b88$export$bca4582a3229edaa","resourceApi","getResourceById","rawResource","getResources","resourceApis","getTopLevelResources","refetchResources","ResourceSplitter","$5b04dbccb5369b88$var$filterConfig","config","$5b04dbccb5369b88$var$filterConstraints","setResources","resources_1","$5b04dbccb5369b88$var$optionChangeHandlers","newSourceInput","$5b04dbccb5369b88$export$7559211a61a08952","$5b04dbccb5369b88$var$OPTION_REFINERS","resourceOrder","resourceGroupField","resourceAreaWidth","resourceAreaColumns","resourcesInitiallyExpanded","datesAboveResources","resourceAreaHeaderClassNames","resourceAreaHeaderContent","resourceAreaHeaderDidMount","resourceAreaHeaderWillUnmount","resourceGroupLabelClassNames","resourceGroupLabelContent","resourceGroupLabelDidMount","resourceGroupLabelWillUnmount","resourceLabelClassNames","resourceLabelContent","resourceLabelDidMount","resourceLabelWillUnmount","resourceLaneClassNames","resourceLaneContent","resourceLaneDidMount","resourceLaneWillUnmount","resourceGroupLaneClassNames","resourceGroupLaneContent","resourceGroupLaneDidMount","resourceGroupLaneWillUnmount","$5b04dbccb5369b88$var$LISTENER_REFINERS","resourcesSet","resourceAdd","resourceChange","resourceRemove","$5b04dbccb5369b88$export$910a63660b0b20c9","$5b04dbccb5369b88$var$renderInnerContent","publicArg","$5b04dbccb5369b88$var$buildRequestParams","$5b04dbccb5369b88$var$ResourceCell","ResourceCell","ResourceDayHeader","buildDateFormat","$5b04dbccb5369b88$var$buildDateFormat","dateFormat","renderResourceRow","renderDayAndResourceRows","renderResourceAndDayRows","resourceCells","buildTr","dateCells","dates_1","renderDateCell","resources_2","dates_2","keyPostfix","$5b04dbccb5369b88$var$ResourceIndex","indicesById","ids","AbstractResourceDayTableModel","resourceIndex","dateCol","resourceCol","computeCol","$5b04dbccb5369b88$var$NO_SEGS","ResourceDayTableModel","dateI","resourceI","computeColRanges","dateStartI","dateEndI","$5b04dbccb5369b88$export$f871171a970e577b","DayResourceTableModel","VResourceJoiner","joinDateSelection","joinSegs","joinBusinessHours","joinFgEvents","joinBgEvents","joinEventDrags","joinInteractions","joinEventResizes","joinProps","propSets","resourceDayTable","dateSelectionSets","businessHoursSets","fgEventSets","bgEventSets","segGroups","resourceCnt","transformedSegs","transformSeg","_d","expandSegs","anyInteractions","VResourceSplitter","resourceDayTableModel","$5b04dbccb5369b88$export$6d49194087c7af29","groupSpecs","orderSpecs","isVGrouping","expansions","expansionDefault","complexNodes","maxDepth","resourceNodes","nodeHash","resourceFields","$5b04dbccb5369b88$export$859026e397c3f9de","$5b04dbccb5369b88$var$insertResourceNodeInSiblings","$5b04dbccb5369b88$var$buildResourceNodes","builtNodes","resourceNode","$5b04dbccb5369b88$var$insertResourceNode","$5b04dbccb5369b88$var$buildHierarchy","flatNodes","$5b04dbccb5369b88$var$flattenNodes","rowSpans","depth","complexNode","group","firstRowIndex","rowSpanIndex","firstRow","hasChildren","groupNode","groupSpec","newGroupIndex","groupValue","$5b04dbccb5369b88$var$ensureGroupNodes","siblings","$5b04dbccb5369b88$var$reduceResourceEntityExpansions","items","eventMutation","hit0","hit1","resource0","resource1","resourceMutation","matchResourceId","setResourceId","resourceId0","resourceId1","combinedProps","sets","$5b04dbccb5369b88$export$6cb311ffa9e2b7ee","newResource","calendarData","$5b04dbccb5369b88$var$buildResourceApis","$8451d6ce84c964c6$var$ExpanderIcon","onExpanderClick","iconClassNames","fieldValue","$8451d6ce84c964c6$var$SpreadsheetIndividualCellInner","SpreadsheetIndividualCellInner","colSpec","cellContent","$8451d6ce84c964c6$var$renderResourceInner","$8451d6ce84c964c6$var$SpreadsheetIndividualCell","SpreadsheetIndividualCell","cellClassNames","cellDidMount","cellWillUnmount","innerHeight","isMain","$8451d6ce84c964c6$var$SpreadsheetGroupCell","SpreadsheetGroupCell","$8451d6ce84c964c6$var$renderGroupInner","rowSpan","SpreadsheetRow","colSpecs","$8451d6ce84c964c6$export$26819aaa4a64d071","$8451d6ce84c964c6$var$SpreadsheetGroupRow","SpreadsheetGroupRow","innerInnerRef","labelClassNames","labelContent","$8451d6ce84c964c6$var$renderCellInner","labelDidMount","labelWillUnmount","spreadsheetColCnt","group0","group1","$8451d6ce84c964c6$var$SpreadsheetHeader","SpreadsheetHeader","resizerElRefs","_handleColResizerEl","colDraggings","superHeaderRendering","rowNodes","rowInnerHeight_1","headerClassNames","headerDidMount","headerWillUnmount","isLastCol","resizerEl","dragging","initColResizing","onColWidthChange","ElementDraggingImpl","startWidth_1","currentWidths_1","allCells","$8451d6ce84c964c6$var$ResourceTimelineLaneMisc","ResourceTimelineLaneMisc","ResourceTimelineLane","$8451d6ce84c964c6$var$refineHookProps","handleHeightChange","$8451d6ce84c964c6$var$DividerRow","DividerRow","renderingHooks","laneClassNames","laneContent","laneDidMount","laneWillUnmount","$8451d6ce84c964c6$var$ResourceTimelineLanesBody","ResourceTimelineLanesBody","rowElRefs","$8451d6ce84c964c6$export$3e49b99950388456","fallbackBusinessHours","onRowHeightChange","$8451d6ce84c964c6$var$ResourceTimelineLanes","ResourceTimelineLanes","onRowCoords","rowNode","$8451d6ce84c964c6$var$ResourceTimelineGrid","ResourceTimelineGrid","computeHasResourceBusinessHours","$8451d6ce84c964c6$var$computeHasResourceBusinessHours","resourceSplitter","bgSlicer","handleRowCoords","rowCoords","hasResourceBusinessHours","bgLaneProps","bgSlicedProps","rowIndex","rowNodes_1","$8451d6ce84c964c6$var$ResourceTimelineViewLayout","ResourceTimelineViewLayout","timeBodyScrollerElRef","spreadsheetHeaderChunkElRef","ensureScrollGridResizeId","resourceAreaWidthOverride","ensureScrollGridResize","spreadsheetHeaderRows","timeHeaderContent","spreadsheetBodyRows","timeBodyContent","spreadsheetCols","timeCols","forceTimeScroll","forceResourceScroll","getResourceScroll","initSpreadsheetResizing","destroySpreadsheetResizing","spreadsheetHeadEl","dragStartWidth_1","viewWidth_1","rootEl_1","spreadsheetResizerDragging","newWidth","ResourceTimelineView","processColOptions","$8451d6ce84c964c6$var$processColOptions","hasNesting","$8451d6ce84c964c6$var$hasNesting","buildRowNodes","layoutRef","renderedRowNodes","buildRowIndex","$8451d6ce84c964c6$var$buildRowIndex","layout","rowId","fromBottom","handleColWidthChange","colWidths","spreadsheetColWidths","$8451d6ce84c964c6$var$buildSpreadsheetCols","renderSpreadsheetRows","resourceScroll","queryResourceScroll","trBottoms","scroll_1","elBottom","rowIdToIndex","forcedWidths","fallbackWidth","allColSpecs","plainColSpecs","groupColSpecs","allColSpecs_1","mainColSpec","hGroupField","plainOrderSpecs","allOrderSpecs_1","orderSpec","isGroup","groupSpecs_1","$8451d6ce84c964c6$export$467d9230f716acd4","$5b04dbccb5369b88$export$2e2bcd8739ae039","$4f72a31a6e06ab1a$export$2e2bcd8739ae039","resourceTimeline","resourceTimelineDay","resourceTimelineWeek","resourceTimelineMonth","resourceTimelineYear","touchMouseIgnoreWait","$286ff38889bfc4dc$var$ignoreMouseDepth","$286ff38889bfc4dc$var$listenerCnt","$286ff38889bfc4dc$var$isWindowTouchMoveCancelled","PointerDragging","containerEl","subjectEl","handleSelector","shouldIgnoreMove","shouldWatchScroll","isTouchDragging","wasTouchScroll","handleMouseDown","shouldIgnoreMouse","ctrlKey","$286ff38889bfc4dc$var$isPrimaryMouseButton","tryStart","createEventFromMouse","initScrollWatch","handleMouseMove","handleMouseUp","recordCoords","createEventFromTouch","targetEl","handleTouchMove","handleTouchScroll","pageX","prevScrollX","prevPageX","pageY","prevScrollY","prevPageY","origPageX","origPageY","$286ff38889bfc4dc$var$onWindowTouchMove","querySubjectEl","downEl","destroyScrollWatch","cancelTouchScroll","isFirst","touches","$286ff38889bfc4dc$var$ElementMirror","ElementMirror","sourceEl","mirrorEl","sourceElRect","revertDuration","origScreenX","origScreenY","updateElPosition","handleMove","setIsVisible","stop","needsRevertAnimation","doRevertAnimation","finalSourceElRect","transition","getMirrorEl","cloneNode","boxSizing","margin","$286ff38889bfc4dc$var$ScrollGeomCache","ScrollGeomCache","scrollController","doesListening","handleScrollChange","origScrollTop","origScrollLeft","clientRect","computeClientRect","getEventTarget","$286ff38889bfc4dc$var$ElementScrollGeomCache","ElementScrollGeomCache","$43e662060fcac00e$export$c9deaaca2f04d0b2","$286ff38889bfc4dc$var$WindowScrollGeomCache","WindowScrollGeomCache","$43e662060fcac00e$export$bb410cdca7c21666","$286ff38889bfc4dc$var$getTime","performance","$286ff38889bfc4dc$var$AutoScroller","AutoScroller","isEnabled","scrollQuery","edgeThreshold","maxVelocity","pointerScreenX","pointerScreenY","isAnimating","scrollCaches","everMovedUp","everMovedDown","everMovedLeft","everMovedRight","animate","edge","computeBestEdge","handleSide","msSinceRequest","requestAnimation","scrollStartEl","buildCaches","yDelta","xDelta","scrollCache","invDistance","distance","velocity","bestSide","scrollCaches_1","leftDist","rightDist","topDist","bottomDist","queryScrollEls","query","FeaturefulElementDragging","minDistance","touchScrollAllowed","mirrorNeedsRevert","isInteracting","isDelayEnded","isDistanceSurpassed","delayTimeoutId","onPointerDown","pointer","mirror","startDelay","handleDistanceSurpassed","onPointerMove","autoScroller","onPointerUp","tryStopDrag","$286ff38889bfc4dc$export$2b4a7aa79dc93c02","handleDelayEnd","tryStartDrag","stopDrag","setIgnoreMove","$43e662060fcac00e$export$4a9da928d74e3c3c","$286ff38889bfc4dc$var$OffsetTracker","OffsetTracker","origRect","computeLeft","computeTop","isWithinClipping","tagName","$286ff38889bfc4dc$var$HitDragging","HitDragging","droppableStore","useSubjectCenter","requireInitial","initialHit","movingHit","finalHit","handlePointerDown","processFirstCoord","handleDragStart","handleDragMove","handlePointerUp","releaseHits","handleDragEnd","subjectRect","origPoint","adjustedPoint","point1","point2","queryHitForOffset","slicedSubjectRect","coordAdjust","forceHandle","hit","$286ff38889bfc4dc$var$isHitsEqual","offsetTrackers","interactionSettings","offsetLeft","offsetTop","bestHit","offsetTracker","originLeft","originTop","componentId","$43e662060fcac00e$var$isSpanPropsEqual","$286ff38889bfc4dc$var$buildDatePointApiWithContext","$286ff38889bfc4dc$var$DateClicking","DateClicking","hitDragging","$286ff38889bfc4dc$export$23a4eef4006a2769","$286ff38889bfc4dc$var$DateSelecting","DateSelecting","dragSelection","canSelect","getComponentTouchDelay","handleHitUpdate","isFinal","isInvalid","dateSpan0","dateSpan1","dateSelectionTransformers_1","$286ff38889bfc4dc$var$joinHitsIntoSelection","$286ff38889bfc4dc$var$EventDragging","EventDragging","subjectSeg","receivingContext","validMutation","mutatedRelevantEvents","origTarget","initialContext","$286ff38889bfc4dc$var$getComponentTouchDelay","fixedMirrorParent","receivingOptions","massagers","massagers_1","massager","$286ff38889bfc4dc$var$computeEventMutation","displayDrag","initialContext_1","receivingContext_1","relevantEvents_1","mutatedRelevantEvents_1","clearDrag","updatedEventApi","eventChangeArg","transformed","eventRemoveArg","draggedEl","addedEventDef","addedEventInstance","addedEventApi","eventAddArg","SELECTOR","nextContext","prevContext","initialCalendar","$286ff38889bfc4dc$var$EventResizing","EventResizing","draggingSegEl","draggingSeg","querySegEl","isFromStart","$286ff38889bfc4dc$var$computeMutation","$286ff38889bfc4dc$var$UnselectAuto","UnselectAuto","isRecentPointerDateSelect","matchesCancel","matchesEvent","onSelect","selectInfo","onDocumentPointerDown","onDocumentPointerUp","documentPointer","$286ff38889bfc4dc$var$OPTION_REFINERS","$286ff38889bfc4dc$var$LISTENER_REFINERS","dateClick","eventDragStart","eventDragStop","eventDrop","eventResizeStart","eventResizeStop","drop","eventReceive","eventLeave","$286ff38889bfc4dc$var$ExternalElementDragging","ExternalElementDragging","suppliedDragMeta","droppableEvent","dragMeta","buildDragMeta","canDropElOnCalendar","defProps","$286ff38889bfc4dc$var$computeEventForDateSpan","finalView","addingEvents_1","dataAttrPrefix","prefixedName","getAttribute","$286ff38889bfc4dc$var$getEmbeddedElData","ExternalDraggable","itemSelector","appendTo","eventData","$286ff38889bfc4dc$var$InferredElementDragging","InferredElementDragging","mirrorSelector","currentMirrorEl","handlePointerMove","ThirdPartyDraggable","containerOrSettings","Element","$7562b87d85901363$var$ListViewHeaderRow","ListViewHeaderRow","textId","cellId","listDayFormat","sideText","listDaySideFormat","sideNavLinkAttrs","$7562b87d85901363$var$renderInnerContent","$7562b87d85901363$var$DEFAULT_TIME_FORMAT","$7562b87d85901363$var$ListViewEventRow","ListViewEventRow","timeHeaderId","eventHeaderId","dateHeaderId","interactiveAttrs","$7562b87d85901363$var$renderEventInnerContent","doAllDay","$7562b87d85901363$var$renderAllDayInner","headers","$7562b87d85901363$var$buildTimeContent","$7562b87d85901363$var$renderNoEventsInner","$7562b87d85901363$var$computeDateVars","viewEnd","dayDates","$7562b87d85901363$var$createFalsableFormatter","noEventsClassNames","noEventsContent","noEventsDidMount","noEventsWillUnmount","ListView","computeDateVars","eventStoreToSegs","_eventStoreToSegs","dateHeaderIdRoot","setRootEl","renderSegList","renderEmptyMessage","segsByDay","$7562b87d85901363$var$groupSegsByDay","innerNodes","daySegs","dayStr","daySegs_1","eventRangesToSegs","eventRangeToSegs","listDay","listWeek","listMonth","listYear","$096948531419f5b2$export$f1b46dc0618b220c","$096948531419f5b2$export$94dd8a9f089c7f53","Weekday","fromStr","nth","equals","other","toString","getJsWeekday","$e94d0728c9f28ae0$export$ee27c052bca048fb","$e94d0728c9f28ae0$export$7e4aa119212bc614","$e94d0728c9f28ae0$export$f9326dee76b2106d","includes","$e94d0728c9f28ae0$export$43bee75e5e14138e","$e94d0728c9f28ae0$export$d02631cccf789723","rang","$e94d0728c9f28ae0$export$76d90c956114f2c2","times","$e94d0728c9f28ae0$export$36cf564d487b5178","targetLength","padString","$33760a39c2135add$export$44c95d3770756ed2","Frequency","$e94d0728c9f28ae0$export$65980d18b75784e2","sep","splits","$e94d0728c9f28ae0$export$569bc7c4b94c73c8","$e94d0728c9f28ae0$export$7cb533f05108f0eb","div","mod","$e94d0728c9f28ae0$export$6e22c362a0406a2c","$e94d0728c9f28ae0$export$b29ea735dcfba3c1","$e94d0728c9f28ae0$export$ee2e0f811dca1807","$b0791dc4ca2d938e$export$7ba4466dbd0f07e1","$b0791dc4ca2d938e$export$d54376159e08b33c","$b0791dc4ca2d938e$export$a97a1358cbb650ab","$b0791dc4ca2d938e$export$9d1fbb900e9d1ae5","$b0791dc4ca2d938e$export$fc0783a0b0d186d8","$b0791dc4ca2d938e$export$cf48b145d371639b","$b0791dc4ca2d938e$export$553d7fa8e3805fc0","$b0791dc4ca2d938e$export$871608497c498473","$b0791dc4ca2d938e$export$c03bb0116ee09d4b","getTime","$b0791dc4ca2d938e$export$9047ae35a63b6344","$b0791dc4ca2d938e$export$f2cd37d9f3227410","date2","differencems","$b0791dc4ca2d938e$export$9ca7d52b87a6fe91","ordinal","$b0791dc4ca2d938e$export$214c174a056fc56f","$b0791dc4ca2d938e$export$3cd955dfd2b0d79c","$b0791dc4ca2d938e$export$12f87b9998649ded","$b0791dc4ca2d938e$export$1be1fc439b849fdf","$b0791dc4ca2d938e$export$9cd59f9826255e47","$b0791dc4ca2d938e$export$b1159799e3bb6038","clones","$b0791dc4ca2d938e$export$97db5808d8f88186","$b0791dc4ca2d938e$export$478f3a4b1337ed12","utc","$b0791dc4ca2d938e$export$1e820f1e902c56e0","until","bits","$b0791dc4ca2d938e$var$dateTZtoISO8601","toLocaleString","$153af40f23824527$var$IterResult","IterResult","minDate","maxDate","_result","dt","accept","tooEarly","tooLate","getValue","clone","$8381b07c7d0746c4$var$CallbackIterResult","CallbackIterResult","iterator","$153af40f23824527$export$2e2bcd8739ae039","$d5a55f0f5ff9e8dc$export$2e2bcd8739ae039","dayNames","monthNames","SKIP","number","numberAsText","every","at","the","first","third","last","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","$a59d990fe26f5164$var$contains","$a59d990fe26f5164$var$defaultGetText","$a59d990fe26f5164$var$defaultDateFormatter","ToText","rrule","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","freq","IMPLEMENTED","$433112270f5e3fb4$export$4e942d157960251","FREQUENCIES","plural","HOURLY","interval","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","delimiter","finalDelimiter","delimJoin","$3c1a1f4154e17bbc$var$Parser","Parser","rules","nextSymbol","isDone","symbol","best","bestSymbol","acceptNumber","expect","$3c1a1f4154e17bbc$export$2e2bcd8739ae039","ttr","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","decodeNTH","MDAYs","decodeM","S","$33760a39c2135add$export$5d09978a50c416fb","$6d2417a7d7cdb667$export$7a77aeaf230ddfb9","$6d2417a7d7cdb667$var$common","$a59d990fe26f5164$export$2e2bcd8739ae039","$6d2417a7d7cdb667$export$598ff36d54604b81","$6d2417a7d7cdb667$export$fb6015ad19349979","$399525124ac1f274$export$680ea196effce5f","Time","$399525124ac1f274$export$82f9ebd9adeba146","DateTime","fromDate","getWeekday","getDay","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","dayDiv","hourMod","addMinutes","byminute","hourDiv","minuteMod","addSeconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","$ba3d2a412bfc84a6$export$aeea68bb229a3a4d","invalid","$433112270f5e3fb4$export$d5755821cb579984","$ba3d2a412bfc84a6$export$49fe41a914eb071d","opts","$433112270f5e3fb4$export$93ca5d3f8675ae4c","byeaster","dtstart","setMilliseconds","bysetpos","bynweekday","parsedOptions","$ba3d2a412bfc84a6$export$c4642b52a0dd14c8","millisecondModulo","timeset","$ed650e05552a2dca$export$960addfb9e5a0cde","rfcString","$ed650e05552a2dca$var$parseLine","$ed650e05552a2dca$export$50f40aa3339c15e0","line","dtstartWithZone","tzid","$ed650e05552a2dca$var$parseRrule","attr","$433112270f5e3fb4$export$d3134eff2123aadb","$ed650e05552a2dca$var$parseIndividualNumber","$ed650e05552a2dca$var$parseNumber","optionKey","SyntaxError","wdaypart","$ed650e05552a2dca$var$parseWeekday","$6baf35d926b74fce$export$8baceac99da2643b","DateWithZone","RangeError","datestr","isUTC","rezonedDate","localTimeZone","resolvedOptions","dateInLocalTZ","tzOffset","$003d33e52a52e683$export$d1a7f461af1bce85","defaultKeys","outValue","$003d33e52a52e683$var$buildDtstart","strValues","ruleString","$fd7eeada1a44201b$var$argsMatch","$fd7eeada1a44201b$export$94affb487e701bf2","Cache","all","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","$31a2b79082c3f571$export$c5006c5d239e1eda","$31a2b79082c3f571$export$3464ee769a6045c4","$31a2b79082c3f571$var$M28","$31a2b79082c3f571$var$M29","$31a2b79082c3f571$var$M30","$31a2b79082c3f571$var$M31","$31a2b79082c3f571$export$782a123e13b7b635","$31a2b79082c3f571$export$cc84233aaf495bb9","$31a2b79082c3f571$var$NM28","$31a2b79082c3f571$var$NM29","$31a2b79082c3f571$var$NM30","$31a2b79082c3f571$var$NM31","$31a2b79082c3f571$export$d39664dac426eae2","$31a2b79082c3f571$export$db7b567cf202a0d7","$31a2b79082c3f571$export$49541bf804f4f7ea","$31a2b79082c3f571$export$da0070dc1f9f624c","$31a2b79082c3f571$export$f8a7f2f47145db59","wdaymask","$f263b3fd3cb9e86c$export$eca728367537c59e","firstwkst","wyearlen","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","result","mmask","mdaymask","nmdaymask","mrange","$f263b3fd3cb9e86c$var$baseYearMasks","wnomask","no1wkst","numweeks","k","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","$816d8d052d9a7d4b$export$c0eb75a5c675031d","lastyear","lastmonth","nwdaymask","$9648971eeecc0701$export$443908f369ea7717","offset","f","g","yearStart","Iterinfo","rebuild","yearinfo","monthinfo","eastermask","ydayset","mdayset","_","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","$4578c06c533a1a3f$export$c0f84614fdc2b889","ii","dayset","poslist","daypos","timepos","pos","$cdf1d327f82ca1a5$export$c0bf298a2e425654","$cdf1d327f82ca1a5$var$emitResult","counterDate","$47b7e524a1e2fb86$export$2e2bcd8739ae039","$cdf1d327f82ca1a5$var$makeTimeset","$cdf1d327f82ca1a5$var$removeFilteredDays","$cdf1d327f82ca1a5$var$rezoneIfNeeded","currentDay","$cdf1d327f82ca1a5$var$isFiltered","dayCounter","SA","SU","RRule","noCache","_cache","parseText","fromText","fromString","parseString","_iter","$8381b07c7d0746c4$export$2e2bcd8739ae039","toText","isFullyConvertibleToText","optionsToString","$88ca7367d3ad5a0a$export$fd46609344feee67","_rrule","_exrule","_rdate","_exdate","_exdateHash","_accept","evalExdate","$d61a6db0d093e59b$var$DEFAULT_OPTIONS","unfold","forceset","compatible","$d61a6db0d093e59b$export$20bebb8aee8dd3f5","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","$d61a6db0d093e59b$var$splitIntoLines","$d61a6db0d093e59b$var$extractName","parms","$d61a6db0d093e59b$var$breakDownLine","rdateTzid","$d61a6db0d093e59b$var$parseRDate","$d61a6db0d093e59b$export$fc5ce4cf349388d1","rset_1","$f0238c14e4711ef7$export$46546bf41642e5dd","$d61a6db0d093e59b$var$groomRruleOptions","rdate","exrule","exdate","$d61a6db0d093e59b$var$buildRule","$d61a6db0d093e59b$var$initializeOptions","rdateval","parm","$d61a6db0d093e59b$var$validateDateParm","$f0238c14e4711ef7$var$createGetterSetter","fieldName","field_1","RRuleSet","$f0238c14e4711ef7$var$_addRule","$f0238c14e4711ef7$var$_addDate","rrules","exrules","rdates","exdates","_dtstart","$f0238c14e4711ef7$var$rdatesToString","rrs","rule","collection","param","dateString","$8bcf8d9a7fb17405$var$parseRRuleObject","rruleInput","isTimeSpecified","isTimeZoneSpecified","processDateInput","dateInput","markerData","rruleOptions","$8bcf8d9a7fb17405$var$convertConstant","$8bcf8d9a7fb17405$var$convertConstants","eventProps","eventRRuleData","rruleSet","analysis","processMatch","whole","introPart","datePart","$8bcf8d9a7fb17405$var$analyzeRRuleString","$8bcf8d9a7fb17405$var$parseRRuleString","exdateInputs","exruleInputs","exdateInputs_1","exruleInputs_1","$8bcf8d9a7fb17405$var$parseEventRRule","COLLAPSIBLE_WIDTH_THRESHOLD","$c2e416cabfd57e50$var$contexts","$c2e416cabfd57e50$var$undoFuncs","$c2e416cabfd57e50$var$handleBeforePrint","scrollCoords","contexts_1","$c2e416cabfd57e50$var$killHorizontalScrolling","$c2e416cabfd57e50$var$restoreScrollerCoords","$c2e416cabfd57e50$var$freezeScrollGridWidth","$c2e416cabfd57e50$var$unfreezeScrollGridWidth","$c2e416cabfd57e50$var$freezeScrollgridWidths","$c2e416cabfd57e50$var$handleAfterPrint","contexts_2","$e6d8aa307cfbe8b4$export$2e2bcd8739ae039","$e5b6e627005992fb$export$2e2bcd8739ae039","required","$33099d3a0ee000b6$export$2e2bcd8739ae039","$db295730c81e792c$export$2e2bcd8739ae039","argument","argStr","stack","NaN","$62b6aa7362d709e7$export$2e2bcd8739ae039","dirtyDate","$915d833559b42c3f$export$2e2bcd8739ae039","dirtyNumber","$6ec7037ed5e3d5c3$export$2e2bcd8739ae039","dirtyAmount","timestamp","amount","$59c24a9e74e1c5c0$export$2e2bcd8739ae039","$f59bdeb98608936d$export$2e2bcd8739ae039","setUTCMonth","setUTCHours","difference","$48caadaecccd9d4f$export$2e2bcd8739ae039","setUTCDate","$c923e234d864ebd7$export$2e2bcd8739ae039","fourthOfJanuaryOfNextYear","setUTCFullYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","$d969d9c83bc56a0e$export$2e2bcd8739ae039","fourthOfJanuary","$d2c40956b8ab3953$export$2e2bcd8739ae039","$5bdcb58bd181ac10$var$defaultOptions","$5bdcb58bd181ac10$export$430a3269e24b912e","$a4a8a151e5e43f6b$export$2e2bcd8739ae039","_ref","_ref2","_ref3","_options$weekStartsOn","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","defaultOptions","weekStartsOn","$9acdbcf7776722e9$export$2e2bcd8739ae039","_options$firstWeekCon","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","$f6aee5547809ce40$export$2e2bcd8739ae039","firstWeek","$c6f84a8f2fb5610c$export$2e2bcd8739ae039","$a818db1c2d04a150$export$2e2bcd8739ae039","output","$5389fd1b998732ff$export$2e2bcd8739ae039","signedYear","M","dayPeriodEnumValue","H","numberOfDigits","pow","$4a2755b1807fc917$var$dayPeriodEnum","$4a2755b1807fc917$var$formatTimezoneShort","dirtyDelimiter","absOffset","$4a2755b1807fc917$var$formatTimezoneWithOptionalMinutes","$4a2755b1807fc917$var$formatTimezone","$4a2755b1807fc917$export$2e2bcd8739ae039","G","localize","ordinalNumber","Y","signedWeekYear","weekYear","R","u","Q","quarter","q","L","I","isoWeek","D","dayOfYear","E","dayOfWeek","localDayOfWeek","isoDayOfWeek","dayPeriod","B","K","X","_localize","timezoneOffset","_originalDate","O","z","originalDate","T","$a188900c436ed76e$var$dateLongFormatter","pattern","formatLong","$a188900c436ed76e$var$timeLongFormatter","$a188900c436ed76e$export$2e2bcd8739ae039","P","dateTimeFormat","matchResult","datePattern","timePattern","dateTime","$c6138e3e9e222cc3$export$2e2bcd8739ae039","utcDate","$a47722dda2cd757f$var$protectedDayOfYearTokens","$a47722dda2cd757f$var$protectedWeekYearTokens","$a47722dda2cd757f$export$c6cc36aa33304772","$a47722dda2cd757f$export$8073c1ae88f0e727","$a0fcf9a783a9c8cf$var$formatDistanceLocale","lessThanXSeconds","one","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","$a0fcf9a783a9c8cf$export$2e2bcd8739ae039","tokenValue","addSuffix","comparison","$46e336c804985263$export$2e2bcd8739ae039","defaultWidth","$f1af66fefd840e85$var$formatLong","full","long","medium","short","$2d69cb397acad490$var$formatRelativeLocale","lastWeek","yesterday","tomorrow","nextWeek","$e43ff33ed7f225ec$export$2e2bcd8739ae039","dirtyIndex","valuesArray","formattingValues","defaultFormattingWidth","_defaultWidth","_width","values","argumentCallback","$f3b96828de7939a6$export$2e2bcd8739ae039","string","matchPattern","matchPatterns","defaultMatchWidth","matchedString","parsePatterns","defaultParseWidth","predicate","$f3b96828de7939a6$var$findIndex","object","$f3b96828de7939a6$var$findKey","valueCallback","rest","$ff2f5d41cd8b653b$export$2e2bcd8739ae039","formatDistance","formatRelative","_date","_baseDate","_options","rem100","narrow","abbreviated","wide","am","pm","midnight","noon","morning","afternoon","evening","night","parsePattern","parseResult","any","$3aad3dc8a82b847c$var$formattingTokensRegExp","$3aad3dc8a82b847c$var$longFormattingTokensRegExp","$3aad3dc8a82b847c$var$escapedStringRegExp","$3aad3dc8a82b847c$var$doubleQuoteRegExp","$3aad3dc8a82b847c$var$unescapedLatinCharacterRegExp","$3aad3dc8a82b847c$export$2e2bcd8739ae039","dirtyFormatStr","_ref4","_options$locale2","_options$locale2$opti","_ref5","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","formatterOptions","firstCharacter","longFormatter","matched","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","$5c6855f17eac7feb$export$91246f0b9bd9beff","$5c6855f17eac7feb$export$7f72910d6dfd237a","$acc6d665ebe23d7e$export$2e2bcd8739ae039","_options$additionalDi","additionalDigits","dateStrings","timeString","$acc6d665ebe23d7e$var$patterns","dateTimeDelimiter","timeZoneDelimiter","timezone","$acc6d665ebe23d7e$var$splitDateString","parseYearResult","regex","RegExp","captures","restDateString","century","$acc6d665ebe23d7e$var$parseYear","$acc6d665ebe23d7e$var$dateRegex","isWeekDate","$acc6d665ebe23d7e$var$parseDateUnit","_year","$acc6d665ebe23d7e$var$validateWeekDate","isoWeekYear","fourthOfJanuaryDay","$acc6d665ebe23d7e$var$dayOfISOWeekYear","$acc6d665ebe23d7e$var$daysInMonths","$acc6d665ebe23d7e$var$isLeapYearIndex","$acc6d665ebe23d7e$var$validateDate","$acc6d665ebe23d7e$var$validateDayOfYearDate","$acc6d665ebe23d7e$var$parseDate","$acc6d665ebe23d7e$var$timeRegex","$acc6d665ebe23d7e$var$parseTimeUnit","$acc6d665ebe23d7e$var$validateTime","$acc6d665ebe23d7e$var$parseTime","setFullYear","setHours","timezoneString","$acc6d665ebe23d7e$var$timezoneRegex","_hours","$acc6d665ebe23d7e$var$validateTimezone","$acc6d665ebe23d7e$var$parseTimezone","$fc92ea60d5cd59fc$var$CalendarRenderer","_data","_parentID","_parentEl","_calendarEl","_calendar","_storageKey","getElementById","_viewKey","fixAriaHiddenFocusables","focusableSelector","hiddenContainer","focusable","hasAttribute","fixFullCalendarScrollableRegions","fixFullCalendarGridRoles","grid","applyAccessibilityFixes","runFixes","getViewStorage","localStorage","getItem","setViewStorage","setItem","buildCalendar","existingDatesSet","existingViewDidMount","existingEventDidMount","$6c2aa10bd875c4d5$export$2e2bcd8739ae039","$06cea29e8ca64b2f$export$2e2bcd8739ae039","$7562b87d85901363$export$2e2bcd8739ae039","$8bcf8d9a7fb17405$export$2e2bcd8739ae039","$8451d6ce84c964c6$export$2e2bcd8739ae039","$286ff38889bfc4dc$export$2e2bcd8739ae039","$c2e416cabfd57e50$export$2e2bcd8739ae039","$021ae827eeb476bf$export$e1aef45b828286de","calendarSettings","setupFilters","filterBtns","btn","isActive","toggle","evt","filterId","calData","_jagCalendars","textContent","dataset","jagDateFormat","jagRrule"],"version":3,"file":"main.js.map"}