@zealicsolutions/web-ui 1.0.60-test.1 → 1.0.60-test.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +247 -247
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Calendar/CalendarMolecule.d.ts +75 -24
- package/dist/cjs/molecules/Calendar/CalendarMolecule.stories.d.ts +3 -17
- package/dist/cjs/molecules/Calendar/ResourceTimelineCalendar.d.ts +95 -2
- package/dist/cjs/molecules/Calendar/SimpleCalendar.d.ts +98 -2
- package/dist/cjs/molecules/Calendar/YearViewCalendar.d.ts +85 -2
- package/dist/cjs/molecules/Calendar/hooks/useCalendarCore.d.ts +14 -0
- package/dist/cjs/molecules/Calendar/hooks/useCalendarStyling.d.ts +229 -0
- package/dist/cjs/molecules/DatePicker/DatePicker.d.ts +3 -1
- package/dist/esm/containers/FormContainer.js +1 -1
- package/dist/esm/containers/FormContainer.js.map +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.d.ts +75 -24
- package/dist/esm/molecules/Calendar/CalendarMolecule.stories.d.ts +3 -17
- package/dist/esm/molecules/Calendar/ResourceTimelineCalendar.d.ts +95 -2
- package/dist/esm/molecules/Calendar/ResourceTimelineCalendar.js +1 -1
- package/dist/esm/molecules/Calendar/ResourceTimelineCalendar.js.map +1 -1
- package/dist/esm/molecules/Calendar/SimpleCalendar.d.ts +98 -2
- package/dist/esm/molecules/Calendar/SimpleCalendar.js +1 -1
- package/dist/esm/molecules/Calendar/SimpleCalendar.js.map +1 -1
- package/dist/esm/molecules/Calendar/YearViewCalendar.d.ts +85 -2
- package/dist/esm/molecules/Calendar/YearViewCalendar.js +1 -1
- package/dist/esm/molecules/Calendar/YearViewCalendar.js.map +1 -1
- package/dist/esm/molecules/Calendar/hooks/useCalendarCore.d.ts +14 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarCore.js +2 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarCore.js.map +1 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarStyling.d.ts +229 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarStyling.js +2 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarStyling.js.map +1 -0
- package/dist/esm/molecules/DatePicker/DatePicker.d.ts +3 -1
- package/dist/esm/molecules/DatePicker/DatePicker.js +1 -1
- package/dist/esm/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/node_modules/@fullcalendar/premium-common/index.js +1 -1
- package/dist/esm/node_modules/@fullcalendar/premium-common/index.js.map +1 -1
- package/dist/esm/node_modules/@fullcalendar/timeline/internal.js +1 -1
- package/dist/esm/node_modules/@fullcalendar/timeline/internal.js.map +1 -1
- package/dist/index.d.ts +77 -24
- package/package.json +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js +0 -2
- package/dist/esm/molecules/Calendar/CalendarMolecule.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"internal.js","sources":["../../../../../node_modules/@fullcalendar/timeline/internal.js"],"sourcesContent":["import { injectStyles, config, createFormatter, greatestDurationDenominator, asCleanDays, createDuration, wholeDivideDurations, asRoughMs, addDays, startOfDay, asRoughSeconds, asRoughMinutes, diffWholeDays, isInt, computeVisibleDayRange, padStart, BaseComponent, memoizeObjArg, memoize, getDateMeta, ContentContainer, getSlotClassNames, getDayClassNames, buildNavLinkAttrs, PositionCache, findDirectChildren, rangeContainsMarker, NowTimer, NowIndicatorContainer, findElements, RefMap, multiplyDuration, SegHierarchy, groupIntersectingEntries, buildIsoString, computeEarliestSegStart, buildEventRangeKey, BgEvent, getSegMeta, renderFill, Slicer, intersectRanges, addMs, StandardEvent, MoreLinkContainer, sortEventSegs, mapHash, isPropsEqual, DateComponent, getStickyHeaderDates, getStickyFooterScrollbar, ViewContainer, renderScrollShim } from '@fullcalendar/core/internal.js';\nimport { createElement, Fragment, createRef } from '@fullcalendar/core/preact.js';\nimport { ScrollGrid } from '@fullcalendar/scrollgrid/internal.js';\n\nvar css_248z = \".fc .fc-timeline-body{min-height:100%;position:relative;z-index:1}.fc .fc-timeline-slots{bottom:0;position:absolute;top:0;z-index:1}.fc .fc-timeline-slots>table{height:100%}.fc .fc-timeline-slot-minor{border-style:dotted}.fc .fc-timeline-slot-frame{align-items:center;display:flex;justify-content:center}.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame{justify-content:flex-start}.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame{overflow:hidden}.fc .fc-timeline-slot-cushion{padding:4px 5px;white-space:nowrap}.fc-direction-ltr .fc-timeline-slot{border-right:0!important}.fc-direction-rtl .fc-timeline-slot{border-left:0!important}.fc .fc-timeline-now-indicator-container{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:4}.fc .fc-timeline-now-indicator-arrow,.fc .fc-timeline-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;pointer-events:none;position:absolute;top:0}.fc .fc-timeline-now-indicator-arrow{border-left-color:transparent;border-right-color:transparent;border-width:6px 5px 0;margin:0 -6px}.fc .fc-timeline-now-indicator-line{border-width:0 0 0 1px;bottom:0;margin:0 -1px}.fc .fc-timeline-events{position:relative;width:0;z-index:3}.fc .fc-timeline-event-harness,.fc .fc-timeline-more-link{position:absolute;top:0}.fc-timeline-event{z-index:1}.fc-timeline-event.fc-event-mirror{z-index:2}.fc-timeline-event{align-items:center;border-radius:0;display:flex;font-size:var(--fc-small-font-size);margin-bottom:1px;padding:2px 1px;position:relative}.fc-timeline-event .fc-event-main{flex-grow:1;flex-shrink:1;min-width:0}.fc-timeline-event .fc-event-time{font-weight:700}.fc-timeline-event .fc-event-time,.fc-timeline-event .fc-event-title{padding:0 2px;white-space:nowrap}.fc-direction-ltr .fc-timeline-event.fc-event-end,.fc-direction-ltr .fc-timeline-more-link{margin-right:1px}.fc-direction-rtl .fc-timeline-event.fc-event-end,.fc-direction-rtl .fc-timeline-more-link{margin-left:1px}.fc-timeline-overlap-disabled .fc-timeline-event{margin-bottom:0;padding-bottom:5px;padding-top:5px}.fc-timeline-event:not(.fc-event-end):after,.fc-timeline-event:not(.fc-event-start):before{border-color:transparent #000;border-style:solid;border-width:5px;content:\\\"\\\";flex-grow:0;flex-shrink:0;height:0;margin:0 1px;opacity:.5;width:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after{border-left:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before{border-right:0}.fc-timeline-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;font-size:var(--fc-small-font-size);padding:1px}.fc-timeline-more-link-inner{display:inline-block;left:0;padding:2px;right:0}.fc .fc-timeline-bg{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:2}.fc .fc-timeline-bg .fc-non-business{z-index:1}.fc .fc-timeline-bg .fc-bg-event{z-index:2}.fc .fc-timeline-bg .fc-highlight{z-index:3}.fc .fc-timeline-bg-harness{bottom:0;position:absolute;top:0}\";\ninjectStyles(css_248z);\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// potential nice values for slot-duration and interval-duration\nconst STOCK_SUB_DURATIONS = [\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];\nfunction buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileGenerator) {\n let tDateProfile = {\n labelInterval: allOptions.slotLabelInterval,\n slotDuration: allOptions.slotDuration,\n };\n validateLabelAndSlot(tDateProfile, dateProfile, dateEnv); // validate after computed grid duration\n ensureLabelInterval(tDateProfile, dateProfile, dateEnv);\n ensureSlotDuration(tDateProfile, dateProfile, dateEnv);\n let input = allOptions.slotLabelFormat;\n let rawFormats = Array.isArray(input) ? input :\n (input != null) ? [input] :\n computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions);\n tDateProfile.headerFormats = rawFormats.map((rawFormat) => createFormatter(rawFormat));\n tDateProfile.isTimeScale = Boolean(tDateProfile.slotDuration.milliseconds);\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 tDateProfile.largeUnit = largeUnit;\n tDateProfile.emphasizeWeeks =\n asCleanDays(tDateProfile.slotDuration) === 1 &&\n currentRangeAs('weeks', dateProfile, dateEnv) >= 2 &&\n !allOptions.businessHours;\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 let rawSnapDuration = allOptions.snapDuration;\n let snapDuration;\n let snapsPerSlot;\n if (rawSnapDuration) {\n snapDuration = createDuration(rawSnapDuration);\n snapsPerSlot = wholeDivideDurations(tDateProfile.slotDuration, snapDuration);\n // ^ TODO: warning if not whole?\n }\n if (snapsPerSlot == null) {\n snapDuration = tDateProfile.slotDuration;\n snapsPerSlot = 1;\n }\n tDateProfile.snapDuration = snapDuration;\n tDateProfile.snapsPerSlot = snapsPerSlot;\n // more...\n let timeWindowMs = asRoughMs(dateProfile.slotMaxTime) - asRoughMs(dateProfile.slotMinTime);\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 // apply slotMinTime/slotMaxTime\n // TODO: View should be responsible.\n if (tDateProfile.isTimeScale) {\n normalizedStart = dateEnv.add(normalizedStart, dateProfile.slotMinTime);\n normalizedEnd = dateEnv.add(addDays(normalizedEnd, -1), dateProfile.slotMaxTime);\n }\n tDateProfile.timeWindowMs = timeWindowMs;\n tDateProfile.normalizedRange = { start: normalizedStart, end: normalizedEnd };\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 tDateProfile.slotDates = slotDates;\n // more...\n let snapIndex = -1;\n let snapDiff = 0; // index of the diff :(\n const snapDiffToIndex = [];\n const snapIndexToDiff = [];\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 }\n else {\n snapDiffToIndex.push(snapIndex + 0.5);\n }\n date = dateEnv.add(date, tDateProfile.snapDuration);\n snapDiff += 1;\n }\n tDateProfile.snapDiffToIndex = snapDiffToIndex;\n tDateProfile.snapIndexToDiff = snapIndexToDiff;\n tDateProfile.snapCnt = snapIndex + 1; // is always one behind\n tDateProfile.slotCnt = tDateProfile.snapCnt / tDateProfile.snapsPerSlot;\n // more...\n tDateProfile.isWeekStarts = buildIsWeekStarts(tDateProfile, dateEnv);\n tDateProfile.cellRows = buildCellRows(tDateProfile, dateEnv);\n tDateProfile.slotsPerLabel = wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration);\n return tDateProfile;\n}\n/*\nsnaps to appropriate unit\n*/\nfunction normalizeDate(date, tDateProfile, dateEnv) {\n let normalDate = date;\n if (!tDateProfile.isTimeScale) {\n normalDate = startOfDay(normalDate);\n if (tDateProfile.largeUnit) {\n normalDate = dateEnv.startOf(normalDate, tDateProfile.largeUnit);\n }\n }\n return normalDate;\n}\n/*\nsnaps to appropriate unit\n*/\nfunction normalizeRange(range, tDateProfile, dateEnv) {\n if (!tDateProfile.isTimeScale) {\n range = computeVisibleDayRange(range);\n if (tDateProfile.largeUnit) {\n let dayRange = range; // preserve original result\n range = {\n start: dateEnv.startOf(range.start, tDateProfile.largeUnit),\n end: dateEnv.startOf(range.end, tDateProfile.largeUnit),\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 return range;\n}\nfunction isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator) {\n if (dateProfileGenerator.isHiddenDay(date)) {\n return false;\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 return true;\n}\nfunction validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) {\n const { currentRange } = dateProfile;\n // make sure labelInterval doesn't exceed the max number of cells\n if (tDateProfile.labelInterval) {\n const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.labelInterval);\n if (labelCnt > config.MAX_TIMELINE_SLOTS) {\n console.warn('slotLabelInterval results in too many cells');\n tDateProfile.labelInterval = null;\n }\n }\n // make sure slotDuration doesn't exceed the maximum number of cells\n if (tDateProfile.slotDuration) {\n const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.slotDuration);\n if (slotCnt > config.MAX_TIMELINE_SLOTS) {\n console.warn('slotDuration results in too many cells');\n tDateProfile.slotDuration = null;\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}\nfunction ensureLabelInterval(tDateProfile, dateProfile, dateEnv) {\n const { currentRange } = dateProfile;\n let { labelInterval } = tDateProfile;\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 // use the slot duration as a last resort\n if (!labelInterval) {\n labelInterval = tDateProfile.slotDuration;\n }\n // compute based off the view's duration\n // find the largest label interval that yields the minimum number of labels\n }\n else {\n for (input of STOCK_SUB_DURATIONS) {\n labelInterval = createDuration(input);\n const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, labelInterval);\n if (labelCnt >= MIN_AUTO_LABELS) {\n break;\n }\n }\n }\n tDateProfile.labelInterval = labelInterval;\n }\n return labelInterval;\n}\nfunction ensureSlotDuration(tDateProfile, dateProfile, dateEnv) {\n const { currentRange } = dateProfile;\n let { slotDuration } = tDateProfile;\n if (!slotDuration) {\n const labelInterval = ensureLabelInterval(tDateProfile, dateProfile, dateEnv); // will compute if necessary\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 // only allow the value if it won't exceed the view's # of slots limit\n if (slotDuration) {\n const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, slotDuration);\n if (slotCnt > MAX_AUTO_CELLS) {\n slotDuration = null;\n }\n }\n // use the label interval as a last resort\n if (!slotDuration) {\n slotDuration = labelInterval;\n }\n tDateProfile.slotDuration = slotDuration;\n }\n return slotDuration;\n}\nfunction computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {\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 // NOTE: weekNumber computation function wont work\n if ((unit === 'week') && !weekNumbersVisible) {\n unit = 'day';\n }\n switch (unit) {\n case 'year':\n format0 = { year: 'numeric' }; // '2015'\n break;\n case 'month':\n if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n format0 = { year: 'numeric' }; // '2015'\n }\n format1 = { month: 'short' }; // 'Jan'\n break;\n case 'week':\n if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n format0 = { year: 'numeric' }; // '2015'\n }\n format1 = { week: 'narrow' }; // 'Wk4'\n break;\n case 'day':\n if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n format0 = { year: 'numeric', month: 'long' }; // 'January 2014'\n }\n else if (currentRangeAs('months', dateProfile, dateEnv) > 1) {\n format0 = { month: 'long' }; // 'January'\n }\n if (weekNumbersVisible) {\n format1 = { week: 'short' }; // 'Wk 4'\n }\n format2 = { weekday: 'narrow', day: 'numeric' }; // 'Su 9'\n break;\n case 'hour':\n if (weekNumbersVisible) {\n format0 = { week: 'short' }; // 'Wk 4'\n }\n if (currentRangeAs('days', dateProfile, dateEnv) > 1) {\n format1 = { weekday: 'short', day: 'numeric', month: 'numeric', omitCommas: true }; // Sat 4/7\n }\n format2 = {\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'short',\n };\n break;\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) => (':' + padStart(params.date.minute, 2) // ':30'\n );\n }\n else {\n format0 = {\n hour: 'numeric',\n minute: 'numeric',\n meridiem: 'short',\n };\n }\n break;\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) => (':' + padStart(params.date.second, 2) // ':30'\n );\n }\n else {\n format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'\n }\n break;\n case 'millisecond':\n format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'\n format1 = (params) => ('.' + padStart(params.millisecond, 3));\n break;\n }\n return [].concat(format0 || [], format1 || [], format2 || []);\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, dateProfile, dateEnv) {\n let range = dateProfile.currentRange;\n let res = null;\n if (unit === 'years') {\n res = dateEnv.diffWholeYears(range.start, range.end);\n }\n else if (unit === 'months') {\n res = dateEnv.diffWholeMonths(range.start, range.end);\n }\n else if (unit === 'weeks') {\n res = dateEnv.diffWholeMonths(range.start, range.end);\n }\n else if (unit === 'days') {\n res = diffWholeDays(range.start, range.end);\n }\n return res || 0;\n}\nfunction buildIsWeekStarts(tDateProfile, dateEnv) {\n let { slotDates, emphasizeWeeks } = tDateProfile;\n let prevWeekNumber = null;\n let isWeekStarts = [];\n for (let slotDate of slotDates) {\n let weekNumber = dateEnv.computeWeekNumber(slotDate);\n let isWeekStart = emphasizeWeeks && (prevWeekNumber !== null) && (prevWeekNumber !== weekNumber);\n prevWeekNumber = weekNumber;\n isWeekStarts.push(isWeekStart);\n }\n return isWeekStarts;\n}\nfunction buildCellRows(tDateProfile, 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 = slotAsDays === 7 ? 'week' :\n slotAsDays === 1 ? 'day' :\n null;\n // specifically for navclicks\n let rowUnitsFromFormats = formats.map((format) => (format.getSmallestUnit ? format.getSmallestUnit() : null));\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 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 if (isSuperRow) {\n let text = dateEnv.format(date, format);\n if (!leadingCell || (leadingCell.text !== text)) {\n newCell = buildCellObject(date, text, rowUnit);\n }\n else {\n leadingCell.colspan += 1;\n }\n }\n else if (!leadingCell ||\n isInt(dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.labelInterval))) {\n let text = dateEnv.format(date, format);\n newCell = buildCellObject(date, text, rowUnit);\n }\n else {\n leadingCell.colspan += 1;\n }\n if (newCell) {\n newCell.weekStart = isWeekStart;\n rowCells.push(newCell);\n }\n }\n }\n return cellRows;\n}\nfunction buildCellObject(date, text, rowUnit) {\n return { date, text, rowUnit, colspan: 1, isWeekStart: false };\n}\n\nclass TimelineHeaderTh extends BaseComponent {\n constructor() {\n super(...arguments);\n this.refineRenderProps = memoizeObjArg(refineRenderProps);\n this.buildCellNavLinkAttrs = memoize(buildCellNavLinkAttrs);\n }\n render() {\n let { props, context } = this;\n let { dateEnv, options } = context;\n let { cell, dateProfile, tDateProfile } = props;\n // the cell.rowUnit is f'd\n // giving 'month' for a 3-day view\n // workaround: to infer day, do NOT time\n let dateMeta = getDateMeta(cell.date, props.todayRange, props.nowDate, dateProfile);\n let renderProps = this.refineRenderProps({\n level: props.rowLevel,\n dateMarker: cell.date,\n text: cell.text,\n dateEnv: context.dateEnv,\n viewApi: context.viewApi,\n });\n return (createElement(ContentContainer, { elTag: \"th\", elClasses: [\n 'fc-timeline-slot',\n 'fc-timeline-slot-label',\n cell.isWeekStart && 'fc-timeline-slot-em',\n ...( // TODO: so slot classnames for week/month/bigger. see note above about rowUnit\n cell.rowUnit === 'time' ?\n getSlotClassNames(dateMeta, context.theme) :\n getDayClassNames(dateMeta, context.theme)),\n ], elAttrs: {\n colSpan: cell.colspan,\n 'data-date': dateEnv.formatIso(cell.date, {\n omitTime: !tDateProfile.isTimeScale,\n omitTimeZoneOffset: true,\n }),\n }, renderProps: renderProps, generatorName: \"slotLabelContent\", customGenerator: options.slotLabelContent, defaultGenerator: renderInnerContent, classNameGenerator: options.slotLabelClassNames, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-timeline-slot-frame\", style: { height: props.rowInnerHeight } },\n createElement(InnerContent, { elTag: \"a\", elClasses: [\n 'fc-timeline-slot-cushion',\n 'fc-scrollgrid-sync-inner',\n props.isSticky && 'fc-sticky',\n ], elAttrs: this.buildCellNavLinkAttrs(context, cell.date, cell.rowUnit) })))));\n }\n}\nfunction buildCellNavLinkAttrs(context, cellDate, rowUnit) {\n return (rowUnit && rowUnit !== 'time')\n ? buildNavLinkAttrs(context, cellDate, rowUnit)\n : {};\n}\nfunction renderInnerContent(renderProps) {\n return renderProps.text;\n}\nfunction refineRenderProps(input) {\n return {\n level: input.level,\n date: input.dateEnv.toDate(input.dateMarker),\n view: input.viewApi,\n text: input.text,\n };\n}\n\nclass TimelineHeaderRows extends BaseComponent {\n render() {\n let { dateProfile, tDateProfile, rowInnerHeights, todayRange, nowDate } = this.props;\n let { cellRows } = tDateProfile;\n return (createElement(Fragment, null, 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 return ( // eslint-disable-next-line react/no-array-index-key\n createElement(\"tr\", { key: rowLevel, className: classNames.join(' ') }, rowCells.map((cell) => (createElement(TimelineHeaderTh, { key: cell.date.toISOString(), cell: cell, rowLevel: rowLevel, dateProfile: dateProfile, tDateProfile: tDateProfile, todayRange: todayRange, nowDate: nowDate, rowInnerHeight: rowInnerHeights && rowInnerHeights[rowLevel], isSticky: !isLast })))));\n })));\n }\n}\n\nclass TimelineCoords {\n constructor(slatRootEl, // okay to expose?\n slatEls, dateProfile, tDateProfile, dateEnv, isRtl) {\n this.slatRootEl = slatRootEl;\n this.dateProfile = dateProfile;\n this.tDateProfile = tDateProfile;\n this.dateEnv = dateEnv;\n this.isRtl = isRtl;\n this.outerCoordCache = new PositionCache(slatRootEl, slatEls, true, // isHorizontal\n false);\n // for the inner divs within the slats\n // used for event rendering and scrollTime, to disregard slat border\n this.innerCoordCache = new PositionCache(slatRootEl, findDirectChildren(slatEls, 'div'), true, // isHorizontal\n false);\n }\n isDateInRange(date) {\n return rangeContainsMarker(this.dateProfile.currentRange, date);\n }\n // results range from negative width of area to 0\n dateToCoord(date) {\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 if (this.isRtl) {\n return outerCoordCache.originClientRect.width - (outerCoordCache.rights[slotIndex] -\n (innerCoordCache.getWidth(slotIndex) * partial));\n }\n return (outerCoordCache.lefts[slotIndex] +\n (innerCoordCache.getWidth(slotIndex) * partial));\n }\n rangeToCoords(range) {\n return {\n start: this.dateToCoord(range.start),\n end: this.dateToCoord(range.end),\n };\n }\n durationToCoord(duration) {\n let { dateProfile, tDateProfile, dateEnv, isRtl } = this;\n let coord = 0;\n if (dateProfile) {\n let date = dateEnv.add(dateProfile.activeRange.start, duration);\n if (!tDateProfile.isTimeScale) {\n date = startOfDay(date);\n }\n coord = this.dateToCoord(date);\n // hack to overcome the left borders of non-first slat\n if (!isRtl && coord) {\n coord += 1;\n }\n }\n return coord;\n }\n coordFromLeft(coord) {\n if (this.isRtl) {\n return this.outerCoordCache.originClientRect.width - coord;\n }\n return coord;\n }\n // returned value is between 0 and the number of snaps\n computeDateSnapCoverage(date) {\n return computeDateSnapCoverage(date, this.tDateProfile, this.dateEnv);\n }\n}\n// returned value is between 0 and the number of snaps\nfunction computeDateSnapCoverage(date, tDateProfile, dateEnv) {\n let snapDiff = dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.snapDuration);\n if (snapDiff < 0) {\n return 0;\n }\n if (snapDiff >= tDateProfile.snapDiffToIndex.length) {\n return tDateProfile.snapCnt;\n }\n let snapDiffInt = Math.floor(snapDiff);\n let snapCoverage = tDateProfile.snapDiffToIndex[snapDiffInt];\n if (isInt(snapCoverage)) { // not an in-between value\n snapCoverage += snapDiff - snapDiffInt; // add the remainder\n }\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 return snapCoverage;\n}\nfunction coordToCss(hcoord, isRtl) {\n if (hcoord === null) {\n return { left: '', right: '' };\n }\n if (isRtl) {\n return { right: hcoord, left: '' };\n }\n return { left: hcoord, right: '' };\n}\nfunction coordsToCss(hcoords, isRtl) {\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\nclass TimelineHeader extends BaseComponent {\n constructor() {\n super(...arguments);\n this.rootElRef = createRef();\n }\n render() {\n let { props, context } = this;\n // TODO: very repetitive\n // TODO: make part of tDateProfile?\n let timerUnit = greatestDurationDenominator(props.tDateProfile.slotDuration).unit;\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 return (createElement(NowTimer, { unit: timerUnit }, (nowDate, todayRange) => (createElement(\"div\", { className: \"fc-timeline-header\", ref: this.rootElRef },\n createElement(\"table\", { \"aria-hidden\": true, className: \"fc-scrollgrid-sync-table\", style: { minWidth: props.tableMinWidth, width: props.clientWidth } },\n props.tableColGroupNode,\n createElement(\"tbody\", null,\n createElement(TimelineHeaderRows, { dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: nowDate, todayRange: todayRange, rowInnerHeights: props.rowInnerHeights }))),\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 createElement(\"div\", { className: \"fc-timeline-now-indicator-container\" }, (slatCoords && slatCoords.isDateInRange(nowDate)) && (createElement(NowIndicatorContainer, { elClasses: ['fc-timeline-now-indicator-arrow'], elStyle: coordToCss(slatCoords.dateToCoord(nowDate), context.isRtl), isAxis: true, date: nowDate }))))))));\n }\n componentDidMount() {\n this.updateSize();\n }\n componentDidUpdate() {\n this.updateSize();\n }\n updateSize() {\n if (this.props.onMaxCushionWidth) {\n this.props.onMaxCushionWidth(this.computeMaxCushionWidth());\n }\n }\n computeMaxCushionWidth() {\n return Math.max(...findElements(this.rootElRef.current, '.fc-timeline-header-row:last-child .fc-timeline-slot-cushion').map((el) => el.getBoundingClientRect().width));\n }\n}\n\nclass TimelineSlatCell extends BaseComponent {\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 renderProps = Object.assign(Object.assign({ date: dateEnv.toDate(props.date) }, dateMeta), { view: context.viewApi });\n return (createElement(ContentContainer, { elTag: \"td\", elRef: props.elRef, elClasses: [\n 'fc-timeline-slot',\n 'fc-timeline-slot-lane',\n isEm && 'fc-timeline-slot-em',\n tDateProfile.isTimeScale ? (isInt(dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, props.date, tDateProfile.labelInterval)) ?\n 'fc-timeline-slot-major' :\n 'fc-timeline-slot-minor') : '',\n ...(props.isDay ?\n getDayClassNames(dateMeta, theme) :\n getSlotClassNames(dateMeta, theme)),\n ], elAttrs: {\n 'data-date': dateEnv.formatIso(date, {\n omitTimeZoneOffset: true,\n omitTime: !tDateProfile.isTimeScale,\n }),\n }, renderProps: renderProps, generatorName: \"slotLaneContent\", customGenerator: options.slotLaneContent, classNameGenerator: options.slotLaneClassNames, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }, (InnerContent) => (createElement(InnerContent, { elTag: \"div\" }))));\n }\n}\n\nclass TimelineSlatsBody extends BaseComponent {\n render() {\n let { props } = this;\n let { tDateProfile, cellElRefs } = props;\n let { slotDates, isWeekStarts } = tDateProfile;\n let isDay = !tDateProfile.isTimeScale && !tDateProfile.largeUnit;\n return (createElement(\"tbody\", null,\n createElement(\"tr\", null, slotDates.map((slotDate, i) => {\n let key = slotDate.toISOString();\n return (createElement(TimelineSlatCell, { key: key, elRef: cellElRefs.createRef(key), date: slotDate, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isEm: isWeekStarts[i], isDay: isDay }));\n }))));\n }\n}\n\nclass TimelineSlats extends BaseComponent {\n constructor() {\n super(...arguments);\n this.rootElRef = createRef();\n this.cellElRefs = new RefMap();\n this.handleScrollRequest = (request) => {\n let { onScrollLeftRequest } = this.props;\n let { coords } = this;\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 return null; // best?\n };\n }\n render() {\n let { props, context } = this;\n return (createElement(\"div\", { className: \"fc-timeline-slots\", ref: this.rootElRef },\n createElement(\"table\", { \"aria-hidden\": true, className: context.theme.getClass('table'), style: {\n minWidth: props.tableMinWidth,\n width: props.clientWidth,\n } },\n props.tableColGroupNode,\n createElement(TimelineSlatsBody, { cellElRefs: this.cellElRefs, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange }))));\n }\n componentDidMount() {\n this.updateSizing();\n this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest);\n }\n componentDidUpdate(prevProps) {\n this.updateSizing();\n this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile);\n }\n componentWillUnmount() {\n this.scrollResponder.detach();\n if (this.props.onCoords) {\n this.props.onCoords(null);\n }\n }\n updateSizing() {\n let { props, context } = this;\n if (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 if (rootEl.offsetWidth) { // not hidden by css\n this.coords = new TimelineCoords(this.rootElRef.current, collectCellEls(this.cellElRefs.currentMap, props.tDateProfile.slotDates), props.dateProfile, props.tDateProfile, context.dateEnv, context.isRtl);\n if (props.onCoords) {\n props.onCoords(this.coords);\n }\n this.scrollResponder.update(false); // TODO: wouldn't have to do this if coords were in state\n }\n }\n }\n positionToHit(leftPosition) {\n let { outerCoordCache } = this.coords;\n let { dateEnv, isRtl } = this.context;\n let { tDateProfile } = this.props;\n let slatIndex = outerCoordCache.leftToIndex(leftPosition);\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(tDateProfile.slotDates[slatIndex], multiplyDuration(tDateProfile.snapDuration, localSnapIndex));\n let end = dateEnv.add(start, tDateProfile.snapDuration);\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],\n right: outerCoordCache.rights[slatIndex],\n };\n }\n return null;\n }\n}\nfunction collectCellEls(elMap, slotDates) {\n return slotDates.map((slotDate) => {\n let key = slotDate.toISOString();\n return elMap[key];\n });\n}\n\nfunction computeSegHCoords(segs, minWidth, timelineCoords) {\n let hcoords = [];\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 if (end - start < minWidth) {\n end = start + minWidth;\n }\n hcoords.push({ start, end });\n }\n }\n return hcoords;\n}\nfunction computeFgSegPlacements(segs, segHCoords, // might not have for every seg\neventInstanceHeights, // might not have for every seg\nmoreLinkHeights, // might not have for every more-link\nstrictOrder, maxStackCnt) {\n let segInputs = [];\n let crudePlacements = []; // when we don't know dims\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 if (height && hcoords) {\n segInputs.push({\n index: i,\n span: hcoords,\n thickness: height,\n });\n }\n else {\n crudePlacements.push({\n seg,\n hcoords,\n top: null,\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 let hiddenEntries = hierarchy.addSegs(segInputs);\n let hiddenPlacements = hiddenEntries.map((entry) => ({\n seg: segs[entry.index],\n hcoords: entry.span,\n top: null,\n }));\n let hiddenGroups = groupIntersectingEntries(hiddenEntries);\n let moreLinkInputs = [];\n let moreLinkCrudePlacements = [];\n const extractSeg = (entry) => segs[entry.index];\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 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,\n thickness: height,\n span: hiddenGroup.span,\n });\n }\n else {\n moreLinkCrudePlacements.push({\n seg: sortedSegs,\n hcoords: hiddenGroup.span,\n top: null,\n });\n }\n }\n // add more-links into the hierarchy, but don't limit\n hierarchy.maxStackCnt = -1;\n hierarchy.addSegs(moreLinkInputs);\n let visibleRects = hierarchy.toRects();\n let visiblePlacements = [];\n let maxHeight = 0;\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),\n hcoords: rect.span,\n top: rect.levelCoord,\n });\n maxHeight = Math.max(maxHeight, rect.levelCoord + rect.thickness);\n }\n return [\n visiblePlacements.concat(crudePlacements, hiddenPlacements, moreLinkCrudePlacements),\n maxHeight,\n ];\n}\n\nclass TimelineLaneBg extends BaseComponent {\n render() {\n let { props } = this;\n let highlightSeg = [].concat(props.eventResizeSegs, props.dateSelectionSegs);\n return props.timelineCoords && (createElement(\"div\", { className: \"fc-timeline-bg\" },\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 }\n renderSegs(segs, timelineCoords, fillType) {\n let { todayRange, nowDate } = this.props;\n let { isRtl } = this.context;\n let segHCoords = computeSegHCoords(segs, 0, timelineCoords);\n let children = segs.map((seg, i) => {\n let hcoords = segHCoords[i];\n let hStyle = coordsToCss(hcoords, isRtl);\n return (createElement(\"div\", { key: buildEventRangeKey(seg.eventRange), className: \"fc-timeline-bg-harness\", style: hStyle }, fillType === 'bg-event' ?\n createElement(BgEvent, Object.assign({ seg: seg }, getSegMeta(seg, todayRange, nowDate))) :\n renderFill(fillType)));\n });\n return createElement(Fragment, null, children);\n }\n}\n\nclass TimelineLaneSlicer extends Slicer {\n sliceRange(origRange, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {\n let normalRange = normalizeRange(origRange, tDateProfile, dateEnv);\n let segs = [];\n // protect against when the span is entirely in an invalid date region\n if (computeDateSnapCoverage(normalRange.start, tDateProfile, dateEnv)\n < computeDateSnapCoverage(normalRange.end, tDateProfile, dateEnv)) {\n // intersect the footprint's range with the grid's range\n let slicedRange = intersectRanges(normalRange, tDateProfile.normalizedRange);\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 return segs;\n }\n}\n\nconst DEFAULT_TIME_FORMAT = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'narrow',\n});\nclass TimelineEvent extends BaseComponent {\n render() {\n let { props } = this;\n return (createElement(StandardEvent, Object.assign({}, props, { elClasses: ['fc-timeline-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TIME_FORMAT, defaultDisplayEventTime: !props.isTimeScale })));\n }\n}\n\nclass TimelineLaneMoreLink extends BaseComponent {\n render() {\n let { props, context } = this;\n let { hiddenSegs, 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 return (createElement(MoreLinkContainer, { elRef: props.elRef, elClasses: ['fc-timeline-more-link'], elStyle: Object.assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle), allDayDate: null, moreCnt: hiddenSegs.length, allSegs: hiddenSegs, hiddenSegs: hiddenSegs, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: extraDateSpan, popoverContent: () => (createElement(Fragment, null, hiddenSegs.map((seg) => {\n let instanceId = seg.eventRange.instance.instanceId;\n return (createElement(\"div\", { key: instanceId, style: { visibility: props.isForcedInvisible[instanceId] ? 'hidden' : '' } },\n createElement(TimelineEvent, Object.assign({ isTimeScale: props.isTimeScale, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection }, getSegMeta(seg, props.todayRange, props.nowDate)))));\n }))) }, (InnerContent) => (createElement(InnerContent, { elTag: \"div\", elClasses: ['fc-timeline-more-link-inner', 'fc-sticky'] }))));\n }\n}\n\nclass TimelineLane extends BaseComponent {\n constructor() {\n super(...arguments);\n this.slicer = new TimelineLaneSlicer();\n this.sortEventSegs = memoize(sortEventSegs);\n this.harnessElRefs = new RefMap();\n this.moreElRefs = new RefMap();\n this.innerElRef = createRef();\n // TODO: memoize event positioning\n this.state = {\n eventInstanceHeights: {},\n moreLinkHeights: {},\n };\n this.handleResize = (isForced) => {\n if (isForced) {\n this.updateSize();\n }\n };\n }\n render() {\n let { props, state, context } = this;\n let { options } = context;\n let { dateProfile, tDateProfile } = props;\n let slicedProps = this.slicer.sliceProps(props, dateProfile, tDateProfile.isTimeScale ? null : props.nextDayThreshold, context, // wish we didn't have to pass in the rest of the args...\n dateProfile, context.dateProfileGenerator, tDateProfile, context.dateEnv);\n let mirrorSegs = (slicedProps.eventDrag ? slicedProps.eventDrag.segs : null) ||\n (slicedProps.eventResize ? slicedProps.eventResize.segs : null) ||\n [];\n let fgSegs = this.sortEventSegs(slicedProps.fgEventSegs, options.eventOrder);\n let fgSegHCoords = computeSegHCoords(fgSegs, options.eventMinWidth, props.timelineCoords);\n let [fgPlacements, fgHeight] = computeFgSegPlacements(fgSegs, fgSegHCoords, state.eventInstanceHeights, state.moreLinkHeights, options.eventOrderStrict, options.eventMaxStack);\n let isForcedInvisible = // TODO: more convenient\n (slicedProps.eventDrag ? slicedProps.eventDrag.affectedInstances : null) ||\n (slicedProps.eventResize ? slicedProps.eventResize.affectedInstances : null) ||\n {};\n return (createElement(Fragment, null,\n createElement(TimelineLaneBg, { businessHourSegs: slicedProps.businessHourSegs, bgEventSegs: slicedProps.bgEventSegs, timelineCoords: props.timelineCoords, eventResizeSegs: slicedProps.eventResize ? slicedProps.eventResize.segs : [] /* bad new empty array? */, dateSelectionSegs: slicedProps.dateSelectionSegs, nowDate: props.nowDate, todayRange: props.todayRange }),\n createElement(\"div\", { className: \"fc-timeline-events fc-scrollgrid-sync-inner\", ref: this.innerElRef, style: { height: fgHeight } },\n this.renderFgSegs(fgPlacements, isForcedInvisible, false, false, false),\n this.renderFgSegs(buildMirrorPlacements(mirrorSegs, props.timelineCoords, fgPlacements), {}, Boolean(slicedProps.eventDrag), Boolean(slicedProps.eventResize), false))));\n }\n componentDidMount() {\n this.updateSize();\n this.context.addResizeHandler(this.handleResize);\n }\n componentDidUpdate(prevProps, prevState) {\n if (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 componentWillUnmount() {\n this.context.removeResizeHandler(this.handleResize);\n }\n updateSize() {\n let { props } = this;\n let { timelineCoords } = props;\n const innerEl = this.innerElRef.current;\n if (props.onHeightChange) {\n props.onHeightChange(innerEl, false);\n }\n if (timelineCoords) {\n this.setState({\n eventInstanceHeights: mapHash(this.harnessElRefs.currentMap, (harnessEl) => (Math.round(harnessEl.getBoundingClientRect().height))),\n moreLinkHeights: mapHash(this.moreElRefs.currentMap, (moreEl) => (Math.round(moreEl.getBoundingClientRect().height))),\n }, () => {\n if (props.onHeightChange) {\n props.onHeightChange(innerEl, true);\n }\n });\n }\n // hack\n if (props.syncParentMinHeight) {\n innerEl.parentElement.style.minHeight = innerEl.style.height;\n }\n }\n renderFgSegs(segPlacements, isForcedInvisible, isDragging, isResizing, isDateSelecting) {\n let { harnessElRefs, moreElRefs, props, context } = this;\n let isMirror = isDragging || isResizing || isDateSelecting;\n return (createElement(Fragment, null, segPlacements.map((segPlacement) => {\n let { seg, hcoords, top } = segPlacement;\n if (Array.isArray(seg)) { // a more-link\n let isoStr = buildIsoString(computeEarliestSegStart(seg));\n return (createElement(TimelineLaneMoreLink, { key: 'm:' + isoStr /* \"m\" for \"more\" */, elRef: moreElRefs.createRef(isoStr), hiddenSegs: seg, placement: segPlacement, dateProfile: props.dateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isTimeScale: props.tDateProfile.isTimeScale, eventSelection: props.eventSelection, resourceId: props.resourceId, isForcedInvisible: isForcedInvisible }));\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 return (createElement(\"div\", { key: 'e:' + instanceId /* \"e\" for \"event\" */, ref: isMirror ? null : harnessElRefs.createRef(instanceId), className: \"fc-timeline-event-harness\", style: Object.assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle) },\n createElement(TimelineEvent, Object.assign({ isTimeScale: props.tDateProfile.isTimeScale, seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === props.eventSelection /* TODO: bad for mirror? */ }, getSegMeta(seg, props.todayRange, props.nowDate)))));\n })));\n }\n}\nTimelineLane.addStateEquality({\n eventInstanceHeights: isPropsEqual,\n moreLinkHeights: isPropsEqual,\n});\nfunction buildMirrorPlacements(mirrorSegs, timelineCoords, fgPlacements) {\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}\nfunction buildAbsoluteTopHash(placements) {\n let topsByInstanceId = {};\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 return topsByInstanceId;\n}\n\nclass TimelineGrid extends DateComponent {\n constructor() {\n super(...arguments);\n this.slatsRef = createRef();\n this.state = {\n coords: null,\n };\n this.handeEl = (el) => {\n if (el) {\n this.context.registerInteractiveComponent(this, { el });\n }\n else {\n this.context.unregisterInteractiveComponent(this);\n }\n };\n this.handleCoords = (coords) => {\n this.setState({ coords });\n if (this.props.onSlatCoords) {\n this.props.onSlatCoords(coords);\n }\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 return (createElement(\"div\", { className: \"fc-timeline-body\", ref: this.handeEl, style: {\n minWidth: props.tableMinWidth,\n height: props.clientHeight,\n width: props.clientWidth,\n } },\n createElement(NowTimer, { unit: timerUnit }, (nowDate, todayRange) => (createElement(Fragment, null,\n createElement(TimelineSlats, { ref: this.slatsRef, dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, todayRange: todayRange, clientWidth: props.clientWidth, tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, onCoords: this.handleCoords, onScrollLeftRequest: props.onScrollLeftRequest }),\n createElement(TimelineLane, { dateProfile: dateProfile, tDateProfile: props.tDateProfile, nowDate: nowDate, todayRange: todayRange, nextDayThreshold: options.nextDayThreshold, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, timelineCoords: state.coords, syncParentMinHeight: true }),\n (options.nowIndicator && state.coords && state.coords.isDateInRange(nowDate)) && (createElement(\"div\", { className: \"fc-timeline-now-indicator-container\" },\n createElement(NowIndicatorContainer, { elClasses: ['fc-timeline-now-indicator-line'], elStyle: coordToCss(state.coords.dateToCoord(nowDate), context.isRtl), isAxis: false, date: nowDate }))))))));\n }\n // Hit System\n // ------------------------------------------------------------------------------------------\n queryHit(positionLeft, positionTop, elWidth, elHeight) {\n let slats = this.slatsRef.current;\n let slatHit = slats.positionToHit(positionLeft);\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 return null;\n }\n}\n\nclass TimelineView extends DateComponent {\n constructor() {\n super(...arguments);\n this.buildTimelineDateProfile = memoize(buildTimelineDateProfile);\n this.scrollGridRef = createRef();\n this.state = {\n slatCoords: null,\n slotCushionMaxWidth: null,\n };\n this.handleSlatCoords = (slatCoords) => {\n this.setState({ slatCoords });\n };\n this.handleScrollLeftRequest = (scrollLeft) => {\n let scrollGrid = this.scrollGridRef.current;\n scrollGrid.forceScrollLeft(0, scrollLeft);\n };\n this.handleMaxCushionWidth = (slotCushionMaxWidth) => {\n this.setState({\n slotCushionMaxWidth: Math.ceil(slotCushionMaxWidth), // for less rerendering TODO: DRY\n });\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 let tDateProfile = this.buildTimelineDateProfile(props.dateProfile, context.dateEnv, options, context.dateProfileGenerator);\n let { slotMinWidth } = options;\n let slatCols = buildSlatCols(tDateProfile, slotMinWidth || this.computeFallbackSlotMinWidth(tDateProfile));\n let sections = [\n {\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunks: [{\n key: 'timeline',\n content: (contentArg) => (createElement(TimelineHeader, { dateProfile: props.dateProfile, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, slatCoords: state.slatCoords, onMaxCushionWidth: slotMinWidth ? null : this.handleMaxCushionWidth })),\n }],\n },\n {\n type: 'body',\n key: 'body',\n liquid: true,\n chunks: [{\n key: 'timeline',\n content: (contentArg) => (createElement(TimelineGrid, Object.assign({}, props, { clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, onSlatCoords: this.handleSlatCoords, onScrollLeftRequest: this.handleScrollLeftRequest }))),\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 return (createElement(ViewContainer, { elClasses: [\n 'fc-timeline',\n options.eventOverlap === false ?\n 'fc-timeline-overlap-disabled' :\n '',\n ], viewSpec: context.viewSpec },\n createElement(ScrollGrid, { ref: this.scrollGridRef, liquid: !props.isHeightAuto && !props.forPrint, forPrint: props.forPrint, collapsibleWidth: false, colGroups: [\n { cols: slatCols },\n ], sections: sections })));\n }\n computeFallbackSlotMinWidth(tDateProfile) {\n return Math.max(30, ((this.state.slotCushionMaxWidth || 0) / tDateProfile.slotsPerLabel));\n }\n}\nfunction buildSlatCols(tDateProfile, slotMinWidth) {\n return [{\n span: tDateProfile.slotCnt,\n minWidth: slotMinWidth || 1, // needs to be a non-zero number to trigger horizontal scrollbars!??????\n }];\n}\n\nexport { TimelineCoords, TimelineHeader, TimelineHeaderRows, TimelineLane, TimelineLaneBg, TimelineLaneSlicer, TimelineSlats, TimelineView, buildSlatCols, buildTimelineDateProfile, coordToCss, coordsToCss };\n"],"names":["injectStyles","config","MAX_TIMELINE_SLOTS","STOCK_SUB_DURATIONS","years","months","days","hours","minutes","seconds","milliseconds","buildTimelineDateProfile","dateProfile","dateEnv","allOptions","dateProfileGenerator","tDateProfile","labelInterval","slotLabelInterval","slotDuration","currentRange","countDurationsBetween","start","end","console","warn","slotsPerLabel","wholeDivideDurations","validateLabelAndSlot","ensureLabelInterval","input","trySlotDuration","createDuration","ensureSlotDuration","slotLabelFormat","rawFormats","Array","isArray","format1","format2","unit","greatestDurationDenominator","weekNumbersVisible","weekNumbers","format0","year","currentRangeAs","month","week","weekday","day","omitCommas","hour","minute","omitZeroMinute","meridiem","asRoughMinutes","params","padStart","date","asRoughSeconds","second","millisecond","concat","computeHeaderFormats","headerFormats","map","rawFormat","createFormatter","isTimeScale","Boolean","largeUnit","slotUnit","test","emphasizeWeeks","asCleanDays","businessHours","snapDuration","snapsPerSlot","rawSnapDuration","timeWindowMs","asRoughMs","slotMaxTime","slotMinTime","normalizedStart","normalizeDate","renderRange","normalizedEnd","add","addDays","normalizedRange","slotDates","isValidDate","push","snapIndex","snapDiff","snapDiffToIndex","snapIndexToDiff","snapCnt","slotCnt","isWeekStarts","prevWeekNumber","slotDate","weekNumber","computeWeekNumber","isWeekStart","buildIsWeekStarts","cellRows","formats","slotAsDays","guessedSlotUnit","rowUnitsFromFormats","format","getSmallestUnit","i","length","row","rowCells","leadingCell","isLastRow","isSuperRow","newCell","rowUnit","text","colspan","buildCellObject","isInt","weekStart","buildCellRows","normalDate","startOfDay","startOf","isHiddenDay","ms","valueOf","tryLabelInterval","range","res","diffWholeYears","diffWholeMonths","diffWholeDays","TimelineHeaderTh","BaseComponent","constructor","super","arguments","this","refineRenderProps","memoizeObjArg","buildCellNavLinkAttrs","memoize","render","props","context","options","cell","dateMeta","getDateMeta","todayRange","nowDate","renderProps","level","rowLevel","dateMarker","viewApi","createElement","ContentContainer","elTag","elClasses","getSlotClassNames","theme","getDayClassNames","elAttrs","colSpan","formatIso","omitTime","omitTimeZoneOffset","generatorName","customGenerator","slotLabelContent","defaultGenerator","renderInnerContent","classNameGenerator","slotLabelClassNames","didMount","slotLabelDidMount","willUnmount","slotLabelWillUnmount","InnerContent","className","style","height","rowInnerHeight","isSticky","cellDate","buildNavLinkAttrs","toDate","view","TimelineHeaderRows","rowInnerHeights","Fragment","isLast","isChrono","key","join","toISOString","TimelineCoords","slatRootEl","slatEls","isRtl","outerCoordCache","PositionCache","innerCoordCache","findDirectChildren","isDateInRange","rangeContainsMarker","dateToCoord","slotCoverage","computeDateSnapCoverage","slotIndex","Math","floor","min","partial","originClientRect","width","rights","getWidth","lefts","rangeToCoords","durationToCoord","duration","coord","activeRange","coordFromLeft","snapDiffInt","snapCoverage","ceil","coordToCss","hcoord","left","right","coordsToCss","hcoords","TimelineHeader","rootElRef","createRef","timerUnit","slatCoords","NowTimer","ref","minWidth","tableMinWidth","clientWidth","tableColGroupNode","nowIndicator","NowIndicatorContainer","elStyle","isAxis","componentDidMount","updateSize","componentDidUpdate","onMaxCushionWidth","computeMaxCushionWidth","max","findElements","current","el","getBoundingClientRect","TimelineSlatCell","isEm","Object","assign","elRef","isDay","slotLaneContent","slotLaneClassNames","slotLaneDidMount","slotLaneWillUnmount","TimelineSlatsBody","cellElRefs","TimelineSlats","RefMap","handleScrollRequest","request","onScrollLeftRequest","coords","time","getClass","updateSizing","scrollResponder","createScrollResponder","prevProps","update","componentWillUnmount","detach","onCoords","offsetWidth","elMap","currentMap","positionToHit","leftPosition","slatIndex","leftToIndex","slatWidth","localSnapIndex","multiplyDuration","dateSpan","allDay","dayEl","computeSegHCoords","segs","timelineCoords","seg","round","TimelineLaneBg","highlightSeg","eventResizeSegs","dateSelectionSegs","renderSegs","businessHourSegs","bgEventSegs","fillType","segHCoords","children","hStyle","buildEventRangeKey","eventRange","BgEvent","getSegMeta","renderFill","TimelineLaneSlicer","Slicer","sliceRange","origRange","normalRange","computeVisibleDayRange","dayRange","normalizeRange","slicedRange","intersectRanges","isStart","isEnd","addMs","DEFAULT_TIME_FORMAT","TimelineEvent","StandardEvent","defaultTimeFormat","defaultDisplayEventTime","TimelineLaneMoreLink","hiddenSegs","placement","resourceId","top","isVisible","extraDateSpan","MoreLinkContainer","visibility","allDayDate","moreCnt","allSegs","popoverContent","instanceId","instance","isForcedInvisible","isDragging","isResizing","isDateSelecting","isSelected","eventSelection","TimelineLane","slicer","sortEventSegs","harnessElRefs","moreElRefs","innerElRef","state","eventInstanceHeights","moreLinkHeights","handleResize","isForced","slicedProps","sliceProps","nextDayThreshold","mirrorSegs","eventDrag","eventResize","fgSegs","fgEventSegs","eventOrder","fgSegHCoords","eventMinWidth","fgPlacements","fgHeight","strictOrder","maxStackCnt","segInputs","crudePlacements","index","span","thickness","hierarchy","SegHierarchy","hiddenEntries","addSegs","hiddenPlacements","entry","hiddenGroups","groupIntersectingEntries","moreLinkInputs","moreLinkCrudePlacements","extractSeg","hiddenGroup","sortedSegs","entries","buildIsoString","computeEarliestSegStart","visibleRects","toRects","visiblePlacements","maxHeight","rect","segIndex","levelCoord","computeFgSegPlacements","eventOrderStrict","eventMaxStack","affectedInstances","renderFgSegs","topsByInstanceId","placements","buildAbsoluteTopHash","buildMirrorPlacements","addResizeHandler","prevState","eventStore","removeResizeHandler","innerEl","onHeightChange","setState","mapHash","harnessEl","moreEl","syncParentMinHeight","parentElement","minHeight","segPlacements","isMirror","segPlacement","isoStr","addStateEquality","isPropsEqual","TimelineGrid","DateComponent","slatsRef","handeEl","registerInteractiveComponent","unregisterInteractiveComponent","handleCoords","onSlatCoords","clientHeight","eventUiBases","dateSelection","queryHit","positionLeft","positionTop","elWidth","elHeight","slatHit","bottom","layer","TimelineView","scrollGridRef","slotCushionMaxWidth","handleSlatCoords","handleScrollLeftRequest","scrollLeft","forceScrollLeft","handleMaxCushionWidth","stickyHeaderDates","forPrint","getStickyHeaderDates","stickyFooterScrollbar","getStickyFooterScrollbar","slotMinWidth","slatCols","buildSlatCols","computeFallbackSlotMinWidth","sections","type","chunks","content","contentArg","liquid","renderScrollShim","ViewContainer","eventOverlap","viewSpec","ScrollGrid","isHeightAuto","collapsibleWidth","colGroups","cols"],"mappings":"olBAKAA,EADe,uiGAMfC,EAAOC,mBAAqB,IAE5B,MAAMC,GAAsB,CACxB,CAAEC,MAAO,GACT,CAAEC,OAAQ,GACV,CAAEC,KAAM,GACR,CAAEC,MAAO,GACT,CAAEC,QAAS,IACX,CAAEA,QAAS,IACX,CAAEA,QAAS,IACX,CAAEA,QAAS,GACX,CAAEA,QAAS,GACX,CAAEC,QAAS,IACX,CAAEA,QAAS,IACX,CAAEA,QAAS,IACX,CAAEA,QAAS,GACX,CAAEA,QAAS,GACX,CAAEC,aAAc,KAChB,CAAEA,aAAc,KAChB,CAAEA,aAAc,IAChB,CAAEA,aAAc,IAEpB,SAASC,GAAyBC,EAAaC,EAASC,EAAYC,GAChE,IAAIC,EAAe,CACfC,cAAeH,EAAWI,kBAC1BC,aAAcL,EAAWK,eAiJjC,SAA8BH,EAAcJ,EAAaC,GACrD,MAAMO,aAAEA,GAAiBR,EAEzB,GAAII,EAAaC,cAAe,CACXJ,EAAQQ,sBAAsBD,EAAaE,MAAOF,EAAaG,IAAKP,EAAaC,eACnFhB,EAAOC,qBAClBsB,QAAQC,KAAK,+CACbT,EAAaC,cAAgB,KAEpC,CAED,GAAID,EAAaG,aAAc,CACXN,EAAQQ,sBAAsBD,EAAaE,MAAOF,EAAaG,IAAKP,EAAaG,cACnFlB,EAAOC,qBACjBsB,QAAQC,KAAK,0CACbT,EAAaG,aAAe,KAEnC,CAED,GAAIH,EAAaC,eAAiBD,EAAaG,aAAc,CACzD,MAAMO,EAAgBC,EAAqBX,EAAaC,cA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UA,SAAUxU,EAAMwU,SAAUoB,kBAAkB,EAAOC,UAAW,CAC3J,CAAEC,KAAMjB,IACTG,SAAUA,IACxB,CACD,2BAAAD,CAA4Bvd,GACxB,OAAO4M,KAAK4C,IAAI,IAAMtH,KAAKsO,MAAMiG,qBAAuB,GAAKzc,EAAaU,cAC7E,EAEL,SAAS4c,GAActd,EAAcod,GACjC,MAAO,CAAC,CACArF,KAAM/X,EAAamF,QACnBwJ,SAAUyO,GAAgB,GAEtC"}
|
1
|
+
{"version":3,"file":"internal.js","sources":["../../../../../node_modules/@fullcalendar/timeline/internal.js"],"sourcesContent":["import { injectStyles, config, createFormatter, greatestDurationDenominator, asCleanDays, createDuration, wholeDivideDurations, asRoughMs, addDays, startOfDay, asRoughSeconds, asRoughMinutes, diffWholeDays, isInt, computeVisibleDayRange, padStart, BaseComponent, memoizeObjArg, memoize, getDateMeta, ContentContainer, getSlotClassNames, getDayClassNames, buildNavLinkAttrs, PositionCache, findDirectChildren, rangeContainsMarker, NowTimer, NowIndicatorContainer, findElements, RefMap, multiplyDuration, SegHierarchy, groupIntersectingEntries, buildIsoString, computeEarliestSegStart, buildEventRangeKey, BgEvent, getSegMeta, renderFill, Slicer, intersectRanges, addMs, StandardEvent, MoreLinkContainer, sortEventSegs, mapHash, isPropsEqual, DateComponent, getStickyHeaderDates, getStickyFooterScrollbar, ViewContainer, renderScrollShim } from '@fullcalendar/core/internal.js';\nimport { createElement, Fragment, createRef } from '@fullcalendar/core/preact.js';\nimport { ScrollGrid } from '@fullcalendar/scrollgrid/internal.js';\n\nvar css_248z = \".fc .fc-timeline-body{min-height:100%;position:relative;z-index:1}.fc .fc-timeline-slots{bottom:0;position:absolute;top:0;z-index:1}.fc .fc-timeline-slots>table{height:100%}.fc .fc-timeline-slot-minor{border-style:dotted}.fc .fc-timeline-slot-frame{align-items:center;display:flex;justify-content:center}.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame{justify-content:flex-start}.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame{overflow:hidden}.fc .fc-timeline-slot-cushion{padding:4px 5px;white-space:nowrap}.fc-direction-ltr .fc-timeline-slot{border-right:0!important}.fc-direction-rtl .fc-timeline-slot{border-left:0!important}.fc .fc-timeline-now-indicator-container{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:4}.fc .fc-timeline-now-indicator-arrow,.fc .fc-timeline-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;pointer-events:none;position:absolute;top:0}.fc .fc-timeline-now-indicator-arrow{border-left-color:transparent;border-right-color:transparent;border-width:6px 5px 0;margin:0 -6px}.fc .fc-timeline-now-indicator-line{border-width:0 0 0 1px;bottom:0;margin:0 -1px}.fc .fc-timeline-events{position:relative;width:0;z-index:3}.fc .fc-timeline-event-harness,.fc .fc-timeline-more-link{position:absolute;top:0}.fc-timeline-event{z-index:1}.fc-timeline-event.fc-event-mirror{z-index:2}.fc-timeline-event{align-items:center;border-radius:0;display:flex;font-size:var(--fc-small-font-size);margin-bottom:1px;padding:2px 1px;position:relative}.fc-timeline-event .fc-event-main{flex-grow:1;flex-shrink:1;min-width:0}.fc-timeline-event .fc-event-time{font-weight:700}.fc-timeline-event .fc-event-time,.fc-timeline-event .fc-event-title{padding:0 2px;white-space:nowrap}.fc-direction-ltr .fc-timeline-event.fc-event-end,.fc-direction-ltr .fc-timeline-more-link{margin-right:1px}.fc-direction-rtl .fc-timeline-event.fc-event-end,.fc-direction-rtl .fc-timeline-more-link{margin-left:1px}.fc-timeline-overlap-disabled .fc-timeline-event{margin-bottom:0;padding-bottom:5px;padding-top:5px}.fc-timeline-event:not(.fc-event-end):after,.fc-timeline-event:not(.fc-event-start):before{border-color:transparent #000;border-style:solid;border-width:5px;content:\\\"\\\";flex-grow:0;flex-shrink:0;height:0;margin:0 1px;opacity:.5;width:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after{border-left:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before{border-right:0}.fc-timeline-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;font-size:var(--fc-small-font-size);padding:1px}.fc-timeline-more-link-inner{display:inline-block;left:0;padding:2px;right:0}.fc .fc-timeline-bg{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:2}.fc .fc-timeline-bg .fc-non-business{z-index:1}.fc .fc-timeline-bg .fc-bg-event{z-index:2}.fc .fc-timeline-bg .fc-highlight{z-index:3}.fc .fc-timeline-bg-harness{bottom:0;position:absolute;top:0}\";\ninjectStyles(css_248z);\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// potential nice values for slot-duration and interval-duration\nconst STOCK_SUB_DURATIONS = [\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];\nfunction buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileGenerator) {\n let tDateProfile = {\n labelInterval: allOptions.slotLabelInterval,\n slotDuration: allOptions.slotDuration,\n };\n validateLabelAndSlot(tDateProfile, dateProfile, dateEnv); // validate after computed grid duration\n ensureLabelInterval(tDateProfile, dateProfile, dateEnv);\n ensureSlotDuration(tDateProfile, dateProfile, dateEnv);\n let input = allOptions.slotLabelFormat;\n let rawFormats = Array.isArray(input) ? input :\n (input != null) ? [input] :\n computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions);\n tDateProfile.headerFormats = rawFormats.map((rawFormat) => createFormatter(rawFormat));\n tDateProfile.isTimeScale = Boolean(tDateProfile.slotDuration.milliseconds);\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 tDateProfile.largeUnit = largeUnit;\n tDateProfile.emphasizeWeeks =\n asCleanDays(tDateProfile.slotDuration) === 1 &&\n currentRangeAs('weeks', dateProfile, dateEnv) >= 2 &&\n !allOptions.businessHours;\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 let rawSnapDuration = allOptions.snapDuration;\n let snapDuration;\n let snapsPerSlot;\n if (rawSnapDuration) {\n snapDuration = createDuration(rawSnapDuration);\n snapsPerSlot = wholeDivideDurations(tDateProfile.slotDuration, snapDuration);\n // ^ TODO: warning if not whole?\n }\n if (snapsPerSlot == null) {\n snapDuration = tDateProfile.slotDuration;\n snapsPerSlot = 1;\n }\n tDateProfile.snapDuration = snapDuration;\n tDateProfile.snapsPerSlot = snapsPerSlot;\n // more...\n let timeWindowMs = asRoughMs(dateProfile.slotMaxTime) - asRoughMs(dateProfile.slotMinTime);\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 // apply slotMinTime/slotMaxTime\n // TODO: View should be responsible.\n if (tDateProfile.isTimeScale) {\n normalizedStart = dateEnv.add(normalizedStart, dateProfile.slotMinTime);\n normalizedEnd = dateEnv.add(addDays(normalizedEnd, -1), dateProfile.slotMaxTime);\n }\n tDateProfile.timeWindowMs = timeWindowMs;\n tDateProfile.normalizedRange = { start: normalizedStart, end: normalizedEnd };\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 tDateProfile.slotDates = slotDates;\n // more...\n let snapIndex = -1;\n let snapDiff = 0; // index of the diff :(\n const snapDiffToIndex = [];\n const snapIndexToDiff = [];\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 }\n else {\n snapDiffToIndex.push(snapIndex + 0.5);\n }\n date = dateEnv.add(date, tDateProfile.snapDuration);\n snapDiff += 1;\n }\n tDateProfile.snapDiffToIndex = snapDiffToIndex;\n tDateProfile.snapIndexToDiff = snapIndexToDiff;\n tDateProfile.snapCnt = snapIndex + 1; // is always one behind\n tDateProfile.slotCnt = tDateProfile.snapCnt / tDateProfile.snapsPerSlot;\n // more...\n tDateProfile.isWeekStarts = buildIsWeekStarts(tDateProfile, dateEnv);\n tDateProfile.cellRows = buildCellRows(tDateProfile, dateEnv);\n tDateProfile.slotsPerLabel = wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration);\n return tDateProfile;\n}\n/*\nsnaps to appropriate unit\n*/\nfunction normalizeDate(date, tDateProfile, dateEnv) {\n let normalDate = date;\n if (!tDateProfile.isTimeScale) {\n normalDate = startOfDay(normalDate);\n if (tDateProfile.largeUnit) {\n normalDate = dateEnv.startOf(normalDate, tDateProfile.largeUnit);\n }\n }\n return normalDate;\n}\n/*\nsnaps to appropriate unit\n*/\nfunction normalizeRange(range, tDateProfile, dateEnv) {\n if (!tDateProfile.isTimeScale) {\n range = computeVisibleDayRange(range);\n if (tDateProfile.largeUnit) {\n let dayRange = range; // preserve original result\n range = {\n start: dateEnv.startOf(range.start, tDateProfile.largeUnit),\n end: dateEnv.startOf(range.end, tDateProfile.largeUnit),\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 return range;\n}\nfunction isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator) {\n if (dateProfileGenerator.isHiddenDay(date)) {\n return false;\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 return true;\n}\nfunction validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) {\n const { currentRange } = dateProfile;\n // make sure labelInterval doesn't exceed the max number of cells\n if (tDateProfile.labelInterval) {\n const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.labelInterval);\n if (labelCnt > config.MAX_TIMELINE_SLOTS) {\n console.warn('slotLabelInterval results in too many cells');\n tDateProfile.labelInterval = null;\n }\n }\n // make sure slotDuration doesn't exceed the maximum number of cells\n if (tDateProfile.slotDuration) {\n const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.slotDuration);\n if (slotCnt > config.MAX_TIMELINE_SLOTS) {\n console.warn('slotDuration results in too many cells');\n tDateProfile.slotDuration = null;\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}\nfunction ensureLabelInterval(tDateProfile, dateProfile, dateEnv) {\n const { currentRange } = dateProfile;\n let { labelInterval } = tDateProfile;\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 // use the slot duration as a last resort\n if (!labelInterval) {\n labelInterval = tDateProfile.slotDuration;\n }\n // compute based off the view's duration\n // find the largest label interval that yields the minimum number of labels\n }\n else {\n for (input of STOCK_SUB_DURATIONS) {\n labelInterval = createDuration(input);\n const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, labelInterval);\n if (labelCnt >= MIN_AUTO_LABELS) {\n break;\n }\n }\n }\n tDateProfile.labelInterval = labelInterval;\n }\n return labelInterval;\n}\nfunction ensureSlotDuration(tDateProfile, dateProfile, dateEnv) {\n const { currentRange } = dateProfile;\n let { slotDuration } = tDateProfile;\n if (!slotDuration) {\n const labelInterval = ensureLabelInterval(tDateProfile, dateProfile, dateEnv); // will compute if necessary\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 // only allow the value if it won't exceed the view's # of slots limit\n if (slotDuration) {\n const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, slotDuration);\n if (slotCnt > MAX_AUTO_CELLS) {\n slotDuration = null;\n }\n }\n // use the label interval as a last resort\n if (!slotDuration) {\n slotDuration = labelInterval;\n }\n tDateProfile.slotDuration = slotDuration;\n }\n return slotDuration;\n}\nfunction computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {\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 // NOTE: weekNumber computation function wont work\n if ((unit === 'week') && !weekNumbersVisible) {\n unit = 'day';\n }\n switch (unit) {\n case 'year':\n format0 = { year: 'numeric' }; // '2015'\n break;\n case 'month':\n if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n format0 = { year: 'numeric' }; // '2015'\n }\n format1 = { month: 'short' }; // 'Jan'\n break;\n case 'week':\n if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n format0 = { year: 'numeric' }; // '2015'\n }\n format1 = { week: 'narrow' }; // 'Wk4'\n break;\n case 'day':\n if (currentRangeAs('years', dateProfile, dateEnv) > 1) {\n format0 = { year: 'numeric', month: 'long' }; // 'January 2014'\n }\n else if (currentRangeAs('months', dateProfile, dateEnv) > 1) {\n format0 = { month: 'long' }; // 'January'\n }\n if (weekNumbersVisible) {\n format1 = { week: 'short' }; // 'Wk 4'\n }\n format2 = { weekday: 'narrow', day: 'numeric' }; // 'Su 9'\n break;\n case 'hour':\n if (weekNumbersVisible) {\n format0 = { week: 'short' }; // 'Wk 4'\n }\n if (currentRangeAs('days', dateProfile, dateEnv) > 1) {\n format1 = { weekday: 'short', day: 'numeric', month: 'numeric', omitCommas: true }; // Sat 4/7\n }\n format2 = {\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'short',\n };\n break;\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) => (':' + padStart(params.date.minute, 2) // ':30'\n );\n }\n else {\n format0 = {\n hour: 'numeric',\n minute: 'numeric',\n meridiem: 'short',\n };\n }\n break;\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) => (':' + padStart(params.date.second, 2) // ':30'\n );\n }\n else {\n format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'\n }\n break;\n case 'millisecond':\n format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'\n format1 = (params) => ('.' + padStart(params.millisecond, 3));\n break;\n }\n return [].concat(format0 || [], format1 || [], format2 || []);\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, dateProfile, dateEnv) {\n let range = dateProfile.currentRange;\n let res = null;\n if (unit === 'years') {\n res = dateEnv.diffWholeYears(range.start, range.end);\n }\n else if (unit === 'months') {\n res = dateEnv.diffWholeMonths(range.start, range.end);\n }\n else if (unit === 'weeks') {\n res = dateEnv.diffWholeMonths(range.start, range.end);\n }\n else if (unit === 'days') {\n res = diffWholeDays(range.start, range.end);\n }\n return res || 0;\n}\nfunction buildIsWeekStarts(tDateProfile, dateEnv) {\n let { slotDates, emphasizeWeeks } = tDateProfile;\n let prevWeekNumber = null;\n let isWeekStarts = [];\n for (let slotDate of slotDates) {\n let weekNumber = dateEnv.computeWeekNumber(slotDate);\n let isWeekStart = emphasizeWeeks && (prevWeekNumber !== null) && (prevWeekNumber !== weekNumber);\n prevWeekNumber = weekNumber;\n isWeekStarts.push(isWeekStart);\n }\n return isWeekStarts;\n}\nfunction buildCellRows(tDateProfile, 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 = slotAsDays === 7 ? 'week' :\n slotAsDays === 1 ? 'day' :\n null;\n // specifically for navclicks\n let rowUnitsFromFormats = formats.map((format) => (format.getSmallestUnit ? format.getSmallestUnit() : null));\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 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 if (isSuperRow) {\n let text = dateEnv.format(date, format);\n if (!leadingCell || (leadingCell.text !== text)) {\n newCell = buildCellObject(date, text, rowUnit);\n }\n else {\n leadingCell.colspan += 1;\n }\n }\n else if (!leadingCell ||\n isInt(dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.labelInterval))) {\n let text = dateEnv.format(date, format);\n newCell = buildCellObject(date, text, rowUnit);\n }\n else {\n leadingCell.colspan += 1;\n }\n if (newCell) {\n newCell.weekStart = isWeekStart;\n rowCells.push(newCell);\n }\n }\n }\n return cellRows;\n}\nfunction buildCellObject(date, text, rowUnit) {\n return { date, text, rowUnit, colspan: 1, isWeekStart: false };\n}\n\nclass TimelineHeaderTh extends BaseComponent {\n constructor() {\n super(...arguments);\n this.refineRenderProps = memoizeObjArg(refineRenderProps);\n this.buildCellNavLinkAttrs = memoize(buildCellNavLinkAttrs);\n }\n render() {\n let { props, context } = this;\n let { dateEnv, options } = context;\n let { cell, dateProfile, tDateProfile } = props;\n // the cell.rowUnit is f'd\n // giving 'month' for a 3-day view\n // workaround: to infer day, do NOT time\n let dateMeta = getDateMeta(cell.date, props.todayRange, props.nowDate, dateProfile);\n let renderProps = this.refineRenderProps({\n level: props.rowLevel,\n dateMarker: cell.date,\n text: cell.text,\n dateEnv: context.dateEnv,\n viewApi: context.viewApi,\n });\n return (createElement(ContentContainer, { elTag: \"th\", elClasses: [\n 'fc-timeline-slot',\n 'fc-timeline-slot-label',\n cell.isWeekStart && 'fc-timeline-slot-em',\n ...( // TODO: so slot classnames for week/month/bigger. see note above about rowUnit\n cell.rowUnit === 'time' ?\n getSlotClassNames(dateMeta, context.theme) :\n getDayClassNames(dateMeta, context.theme)),\n ], elAttrs: {\n colSpan: cell.colspan,\n 'data-date': dateEnv.formatIso(cell.date, {\n omitTime: !tDateProfile.isTimeScale,\n omitTimeZoneOffset: true,\n }),\n }, renderProps: renderProps, generatorName: \"slotLabelContent\", customGenerator: options.slotLabelContent, defaultGenerator: renderInnerContent, classNameGenerator: options.slotLabelClassNames, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-timeline-slot-frame\", style: { height: props.rowInnerHeight } },\n createElement(InnerContent, { elTag: \"a\", elClasses: [\n 'fc-timeline-slot-cushion',\n 'fc-scrollgrid-sync-inner',\n props.isSticky && 'fc-sticky',\n ], elAttrs: this.buildCellNavLinkAttrs(context, cell.date, cell.rowUnit) })))));\n }\n}\nfunction buildCellNavLinkAttrs(context, cellDate, rowUnit) {\n return (rowUnit && rowUnit !== 'time')\n ? buildNavLinkAttrs(context, cellDate, rowUnit)\n : {};\n}\nfunction renderInnerContent(renderProps) {\n return renderProps.text;\n}\nfunction refineRenderProps(input) {\n return {\n level: input.level,\n date: input.dateEnv.toDate(input.dateMarker),\n view: input.viewApi,\n text: input.text,\n };\n}\n\nclass TimelineHeaderRows extends BaseComponent {\n render() {\n let { dateProfile, tDateProfile, rowInnerHeights, todayRange, nowDate } = this.props;\n let { cellRows } = tDateProfile;\n return (createElement(Fragment, null, 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 return ( // eslint-disable-next-line react/no-array-index-key\n createElement(\"tr\", { key: rowLevel, className: classNames.join(' ') }, rowCells.map((cell) => (createElement(TimelineHeaderTh, { key: cell.date.toISOString(), cell: cell, rowLevel: rowLevel, dateProfile: dateProfile, tDateProfile: tDateProfile, todayRange: todayRange, nowDate: nowDate, rowInnerHeight: rowInnerHeights && rowInnerHeights[rowLevel], isSticky: !isLast })))));\n })));\n }\n}\n\nclass TimelineCoords {\n constructor(slatRootEl, // okay to expose?\n slatEls, dateProfile, tDateProfile, dateEnv, isRtl) {\n this.slatRootEl = slatRootEl;\n this.dateProfile = dateProfile;\n this.tDateProfile = tDateProfile;\n this.dateEnv = dateEnv;\n this.isRtl = isRtl;\n this.outerCoordCache = new PositionCache(slatRootEl, slatEls, true, // isHorizontal\n false);\n // for the inner divs within the slats\n // used for event rendering and scrollTime, to disregard slat border\n this.innerCoordCache = new PositionCache(slatRootEl, findDirectChildren(slatEls, 'div'), true, // isHorizontal\n false);\n }\n isDateInRange(date) {\n return rangeContainsMarker(this.dateProfile.currentRange, date);\n }\n // results range from negative width of area to 0\n dateToCoord(date) {\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 if (this.isRtl) {\n return outerCoordCache.originClientRect.width - (outerCoordCache.rights[slotIndex] -\n (innerCoordCache.getWidth(slotIndex) * partial));\n }\n return (outerCoordCache.lefts[slotIndex] +\n (innerCoordCache.getWidth(slotIndex) * partial));\n }\n rangeToCoords(range) {\n return {\n start: this.dateToCoord(range.start),\n end: this.dateToCoord(range.end),\n };\n }\n durationToCoord(duration) {\n let { dateProfile, tDateProfile, dateEnv, isRtl } = this;\n let coord = 0;\n if (dateProfile) {\n let date = dateEnv.add(dateProfile.activeRange.start, duration);\n if (!tDateProfile.isTimeScale) {\n date = startOfDay(date);\n }\n coord = this.dateToCoord(date);\n // hack to overcome the left borders of non-first slat\n if (!isRtl && coord) {\n coord += 1;\n }\n }\n return coord;\n }\n coordFromLeft(coord) {\n if (this.isRtl) {\n return this.outerCoordCache.originClientRect.width - coord;\n }\n return coord;\n }\n // returned value is between 0 and the number of snaps\n computeDateSnapCoverage(date) {\n return computeDateSnapCoverage(date, this.tDateProfile, this.dateEnv);\n }\n}\n// returned value is between 0 and the number of snaps\nfunction computeDateSnapCoverage(date, tDateProfile, dateEnv) {\n let snapDiff = dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.snapDuration);\n if (snapDiff < 0) {\n return 0;\n }\n if (snapDiff >= tDateProfile.snapDiffToIndex.length) {\n return tDateProfile.snapCnt;\n }\n let snapDiffInt = Math.floor(snapDiff);\n let snapCoverage = tDateProfile.snapDiffToIndex[snapDiffInt];\n if (isInt(snapCoverage)) { // not an in-between value\n snapCoverage += snapDiff - snapDiffInt; // add the remainder\n }\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 return snapCoverage;\n}\nfunction coordToCss(hcoord, isRtl) {\n if (hcoord === null) {\n return { left: '', right: '' };\n }\n if (isRtl) {\n return { right: hcoord, left: '' };\n }\n return { left: hcoord, right: '' };\n}\nfunction coordsToCss(hcoords, isRtl) {\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\nclass TimelineHeader extends BaseComponent {\n constructor() {\n super(...arguments);\n this.rootElRef = createRef();\n }\n render() {\n let { props, context } = this;\n // TODO: very repetitive\n // TODO: make part of tDateProfile?\n let timerUnit = greatestDurationDenominator(props.tDateProfile.slotDuration).unit;\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 return (createElement(NowTimer, { unit: timerUnit }, (nowDate, todayRange) => (createElement(\"div\", { className: \"fc-timeline-header\", ref: this.rootElRef },\n createElement(\"table\", { \"aria-hidden\": true, className: \"fc-scrollgrid-sync-table\", style: { minWidth: props.tableMinWidth, width: props.clientWidth } },\n props.tableColGroupNode,\n createElement(\"tbody\", null,\n createElement(TimelineHeaderRows, { dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: nowDate, todayRange: todayRange, rowInnerHeights: props.rowInnerHeights }))),\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 createElement(\"div\", { className: \"fc-timeline-now-indicator-container\" }, (slatCoords && slatCoords.isDateInRange(nowDate)) && (createElement(NowIndicatorContainer, { elClasses: ['fc-timeline-now-indicator-arrow'], elStyle: coordToCss(slatCoords.dateToCoord(nowDate), context.isRtl), isAxis: true, date: nowDate }))))))));\n }\n componentDidMount() {\n this.updateSize();\n }\n componentDidUpdate() {\n this.updateSize();\n }\n updateSize() {\n if (this.props.onMaxCushionWidth) {\n this.props.onMaxCushionWidth(this.computeMaxCushionWidth());\n }\n }\n computeMaxCushionWidth() {\n return Math.max(...findElements(this.rootElRef.current, '.fc-timeline-header-row:last-child .fc-timeline-slot-cushion').map((el) => el.getBoundingClientRect().width));\n }\n}\n\nclass TimelineSlatCell extends BaseComponent {\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 renderProps = Object.assign(Object.assign({ date: dateEnv.toDate(props.date) }, dateMeta), { view: context.viewApi });\n return (createElement(ContentContainer, { elTag: \"td\", elRef: props.elRef, elClasses: [\n 'fc-timeline-slot',\n 'fc-timeline-slot-lane',\n isEm && 'fc-timeline-slot-em',\n tDateProfile.isTimeScale ? (isInt(dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, props.date, tDateProfile.labelInterval)) ?\n 'fc-timeline-slot-major' :\n 'fc-timeline-slot-minor') : '',\n ...(props.isDay ?\n getDayClassNames(dateMeta, theme) :\n getSlotClassNames(dateMeta, theme)),\n ], elAttrs: {\n 'data-date': dateEnv.formatIso(date, {\n omitTimeZoneOffset: true,\n omitTime: !tDateProfile.isTimeScale,\n }),\n }, renderProps: renderProps, generatorName: \"slotLaneContent\", customGenerator: options.slotLaneContent, classNameGenerator: options.slotLaneClassNames, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }, (InnerContent) => (createElement(InnerContent, { elTag: \"div\" }))));\n }\n}\n\nclass TimelineSlatsBody extends BaseComponent {\n render() {\n let { props } = this;\n let { tDateProfile, cellElRefs } = props;\n let { slotDates, isWeekStarts } = tDateProfile;\n let isDay = !tDateProfile.isTimeScale && !tDateProfile.largeUnit;\n return (createElement(\"tbody\", null,\n createElement(\"tr\", null, slotDates.map((slotDate, i) => {\n let key = slotDate.toISOString();\n return (createElement(TimelineSlatCell, { key: key, elRef: cellElRefs.createRef(key), date: slotDate, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isEm: isWeekStarts[i], isDay: isDay }));\n }))));\n }\n}\n\nclass TimelineSlats extends BaseComponent {\n constructor() {\n super(...arguments);\n this.rootElRef = createRef();\n this.cellElRefs = new RefMap();\n this.handleScrollRequest = (request) => {\n let { onScrollLeftRequest } = this.props;\n let { coords } = this;\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 return null; // best?\n };\n }\n render() {\n let { props, context } = this;\n return (createElement(\"div\", { className: \"fc-timeline-slots\", ref: this.rootElRef },\n createElement(\"table\", { \"aria-hidden\": true, className: context.theme.getClass('table'), style: {\n minWidth: props.tableMinWidth,\n width: props.clientWidth,\n } },\n props.tableColGroupNode,\n createElement(TimelineSlatsBody, { cellElRefs: this.cellElRefs, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange }))));\n }\n componentDidMount() {\n this.updateSizing();\n this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest);\n }\n componentDidUpdate(prevProps) {\n this.updateSizing();\n this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile);\n }\n componentWillUnmount() {\n this.scrollResponder.detach();\n if (this.props.onCoords) {\n this.props.onCoords(null);\n }\n }\n updateSizing() {\n let { props, context } = this;\n if (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 if (rootEl.offsetWidth) { // not hidden by css\n this.coords = new TimelineCoords(this.rootElRef.current, collectCellEls(this.cellElRefs.currentMap, props.tDateProfile.slotDates), props.dateProfile, props.tDateProfile, context.dateEnv, context.isRtl);\n if (props.onCoords) {\n props.onCoords(this.coords);\n }\n this.scrollResponder.update(false); // TODO: wouldn't have to do this if coords were in state\n }\n }\n }\n positionToHit(leftPosition) {\n let { outerCoordCache } = this.coords;\n let { dateEnv, isRtl } = this.context;\n let { tDateProfile } = this.props;\n let slatIndex = outerCoordCache.leftToIndex(leftPosition);\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(tDateProfile.slotDates[slatIndex], multiplyDuration(tDateProfile.snapDuration, localSnapIndex));\n let end = dateEnv.add(start, tDateProfile.snapDuration);\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],\n right: outerCoordCache.rights[slatIndex],\n };\n }\n return null;\n }\n}\nfunction collectCellEls(elMap, slotDates) {\n return slotDates.map((slotDate) => {\n let key = slotDate.toISOString();\n return elMap[key];\n });\n}\n\nfunction computeSegHCoords(segs, minWidth, timelineCoords) {\n let hcoords = [];\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 if (end - start < minWidth) {\n end = start + minWidth;\n }\n hcoords.push({ start, end });\n }\n }\n return hcoords;\n}\nfunction computeFgSegPlacements(segs, segHCoords, // might not have for every seg\neventInstanceHeights, // might not have for every seg\nmoreLinkHeights, // might not have for every more-link\nstrictOrder, maxStackCnt) {\n let segInputs = [];\n let crudePlacements = []; // when we don't know dims\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 if (height && hcoords) {\n segInputs.push({\n index: i,\n span: hcoords,\n thickness: height,\n });\n }\n else {\n crudePlacements.push({\n seg,\n hcoords,\n top: null,\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 let hiddenEntries = hierarchy.addSegs(segInputs);\n let hiddenPlacements = hiddenEntries.map((entry) => ({\n seg: segs[entry.index],\n hcoords: entry.span,\n top: null,\n }));\n let hiddenGroups = groupIntersectingEntries(hiddenEntries);\n let moreLinkInputs = [];\n let moreLinkCrudePlacements = [];\n const extractSeg = (entry) => segs[entry.index];\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 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,\n thickness: height,\n span: hiddenGroup.span,\n });\n }\n else {\n moreLinkCrudePlacements.push({\n seg: sortedSegs,\n hcoords: hiddenGroup.span,\n top: null,\n });\n }\n }\n // add more-links into the hierarchy, but don't limit\n hierarchy.maxStackCnt = -1;\n hierarchy.addSegs(moreLinkInputs);\n let visibleRects = hierarchy.toRects();\n let visiblePlacements = [];\n let maxHeight = 0;\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),\n hcoords: rect.span,\n top: rect.levelCoord,\n });\n maxHeight = Math.max(maxHeight, rect.levelCoord + rect.thickness);\n }\n return [\n visiblePlacements.concat(crudePlacements, hiddenPlacements, moreLinkCrudePlacements),\n maxHeight,\n ];\n}\n\nclass TimelineLaneBg extends BaseComponent {\n render() {\n let { props } = this;\n let highlightSeg = [].concat(props.eventResizeSegs, props.dateSelectionSegs);\n return props.timelineCoords && (createElement(\"div\", { className: \"fc-timeline-bg\" },\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 }\n renderSegs(segs, timelineCoords, fillType) {\n let { todayRange, nowDate } = this.props;\n let { isRtl } = this.context;\n let segHCoords = computeSegHCoords(segs, 0, timelineCoords);\n let children = segs.map((seg, i) => {\n let hcoords = segHCoords[i];\n let hStyle = coordsToCss(hcoords, isRtl);\n return (createElement(\"div\", { key: buildEventRangeKey(seg.eventRange), className: \"fc-timeline-bg-harness\", style: hStyle }, fillType === 'bg-event' ?\n createElement(BgEvent, Object.assign({ seg: seg }, getSegMeta(seg, todayRange, nowDate))) :\n renderFill(fillType)));\n });\n return createElement(Fragment, null, children);\n }\n}\n\nclass TimelineLaneSlicer extends Slicer {\n sliceRange(origRange, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {\n let normalRange = normalizeRange(origRange, tDateProfile, dateEnv);\n let segs = [];\n // protect against when the span is entirely in an invalid date region\n if (computeDateSnapCoverage(normalRange.start, tDateProfile, dateEnv)\n < computeDateSnapCoverage(normalRange.end, tDateProfile, dateEnv)) {\n // intersect the footprint's range with the grid's range\n let slicedRange = intersectRanges(normalRange, tDateProfile.normalizedRange);\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 return segs;\n }\n}\n\nconst DEFAULT_TIME_FORMAT = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'narrow',\n});\nclass TimelineEvent extends BaseComponent {\n render() {\n let { props } = this;\n return (createElement(StandardEvent, Object.assign({}, props, { elClasses: ['fc-timeline-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TIME_FORMAT, defaultDisplayEventTime: !props.isTimeScale })));\n }\n}\n\nclass TimelineLaneMoreLink extends BaseComponent {\n render() {\n let { props, context } = this;\n let { hiddenSegs, 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 return (createElement(MoreLinkContainer, { elRef: props.elRef, elClasses: ['fc-timeline-more-link'], elStyle: Object.assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle), allDayDate: null, moreCnt: hiddenSegs.length, allSegs: hiddenSegs, hiddenSegs: hiddenSegs, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: extraDateSpan, popoverContent: () => (createElement(Fragment, null, hiddenSegs.map((seg) => {\n let instanceId = seg.eventRange.instance.instanceId;\n return (createElement(\"div\", { key: instanceId, style: { visibility: props.isForcedInvisible[instanceId] ? 'hidden' : '' } },\n createElement(TimelineEvent, Object.assign({ isTimeScale: props.isTimeScale, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection }, getSegMeta(seg, props.todayRange, props.nowDate)))));\n }))) }, (InnerContent) => (createElement(InnerContent, { elTag: \"div\", elClasses: ['fc-timeline-more-link-inner', 'fc-sticky'] }))));\n }\n}\n\nclass TimelineLane extends BaseComponent {\n constructor() {\n super(...arguments);\n this.slicer = new TimelineLaneSlicer();\n this.sortEventSegs = memoize(sortEventSegs);\n this.harnessElRefs = new RefMap();\n this.moreElRefs = new RefMap();\n this.innerElRef = createRef();\n // TODO: memoize event positioning\n this.state = {\n eventInstanceHeights: {},\n moreLinkHeights: {},\n };\n this.handleResize = (isForced) => {\n if (isForced) {\n this.updateSize();\n }\n };\n }\n render() {\n let { props, state, context } = this;\n let { options } = context;\n let { dateProfile, tDateProfile } = props;\n let slicedProps = this.slicer.sliceProps(props, dateProfile, tDateProfile.isTimeScale ? null : props.nextDayThreshold, context, // wish we didn't have to pass in the rest of the args...\n dateProfile, context.dateProfileGenerator, tDateProfile, context.dateEnv);\n let mirrorSegs = (slicedProps.eventDrag ? slicedProps.eventDrag.segs : null) ||\n (slicedProps.eventResize ? slicedProps.eventResize.segs : null) ||\n [];\n let fgSegs = this.sortEventSegs(slicedProps.fgEventSegs, options.eventOrder);\n let fgSegHCoords = computeSegHCoords(fgSegs, options.eventMinWidth, props.timelineCoords);\n let [fgPlacements, fgHeight] = computeFgSegPlacements(fgSegs, fgSegHCoords, state.eventInstanceHeights, state.moreLinkHeights, options.eventOrderStrict, options.eventMaxStack);\n let isForcedInvisible = // TODO: more convenient\n (slicedProps.eventDrag ? slicedProps.eventDrag.affectedInstances : null) ||\n (slicedProps.eventResize ? slicedProps.eventResize.affectedInstances : null) ||\n {};\n return (createElement(Fragment, null,\n createElement(TimelineLaneBg, { businessHourSegs: slicedProps.businessHourSegs, bgEventSegs: slicedProps.bgEventSegs, timelineCoords: props.timelineCoords, eventResizeSegs: slicedProps.eventResize ? slicedProps.eventResize.segs : [] /* bad new empty array? */, dateSelectionSegs: slicedProps.dateSelectionSegs, nowDate: props.nowDate, todayRange: props.todayRange }),\n createElement(\"div\", { className: \"fc-timeline-events fc-scrollgrid-sync-inner\", ref: this.innerElRef, style: { height: fgHeight } },\n this.renderFgSegs(fgPlacements, isForcedInvisible, false, false, false),\n this.renderFgSegs(buildMirrorPlacements(mirrorSegs, props.timelineCoords, fgPlacements), {}, Boolean(slicedProps.eventDrag), Boolean(slicedProps.eventResize), false))));\n }\n componentDidMount() {\n this.updateSize();\n this.context.addResizeHandler(this.handleResize);\n }\n componentDidUpdate(prevProps, prevState) {\n if (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 componentWillUnmount() {\n this.context.removeResizeHandler(this.handleResize);\n }\n updateSize() {\n let { props } = this;\n let { timelineCoords } = props;\n const innerEl = this.innerElRef.current;\n if (props.onHeightChange) {\n props.onHeightChange(innerEl, false);\n }\n if (timelineCoords) {\n this.setState({\n eventInstanceHeights: mapHash(this.harnessElRefs.currentMap, (harnessEl) => (Math.round(harnessEl.getBoundingClientRect().height))),\n moreLinkHeights: mapHash(this.moreElRefs.currentMap, (moreEl) => (Math.round(moreEl.getBoundingClientRect().height))),\n }, () => {\n if (props.onHeightChange) {\n props.onHeightChange(innerEl, true);\n }\n });\n }\n // hack\n if (props.syncParentMinHeight) {\n innerEl.parentElement.style.minHeight = innerEl.style.height;\n }\n }\n renderFgSegs(segPlacements, isForcedInvisible, isDragging, isResizing, isDateSelecting) {\n let { harnessElRefs, moreElRefs, props, context } = this;\n let isMirror = isDragging || isResizing || isDateSelecting;\n return (createElement(Fragment, null, segPlacements.map((segPlacement) => {\n let { seg, hcoords, top } = segPlacement;\n if (Array.isArray(seg)) { // a more-link\n let isoStr = buildIsoString(computeEarliestSegStart(seg));\n return (createElement(TimelineLaneMoreLink, { key: 'm:' + isoStr /* \"m\" for \"more\" */, elRef: moreElRefs.createRef(isoStr), hiddenSegs: seg, placement: segPlacement, dateProfile: props.dateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isTimeScale: props.tDateProfile.isTimeScale, eventSelection: props.eventSelection, resourceId: props.resourceId, isForcedInvisible: isForcedInvisible }));\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 return (createElement(\"div\", { key: 'e:' + instanceId /* \"e\" for \"event\" */, ref: isMirror ? null : harnessElRefs.createRef(instanceId), className: \"fc-timeline-event-harness\", style: Object.assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle) },\n createElement(TimelineEvent, Object.assign({ isTimeScale: props.tDateProfile.isTimeScale, seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === props.eventSelection /* TODO: bad for mirror? */ }, getSegMeta(seg, props.todayRange, props.nowDate)))));\n })));\n }\n}\nTimelineLane.addStateEquality({\n eventInstanceHeights: isPropsEqual,\n moreLinkHeights: isPropsEqual,\n});\nfunction buildMirrorPlacements(mirrorSegs, timelineCoords, fgPlacements) {\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}\nfunction buildAbsoluteTopHash(placements) {\n let topsByInstanceId = {};\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 return topsByInstanceId;\n}\n\nclass TimelineGrid extends DateComponent {\n constructor() {\n super(...arguments);\n this.slatsRef = createRef();\n this.state = {\n coords: null,\n };\n this.handeEl = (el) => {\n if (el) {\n this.context.registerInteractiveComponent(this, { el });\n }\n else {\n this.context.unregisterInteractiveComponent(this);\n }\n };\n this.handleCoords = (coords) => {\n this.setState({ coords });\n if (this.props.onSlatCoords) {\n this.props.onSlatCoords(coords);\n }\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 return (createElement(\"div\", { className: \"fc-timeline-body\", ref: this.handeEl, style: {\n minWidth: props.tableMinWidth,\n height: props.clientHeight,\n width: props.clientWidth,\n } },\n createElement(NowTimer, { unit: timerUnit }, (nowDate, todayRange) => (createElement(Fragment, null,\n createElement(TimelineSlats, { ref: this.slatsRef, dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, todayRange: todayRange, clientWidth: props.clientWidth, tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, onCoords: this.handleCoords, onScrollLeftRequest: props.onScrollLeftRequest }),\n createElement(TimelineLane, { dateProfile: dateProfile, tDateProfile: props.tDateProfile, nowDate: nowDate, todayRange: todayRange, nextDayThreshold: options.nextDayThreshold, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, timelineCoords: state.coords, syncParentMinHeight: true }),\n (options.nowIndicator && state.coords && state.coords.isDateInRange(nowDate)) && (createElement(\"div\", { className: \"fc-timeline-now-indicator-container\" },\n createElement(NowIndicatorContainer, { elClasses: ['fc-timeline-now-indicator-line'], elStyle: coordToCss(state.coords.dateToCoord(nowDate), context.isRtl), isAxis: false, date: nowDate }))))))));\n }\n // Hit System\n // ------------------------------------------------------------------------------------------\n queryHit(positionLeft, positionTop, elWidth, elHeight) {\n let slats = this.slatsRef.current;\n let slatHit = slats.positionToHit(positionLeft);\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 return null;\n }\n}\n\nclass TimelineView extends DateComponent {\n constructor() {\n super(...arguments);\n this.buildTimelineDateProfile = memoize(buildTimelineDateProfile);\n this.scrollGridRef = createRef();\n this.state = {\n slatCoords: null,\n slotCushionMaxWidth: null,\n };\n this.handleSlatCoords = (slatCoords) => {\n this.setState({ slatCoords });\n };\n this.handleScrollLeftRequest = (scrollLeft) => {\n let scrollGrid = this.scrollGridRef.current;\n scrollGrid.forceScrollLeft(0, scrollLeft);\n };\n this.handleMaxCushionWidth = (slotCushionMaxWidth) => {\n this.setState({\n slotCushionMaxWidth: Math.ceil(slotCushionMaxWidth), // for less rerendering TODO: DRY\n });\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 let tDateProfile = this.buildTimelineDateProfile(props.dateProfile, context.dateEnv, options, context.dateProfileGenerator);\n let { slotMinWidth } = options;\n let slatCols = buildSlatCols(tDateProfile, slotMinWidth || this.computeFallbackSlotMinWidth(tDateProfile));\n let sections = [\n {\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunks: [{\n key: 'timeline',\n content: (contentArg) => (createElement(TimelineHeader, { dateProfile: props.dateProfile, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, slatCoords: state.slatCoords, onMaxCushionWidth: slotMinWidth ? null : this.handleMaxCushionWidth })),\n }],\n },\n {\n type: 'body',\n key: 'body',\n liquid: true,\n chunks: [{\n key: 'timeline',\n content: (contentArg) => (createElement(TimelineGrid, Object.assign({}, props, { clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, onSlatCoords: this.handleSlatCoords, onScrollLeftRequest: this.handleScrollLeftRequest }))),\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 return (createElement(ViewContainer, { elClasses: [\n 'fc-timeline',\n options.eventOverlap === false ?\n 'fc-timeline-overlap-disabled' :\n '',\n ], viewSpec: context.viewSpec },\n createElement(ScrollGrid, { ref: this.scrollGridRef, liquid: !props.isHeightAuto && !props.forPrint, forPrint: props.forPrint, collapsibleWidth: false, colGroups: [\n { cols: slatCols },\n ], sections: sections })));\n }\n computeFallbackSlotMinWidth(tDateProfile) {\n return Math.max(30, ((this.state.slotCushionMaxWidth || 0) / tDateProfile.slotsPerLabel));\n }\n}\nfunction buildSlatCols(tDateProfile, slotMinWidth) {\n return [{\n span: tDateProfile.slotCnt,\n minWidth: slotMinWidth || 1, // needs to be a non-zero number to trigger horizontal scrollbars!??????\n }];\n}\n\nexport { TimelineCoords, TimelineHeader, TimelineHeaderRows, TimelineLane, TimelineLaneBg, TimelineLaneSlicer, TimelineSlats, TimelineView, buildSlatCols, buildTimelineDateProfile, coordToCss, coordsToCss };\n"],"names":["injectStyles","config","MAX_TIMELINE_SLOTS","STOCK_SUB_DURATIONS","years","months","days","hours","minutes","seconds","milliseconds","buildTimelineDateProfile","dateProfile","dateEnv","allOptions","dateProfileGenerator","tDateProfile","labelInterval","slotLabelInterval","slotDuration","currentRange","countDurationsBetween","start","end","console","warn","slotsPerLabel","wholeDivideDurations","validateLabelAndSlot","ensureLabelInterval","input","trySlotDuration","createDuration","ensureSlotDuration","slotLabelFormat","rawFormats","Array","isArray","format1","format2","unit","greatestDurationDenominator","weekNumbersVisible","weekNumbers","format0","year","currentRangeAs","month","week","weekday","day","omitCommas","hour","minute","omitZeroMinute","meridiem","asRoughMinutes","params","padStart","date","asRoughSeconds","second","millisecond","concat","computeHeaderFormats","headerFormats","map","rawFormat","createFormatter","isTimeScale","Boolean","largeUnit","slotUnit","test","emphasizeWeeks","asCleanDays","businessHours","snapDuration","snapsPerSlot","rawSnapDuration","timeWindowMs","asRoughMs","slotMaxTime","slotMinTime","normalizedStart","normalizeDate","renderRange","normalizedEnd","add","addDays","normalizedRange","slotDates","isValidDate","push","snapIndex","snapDiff","snapDiffToIndex","snapIndexToDiff","snapCnt","slotCnt","isWeekStarts","prevWeekNumber","slotDate","weekNumber","computeWeekNumber","isWeekStart","buildIsWeekStarts","cellRows","formats","slotAsDays","guessedSlotUnit","rowUnitsFromFormats","format","getSmallestUnit","i","length","row","rowCells","leadingCell","isLastRow","isSuperRow","newCell","rowUnit","text","colspan","buildCellObject","isInt","weekStart","buildCellRows","normalDate","startOfDay","startOf","isHiddenDay","ms","valueOf","tryLabelInterval","range","res","diffWholeYears","diffWholeMonths","diffWholeDays","TimelineHeaderTh","BaseComponent","constructor","super","arguments","this","refineRenderProps","memoizeObjArg","buildCellNavLinkAttrs","memoize","render","props","context","options","cell","dateMeta","getDateMeta","todayRange","nowDate","renderProps","level","rowLevel","dateMarker","viewApi","createElement","ContentContainer","elTag","elClasses","getSlotClassNames","theme","getDayClassNames","elAttrs","colSpan","formatIso","omitTime","omitTimeZoneOffset","generatorName","customGenerator","slotLabelContent","defaultGenerator","renderInnerContent","classNameGenerator","slotLabelClassNames","didMount","slotLabelDidMount","willUnmount","slotLabelWillUnmount","InnerContent","className","style","height","rowInnerHeight","isSticky","cellDate","buildNavLinkAttrs","toDate","view","TimelineHeaderRows","rowInnerHeights","Fragment","isLast","isChrono","key","join","toISOString","TimelineCoords","slatRootEl","slatEls","isRtl","outerCoordCache","PositionCache","innerCoordCache","findDirectChildren","isDateInRange","rangeContainsMarker","dateToCoord","slotCoverage","computeDateSnapCoverage","slotIndex","Math","floor","min","partial","originClientRect","width","rights","getWidth","lefts","rangeToCoords","durationToCoord","duration","coord","activeRange","coordFromLeft","snapDiffInt","snapCoverage","ceil","coordToCss","hcoord","left","right","coordsToCss","hcoords","TimelineHeader","rootElRef","createRef","timerUnit","slatCoords","NowTimer","ref","minWidth","tableMinWidth","clientWidth","tableColGroupNode","nowIndicator","NowIndicatorContainer","elStyle","isAxis","componentDidMount","updateSize","componentDidUpdate","onMaxCushionWidth","computeMaxCushionWidth","max","findElements","current","el","getBoundingClientRect","TimelineSlatCell","isEm","Object","assign","elRef","isDay","slotLaneContent","slotLaneClassNames","slotLaneDidMount","slotLaneWillUnmount","TimelineSlatsBody","cellElRefs","TimelineSlats","RefMap","handleScrollRequest","request","onScrollLeftRequest","coords","time","getClass","updateSizing","scrollResponder","createScrollResponder","prevProps","update","componentWillUnmount","detach","onCoords","offsetWidth","elMap","currentMap","positionToHit","leftPosition","slatIndex","leftToIndex","slatWidth","localSnapIndex","multiplyDuration","dateSpan","allDay","dayEl","computeSegHCoords","segs","timelineCoords","seg","round","TimelineLaneBg","highlightSeg","eventResizeSegs","dateSelectionSegs","renderSegs","businessHourSegs","bgEventSegs","fillType","segHCoords","children","hStyle","buildEventRangeKey","eventRange","BgEvent","getSegMeta","renderFill","TimelineLaneSlicer","Slicer","sliceRange","origRange","normalRange","computeVisibleDayRange","dayRange","normalizeRange","slicedRange","intersectRanges","isStart","isEnd","addMs","DEFAULT_TIME_FORMAT","TimelineEvent","StandardEvent","defaultTimeFormat","defaultDisplayEventTime","TimelineLaneMoreLink","hiddenSegs","placement","resourceId","top","isVisible","extraDateSpan","MoreLinkContainer","visibility","allDayDate","moreCnt","allSegs","popoverContent","instanceId","instance","isForcedInvisible","isDragging","isResizing","isDateSelecting","isSelected","eventSelection","TimelineLane","slicer","sortEventSegs","harnessElRefs","moreElRefs","innerElRef","state","eventInstanceHeights","moreLinkHeights","handleResize","isForced","slicedProps","sliceProps","nextDayThreshold","mirrorSegs","eventDrag","eventResize","fgSegs","fgEventSegs","eventOrder","fgSegHCoords","eventMinWidth","fgPlacements","fgHeight","strictOrder","maxStackCnt","segInputs","crudePlacements","index","span","thickness","hierarchy","SegHierarchy","hiddenEntries","addSegs","hiddenPlacements","entry","hiddenGroups","groupIntersectingEntries","moreLinkInputs","moreLinkCrudePlacements","extractSeg","hiddenGroup","sortedSegs","entries","buildIsoString","computeEarliestSegStart","visibleRects","toRects","visiblePlacements","maxHeight","rect","segIndex","levelCoord","computeFgSegPlacements","eventOrderStrict","eventMaxStack","affectedInstances","renderFgSegs","topsByInstanceId","placements","buildAbsoluteTopHash","buildMirrorPlacements","addResizeHandler","prevState","eventStore","removeResizeHandler","innerEl","onHeightChange","setState","mapHash","harnessEl","moreEl","syncParentMinHeight","parentElement","minHeight","segPlacements","isMirror","segPlacement","isoStr","addStateEquality","isPropsEqual","TimelineGrid","DateComponent","slatsRef","handeEl","registerInteractiveComponent","unregisterInteractiveComponent","handleCoords","onSlatCoords","clientHeight","eventUiBases","dateSelection","queryHit","positionLeft","positionTop","elWidth","elHeight","slatHit","bottom","layer","TimelineView","scrollGridRef","slotCushionMaxWidth","handleSlatCoords","handleScrollLeftRequest","scrollLeft","forceScrollLeft","handleMaxCushionWidth","stickyHeaderDates","forPrint","getStickyHeaderDates","stickyFooterScrollbar","getStickyFooterScrollbar","slotMinWidth","slatCols","buildSlatCols","computeFallbackSlotMinWidth","sections","type","chunks","content","contentArg","liquid","renderScrollShim","ViewContainer","eventOverlap","viewSpec","ScrollGrid","isHeightAuto","collapsibleWidth","colGroups","cols"],"mappings":"ylBAK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