Baixe o app para aproveitar ainda mais
Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
/*! * FullCalendar v3.9.0 * Docs & License: https://fullcalendar.io/ * (c) 2018 Adam Shaw */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("moment"), require("jquery")); else if(typeof define === 'function' && define.amd) define(["moment", "jquery"], factory); else if(typeof exports === 'object') exports["FullCalendar"] = factory(require("moment"), require("jquery")); else root["FullCalendar"] = factory(root["moment"], root["jQuery"]); })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_3__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 236); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_0__; /***/ }), /* 1 */, /* 2 */ /***/ (function(module, exports) { /* derived from: https://github.com/Microsoft/tslib/blob/v1.6.0/tslib.js only include the helpers we need, to keep down filesize */ var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; exports.__extends = function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /***/ }), /* 3 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_3__; /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var moment = __webpack_require__(0); var $ = __webpack_require__(3); /* FullCalendar-specific DOM Utilities ----------------------------------------------------------------------------------------------------------------------*/ // Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left // and right space that was offset by the scrollbars. A 1-pixel border first, then margin beyond that. function compensateScroll(rowEls, scrollbarWidths) { if (scrollbarWidths.left) { rowEls.css({ 'border-left-width': 1, 'margin-left': scrollbarWidths.left - 1 }); } if (scrollbarWidths.right) { rowEls.css({ 'border-right-width': 1, 'margin-right': scrollbarWidths.right - 1 }); } } exports.compensateScroll = compensateScroll; // Undoes compensateScroll and restores all borders/margins function uncompensateScroll(rowEls) { rowEls.css({ 'margin-left': '', 'margin-right': '', 'border-left-width': '', 'border-right-width': '' }); } exports.uncompensateScroll = uncompensateScroll; // Make the mouse cursor express that an event is not allowed in the current area function disableCursor() { $('body').addClass('fc-not-allowed'); } exports.disableCursor = disableCursor; // Returns the mouse cursor to its original look function enableCursor() { $('body').removeClass('fc-not-allowed'); } exports.enableCursor = enableCursor; // Given a total available height to fill, have `els` (essentially child rows) expand to accomodate. // By default, all elements that are shorter than the recommended height are expanded uniformly, not considering // any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and // reduces the available height. function distributeHeight(els, availableHeight, shouldRedistribute) { // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions, // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars. var minOffset1 = Math.floor(availableHeight / els.length); // for non-last element var minOffset2 = Math.floor(availableHeight - minOffset1 * (els.length - 1)); // for last element *FLOORING NOTE* var flexEls = []; // elements that are allowed to expand. array of DOM nodes var flexOffsets = []; // amount of vertical space it takes up var flexHeights = []; // actual css height var usedHeight = 0; undistributeHeight(els); // give all elements their natural height // find elements that are below the recommended height (expandable). // important to query for heights in a single first pass (to avoid reflow oscillation). els.each(function (i, el) { var minOffset = i === els.length - 1 ? minOffset2 : minOffset1; var naturalOffset = $(el).outerHeight(true); if (naturalOffset < minOffset) { flexEls.push(el); flexOffsets.push(naturalOffset); flexHeights.push($(el).height()); } else { // this element stretches past recommended height (non-expandable). mark the space as occupied. usedHeight += naturalOffset; } }); // readjust the recommended height to only consider the height available to non-maxed-out rows. if (shouldRedistribute) { availableHeight -= usedHeight; minOffset1 = Math.floor(availableHeight / flexEls.length); minOffset2 = Math.floor(availableHeight - minOffset1 * (flexEls.length - 1)); // *FLOORING NOTE* } // assign heights to all expandable elements $(flexEls).each(function (i, el) { var minOffset = i === flexEls.length - 1 ? minOffset2 : minOffset1; var naturalOffset = flexOffsets[i]; var naturalHeight = flexHeights[i]; var newHeight = minOffset - (naturalOffset - naturalHeight); // subtract the margin/padding if (naturalOffset < minOffset) { $(el).height(newHeight); } }); } exports.distributeHeight = distributeHeight; // Undoes distrubuteHeight, restoring all els to their natural height function undistributeHeight(els) { els.height(''); } exports.undistributeHeight = undistributeHeight; // Given `els`, a jQuery set of <td> cells, find the cell with the largest natural width and set the widths of all the // cells to be that width. // PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline function matchCellWidths(els) { var maxInnerWidth = 0; els.find('> *').each(function (i, innerEl) { var innerWidth = $(innerEl).outerWidth(); if (innerWidth > maxInnerWidth) { maxInnerWidth = innerWidth; } }); maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance els.width(maxInnerWidth); return maxInnerWidth; } exports.matchCellWidths = matchCellWidths; // Given one element that resides inside another, // Subtracts the height of the inner element from the outer element. function subtractInnerElHeight(outerEl, innerEl) { var both = outerEl.add(innerEl); var diff; // effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked both.css({ position: 'relative', left: -1 // ensure reflow in case the el was already relative. negative is less likely to cause new scroll }); diff = outerEl.outerHeight() - innerEl.outerHeight(); // grab the dimensions both.css({ position: '', left: '' }); // undo hack return diff; } exports.subtractInnerElHeight = subtractInnerElHeight; /* Element Geom Utilities ----------------------------------------------------------------------------------------------------------------------*/ // borrowed from https://github.com/jquery/jquery-ui/blob/1.11.0/ui/core.js#L51 function getScrollParent(el) { var position = el.css('position'); var scrollParent = el.parents().filter(function () { var parent = $(this); return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x')); }).eq(0); return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent; } exports.getScrollParent = getScrollParent; // Queries the outer bounding area of a jQuery element. // Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive). // Origin is optional. function getOuterRect(el, origin) { var offset = el.offset(); var left = offset.left - (origin ? origin.left : 0); var top = offset.top - (origin ? origin.top : 0); return { left: left, right: left + el.outerWidth(), top: top, bottom: top + el.outerHeight() }; } exports.getOuterRect = getOuterRect; // Queries the area within the margin/border/scrollbars of a jQuery element. Does not go within the padding. // Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive). // Origin is optional. // WARNING: given element can't have borders // NOTE: should use clientLeft/clientTop, but very unreliable cross-browser. function getClientRect(el, origin) { var offset = el.offset(); var scrollbarWidths = getScrollbarWidths(el); var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0); var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0); return { left: left, right: left + el[0].clientWidth, top: top, bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars }; } exports.getClientRect = getClientRect; // Queries the area within the margin/border/padding of a jQuery element. Assumed not to have scrollbars. // Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive). // Origin is optional. function getContentRect(el, origin) { var offset = el.offset(); // just outside of border, margin not included var left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') - (origin ? origin.left : 0); var top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') - (origin ? origin.top : 0); return { left: left, right: left + el.width(), top: top, bottom: top + el.height() }; } exports.getContentRect = getContentRect; // Returns the computed left/right/top/bottom scrollbar widths for the given jQuery element. // WARNING: given element can't have borders (which will cause offsetWidth/offsetHeight to be larger). // NOTE: should use clientLeft/clientTop, but very unreliable cross-browser. function getScrollbarWidths(el) { var leftRightWidth = el[0].offsetWidth - el[0].clientWidth; var bottomWidth = el[0].offsetHeight - el[0].clientHeight; var widths; leftRightWidth = sanitizeScrollbarWidth(leftRightWidth); bottomWidth = sanitizeScrollbarWidth(bottomWidth); widths = { left: 0, right: 0, top: 0, bottom: bottomWidth }; if (getIsLeftRtlScrollbars() && el.css('direction') === 'rtl') { widths.left = leftRightWidth; } else { widths.right = leftRightWidth; } return widths; } exports.getScrollbarWidths = getScrollbarWidths; // The scrollbar width computations in getScrollbarWidths are sometimes flawed when it comes to // retina displays, rounding, and IE11. Massage them into a usable value. function sanitizeScrollbarWidth(width) { width = Math.max(0, width); // no negatives width = Math.round(width); return width; } // Logic for determining if, when the element is right-to-left, the scrollbar appears on the left side var _isLeftRtlScrollbars = null; function getIsLeftRtlScrollbars() { if (_isLeftRtlScrollbars === null) { _isLeftRtlScrollbars = computeIsLeftRtlScrollbars(); } return _isLeftRtlScrollbars; } function computeIsLeftRtlScrollbars() { var el = $('<div><div/></div>') .css({ position: 'absolute', top: -1000, left: 0, border: 0, padding: 0, overflow: 'scroll', direction: 'rtl' }) .appendTo('body'); var innerEl = el.children(); var res = innerEl.offset().left > el.offset().left; // is the inner div shifted to accommodate a left scrollbar? el.remove(); return res; } // Retrieves a jQuery element's computed CSS value as a floating-point number. // If the queried value is non-numeric (ex: IE can return "medium" for border width), will just return zero. function getCssFloat(el, prop) { return parseFloat(el.css(prop)) || 0; } /* Mouse / Touch Utilities ----------------------------------------------------------------------------------------------------------------------*/ // Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac) function isPrimaryMouseButton(ev) { return ev.which === 1 && !ev.ctrlKey; } exports.isPrimaryMouseButton = isPrimaryMouseButton; function getEvX(ev) { var touches = ev.originalEvent.touches; // on mobile FF, pageX for touch events is present, but incorrect, // so, look at touch coordinates first. if (touches && touches.length) { return touches[0].pageX; } return ev.pageX; } exports.getEvX = getEvX; function getEvY(ev) { var touches = ev.originalEvent.touches; // on mobile FF, pageX for touch events is present, but incorrect, // so, look at touch coordinates first. if (touches && touches.length) { return touches[0].pageY; } return ev.pageY; } exports.getEvY = getEvY; function getEvIsTouch(ev) { return /^touch/.test(ev.type); } exports.getEvIsTouch = getEvIsTouch; function preventSelection(el) { el.addClass('fc-unselectable') .on('selectstart', preventDefault); } exports.preventSelection = preventSelection; function allowSelection(el) { el.removeClass('fc-unselectable') .off('selectstart', preventDefault); } exports.allowSelection = allowSelection; // Stops a mouse/touch event from doing it's native browser action function preventDefault(ev) { ev.preventDefault(); } exports.preventDefault = preventDefault; /* General Geometry Utils ----------------------------------------------------------------------------------------------------------------------*/ // Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false function intersectRects(rect1, rect2) { var res = { left: Math.max(rect1.left, rect2.left), right: Math.min(rect1.right, rect2.right), top: Math.max(rect1.top, rect2.top), bottom: Math.min(rect1.bottom, rect2.bottom) }; if (res.left < res.right && res.top < res.bottom) { return res; } return false; } exports.intersectRects = intersectRects; // Returns a new point that will have been moved to reside within the given rectangle function constrainPoint(point, rect) { return { left: Math.min(Math.max(point.left, rect.left), rect.right), top: Math.min(Math.max(point.top, rect.top), rect.bottom) }; } exports.constrainPoint = constrainPoint; // Returns a point that is the center of the given rectangle function getRectCenter(rect) { return { left: (rect.left + rect.right) / 2, top: (rect.top + rect.bottom) / 2 }; } exports.getRectCenter = getRectCenter; // Subtracts point2's coordinates from point1's coordinates, returning a delta function diffPoints(point1, point2) { return { left: point1.left - point2.left, top: point1.top - point2.top }; } exports.diffPoints = diffPoints; /* Object Ordering by Field ----------------------------------------------------------------------------------------------------------------------*/ function parseFieldSpecs(input) { var specs = []; var tokens = []; var i; var token; if (typeof input === 'string') { tokens = input.split(/\s*,\s*/); } else if (typeof input === 'function') { tokens = [input]; } else if ($.isArray(input)) { tokens = input; } for (i = 0; i < tokens.length; i++) { token = tokens[i]; if (typeof token === 'string') { specs.push(token.charAt(0) === '-' ? { field: token.substring(1), order: -1 } : { field: token, order: 1 }); } else if (typeof token === 'function') { specs.push({ func: token }); } } return specs; } exports.parseFieldSpecs = parseFieldSpecs; function compareByFieldSpecs(obj1, obj2, fieldSpecs, obj1fallback, obj2fallback) { var i; var cmp; for (i = 0; i < fieldSpecs.length; i++) { cmp = compareByFieldSpec(obj1, obj2, fieldSpecs[i], obj1fallback, obj2fallback); if (cmp) { return cmp; } } return 0; } exports.compareByFieldSpecs = compareByFieldSpecs; function compareByFieldSpec(obj1, obj2, fieldSpec, obj1fallback, obj2fallback) { if (fieldSpec.func) { return fieldSpec.func(obj1, obj2); } var val1 = obj1[fieldSpec.field]; var val2 = obj2[fieldSpec.field]; if (val1 == null && obj1fallback) { val1 = obj1fallback[fieldSpec.field]; } if (val2 == null && obj2fallback) { val2 = obj2fallback[fieldSpec.field]; } return flexibleCompare(val1, val2) * (fieldSpec.order || 1); } exports.compareByFieldSpec = compareByFieldSpec; function flexibleCompare(a, b) { if (!a && !b) { return 0; } if (b == null) { return -1; } if (a == null) { return 1; } if ($.type(a) === 'string' || $.type(b) === 'string') { return String(a).localeCompare(String(b)); } return a - b; } exports.flexibleCompare = flexibleCompare; /* Date Utilities ----------------------------------------------------------------------------------------------------------------------*/ exports.dayIDs = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; exports.unitsDesc = ['year', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; // descending // Diffs the two moments into a Duration where full-days are recorded first, then the remaining time. // Moments will have their timezones normalized. function diffDayTime(a, b) { return moment.duration({ days: a.clone().stripTime().diff(b.clone().stripTime(), 'days'), ms: a.time() - b.time() // time-of-day from day start. disregards timezone }); } exports.diffDayTime = diffDayTime; // Diffs the two moments via their start-of-day (regardless of timezone). Produces whole-day durations. function diffDay(a, b) { return moment.duration({ days: a.clone().stripTime().diff(b.clone().stripTime(), 'days') }); } exports.diffDay = diffDay; // Diffs two moments, producing a duration, made of a whole-unit-increment of the given unit. Uses rounding. function diffByUnit(a, b, unit) { return moment.duration(Math.round(a.diff(b, unit, true)), // returnFloat=true unit); } exports.diffByUnit = diffByUnit; // Computes the unit name of the largest whole-unit period of time. // For example, 48 hours will be "days" whereas 49 hours will be "hours". // Accepts start/end, a range object, or an original duration object. function computeGreatestUnit(start, end) { var i; var unit; var val; for (i = 0; i < exports.unitsDesc.length; i++) { unit = exports.unitsDesc[i]; val = computeRangeAs(unit, start, end); if (val >= 1 && isInt(val)) { break; } } return unit; // will be "milliseconds" if nothing else matches } exports.computeGreatestUnit = computeGreatestUnit; // like computeGreatestUnit, but has special abilities to interpret the source input for clues function computeDurationGreatestUnit(duration, durationInput) { var unit = computeGreatestUnit(duration); // prevent days:7 from being interpreted as a week if (unit === 'week' && typeof durationInput === 'object' && durationInput.days) { unit = 'day'; } return unit; } exports.computeDurationGreatestUnit = computeDurationGreatestUnit; // Computes the number of units (like "hours") in the given range. // Range can be a {start,end} object, separate start/end args, or a Duration. // Results are based on Moment's .as() and .diff() methods, so results can depend on internal handling // of month-diffing logic (which tends to vary from version to version). function computeRangeAs(unit, start, end) { if (end != null) { return end.diff(start, unit, true); } else if (moment.isDuration(start)) { return start.as(unit); } else { return start.end.diff(start.start, unit, true); } } // Intelligently divides a range (specified by a start/end params) by a duration function divideRangeByDuration(start, end, dur) { var months; if (durationHasTime(dur)) { return (end - start) / dur; } months = dur.asMonths(); if (Math.abs(months) >= 1 && isInt(months)) { return end.diff(start, 'months', true) / months; } return end.diff(start, 'days', true) / dur.asDays(); } exports.divideRangeByDuration = divideRangeByDuration; // Intelligently divides one duration by another function divideDurationByDuration(dur1, dur2) { var months1; var months2; if (durationHasTime(dur1) || durationHasTime(dur2)) { return dur1 / dur2; } months1 = dur1.asMonths(); months2 = dur2.asMonths(); if (Math.abs(months1) >= 1 && isInt(months1) && Math.abs(months2) >= 1 && isInt(months2)) { return months1 / months2; } return dur1.asDays() / dur2.asDays(); } exports.divideDurationByDuration = divideDurationByDuration; // Intelligently multiplies a duration by a number function multiplyDuration(dur, n) { var months; if (durationHasTime(dur)) { return moment.duration(dur * n); } months = dur.asMonths(); if (Math.abs(months) >= 1 && isInt(months)) { return moment.duration({ months: months * n }); } return moment.duration({ days: dur.asDays() * n }); } exports.multiplyDuration = multiplyDuration; // Returns a boolean about whether the given duration has any time parts (hours/minutes/seconds/ms) function durationHasTime(dur) { return Boolean(dur.hours() || dur.minutes() || dur.seconds() || dur.milliseconds()); } exports.durationHasTime = durationHasTime; function isNativeDate(input) { return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date; } exports.isNativeDate = isNativeDate; // Returns a boolean about whether the given input is a time string, like "06:40:00" or "06:00" function isTimeString(str) { return typeof str === 'string' && /^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(str); } exports.isTimeString = isTimeString; /* Logging and Debug ----------------------------------------------------------------------------------------------------------------------*/ function log() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var console = window.console; if (console && console.log) { return console.log.apply(console, args); } } exports.log = log; function warn() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var console = window.console; if (console && console.warn) { return console.warn.apply(console, args); } else { return log.apply(null, args); } } exports.warn = warn; /* General Utilities ----------------------------------------------------------------------------------------------------------------------*/ var hasOwnPropMethod = {}.hasOwnProperty; // Merges an array of objects into a single object. // The second argument allows for an array of property names who's object values will be merged together. function mergeProps(propObjs, complexProps) { var dest = {}; var i; var name; var complexObjs; var j; var val; var props; if (complexProps) { for (i = 0; i < complexProps.length; i++) { name = complexProps[i]; complexObjs = []; // collect the trailing object values, stopping when a non-object is discovered for (j = propObjs.length - 1; j >= 0; j--) { val = propObjs[j][name]; if (typeof val === 'object') { complexObjs.unshift(val); } else if (val !== undefined) { dest[name] = val; // if there were no objects, this value will be used break; } } // if the trailing values were objects, use the merged value if (complexObjs.length) { dest[name] = mergeProps(complexObjs); } } } // copy values into the destination, going from last to first for (i = propObjs.length - 1; i >= 0; i--) { props = propObjs[i]; for (name in props) { if (!(name in dest)) { dest[name] = props[name]; } } } return dest; } exports.mergeProps = mergeProps; function copyOwnProps(src, dest) { for (var name_1 in src) { if (hasOwnProp(src, name_1)) { dest[name_1] = src[name_1]; } } } exports.copyOwnProps = copyOwnProps; function hasOwnProp(obj, name) { return hasOwnPropMethod.call(obj, name); } exports.hasOwnProp = hasOwnProp; function applyAll(functions, thisObj, args) { if ($.isFunction(functions)) { functions = [functions]; } if (functions) { var i = void 0; var ret = void 0; for (i = 0; i < functions.length; i++) { ret = functions[i].apply(thisObj, args) || ret; } return ret; } } exports.applyAll = applyAll; function removeMatching(array, testFunc) { var removeCnt = 0; var i = 0; while (i < array.length) { if (testFunc(array[i])) { array.splice(i, 1); removeCnt++; } else { i++; } } return removeCnt; } exports.removeMatching = removeMatching; function removeExact(array, exactVal) { var removeCnt = 0; var i = 0; while (i < array.length) { if (array[i] === exactVal) { array.splice(i, 1); removeCnt++; } else { i++; } } return removeCnt; } exports.removeExact = removeExact; function isArraysEqual(a0, a1) { var len = a0.length; var i; if (len == null || len !== a1.length) { return false; } for (i = 0; i < len; i++) { if (a0[i] !== a1[i]) { return false; } } return true; } exports.isArraysEqual = isArraysEqual; function firstDefined() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } for (var i = 0; i < args.length; i++) { if (args[i] !== undefined) { return args[i]; } } } exports.firstDefined = firstDefined; function htmlEscape(s) { return (s + '').replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/'/g, ''') .replace(/"/g, '"') .replace(/\n/g, '<br />'); } exports.htmlEscape = htmlEscape; function stripHtmlEntities(text) { return text.replace(/&.*?;/g, ''); } exports.stripHtmlEntities = stripHtmlEntities; // Given a hash of CSS properties, returns a string of CSS. // Uses property names as-is (no camel-case conversion). Will not make statements for null/undefined values. function cssToStr(cssProps) { var statements = []; $.each(cssProps, function (name, val) { if (val != null) { statements.push(name + ':' + val); } }); return statements.join(';'); } exports.cssToStr = cssToStr; // Given an object hash of HTML attribute names to values, // generates a string that can be injected between < > in HTML function attrsToStr(attrs) { var parts = []; $.each(attrs, function (name, val) { if (val != null) { parts.push(name + '="' + htmlEscape(val) + '"'); } }); return parts.join(' '); } exports.attrsToStr = attrsToStr; function capitaliseFirstLetter(str) { return str.charAt(0).toUpperCase() + str.slice(1); } exports.capitaliseFirstLetter = capitaliseFirstLetter; function compareNumbers(a, b) { return a - b; } exports.compareNumbers = compareNumbers; function isInt(n) { return n % 1 === 0; } exports.isInt = isInt; // Returns a method bound to the given object context. // Just like one of the jQuery.proxy signatures, but without the undesired behavior of treating the same method with // different contexts as identical when binding/unbinding events. function proxy(obj, methodName) { var method = obj[methodName]; return function () { return method.apply(obj, arguments); }; } exports.proxy = proxy; // Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. // https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js#L714 function debounce(func, wait, immediate) { if (immediate === void 0) { immediate = false; } var timeout; var args; var context; var timestamp; var result; var later = function () { var last = +new Date() - timestamp; if (last < wait) { timeout = setTimeout(later, wait - last); } else { timeout = null; if (!immediate) { result = func.apply(context, args); context = args = null; } } }; return function () { context = this; args = arguments; timestamp = +new Date(); var callNow = immediate && !timeout; if (!timeout) { timeout = setTimeout(later, wait); } if (callNow) { result = func.apply(context, args); context = args = null; } return result; }; } exports.debounce = debounce; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var moment = __webpack_require__(0); var moment_ext_1 = __webpack_require__(10); var UnzonedRange = /** @class */ (function () { function UnzonedRange(startInput, endInput) { // TODO: move these into footprint. // Especially, doesn't make sense for null startMs/endMs. this.isStart = true; this.isEnd = true; if (moment.isMoment(startInput)) { startInput = startInput.clone().stripZone(); } if (moment.isMoment(endInput)) { endInput = endInput.clone().stripZone(); } if (startInput) { this.startMs = startInput.valueOf(); } if (endInput) { this.endMs = endInput.valueOf(); } } /* SIDEEFFECT: will mutate eventRanges. Will return a new array result. Only works for non-open-ended ranges. */ UnzonedRange.invertRanges = function (ranges, constraintRange) { var invertedRanges = []; var startMs = constraintRange.startMs; // the end of the previous range. the start of the new range var i; var dateRange; // ranges need to be in order. required for our date-walking algorithm ranges.sort(compareUnzonedRanges); for (i = 0; i < ranges.length; i++) { dateRange = ranges[i]; // add the span of time before the event (if there is any) if (dateRange.startMs > startMs) { invertedRanges.push(new UnzonedRange(startMs, dateRange.startMs)); } if (dateRange.endMs > startMs) { startMs = dateRange.endMs; } } // add the span of time after the last event (if there is any) if (startMs < constraintRange.endMs) { invertedRanges.push(new UnzonedRange(startMs, constraintRange.endMs)); } return invertedRanges; }; UnzonedRange.prototype.intersect = function (otherRange) { var startMs = this.startMs; var endMs = this.endMs; var newRange = null; if (otherRange.startMs != null) { if (startMs == null) { startMs = otherRange.startMs; } else { startMs = Math.max(startMs, otherRange.startMs); } } if (otherRange.endMs != null) { if (endMs == null) { endMs = otherRange.endMs; } else { endMs = Math.min(endMs, otherRange.endMs); } } if (startMs == null || endMs == null || startMs < endMs) { newRange = new UnzonedRange(startMs, endMs); newRange.isStart = this.isStart && startMs === this.startMs; newRange.isEnd = this.isEnd && endMs === this.endMs; } return newRange; }; UnzonedRange.prototype.intersectsWith = function (otherRange) { return (this.endMs == null || otherRange.startMs == null || this.endMs > otherRange.startMs) && (this.startMs == null || otherRange.endMs == null || this.startMs < otherRange.endMs); }; UnzonedRange.prototype.containsRange = function (innerRange) { return (this.startMs == null || (innerRange.startMs != null && innerRange.startMs >= this.startMs)) && (this.endMs == null || (innerRange.endMs != null && innerRange.endMs <= this.endMs)); }; // `date` can be a moment, a Date, or a millisecond time. UnzonedRange.prototype.containsDate = function (date) { var ms = date.valueOf(); return (this.startMs == null || ms >= this.startMs) && (this.endMs == null || ms < this.endMs); }; // If the given date is not within the given range, move it inside. // (If it's past the end, make it one millisecond before the end). // `date` can be a moment, a Date, or a millisecond time. // Returns a MS-time. UnzonedRange.prototype.constrainDate = function (date) { var ms = date.valueOf(); if (this.startMs != null && ms < this.startMs) { ms = this.startMs; } if (this.endMs != null && ms >= this.endMs) { ms = this.endMs - 1; } return ms; }; UnzonedRange.prototype.equals = function (otherRange) { return this.startMs === otherRange.startMs && this.endMs === otherRange.endMs; }; UnzonedRange.prototype.clone = function () { var range = new UnzonedRange(this.startMs, this.endMs); range.isStart = this.isStart; range.isEnd = this.isEnd; return range; }; // Returns an ambig-zoned moment from startMs. // BEWARE: returned moment is not localized. // Formatting and start-of-week will be default. UnzonedRange.prototype.getStart = function () { if (this.startMs != null) { return moment_ext_1.default.utc(this.startMs).stripZone(); } return null; }; // Returns an ambig-zoned moment from startMs. // BEWARE: returned moment is not localized. // Formatting and start-of-week will be default. UnzonedRange.prototype.getEnd = function () { if (this.endMs != null) { return moment_ext_1.default.utc(this.endMs).stripZone(); } return null; }; UnzonedRange.prototype.as = function (unit) { return moment.utc(this.endMs).diff(moment.utc(this.startMs), unit, true); }; return UnzonedRange; }()); exports.default = UnzonedRange; /* Only works for non-open-ended ranges. */ function compareUnzonedRanges(range1, range2) { return range1.startMs - range2.startMs; // earlier ranges go first } /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(2); var $ = __webpack_require__(3); var ParsableModelMixin_1 = __webpack_require__(208); var Class_1 = __webpack_require__(33); var EventDefParser_1 = __webpack_require__(49); var EventSource = /** @class */ (function (_super) { tslib_1.__extends(EventSource, _super); // can we do away with calendar? at least for the abstract? // useful for buildEventDef function EventSource(calendar) { var _this = _super.call(this) || this; _this.calendar = calendar; _this.className = []; _this.uid = String(EventSource.uuid++); return _this; } /* rawInput can be any data type! */ EventSource.parse = function (rawInput, calendar) { var source = new this(calendar); if (typeof rawInput === 'object') { if (source.applyProps(rawInput)) { return source; } } return false; }; EventSource.normalizeId = function (id) { if (id) { return String(id); } return null; }; EventSource.prototype.fetch = function (start, end, timezone) { // subclasses must implement. must return a promise. }; EventSource.prototype.removeEventDefsById = function (eventDefId) { // optional for subclasses to implement }; EventSource.prototype.removeAllEventDefs = function () { // optional for subclasses to implement }; /* For compairing/matching */ EventSource.prototype.getPrimitive = function (otherSource) { // subclasses must implement }; EventSource.prototype.parseEventDefs = function (rawEventDefs) { var i; var eventDef; var eventDefs = []; for (i = 0; i < rawEventDefs.length; i++) { eventDef = this.parseEventDef(rawEventDefs[i]); if (eventDef) { eventDefs.push(eventDef); } } return eventDefs; }; EventSource.prototype.parseEventDef = function (rawInput) { var calendarTransform = this.calendar.opt('eventDataTransform'); var sourceTransform = this.eventDataTransform; if (calendarTransform) { rawInput = calendarTransform(rawInput, this.calendar); } if (sourceTransform) { rawInput = sourceTransform(rawInput, this.calendar); } return EventDefParser_1.default.parse(rawInput, this); }; EventSource.prototype.applyManualStandardProps = function (rawProps) { if (rawProps.id != null) { this.id = EventSource.normalizeId(rawProps.id); } // TODO: converge with EventDef if ($.isArray(rawProps.className)) { this.className = rawProps.className; } else if (typeof rawProps.className === 'string') { this.className = rawProps.className.split(/\s+/); } return true; }; EventSource.uuid = 0; EventSource.defineStandardProps = ParsableModelMixin_1.default.defineStandardProps; EventSource.copyVerbatimStandardProps = ParsableModelMixin_1.default.copyVerbatimStandardProps; return EventSource; }(Class_1.default)); exports.default = EventSource; ParsableModelMixin_1.default.mixInto(EventSource); // Parsing // --------------------------------------------------------------------------------------------------------------------- EventSource.defineStandardProps({ // manually process... id: false, className: false, // automatically transfer... color: true, backgroundColor: true, borderColor: true, textColor: true, editable: true, startEditable: true, durationEditable: true, rendering: true, overlap: true, constraint: true, allDayDefault: true, eventDataTransform: true }); /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { /* Utility methods for easily listening to events on another object, and more importantly, easily unlistening from them. USAGE: import { default as ListenerMixin, ListenerInterface } from './ListenerMixin' in class: listenTo: ListenerInterface['listenTo'] stopListeningTo: ListenerInterface['stopListeningTo'] after class: ListenerMixin.mixInto(TheClass) */ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(2); var $ = __webpack_require__(3); var Mixin_1 = __webpack_require__(14); var guid = 0; var ListenerMixin = /** @class */ (function (_super) { tslib_1.__extends(ListenerMixin, _super); function ListenerMixin() { return _super !== null && _super.apply(this, arguments) || this; } /* Given an `other` object that has on/off methods, bind the given `callback` to an event by the given name. The `callback` will be called with the `this` context of the object that .listenTo is being called on. Can be called: .listenTo(other, eventName, callback) OR .listenTo(other, { eventName1: callback1, eventName2: callback2 }) */ ListenerMixin.prototype.listenTo = function (other, arg, callback) { if (typeof arg === 'object') { for (var eventName in arg) { if (arg.hasOwnProperty(eventName)) { this.listenTo(other, eventName, arg[eventName]); } } } else if (typeof arg === 'string') { other.on(arg + '.' + this.getListenerNamespace(), // use event namespacing to identify this object $.proxy(callback, this) // always use `this` context // the usually-undesired jQuery guid behavior doesn't matter, // because we always unbind via namespace ); } }; /* Causes the current object to stop listening to events on the `other` object. `eventName` is optional. If omitted, will stop listening to ALL events on `other`. */ ListenerMixin.prototype.stopListeningTo = function (other, eventName) { other.off((eventName || '') + '.' + this.getListenerNamespace()); }; /* Returns a string, unique to this object, to be used for event namespacing */ ListenerMixin.prototype.getListenerNamespace = function () { if (this.listenerId == null) { this.listenerId = guid++; } return '_listener' + this.listenerId; }; return ListenerMixin; }(Mixin_1.default)); exports.default = ListenerMixin; /***/ }), /* 8 */, /* 9 */, /* 10 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var moment = __webpack_require__(0); var $ = __webpack_require__(3); var util_1 = __webpack_require__(4); var ambigDateOfMonthRegex = /^\s*\d{4}-\d\d$/; var ambigTimeOrZoneRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/; var newMomentProto = moment.fn; // where we will attach our new methods exports.newMomentProto = newMomentProto; var oldMomentProto = $.extend({}, newMomentProto); // copy of original moment methods exports.oldMomentProto = oldMomentProto; // tell momentjs to transfer these properties upon clone var momentProperties = moment.momentProperties; momentProperties.push('_fullCalendar'); momentProperties.push('_ambigTime'); momentProperties.push('_ambigZone'); /* Call this if you want Moment's original format method to be used */ function oldMomentFormat(mom, formatStr) { return oldMomentProto.format.call(mom, formatStr); // oldMomentProto defined in moment-ext.js } exports.oldMomentFormat = oldMomentFormat; // Creating // ------------------------------------------------------------------------------------------------- // Creates a new moment, similar to the vanilla moment(...) constructor, but with // extra features (ambiguous time, enhanced formatting). When given an existing moment, // it will function as a clone (and retain the zone of the moment). Anything else will // result in a moment in the local zone. var momentExt = function () { return makeMoment(arguments); }; exports.default = momentExt; // Sames as momentExt, but forces the resulting moment to be in the UTC timezone. momentExt.utc = function () { var mom = makeMoment(arguments, true); // Force it into UTC because makeMoment doesn't guarantee it // (if given a pre-existing moment for example) if (mom.hasTime()) { mom.utc(); } return mom; }; // Same as momentExt, but when given an ISO8601 string, the timezone offset is preserved. // ISO8601 strings with no timezone offset will become ambiguously zoned. momentExt.parseZone = function () { return makeMoment(arguments, true, true); }; // Builds an enhanced moment from args. When given an existing moment, it clones. When given a // native Date, or called with no arguments (the current time), the resulting moment will be local. // Anything else needs to be "parsed" (a string or an array), and will be affected by: // parseAsUTC - if there is no zone information, should we parse the input in UTC? // parseZone - if there is zone information, should we force the zone of the moment? function makeMoment(args, parseAsUTC, parseZone) { if (parseAsUTC === void 0) { parseAsUTC = false; } if (parseZone === void 0) { parseZone = false; } var input = args[0]; var isSingleString = args.length === 1 && typeof input === 'string'; var isAmbigTime; var isAmbigZone; var ambigMatch; var mom; if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) { mom = moment.apply(null, args); } else { isAmbigTime = false; isAmbigZone = false; if (isSingleString) { if (ambigDateOfMonthRegex.test(input)) { // accept strings like '2014-05', but convert to the first of the month input += '-01'; args = [input]; // for when we pass it on to moment's constructor isAmbigTime = true; isAmbigZone = true; } else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) { isAmbigTime = !ambigMatch[5]; // no time part? isAmbigZone = true; } } else if ($.isArray(input)) { // arrays have no timezone information, so assume ambiguous zone isAmbigZone = true; } // otherwise, probably a string with a format if (parseAsUTC || isAmbigTime) { mom = moment.utc.apply(moment, args); } else { mom = moment.apply(null, args); } if (isAmbigTime) { mom._ambigTime = true; mom._ambigZone = true; // ambiguous time always means ambiguous zone } else if (parseZone) { if (isAmbigZone) { mom._ambigZone = true; } else if (isSingleString) { mom.utcOffset(input); // if not a valid zone, will assign UTC } } } mom._fullCalendar = true; // flag for extended functionality return mom; } // Week Number // ------------------------------------------------------------------------------------------------- // Returns the week number, considering the locale's custom week number calcuation // `weeks` is an alias for `week` newMomentProto.week = newMomentProto.weeks = function (input) { var weekCalc = this._locale._fullCalendar_weekCalc; if (input == null && typeof weekCalc === 'function') { return weekCalc(this); } else if (weekCalc === 'ISO') { return oldMomentProto.isoWeek.apply(this, arguments); // ISO getter/setter } return oldMomentProto.week.apply(this, arguments); // local getter/setter }; // Time-of-day // ------------------------------------------------------------------------------------------------- // GETTER // Returns a Duration with the hours/minutes/seconds/ms values of the moment. // If the moment has an ambiguous time, a duration of 00:00 will be returned. // // SETTER // You can supply a Duration, a Moment, or a Duration-like argument. // When setting the time, and the moment has an ambiguous time, it then becomes unambiguous. newMomentProto.time = function (time) { // Fallback to the original method (if there is one) if this moment wasn't created via FullCalendar. // `time` is a generic enough method name where this precaution is necessary to avoid collisions w/ other plugins. if (!this._fullCalendar) { return oldMomentProto.time.apply(this, arguments); } if (time == null) { return moment.duration({ hours: this.hours(), minutes: this.minutes(), seconds: this.seconds(), milliseconds: this.milliseconds() }); } else { this._ambigTime = false; // mark that the moment now has a time if (!moment.isDuration(time) && !moment.isMoment(time)) { time = moment.duration(time); } // The day value should cause overflow (so 24 hours becomes 00:00:00 of next day). // Only for Duration times, not Moment times. var dayHours = 0; if (moment.isDuration(time)) { dayHours = Math.floor(time.asDays()) * 24; } // We need to set the individual fields. // Can't use startOf('day') then add duration. In case of DST at start of day. return this.hours(dayHours + time.hours()) .minutes(time.minutes()) .seconds(time.seconds()) .milliseconds(time.milliseconds()); } }; // Converts the moment to UTC, stripping out its time-of-day and timezone offset, // but preserving its YMD. A moment with a stripped time will display no time // nor timezone offset when .format() is called. newMomentProto.stripTime = function () { if (!this._ambigTime) { this.utc(true); // keepLocalTime=true (for keeping *date* value) // set time to zero this.set({ hours: 0, minutes: 0, seconds: 0, ms: 0 }); // Mark the time as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(), // which clears all ambig flags. this._ambigTime = true; this._ambigZone = true; // if ambiguous time, also ambiguous timezone offset } return this; // for chaining }; // Returns if the moment has a non-ambiguous time (boolean) newMomentProto.hasTime = function () { return !this._ambigTime; }; // Timezone // ------------------------------------------------------------------------------------------------- // Converts the moment to UTC, stripping out its timezone offset, but preserving its // YMD and time-of-day. A moment with a stripped timezone offset will display no // timezone offset when .format() is called. newMomentProto.stripZone = function () { var wasAmbigTime; if (!this._ambigZone) { wasAmbigTime = this._ambigTime; this.utc(true); // keepLocalTime=true (for keeping date and time values) // the above call to .utc()/.utcOffset() unfortunately might clear the ambig flags, so restore this._ambigTime = wasAmbigTime || false; // Mark the zone as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(), // which clears the ambig flags. this._ambigZone = true; } return this; // for chaining }; // Returns of the moment has a non-ambiguous timezone offset (boolean) newMomentProto.hasZone = function () { return !this._ambigZone; }; // implicitly marks a zone newMomentProto.local = function (keepLocalTime) { // for when converting from ambiguously-zoned to local, // keep the time values when converting from UTC -> local oldMomentProto.local.call(this, this._ambigZone || keepLocalTime); // ensure non-ambiguous // this probably already happened via local() -> utcOffset(), but don't rely on Moment's internals this._ambigTime = false; this._ambigZone = false; return this; // for chaining }; // implicitly marks a zone newMomentProto.utc = function (keepLocalTime) { oldMomentProto.utc.call(this, keepLocalTime); // ensure non-ambiguous // this probably already happened via utc() -> utcOffset(), but don't rely on Moment's internals this._ambigTime = false; this._ambigZone = false; return this; }; // implicitly marks a zone (will probably get called upon .utc() and .local()) newMomentProto.utcOffset = function (tzo) { if (tzo != null) { // these assignments needs to happen before the original zone method is called. // I forget why, something to do with a browser crash. this._ambigTime = false; this._ambigZone = false; } return oldMomentProto.utcOffset.apply(this, arguments); }; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { /* USAGE: import { default as EmitterMixin, EmitterInterface } from './EmitterMixin' in class: on: EmitterInterface['on'] one: EmitterInterface['one'] off: EmitterInterface['off'] trigger: EmitterInterface['trigger'] triggerWith: EmitterInterface['triggerWith'] hasHandlers: EmitterInterface['hasHandlers'] after class: EmitterMixin.mixInto(TheClass) */ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(2); var $ = __webpack_require__(3); var Mixin_1 = __webpack_require__(14); var EmitterMixin = /** @class */ (function (_super) { tslib_1.__extends(EmitterMixin, _super); function EmitterMixin() { return _super !== null && _super.apply(this, arguments) || this; } // jQuery-ification via $(this) allows a non-DOM object to have // the same event handling capabilities (including namespaces). EmitterMixin.prototype.on = function (types, handler) { $(this).on(types, this._prepareIntercept(handler)); return this; // for chaining }; EmitterMixin.prototype.one = function (types, handler) { $(this).one(types, this._prepareIntercept(handler)); return this; // for chaining }; EmitterMixin.prototype._prepareIntercept = function (handler) { // handlers are always called with an "event" object as their first param. // sneak the `this` context and arguments into the extra parameter object // and forward them on to the original handler. var intercept = function (ev, extra) { return handler.apply(extra.context || this, extra.args || []); }; // mimick jQuery's internal "proxy" system (risky, I know) // causing all functions with the same .guid to appear to be the same. // https://github.com/jquery/jquery/blob/2.2.4/src/core.js#L448 // this is needed for calling .off with the original non-intercept handler. if (!handler.guid) { handler.guid = $.guid++; } intercept.guid = handler.guid; return intercept; }; EmitterMixin.prototype.off = function (types, handler) { $(this).off(types, handler); return this; // for chaining }; EmitterMixin.prototype.trigger = function (types) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } // pass in "extra" info to the intercept $(this).triggerHandler(types, { args: args }); return this; // for chaining }; EmitterMixin.prototype.triggerWith = function (types, context, args) { // `triggerHandler` is less reliant on the DOM compared to `trigger`. // pass in "extra" info to the intercept. $(this).triggerHandler(types, { context: context, args: args }); return this; // for chaining }; EmitterMixin.prototype.hasHandlers = function (type) { var hash = $._data(this, 'events'); // http://blog.jquery.com/2012/08/09/jquery-1-8-released/ return hash && hash[type] && hash[type].length > 0; }; return EmitterMixin; }(Mixin_1.default)); exports.default = EmitterMixin; /***/ }), /* 12 */ /***/ (function(module, exports) { Object.defineProperty(exports, "__esModule", { value: true }); /* Meant to be immutable */ var ComponentFootprint = /** @class */ (function () { function ComponentFootprint(unzonedRange, isAllDay) { this.isAllDay = false; // component can choose to ignore this this.unzonedRange = unzonedRange; this.isAllDay = isAllDay; } /* Only works for non-open-ended ranges. */ ComponentFootprint.prototype.toLegacy = function (calendar) { return { start: calendar.msToMoment(this.unzonedRange.startMs, this.isAllDay), end: calendar.msToMoment(this.unzonedRange.endMs, this.isAllDay) }; }; return ComponentFootprint; }()); exports.default = ComponentFootprint; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(2); var EventDef_1 = __webpack_require__(34); var EventInstance_1 = __webpack_require__(209); var EventDateProfile_1 = __webpack_require__(17); var SingleEventDef = /** @class */ (function (_super) { tslib_1.__extends(SingleEventDef, _super); function SingleEventDef() { return _super !== null && _super.apply(this, arguments) || this; } /* Will receive start/end params, but will be ignored. */ SingleEventDef.prototype.buildInstances = function () { return [this.buildInstance()]; }; SingleEventDef.prototype.buildInstance = function () { return new EventInstance_1.default(this, // definition this.dateProfile); }; SingleEventDef.prototype.isAllDay = function () { return this.dateProfile.isAllDay(); }; SingleEventDef.prototype.clone = function () { var def = _super.prototype.clone.call(this); def.dateProfile = this.dateProfile; return def; }; SingleEventDef.prototype.rezone = function () { var calendar = this.source.calendar; var dateProfile = this.dateProfile; this.dateProfile = new EventDateProfile_1.default(calendar.moment(dateProfile.start), dateProfile.end ? calendar.moment(dateProfile.end) : null, calendar); }; /* NOTE: if super-method fails, should still attempt to apply */ SingleEventDef.prototype.applyManualStandardProps = function (rawProps) { var superSuccess = _super.prototype.applyManualStandardProps.call(this, rawProps); var dateProfile = EventDateProfile_1.default.parse(rawProps, this.source); // returns null on failure if (dateProfile) { this.dateProfile = dateProfile; // make sure `date` shows up in the legacy event objects as-is if (rawProps.date != null) { this.miscProps.date = rawProps.date; } return superSuccess; } else { return false; } }; return SingleEventDef; }(EventDef_1.default)); exports.default = SingleEventDef; // Parsing // --------------------------------------------------------------------------------------------------------------------- SingleEventDef.defineStandardProps({ start: false, date: false, end: false, allDay: false }); /***/ }), /* 14 */ /***/ (function(module, exports) { Object.defineProperty(exports, "__esModule", { value: true }); var Mixin = /** @class */ (function () { function Mixin() { } Mixin.mixInto = function (destClass) { var _this = this; Object.getOwnPropertyNames(this.prototype).forEach(function (name) { if (!destClass.prototype[name]) { destClass.prototype[name] = _this.prototype[name]; } }); }; /* will override existing methods TODO: remove! not used anymore */ Mixin.mixOver = function (destClass) { var _this = this; Object.getOwnPropertyNames(this.prototype).forEach(function (name) { destClass.prototype[name] = _this.prototype[name]; }); }; return Mixin; }()); exports.default = Mixin; /***/ }), /* 15 */ /***/ (function(module, exports) { Object.defineProperty(exports, "__esModule", { value: true }); var Interaction = /** @class */ (function () { function Interaction(component) { this.view = component._getView(); this.component = component; } Interaction.prototype.opt = function (name) { return this.view.opt(name); }; Interaction.prototype.end = function () { // subclasses can implement }; return Interaction; }()); exports.default = Interaction; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); exports.version = '3.9.0'; // When introducing internal API incompatibilities (where fullcalendar plugins would break), // the minor version of the calendar should be upped (ex: 2.7.2 -> 2.8.0) // and the below integer should be incremented. exports.internalApiVersion = 12; var util_1 = __webpack_require__(4); exports.applyAll = util_1.applyAll; exports.debounce = util_1.debounce; exports.isInt = util_1.isInt; exports.htmlEscape = util_1.htmlEscape; exports.cssToStr = util_1.cssToStr; exports.proxy = util_1.proxy; exports.capitaliseFirstLetter = util_1.capitaliseFirstLetter; exports.getOuterRect = util_1.getOuterRect; exports.getClientRect = util_1.getClientRect; exports.getContentRect = util_1.getContentRect; exports.getScrollbarWidths = util_1.getScrollbarWidths; exports.preventDefault = util_1.preventDefault; exports.parseFieldSpecs = util_1.parseFieldSpecs; exports.compareByFieldSpecs = util_1.compareByFieldSpecs; exports.compareByFieldSpec = util_1.compareByFieldSpec; exports.flexibleCompare = util_1.flexibleCompare; exports.computeGreatestUnit = util_1.computeGreatestUnit; exports.divideRangeByDuration = util_1.divideRangeByDuration; exports.divideDurationByDuration = util_1.divideDurationByDuration; exports.multiplyDuration = util_1.multiplyDuration; exports.durationHasTime = util_1.durationHasTime; exports.log = util_1.log; exports.warn = util_1.warn; exports.removeExact = util_1.removeExact; exports.intersectRects = util_1.intersectRects; var date_formatting_1 = __webpack_require__(47); exports.formatDate = date_formatting_1.formatDate; exports.formatRange = date_formatting_1.formatRange; exports.queryMostGranularFormatUnit = date_formatting_1.queryMostGranularFormatUnit; var locale_1 = __webpack_require__(31); exports.datepickerLocale = locale_1.datepickerLocale; exports.locale = locale_1.locale; var moment_ext_1 = __webpack_require__(10); exports.moment = moment_ext_1.default; var EmitterMixin_1 = __webpack_require__(11); exports.EmitterMixin = EmitterMixin_1.default; var ListenerMixin_1 = __webpack_require__(7); exports.ListenerMixin = ListenerMixin_1.default; var Model_1 = __webpack_require__(48); exports.Model = Model_1.default; var Constraints_1 = __webpack_require__(207); exports.Constraints = Constraints_1.default; var UnzonedRange_1 = __webpack_require__(5); exports.UnzonedRange = UnzonedRange_1.default; var ComponentFootprint_1 = __webpack_require__(12); exports.ComponentFootprint = ComponentFootprint_1.default; var BusinessHourGenerator_1 = __webpack_require__(212); exports.BusinessHourGenerator = BusinessHourGenerator_1.default; var EventDef_1 = __webpack_require__(34); exports.EventDef = EventDef_1.default; var EventDefMutation_1 = __webpack_require__(37); exports.EventDefMutation = EventDefMutation_1.default; var EventSourceParser_1 = __webpack_require__(38); exports.EventSourceParser = EventSourceParser_1.default; var EventSource_1 = __webpack_require__(6); exports.EventSource = EventSource_1.default; var ThemeRegistry_1 = __webpack_require__(51); exports.defineThemeSystem = ThemeRegistry_1.defineThemeSystem; var EventInstanceGroup_1 = __webpack_require__(18); exports.EventInstanceGroup = EventInstanceGroup_1.default; var ArrayEventSource_1 = __webpack_require__(52); exports.ArrayEventSource = ArrayEventSource_1.default; var FuncEventSource_1 = __webpack_require__(215); exports.FuncEventSource = FuncEventSource_1.default; var JsonFeedEventSource_1 = __webpack_require__(216); exports.JsonFeedEventSource = JsonFeedEventSource_1.default; var EventFootprint_1 = __webpack_require__(36); exports.EventFootprint = EventFootprint_1.default; var Class_1 = __webpack_require__(33); exports.Class = Class_1.default; var Mixin_1 = __webpack_require__(14); exports.Mixin = Mixin_1.default; var CoordCache_1 = __webpack_require__(53); exports.CoordCache = CoordCache_1.default; var DragListener_1 = __webpack_require__(54); exports.DragListener = DragListener_1.default; var Promise_1 = __webpack_require__(20); exports.Promise = Promise_1.default; var TaskQueue_1 = __webpack_require__(217); exports.TaskQueue = TaskQueue_1.default; var RenderQueue_1 = __webpack_require__(218); exports.RenderQueue = RenderQueue_1.default; var Scroller_1 = __webpack_require__(39); exports.Scroller = Scroller_1.default; var Theme_1 = __webpack_require__(19); exports.Theme = Theme_1.default; var DateComponent_1 = __webpack_require__(219); exports.DateComponent = DateComponent_1.default; var InteractiveDateComponent_1 = __webpack_require__(40); exports.InteractiveDateComponent = InteractiveDateComponent_1.default; var Calendar_1 = __webpack_require__(220); exports.Calendar = Calendar_1.default; var View_1 = __webpack_require__(41); exports.View = View_1.default; var ViewRegistry_1 = __webpack_require__(22); exports.defineView = ViewRegistry_1.defineView; exports.getViewConfig = ViewRegistry_1.getViewConfig; var DayTableMixin_1 = __webpack_require__(55); exports.DayTableMixin = DayTableMixin_1.default; var BusinessHourRenderer_1 = __webpack_require__(56); exports.BusinessHourRenderer = BusinessHourRenderer_1.default; var EventRenderer_1 = __webpack_require__(42); exports.EventRenderer = EventRenderer_1.default; var FillRenderer_1 = __webpack_require__(57); exports.FillRenderer = FillRenderer_1.default; var HelperRenderer_1 = __webpack_require__(58); exports.HelperRenderer = HelperRenderer_1.default; var ExternalDropping_1 = __webpack_require__(222); exports.ExternalDropping = ExternalDropping_1.default; var EventResizing_1 = __webpack_require__(223); exports.EventResizing = EventResizing_1.default; var EventPointing_1 = __webpack_require__(59); exports.EventPointing = EventPointing_1.default; var EventDragging_1 = __webpack_require__(224); exports.EventDragging = EventDragging_1.default; var DateSelecting_1 = __webpack_require__(225); exports.DateSelecting = DateSelecting_1.default; var StandardInteractionsMixin_1 = __webpack_require__(60); exports.StandardInteractionsMixin = StandardInteractionsMixin_1.default; var AgendaView_1 = __webpack_require__(226); exports.AgendaView = AgendaView_1.default; var TimeGrid_1 = __webpack_require__(227); exports.TimeGrid = TimeGrid_1.default; var DayGrid_1 = __webpack_require__(61); exports.DayGrid = DayGrid_1.default; var BasicView_1 = __webpack_require__(62); exports.BasicView = BasicView_1.default; var MonthView_1 = __webpack_require__(229); exports.MonthView = MonthView_1.default; var ListView_1 = __webpack_require__(230); exports.ListView = ListView_1.default; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var UnzonedRange_1 = __webpack_require__(5); /* Meant to be immutable */ var EventDateProfile = /** @class */ (function () { function EventDateProfile(start, end, calendar) { this.start = start; this.end = end || null; this.unzonedRange = this.buildUnzonedRange(calendar); } /* Needs an EventSource object */ EventDateProfile.parse = function (rawProps, source) { var startInput = rawProps.start || rawProps.date; var endInput = rawProps.end; if (!startInput) { return false; } var calendar = source.calendar; var start = calendar.moment(startInput); var end = endInput ? calendar.moment(endInput) : null; var forcedAllDay = rawProps.allDay; var forceEventDuration = calendar.opt('forceEventDuration'); if (!start.isValid()) { return false; } if (end && (!end.isValid() || !end.isAfter(start))) { end = null; } if (forcedAllDay == null) { forcedAllDay = source.allDayDefault; if (forcedAllDay == null) { forcedAllDay = calendar.opt('allDayDefault'); } } if (forcedAllDay === true) { start.stripTime(); if (end) { end.stripTime(); } } else if (forcedAllDay === false) { if (!start.hasTime()) { start.time(0); } if (end && !end.hasTime()) { end.time(0); } } if (!end && forceEventDuration) { end = calendar.getDefaultEventEnd(!start.hasTime(), start); } return new EventDateProfile(start, end, calendar); }; EventDateProfile.isStandardProp = function (propName) { return propName === 'start' || propName === 'date' || propName === 'end' || propName === 'allDay'; }; EventDateProfile.prototype.isAllDay = function () { return !(this.start.hasTime() || (this.end && this.end.hasTime())); }; /* Needs a Calendar object */ EventDateProfile.prototype.buildUnzonedRange = function (calendar) { var startMs = this.start.clone().stripZone().valueOf(); var endMs = this.getEnd(calendar).stripZone().valueOf(); return new UnzonedRange_1.default(startMs, endMs); }; /* Needs a Calendar object */ EventDateProfile.prototype.getEnd = function (calendar) { return this.end ? this.end.clone() : // derive the end from the start and allDay. compute allDay if necessary calendar.getDefaultEventEnd(this.isAllDay(), this.start); }; return EventDateProfile; }()); exports.default = EventDateProfile; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var UnzonedRange_1 = __webpack_require__(5); var util_1 = __webpack_require__(35); var EventRange_1 = __webpack_require__(211); /* It's expected that there will be at least one EventInstance, OR that an explicitEventDef is assigned. */ var EventInstanceGroup = /** @class */ (function () { function EventInstanceGroup(eventInstances) { this.eventInstances = eventInstances || []; } EventInstanceGroup.prototype.getAllEventRanges = function (constraintRange) { if (constraintRange) { return this.sliceNormalRenderRanges(constraintRange); } else { return this.eventInstances.map(util_1.eventInstanceToEventRange); } }; EventInstanceGroup.prototype.sliceRenderRanges = function (constraintRange) { if (this.isInverse()) { return this.sliceInverseRenderRanges(constraintRange); } else { return this.sliceNormalRenderRanges(constraintRange); } }; EventInstanceGroup.prototype.sliceNormalRenderRanges = function (constraintRange) { var eventInstances = this.eventInstances; var i; var eventInstance; var slicedRange; var slicedEventRanges = []; for (i = 0; i < eventInstances.length; i++) { eventInstance = eventInstances[i]; slicedRange = eventInstance.dateProfile.unzonedRange.intersect(constraintRange); if (slicedRange) { slicedEventRanges.push(new EventRange_1.default(slicedRange, eventInstance.def, eventInstance)); } } return slicedEventRanges; }; EventInstanceGroup.prototype.sliceInverseRenderRanges = function (constraintRange) { var unzonedRanges = this.eventInstances.map(util_1.eventInstanceToUnzonedRange); var ownerDef = this.getEventDef(); unzonedRanges = UnzonedRange_1.default.invertRanges(unzonedRanges, constraintRange); return unzonedRanges.map(function (unzonedRange) { return new EventRange_1.default(unzonedRange, ownerDef); // don't give an EventInstance }); }; EventInstanceGroup.prototype.isInverse = function () { return this.getEventDef().hasInverseRendering(); }; EventInstanceGroup.prototype.getEventDef = function () { return this.explicitEventDef || this.eventInstances[0].def; }; return EventInstanceGroup; }()); exports.default = EventInstanceGroup; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var $ = __webpack_require__(3); var Theme = /** @class */ (function () { function Theme(optionsManager) { this.optionsManager = optionsManager; this.processIconOverride(); } Theme.prototype.processIconOverride = function () { if (this.iconOverrideOption) { this.setIconOverride(this.optionsManager.get(this.iconOverrideOption)); } }; Theme.prototype.setIconOverride = function (iconOverrideHash) { var iconClassesCopy; var buttonName; if ($.isPlainObject(iconOverrideHash)) { iconClassesCopy = $.extend({}, this.iconClasses); for (buttonName in iconOverrideHash) { iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]); } this.iconClasses = iconClassesCopy; } else if (iconOverrideHash === false) { this.iconClasses = {}; } }; Theme.prototype.applyIconOverridePrefix = function (className) { var prefix = this.iconOverridePrefix; if (prefix && className.indexOf(prefix) !== 0) { className = prefix + className; } return className; }; Theme.prototype.getClass = function (key) { return this.classes[key] || ''; }; Theme.prototype.getIconClass = function (buttonName) { var className = this.iconClasses[buttonName]; if (className) { return this.baseIconClass + ' ' + className; } return ''; }; Theme.prototype.getCustomButtonIconClass = function (customButtonProps) { var className; if (this.iconOverrideCustomButtonOption) { className = customButtonProps[this.iconOverrideCustomButtonOption]; if (className) { return this.baseIconClass + ' ' + this.applyIconOverridePrefix(className); } } return ''; }; return Theme; }()); exports.default = Theme; Theme.prototype.classes = {}; Theme.prototype.iconClasses = {}; Theme.prototype.baseIconClass = ''; Theme.prototype.iconOverridePrefix = ''; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", { value: true }); var $ = __webpack_require__(3); var PromiseStub = { construct: function (executor) { var deferred = $.Deferred(); var promise = deferred.promise(); if (typeof executor === 'function') { executor(function (val) { deferred.resolve(val);
Compartilhar