diff --git a/composer.json b/composer.json index ab322b0a..0951234b 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,8 @@ "simplesoftwareio/simple-qrcode": "^4.2", "spatie/laravel-sluggable": "^3.4", "stevebauman/location": "^7.2.0", - "twilio/sdk": "^7.16" + "twilio/sdk": "^7.16", + "vedmant/laravel-shortcodes": "^1.1" }, "require-dev": { "mockery/mockery": "^1.0", @@ -77,7 +78,8 @@ "Coderstm\\Providers\\CoderstmServiceProvider", "Coderstm\\Providers\\CoderstmPermissionsServiceProvider", "Coderstm\\Providers\\CoderstmEventServiceProvider", - "Coderstm\\Providers\\FirebaseMessagingServiceProvider" + "Coderstm\\Providers\\FirebaseMessagingServiceProvider", + "Coderstm\\Providers\\ShortcodeServiceProvider" ] } }, diff --git a/database/migrations/2023_04_22_110537_create_blogs_table.php b/database/migrations/2023_04_22_110537_create_blogs_table.php index d8a508d1..be146dbc 100644 --- a/database/migrations/2023_04_22_110537_create_blogs_table.php +++ b/database/migrations/2023_04_22_110537_create_blogs_table.php @@ -22,8 +22,8 @@ public function up() $table->string('slug')->unique(); $table->longText('description'); $table->string('meta_title')->nullable(); - $table->text('meta_keywords')->nullable(); - $table->text('meta_description')->nullable(); + $table->string('meta_keywords')->nullable(); + $table->string('meta_description')->nullable(); $table->boolean('is_active')->nullable()->default(true); $table->timestamps(); $table->softDeletes(); diff --git a/database/migrations/2024_04_23_205120_create_pages_table.php b/database/migrations/2024_04_23_205120_create_pages_table.php new file mode 100644 index 00000000..a56d9cd3 --- /dev/null +++ b/database/migrations/2024_04_23_205120_create_pages_table.php @@ -0,0 +1,51 @@ +id(); + $table->string('title'); + $table->string('slug')->unique(); + $table->{$this->jsonable()}('data')->nullable(); + $table->longText('body')->nullable(); + $table->longText('styles')->nullable(); + $table->string('meta_title')->nullable(); + $table->string('meta_keywords')->nullable(); + $table->string('meta_description')->nullable(); + $table->boolean('is_active')->nullable()->default(true); + $table->string('template')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + + $this->setAutoIncrement('pages'); + + Schema::create('page_templates', function (Blueprint $table) { + $table->id(); + $table->string('name'); + $table->{$this->jsonable()}('data')->nullable(); + $table->text('thumbnail')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('pages'); + } +}; diff --git a/public/css/styles.css b/public/css/styles.css new file mode 100644 index 00000000..72048a14 --- /dev/null +++ b/public/css/styles.css @@ -0,0 +1,10 @@ +.fc-toolbar-chunk button { + text-transform: capitalize; + padding: .375rem .75rem; +} + +.fc-toolbar-chunk .fc-prev-button, +.fc-toolbar-chunk .fc-next-button { + background: var(--primary); + color: white +} \ No newline at end of file diff --git a/public/js/bootstrap.min.js b/public/js/bootstrap.min.js new file mode 100644 index 00000000..44d24b32 --- /dev/null +++ b/public/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(e),a=i(n);function s(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};d.jQueryDetection(),o.default.fn.emulateTransitionEnd=u,o.default.event.special[d.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(o.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var f="alert",c=o.default.fn[f],h=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.default.removeData(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){var e=d.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=o.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=o.default.Event("close.bs.alert");return o.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(o.default(t).removeClass("show"),o.default(t).hasClass("fade")){var n=d.getTransitionDurationFromElement(t);o.default(t).one(d.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){o.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.alert");i||(i=new t(this),n.data("bs.alert",i)),"close"===e&&i[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},l(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();o.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',h._handleDismiss(new h)),o.default.fn[f]=h._jQueryInterface,o.default.fn[f].Constructor=h,o.default.fn[f].noConflict=function(){return o.default.fn[f]=c,h._jQueryInterface};var g=o.default.fn.button,m=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=o.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var i=this._element.querySelector('input:not([type="hidden"])');if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains("active"))t=!1;else{var a=n.querySelector(".active");a&&o.default(a).removeClass("active")}t&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains("active")),this.shouldAvoidTriggerChange||o.default(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&o.default(this._element).toggleClass("active"))},e.dispose=function(){o.default.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var i=o.default(this),a=i.data("bs.button");a||(a=new t(this),i.data("bs.button",a)),a.shouldAvoidTriggerChange=n,"toggle"===e&&a[e]()}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();o.default(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=t.target,n=e;if(o.default(e).hasClass("btn")||(e=o.default(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var i=e.querySelector('input:not([type="hidden"])');if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||m._jQueryInterface.call(o.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=o.default(t.target).closest(".btn")[0];o.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),o.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){var t=o.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(d.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(".active.carousel-item");var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)o.default(this._element).one("slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},e.dispose=function(){o.default(this._element).off(_),o.default.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=r({},b,t),d.typeCheckConfig(p,t,y),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&o.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&o.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&E[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&E[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(o.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(o.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),o.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),a=this._items.length-1;if((i&&0===o||n&&o===a)&&!this._config.wrap)return e;var s=(o+("prev"===t?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(".active.carousel-item")),a=o.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n});return o.default(this._element).trigger(a),a},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));o.default(e).removeClass("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&o.default(n).addClass("active")}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(".active.carousel-item");if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,i,a,s=this,l=this._element.querySelector(".active.carousel-item"),r=this._getItemIndex(l),u=e||l&&this._getItemByDirection(t,l),f=this._getItemIndex(u),c=Boolean(this._interval);if("next"===t?(n="carousel-item-left",i="carousel-item-next",a="left"):(n="carousel-item-right",i="carousel-item-prev",a="right"),u&&o.default(u).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&l&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u),this._activeElement=u;var h=o.default.Event("slid.bs.carousel",{relatedTarget:u,direction:a,from:r,to:f});if(o.default(this._element).hasClass("slide")){o.default(u).addClass(i),d.reflow(u),o.default(l).addClass(n),o.default(u).addClass(n);var g=d.getTransitionDurationFromElement(l);o.default(l).one(d.TRANSITION_END,(function(){o.default(u).removeClass(n+" "+i).addClass("active"),o.default(l).removeClass("active "+i+" "+n),s._isSliding=!1,setTimeout((function(){return o.default(s._element).trigger(h)}),0)})).emulateTransitionEnd(g)}else o.default(l).removeClass("active"),o.default(u).addClass("active"),this._isSliding=!1,o.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data("bs.carousel"),i=r({},b,o.default(this).data());"object"==typeof e&&(i=r({},i,e));var a="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),o.default(this).data("bs.carousel",n)),"number"==typeof e)n.to(e);else if("string"==typeof a){if("undefined"==typeof n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=d.getSelectorFromElement(this);if(n){var i=o.default(n)[0];if(i&&o.default(i).hasClass("carousel")){var a=r({},o.default(i).data(),o.default(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),t._jQueryInterface.call(o.default(i),a),s&&o.default(i).data("bs.carousel").to(s),e.preventDefault()}}},l(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return b}}]),t}();o.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",w._dataApiClickHandler),o.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e0&&(this._selector=s,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){o.default(this._element).hasClass("show")?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!this._isTransitioning&&!o.default(this._element).hasClass("show")&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains("collapse")}))).length&&(e=null),!(e&&(n=o.default(e).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var a=o.default.Event("show.bs.collapse");if(o.default(this._element).trigger(a),!a.isDefaultPrevented()){e&&(t._jQueryInterface.call(o.default(e).not(this._selector),"hide"),n||o.default(e).data("bs.collapse",null));var s=this._getDimension();o.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&o.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(s[0].toUpperCase()+s.slice(1)),r=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,(function(){o.default(i._element).removeClass("collapsing").addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),o.default(i._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(r),this._element.style[s]=this._element[l]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&o.default(this._element).hasClass("show")){var e=o.default.Event("hide.bs.collapse");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",d.reflow(this._element),o.default(this._element).addClass("collapsing").removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var a=0;a0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),r({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data("bs.dropdown");if(n||(n=new t(this,"object"==typeof e?e:null),o.default(this).data("bs.dropdown",n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),i=0,a=n.length;i0&&s--,40===e.which&&sdocument.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var i=d.getTransitionDurationFromElement(this._dialog);o.default(this._element).off(d.TRANSITION_END),o.default(this._element).one(d.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),n||o.default(t._element).one(d.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,i)})).emulateTransitionEnd(i),this._element.focus()}},e._showElement=function(t){var e=this,n=o.default(this._element).hasClass("fade"),i=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),o.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,n&&d.reflow(this._element),o.default(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var a=o.default.Event("shown.bs.modal",{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,o.default(e._element).trigger(a)};if(n){var l=d.getTransitionDurationFromElement(this._dialog);o.default(this._dialog).one(d.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._enforceFocus=function(){var t=this;o.default(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(e){document!==e.target&&t._element!==e.target&&0===o.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?o.default(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||o.default(this._element).off("keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?o.default(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):o.default(window).off("resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){o.default(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),o.default(t._element).trigger("hidden.bs.modal")}))},e._removeBackdrop=function(){this._backdrop&&(o.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=o.default(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),o.default(this._backdrop).appendTo(document.body),o.default(this._element).on("click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&d.reflow(this._backdrop),o.default(this._backdrop).addClass("show"),!t)return;if(!n)return void t();var i=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){o.default(this._backdrop).removeClass("show");var a=function(){e._removeBackdrop(),t&&t()};if(o.default(this._element).hasClass("fade")){var s=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:Q,popperConfig:null},$={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},J=function(){function t(t,e){if("undefined"==typeof a.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=o.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(o.default(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),o.default.removeData(this.element,this.constructor.DATA_KEY),o.default(this.element).off(this.constructor.EVENT_KEY),o.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&o.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===o.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=o.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){o.default(this.element).trigger(e);var n=d.findShadowRoot(this.element),i=o.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!i)return;var s=this.getTipElement(),l=d.getUID(this.constructor.NAME);s.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&o.default(s).addClass("fade");var r="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(r);this.addAttachmentClass(u);var f=this._getContainer();o.default(s).data(this.constructor.DATA_KEY,this),o.default.contains(this.element.ownerDocument.documentElement,this.tip)||o.default(s).appendTo(f),o.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,s,this._getPopperConfig(u)),o.default(s).addClass("show"),o.default(s).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&o.default(document.body).children().on("mouseover",null,o.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,o.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)};if(o.default(this.tip).hasClass("fade")){var h=d.getTransitionDurationFromElement(this.tip);o.default(this.tip).one(d.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=o.default.Event(this.constructor.Event.HIDE),a=function(){"show"!==e._hoverState&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),o.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(o.default(this.element).trigger(i),!i.isDefaultPrevented()){if(o.default(n).removeClass("show"),"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,o.default(this.tip).hasClass("fade")){var s=d.getTransitionDurationFromElement(n);o.default(n).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),o.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=U(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?o.default(e).parent().is(t)||t.empty().append(e):t.text(o.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return r({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:d.isElement(this.config.container)?o.default(this.config.container):o.default(document).find(this.config.container)},e._getAttachment=function(t){return X[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)o.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;o.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},o.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),o.default(e.getTipElement()).hasClass("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=o.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==z.indexOf(t)&&delete e[t]})),"number"==typeof(t=r({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d.typeCheckConfig(M,t,this.constructor.DefaultType),t.sanitize&&(t.template=U(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(V);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(o.default(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.tooltip"),a="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new t(this,a),n.data("bs.tooltip",i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return Y}},{key:"NAME",get:function(){return M}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return $}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return K}}]),t}();o.default.fn[M]=J._jQueryInterface,o.default.fn[M].Constructor=J,o.default.fn[M].noConflict=function(){return o.default.fn[M]=W,J._jQueryInterface};var G="popover",Z=o.default.fn[G],tt=new RegExp("(^|\\s)bs-popover\\S+","g"),et=r({},J.Default,{placement:"right",trigger:"click",content:"",template:''}),nt=r({},J.DefaultType,{content:"(string|element|function)"}),it={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},ot=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var a=i.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},a.setContent=function(){var t=o.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(tt);null!==e&&e.length>0&&t.removeClass(e.join(""))},i._jQueryInterface=function(t){return this.each((function(){var e=o.default(this).data("bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n),o.default(this).data("bs.popover",e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},l(i,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return et}},{key:"NAME",get:function(){return G}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return it}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return nt}}]),i}(J);o.default.fn[G]=ot._jQueryInterface,o.default.fn[G].Constructor=ot,o.default.fn[G].noConflict=function(){return o.default.fn[G]=Z,ot._jQueryInterface};var at="scrollspy",st=o.default.fn[at],lt={offset:10,method:"auto",target:""},rt={offset:"number",method:"string",target:"(string|element)"},ut=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,o.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,a=d.getSelectorFromElement(t);if(a&&(e=document.querySelector(a)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[o.default(e)[n]().top+i,a]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){o.default.removeData(this._element,"bs.scrollspy"),o.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=r({},lt,"object"==typeof t&&t?t:{})).target&&d.isElement(t.target)){var e=o.default(t.target).attr("id");e||(e=d.getUID(at),o.default(t.target).attr("id",e)),t.target="#"+e}return d.typeCheckConfig(at,t,rt),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active":".active";n=(n=o.default.makeArray(o.default(i).find(s)))[n.length-1]}var l=o.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=o.default.Event("show.bs.tab",{relatedTarget:n});if(n&&o.default(n).trigger(l),o.default(this._element).trigger(r),!r.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(e=document.querySelector(a)),this._activate(this._element,i);var u=function(){var e=o.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=o.default.Event("shown.bs.tab",{relatedTarget:n});o.default(n).trigger(e),o.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){o.default.removeData(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,n){var i=this,a=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?o.default(e).children(".active"):o.default(e).find("> li > .active"))[0],s=n&&a&&o.default(a).hasClass("fade"),l=function(){return i._transitionComplete(t,a,n)};if(a&&s){var r=d.getTransitionDurationFromElement(a);o.default(a).removeClass("show").one(d.TRANSITION_END,l).emulateTransitionEnd(r)}else l()},e._transitionComplete=function(t,e,n){if(e){o.default(e).removeClass("active");var i=o.default(e.parentNode).find("> .dropdown-menu .active")[0];i&&o.default(i).removeClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(o.default(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),d.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&o.default(t.parentNode).hasClass("dropdown-menu")){var a=o.default(t).closest(".dropdown")[0];if(a){var s=[].slice.call(a.querySelectorAll(".dropdown-toggle"));o.default(s).addClass("active")}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.tab");if(i||(i=new t(this),n.data("bs.tab",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();o.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ft._jQueryInterface.call(o.default(this),"show")})),o.default.fn.tab=ft._jQueryInterface,o.default.fn.tab.Constructor=ft,o.default.fn.tab.noConflict=function(){return o.default.fn.tab=dt,ft._jQueryInterface};var ct=o.default.fn.toast,ht={animation:"boolean",autohide:"boolean",delay:"number"},gt={animation:!0,autohide:!0,delay:500},mt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=o.default.Event("show.bs.toast");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),o.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),d.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var i=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},e.hide=function(){if(this._element.classList.contains("show")){var t=o.default.Event("hide.bs.toast");o.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),o.default(this._element).off("click.dismiss.bs.toast"),o.default.removeData(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=r({},gt,o.default(this._element).data(),"object"==typeof t&&t?t:{}),d.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;o.default(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add("hide"),o.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.toast");if(i||(i=new t(this,"object"==typeof e&&e),n.data("bs.toast",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e](this)}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"DefaultType",get:function(){return ht}},{key:"Default",get:function(){return gt}}]),t}();o.default.fn.toast=mt._jQueryInterface,o.default.fn.toast.Constructor=mt,o.default.fn.toast.noConflict=function(){return o.default.fn.toast=ct,mt._jQueryInterface},t.Alert=h,t.Button=m,t.Carousel=w,t.Collapse=D,t.Dropdown=x,t.Modal=q,t.Popover=ot,t.Scrollspy=ut,t.Tab=ft,t.Toast=mt,t.Tooltip=J,t.Util=d,Object.defineProperty(t,"__esModule",{value:!0})})); +//# sourceMappingURL=bootstrap.min.js.map \ No newline at end of file diff --git a/public/js/fullcalendar/locales-all.js b/public/js/fullcalendar/locales-all.js new file mode 100644 index 00000000..a4c7e842 --- /dev/null +++ b/public/js/fullcalendar/locales-all.js @@ -0,0 +1,1854 @@ +[].push.apply(FullCalendar.globalLocales, function () { + 'use strict'; + + var l0 = { + code: "af", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Vorige", + next: "Volgende", + today: "Vandag", + year: "Jaar", + month: "Maand", + week: "Week", + day: "Dag", + list: "Agenda" + }, + allDayText: "Heeldag", + moreLinkText: "Addisionele", + noEventsText: "Daar is geen gebeurtenisse nie" + }; + + var l1 = { + code: "ar-dz", + week: { + dow: 0, + doy: 4 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + var l2 = { + code: "ar-kw", + week: { + dow: 0, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + var l3 = { + code: "ar-ly", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + var l4 = { + code: "ar-ma", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + var l5 = { + code: "ar-sa", + week: { + dow: 0, + doy: 6 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + var l6 = { + code: "ar-tn", + week: { + dow: 1, + doy: 4 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + var l7 = { + code: "ar", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + var l8 = { + code: "az", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u018Fvv\u0259l", + next: "Sonra", + today: "Bu G\xFCn", + month: "Ay", + week: "H\u0259ft\u0259", + day: "G\xFCn", + list: "G\xFCnd\u0259m" + }, + weekText: "H\u0259ft\u0259", + allDayText: "B\xFCt\xFCn G\xFCn", + moreLinkText: function(n) { + return "+ daha \xE7ox " + n; + }, + noEventsText: "G\xF6st\u0259rm\u0259k \xFC\xE7\xFCn hadis\u0259 yoxdur" + }; + + var l9 = { + code: "bg", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u043D\u0430\u0437\u0430\u0434", + next: "\u043D\u0430\u043F\u0440\u0435\u0434", + today: "\u0434\u043D\u0435\u0441", + month: "\u041C\u0435\u0441\u0435\u0446", + week: "\u0421\u0435\u0434\u043C\u0438\u0446\u0430", + day: "\u0414\u0435\u043D", + list: "\u0413\u0440\u0430\u0444\u0438\u043A" + }, + allDayText: "\u0426\u044F\u043B \u0434\u0435\u043D", + moreLinkText: function(n) { + return "+\u043E\u0449\u0435 " + n; + }, + noEventsText: "\u041D\u044F\u043C\u0430 \u0441\u044A\u0431\u0438\u0442\u0438\u044F \u0437\u0430 \u043F\u043E\u043A\u0430\u0437\u0432\u0430\u043D\u0435" + }; + + var l10 = { + code: "bn", + week: { + dow: 0, + doy: 6 + }, + buttonText: { + prev: "\u09AA\u09C7\u099B\u09A8\u09C7", + next: "\u09B8\u09BE\u09AE\u09A8\u09C7", + today: "\u0986\u099C", + month: "\u09AE\u09BE\u09B8", + week: "\u09B8\u09AA\u09CD\u09A4\u09BE\u09B9", + day: "\u09A6\u09BF\u09A8", + list: "\u09A4\u09BE\u09B2\u09BF\u0995\u09BE" + }, + weekText: "\u09B8\u09AA\u09CD\u09A4\u09BE\u09B9", + allDayText: "\u09B8\u09BE\u09B0\u09BE\u09A6\u09BF\u09A8", + moreLinkText: function(n) { + return "+\u0985\u09A8\u09CD\u09AF\u09BE\u09A8\u09CD\u09AF " + n; + }, + noEventsText: "\u0995\u09CB\u09A8\u09CB \u0987\u09AD\u09C7\u09A8\u09CD\u099F \u09A8\u09C7\u0987" + }; + + var l11 = { + code: "bs", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Pro\u0161li", + next: "Sljede\u0107i", + today: "Danas", + month: "Mjesec", + week: "Sedmica", + day: "Dan", + list: "Raspored" + }, + weekText: "Sed", + allDayText: "Cijeli dan", + moreLinkText: function(n) { + return "+ jo\u0161 " + n; + }, + noEventsText: "Nema doga\u0111aja za prikazivanje" + }; + + var l12 = { + code: "ca", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Anterior", + next: "Seg\xFCent", + today: "Avui", + month: "Mes", + week: "Setmana", + day: "Dia", + list: "Agenda" + }, + weekText: "Set", + allDayText: "Tot el dia", + moreLinkText: "m\xE9s", + noEventsText: "No hi ha esdeveniments per mostrar" + }; + + var l13 = { + code: "cs", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "D\u0159\xEDve", + next: "Pozd\u011Bji", + today: "Nyn\xED", + month: "M\u011Bs\xEDc", + week: "T\xFDden", + day: "Den", + list: "Agenda" + }, + weekText: "T\xFDd", + allDayText: "Cel\xFD den", + moreLinkText: function(n) { + return "+dal\u0161\xED: " + n; + }, + noEventsText: "\u017D\xE1dn\xE9 akce k zobrazen\xED" + }; + + var l14 = { + code: "cy", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Blaenorol", + next: "Nesaf", + today: "Heddiw", + year: "Blwyddyn", + month: "Mis", + week: "Wythnos", + day: "Dydd", + list: "Rhestr" + }, + weekText: "Wythnos", + allDayText: "Trwy'r dydd", + moreLinkText: "Mwy", + noEventsText: "Dim digwyddiadau" + }; + + var l15 = { + code: "da", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Forrige", + next: "N\xE6ste", + today: "I dag", + month: "M\xE5ned", + week: "Uge", + day: "Dag", + list: "Agenda" + }, + weekText: "Uge", + allDayText: "Hele dagen", + moreLinkText: "flere", + noEventsText: "Ingen arrangementer at vise" + }; + + function affix$1(buttonText) { + return buttonText === "Tag" || buttonText === "Monat" ? "r" : buttonText === "Jahr" ? "s" : ""; + } + var l16 = { + code: "de-at", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Zur\xFCck", + next: "Vor", + today: "Heute", + year: "Jahr", + month: "Monat", + week: "Woche", + day: "Tag", + list: "Termin\xFCbersicht" + }, + weekText: "KW", + weekTextLong: "Woche", + allDayText: "Ganzt\xE4gig", + moreLinkText: function(n) { + return "+ weitere " + n; + }, + noEventsText: "Keine Ereignisse anzuzeigen", + buttonHints: { + prev: function(buttonText) { + return "Vorherige".concat(affix$1(buttonText), " ").concat(buttonText); + }, + next: function(buttonText) { + return "N\xE4chste".concat(affix$1(buttonText), " ").concat(buttonText); + }, + today: function(buttonText) { + if (buttonText === "Tag") { + return "Heute"; + } + return "Diese".concat(affix$1(buttonText), " ").concat(buttonText); + } + }, + viewHint: function(buttonText) { + var glue = buttonText === "Woche" ? "n" : buttonText === "Monat" ? "s" : "es"; + return buttonText + glue + "ansicht"; + }, + navLinkHint: "Gehe zu $0", + moreLinkHint: function(eventCnt) { + return "Zeige " + (eventCnt === 1 ? "ein weiteres Ereignis" : eventCnt + " weitere Ereignisse"); + }, + closeHint: "Schlie\xDFen", + timeHint: "Uhrzeit", + eventHint: "Ereignis" + }; + + function affix(buttonText) { + return buttonText === "Tag" || buttonText === "Monat" ? "r" : buttonText === "Jahr" ? "s" : ""; + } + var l17 = { + code: "de", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Zur\xFCck", + next: "Vor", + today: "Heute", + year: "Jahr", + month: "Monat", + week: "Woche", + day: "Tag", + list: "Termin\xFCbersicht" + }, + weekText: "KW", + weekTextLong: "Woche", + allDayText: "Ganzt\xE4gig", + moreLinkText: function(n) { + return "+ weitere " + n; + }, + noEventsText: "Keine Ereignisse anzuzeigen", + buttonHints: { + prev: function(buttonText) { + return "Vorherige".concat(affix(buttonText), " ").concat(buttonText); + }, + next: function(buttonText) { + return "N\xE4chste".concat(affix(buttonText), " ").concat(buttonText); + }, + today: function(buttonText) { + if (buttonText === "Tag") { + return "Heute"; + } + return "Diese".concat(affix(buttonText), " ").concat(buttonText); + } + }, + viewHint: function(buttonText) { + var glue = buttonText === "Woche" ? "n" : buttonText === "Monat" ? "s" : "es"; + return buttonText + glue + "ansicht"; + }, + navLinkHint: "Gehe zu $0", + moreLinkHint: function(eventCnt) { + return "Zeige " + (eventCnt === 1 ? "ein weiteres Ereignis" : eventCnt + " weitere Ereignisse"); + }, + closeHint: "Schlie\xDFen", + timeHint: "Uhrzeit", + eventHint: "Ereignis" + }; + + var l18 = { + code: "el", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03BF\u03C2", + next: "\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03BF\u03C2", + today: "\u03A3\u03AE\u03BC\u03B5\u03C1\u03B1", + month: "\u039C\u03AE\u03BD\u03B1\u03C2", + week: "\u0395\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1", + day: "\u0397\u03BC\u03AD\u03C1\u03B1", + list: "\u0391\u03C4\u03B6\u03AD\u03BD\u03C4\u03B1" + }, + weekText: "\u0395\u03B2\u03B4", + allDayText: "\u039F\u03BB\u03BF\u03AE\u03BC\u03B5\u03C1\u03BF", + moreLinkText: "\u03C0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B1", + noEventsText: "\u0394\u03B5\u03BD \u03C5\u03C0\u03AC\u03C1\u03C7\u03BF\u03C5\u03BD \u03B3\u03B5\u03B3\u03BF\u03BD\u03CC\u03C4\u03B1 \u03C0\u03C1\u03BF\u03C2 \u03B5\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7" + }; + + var l19 = { + code: "en-au", + week: { + dow: 1, + doy: 4 + }, + buttonHints: { + prev: "Previous $0", + next: "Next $0", + today: "This $0" + }, + viewHint: "$0 view", + navLinkHint: "Go to $0", + moreLinkHint: function(eventCnt) { + return "Show ".concat(eventCnt, " more event").concat(eventCnt === 1 ? "" : "s"); + } + }; + + var l20 = { + code: "en-gb", + week: { + dow: 1, + doy: 4 + }, + buttonHints: { + prev: "Previous $0", + next: "Next $0", + today: "This $0" + }, + viewHint: "$0 view", + navLinkHint: "Go to $0", + moreLinkHint: function(eventCnt) { + return "Show ".concat(eventCnt, " more event").concat(eventCnt === 1 ? "" : "s"); + } + }; + + var l21 = { + code: "en-nz", + week: { + dow: 1, + doy: 4 + }, + buttonHints: { + prev: "Previous $0", + next: "Next $0", + today: "This $0" + }, + viewHint: "$0 view", + navLinkHint: "Go to $0", + moreLinkHint: function(eventCnt) { + return "Show ".concat(eventCnt, " more event").concat(eventCnt === 1 ? "" : "s"); + } + }; + + var l22 = { + code: "eo", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Anta\u016Da", + next: "Sekva", + today: "Hodia\u016D", + month: "Monato", + week: "Semajno", + day: "Tago", + list: "Tagordo" + }, + weekText: "Sm", + allDayText: "Tuta tago", + moreLinkText: "pli", + noEventsText: "Neniuj eventoj por montri" + }; + + var l23 = { + code: "es", + week: { + dow: 0, + doy: 6 + }, + buttonText: { + prev: "Ant", + next: "Sig", + today: "Hoy", + month: "Mes", + week: "Semana", + day: "D\xEDa", + list: "Agenda" + }, + weekText: "Sm", + allDayText: "Todo el d\xEDa", + moreLinkText: "m\xE1s", + noEventsText: "No hay eventos para mostrar" + }; + + var l24 = { + code: "es", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Ant", + next: "Sig", + today: "Hoy", + month: "Mes", + week: "Semana", + day: "D\xEDa", + list: "Agenda" + }, + buttonHints: { + prev: "$0 antes", + next: "$0 siguiente", + today: function(buttonText) { + return buttonText === "D\xEDa" ? "Hoy" : (buttonText === "Semana" ? "Esta" : "Este") + " " + buttonText.toLocaleLowerCase(); + } + }, + viewHint: function(buttonText) { + return "Vista " + (buttonText === "Semana" ? "de la" : "del") + " " + buttonText.toLocaleLowerCase(); + }, + weekText: "Sm", + weekTextLong: "Semana", + allDayText: "Todo el d\xEDa", + moreLinkText: "m\xE1s", + moreLinkHint: function(eventCnt) { + return "Mostrar ".concat(eventCnt, " eventos m\xE1s"); + }, + noEventsText: "No hay eventos para mostrar", + navLinkHint: "Ir al $0", + closeHint: "Cerrar", + timeHint: "La hora", + eventHint: "Evento" + }; + + var l25 = { + code: "et", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Eelnev", + next: "J\xE4rgnev", + today: "T\xE4na", + month: "Kuu", + week: "N\xE4dal", + day: "P\xE4ev", + list: "P\xE4evakord" + }, + weekText: "n\xE4d", + allDayText: "Kogu p\xE4ev", + moreLinkText: function(n) { + return "+ veel " + n; + }, + noEventsText: "Kuvamiseks puuduvad s\xFCndmused" + }; + + var l26 = { + code: "eu", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Aur", + next: "Hur", + today: "Gaur", + month: "Hilabetea", + week: "Astea", + day: "Eguna", + list: "Agenda" + }, + weekText: "As", + allDayText: "Egun osoa", + moreLinkText: "gehiago", + noEventsText: "Ez dago ekitaldirik erakusteko" + }; + + var l27 = { + code: "fa", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0642\u0628\u0644\u06CC", + next: "\u0628\u0639\u062F\u06CC", + today: "\u0627\u0645\u0631\u0648\u0632", + month: "\u0645\u0627\u0647", + week: "\u0647\u0641\u062A\u0647", + day: "\u0631\u0648\u0632", + list: "\u0628\u0631\u0646\u0627\u0645\u0647" + }, + weekText: "\u0647\u0641", + allDayText: "\u062A\u0645\u0627\u0645 \u0631\u0648\u0632", + moreLinkText: function(n) { + return "\u0628\u06CC\u0634 \u0627\u0632 " + n; + }, + noEventsText: "\u0647\u06CC\u0686 \u0631\u0648\u06CC\u062F\u0627\u062F\u06CC \u0628\u0647 \u0646\u0645\u0627\u06CC\u0634" + }; + + var l28 = { + code: "fi", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Edellinen", + next: "Seuraava", + today: "T\xE4n\xE4\xE4n", + month: "Kuukausi", + week: "Viikko", + day: "P\xE4iv\xE4", + list: "Tapahtumat" + }, + weekText: "Vk", + allDayText: "Koko p\xE4iv\xE4", + moreLinkText: "lis\xE4\xE4", + noEventsText: "Ei n\xE4ytett\xE4vi\xE4 tapahtumia" + }; + + var l29 = { + code: "fr", + buttonText: { + prev: "Pr\xE9c\xE9dent", + next: "Suivant", + today: "Aujourd'hui", + year: "Ann\xE9e", + month: "Mois", + week: "Semaine", + day: "Jour", + list: "Mon planning" + }, + weekText: "Sem.", + allDayText: "Toute la journ\xE9e", + moreLinkText: "en plus", + noEventsText: "Aucun \xE9v\xE9nement \xE0 afficher" + }; + + var l30 = { + code: "fr-ch", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Pr\xE9c\xE9dent", + next: "Suivant", + today: "Courant", + year: "Ann\xE9e", + month: "Mois", + week: "Semaine", + day: "Jour", + list: "Mon planning" + }, + weekText: "Sm", + allDayText: "Toute la journ\xE9e", + moreLinkText: "en plus", + noEventsText: "Aucun \xE9v\xE9nement \xE0 afficher" + }; + + var l31 = { + code: "fr", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Pr\xE9c\xE9dent", + next: "Suivant", + today: "Aujourd'hui", + year: "Ann\xE9e", + month: "Mois", + week: "Semaine", + day: "Jour", + list: "Planning" + }, + weekText: "Sem.", + allDayText: "Toute la journ\xE9e", + moreLinkText: "en plus", + noEventsText: "Aucun \xE9v\xE9nement \xE0 afficher" + }; + + var l32 = { + code: "gl", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Ant", + next: "Seg", + today: "Hoxe", + month: "Mes", + week: "Semana", + day: "D\xEDa", + list: "Axenda" + }, + weekText: "Sm", + allDayText: "Todo o d\xEDa", + moreLinkText: "m\xE1is", + noEventsText: "Non hai eventos para amosar" + }; + + var l33 = { + code: "he", + direction: "rtl", + buttonText: { + prev: "\u05D4\u05E7\u05D5\u05D3\u05DD", + next: "\u05D4\u05D1\u05D0", + today: "\u05D4\u05D9\u05D5\u05DD", + month: "\u05D7\u05D5\u05D3\u05E9", + week: "\u05E9\u05D1\u05D5\u05E2", + day: "\u05D9\u05D5\u05DD", + list: "\u05E1\u05D3\u05E8 \u05D9\u05D5\u05DD" + }, + allDayText: "\u05DB\u05DC \u05D4\u05D9\u05D5\u05DD", + moreLinkText: "\u05D0\u05D7\u05E8", + noEventsText: "\u05D0\u05D9\u05DF \u05D0\u05D9\u05E8\u05D5\u05E2\u05D9\u05DD \u05DC\u05D4\u05E6\u05D2\u05D4", + weekText: "\u05E9\u05D1\u05D5\u05E2" + }; + + var l34 = { + code: "hi", + week: { + dow: 0, + doy: 6 + }, + buttonText: { + prev: "\u092A\u093F\u091B\u0932\u093E", + next: "\u0905\u0917\u0932\u093E", + today: "\u0906\u091C", + month: "\u092E\u0939\u0940\u0928\u093E", + week: "\u0938\u092A\u094D\u0924\u093E\u0939", + day: "\u0926\u093F\u0928", + list: "\u0915\u093E\u0930\u094D\u092F\u0938\u0942\u091A\u0940" + }, + weekText: "\u0939\u092B\u094D\u0924\u093E", + allDayText: "\u0938\u092D\u0940 \u0926\u093F\u0928", + moreLinkText: function(n) { + return "+\u0905\u0927\u093F\u0915 " + n; + }, + noEventsText: "\u0915\u094B\u0908 \u0918\u091F\u0928\u093E\u0913\u0902 \u0915\u094B \u092A\u094D\u0930\u0926\u0930\u094D\u0936\u093F\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" + }; + + var l35 = { + code: "hr", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Prija\u0161nji", + next: "Sljede\u0107i", + today: "Danas", + month: "Mjesec", + week: "Tjedan", + day: "Dan", + list: "Raspored" + }, + weekText: "Tje", + allDayText: "Cijeli dan", + moreLinkText: function(n) { + return "+ jo\u0161 " + n; + }, + noEventsText: "Nema doga\u0111aja za prikaz" + }; + + var l36 = { + code: "hu", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "vissza", + next: "el\u0151re", + today: "ma", + month: "H\xF3nap", + week: "H\xE9t", + day: "Nap", + list: "Lista" + }, + weekText: "H\xE9t", + allDayText: "Eg\xE9sz nap", + moreLinkText: "tov\xE1bbi", + noEventsText: "Nincs megjelen\xEDthet\u0151 esem\xE9ny" + }; + + var l37 = { + code: "hy-am", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0546\u0561\u056D\u0578\u0580\u0564", + next: "\u0540\u0561\u057B\u0578\u0580\u0564", + today: "\u0531\u0575\u057D\u0585\u0580", + month: "\u0531\u0574\u056B\u057D", + week: "\u0547\u0561\u0562\u0561\u0569", + day: "\u0555\u0580", + list: "\u0555\u0580\u057E\u0561 \u0581\u0578\u0582\u0581\u0561\u056F" + }, + weekText: "\u0547\u0561\u0562", + allDayText: "\u0531\u0574\u0562\u0578\u0572\u057B \u0585\u0580", + moreLinkText: function(n) { + return "+ \u0587\u057D " + n; + }, + noEventsText: "\u0532\u0561\u0581\u0561\u056F\u0561\u0575\u0578\u0582\u0574 \u0567 \u056B\u0580\u0561\u0564\u0561\u0580\u0571\u0578\u0582\u0569\u0575\u0578\u0582\u0576\u0568 \u0581\u0578\u0582\u0581\u0561\u0564\u0580\u0565\u056C\u0578\u0582" + }; + + var l38 = { + code: "id", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "mundur", + next: "maju", + today: "hari ini", + month: "Bulan", + week: "Minggu", + day: "Hari", + list: "Agenda" + }, + weekText: "Mg", + allDayText: "Sehari penuh", + moreLinkText: "lebih", + noEventsText: "Tidak ada acara untuk ditampilkan" + }; + + var l39 = { + code: "is", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Fyrri", + next: "N\xE6sti", + today: "\xCD dag", + month: "M\xE1nu\xF0ur", + week: "Vika", + day: "Dagur", + list: "Dagskr\xE1" + }, + weekText: "Vika", + allDayText: "Allan daginn", + moreLinkText: "meira", + noEventsText: "Engir vi\xF0bur\xF0ir til a\xF0 s\xFDna" + }; + + var l40 = { + code: "it", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Prec", + next: "Succ", + today: "Oggi", + month: "Mese", + week: "Settimana", + day: "Giorno", + list: "Agenda" + }, + weekText: "Sm", + allDayText: "Tutto il giorno", + moreLinkText: function(n) { + return "+altri " + n; + }, + noEventsText: "Non ci sono eventi da visualizzare" + }; + + var l41 = { + code: "ja", + buttonText: { + prev: "\u524D", + next: "\u6B21", + today: "\u4ECA\u65E5", + month: "\u6708", + week: "\u9031", + day: "\u65E5", + list: "\u4E88\u5B9A\u30EA\u30B9\u30C8" + }, + weekText: "\u9031", + allDayText: "\u7D42\u65E5", + moreLinkText: function(n) { + return "\u4ED6 " + n + " \u4EF6"; + }, + noEventsText: "\u8868\u793A\u3059\u308B\u4E88\u5B9A\u306F\u3042\u308A\u307E\u305B\u3093" + }; + + var l42 = { + code: "ka", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u10EC\u10D8\u10DC\u10D0", + next: "\u10E8\u10D4\u10DB\u10D3\u10D4\u10D2\u10D8", + today: "\u10D3\u10E6\u10D4\u10E1", + month: "\u10D7\u10D5\u10D4", + week: "\u10D9\u10D5\u10D8\u10E0\u10D0", + day: "\u10D3\u10E6\u10D4", + list: "\u10D3\u10E6\u10D8\u10E1 \u10EC\u10D4\u10E1\u10E0\u10D8\u10D2\u10D8" + }, + weekText: "\u10D9\u10D5", + allDayText: "\u10DB\u10D7\u10D4\u10DA\u10D8 \u10D3\u10E6\u10D4", + moreLinkText: function(n) { + return "+ \u10D9\u10D8\u10D3\u10D4\u10D5 " + n; + }, + noEventsText: "\u10E6\u10DD\u10DC\u10D8\u10E1\u10EB\u10D8\u10D4\u10D1\u10D4\u10D1\u10D8 \u10D0\u10E0 \u10D0\u10E0\u10D8\u10E1" + }; + + var l43 = { + code: "kk", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u0410\u043B\u0434\u044B\u04A3\u0493\u044B", + next: "\u041A\u0435\u043B\u0435\u0441\u0456", + today: "\u0411\u04AF\u0433\u0456\u043D", + month: "\u0410\u0439", + week: "\u0410\u043F\u0442\u0430", + day: "\u041A\u04AF\u043D", + list: "\u041A\u04AF\u043D \u0442\u04D9\u0440\u0442\u0456\u0431\u0456" + }, + weekText: "\u041D\u0435", + allDayText: "\u041A\u04AF\u043D\u0456 \u0431\u043E\u0439\u044B", + moreLinkText: function(n) { + return "+ \u0442\u0430\u0493\u044B " + n; + }, + noEventsText: "\u041A\u04E9\u0440\u0441\u0435\u0442\u0443 \u04AF\u0448\u0456\u043D \u043E\u049B\u0438\u0493\u0430\u043B\u0430\u0440 \u0436\u043E\u049B" + }; + + var l44 = { + code: "km", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u1798\u17BB\u1793", + next: "\u1794\u1793\u17D2\u1791\u17B6\u1794\u17CB", + today: "\u1790\u17D2\u1784\u17C3\u1793\u17C1\u17C7", + year: "\u1786\u17D2\u1793\u17B6\u17C6", + month: "\u1781\u17C2", + week: "\u179F\u1794\u17D2\u178F\u17B6\u17A0\u17CD", + day: "\u1790\u17D2\u1784\u17C3", + list: "\u1794\u1789\u17D2\u1787\u17B8" + }, + weekText: "\u179F\u1794\u17D2\u178F\u17B6\u17A0\u17CD", + allDayText: "\u1796\u17C1\u1789\u1798\u17BD\u1799\u1790\u17D2\u1784\u17C3", + moreLinkText: "\u1785\u17D2\u179A\u17BE\u1793\u1791\u17C0\u178F", + noEventsText: "\u1782\u17D2\u1798\u17B6\u1793\u1796\u17D2\u179A\u17B9\u178F\u17D2\u178F\u17B7\u1780\u17B6\u179A\u178E\u17CD\u178F\u17D2\u179A\u17BC\u179C\u1794\u1784\u17D2\u17A0\u17B6\u1789" + }; + + var l45 = { + code: "ko", + buttonText: { + prev: "\uC774\uC804\uB2EC", + next: "\uB2E4\uC74C\uB2EC", + today: "\uC624\uB298", + month: "\uC6D4", + week: "\uC8FC", + day: "\uC77C", + list: "\uC77C\uC815\uBAA9\uB85D" + }, + weekText: "\uC8FC", + allDayText: "\uC885\uC77C", + moreLinkText: "\uAC1C", + noEventsText: "\uC77C\uC815\uC774 \uC5C6\uC2B5\uB2C8\uB2E4" + }; + + var l46 = { + code: "ku", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u067E\u06CE\u0634\u062A\u0631", + next: "\u062F\u0648\u0627\u062A\u0631", + today: "\u0626\u06D5\u0645\u0695\u0648", + month: "\u0645\u0627\u0646\u06AF", + week: "\u0647\u06D5\u0641\u062A\u06D5", + day: "\u0695\u06C6\u0698", + list: "\u0628\u06D5\u0631\u0646\u0627\u0645\u06D5" + }, + weekText: "\u0647\u06D5\u0641\u062A\u06D5", + allDayText: "\u0647\u06D5\u0645\u0648\u0648 \u0695\u06C6\u0698\u06D5\u06A9\u06D5", + moreLinkText: "\u0632\u06CC\u0627\u062A\u0631", + noEventsText: "\u0647\u06CC\u0686 \u0695\u0648\u0648\u062F\u0627\u0648\u06CE\u0643 \u0646\u06CC\u06D5" + }; + + var l47 = { + code: "lb", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Zr\xE9ck", + next: "Weider", + today: "Haut", + month: "Mount", + week: "Woch", + day: "Dag", + list: "Terminiwwersiicht" + }, + weekText: "W", + allDayText: "Ganzen Dag", + moreLinkText: "m\xE9i", + noEventsText: "Nee Evenementer ze affich\xE9ieren" + }; + + var l48 = { + code: "lt", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Atgal", + next: "Pirmyn", + today: "\u0160iandien", + month: "M\u0117nuo", + week: "Savait\u0117", + day: "Diena", + list: "Darbotvark\u0117" + }, + weekText: "SAV", + allDayText: "Vis\u0105 dien\u0105", + moreLinkText: "daugiau", + noEventsText: "N\u0117ra \u012Fvyki\u0173 rodyti" + }; + + var l49 = { + code: "lv", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Iepr.", + next: "N\u0101k.", + today: "\u0160odien", + month: "M\u0113nesis", + week: "Ned\u0113\u013Ca", + day: "Diena", + list: "Dienas k\u0101rt\u012Bba" + }, + weekText: "Ned.", + allDayText: "Visu dienu", + moreLinkText: function(n) { + return "+v\u0113l " + n; + }, + noEventsText: "Nav notikumu" + }; + + var l50 = { + code: "mk", + buttonText: { + prev: "\u043F\u0440\u0435\u0442\u0445\u043E\u0434\u043D\u043E", + next: "\u0441\u043B\u0435\u0434\u043D\u043E", + today: "\u0414\u0435\u043D\u0435\u0441", + month: "\u041C\u0435\u0441\u0435\u0446", + week: "\u041D\u0435\u0434\u0435\u043B\u0430", + day: "\u0414\u0435\u043D", + list: "\u0413\u0440\u0430\u0444\u0438\u043A" + }, + weekText: "\u0421\u0435\u0434", + allDayText: "\u0426\u0435\u043B \u0434\u0435\u043D", + moreLinkText: function(n) { + return "+\u043F\u043E\u0432\u0435\u045C\u0435 " + n; + }, + noEventsText: "\u041D\u0435\u043C\u0430 \u043D\u0430\u0441\u0442\u0430\u043D\u0438 \u0437\u0430 \u043F\u0440\u0438\u043A\u0430\u0436\u0443\u0432\u0430\u045A\u0435" + }; + + var l51 = { + code: "ms", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Sebelum", + next: "Selepas", + today: "hari ini", + month: "Bulan", + week: "Minggu", + day: "Hari", + list: "Agenda" + }, + weekText: "Mg", + allDayText: "Sepanjang hari", + moreLinkText: function(n) { + return "masih ada " + n + " acara"; + }, + noEventsText: "Tiada peristiwa untuk dipaparkan" + }; + + var l52 = { + code: "nb", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Forrige", + next: "Neste", + today: "I dag", + month: "M\xE5ned", + week: "Uke", + day: "Dag", + list: "Agenda" + }, + weekText: "Uke", + weekTextLong: "Uke", + allDayText: "Hele dagen", + moreLinkText: "til", + noEventsText: "Ingen hendelser \xE5 vise", + buttonHints: { + prev: "Forrige $0", + next: "Neste $0", + today: "N\xE5v\xE6rende $0" + }, + viewHint: "$0 visning", + navLinkHint: "G\xE5 til $0", + moreLinkHint: function(eventCnt) { + return "Vis ".concat(eventCnt, " flere hendelse").concat(eventCnt === 1 ? "" : "r"); + } + }; + + var l53 = { + code: "ne", + week: { + dow: 7, + doy: 1 + }, + buttonText: { + prev: "\u0905\u0918\u093F\u0932\u094D\u0932\u094B", + next: "\u0905\u0930\u094D\u0915\u094B", + today: "\u0906\u091C", + month: "\u092E\u0939\u093F\u0928\u093E", + week: "\u0939\u092A\u094D\u0924\u093E", + day: "\u0926\u093F\u0928", + list: "\u0938\u0942\u091A\u0940" + }, + weekText: "\u0939\u092A\u094D\u0924\u093E", + allDayText: "\u0926\u093F\u0928\u092D\u0930\u093F", + moreLinkText: "\u0925\u092A \u0932\u093F\u0902\u0915", + noEventsText: "\u0926\u0947\u0916\u093E\u0909\u0928\u0915\u094B \u0932\u093E\u0917\u093F \u0915\u0941\u0928\u0948 \u0918\u091F\u0928\u093E\u0939\u0930\u0942 \u091B\u0948\u0928\u0928\u094D" + }; + + var l54 = { + code: "nl", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Vorige", + next: "Volgende", + today: "Vandaag", + year: "Jaar", + month: "Maand", + week: "Week", + day: "Dag", + list: "Agenda" + }, + allDayText: "Hele dag", + moreLinkText: "extra", + noEventsText: "Geen evenementen om te laten zien" + }; + + var l55 = { + code: "nn", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "F\xF8rre", + next: "Neste", + today: "I dag", + month: "M\xE5nad", + week: "Veke", + day: "Dag", + list: "Agenda" + }, + weekText: "Veke", + allDayText: "Heile dagen", + moreLinkText: "til", + noEventsText: "Ingen hendelser \xE5 vise" + }; + + var l56 = { + code: "pl", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Poprzedni", + next: "Nast\u0119pny", + today: "Dzi\u015B", + month: "Miesi\u0105c", + week: "Tydzie\u0144", + day: "Dzie\u0144", + list: "Plan dnia" + }, + weekText: "Tydz", + allDayText: "Ca\u0142y dzie\u0144", + moreLinkText: "wi\u0119cej", + noEventsText: "Brak wydarze\u0144 do wy\u015Bwietlenia" + }; + + var l57 = { + code: "pt-br", + buttonText: { + prev: "Anterior", + next: "Pr\xF3ximo", + today: "Hoje", + month: "M\xEAs", + week: "Semana", + day: "Dia", + list: "Lista" + }, + weekText: "Sm", + allDayText: "dia inteiro", + moreLinkText: function(n) { + return "mais +" + n; + }, + noEventsText: "N\xE3o h\xE1 eventos para mostrar" + }; + + var l58 = { + code: "pt", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Anterior", + next: "Seguinte", + today: "Hoje", + month: "M\xEAs", + week: "Semana", + day: "Dia", + list: "Agenda" + }, + weekText: "Sem", + allDayText: "Todo o dia", + moreLinkText: "mais", + noEventsText: "N\xE3o h\xE1 eventos para mostrar" + }; + + var l59 = { + code: "ro", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "precedent\u0103", + next: "urm\u0103toare", + today: "Azi", + month: "Lun\u0103", + week: "S\u0103pt\u0103m\xE2n\u0103", + day: "Zi", + list: "Agend\u0103" + }, + weekText: "S\u0103pt", + allDayText: "Toat\u0103 ziua", + moreLinkText: function(n) { + return "+alte " + n; + }, + noEventsText: "Nu exist\u0103 evenimente de afi\u0219at" + }; + + var l60 = { + code: "ru", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u041F\u0440\u0435\u0434", + next: "\u0421\u043B\u0435\u0434", + today: "\u0421\u0435\u0433\u043E\u0434\u043D\u044F", + month: "\u041C\u0435\u0441\u044F\u0446", + week: "\u041D\u0435\u0434\u0435\u043B\u044F", + day: "\u0414\u0435\u043D\u044C", + list: "\u041F\u043E\u0432\u0435\u0441\u0442\u043A\u0430 \u0434\u043D\u044F" + }, + weekText: "\u041D\u0435\u0434", + allDayText: "\u0412\u0435\u0441\u044C \u0434\u0435\u043D\u044C", + moreLinkText: function(n) { + return "+ \u0435\u0449\u0451 " + n; + }, + noEventsText: "\u041D\u0435\u0442 \u0441\u043E\u0431\u044B\u0442\u0438\u0439 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F" + }; + + var l61 = { + code: "si-lk", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0DB4\u0DD9\u0DBB", + next: "\u0DB4\u0DC3\u0DD4", + today: "\u0D85\u0DAF", + month: "\u0DB8\u0DCF\u0DC3\u0DBA", + week: "\u0DC3\u0DAD\u0DD2\u0DBA", + day: "\u0DAF\u0DC0\u0DC3", + list: "\u0DBD\u0DD0\u0DBA\u0DD2\u0DC3\u0DCA\u0DAD\u0DD4\u0DC0" + }, + weekText: "\u0DC3\u0DAD\u0DD2", + allDayText: "\u0DC3\u0DD2\u0DBA\u0DBD\u0DD4", + moreLinkText: "\u0DAD\u0DC0\u0DAD\u0DCA", + noEventsText: "\u0DB8\u0DD4\u0D9A\u0DD4\u0DAD\u0DCA \u0DB1\u0DD0\u0DAD" + }; + + var l62 = { + code: "sk", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Predch\xE1dzaj\xFAci", + next: "Nasleduj\xFAci", + today: "Dnes", + month: "Mesiac", + week: "T\xFD\u017Ede\u0148", + day: "De\u0148", + list: "Rozvrh" + }, + weekText: "Ty", + allDayText: "Cel\xFD de\u0148", + moreLinkText: function(n) { + return "+\u010Fal\u0161ie: " + n; + }, + noEventsText: "\u017Diadne akcie na zobrazenie" + }; + + var l63 = { + code: "sl", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Prej\u0161nji", + next: "Naslednji", + today: "Trenutni", + month: "Mesec", + week: "Teden", + day: "Dan", + list: "Dnevni red" + }, + weekText: "Teden", + allDayText: "Ves dan", + moreLinkText: "ve\u010D", + noEventsText: "Ni dogodkov za prikaz" + }; + + var l64 = { + code: "sm", + buttonText: { + prev: "Talu ai", + next: "Mulimuli atu", + today: "Aso nei", + month: "Masina", + week: "Vaiaso", + day: "Aso", + list: "Faasologa" + }, + weekText: "Vaiaso", + allDayText: "Aso atoa", + moreLinkText: "sili atu", + noEventsText: "Leai ni mea na tutupu" + }; + + var l65 = { + code: "sq", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "mbrapa", + next: "P\xEBrpara", + today: "sot", + month: "Muaj", + week: "Jav\xEB", + day: "Dit\xEB", + list: "List\xEB" + }, + weekText: "Ja", + allDayText: "Gjith\xEB dit\xEBn", + moreLinkText: function(n) { + return "+m\xEB tep\xEBr " + n; + }, + noEventsText: "Nuk ka evente p\xEBr t\xEB shfaqur" + }; + + var l66 = { + code: "sr-cyrl", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u041F\u0440\u0435\u0442\u0445\u043E\u0434\u043D\u0430", + next: "\u0441\u043B\u0435\u0434\u0435\u045B\u0438", + today: "\u0414\u0430\u043D\u0430\u0441", + month: "\u041C\u0435\u0441\u0435\u0446", + week: "\u041D\u0435\u0434\u0435\u0459\u0430", + day: "\u0414\u0430\u043D", + list: "\u041F\u043B\u0430\u043D\u0435\u0440" + }, + weekText: "\u0421\u0435\u0434", + allDayText: "\u0426\u0435\u043E \u0434\u0430\u043D", + moreLinkText: function(n) { + return "+ \u0458\u043E\u0448 " + n; + }, + noEventsText: "\u041D\u0435\u043C\u0430 \u0434\u043E\u0433\u0430\u0452\u0430\u0458\u0430 \u0437\u0430 \u043F\u0440\u0438\u043A\u0430\u0437" + }; + + var l67 = { + code: "sr", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Prethodna", + next: "Sledec\u0301i", + today: "Danas", + month: "M\u0435s\u0435c", + week: "N\u0435d\u0435lja", + day: "Dan", + list: "Plan\u0435r" + }, + weekText: "Sed", + allDayText: "C\u0435o dan", + moreLinkText: function(n) { + return "+ jo\u0161 " + n; + }, + noEventsText: "N\u0435ma doga\u0111aja za prikaz" + }; + + var l68 = { + code: "sv", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "F\xF6rra", + next: "N\xE4sta", + today: "Idag", + month: "M\xE5nad", + week: "Vecka", + day: "Dag", + list: "Program" + }, + buttonHints: { + prev: function(buttonText) { + return "F\xF6reg\xE5ende ".concat(buttonText.toLocaleLowerCase()); + }, + next: function(buttonText) { + return "N\xE4sta ".concat(buttonText.toLocaleLowerCase()); + }, + today: function(buttonText) { + return (buttonText === "Program" ? "Detta" : "Denna") + " " + buttonText.toLocaleLowerCase(); + } + }, + viewHint: "$0 vy", + navLinkHint: "G\xE5 till $0", + moreLinkHint: function(eventCnt) { + return "Visa ytterligare ".concat(eventCnt, " h\xE4ndelse").concat(eventCnt === 1 ? "" : "r"); + }, + weekText: "v.", + weekTextLong: "Vecka", + allDayText: "Heldag", + moreLinkText: "till", + noEventsText: "Inga h\xE4ndelser att visa", + closeHint: "St\xE4ng", + timeHint: "Klockan", + eventHint: "H\xE4ndelse" + }; + + var l69 = { + code: "ta-in", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF", + next: "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4\u0BA4\u0BC1", + today: "\u0B87\u0BA9\u0BCD\u0BB1\u0BC1", + month: "\u0BAE\u0BBE\u0BA4\u0BAE\u0BCD", + week: "\u0BB5\u0BBE\u0BB0\u0BAE\u0BCD", + day: "\u0BA8\u0BBE\u0BB3\u0BCD", + list: "\u0BA4\u0BBF\u0BA9\u0B9A\u0BB0\u0BBF \u0B85\u0B9F\u0BCD\u0B9F\u0BB5\u0BA3\u0BC8" + }, + weekText: "\u0BB5\u0BBE\u0BB0\u0BAE\u0BCD", + allDayText: "\u0BA8\u0BBE\u0BB3\u0BCD \u0BAE\u0BC1\u0BB4\u0BC1\u0BB5\u0BA4\u0BC1\u0BAE\u0BCD", + moreLinkText: function(n) { + return "+ \u0BAE\u0BC7\u0BB2\u0BC1\u0BAE\u0BCD " + n; + }, + noEventsText: "\u0B95\u0BBE\u0BA3\u0BCD\u0BAA\u0BBF\u0B95\u0BCD\u0B95 \u0BA8\u0BBF\u0B95\u0BB4\u0BCD\u0BB5\u0BC1\u0B95\u0BB3\u0BCD \u0B87\u0BB2\u0BCD\u0BB2\u0BC8" + }; + + var l70 = { + code: "th", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32", + next: "\u0E16\u0E31\u0E14\u0E44\u0E1B", + prevYear: "\u0E1B\u0E35\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32", + nextYear: "\u0E1B\u0E35\u0E16\u0E31\u0E14\u0E44\u0E1B", + year: "\u0E1B\u0E35", + today: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49", + month: "\u0E40\u0E14\u0E37\u0E2D\u0E19", + week: "\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C", + day: "\u0E27\u0E31\u0E19", + list: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E01\u0E32\u0E23" + }, + weekText: "\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C", + allDayText: "\u0E15\u0E25\u0E2D\u0E14\u0E27\u0E31\u0E19", + moreLinkText: "\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21", + noEventsText: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E34\u0E08\u0E01\u0E23\u0E23\u0E21\u0E17\u0E35\u0E48\u0E08\u0E30\u0E41\u0E2A\u0E14\u0E07" + }; + + var l71 = { + code: "tr", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "geri", + next: "ileri", + today: "bug\xFCn", + month: "Ay", + week: "Hafta", + day: "G\xFCn", + list: "Ajanda" + }, + weekText: "Hf", + allDayText: "T\xFCm g\xFCn", + moreLinkText: "daha fazla", + noEventsText: "G\xF6sterilecek etkinlik yok" + }; + + var l72 = { + code: "ug", + buttonText: { + month: "\u0626\u0627\u064A", + week: "\u06BE\u06D5\u067E\u062A\u06D5", + day: "\u0643\u06C8\u0646", + list: "\u0643\u06C8\u0646\u062A\u06D5\u0631\u062A\u0649\u067E" + }, + allDayText: "\u067E\u06C8\u062A\u06C8\u0646 \u0643\u06C8\u0646" + }; + + var l73 = { + code: "uk", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456\u0439", + next: "\u0434\u0430\u043B\u0456", + today: "\u0421\u044C\u043E\u0433\u043E\u0434\u043D\u0456", + month: "\u041C\u0456\u0441\u044F\u0446\u044C", + week: "\u0422\u0438\u0436\u0434\u0435\u043D\u044C", + day: "\u0414\u0435\u043D\u044C", + list: "\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u0434\u0435\u043D\u043D\u0438\u0439" + }, + weekText: "\u0422\u0438\u0436", + allDayText: "\u0423\u0432\u0435\u0441\u044C \u0434\u0435\u043D\u044C", + moreLinkText: function(n) { + return "+\u0449\u0435 " + n + "..."; + }, + noEventsText: "\u041D\u0435\u043C\u0430\u0454 \u043F\u043E\u0434\u0456\u0439 \u0434\u043B\u044F \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F" + }; + + var l74 = { + code: "uz", + buttonText: { + month: "Oy", + week: "Xafta", + day: "Kun", + list: "Kun tartibi" + }, + allDayText: "Kun bo'yi", + moreLinkText: function(n) { + return "+ yana " + n; + }, + noEventsText: "Ko'rsatish uchun voqealar yo'q" + }; + + var l75 = { + code: "vi", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Tr\u01B0\u1EDBc", + next: "Ti\u1EBFp", + today: "H\xF4m nay", + month: "Th\xE1ng", + week: "Tu\xE2\u0300n", + day: "Ng\xE0y", + list: "L\u1ECBch bi\u1EC3u" + }, + weekText: "Tu", + allDayText: "C\u1EA3 ng\xE0y", + moreLinkText: function(n) { + return "+ th\xEAm " + n; + }, + noEventsText: "Kh\xF4ng c\xF3 s\u1EF1 ki\u1EC7n \u0111\u1EC3 hi\u1EC3n th\u1ECB" + }; + + var l76 = { + code: "zh-cn", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u4E0A\u6708", + next: "\u4E0B\u6708", + today: "\u4ECA\u5929", + month: "\u6708", + week: "\u5468", + day: "\u65E5", + list: "\u65E5\u7A0B" + }, + weekText: "\u5468", + allDayText: "\u5168\u5929", + moreLinkText: function(n) { + return "\u53E6\u5916 " + n + " \u4E2A"; + }, + noEventsText: "\u6CA1\u6709\u4E8B\u4EF6\u663E\u793A" + }; + + var l77 = { + code: "zh-tw", + buttonText: { + prev: "\u4E0A\u6708", + next: "\u4E0B\u6708", + today: "\u4ECA\u5929", + month: "\u6708", + week: "\u9031", + day: "\u5929", + list: "\u6D3B\u52D5\u5217\u8868" + }, + weekText: "\u5468", + allDayText: "\u6574\u5929", + moreLinkText: "\u986F\u793A\u66F4\u591A", + noEventsText: "\u6CA1\u6709\u4EFB\u4F55\u6D3B\u52D5" + }; + + var localesAll = [ + l0, + l1, + l2, + l3, + l4, + l5, + l6, + l7, + l8, + l9, + l10, + l11, + l12, + l13, + l14, + l15, + l16, + l17, + l18, + l19, + l20, + l21, + l22, + l23, + l24, + l25, + l26, + l27, + l28, + l29, + l30, + l31, + l32, + l33, + l34, + l35, + l36, + l37, + l38, + l39, + l40, + l41, + l42, + l43, + l44, + l45, + l46, + l47, + l48, + l49, + l50, + l51, + l52, + l53, + l54, + l55, + l56, + l57, + l58, + l59, + l60, + l61, + l62, + l63, + l64, + l65, + l66, + l67, + l68, + l69, + l70, + l71, + l72, + l73, + l74, + l75, + l76, + l77 + ]; + + return localesAll; + +}()); diff --git a/public/js/fullcalendar/locales-all.min.js b/public/js/fullcalendar/locales-all.min.js new file mode 100644 index 00000000..b94483b2 --- /dev/null +++ b/public/js/fullcalendar/locales-all.min.js @@ -0,0 +1 @@ +[].push.apply(FullCalendar.globalLocales,function(){"use strict";function e(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}function t(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}return[{code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Heeldag",moreLinkText:"Addisionele",noEventsText:"Daar is geen gebeurtenisse nie"},{code:"ar-dz",week:{dow:0,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-kw",week:{dow:0,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ly",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ma",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-sa",week:{dow:0,doy:6},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-tn",week:{dow:1,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"az",week:{dow:1,doy:4},buttonText:{prev:"Əvvəl",next:"Sonra",today:"Bu Gün",month:"Ay",week:"Həftə",day:"Gün",list:"Gündəm"},weekText:"Həftə",allDayText:"Bütün Gün",moreLinkText:function(e){return"+ daha çox "+e},noEventsText:"Göstərmək üçün hadisə yoxdur"},{code:"bg",week:{dow:1,doy:7},buttonText:{prev:"назад",next:"напред",today:"днес",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",moreLinkText:function(e){return"+още "+e},noEventsText:"Няма събития за показване"},{code:"bn",week:{dow:0,doy:6},buttonText:{prev:"পেছনে",next:"সামনে",today:"আজ",month:"মাস",week:"সপ্তাহ",day:"দিন",list:"তালিকা"},weekText:"সপ্তাহ",allDayText:"সারাদিন",moreLinkText:function(e){return"+অন্যান্য "+e},noEventsText:"কোনো ইভেন্ট নেই"},{code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekText:"Sed",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikazivanje"},{code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekText:"Set",allDayText:"Tot el dia",moreLinkText:"més",noEventsText:"No hi ha esdeveniments per mostrar"},{code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:function(e){return"+další: "+e},noEventsText:"Žádné akce k zobrazení"},{code:"cy",week:{dow:1,doy:4},buttonText:{prev:"Blaenorol",next:"Nesaf",today:"Heddiw",year:"Blwyddyn",month:"Mis",week:"Wythnos",day:"Dydd",list:"Rhestr"},weekText:"Wythnos",allDayText:"Trwy'r dydd",moreLinkText:"Mwy",noEventsText:"Dim digwyddiadau"},{code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"},{code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(t){return"Vorherige".concat(e(t)," ").concat(t)},next:function(t){return"Nächste".concat(e(t)," ").concat(t)},today:function(t){return"Tag"===t?"Heute":"Diese".concat(e(t)," ").concat(t)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},{code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(t(e)," ").concat(e)},next:function(e){return"Nächste".concat(t(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(t(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},{code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"},{code:"en-au",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},{code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},{code:"en-nz",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},{code:"eo",week:{dow:1,doy:4},buttonText:{prev:"Antaŭa",next:"Sekva",today:"Hodiaŭ",month:"Monato",week:"Semajno",day:"Tago",list:"Tagordo"},weekText:"Sm",allDayText:"Tuta tago",moreLinkText:"pli",noEventsText:"Neniuj eventoj por montri"},{code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekText:"Sm",allDayText:"Todo el día",moreLinkText:"más",noEventsText:"No hay eventos para mostrar"},{code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:function(e){return"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()}},viewHint:function(e){return"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase()},weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:function(e){return"Mostrar ".concat(e," eventos más")},noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"},{code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekText:"näd",allDayText:"Kogu päev",moreLinkText:function(e){return"+ veel "+e},noEventsText:"Kuvamiseks puuduvad sündmused"},{code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"},{code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:function(e){return"بیش از "+e},noEventsText:"هیچ رویدادی به نمایش"},{code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"},{code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},{code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sm",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},{code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},{code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},weekText:"Sm",allDayText:"Todo o día",moreLinkText:"máis",noEventsText:"Non hai eventos para amosar"},{code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"אחר",noEventsText:"אין אירועים להצגה",weekText:"שבוע"},{code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekText:"हफ्ता",allDayText:"सभी दिन",moreLinkText:function(e){return"+अधिक "+e},noEventsText:"कोई घटनाओं को प्रदर्शित करने के लिए"},{code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikaz"},{code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"},{code:"hy-am",week:{dow:1,doy:4},buttonText:{prev:"Նախորդ",next:"Հաջորդ",today:"Այսօր",month:"Ամիս",week:"Շաբաթ",day:"Օր",list:"Օրվա ցուցակ"},weekText:"Շաբ",allDayText:"Ամբողջ օր",moreLinkText:function(e){return"+ ևս "+e},noEventsText:"Բացակայում է իրադարձությունը ցուցադրելու"},{code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"},{code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekText:"Vika",allDayText:"Allan daginn",moreLinkText:"meira",noEventsText:"Engir viðburðir til að sýna"},{code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:function(e){return"+altri "+e},noEventsText:"Non ci sono eventi da visualizzare"},{code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:function(e){return"他 "+e+" 件"},noEventsText:"表示する予定はありません"},{code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekText:"კვ",allDayText:"მთელი დღე",moreLinkText:function(e){return"+ კიდევ "+e},noEventsText:"ღონისძიებები არ არის"},{code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekText:"Не",allDayText:"Күні бойы",moreLinkText:function(e){return"+ тағы "+e},noEventsText:"Көрсету үшін оқиғалар жоқ"},{code:"km",week:{dow:1,doy:4},buttonText:{prev:"មុន",next:"បន្ទាប់",today:"ថ្ងៃនេះ",year:"ឆ្នាំ",month:"ខែ",week:"សប្តាហ៍",day:"ថ្ងៃ",list:"បញ្ជី"},weekText:"សប្តាហ៍",allDayText:"ពេញមួយថ្ងៃ",moreLinkText:"ច្រើនទៀត",noEventsText:"គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"},{code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"},{code:"ku",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"پێشتر",next:"دواتر",today:"ئەمڕو",month:"مانگ",week:"هەفتە",day:"ڕۆژ",list:"بەرنامە"},weekText:"هەفتە",allDayText:"هەموو ڕۆژەکە",moreLinkText:"زیاتر",noEventsText:"هیچ ڕووداوێك نیە"},{code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekText:"W",allDayText:"Ganzen Dag",moreLinkText:"méi",noEventsText:"Nee Evenementer ze affichéieren"},{code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekText:"SAV",allDayText:"Visą dieną",moreLinkText:"daugiau",noEventsText:"Nėra įvykių rodyti"},{code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekText:"Ned.",allDayText:"Visu dienu",moreLinkText:function(e){return"+vēl "+e},noEventsText:"Nav notikumu"},{code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekText:"Сед",allDayText:"Цел ден",moreLinkText:function(e){return"+повеќе "+e},noEventsText:"Нема настани за прикажување"},{code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sepanjang hari",moreLinkText:function(e){return"masih ada "+e+" acara"},noEventsText:"Tiada peristiwa untuk dipaparkan"},{code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:function(e){return"Vis ".concat(e," flere hendelse").concat(1===e?"":"r")}},{code:"ne",week:{dow:7,doy:1},buttonText:{prev:"अघिल्लो",next:"अर्को",today:"आज",month:"महिना",week:"हप्ता",day:"दिन",list:"सूची"},weekText:"हप्ता",allDayText:"दिनभरि",moreLinkText:"थप लिंक",noEventsText:"देखाउनको लागि कुनै घटनाहरू छैनन्"},{code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"},{code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekText:"Veke",allDayText:"Heile dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise"},{code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"},{code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},weekText:"Sm",allDayText:"dia inteiro",moreLinkText:function(e){return"mais +"+e},noEventsText:"Não há eventos para mostrar"},{code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"},{code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:function(e){return"+alte "+e},noEventsText:"Nu există evenimente de afișat"},{code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:function(e){return"+ ещё "+e},noEventsText:"Нет событий для отображения"},{code:"si-lk",week:{dow:1,doy:4},buttonText:{prev:"පෙර",next:"පසු",today:"අද",month:"මාසය",week:"සතිය",day:"දවස",list:"ලැයිස්තුව"},weekText:"සති",allDayText:"සියලු",moreLinkText:"තවත්",noEventsText:"මුකුත් නැත"},{code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:function(e){return"+ďalšie: "+e},noEventsText:"Žiadne akcie na zobrazenie"},{code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekText:"Teden",allDayText:"Ves dan",moreLinkText:"več",noEventsText:"Ni dogodkov za prikaz"},{code:"sm",buttonText:{prev:"Talu ai",next:"Mulimuli atu",today:"Aso nei",month:"Masina",week:"Vaiaso",day:"Aso",list:"Faasologa"},weekText:"Vaiaso",allDayText:"Aso atoa",moreLinkText:"sili atu",noEventsText:"Leai ni mea na tutupu"},{code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"sot",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekText:"Ja",allDayText:"Gjithë ditën",moreLinkText:function(e){return"+më tepër "+e},noEventsText:"Nuk ka evente për të shfaqur"},{code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekText:"Сед",allDayText:"Цео дан",moreLinkText:function(e){return"+ још "+e},noEventsText:"Нема догађаја за приказ"},{code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekText:"Sed",allDayText:"Cеo dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nеma događaja za prikaz"},{code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:function(e){return"Föregående ".concat(e.toLocaleLowerCase())},next:function(e){return"Nästa ".concat(e.toLocaleLowerCase())},today:function(e){return("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()}},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:function(e){return"Visa ytterligare ".concat(e," händelse").concat(1===e?"":"r")},weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"},{code:"ta-in",week:{dow:1,doy:4},buttonText:{prev:"முந்தைய",next:"அடுத்தது",today:"இன்று",month:"மாதம்",week:"வாரம்",day:"நாள்",list:"தினசரி அட்டவணை"},weekText:"வாரம்",allDayText:"நாள் முழுவதும்",moreLinkText:function(e){return"+ மேலும் "+e},noEventsText:"காண்பிக்க நிகழ்வுகள் இல்லை"},{code:"th",week:{dow:1,doy:4},buttonText:{prev:"ก่อนหน้า",next:"ถัดไป",prevYear:"ปีก่อนหน้า",nextYear:"ปีถัดไป",year:"ปี",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"กำหนดการ"},weekText:"สัปดาห์",allDayText:"ตลอดวัน",moreLinkText:"เพิ่มเติม",noEventsText:"ไม่มีกิจกรรมที่จะแสดง"},{code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"},{code:"ug",buttonText:{month:"ئاي",week:"ھەپتە",day:"كۈن",list:"كۈنتەرتىپ"},allDayText:"پۈتۈن كۈن"},{code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText:function(e){return"+ще "+e+"..."},noEventsText:"Немає подій для відображення"},{code:"uz",buttonText:{month:"Oy",week:"Xafta",day:"Kun",list:"Kun tartibi"},allDayText:"Kun bo'yi",moreLinkText:function(e){return"+ yana "+e},noEventsText:"Ko'rsatish uchun voqealar yo'q"},{code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:function(e){return"+ thêm "+e},noEventsText:"Không có sự kiện để hiển thị"},{code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:function(e){return"另外 "+e+" 个"},noEventsText:"没有事件显示"},{code:"zh-tw",buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"週",day:"天",list:"活動列表"},weekText:"周",allDayText:"整天",moreLinkText:"顯示更多",noEventsText:"没有任何活動"}]}()); \ No newline at end of file diff --git a/public/js/fullcalendar/locales/af.js b/public/js/fullcalendar/locales/af.js new file mode 100644 index 00000000..48ec54d4 --- /dev/null +++ b/public/js/fullcalendar/locales/af.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var af = { + code: "af", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Vorige", + next: "Volgende", + today: "Vandag", + year: "Jaar", + month: "Maand", + week: "Week", + day: "Dag", + list: "Agenda" + }, + allDayText: "Heeldag", + moreLinkText: "Addisionele", + noEventsText: "Daar is geen gebeurtenisse nie" + }; + + return af; + +}()); diff --git a/public/js/fullcalendar/locales/ar-dz.js b/public/js/fullcalendar/locales/ar-dz.js new file mode 100644 index 00000000..63c9316f --- /dev/null +++ b/public/js/fullcalendar/locales/ar-dz.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var arDz = { + code: "ar-dz", + week: { + dow: 0, + doy: 4 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + return arDz; + +}()); diff --git a/public/js/fullcalendar/locales/ar-kw.js b/public/js/fullcalendar/locales/ar-kw.js new file mode 100644 index 00000000..e8c4da31 --- /dev/null +++ b/public/js/fullcalendar/locales/ar-kw.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var arKw = { + code: "ar-kw", + week: { + dow: 0, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + return arKw; + +}()); diff --git a/public/js/fullcalendar/locales/ar-ly.js b/public/js/fullcalendar/locales/ar-ly.js new file mode 100644 index 00000000..68e09ea2 --- /dev/null +++ b/public/js/fullcalendar/locales/ar-ly.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var arLy = { + code: "ar-ly", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + return arLy; + +}()); diff --git a/public/js/fullcalendar/locales/ar-ma.js b/public/js/fullcalendar/locales/ar-ma.js new file mode 100644 index 00000000..7a453eec --- /dev/null +++ b/public/js/fullcalendar/locales/ar-ma.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var arMa = { + code: "ar-ma", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + return arMa; + +}()); diff --git a/public/js/fullcalendar/locales/ar-sa.js b/public/js/fullcalendar/locales/ar-sa.js new file mode 100644 index 00000000..dac51e48 --- /dev/null +++ b/public/js/fullcalendar/locales/ar-sa.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var arSa = { + code: "ar-sa", + week: { + dow: 0, + doy: 6 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + return arSa; + +}()); diff --git a/public/js/fullcalendar/locales/ar-tn.js b/public/js/fullcalendar/locales/ar-tn.js new file mode 100644 index 00000000..78b3469a --- /dev/null +++ b/public/js/fullcalendar/locales/ar-tn.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var arTn = { + code: "ar-tn", + week: { + dow: 1, + doy: 4 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + return arTn; + +}()); diff --git a/public/js/fullcalendar/locales/ar.js b/public/js/fullcalendar/locales/ar.js new file mode 100644 index 00000000..2da5a113 --- /dev/null +++ b/public/js/fullcalendar/locales/ar.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ar = { + code: "ar", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0627\u0644\u0633\u0627\u0628\u0642", + next: "\u0627\u0644\u062A\u0627\u0644\u064A", + today: "\u0627\u0644\u064A\u0648\u0645", + month: "\u0634\u0647\u0631", + week: "\u0623\u0633\u0628\u0648\u0639", + day: "\u064A\u0648\u0645", + list: "\u0623\u062C\u0646\u062F\u0629" + }, + weekText: "\u0623\u0633\u0628\u0648\u0639", + allDayText: "\u0627\u0644\u064A\u0648\u0645 \u0643\u0644\u0647", + moreLinkText: "\u0623\u062E\u0631\u0649", + noEventsText: "\u0623\u064A \u0623\u062D\u062F\u0627\u062B \u0644\u0639\u0631\u0636" + }; + + return ar; + +}()); diff --git a/public/js/fullcalendar/locales/az.js b/public/js/fullcalendar/locales/az.js new file mode 100644 index 00000000..34856e45 --- /dev/null +++ b/public/js/fullcalendar/locales/az.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var az = { + code: "az", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u018Fvv\u0259l", + next: "Sonra", + today: "Bu G\xFCn", + month: "Ay", + week: "H\u0259ft\u0259", + day: "G\xFCn", + list: "G\xFCnd\u0259m" + }, + weekText: "H\u0259ft\u0259", + allDayText: "B\xFCt\xFCn G\xFCn", + moreLinkText: function(n) { + return "+ daha \xE7ox " + n; + }, + noEventsText: "G\xF6st\u0259rm\u0259k \xFC\xE7\xFCn hadis\u0259 yoxdur" + }; + + return az; + +}()); diff --git a/public/js/fullcalendar/locales/bg.js b/public/js/fullcalendar/locales/bg.js new file mode 100644 index 00000000..98f17e20 --- /dev/null +++ b/public/js/fullcalendar/locales/bg.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var bg = { + code: "bg", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u043D\u0430\u0437\u0430\u0434", + next: "\u043D\u0430\u043F\u0440\u0435\u0434", + today: "\u0434\u043D\u0435\u0441", + month: "\u041C\u0435\u0441\u0435\u0446", + week: "\u0421\u0435\u0434\u043C\u0438\u0446\u0430", + day: "\u0414\u0435\u043D", + list: "\u0413\u0440\u0430\u0444\u0438\u043A" + }, + allDayText: "\u0426\u044F\u043B \u0434\u0435\u043D", + moreLinkText: function(n) { + return "+\u043E\u0449\u0435 " + n; + }, + noEventsText: "\u041D\u044F\u043C\u0430 \u0441\u044A\u0431\u0438\u0442\u0438\u044F \u0437\u0430 \u043F\u043E\u043A\u0430\u0437\u0432\u0430\u043D\u0435" + }; + + return bg; + +}()); diff --git a/public/js/fullcalendar/locales/bn.js b/public/js/fullcalendar/locales/bn.js new file mode 100644 index 00000000..42fccfe1 --- /dev/null +++ b/public/js/fullcalendar/locales/bn.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var bn = { + code: "bn", + week: { + dow: 0, + doy: 6 + }, + buttonText: { + prev: "\u09AA\u09C7\u099B\u09A8\u09C7", + next: "\u09B8\u09BE\u09AE\u09A8\u09C7", + today: "\u0986\u099C", + month: "\u09AE\u09BE\u09B8", + week: "\u09B8\u09AA\u09CD\u09A4\u09BE\u09B9", + day: "\u09A6\u09BF\u09A8", + list: "\u09A4\u09BE\u09B2\u09BF\u0995\u09BE" + }, + weekText: "\u09B8\u09AA\u09CD\u09A4\u09BE\u09B9", + allDayText: "\u09B8\u09BE\u09B0\u09BE\u09A6\u09BF\u09A8", + moreLinkText: function(n) { + return "+\u0985\u09A8\u09CD\u09AF\u09BE\u09A8\u09CD\u09AF " + n; + }, + noEventsText: "\u0995\u09CB\u09A8\u09CB \u0987\u09AD\u09C7\u09A8\u09CD\u099F \u09A8\u09C7\u0987" + }; + + return bn; + +}()); diff --git a/public/js/fullcalendar/locales/bs.js b/public/js/fullcalendar/locales/bs.js new file mode 100644 index 00000000..d71c2add --- /dev/null +++ b/public/js/fullcalendar/locales/bs.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var bs = { + code: "bs", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Pro\u0161li", + next: "Sljede\u0107i", + today: "Danas", + month: "Mjesec", + week: "Sedmica", + day: "Dan", + list: "Raspored" + }, + weekText: "Sed", + allDayText: "Cijeli dan", + moreLinkText: function(n) { + return "+ jo\u0161 " + n; + }, + noEventsText: "Nema doga\u0111aja za prikazivanje" + }; + + return bs; + +}()); diff --git a/public/js/fullcalendar/locales/ca.js b/public/js/fullcalendar/locales/ca.js new file mode 100644 index 00000000..0f247338 --- /dev/null +++ b/public/js/fullcalendar/locales/ca.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ca = { + code: "ca", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Anterior", + next: "Seg\xFCent", + today: "Avui", + month: "Mes", + week: "Setmana", + day: "Dia", + list: "Agenda" + }, + weekText: "Set", + allDayText: "Tot el dia", + moreLinkText: "m\xE9s", + noEventsText: "No hi ha esdeveniments per mostrar" + }; + + return ca; + +}()); diff --git a/public/js/fullcalendar/locales/cs.js b/public/js/fullcalendar/locales/cs.js new file mode 100644 index 00000000..e5b5be60 --- /dev/null +++ b/public/js/fullcalendar/locales/cs.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var cs = { + code: "cs", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "D\u0159\xEDve", + next: "Pozd\u011Bji", + today: "Nyn\xED", + month: "M\u011Bs\xEDc", + week: "T\xFDden", + day: "Den", + list: "Agenda" + }, + weekText: "T\xFDd", + allDayText: "Cel\xFD den", + moreLinkText: function(n) { + return "+dal\u0161\xED: " + n; + }, + noEventsText: "\u017D\xE1dn\xE9 akce k zobrazen\xED" + }; + + return cs; + +}()); diff --git a/public/js/fullcalendar/locales/cy.js b/public/js/fullcalendar/locales/cy.js new file mode 100644 index 00000000..0d297a8a --- /dev/null +++ b/public/js/fullcalendar/locales/cy.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var cy = { + code: "cy", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Blaenorol", + next: "Nesaf", + today: "Heddiw", + year: "Blwyddyn", + month: "Mis", + week: "Wythnos", + day: "Dydd", + list: "Rhestr" + }, + weekText: "Wythnos", + allDayText: "Trwy'r dydd", + moreLinkText: "Mwy", + noEventsText: "Dim digwyddiadau" + }; + + return cy; + +}()); diff --git a/public/js/fullcalendar/locales/da.js b/public/js/fullcalendar/locales/da.js new file mode 100644 index 00000000..878a4f50 --- /dev/null +++ b/public/js/fullcalendar/locales/da.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var da = { + code: "da", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Forrige", + next: "N\xE6ste", + today: "I dag", + month: "M\xE5ned", + week: "Uge", + day: "Dag", + list: "Agenda" + }, + weekText: "Uge", + allDayText: "Hele dagen", + moreLinkText: "flere", + noEventsText: "Ingen arrangementer at vise" + }; + + return da; + +}()); diff --git a/public/js/fullcalendar/locales/de-at.js b/public/js/fullcalendar/locales/de-at.js new file mode 100644 index 00000000..c073ada5 --- /dev/null +++ b/public/js/fullcalendar/locales/de-at.js @@ -0,0 +1,59 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + function affix(buttonText) { + return buttonText === "Tag" || buttonText === "Monat" ? "r" : buttonText === "Jahr" ? "s" : ""; + } + var deAt = { + code: "de-at", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Zur\xFCck", + next: "Vor", + today: "Heute", + year: "Jahr", + month: "Monat", + week: "Woche", + day: "Tag", + list: "Termin\xFCbersicht" + }, + weekText: "KW", + weekTextLong: "Woche", + allDayText: "Ganzt\xE4gig", + moreLinkText: function(n) { + return "+ weitere " + n; + }, + noEventsText: "Keine Ereignisse anzuzeigen", + buttonHints: { + prev: function(buttonText) { + return "Vorherige".concat(affix(buttonText), " ").concat(buttonText); + }, + next: function(buttonText) { + return "N\xE4chste".concat(affix(buttonText), " ").concat(buttonText); + }, + today: function(buttonText) { + if (buttonText === "Tag") { + return "Heute"; + } + return "Diese".concat(affix(buttonText), " ").concat(buttonText); + } + }, + viewHint: function(buttonText) { + var glue = buttonText === "Woche" ? "n" : buttonText === "Monat" ? "s" : "es"; + return buttonText + glue + "ansicht"; + }, + navLinkHint: "Gehe zu $0", + moreLinkHint: function(eventCnt) { + return "Zeige " + (eventCnt === 1 ? "ein weiteres Ereignis" : eventCnt + " weitere Ereignisse"); + }, + closeHint: "Schlie\xDFen", + timeHint: "Uhrzeit", + eventHint: "Ereignis" + }; + + return deAt; + +}()); diff --git a/public/js/fullcalendar/locales/de.js b/public/js/fullcalendar/locales/de.js new file mode 100644 index 00000000..f7bb6f17 --- /dev/null +++ b/public/js/fullcalendar/locales/de.js @@ -0,0 +1,59 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + function affix(buttonText) { + return buttonText === "Tag" || buttonText === "Monat" ? "r" : buttonText === "Jahr" ? "s" : ""; + } + var de = { + code: "de", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Zur\xFCck", + next: "Vor", + today: "Heute", + year: "Jahr", + month: "Monat", + week: "Woche", + day: "Tag", + list: "Termin\xFCbersicht" + }, + weekText: "KW", + weekTextLong: "Woche", + allDayText: "Ganzt\xE4gig", + moreLinkText: function(n) { + return "+ weitere " + n; + }, + noEventsText: "Keine Ereignisse anzuzeigen", + buttonHints: { + prev: function(buttonText) { + return "Vorherige".concat(affix(buttonText), " ").concat(buttonText); + }, + next: function(buttonText) { + return "N\xE4chste".concat(affix(buttonText), " ").concat(buttonText); + }, + today: function(buttonText) { + if (buttonText === "Tag") { + return "Heute"; + } + return "Diese".concat(affix(buttonText), " ").concat(buttonText); + } + }, + viewHint: function(buttonText) { + var glue = buttonText === "Woche" ? "n" : buttonText === "Monat" ? "s" : "es"; + return buttonText + glue + "ansicht"; + }, + navLinkHint: "Gehe zu $0", + moreLinkHint: function(eventCnt) { + return "Zeige " + (eventCnt === 1 ? "ein weiteres Ereignis" : eventCnt + " weitere Ereignisse"); + }, + closeHint: "Schlie\xDFen", + timeHint: "Uhrzeit", + eventHint: "Ereignis" + }; + + return de; + +}()); diff --git a/public/js/fullcalendar/locales/el.js b/public/js/fullcalendar/locales/el.js new file mode 100644 index 00000000..23c7f713 --- /dev/null +++ b/public/js/fullcalendar/locales/el.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var el = { + code: "el", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03BF\u03C2", + next: "\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03BF\u03C2", + today: "\u03A3\u03AE\u03BC\u03B5\u03C1\u03B1", + month: "\u039C\u03AE\u03BD\u03B1\u03C2", + week: "\u0395\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1", + day: "\u0397\u03BC\u03AD\u03C1\u03B1", + list: "\u0391\u03C4\u03B6\u03AD\u03BD\u03C4\u03B1" + }, + weekText: "\u0395\u03B2\u03B4", + allDayText: "\u039F\u03BB\u03BF\u03AE\u03BC\u03B5\u03C1\u03BF", + moreLinkText: "\u03C0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B1", + noEventsText: "\u0394\u03B5\u03BD \u03C5\u03C0\u03AC\u03C1\u03C7\u03BF\u03C5\u03BD \u03B3\u03B5\u03B3\u03BF\u03BD\u03CC\u03C4\u03B1 \u03C0\u03C1\u03BF\u03C2 \u03B5\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7" + }; + + return el; + +}()); diff --git a/public/js/fullcalendar/locales/en-au.js b/public/js/fullcalendar/locales/en-au.js new file mode 100644 index 00000000..820fcfb3 --- /dev/null +++ b/public/js/fullcalendar/locales/en-au.js @@ -0,0 +1,24 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var enAu = { + code: "en-au", + week: { + dow: 1, + doy: 4 + }, + buttonHints: { + prev: "Previous $0", + next: "Next $0", + today: "This $0" + }, + viewHint: "$0 view", + navLinkHint: "Go to $0", + moreLinkHint: function(eventCnt) { + return "Show ".concat(eventCnt, " more event").concat(eventCnt === 1 ? "" : "s"); + } + }; + + return enAu; + +}()); diff --git a/public/js/fullcalendar/locales/en-gb.js b/public/js/fullcalendar/locales/en-gb.js new file mode 100644 index 00000000..2ffb8264 --- /dev/null +++ b/public/js/fullcalendar/locales/en-gb.js @@ -0,0 +1,24 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var enGb = { + code: "en-gb", + week: { + dow: 1, + doy: 4 + }, + buttonHints: { + prev: "Previous $0", + next: "Next $0", + today: "This $0" + }, + viewHint: "$0 view", + navLinkHint: "Go to $0", + moreLinkHint: function(eventCnt) { + return "Show ".concat(eventCnt, " more event").concat(eventCnt === 1 ? "" : "s"); + } + }; + + return enGb; + +}()); diff --git a/public/js/fullcalendar/locales/en-nz.js b/public/js/fullcalendar/locales/en-nz.js new file mode 100644 index 00000000..5e9c1085 --- /dev/null +++ b/public/js/fullcalendar/locales/en-nz.js @@ -0,0 +1,24 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var enNz = { + code: "en-nz", + week: { + dow: 1, + doy: 4 + }, + buttonHints: { + prev: "Previous $0", + next: "Next $0", + today: "This $0" + }, + viewHint: "$0 view", + navLinkHint: "Go to $0", + moreLinkHint: function(eventCnt) { + return "Show ".concat(eventCnt, " more event").concat(eventCnt === 1 ? "" : "s"); + } + }; + + return enNz; + +}()); diff --git a/public/js/fullcalendar/locales/eo.js b/public/js/fullcalendar/locales/eo.js new file mode 100644 index 00000000..11bc3da6 --- /dev/null +++ b/public/js/fullcalendar/locales/eo.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var eo = { + code: "eo", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Anta\u016Da", + next: "Sekva", + today: "Hodia\u016D", + month: "Monato", + week: "Semajno", + day: "Tago", + list: "Tagordo" + }, + weekText: "Sm", + allDayText: "Tuta tago", + moreLinkText: "pli", + noEventsText: "Neniuj eventoj por montri" + }; + + return eo; + +}()); diff --git a/public/js/fullcalendar/locales/es-us.js b/public/js/fullcalendar/locales/es-us.js new file mode 100644 index 00000000..89f38cf1 --- /dev/null +++ b/public/js/fullcalendar/locales/es-us.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var esUs = { + code: "es", + week: { + dow: 0, + doy: 6 + }, + buttonText: { + prev: "Ant", + next: "Sig", + today: "Hoy", + month: "Mes", + week: "Semana", + day: "D\xEDa", + list: "Agenda" + }, + weekText: "Sm", + allDayText: "Todo el d\xEDa", + moreLinkText: "m\xE1s", + noEventsText: "No hay eventos para mostrar" + }; + + return esUs; + +}()); diff --git a/public/js/fullcalendar/locales/es.js b/public/js/fullcalendar/locales/es.js new file mode 100644 index 00000000..71022ed1 --- /dev/null +++ b/public/js/fullcalendar/locales/es.js @@ -0,0 +1,45 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var es = { + code: "es", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Ant", + next: "Sig", + today: "Hoy", + month: "Mes", + week: "Semana", + day: "D\xEDa", + list: "Agenda" + }, + buttonHints: { + prev: "$0 antes", + next: "$0 siguiente", + today: function(buttonText) { + return buttonText === "D\xEDa" ? "Hoy" : (buttonText === "Semana" ? "Esta" : "Este") + " " + buttonText.toLocaleLowerCase(); + } + }, + viewHint: function(buttonText) { + return "Vista " + (buttonText === "Semana" ? "de la" : "del") + " " + buttonText.toLocaleLowerCase(); + }, + weekText: "Sm", + weekTextLong: "Semana", + allDayText: "Todo el d\xEDa", + moreLinkText: "m\xE1s", + moreLinkHint: function(eventCnt) { + return "Mostrar ".concat(eventCnt, " eventos m\xE1s"); + }, + noEventsText: "No hay eventos para mostrar", + navLinkHint: "Ir al $0", + closeHint: "Cerrar", + timeHint: "La hora", + eventHint: "Evento" + }; + + return es; + +}()); diff --git a/public/js/fullcalendar/locales/et.js b/public/js/fullcalendar/locales/et.js new file mode 100644 index 00000000..a603c0a9 --- /dev/null +++ b/public/js/fullcalendar/locales/et.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var et = { + code: "et", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Eelnev", + next: "J\xE4rgnev", + today: "T\xE4na", + month: "Kuu", + week: "N\xE4dal", + day: "P\xE4ev", + list: "P\xE4evakord" + }, + weekText: "n\xE4d", + allDayText: "Kogu p\xE4ev", + moreLinkText: function(n) { + return "+ veel " + n; + }, + noEventsText: "Kuvamiseks puuduvad s\xFCndmused" + }; + + return et; + +}()); diff --git a/public/js/fullcalendar/locales/eu.js b/public/js/fullcalendar/locales/eu.js new file mode 100644 index 00000000..c7195443 --- /dev/null +++ b/public/js/fullcalendar/locales/eu.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var eu = { + code: "eu", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Aur", + next: "Hur", + today: "Gaur", + month: "Hilabetea", + week: "Astea", + day: "Eguna", + list: "Agenda" + }, + weekText: "As", + allDayText: "Egun osoa", + moreLinkText: "gehiago", + noEventsText: "Ez dago ekitaldirik erakusteko" + }; + + return eu; + +}()); diff --git a/public/js/fullcalendar/locales/fa.js b/public/js/fullcalendar/locales/fa.js new file mode 100644 index 00000000..e95adbd9 --- /dev/null +++ b/public/js/fullcalendar/locales/fa.js @@ -0,0 +1,30 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var fa = { + code: "fa", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u0642\u0628\u0644\u06CC", + next: "\u0628\u0639\u062F\u06CC", + today: "\u0627\u0645\u0631\u0648\u0632", + month: "\u0645\u0627\u0647", + week: "\u0647\u0641\u062A\u0647", + day: "\u0631\u0648\u0632", + list: "\u0628\u0631\u0646\u0627\u0645\u0647" + }, + weekText: "\u0647\u0641", + allDayText: "\u062A\u0645\u0627\u0645 \u0631\u0648\u0632", + moreLinkText: function(n) { + return "\u0628\u06CC\u0634 \u0627\u0632 " + n; + }, + noEventsText: "\u0647\u06CC\u0686 \u0631\u0648\u06CC\u062F\u0627\u062F\u06CC \u0628\u0647 \u0646\u0645\u0627\u06CC\u0634" + }; + + return fa; + +}()); diff --git a/public/js/fullcalendar/locales/fi.js b/public/js/fullcalendar/locales/fi.js new file mode 100644 index 00000000..19257171 --- /dev/null +++ b/public/js/fullcalendar/locales/fi.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var fi = { + code: "fi", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Edellinen", + next: "Seuraava", + today: "T\xE4n\xE4\xE4n", + month: "Kuukausi", + week: "Viikko", + day: "P\xE4iv\xE4", + list: "Tapahtumat" + }, + weekText: "Vk", + allDayText: "Koko p\xE4iv\xE4", + moreLinkText: "lis\xE4\xE4", + noEventsText: "Ei n\xE4ytett\xE4vi\xE4 tapahtumia" + }; + + return fi; + +}()); diff --git a/public/js/fullcalendar/locales/fr-ca.js b/public/js/fullcalendar/locales/fr-ca.js new file mode 100644 index 00000000..4a533a8e --- /dev/null +++ b/public/js/fullcalendar/locales/fr-ca.js @@ -0,0 +1,24 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var frCa = { + code: "fr", + buttonText: { + prev: "Pr\xE9c\xE9dent", + next: "Suivant", + today: "Aujourd'hui", + year: "Ann\xE9e", + month: "Mois", + week: "Semaine", + day: "Jour", + list: "Mon planning" + }, + weekText: "Sem.", + allDayText: "Toute la journ\xE9e", + moreLinkText: "en plus", + noEventsText: "Aucun \xE9v\xE9nement \xE0 afficher" + }; + + return frCa; + +}()); diff --git a/public/js/fullcalendar/locales/fr-ch.js b/public/js/fullcalendar/locales/fr-ch.js new file mode 100644 index 00000000..b3efa061 --- /dev/null +++ b/public/js/fullcalendar/locales/fr-ch.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var frCh = { + code: "fr-ch", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Pr\xE9c\xE9dent", + next: "Suivant", + today: "Courant", + year: "Ann\xE9e", + month: "Mois", + week: "Semaine", + day: "Jour", + list: "Mon planning" + }, + weekText: "Sm", + allDayText: "Toute la journ\xE9e", + moreLinkText: "en plus", + noEventsText: "Aucun \xE9v\xE9nement \xE0 afficher" + }; + + return frCh; + +}()); diff --git a/public/js/fullcalendar/locales/fr.js b/public/js/fullcalendar/locales/fr.js new file mode 100644 index 00000000..7f5f6fdf --- /dev/null +++ b/public/js/fullcalendar/locales/fr.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var fr = { + code: "fr", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Pr\xE9c\xE9dent", + next: "Suivant", + today: "Aujourd'hui", + year: "Ann\xE9e", + month: "Mois", + week: "Semaine", + day: "Jour", + list: "Planning" + }, + weekText: "Sem.", + allDayText: "Toute la journ\xE9e", + moreLinkText: "en plus", + noEventsText: "Aucun \xE9v\xE9nement \xE0 afficher" + }; + + return fr; + +}()); diff --git a/public/js/fullcalendar/locales/gl.js b/public/js/fullcalendar/locales/gl.js new file mode 100644 index 00000000..ddc3837e --- /dev/null +++ b/public/js/fullcalendar/locales/gl.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var gl = { + code: "gl", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Ant", + next: "Seg", + today: "Hoxe", + month: "Mes", + week: "Semana", + day: "D\xEDa", + list: "Axenda" + }, + weekText: "Sm", + allDayText: "Todo o d\xEDa", + moreLinkText: "m\xE1is", + noEventsText: "Non hai eventos para amosar" + }; + + return gl; + +}()); diff --git a/public/js/fullcalendar/locales/he.js b/public/js/fullcalendar/locales/he.js new file mode 100644 index 00000000..c02b75de --- /dev/null +++ b/public/js/fullcalendar/locales/he.js @@ -0,0 +1,24 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var he = { + code: "he", + direction: "rtl", + buttonText: { + prev: "\u05D4\u05E7\u05D5\u05D3\u05DD", + next: "\u05D4\u05D1\u05D0", + today: "\u05D4\u05D9\u05D5\u05DD", + month: "\u05D7\u05D5\u05D3\u05E9", + week: "\u05E9\u05D1\u05D5\u05E2", + day: "\u05D9\u05D5\u05DD", + list: "\u05E1\u05D3\u05E8 \u05D9\u05D5\u05DD" + }, + allDayText: "\u05DB\u05DC \u05D4\u05D9\u05D5\u05DD", + moreLinkText: "\u05D0\u05D7\u05E8", + noEventsText: "\u05D0\u05D9\u05DF \u05D0\u05D9\u05E8\u05D5\u05E2\u05D9\u05DD \u05DC\u05D4\u05E6\u05D2\u05D4", + weekText: "\u05E9\u05D1\u05D5\u05E2" + }; + + return he; + +}()); diff --git a/public/js/fullcalendar/locales/hi.js b/public/js/fullcalendar/locales/hi.js new file mode 100644 index 00000000..4bf1b7b4 --- /dev/null +++ b/public/js/fullcalendar/locales/hi.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var hi = { + code: "hi", + week: { + dow: 0, + doy: 6 + }, + buttonText: { + prev: "\u092A\u093F\u091B\u0932\u093E", + next: "\u0905\u0917\u0932\u093E", + today: "\u0906\u091C", + month: "\u092E\u0939\u0940\u0928\u093E", + week: "\u0938\u092A\u094D\u0924\u093E\u0939", + day: "\u0926\u093F\u0928", + list: "\u0915\u093E\u0930\u094D\u092F\u0938\u0942\u091A\u0940" + }, + weekText: "\u0939\u092B\u094D\u0924\u093E", + allDayText: "\u0938\u092D\u0940 \u0926\u093F\u0928", + moreLinkText: function(n) { + return "+\u0905\u0927\u093F\u0915 " + n; + }, + noEventsText: "\u0915\u094B\u0908 \u0918\u091F\u0928\u093E\u0913\u0902 \u0915\u094B \u092A\u094D\u0930\u0926\u0930\u094D\u0936\u093F\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" + }; + + return hi; + +}()); diff --git a/public/js/fullcalendar/locales/hr.js b/public/js/fullcalendar/locales/hr.js new file mode 100644 index 00000000..062ffdba --- /dev/null +++ b/public/js/fullcalendar/locales/hr.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var hr = { + code: "hr", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Prija\u0161nji", + next: "Sljede\u0107i", + today: "Danas", + month: "Mjesec", + week: "Tjedan", + day: "Dan", + list: "Raspored" + }, + weekText: "Tje", + allDayText: "Cijeli dan", + moreLinkText: function(n) { + return "+ jo\u0161 " + n; + }, + noEventsText: "Nema doga\u0111aja za prikaz" + }; + + return hr; + +}()); diff --git a/public/js/fullcalendar/locales/hu.js b/public/js/fullcalendar/locales/hu.js new file mode 100644 index 00000000..efe2d8ce --- /dev/null +++ b/public/js/fullcalendar/locales/hu.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var hu = { + code: "hu", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "vissza", + next: "el\u0151re", + today: "ma", + month: "H\xF3nap", + week: "H\xE9t", + day: "Nap", + list: "Lista" + }, + weekText: "H\xE9t", + allDayText: "Eg\xE9sz nap", + moreLinkText: "tov\xE1bbi", + noEventsText: "Nincs megjelen\xEDthet\u0151 esem\xE9ny" + }; + + return hu; + +}()); diff --git a/public/js/fullcalendar/locales/hy-am.js b/public/js/fullcalendar/locales/hy-am.js new file mode 100644 index 00000000..4ed3551b --- /dev/null +++ b/public/js/fullcalendar/locales/hy-am.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var hyAm = { + code: "hy-am", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0546\u0561\u056D\u0578\u0580\u0564", + next: "\u0540\u0561\u057B\u0578\u0580\u0564", + today: "\u0531\u0575\u057D\u0585\u0580", + month: "\u0531\u0574\u056B\u057D", + week: "\u0547\u0561\u0562\u0561\u0569", + day: "\u0555\u0580", + list: "\u0555\u0580\u057E\u0561 \u0581\u0578\u0582\u0581\u0561\u056F" + }, + weekText: "\u0547\u0561\u0562", + allDayText: "\u0531\u0574\u0562\u0578\u0572\u057B \u0585\u0580", + moreLinkText: function(n) { + return "+ \u0587\u057D " + n; + }, + noEventsText: "\u0532\u0561\u0581\u0561\u056F\u0561\u0575\u0578\u0582\u0574 \u0567 \u056B\u0580\u0561\u0564\u0561\u0580\u0571\u0578\u0582\u0569\u0575\u0578\u0582\u0576\u0568 \u0581\u0578\u0582\u0581\u0561\u0564\u0580\u0565\u056C\u0578\u0582" + }; + + return hyAm; + +}()); diff --git a/public/js/fullcalendar/locales/id.js b/public/js/fullcalendar/locales/id.js new file mode 100644 index 00000000..7fa86143 --- /dev/null +++ b/public/js/fullcalendar/locales/id.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var id = { + code: "id", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "mundur", + next: "maju", + today: "hari ini", + month: "Bulan", + week: "Minggu", + day: "Hari", + list: "Agenda" + }, + weekText: "Mg", + allDayText: "Sehari penuh", + moreLinkText: "lebih", + noEventsText: "Tidak ada acara untuk ditampilkan" + }; + + return id; + +}()); diff --git a/public/js/fullcalendar/locales/is.js b/public/js/fullcalendar/locales/is.js new file mode 100644 index 00000000..0acbca0b --- /dev/null +++ b/public/js/fullcalendar/locales/is.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var is = { + code: "is", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Fyrri", + next: "N\xE6sti", + today: "\xCD dag", + month: "M\xE1nu\xF0ur", + week: "Vika", + day: "Dagur", + list: "Dagskr\xE1" + }, + weekText: "Vika", + allDayText: "Allan daginn", + moreLinkText: "meira", + noEventsText: "Engir vi\xF0bur\xF0ir til a\xF0 s\xFDna" + }; + + return is; + +}()); diff --git a/public/js/fullcalendar/locales/it.js b/public/js/fullcalendar/locales/it.js new file mode 100644 index 00000000..6fa49d3b --- /dev/null +++ b/public/js/fullcalendar/locales/it.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var it = { + code: "it", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Prec", + next: "Succ", + today: "Oggi", + month: "Mese", + week: "Settimana", + day: "Giorno", + list: "Agenda" + }, + weekText: "Sm", + allDayText: "Tutto il giorno", + moreLinkText: function(n) { + return "+altri " + n; + }, + noEventsText: "Non ci sono eventi da visualizzare" + }; + + return it; + +}()); diff --git a/public/js/fullcalendar/locales/ja.js b/public/js/fullcalendar/locales/ja.js new file mode 100644 index 00000000..31a045ab --- /dev/null +++ b/public/js/fullcalendar/locales/ja.js @@ -0,0 +1,25 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ja = { + code: "ja", + buttonText: { + prev: "\u524D", + next: "\u6B21", + today: "\u4ECA\u65E5", + month: "\u6708", + week: "\u9031", + day: "\u65E5", + list: "\u4E88\u5B9A\u30EA\u30B9\u30C8" + }, + weekText: "\u9031", + allDayText: "\u7D42\u65E5", + moreLinkText: function(n) { + return "\u4ED6 " + n + " \u4EF6"; + }, + noEventsText: "\u8868\u793A\u3059\u308B\u4E88\u5B9A\u306F\u3042\u308A\u307E\u305B\u3093" + }; + + return ja; + +}()); diff --git a/public/js/fullcalendar/locales/ka.js b/public/js/fullcalendar/locales/ka.js new file mode 100644 index 00000000..c3f5d575 --- /dev/null +++ b/public/js/fullcalendar/locales/ka.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ka = { + code: "ka", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u10EC\u10D8\u10DC\u10D0", + next: "\u10E8\u10D4\u10DB\u10D3\u10D4\u10D2\u10D8", + today: "\u10D3\u10E6\u10D4\u10E1", + month: "\u10D7\u10D5\u10D4", + week: "\u10D9\u10D5\u10D8\u10E0\u10D0", + day: "\u10D3\u10E6\u10D4", + list: "\u10D3\u10E6\u10D8\u10E1 \u10EC\u10D4\u10E1\u10E0\u10D8\u10D2\u10D8" + }, + weekText: "\u10D9\u10D5", + allDayText: "\u10DB\u10D7\u10D4\u10DA\u10D8 \u10D3\u10E6\u10D4", + moreLinkText: function(n) { + return "+ \u10D9\u10D8\u10D3\u10D4\u10D5 " + n; + }, + noEventsText: "\u10E6\u10DD\u10DC\u10D8\u10E1\u10EB\u10D8\u10D4\u10D1\u10D4\u10D1\u10D8 \u10D0\u10E0 \u10D0\u10E0\u10D8\u10E1" + }; + + return ka; + +}()); diff --git a/public/js/fullcalendar/locales/kk.js b/public/js/fullcalendar/locales/kk.js new file mode 100644 index 00000000..9ea70ac2 --- /dev/null +++ b/public/js/fullcalendar/locales/kk.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var kk = { + code: "kk", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u0410\u043B\u0434\u044B\u04A3\u0493\u044B", + next: "\u041A\u0435\u043B\u0435\u0441\u0456", + today: "\u0411\u04AF\u0433\u0456\u043D", + month: "\u0410\u0439", + week: "\u0410\u043F\u0442\u0430", + day: "\u041A\u04AF\u043D", + list: "\u041A\u04AF\u043D \u0442\u04D9\u0440\u0442\u0456\u0431\u0456" + }, + weekText: "\u041D\u0435", + allDayText: "\u041A\u04AF\u043D\u0456 \u0431\u043E\u0439\u044B", + moreLinkText: function(n) { + return "+ \u0442\u0430\u0493\u044B " + n; + }, + noEventsText: "\u041A\u04E9\u0440\u0441\u0435\u0442\u0443 \u04AF\u0448\u0456\u043D \u043E\u049B\u0438\u0493\u0430\u043B\u0430\u0440 \u0436\u043E\u049B" + }; + + return kk; + +}()); diff --git a/public/js/fullcalendar/locales/km.js b/public/js/fullcalendar/locales/km.js new file mode 100644 index 00000000..cd69596f --- /dev/null +++ b/public/js/fullcalendar/locales/km.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var km = { + code: "km", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u1798\u17BB\u1793", + next: "\u1794\u1793\u17D2\u1791\u17B6\u1794\u17CB", + today: "\u1790\u17D2\u1784\u17C3\u1793\u17C1\u17C7", + year: "\u1786\u17D2\u1793\u17B6\u17C6", + month: "\u1781\u17C2", + week: "\u179F\u1794\u17D2\u178F\u17B6\u17A0\u17CD", + day: "\u1790\u17D2\u1784\u17C3", + list: "\u1794\u1789\u17D2\u1787\u17B8" + }, + weekText: "\u179F\u1794\u17D2\u178F\u17B6\u17A0\u17CD", + allDayText: "\u1796\u17C1\u1789\u1798\u17BD\u1799\u1790\u17D2\u1784\u17C3", + moreLinkText: "\u1785\u17D2\u179A\u17BE\u1793\u1791\u17C0\u178F", + noEventsText: "\u1782\u17D2\u1798\u17B6\u1793\u1796\u17D2\u179A\u17B9\u178F\u17D2\u178F\u17B7\u1780\u17B6\u179A\u178E\u17CD\u178F\u17D2\u179A\u17BC\u179C\u1794\u1784\u17D2\u17A0\u17B6\u1789" + }; + + return km; + +}()); diff --git a/public/js/fullcalendar/locales/ko.js b/public/js/fullcalendar/locales/ko.js new file mode 100644 index 00000000..cb03250d --- /dev/null +++ b/public/js/fullcalendar/locales/ko.js @@ -0,0 +1,23 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ko = { + code: "ko", + buttonText: { + prev: "\uC774\uC804\uB2EC", + next: "\uB2E4\uC74C\uB2EC", + today: "\uC624\uB298", + month: "\uC6D4", + week: "\uC8FC", + day: "\uC77C", + list: "\uC77C\uC815\uBAA9\uB85D" + }, + weekText: "\uC8FC", + allDayText: "\uC885\uC77C", + moreLinkText: "\uAC1C", + noEventsText: "\uC77C\uC815\uC774 \uC5C6\uC2B5\uB2C8\uB2E4" + }; + + return ko; + +}()); diff --git a/public/js/fullcalendar/locales/ku.js b/public/js/fullcalendar/locales/ku.js new file mode 100644 index 00000000..0465706b --- /dev/null +++ b/public/js/fullcalendar/locales/ku.js @@ -0,0 +1,28 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ku = { + code: "ku", + week: { + dow: 6, + doy: 12 + }, + direction: "rtl", + buttonText: { + prev: "\u067E\u06CE\u0634\u062A\u0631", + next: "\u062F\u0648\u0627\u062A\u0631", + today: "\u0626\u06D5\u0645\u0695\u0648", + month: "\u0645\u0627\u0646\u06AF", + week: "\u0647\u06D5\u0641\u062A\u06D5", + day: "\u0695\u06C6\u0698", + list: "\u0628\u06D5\u0631\u0646\u0627\u0645\u06D5" + }, + weekText: "\u0647\u06D5\u0641\u062A\u06D5", + allDayText: "\u0647\u06D5\u0645\u0648\u0648 \u0695\u06C6\u0698\u06D5\u06A9\u06D5", + moreLinkText: "\u0632\u06CC\u0627\u062A\u0631", + noEventsText: "\u0647\u06CC\u0686 \u0695\u0648\u0648\u062F\u0627\u0648\u06CE\u0643 \u0646\u06CC\u06D5" + }; + + return ku; + +}()); diff --git a/public/js/fullcalendar/locales/lb.js b/public/js/fullcalendar/locales/lb.js new file mode 100644 index 00000000..ba9fe102 --- /dev/null +++ b/public/js/fullcalendar/locales/lb.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var lb = { + code: "lb", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Zr\xE9ck", + next: "Weider", + today: "Haut", + month: "Mount", + week: "Woch", + day: "Dag", + list: "Terminiwwersiicht" + }, + weekText: "W", + allDayText: "Ganzen Dag", + moreLinkText: "m\xE9i", + noEventsText: "Nee Evenementer ze affich\xE9ieren" + }; + + return lb; + +}()); diff --git a/public/js/fullcalendar/locales/lt.js b/public/js/fullcalendar/locales/lt.js new file mode 100644 index 00000000..a50349e5 --- /dev/null +++ b/public/js/fullcalendar/locales/lt.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var lt = { + code: "lt", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Atgal", + next: "Pirmyn", + today: "\u0160iandien", + month: "M\u0117nuo", + week: "Savait\u0117", + day: "Diena", + list: "Darbotvark\u0117" + }, + weekText: "SAV", + allDayText: "Vis\u0105 dien\u0105", + moreLinkText: "daugiau", + noEventsText: "N\u0117ra \u012Fvyki\u0173 rodyti" + }; + + return lt; + +}()); diff --git a/public/js/fullcalendar/locales/lv.js b/public/js/fullcalendar/locales/lv.js new file mode 100644 index 00000000..16e67a9d --- /dev/null +++ b/public/js/fullcalendar/locales/lv.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var lv = { + code: "lv", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Iepr.", + next: "N\u0101k.", + today: "\u0160odien", + month: "M\u0113nesis", + week: "Ned\u0113\u013Ca", + day: "Diena", + list: "Dienas k\u0101rt\u012Bba" + }, + weekText: "Ned.", + allDayText: "Visu dienu", + moreLinkText: function(n) { + return "+v\u0113l " + n; + }, + noEventsText: "Nav notikumu" + }; + + return lv; + +}()); diff --git a/public/js/fullcalendar/locales/mk.js b/public/js/fullcalendar/locales/mk.js new file mode 100644 index 00000000..fd594ef3 --- /dev/null +++ b/public/js/fullcalendar/locales/mk.js @@ -0,0 +1,25 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var mk = { + code: "mk", + buttonText: { + prev: "\u043F\u0440\u0435\u0442\u0445\u043E\u0434\u043D\u043E", + next: "\u0441\u043B\u0435\u0434\u043D\u043E", + today: "\u0414\u0435\u043D\u0435\u0441", + month: "\u041C\u0435\u0441\u0435\u0446", + week: "\u041D\u0435\u0434\u0435\u043B\u0430", + day: "\u0414\u0435\u043D", + list: "\u0413\u0440\u0430\u0444\u0438\u043A" + }, + weekText: "\u0421\u0435\u0434", + allDayText: "\u0426\u0435\u043B \u0434\u0435\u043D", + moreLinkText: function(n) { + return "+\u043F\u043E\u0432\u0435\u045C\u0435 " + n; + }, + noEventsText: "\u041D\u0435\u043C\u0430 \u043D\u0430\u0441\u0442\u0430\u043D\u0438 \u0437\u0430 \u043F\u0440\u0438\u043A\u0430\u0436\u0443\u0432\u0430\u045A\u0435" + }; + + return mk; + +}()); diff --git a/public/js/fullcalendar/locales/ms.js b/public/js/fullcalendar/locales/ms.js new file mode 100644 index 00000000..ba2de7ff --- /dev/null +++ b/public/js/fullcalendar/locales/ms.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ms = { + code: "ms", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Sebelum", + next: "Selepas", + today: "hari ini", + month: "Bulan", + week: "Minggu", + day: "Hari", + list: "Agenda" + }, + weekText: "Mg", + allDayText: "Sepanjang hari", + moreLinkText: function(n) { + return "masih ada " + n + " acara"; + }, + noEventsText: "Tiada peristiwa untuk dipaparkan" + }; + + return ms; + +}()); diff --git a/public/js/fullcalendar/locales/nb.js b/public/js/fullcalendar/locales/nb.js new file mode 100644 index 00000000..5f31e2bd --- /dev/null +++ b/public/js/fullcalendar/locales/nb.js @@ -0,0 +1,38 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var nb = { + code: "nb", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Forrige", + next: "Neste", + today: "I dag", + month: "M\xE5ned", + week: "Uke", + day: "Dag", + list: "Agenda" + }, + weekText: "Uke", + weekTextLong: "Uke", + allDayText: "Hele dagen", + moreLinkText: "til", + noEventsText: "Ingen hendelser \xE5 vise", + buttonHints: { + prev: "Forrige $0", + next: "Neste $0", + today: "N\xE5v\xE6rende $0" + }, + viewHint: "$0 visning", + navLinkHint: "G\xE5 til $0", + moreLinkHint: function(eventCnt) { + return "Vis ".concat(eventCnt, " flere hendelse").concat(eventCnt === 1 ? "" : "r"); + } + }; + + return nb; + +}()); diff --git a/public/js/fullcalendar/locales/ne.js b/public/js/fullcalendar/locales/ne.js new file mode 100644 index 00000000..e9e89e4b --- /dev/null +++ b/public/js/fullcalendar/locales/ne.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ne = { + code: "ne", + week: { + dow: 7, + doy: 1 + }, + buttonText: { + prev: "\u0905\u0918\u093F\u0932\u094D\u0932\u094B", + next: "\u0905\u0930\u094D\u0915\u094B", + today: "\u0906\u091C", + month: "\u092E\u0939\u093F\u0928\u093E", + week: "\u0939\u092A\u094D\u0924\u093E", + day: "\u0926\u093F\u0928", + list: "\u0938\u0942\u091A\u0940" + }, + weekText: "\u0939\u092A\u094D\u0924\u093E", + allDayText: "\u0926\u093F\u0928\u092D\u0930\u093F", + moreLinkText: "\u0925\u092A \u0932\u093F\u0902\u0915", + noEventsText: "\u0926\u0947\u0916\u093E\u0909\u0928\u0915\u094B \u0932\u093E\u0917\u093F \u0915\u0941\u0928\u0948 \u0918\u091F\u0928\u093E\u0939\u0930\u0942 \u091B\u0948\u0928\u0928\u094D" + }; + + return ne; + +}()); diff --git a/public/js/fullcalendar/locales/nl.js b/public/js/fullcalendar/locales/nl.js new file mode 100644 index 00000000..55b6a377 --- /dev/null +++ b/public/js/fullcalendar/locales/nl.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var nl = { + code: "nl", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Vorige", + next: "Volgende", + today: "Vandaag", + year: "Jaar", + month: "Maand", + week: "Week", + day: "Dag", + list: "Agenda" + }, + allDayText: "Hele dag", + moreLinkText: "extra", + noEventsText: "Geen evenementen om te laten zien" + }; + + return nl; + +}()); diff --git a/public/js/fullcalendar/locales/nn.js b/public/js/fullcalendar/locales/nn.js new file mode 100644 index 00000000..2ef5303f --- /dev/null +++ b/public/js/fullcalendar/locales/nn.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var nn = { + code: "nn", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "F\xF8rre", + next: "Neste", + today: "I dag", + month: "M\xE5nad", + week: "Veke", + day: "Dag", + list: "Agenda" + }, + weekText: "Veke", + allDayText: "Heile dagen", + moreLinkText: "til", + noEventsText: "Ingen hendelser \xE5 vise" + }; + + return nn; + +}()); diff --git a/public/js/fullcalendar/locales/pl.js b/public/js/fullcalendar/locales/pl.js new file mode 100644 index 00000000..8b788a14 --- /dev/null +++ b/public/js/fullcalendar/locales/pl.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var pl = { + code: "pl", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Poprzedni", + next: "Nast\u0119pny", + today: "Dzi\u015B", + month: "Miesi\u0105c", + week: "Tydzie\u0144", + day: "Dzie\u0144", + list: "Plan dnia" + }, + weekText: "Tydz", + allDayText: "Ca\u0142y dzie\u0144", + moreLinkText: "wi\u0119cej", + noEventsText: "Brak wydarze\u0144 do wy\u015Bwietlenia" + }; + + return pl; + +}()); diff --git a/public/js/fullcalendar/locales/pt-br.js b/public/js/fullcalendar/locales/pt-br.js new file mode 100644 index 00000000..0b4134f6 --- /dev/null +++ b/public/js/fullcalendar/locales/pt-br.js @@ -0,0 +1,25 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ptBr = { + code: "pt-br", + buttonText: { + prev: "Anterior", + next: "Pr\xF3ximo", + today: "Hoje", + month: "M\xEAs", + week: "Semana", + day: "Dia", + list: "Lista" + }, + weekText: "Sm", + allDayText: "dia inteiro", + moreLinkText: function(n) { + return "mais +" + n; + }, + noEventsText: "N\xE3o h\xE1 eventos para mostrar" + }; + + return ptBr; + +}()); diff --git a/public/js/fullcalendar/locales/pt.js b/public/js/fullcalendar/locales/pt.js new file mode 100644 index 00000000..c8583b66 --- /dev/null +++ b/public/js/fullcalendar/locales/pt.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var pt = { + code: "pt", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Anterior", + next: "Seguinte", + today: "Hoje", + month: "M\xEAs", + week: "Semana", + day: "Dia", + list: "Agenda" + }, + weekText: "Sem", + allDayText: "Todo o dia", + moreLinkText: "mais", + noEventsText: "N\xE3o h\xE1 eventos para mostrar" + }; + + return pt; + +}()); diff --git a/public/js/fullcalendar/locales/ro.js b/public/js/fullcalendar/locales/ro.js new file mode 100644 index 00000000..355d8d11 --- /dev/null +++ b/public/js/fullcalendar/locales/ro.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ro = { + code: "ro", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "precedent\u0103", + next: "urm\u0103toare", + today: "Azi", + month: "Lun\u0103", + week: "S\u0103pt\u0103m\xE2n\u0103", + day: "Zi", + list: "Agend\u0103" + }, + weekText: "S\u0103pt", + allDayText: "Toat\u0103 ziua", + moreLinkText: function(n) { + return "+alte " + n; + }, + noEventsText: "Nu exist\u0103 evenimente de afi\u0219at" + }; + + return ro; + +}()); diff --git a/public/js/fullcalendar/locales/ru.js b/public/js/fullcalendar/locales/ru.js new file mode 100644 index 00000000..c7981cd3 --- /dev/null +++ b/public/js/fullcalendar/locales/ru.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ru = { + code: "ru", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u041F\u0440\u0435\u0434", + next: "\u0421\u043B\u0435\u0434", + today: "\u0421\u0435\u0433\u043E\u0434\u043D\u044F", + month: "\u041C\u0435\u0441\u044F\u0446", + week: "\u041D\u0435\u0434\u0435\u043B\u044F", + day: "\u0414\u0435\u043D\u044C", + list: "\u041F\u043E\u0432\u0435\u0441\u0442\u043A\u0430 \u0434\u043D\u044F" + }, + weekText: "\u041D\u0435\u0434", + allDayText: "\u0412\u0435\u0441\u044C \u0434\u0435\u043D\u044C", + moreLinkText: function(n) { + return "+ \u0435\u0449\u0451 " + n; + }, + noEventsText: "\u041D\u0435\u0442 \u0441\u043E\u0431\u044B\u0442\u0438\u0439 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F" + }; + + return ru; + +}()); diff --git a/public/js/fullcalendar/locales/si-lk.js b/public/js/fullcalendar/locales/si-lk.js new file mode 100644 index 00000000..03f8a20b --- /dev/null +++ b/public/js/fullcalendar/locales/si-lk.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var siLk = { + code: "si-lk", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0DB4\u0DD9\u0DBB", + next: "\u0DB4\u0DC3\u0DD4", + today: "\u0D85\u0DAF", + month: "\u0DB8\u0DCF\u0DC3\u0DBA", + week: "\u0DC3\u0DAD\u0DD2\u0DBA", + day: "\u0DAF\u0DC0\u0DC3", + list: "\u0DBD\u0DD0\u0DBA\u0DD2\u0DC3\u0DCA\u0DAD\u0DD4\u0DC0" + }, + weekText: "\u0DC3\u0DAD\u0DD2", + allDayText: "\u0DC3\u0DD2\u0DBA\u0DBD\u0DD4", + moreLinkText: "\u0DAD\u0DC0\u0DAD\u0DCA", + noEventsText: "\u0DB8\u0DD4\u0D9A\u0DD4\u0DAD\u0DCA \u0DB1\u0DD0\u0DAD" + }; + + return siLk; + +}()); diff --git a/public/js/fullcalendar/locales/sk.js b/public/js/fullcalendar/locales/sk.js new file mode 100644 index 00000000..e12f515a --- /dev/null +++ b/public/js/fullcalendar/locales/sk.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var sk = { + code: "sk", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Predch\xE1dzaj\xFAci", + next: "Nasleduj\xFAci", + today: "Dnes", + month: "Mesiac", + week: "T\xFD\u017Ede\u0148", + day: "De\u0148", + list: "Rozvrh" + }, + weekText: "Ty", + allDayText: "Cel\xFD de\u0148", + moreLinkText: function(n) { + return "+\u010Fal\u0161ie: " + n; + }, + noEventsText: "\u017Diadne akcie na zobrazenie" + }; + + return sk; + +}()); diff --git a/public/js/fullcalendar/locales/sl.js b/public/js/fullcalendar/locales/sl.js new file mode 100644 index 00000000..8336d6cd --- /dev/null +++ b/public/js/fullcalendar/locales/sl.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var sl = { + code: "sl", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Prej\u0161nji", + next: "Naslednji", + today: "Trenutni", + month: "Mesec", + week: "Teden", + day: "Dan", + list: "Dnevni red" + }, + weekText: "Teden", + allDayText: "Ves dan", + moreLinkText: "ve\u010D", + noEventsText: "Ni dogodkov za prikaz" + }; + + return sl; + +}()); diff --git a/public/js/fullcalendar/locales/sm.js b/public/js/fullcalendar/locales/sm.js new file mode 100644 index 00000000..501d6e01 --- /dev/null +++ b/public/js/fullcalendar/locales/sm.js @@ -0,0 +1,23 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var sm = { + code: "sm", + buttonText: { + prev: "Talu ai", + next: "Mulimuli atu", + today: "Aso nei", + month: "Masina", + week: "Vaiaso", + day: "Aso", + list: "Faasologa" + }, + weekText: "Vaiaso", + allDayText: "Aso atoa", + moreLinkText: "sili atu", + noEventsText: "Leai ni mea na tutupu" + }; + + return sm; + +}()); diff --git a/public/js/fullcalendar/locales/sq.js b/public/js/fullcalendar/locales/sq.js new file mode 100644 index 00000000..47ee246f --- /dev/null +++ b/public/js/fullcalendar/locales/sq.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var sq = { + code: "sq", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "mbrapa", + next: "P\xEBrpara", + today: "sot", + month: "Muaj", + week: "Jav\xEB", + day: "Dit\xEB", + list: "List\xEB" + }, + weekText: "Ja", + allDayText: "Gjith\xEB dit\xEBn", + moreLinkText: function(n) { + return "+m\xEB tep\xEBr " + n; + }, + noEventsText: "Nuk ka evente p\xEBr t\xEB shfaqur" + }; + + return sq; + +}()); diff --git a/public/js/fullcalendar/locales/sr-cyrl.js b/public/js/fullcalendar/locales/sr-cyrl.js new file mode 100644 index 00000000..269d4bae --- /dev/null +++ b/public/js/fullcalendar/locales/sr-cyrl.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var srCyrl = { + code: "sr-cyrl", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u041F\u0440\u0435\u0442\u0445\u043E\u0434\u043D\u0430", + next: "\u0441\u043B\u0435\u0434\u0435\u045B\u0438", + today: "\u0414\u0430\u043D\u0430\u0441", + month: "\u041C\u0435\u0441\u0435\u0446", + week: "\u041D\u0435\u0434\u0435\u0459\u0430", + day: "\u0414\u0430\u043D", + list: "\u041F\u043B\u0430\u043D\u0435\u0440" + }, + weekText: "\u0421\u0435\u0434", + allDayText: "\u0426\u0435\u043E \u0434\u0430\u043D", + moreLinkText: function(n) { + return "+ \u0458\u043E\u0448 " + n; + }, + noEventsText: "\u041D\u0435\u043C\u0430 \u0434\u043E\u0433\u0430\u0452\u0430\u0458\u0430 \u0437\u0430 \u043F\u0440\u0438\u043A\u0430\u0437" + }; + + return srCyrl; + +}()); diff --git a/public/js/fullcalendar/locales/sr.js b/public/js/fullcalendar/locales/sr.js new file mode 100644 index 00000000..9b361c00 --- /dev/null +++ b/public/js/fullcalendar/locales/sr.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var sr = { + code: "sr", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "Prethodna", + next: "Sledec\u0301i", + today: "Danas", + month: "M\u0435s\u0435c", + week: "N\u0435d\u0435lja", + day: "Dan", + list: "Plan\u0435r" + }, + weekText: "Sed", + allDayText: "C\u0435o dan", + moreLinkText: function(n) { + return "+ jo\u0161 " + n; + }, + noEventsText: "N\u0435ma doga\u0111aja za prikaz" + }; + + return sr; + +}()); diff --git a/public/js/fullcalendar/locales/sv.js b/public/js/fullcalendar/locales/sv.js new file mode 100644 index 00000000..215aade8 --- /dev/null +++ b/public/js/fullcalendar/locales/sv.js @@ -0,0 +1,47 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var sv = { + code: "sv", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "F\xF6rra", + next: "N\xE4sta", + today: "Idag", + month: "M\xE5nad", + week: "Vecka", + day: "Dag", + list: "Program" + }, + buttonHints: { + prev: function(buttonText) { + return "F\xF6reg\xE5ende ".concat(buttonText.toLocaleLowerCase()); + }, + next: function(buttonText) { + return "N\xE4sta ".concat(buttonText.toLocaleLowerCase()); + }, + today: function(buttonText) { + return (buttonText === "Program" ? "Detta" : "Denna") + " " + buttonText.toLocaleLowerCase(); + } + }, + viewHint: "$0 vy", + navLinkHint: "G\xE5 till $0", + moreLinkHint: function(eventCnt) { + return "Visa ytterligare ".concat(eventCnt, " h\xE4ndelse").concat(eventCnt === 1 ? "" : "r"); + }, + weekText: "v.", + weekTextLong: "Vecka", + allDayText: "Heldag", + moreLinkText: "till", + noEventsText: "Inga h\xE4ndelser att visa", + closeHint: "St\xE4ng", + timeHint: "Klockan", + eventHint: "H\xE4ndelse" + }; + + return sv; + +}()); diff --git a/public/js/fullcalendar/locales/ta-in.js b/public/js/fullcalendar/locales/ta-in.js new file mode 100644 index 00000000..adbec088 --- /dev/null +++ b/public/js/fullcalendar/locales/ta-in.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var taIn = { + code: "ta-in", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF", + next: "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4\u0BA4\u0BC1", + today: "\u0B87\u0BA9\u0BCD\u0BB1\u0BC1", + month: "\u0BAE\u0BBE\u0BA4\u0BAE\u0BCD", + week: "\u0BB5\u0BBE\u0BB0\u0BAE\u0BCD", + day: "\u0BA8\u0BBE\u0BB3\u0BCD", + list: "\u0BA4\u0BBF\u0BA9\u0B9A\u0BB0\u0BBF \u0B85\u0B9F\u0BCD\u0B9F\u0BB5\u0BA3\u0BC8" + }, + weekText: "\u0BB5\u0BBE\u0BB0\u0BAE\u0BCD", + allDayText: "\u0BA8\u0BBE\u0BB3\u0BCD \u0BAE\u0BC1\u0BB4\u0BC1\u0BB5\u0BA4\u0BC1\u0BAE\u0BCD", + moreLinkText: function(n) { + return "+ \u0BAE\u0BC7\u0BB2\u0BC1\u0BAE\u0BCD " + n; + }, + noEventsText: "\u0B95\u0BBE\u0BA3\u0BCD\u0BAA\u0BBF\u0B95\u0BCD\u0B95 \u0BA8\u0BBF\u0B95\u0BB4\u0BCD\u0BB5\u0BC1\u0B95\u0BB3\u0BCD \u0B87\u0BB2\u0BCD\u0BB2\u0BC8" + }; + + return taIn; + +}()); diff --git a/public/js/fullcalendar/locales/th.js b/public/js/fullcalendar/locales/th.js new file mode 100644 index 00000000..789d2b7a --- /dev/null +++ b/public/js/fullcalendar/locales/th.js @@ -0,0 +1,30 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var th = { + code: "th", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32", + next: "\u0E16\u0E31\u0E14\u0E44\u0E1B", + prevYear: "\u0E1B\u0E35\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32", + nextYear: "\u0E1B\u0E35\u0E16\u0E31\u0E14\u0E44\u0E1B", + year: "\u0E1B\u0E35", + today: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49", + month: "\u0E40\u0E14\u0E37\u0E2D\u0E19", + week: "\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C", + day: "\u0E27\u0E31\u0E19", + list: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E01\u0E32\u0E23" + }, + weekText: "\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C", + allDayText: "\u0E15\u0E25\u0E2D\u0E14\u0E27\u0E31\u0E19", + moreLinkText: "\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21", + noEventsText: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E34\u0E08\u0E01\u0E23\u0E23\u0E21\u0E17\u0E35\u0E48\u0E08\u0E30\u0E41\u0E2A\u0E14\u0E07" + }; + + return th; + +}()); diff --git a/public/js/fullcalendar/locales/tr.js b/public/js/fullcalendar/locales/tr.js new file mode 100644 index 00000000..739f0f46 --- /dev/null +++ b/public/js/fullcalendar/locales/tr.js @@ -0,0 +1,27 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var tr = { + code: "tr", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "geri", + next: "ileri", + today: "bug\xFCn", + month: "Ay", + week: "Hafta", + day: "G\xFCn", + list: "Ajanda" + }, + weekText: "Hf", + allDayText: "T\xFCm g\xFCn", + moreLinkText: "daha fazla", + noEventsText: "G\xF6sterilecek etkinlik yok" + }; + + return tr; + +}()); diff --git a/public/js/fullcalendar/locales/ug.js b/public/js/fullcalendar/locales/ug.js new file mode 100644 index 00000000..9f1fbaca --- /dev/null +++ b/public/js/fullcalendar/locales/ug.js @@ -0,0 +1,17 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var ug = { + code: "ug", + buttonText: { + month: "\u0626\u0627\u064A", + week: "\u06BE\u06D5\u067E\u062A\u06D5", + day: "\u0643\u06C8\u0646", + list: "\u0643\u06C8\u0646\u062A\u06D5\u0631\u062A\u0649\u067E" + }, + allDayText: "\u067E\u06C8\u062A\u06C8\u0646 \u0643\u06C8\u0646" + }; + + return ug; + +}()); diff --git a/public/js/fullcalendar/locales/uk.js b/public/js/fullcalendar/locales/uk.js new file mode 100644 index 00000000..91dd2f79 --- /dev/null +++ b/public/js/fullcalendar/locales/uk.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var uk = { + code: "uk", + week: { + dow: 1, + doy: 7 + }, + buttonText: { + prev: "\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456\u0439", + next: "\u0434\u0430\u043B\u0456", + today: "\u0421\u044C\u043E\u0433\u043E\u0434\u043D\u0456", + month: "\u041C\u0456\u0441\u044F\u0446\u044C", + week: "\u0422\u0438\u0436\u0434\u0435\u043D\u044C", + day: "\u0414\u0435\u043D\u044C", + list: "\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u0434\u0435\u043D\u043D\u0438\u0439" + }, + weekText: "\u0422\u0438\u0436", + allDayText: "\u0423\u0432\u0435\u0441\u044C \u0434\u0435\u043D\u044C", + moreLinkText: function(n) { + return "+\u0449\u0435 " + n + "..."; + }, + noEventsText: "\u041D\u0435\u043C\u0430\u0454 \u043F\u043E\u0434\u0456\u0439 \u0434\u043B\u044F \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F" + }; + + return uk; + +}()); diff --git a/public/js/fullcalendar/locales/uz.js b/public/js/fullcalendar/locales/uz.js new file mode 100644 index 00000000..f1ea640c --- /dev/null +++ b/public/js/fullcalendar/locales/uz.js @@ -0,0 +1,21 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var uz = { + code: "uz", + buttonText: { + month: "Oy", + week: "Xafta", + day: "Kun", + list: "Kun tartibi" + }, + allDayText: "Kun bo'yi", + moreLinkText: function(n) { + return "+ yana " + n; + }, + noEventsText: "Ko'rsatish uchun voqealar yo'q" + }; + + return uz; + +}()); diff --git a/public/js/fullcalendar/locales/vi.js b/public/js/fullcalendar/locales/vi.js new file mode 100644 index 00000000..a5b7f52f --- /dev/null +++ b/public/js/fullcalendar/locales/vi.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var vi = { + code: "vi", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "Tr\u01B0\u1EDBc", + next: "Ti\u1EBFp", + today: "H\xF4m nay", + month: "Th\xE1ng", + week: "Tu\xE2\u0300n", + day: "Ng\xE0y", + list: "L\u1ECBch bi\u1EC3u" + }, + weekText: "Tu", + allDayText: "C\u1EA3 ng\xE0y", + moreLinkText: function(n) { + return "+ th\xEAm " + n; + }, + noEventsText: "Kh\xF4ng c\xF3 s\u1EF1 ki\u1EC7n \u0111\u1EC3 hi\u1EC3n th\u1ECB" + }; + + return vi; + +}()); diff --git a/public/js/fullcalendar/locales/zh-cn.js b/public/js/fullcalendar/locales/zh-cn.js new file mode 100644 index 00000000..7b22b371 --- /dev/null +++ b/public/js/fullcalendar/locales/zh-cn.js @@ -0,0 +1,29 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var zhCn = { + code: "zh-cn", + week: { + dow: 1, + doy: 4 + }, + buttonText: { + prev: "\u4E0A\u6708", + next: "\u4E0B\u6708", + today: "\u4ECA\u5929", + month: "\u6708", + week: "\u5468", + day: "\u65E5", + list: "\u65E5\u7A0B" + }, + weekText: "\u5468", + allDayText: "\u5168\u5929", + moreLinkText: function(n) { + return "\u53E6\u5916 " + n + " \u4E2A"; + }, + noEventsText: "\u6CA1\u6709\u4E8B\u4EF6\u663E\u793A" + }; + + return zhCn; + +}()); diff --git a/public/js/fullcalendar/locales/zh-tw.js b/public/js/fullcalendar/locales/zh-tw.js new file mode 100644 index 00000000..414b0282 --- /dev/null +++ b/public/js/fullcalendar/locales/zh-tw.js @@ -0,0 +1,23 @@ +FullCalendar.globalLocales.push(function () { + 'use strict'; + + var zhTw = { + code: "zh-tw", + buttonText: { + prev: "\u4E0A\u6708", + next: "\u4E0B\u6708", + today: "\u4ECA\u5929", + month: "\u6708", + week: "\u9031", + day: "\u5929", + list: "\u6D3B\u52D5\u5217\u8868" + }, + weekText: "\u5468", + allDayText: "\u6574\u5929", + moreLinkText: "\u986F\u793A\u66F4\u591A", + noEventsText: "\u6CA1\u6709\u4EFB\u4F55\u6D3B\u52D5" + }; + + return zhTw; + +}()); diff --git a/public/js/fullcalendar/main.css b/public/js/fullcalendar/main.css new file mode 100644 index 00000000..288a6188 --- /dev/null +++ b/public/js/fullcalendar/main.css @@ -0,0 +1,1495 @@ + +/* classes attached to */ +/* TODO: make fc-event selector work when calender in shadow DOM */ +.fc-not-allowed, +.fc-not-allowed .fc-event { /* override events' custom cursors */ + cursor: not-allowed; +} + +/* TODO: not attached to body. attached to specific els. move */ +.fc-unselectable { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-touch-callout: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +.fc { + /* layout of immediate children */ + display: flex; + flex-direction: column; + + font-size: 1em +} +.fc, + .fc *, + .fc *:before, + .fc *:after { + box-sizing: border-box; + } +.fc table { + border-collapse: collapse; + border-spacing: 0; + font-size: 1em; /* normalize cross-browser */ + } +.fc th { + text-align: center; + } +.fc th, + .fc td { + vertical-align: top; + padding: 0; + } +.fc a[data-navlink] { + cursor: pointer; + } +.fc a[data-navlink]:hover { + text-decoration: underline; + } +.fc-direction-ltr { + direction: ltr; + text-align: left; +} +.fc-direction-rtl { + direction: rtl; + text-align: right; +} +.fc-theme-standard td, + .fc-theme-standard th { + border: 1px solid #ddd; + border: 1px solid var(--fc-border-color, #ddd); + } +/* for FF, which doesn't expand a 100% div within a table cell. use absolute positioning */ +/* inner-wrappers are responsible for being absolute */ +/* TODO: best place for this? */ +.fc-liquid-hack td, + .fc-liquid-hack th { + position: relative; + } + +@font-face { + font-family: 'fcicons'; + src: url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAA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QMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format('truetype'); + font-weight: normal; + font-style: normal; +} + +.fc-icon { + /* added for fc */ + display: inline-block; + width: 1em; + height: 1em; + text-align: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'fcicons' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.fc-icon-chevron-left:before { + content: "\e900"; +} + +.fc-icon-chevron-right:before { + content: "\e901"; +} + +.fc-icon-chevrons-left:before { + content: "\e902"; +} + +.fc-icon-chevrons-right:before { + content: "\e903"; +} + +.fc-icon-minus-square:before { + content: "\e904"; +} + +.fc-icon-plus-square:before { + content: "\e905"; +} + +.fc-icon-x:before { + content: "\e906"; +} +/* +Lots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css + +These styles only apply when the standard-theme is activated. +When it's NOT activated, the fc-button classes won't even be in the DOM. +*/ +.fc { + + /* reset */ + +} +.fc .fc-button { + border-radius: 0; + overflow: visible; + text-transform: none; + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; + } +.fc .fc-button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; + } +.fc .fc-button { + -webkit-appearance: button; + } +.fc .fc-button:not(:disabled) { + cursor: pointer; + } +.fc .fc-button::-moz-focus-inner { + padding: 0; + border-style: none; + } +.fc { + + /* theme */ + +} +.fc .fc-button { + display: inline-block; + font-weight: 400; + text-align: center; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: transparent; + border: 1px solid transparent; + padding: 0.4em 0.65em; + font-size: 1em; + line-height: 1.5; + border-radius: 0.25em; + } +.fc .fc-button:hover { + text-decoration: none; + } +.fc .fc-button:focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25); + } +.fc .fc-button:disabled { + opacity: 0.65; + } +.fc { + + /* "primary" coloring */ + +} +.fc .fc-button-primary { + color: #fff; + color: var(--fc-button-text-color, #fff); + background-color: #2C3E50; + background-color: var(--fc-button-bg-color, #2C3E50); + border-color: #2C3E50; + border-color: var(--fc-button-border-color, #2C3E50); + } +.fc .fc-button-primary:hover { + color: #fff; + color: var(--fc-button-text-color, #fff); + background-color: #1e2b37; + background-color: var(--fc-button-hover-bg-color, #1e2b37); + border-color: #1a252f; + border-color: var(--fc-button-hover-border-color, #1a252f); + } +.fc .fc-button-primary:disabled { /* not DRY */ + color: #fff; + color: var(--fc-button-text-color, #fff); + background-color: #2C3E50; + background-color: var(--fc-button-bg-color, #2C3E50); + border-color: #2C3E50; + border-color: var(--fc-button-border-color, #2C3E50); /* overrides :hover */ + } +.fc .fc-button-primary:focus { + box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5); + } +.fc .fc-button-primary:not(:disabled):active, + .fc .fc-button-primary:not(:disabled).fc-button-active { + color: #fff; + color: var(--fc-button-text-color, #fff); + background-color: #1a252f; + background-color: var(--fc-button-active-bg-color, #1a252f); + border-color: #151e27; + border-color: var(--fc-button-active-border-color, #151e27); + } +.fc .fc-button-primary:not(:disabled):active:focus, + .fc .fc-button-primary:not(:disabled).fc-button-active:focus { + box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5); + } +.fc { + + /* icons within buttons */ + +} +.fc .fc-button .fc-icon { + vertical-align: middle; + font-size: 1.5em; /* bump up the size (but don't make it bigger than line-height of button, which is 1.5em also) */ + } +.fc .fc-button-group { + position: relative; + display: inline-flex; + vertical-align: middle; + } +.fc .fc-button-group > .fc-button { + position: relative; + flex: 1 1 auto; + } +.fc .fc-button-group > .fc-button:hover { + z-index: 1; + } +.fc .fc-button-group > .fc-button:focus, + .fc .fc-button-group > .fc-button:active, + .fc .fc-button-group > .fc-button.fc-button-active { + z-index: 1; + } +.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } +.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } +.fc-direction-rtl .fc-button-group > .fc-button:not(:first-child) { + margin-right: -1px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } +.fc-direction-rtl .fc-button-group > .fc-button:not(:last-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } +.fc .fc-toolbar { + display: flex; + justify-content: space-between; + align-items: center; + } +.fc .fc-toolbar.fc-header-toolbar { + margin-bottom: 1.5em; + } +.fc .fc-toolbar.fc-footer-toolbar { + margin-top: 1.5em; + } +.fc .fc-toolbar-title { + font-size: 1.75em; + margin: 0; + } +.fc-direction-ltr .fc-toolbar > * > :not(:first-child) { + margin-left: .75em; /* space between */ + } +.fc-direction-rtl .fc-toolbar > * > :not(:first-child) { + margin-right: .75em; /* space between */ + } +.fc-direction-rtl .fc-toolbar-ltr { /* when the toolbar-chunk positioning system is explicitly left-to-right */ + flex-direction: row-reverse; + } +.fc .fc-scroller { + -webkit-overflow-scrolling: touch; + position: relative; /* for abs-positioned elements within */ + } +.fc .fc-scroller-liquid { + height: 100%; + } +.fc .fc-scroller-liquid-absolute { + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + } +.fc .fc-scroller-harness { + position: relative; + overflow: hidden; + direction: ltr; + /* hack for chrome computing the scroller's right/left wrong for rtl. undone below... */ + /* TODO: demonstrate in codepen */ + } +.fc .fc-scroller-harness-liquid { + height: 100%; + } +.fc-direction-rtl .fc-scroller-harness > .fc-scroller { /* undo above hack */ + direction: rtl; + } +.fc-theme-standard .fc-scrollgrid { + border: 1px solid #ddd; + border: 1px solid var(--fc-border-color, #ddd); /* bootstrap does this. match */ + } +.fc .fc-scrollgrid, + .fc .fc-scrollgrid table { /* all tables (self included) */ + width: 100%; /* because tables don't normally do this */ + table-layout: fixed; + } +.fc .fc-scrollgrid table { /* inner tables */ + border-top-style: hidden; + border-left-style: hidden; + border-right-style: hidden; + } +.fc .fc-scrollgrid { + + border-collapse: separate; + border-right-width: 0; + border-bottom-width: 0; + + } +.fc .fc-scrollgrid-liquid { + height: 100%; + } +.fc .fc-scrollgrid-section { /* a */ + height: 1px /* better than 0, for firefox */ + + } +.fc .fc-scrollgrid-section > td { + height: 1px; /* needs a height so inner div within grow. better than 0, for firefox */ + } +.fc .fc-scrollgrid-section table { + height: 1px; + /* for most browsers, if a height isn't set on the table, can't do liquid-height within cells */ + /* serves as a min-height. harmless */ + } +.fc .fc-scrollgrid-section-liquid > td { + height: 100%; /* better than `auto`, for firefox */ + } +.fc .fc-scrollgrid-section > * { + border-top-width: 0; + border-left-width: 0; + } +.fc .fc-scrollgrid-section-header > *, + .fc .fc-scrollgrid-section-footer > * { + border-bottom-width: 0; + } +.fc .fc-scrollgrid-section-body table, + .fc .fc-scrollgrid-section-footer table { + border-bottom-style: hidden; /* head keeps its bottom border tho */ + } +.fc { + + /* stickiness */ + +} +.fc .fc-scrollgrid-section-sticky > * { + background: #fff; + background: var(--fc-page-bg-color, #fff); + position: sticky; + z-index: 3; /* TODO: var */ + /* TODO: box-shadow when sticking */ + } +.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky > * { + top: 0; /* because border-sharing causes a gap at the top */ + /* TODO: give safari -1. has bug */ + } +.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky > * { + bottom: 0; /* known bug: bottom-stickiness doesn't work in safari */ + } +.fc .fc-scrollgrid-sticky-shim { /* for horizontal scrollbar */ + height: 1px; /* needs height to create scrollbars */ + margin-bottom: -1px; + } +.fc-sticky { /* no .fc wrap because used as child of body */ + position: sticky; +} +.fc .fc-view-harness { + flex-grow: 1; /* because this harness is WITHIN the .fc's flexbox */ + position: relative; + } +.fc { + + /* when the harness controls the height, make the view liquid */ + +} +.fc .fc-view-harness-active > .fc-view { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } +.fc .fc-col-header-cell-cushion { + display: inline-block; /* x-browser for when sticky (when multi-tier header) */ + padding: 2px 4px; + } +.fc .fc-bg-event, + .fc .fc-non-business, + .fc .fc-highlight { + /* will always have a harness with position:relative/absolute, so absolutely expand */ + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + } +.fc .fc-non-business { + background: rgba(215, 215, 215, 0.3); + background: var(--fc-non-business-color, rgba(215, 215, 215, 0.3)); + } +.fc .fc-bg-event { + background: rgb(143, 223, 130); + background: var(--fc-bg-event-color, rgb(143, 223, 130)); + opacity: 0.3; + opacity: var(--fc-bg-event-opacity, 0.3) + } +.fc .fc-bg-event .fc-event-title { + margin: .5em; + font-size: .85em; + font-size: var(--fc-small-font-size, .85em); + font-style: italic; + } +.fc .fc-highlight { + background: rgba(188, 232, 241, 0.3); + background: var(--fc-highlight-color, rgba(188, 232, 241, 0.3)); + } +.fc .fc-cell-shaded, + .fc .fc-day-disabled { + background: rgba(208, 208, 208, 0.3); + background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3)); + } +/* link resets */ +/* ---------------------------------------------------------------------------------------------------- */ +a.fc-event, +a.fc-event:hover { + text-decoration: none; +} +/* cursor */ +.fc-event[href], +.fc-event.fc-event-draggable { + cursor: pointer; +} +/* event text content */ +/* ---------------------------------------------------------------------------------------------------- */ +.fc-event .fc-event-main { + position: relative; + z-index: 2; + } +/* dragging */ +/* ---------------------------------------------------------------------------------------------------- */ +.fc-event-dragging:not(.fc-event-selected) { /* MOUSE */ + opacity: 0.75; + } +.fc-event-dragging.fc-event-selected { /* TOUCH */ + box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3); + } +/* resizing */ +/* ---------------------------------------------------------------------------------------------------- */ +/* (subclasses should hone positioning for touch and non-touch) */ +.fc-event .fc-event-resizer { + display: none; + position: absolute; + z-index: 4; + } +.fc-event:hover, /* MOUSE */ +.fc-event-selected { /* TOUCH */ + +} +.fc-event:hover .fc-event-resizer, .fc-event-selected .fc-event-resizer { + display: block; + } +.fc-event-selected .fc-event-resizer { + border-radius: 4px; + border-radius: calc(var(--fc-event-resizer-dot-total-width, 8px) / 2); + border-width: 1px; + border-width: var(--fc-event-resizer-dot-border-width, 1px); + width: 8px; + width: var(--fc-event-resizer-dot-total-width, 8px); + height: 8px; + height: var(--fc-event-resizer-dot-total-width, 8px); + border-style: solid; + border-color: inherit; + background: #fff; + background: var(--fc-page-bg-color, #fff) + + /* expand hit area */ + + } +.fc-event-selected .fc-event-resizer:before { + content: ''; + position: absolute; + top: -20px; + left: -20px; + right: -20px; + bottom: -20px; + } +/* selecting (always TOUCH) */ +/* OR, focused by tab-index */ +/* (TODO: maybe not the best focus-styling for .fc-daygrid-dot-event) */ +/* ---------------------------------------------------------------------------------------------------- */ +.fc-event-selected, +.fc-event:focus { + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) + + /* expand hit area (subclasses should expand) */ + +} +.fc-event-selected:before, .fc-event:focus:before { + content: ""; + position: absolute; + z-index: 3; + top: 0; + left: 0; + right: 0; + bottom: 0; + } +.fc-event-selected, +.fc-event:focus { + + /* dimmer effect */ + +} +.fc-event-selected:after, .fc-event:focus:after { + content: ""; + background: rgba(0, 0, 0, 0.25); + background: var(--fc-event-selected-overlay-color, rgba(0, 0, 0, 0.25)); + position: absolute; + z-index: 1; + + /* assume there's a border on all sides. overcome it. */ + /* sometimes there's NOT a border, in which case the dimmer will go over */ + /* an adjacent border, which looks fine. */ + top: -1px; + left: -1px; + right: -1px; + bottom: -1px; + } +/* +A HORIZONTAL event +*/ +.fc-h-event { /* allowed to be top-level */ + display: block; + border: 1px solid #3788d8; + border: 1px solid var(--fc-event-border-color, #3788d8); + background-color: #3788d8; + background-color: var(--fc-event-bg-color, #3788d8) + +} +.fc-h-event .fc-event-main { + color: #fff; + color: var(--fc-event-text-color, #fff); + } +.fc-h-event .fc-event-main-frame { + display: flex; /* for make fc-event-title-container expand */ + } +.fc-h-event .fc-event-time { + max-width: 100%; /* clip overflow on this element */ + overflow: hidden; + } +.fc-h-event .fc-event-title-container { /* serves as a container for the sticky cushion */ + flex-grow: 1; + flex-shrink: 1; + min-width: 0; /* important for allowing to shrink all the way */ + } +.fc-h-event .fc-event-title { + display: inline-block; /* need this to be sticky cross-browser */ + vertical-align: top; /* for not messing up line-height */ + left: 0; /* for sticky */ + right: 0; /* for sticky */ + max-width: 100%; /* clip overflow on this element */ + overflow: hidden; + } +.fc-h-event.fc-event-selected:before { + /* expand hit area */ + top: -10px; + bottom: -10px; + } +/* adjust border and border-radius (if there is any) for non-start/end */ +.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start), +.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-left-width: 0; +} +.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end), +.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right-width: 0; +} +/* resizers */ +.fc-h-event:not(.fc-event-selected) .fc-event-resizer { + top: 0; + bottom: 0; + width: 8px; + width: var(--fc-event-resizer-thickness, 8px); +} +.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start, +.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end { + cursor: w-resize; + left: -4px; + left: calc(-0.5 * var(--fc-event-resizer-thickness, 8px)); +} +.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end, +.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start { + cursor: e-resize; + right: -4px; + right: calc(-0.5 * var(--fc-event-resizer-thickness, 8px)); +} +/* resizers for TOUCH */ +.fc-h-event.fc-event-selected .fc-event-resizer { + top: 50%; + margin-top: -4px; + margin-top: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px)); +} +.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start, +.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end { + left: -4px; + left: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px)); +} +.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end, +.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start { + right: -4px; + right: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px)); +} +.fc .fc-popover { + position: absolute; + z-index: 9999; + box-shadow: 0 2px 6px rgba(0,0,0,.15); + } +.fc .fc-popover-header { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 3px 4px; + } +.fc .fc-popover-title { + margin: 0 2px; + } +.fc .fc-popover-close { + cursor: pointer; + opacity: 0.65; + font-size: 1.1em; + } +.fc-theme-standard .fc-popover { + border: 1px solid #ddd; + border: 1px solid var(--fc-border-color, #ddd); + background: #fff; + background: var(--fc-page-bg-color, #fff); + } +.fc-theme-standard .fc-popover-header { + background: rgba(208, 208, 208, 0.3); + background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3)); + } + + +:root { + --fc-daygrid-event-dot-width: 8px; +} +/* help things clear margins of inner content */ +.fc-daygrid-day-frame, +.fc-daygrid-day-events, +.fc-daygrid-event-harness { /* for event top/bottom margins */ +} +.fc-daygrid-day-frame:before, .fc-daygrid-day-events:before, .fc-daygrid-event-harness:before { + content: ""; + clear: both; + display: table; } +.fc-daygrid-day-frame:after, .fc-daygrid-day-events:after, .fc-daygrid-event-harness:after { + content: ""; + clear: both; + display: table; } +.fc .fc-daygrid-body { /* a
that wraps the table */ + position: relative; + z-index: 1; /* container inner z-index's because s can't do it */ + } +.fc .fc-daygrid-day.fc-day-today { + background-color: rgba(255, 220, 40, 0.15); + background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15)); + } +.fc .fc-daygrid-day-frame { + position: relative; + min-height: 100%; /* seems to work better than `height` because sets height after rows/cells naturally do it */ + } +.fc { + + /* cell top */ + +} +.fc .fc-daygrid-day-top { + display: flex; + flex-direction: row-reverse; + } +.fc .fc-day-other .fc-daygrid-day-top { + opacity: 0.3; + } +.fc { + + /* day number (within cell top) */ + +} +.fc .fc-daygrid-day-number { + position: relative; + z-index: 4; + padding: 4px; + } +.fc { + + /* event container */ + +} +.fc .fc-daygrid-day-events { + margin-top: 1px; /* needs to be margin, not padding, so that available cell height can be computed */ + } +.fc { + + /* positioning for balanced vs natural */ + +} +.fc .fc-daygrid-body-balanced .fc-daygrid-day-events { + position: absolute; + left: 0; + right: 0; + } +.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events { + position: relative; /* for containing abs positioned event harnesses */ + min-height: 2em; /* in addition to being a min-height during natural height, equalizes the heights a little bit */ + } +.fc .fc-daygrid-body-natural { /* can coexist with -unbalanced */ + } +.fc .fc-daygrid-body-natural .fc-daygrid-day-events { + margin-bottom: 1em; + } +.fc { + + /* event harness */ + +} +.fc .fc-daygrid-event-harness { + position: relative; + } +.fc .fc-daygrid-event-harness-abs { + position: absolute; + top: 0; /* fallback coords for when cannot yet be computed */ + left: 0; /* */ + right: 0; /* */ + } +.fc .fc-daygrid-bg-harness { + position: absolute; + top: 0; + bottom: 0; + } +.fc { + + /* bg content */ + +} +.fc .fc-daygrid-day-bg .fc-non-business { z-index: 1 } +.fc .fc-daygrid-day-bg .fc-bg-event { z-index: 2 } +.fc .fc-daygrid-day-bg .fc-highlight { z-index: 3 } +.fc { + + /* events */ + +} +.fc .fc-daygrid-event { + z-index: 6; + margin-top: 1px; + } +.fc .fc-daygrid-event.fc-event-mirror { + z-index: 7; + } +.fc { + + /* cell bottom (within day-events) */ + +} +.fc .fc-daygrid-day-bottom { + font-size: .85em; + padding: 2px 3px 0 + } +.fc .fc-daygrid-day-bottom:before { + content: ""; + clear: both; + display: table; } +.fc .fc-daygrid-more-link { + position: relative; + z-index: 4; + cursor: pointer; + } +.fc { + + /* week number (within frame) */ + +} +.fc .fc-daygrid-week-number { + position: absolute; + z-index: 5; + top: 0; + padding: 2px; + min-width: 1.5em; + text-align: center; + background-color: rgba(208, 208, 208, 0.3); + background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3)); + color: #808080; + color: var(--fc-neutral-text-color, #808080); + } +.fc { + + /* popover */ + +} +.fc .fc-more-popover .fc-popover-body { + min-width: 220px; + padding: 10px; + } +.fc-direction-ltr .fc-daygrid-event.fc-event-start, +.fc-direction-rtl .fc-daygrid-event.fc-event-end { + margin-left: 2px; +} +.fc-direction-ltr .fc-daygrid-event.fc-event-end, +.fc-direction-rtl .fc-daygrid-event.fc-event-start { + margin-right: 2px; +} +.fc-direction-ltr .fc-daygrid-week-number { + left: 0; + border-radius: 0 0 3px 0; + } +.fc-direction-rtl .fc-daygrid-week-number { + right: 0; + border-radius: 0 0 0 3px; + } +.fc-liquid-hack .fc-daygrid-day-frame { + position: static; /* will cause inner absolute stuff to expand to */ + } +.fc-daygrid-event { /* make root-level, because will be dragged-and-dropped outside of a component root */ + position: relative; /* for z-indexes assigned later */ + white-space: nowrap; + border-radius: 3px; /* dot event needs this to when selected */ + font-size: .85em; + font-size: var(--fc-small-font-size, .85em); +} +/* --- the rectangle ("block") style of event --- */ +.fc-daygrid-block-event .fc-event-time { + font-weight: bold; + } +.fc-daygrid-block-event .fc-event-time, + .fc-daygrid-block-event .fc-event-title { + padding: 1px; + } +/* --- the dot style of event --- */ +.fc-daygrid-dot-event { + display: flex; + align-items: center; + padding: 2px 0 + +} +.fc-daygrid-dot-event .fc-event-title { + flex-grow: 1; + flex-shrink: 1; + min-width: 0; /* important for allowing to shrink all the way */ + overflow: hidden; + font-weight: bold; + } +.fc-daygrid-dot-event:hover, + .fc-daygrid-dot-event.fc-event-mirror { + background: rgba(0, 0, 0, 0.1); + } +.fc-daygrid-dot-event.fc-event-selected:before { + /* expand hit area */ + top: -10px; + bottom: -10px; + } +.fc-daygrid-event-dot { /* the actual dot */ + margin: 0 4px; + box-sizing: content-box; + width: 0; + height: 0; + border: 4px solid #3788d8; + border: calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8); + border-radius: 4px; + border-radius: calc(var(--fc-daygrid-event-dot-width, 8px) / 2); +} +/* --- spacing between time and title --- */ +.fc-direction-ltr .fc-daygrid-event .fc-event-time { + margin-right: 3px; + } +.fc-direction-rtl .fc-daygrid-event .fc-event-time { + margin-left: 3px; + } + + +/* +A VERTICAL event +*/ + +.fc-v-event { /* allowed to be top-level */ + display: block; + border: 1px solid #3788d8; + border: 1px solid var(--fc-event-border-color, #3788d8); + background-color: #3788d8; + background-color: var(--fc-event-bg-color, #3788d8) + +} + +.fc-v-event .fc-event-main { + color: #fff; + color: var(--fc-event-text-color, #fff); + height: 100%; + } + +.fc-v-event .fc-event-main-frame { + height: 100%; + display: flex; + flex-direction: column; + } + +.fc-v-event .fc-event-time { + flex-grow: 0; + flex-shrink: 0; + max-height: 100%; + overflow: hidden; + } + +.fc-v-event .fc-event-title-container { /* a container for the sticky cushion */ + flex-grow: 1; + flex-shrink: 1; + min-height: 0; /* important for allowing to shrink all the way */ + } + +.fc-v-event .fc-event-title { /* will have fc-sticky on it */ + top: 0; + bottom: 0; + max-height: 100%; /* clip overflow */ + overflow: hidden; + } + +.fc-v-event:not(.fc-event-start) { + border-top-width: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; + } + +.fc-v-event:not(.fc-event-end) { + border-bottom-width: 0; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + +.fc-v-event.fc-event-selected:before { + /* expand hit area */ + left: -10px; + right: -10px; + } + +.fc-v-event { + + /* resizer (mouse AND touch) */ + +} + +.fc-v-event .fc-event-resizer-start { + cursor: n-resize; + } + +.fc-v-event .fc-event-resizer-end { + cursor: s-resize; + } + +.fc-v-event { + + /* resizer for MOUSE */ + +} + +.fc-v-event:not(.fc-event-selected) .fc-event-resizer { + height: 8px; + height: var(--fc-event-resizer-thickness, 8px); + left: 0; + right: 0; + } + +.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start { + top: -4px; + top: calc(var(--fc-event-resizer-thickness, 8px) / -2); + } + +.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end { + bottom: -4px; + bottom: calc(var(--fc-event-resizer-thickness, 8px) / -2); + } + +.fc-v-event { + + /* resizer for TOUCH (when event is "selected") */ + +} + +.fc-v-event.fc-event-selected .fc-event-resizer { + left: 50%; + margin-left: -4px; + margin-left: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2); + } + +.fc-v-event.fc-event-selected .fc-event-resizer-start { + top: -4px; + top: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2); + } + +.fc-v-event.fc-event-selected .fc-event-resizer-end { + bottom: -4px; + bottom: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2); + } +.fc .fc-timegrid .fc-daygrid-body { /* the all-day daygrid within the timegrid view */ + z-index: 2; /* put above the timegrid-body so that more-popover is above everything. TODO: better solution */ + } +.fc .fc-timegrid-divider { + padding: 0 0 2px; /* browsers get confused when you set height. use padding instead */ + } +.fc .fc-timegrid-body { + position: relative; + z-index: 1; /* scope the z-indexes of slots and cols */ + min-height: 100%; /* fill height always, even when slat table doesn't grow */ + } +.fc .fc-timegrid-axis-chunk { /* for advanced ScrollGrid */ + position: relative /* offset parent for now-indicator-container */ + + } +.fc .fc-timegrid-axis-chunk > table { + position: relative; + z-index: 1; /* above the now-indicator-container */ + } +.fc .fc-timegrid-slots { + position: relative; + z-index: 1; + } +.fc .fc-timegrid-slot { /* a */ + height: 1.5em; + border-bottom: 0 /* each cell owns its top border */ + } +.fc .fc-timegrid-slot:empty:before { + content: '\00a0'; /* make sure there's at least an empty space to create height for height syncing */ + } +.fc .fc-timegrid-slot-minor { + border-top-style: dotted; + } +.fc .fc-timegrid-slot-label-cushion { + display: inline-block; + white-space: nowrap; + } +.fc .fc-timegrid-slot-label { + vertical-align: middle; /* vertical align the slots */ + } +.fc { + + + /* slots AND axis cells (top-left corner of view including the "all-day" text) */ + +} +.fc .fc-timegrid-axis-cushion, + .fc .fc-timegrid-slot-label-cushion { + padding: 0 4px; + } +.fc { + + + /* axis cells (top-left corner of view including the "all-day" text) */ + /* vertical align is more complicated, uses flexbox */ + +} +.fc .fc-timegrid-axis-frame-liquid { + height: 100%; /* will need liquid-hack in FF */ + } +.fc .fc-timegrid-axis-frame { + overflow: hidden; + display: flex; + align-items: center; /* vertical align */ + justify-content: flex-end; /* horizontal align. matches text-align below */ + } +.fc .fc-timegrid-axis-cushion { + max-width: 60px; /* limits the width of the "all-day" text */ + flex-shrink: 0; /* allows text to expand how it normally would, regardless of constrained width */ + } +.fc-direction-ltr .fc-timegrid-slot-label-frame { + text-align: right; + } +.fc-direction-rtl .fc-timegrid-slot-label-frame { + text-align: left; + } +.fc-liquid-hack .fc-timegrid-axis-frame-liquid { + height: auto; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } +.fc .fc-timegrid-col.fc-day-today { + background-color: rgba(255, 220, 40, 0.15); + background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15)); + } +.fc .fc-timegrid-col-frame { + min-height: 100%; /* liquid-hack is below */ + position: relative; + } +.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame { + height: auto; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } +.fc-media-screen .fc-timegrid-cols { + position: absolute; /* no z-index. children will decide and go above slots */ + top: 0; + left: 0; + right: 0; + bottom: 0 + } +.fc-media-screen .fc-timegrid-cols > table { + height: 100%; + } +.fc-media-screen .fc-timegrid-col-bg, + .fc-media-screen .fc-timegrid-col-events, + .fc-media-screen .fc-timegrid-now-indicator-container { + position: absolute; + top: 0; + left: 0; + right: 0; + } +.fc { + + /* bg */ + +} +.fc .fc-timegrid-col-bg { + z-index: 2; /* TODO: kill */ + } +.fc .fc-timegrid-col-bg .fc-non-business { z-index: 1 } +.fc .fc-timegrid-col-bg .fc-bg-event { z-index: 2 } +.fc .fc-timegrid-col-bg .fc-highlight { z-index: 3 } +.fc .fc-timegrid-bg-harness { + position: absolute; /* top/bottom will be set by JS */ + left: 0; + right: 0; + } +.fc { + + /* fg events */ + /* (the mirror segs are put into a separate container with same classname, */ + /* and they must be after the normal seg container to appear at a higher z-index) */ + +} +.fc .fc-timegrid-col-events { + z-index: 3; + /* child event segs have z-indexes that are scoped within this div */ + } +.fc { + + /* now indicator */ + +} +.fc .fc-timegrid-now-indicator-container { + bottom: 0; + overflow: hidden; /* don't let overflow of lines/arrows cause unnecessary scrolling */ + /* z-index is set on the individual elements */ + } +.fc-direction-ltr .fc-timegrid-col-events { + margin: 0 2.5% 0 2px; + } +.fc-direction-rtl .fc-timegrid-col-events { + margin: 0 2px 0 2.5%; + } +.fc-timegrid-event-harness { + position: absolute /* top/left/right/bottom will all be set by JS */ +} +.fc-timegrid-event-harness > .fc-timegrid-event { + position: absolute; /* absolute WITHIN the harness */ + top: 0; /* for when not yet positioned */ + bottom: 0; /* " */ + left: 0; + right: 0; + } +.fc-timegrid-event-harness-inset .fc-timegrid-event, +.fc-timegrid-event.fc-event-mirror, +.fc-timegrid-more-link { + box-shadow: 0px 0px 0px 1px #fff; + box-shadow: 0px 0px 0px 1px var(--fc-page-bg-color, #fff); +} +.fc-timegrid-event, +.fc-timegrid-more-link { /* events need to be root */ + font-size: .85em; + font-size: var(--fc-small-font-size, .85em); + border-radius: 3px; +} +.fc-timegrid-event { /* events need to be root */ + margin-bottom: 1px /* give some space from bottom */ +} +.fc-timegrid-event .fc-event-main { + padding: 1px 1px 0; + } +.fc-timegrid-event .fc-event-time { + white-space: nowrap; + font-size: .85em; + font-size: var(--fc-small-font-size, .85em); + margin-bottom: 1px; + } +.fc-timegrid-event-short .fc-event-main-frame { + flex-direction: row; + overflow: hidden; + } +.fc-timegrid-event-short .fc-event-time:after { + content: '\00a0-\00a0'; /* dash surrounded by non-breaking spaces */ + } +.fc-timegrid-event-short .fc-event-title { + font-size: .85em; + font-size: var(--fc-small-font-size, .85em) + } +.fc-timegrid-more-link { /* does NOT inherit from fc-timegrid-event */ + position: absolute; + z-index: 9999; /* hack */ + color: inherit; + color: var(--fc-more-link-text-color, inherit); + background: #d0d0d0; + background: var(--fc-more-link-bg-color, #d0d0d0); + cursor: pointer; + margin-bottom: 1px; /* match space below fc-timegrid-event */ +} +.fc-timegrid-more-link-inner { /* has fc-sticky */ + padding: 3px 2px; + top: 0; +} +.fc-direction-ltr .fc-timegrid-more-link { + right: 0; + } +.fc-direction-rtl .fc-timegrid-more-link { + left: 0; + } +.fc { + + /* line */ + +} +.fc .fc-timegrid-now-indicator-line { + position: absolute; + z-index: 4; + left: 0; + right: 0; + border-style: solid; + border-color: red; + border-color: var(--fc-now-indicator-color, red); + border-width: 1px 0 0; + } +.fc { + + /* arrow */ + +} +.fc .fc-timegrid-now-indicator-arrow { + position: absolute; + z-index: 4; + margin-top: -5px; /* vertically center on top coordinate */ + border-style: solid; + border-color: red; + border-color: var(--fc-now-indicator-color, red); + } +.fc-direction-ltr .fc-timegrid-now-indicator-arrow { + left: 0; + + /* triangle pointing right. TODO: mixin */ + border-width: 5px 0 5px 6px; + border-top-color: transparent; + border-bottom-color: transparent; + } +.fc-direction-rtl .fc-timegrid-now-indicator-arrow { + right: 0; + + /* triangle pointing left. TODO: mixin */ + border-width: 5px 6px 5px 0; + border-top-color: transparent; + border-bottom-color: transparent; + } + + +:root { + --fc-list-event-dot-width: 10px; + --fc-list-event-hover-bg-color: #f5f5f5; +} +.fc-theme-standard .fc-list { + border: 1px solid #ddd; + border: 1px solid var(--fc-border-color, #ddd); + } +.fc { + + /* message when no events */ + +} +.fc .fc-list-empty { + background-color: rgba(208, 208, 208, 0.3); + background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3)); + height: 100%; + display: flex; + justify-content: center; + align-items: center; /* vertically aligns fc-list-empty-inner */ + } +.fc .fc-list-empty-cushion { + margin: 5em 0; + } +.fc { + + /* table within the scroller */ + /* ---------------------------------------------------------------------------------------------------- */ + +} +.fc .fc-list-table { + width: 100%; + border-style: hidden; /* kill outer border on theme */ + } +.fc .fc-list-table tr > * { + border-left: 0; + border-right: 0; + } +.fc .fc-list-sticky .fc-list-day > * { /* the cells */ + position: sticky; + top: 0; + background: #fff; + background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */ + } +.fc { + + /* only exists for aria reasons, hide for non-screen-readers */ + +} +.fc .fc-list-table thead { + position: absolute; + left: -10000px; + } +.fc { + + /* the table's border-style:hidden gets confused by hidden thead. force-hide top border of first cell */ + +} +.fc .fc-list-table tbody > tr:first-child th { + border-top: 0; + } +.fc .fc-list-table th { + padding: 0; /* uses an inner-wrapper instead... */ + } +.fc .fc-list-table td, + .fc .fc-list-day-cushion { + padding: 8px 14px; + } +.fc { + + + /* date heading rows */ + /* ---------------------------------------------------------------------------------------------------- */ + +} +.fc .fc-list-day-cushion:after { + content: ""; + clear: both; + display: table; /* clear floating */ + } +.fc-theme-standard .fc-list-day-cushion { + background-color: rgba(208, 208, 208, 0.3); + background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3)); + } +.fc-direction-ltr .fc-list-day-text, +.fc-direction-rtl .fc-list-day-side-text { + float: left; +} +.fc-direction-ltr .fc-list-day-side-text, +.fc-direction-rtl .fc-list-day-text { + float: right; +} +/* make the dot closer to the event title */ +.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 } +.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 } +.fc .fc-list-event.fc-event-forced-url { + cursor: pointer; /* whole row will seem clickable */ + } +.fc .fc-list-event:hover td { + background-color: #f5f5f5; + background-color: var(--fc-list-event-hover-bg-color, #f5f5f5); + } +.fc { + + /* shrink certain cols */ + +} +.fc .fc-list-event-graphic, + .fc .fc-list-event-time { + white-space: nowrap; + width: 1px; + } +.fc .fc-list-event-dot { + display: inline-block; + box-sizing: content-box; + width: 0; + height: 0; + border: 5px solid #3788d8; + border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8); + border-radius: 5px; + border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2); + } +.fc { + + /* reset styling */ + +} +.fc .fc-list-event-title a { + color: inherit; + text-decoration: none; + } +.fc { + + /* underline link when hovering over any part of row */ + +} +.fc .fc-list-event.fc-event-forced-url:hover a { + text-decoration: underline; + } + + + + .fc-theme-bootstrap a:not([href]) { + color: inherit; /* natural color for navlinks */ + } + + + + .fc-theme-bootstrap5 a:not([href]) { + color: inherit; + text-decoration: inherit; + } + +.fc-theme-bootstrap5 .fc-list, + .fc-theme-bootstrap5 .fc-scrollgrid, + .fc-theme-bootstrap5 td, + .fc-theme-bootstrap5 th { + border: 1px solid var(--bs-gray-400); + } + +.fc-theme-bootstrap5 { + + /* HACK: reapply core styles after highe-precedence border statement above */ +} + +.fc-theme-bootstrap5 .fc-scrollgrid { + border-right-width: 0; + border-bottom-width: 0; + } + +.fc-theme-bootstrap5-shaded { + background-color: var(--bs-gray-200); +} + diff --git a/public/js/fullcalendar/main.js b/public/js/fullcalendar/main.js new file mode 100644 index 00000000..0701c080 --- /dev/null +++ b/public/js/fullcalendar/main.js @@ -0,0 +1,21222 @@ +/*! +FullCalendar v5.11.3 +Docs & License: https://fullcalendar.io/ +(c) 2022 Adam Shaw +*/ +var FullCalendar = (function (exports) { + "use strict"; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR NITROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise */ + + var extendStatics = function (d, b) { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError( + "Class extends value " + String(b) + " is not a constructor or null" + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null ? Object.create(b) : ((__.prototype = b.prototype), new __()); + } + + var __assign = function () { + __assign = + Object.assign || + function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || from); + } + + var n, + u, + i$1, + t, + o, + r$1 = {}, + f$1 = [], + e$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; + function c$1(n, l) { + for (var u in l) n[u] = l[u]; + return n; + } + function s(n) { + var l = n.parentNode; + l && l.removeChild(n); + } + function a$1(n, l, u) { + var i, + t, + o, + r = arguments, + f = {}; + for (o in l) + "key" == o ? (i = l[o]) : "ref" == o ? (t = l[o]) : (f[o] = l[o]); + if (arguments.length > 3) + for (u = [u], o = 3; o < arguments.length; o++) u.push(r[o]); + if ( + (null != u && (f.children = u), + "function" == typeof n && null != n.defaultProps) + ) + for (o in n.defaultProps) void 0 === f[o] && (f[o] = n.defaultProps[o]); + return v$1(n, f, i, t, null); + } + function v$1(l, u, i, t, o) { + var r = { + type: l, + props: u, + key: i, + ref: t, + __k: null, + __: null, + __b: 0, + __e: null, + __d: void 0, + __c: null, + __h: null, + constructor: void 0, + __v: null == o ? ++n.__v : o, + }; + return null != n.vnode && n.vnode(r), r; + } + function h() { + return { current: null }; + } + function y(n) { + return n.children; + } + function p(n, l) { + (this.props = n), (this.context = l); + } + function d(n, l) { + if (null == l) return n.__ ? d(n.__, n.__.__k.indexOf(n) + 1) : null; + for (var u; l < n.__k.length; l++) + if (null != (u = n.__k[l]) && null != u.__e) return u.__e; + return "function" == typeof n.type ? d(n) : null; + } + function _(n) { + var l, u; + if (null != (n = n.__) && null != n.__c) { + for (n.__e = n.__c.base = null, l = 0; l < n.__k.length; l++) + if (null != (u = n.__k[l]) && null != u.__e) { + n.__e = n.__c.base = u.__e; + break; + } + return _(n); + } + } + function k(l) { + ((!l.__d && (l.__d = !0) && u.push(l) && !b$1.__r++) || + t !== n.debounceRendering) && + ((t = n.debounceRendering) || i$1)(b$1); + } + function b$1() { + for (var n; (b$1.__r = u.length); ) + (n = u.sort(function (n, l) { + return n.__v.__b - l.__v.__b; + })), + (u = []), + n.some(function (n) { + var l, u, i, t, o, r; + n.__d && + ((o = (t = (l = n).__v).__e), + (r = l.__P) && + ((u = []), + ((i = c$1({}, t)).__v = t.__v + 1), + I$1( + r, + t, + i, + l.__n, + void 0 !== r.ownerSVGElement, + null != t.__h ? [o] : null, + u, + null == o ? d(t) : o, + t.__h + ), + T$1(u, t), + t.__e != o && _(t))); + }); + } + function m(n, l, u, i, t, o, e, c, s, a) { + var h, + p, + _, + k, + b, + m, + w, + A = (i && i.__k) || f$1, + P = A.length; + for (u.__k = [], h = 0; h < l.length; h++) + if ( + null != + (k = u.__k[h] = + null == (k = l[h]) || "boolean" == typeof k + ? null + : "string" == typeof k || + "number" == typeof k || + "bigint" == typeof k + ? v$1(null, k, null, null, k) + : Array.isArray(k) + ? v$1(y, { children: k }, null, null, null) + : k.__b > 0 + ? v$1(k.type, k.props, k.key, null, k.__v) + : k) + ) { + if ( + ((k.__ = u), + (k.__b = u.__b + 1), + null === (_ = A[h]) || (_ && k.key == _.key && k.type === _.type)) + ) + A[h] = void 0; + else + for (p = 0; p < P; p++) { + if ((_ = A[p]) && k.key == _.key && k.type === _.type) { + A[p] = void 0; + break; + } + _ = null; + } + I$1(n, k, (_ = _ || r$1), t, o, e, c, s, a), + (b = k.__e), + (p = k.ref) && + _.ref != p && + (w || (w = []), + _.ref && w.push(_.ref, null, k), + w.push(p, k.__c || b, k)), + null != b + ? (null == m && (m = b), + "function" == typeof k.type && null != k.__k && k.__k === _.__k + ? (k.__d = s = g$1(k, s, n)) + : (s = x$1(n, k, _, A, b, s)), + a || "option" !== u.type + ? "function" == typeof u.type && (u.__d = s) + : (n.value = "")) + : s && _.__e == s && s.parentNode != n && (s = d(_)); + } + for (u.__e = m, h = P; h--; ) + null != A[h] && + ("function" == typeof u.type && + null != A[h].__e && + A[h].__e == u.__d && + (u.__d = d(i, h + 1)), + L$1(A[h], A[h])); + if (w) for (h = 0; h < w.length; h++) z(w[h], w[++h], w[++h]); + } + function g$1(n, l, u) { + var i, t; + for (i = 0; i < n.__k.length; i++) + (t = n.__k[i]) && + ((t.__ = n), + (l = + "function" == typeof t.type + ? g$1(t, l, u) + : x$1(u, t, t, n.__k, t.__e, l))); + return l; + } + function w$1(n, l) { + return ( + (l = l || []), + null == n || + "boolean" == typeof n || + (Array.isArray(n) + ? n.some(function (n) { + w$1(n, l); + }) + : l.push(n)), + l + ); + } + function x$1(n, l, u, i, t, o) { + var r, f, e; + if (void 0 !== l.__d) (r = l.__d), (l.__d = void 0); + else if (null == u || t != o || null == t.parentNode) + n: if (null == o || o.parentNode !== n) n.appendChild(t), (r = null); + else { + for (f = o, e = 0; (f = f.nextSibling) && e < i.length; e += 2) + if (f == t) break n; + n.insertBefore(t, o), (r = o); + } + return void 0 !== r ? r : t.nextSibling; + } + function A$1(n, l, u, i, t) { + var o; + for (o in u) + "children" === o || "key" === o || o in l || C$1(n, o, null, u[o], i); + for (o in l) + (t && "function" != typeof l[o]) || + "children" === o || + "key" === o || + "value" === o || + "checked" === o || + u[o] === l[o] || + C$1(n, o, l[o], u[o], i); + } + function P$1(n, l, u) { + "-" === l[0] + ? n.setProperty(l, u) + : (n[l] = + null == u ? "" : "number" != typeof u || e$1.test(l) ? u : u + "px"); + } + function C$1(n, l, u, i, t) { + var o; + n: if ("style" === l) + if ("string" == typeof u) n.style.cssText = u; + else { + if (("string" == typeof i && (n.style.cssText = i = ""), i)) + for (l in i) (u && l in u) || P$1(n.style, l, ""); + if (u) for (l in u) (i && u[l] === i[l]) || P$1(n.style, l, u[l]); + } + else if ("o" === l[0] && "n" === l[1]) + (o = l !== (l = l.replace(/Capture$/, ""))), + (l = l.toLowerCase() in n ? l.toLowerCase().slice(2) : l.slice(2)), + n.l || (n.l = {}), + (n.l[l + o] = u), + u + ? i || n.addEventListener(l, o ? H$1 : $$1, o) + : n.removeEventListener(l, o ? H$1 : $$1, o); + else if ("dangerouslySetInnerHTML" !== l) { + if (t) l = l.replace(/xlink[H:h]/, "h").replace(/sName$/, "s"); + else if ( + "href" !== l && + "list" !== l && + "form" !== l && + "tabIndex" !== l && + "download" !== l && + l in n + ) + try { + n[l] = null == u ? "" : u; + break n; + } catch (n) {} + "function" == typeof u || + (null != u && (!1 !== u || ("a" === l[0] && "r" === l[1])) + ? n.setAttribute(l, u) + : n.removeAttribute(l)); + } + } + function $$1(l) { + this.l[l.type + !1](n.event ? n.event(l) : l); + } + function H$1(l) { + this.l[l.type + !0](n.event ? n.event(l) : l); + } + function I$1(l, u, i, t, o, r, f, e, s) { + var a, + v, + h, + d, + _, + k, + b, + g, + w, + x, + A, + P = u.type; + if (void 0 !== u.constructor) return null; + null != i.__h && + ((s = i.__h), (e = u.__e = i.__e), (u.__h = null), (r = [e])), + (a = n.__b) && a(u); + try { + n: if ("function" == typeof P) { + if ( + ((g = u.props), + (w = (a = P.contextType) && t[a.__c]), + (x = a ? (w ? w.props.value : a.__) : t), + i.__c + ? (b = (v = u.__c = i.__c).__ = v.__E) + : ("prototype" in P && P.prototype.render + ? (u.__c = v = new P(g, x)) + : ((u.__c = v = new p(g, x)), + (v.constructor = P), + (v.render = M$1)), + w && w.sub(v), + (v.props = g), + v.state || (v.state = {}), + (v.context = x), + (v.__n = t), + (h = v.__d = !0), + (v.__h = [])), + null == v.__s && (v.__s = v.state), + null != P.getDerivedStateFromProps && + (v.__s == v.state && (v.__s = c$1({}, v.__s)), + c$1(v.__s, P.getDerivedStateFromProps(g, v.__s))), + (d = v.props), + (_ = v.state), + h) + ) + null == P.getDerivedStateFromProps && + null != v.componentWillMount && + v.componentWillMount(), + null != v.componentDidMount && v.__h.push(v.componentDidMount); + else { + if ( + (null == P.getDerivedStateFromProps && + g !== d && + null != v.componentWillReceiveProps && + v.componentWillReceiveProps(g, x), + (!v.__e && + null != v.shouldComponentUpdate && + !1 === v.shouldComponentUpdate(g, v.__s, x)) || + u.__v === i.__v) + ) { + (v.props = g), + (v.state = v.__s), + u.__v !== i.__v && (v.__d = !1), + (v.__v = u), + (u.__e = i.__e), + (u.__k = i.__k), + u.__k.forEach(function (n) { + n && (n.__ = u); + }), + v.__h.length && f.push(v); + break n; + } + null != v.componentWillUpdate && v.componentWillUpdate(g, v.__s, x), + null != v.componentDidUpdate && + v.__h.push(function () { + v.componentDidUpdate(d, _, k); + }); + } + (v.context = x), + (v.props = g), + (v.state = v.__s), + (a = n.__r) && a(u), + (v.__d = !1), + (v.__v = u), + (v.__P = l), + (a = v.render(v.props, v.state, v.context)), + (v.state = v.__s), + null != v.getChildContext && + (t = c$1(c$1({}, t), v.getChildContext())), + h || + null == v.getSnapshotBeforeUpdate || + (k = v.getSnapshotBeforeUpdate(d, _)), + (A = + null != a && a.type === y && null == a.key ? a.props.children : a), + m(l, Array.isArray(A) ? A : [A], u, i, t, o, r, f, e, s), + (v.base = u.__e), + (u.__h = null), + v.__h.length && f.push(v), + b && (v.__E = v.__ = null), + (v.__e = !1); + } else + null == r && u.__v === i.__v + ? ((u.__k = i.__k), (u.__e = i.__e)) + : (u.__e = j$2(i.__e, u, i, t, o, r, f, s)); + (a = n.diffed) && a(u); + } catch (l) { + (u.__v = null), + (s || null != r) && + ((u.__e = e), (u.__h = !!s), (r[r.indexOf(e)] = null)), + n.__e(l, u, i); + } + } + function T$1(l, u) { + n.__c && n.__c(u, l), + l.some(function (u) { + try { + (l = u.__h), + (u.__h = []), + l.some(function (n) { + n.call(u); + }); + } catch (l) { + n.__e(l, u.__v); + } + }); + } + function j$2(n, l, u, i, t, o, e, c) { + var a, + v, + h, + y, + p = u.props, + d = l.props, + _ = l.type, + k = 0; + if (("svg" === _ && (t = !0), null != o)) + for (; k < o.length; k++) + if ( + (a = o[k]) && + (a === n || (_ ? a.localName == _ : 3 == a.nodeType)) + ) { + (n = a), (o[k] = null); + break; + } + if (null == n) { + if (null === _) return document.createTextNode(d); + (n = t + ? document.createElementNS("http://www.w3.org/2000/svg", _) + : document.createElement(_, d.is && d)), + (o = null), + (c = !1); + } + if (null === _) p === d || (c && n.data === d) || (n.data = d); + else { + if ( + ((o = o && f$1.slice.call(n.childNodes)), + (v = (p = u.props || r$1).dangerouslySetInnerHTML), + (h = d.dangerouslySetInnerHTML), + !c) + ) { + if (null != o) + for (p = {}, y = 0; y < n.attributes.length; y++) + p[n.attributes[y].name] = n.attributes[y].value; + (h || v) && + ((h && ((v && h.__html == v.__html) || h.__html === n.innerHTML)) || + (n.innerHTML = (h && h.__html) || "")); + } + if ((A$1(n, d, p, t, c), h)) l.__k = []; + else if ( + ((k = l.props.children), + m( + n, + Array.isArray(k) ? k : [k], + l, + u, + i, + t && "foreignObject" !== _, + o, + e, + n.firstChild, + c + ), + null != o) + ) + for (k = o.length; k--; ) null != o[k] && s(o[k]); + c || + ("value" in d && + void 0 !== (k = d.value) && + (k !== n.value || ("progress" === _ && !k)) && + C$1(n, "value", k, p.value, !1), + "checked" in d && + void 0 !== (k = d.checked) && + k !== n.checked && + C$1(n, "checked", k, p.checked, !1)); + } + return n; + } + function z(l, u, i) { + try { + "function" == typeof l ? l(u) : (l.current = u); + } catch (l) { + n.__e(l, i); + } + } + function L$1(l, u, i) { + var t, o, r; + if ( + (n.unmount && n.unmount(l), + (t = l.ref) && ((t.current && t.current !== l.__e) || z(t, null, u)), + i || "function" == typeof l.type || (i = null != (o = l.__e)), + (l.__e = l.__d = void 0), + null != (t = l.__c)) + ) { + if (t.componentWillUnmount) + try { + t.componentWillUnmount(); + } catch (l) { + n.__e(l, u); + } + t.base = t.__P = null; + } + if ((t = l.__k)) for (r = 0; r < t.length; r++) t[r] && L$1(t[r], u, i); + null != o && s(o); + } + function M$1(n, l, u) { + return this.constructor(n, u); + } + function N(l, u, i) { + var t, o, e; + n.__ && n.__(l, u), + (o = (t = "function" == typeof i) ? null : (i && i.__k) || u.__k), + (e = []), + I$1( + u, + (l = ((!t && i) || u).__k = a$1(y, null, [l])), + o || r$1, + r$1, + void 0 !== u.ownerSVGElement, + !t && i + ? [i] + : o + ? null + : u.firstChild + ? f$1.slice.call(u.childNodes) + : null, + e, + !t && i ? i : o ? o.__e : u.firstChild, + t + ), + T$1(e, l); + } + function q(n, l) { + var u = { + __c: (l = "__cC" + o++), + __: n, + Consumer: function (n, l) { + return n.children(l); + }, + Provider: function (n) { + var u, i; + return ( + this.getChildContext || + ((u = []), + ((i = {})[l] = this), + (this.getChildContext = function () { + return i; + }), + (this.shouldComponentUpdate = function (n) { + this.props.value !== n.value && u.some(k); + }), + (this.sub = function (n) { + u.push(n); + var l = n.componentWillUnmount; + n.componentWillUnmount = function () { + u.splice(u.indexOf(n), 1), l && l.call(n); + }; + })), + n.children + ); + }, + }; + return (u.Provider.__ = u.Consumer.contextType = u); + } + (n = { + __e: function (n, l) { + for (var u, i, t; (l = l.__); ) + if ((u = l.__c) && !u.__) + try { + if ( + ((i = u.constructor) && + null != i.getDerivedStateFromError && + (u.setState(i.getDerivedStateFromError(n)), (t = u.__d)), + null != u.componentDidCatch && + (u.componentDidCatch(n), (t = u.__d)), + t) + ) + return (u.__E = u); + } catch (l) { + n = l; + } + throw n; + }, + __v: 0, + }), + (p.prototype.setState = function (n, l) { + var u; + (u = + null != this.__s && this.__s !== this.state + ? this.__s + : (this.__s = c$1({}, this.state))), + "function" == typeof n && (n = n(c$1({}, u), this.props)), + n && c$1(u, n), + null != n && this.__v && (l && this.__h.push(l), k(this)); + }), + (p.prototype.forceUpdate = function (n) { + this.__v && ((this.__e = !0), n && this.__h.push(n), k(this)); + }), + (p.prototype.render = y), + (u = []), + (i$1 = + "function" == typeof Promise + ? Promise.prototype.then.bind(Promise.resolve()) + : setTimeout), + (b$1.__r = 0), + (o = 0); + + var r, + i = [], + c = n.__b, + f = n.__r, + e = n.diffed, + a = n.__c, + v = n.unmount; + function x() { + i.forEach(function (t) { + if (t.__P) + try { + t.__H.__h.forEach(g), t.__H.__h.forEach(j$1), (t.__H.__h = []); + } catch (u) { + (t.__H.__h = []), n.__e(u, t.__v); + } + }), + (i = []); + } + (n.__b = function (n) { + c && c(n); + }), + (n.__r = function (n) { + f && f(n); + var r = n.__c.__H; + r && (r.__h.forEach(g), r.__h.forEach(j$1), (r.__h = [])); + }), + (n.diffed = function (t) { + e && e(t); + var o = t.__c; + o && + o.__H && + o.__H.__h.length && + ((1 !== i.push(o) && r === n.requestAnimationFrame) || + ( + (r = n.requestAnimationFrame) || + function (n) { + var t, + u = function () { + clearTimeout(r), b && cancelAnimationFrame(t), setTimeout(n); + }, + r = setTimeout(u, 100); + b && (t = requestAnimationFrame(u)); + } + )(x)); + }), + (n.__c = function (t, u) { + u.some(function (t) { + try { + t.__h.forEach(g), + (t.__h = t.__h.filter(function (n) { + return !n.__ || j$1(n); + })); + } catch (r) { + u.some(function (n) { + n.__h && (n.__h = []); + }), + (u = []), + n.__e(r, t.__v); + } + }), + a && a(t, u); + }), + (n.unmount = function (t) { + v && v(t); + var u = t.__c; + if (u && u.__H) + try { + u.__H.__.forEach(g); + } catch (t) { + n.__e(t, u.__v); + } + }); + var b = "function" == typeof requestAnimationFrame; + function g(n) { + "function" == typeof n.__c && n.__c(); + } + function j$1(n) { + n.__c = n.__(); + } + + function C(n, t) { + for (var e in t) n[e] = t[e]; + return n; + } + function S(n, t) { + for (var e in n) if ("__source" !== e && !(e in t)) return !0; + for (var r in t) if ("__source" !== r && n[r] !== t[r]) return !0; + return !1; + } + function E(n) { + this.props = n; + } + ((E.prototype = new p()).isPureReactComponent = !0), + (E.prototype.shouldComponentUpdate = function (n, t) { + return S(this.props, n) || S(this.state, t); + }); + var w = n.__b; + n.__b = function (n) { + n.type && n.type.__f && n.ref && ((n.props.ref = n.ref), (n.ref = null)), + w && w(n); + }; + var A = n.__e; + n.__e = function (n, t, e) { + if (n.then) + for (var r, u = t; (u = u.__); ) + if ((r = u.__c) && r.__c) + return ( + null == t.__e && ((t.__e = e.__e), (t.__k = e.__k)), r.__c(n, t) + ); + A(n, t, e); + }; + var O = n.unmount; + function L() { + (this.__u = 0), (this.t = null), (this.__b = null); + } + function U(n) { + var t = n.__.__c; + return t && t.__e && t.__e(n); + } + function F() { + (this.u = null), (this.o = null); + } + (n.unmount = function (n) { + var t = n.__c; + t && t.__R && t.__R(), t && !0 === n.__h && (n.type = null), O && O(n); + }), + ((L.prototype = new p()).__c = function (n, t) { + var e = t.__c, + r = this; + null == r.t && (r.t = []), r.t.push(e); + var u = U(r.__v), + o = !1, + i = function () { + o || ((o = !0), (e.__R = null), u ? u(l) : l()); + }; + e.__R = i; + var l = function () { + if (!--r.__u) { + if (r.state.__e) { + var n = r.state.__e; + r.__v.__k[0] = (function n(t, e, r) { + return ( + t && + ((t.__v = null), + (t.__k = + t.__k && + t.__k.map(function (t) { + return n(t, e, r); + })), + t.__c && + t.__c.__P === e && + (t.__e && r.insertBefore(t.__e, t.__d), + (t.__c.__e = !0), + (t.__c.__P = r))), + t + ); + })(n, n.__c.__P, n.__c.__O); + } + var t; + for (r.setState({ __e: (r.__b = null) }); (t = r.t.pop()); ) + t.forceUpdate(); + } + }, + f = !0 === t.__h; + r.__u++ || f || r.setState({ __e: (r.__b = r.__v.__k[0]) }), n.then(i, i); + }), + (L.prototype.componentWillUnmount = function () { + this.t = []; + }), + (L.prototype.render = function (n, t) { + if (this.__b) { + if (this.__v.__k) { + var e = document.createElement("div"), + r = this.__v.__k[0].__c; + this.__v.__k[0] = (function n(t, e, r) { + return ( + t && + (t.__c && + t.__c.__H && + (t.__c.__H.__.forEach(function (n) { + "function" == typeof n.__c && n.__c(); + }), + (t.__c.__H = null)), + null != (t = C({}, t)).__c && + (t.__c.__P === r && (t.__c.__P = e), (t.__c = null)), + (t.__k = + t.__k && + t.__k.map(function (t) { + return n(t, e, r); + }))), + t + ); + })(this.__b, e, (r.__O = r.__P)); + } + this.__b = null; + } + var u = t.__e && a$1(y, null, n.fallback); + return u && (u.__h = null), [a$1(y, null, t.__e ? null : n.children), u]; + }); + var M = function (n, t, e) { + if ( + (++e[1] === e[0] && n.o.delete(t), + n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.o.size)) + ) + for (e = n.u; e; ) { + for (; e.length > 3; ) e.pop()(); + if (e[1] < e[0]) break; + n.u = e = e[2]; + } + }; + function T(n) { + return ( + (this.getChildContext = function () { + return n.context; + }), + n.children + ); + } + function j(n) { + var t = this, + e = n.i; + (t.componentWillUnmount = function () { + N(null, t.l), (t.l = null), (t.i = null); + }), + t.i && t.i !== e && t.componentWillUnmount(), + n.__v + ? (t.l || + ((t.i = e), + (t.l = { + nodeType: 1, + parentNode: e, + childNodes: [], + appendChild: function (n) { + this.childNodes.push(n), t.i.appendChild(n); + }, + insertBefore: function (n, e) { + this.childNodes.push(n), t.i.appendChild(n); + }, + removeChild: function (n) { + this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), + t.i.removeChild(n); + }, + })), + N(a$1(T, { context: t.context }, n.__v), t.l)) + : t.l && t.componentWillUnmount(); + } + function I(n, t) { + return a$1(j, { __v: n, i: t }); + } + ((F.prototype = new p()).__e = function (n) { + var t = this, + e = U(t.__v), + r = t.o.get(n); + return ( + r[0]++, + function (u) { + var o = function () { + t.props.revealOrder ? (r.push(u), M(t, n, r)) : u(); + }; + e ? e(o) : o(); + } + ); + }), + (F.prototype.render = function (n) { + (this.u = null), (this.o = new Map()); + var t = w$1(n.children); + n.revealOrder && "b" === n.revealOrder[0] && t.reverse(); + for (var e = t.length; e--; ) this.o.set(t[e], (this.u = [1, 0, this.u])); + return n.children; + }), + (F.prototype.componentDidUpdate = F.prototype.componentDidMount = + function () { + var n = this; + this.o.forEach(function (t, e) { + M(n, e, t); + }); + }); + var W = + ("undefined" != typeof Symbol && + Symbol.for && + Symbol.for("react.element")) || + 60103, + P = + /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, + V = function (n) { + return ( + "undefined" != typeof Symbol && "symbol" == typeof Symbol() + ? /fil|che|rad/i + : /fil|che|ra/i + ).test(n); + }; + (p.prototype.isReactComponent = {}), + [ + "componentWillMount", + "componentWillReceiveProps", + "componentWillUpdate", + ].forEach(function (n) { + Object.defineProperty(p.prototype, n, { + configurable: !0, + get: function () { + return this["UNSAFE_" + n]; + }, + set: function (t) { + Object.defineProperty(this, n, { + configurable: !0, + writable: !0, + value: t, + }); + }, + }); + }); + var H = n.event; + function Z() {} + function Y() { + return this.cancelBubble; + } + function $() { + return this.defaultPrevented; + } + n.event = function (n) { + return ( + H && (n = H(n)), + (n.persist = Z), + (n.isPropagationStopped = Y), + (n.isDefaultPrevented = $), + (n.nativeEvent = n) + ); + }; + var G = { + configurable: !0, + get: function () { + return this.class; + }, + }, + J = n.vnode; + n.vnode = function (n) { + var t = n.type, + e = n.props, + r = e; + if ("string" == typeof t) { + for (var u in ((r = {}), e)) { + var o = e[u]; + ("value" === u && "defaultValue" in e && null == o) || + ("defaultValue" === u && "value" in e && null == e.value + ? (u = "value") + : "download" === u && !0 === o + ? (o = "") + : /ondoubleclick/i.test(u) + ? (u = "ondblclick") + : /^onchange(textarea|input)/i.test(u + t) && !V(e.type) + ? (u = "oninput") + : /^on(Ani|Tra|Tou|BeforeInp)/.test(u) + ? (u = u.toLowerCase()) + : P.test(u) + ? (u = u.replace(/[A-Z0-9]/, "-$&").toLowerCase()) + : null === o && (o = void 0), + (r[u] = o)); + } + "select" == t && + r.multiple && + Array.isArray(r.value) && + (r.value = w$1(e.children).forEach(function (n) { + n.props.selected = -1 != r.value.indexOf(n.props.value); + })), + "select" == t && + null != r.defaultValue && + (r.value = w$1(e.children).forEach(function (n) { + n.props.selected = r.multiple + ? -1 != r.defaultValue.indexOf(n.props.value) + : r.defaultValue == n.props.value; + })), + (n.props = r); + } + t && + e.class != e.className && + ((G.enumerable = "className" in e), + null != e.className && (r.class = e.className), + Object.defineProperty(r, "className", G)), + (n.$$typeof = W), + J && J(n); + }; + var K = n.__r; + n.__r = function (n) { + K && K(n); + }; + "object" == typeof performance && "function" == typeof performance.now + ? performance.now.bind(performance) + : function () { + return Date.now(); + }; + + var globalObj = typeof globalThis !== "undefined" ? globalThis : window; // // TODO: streamline when killing IE11 support + if (globalObj.FullCalendarVDom) { + console.warn("FullCalendar VDOM already loaded"); + } else { + globalObj.FullCalendarVDom = { + Component: p, + createElement: a$1, + render: N, + createRef: h, + Fragment: y, + createContext: createContext$1, + createPortal: I, + flushSync: flushSync$1, + unmountComponentAtNode: unmountComponentAtNode$1, + }; + } + // HACKS... + // TODO: lock version + // TODO: link gh issues + function flushSync$1(runBeforeFlush) { + runBeforeFlush(); + var oldDebounceRendering = n.debounceRendering; // orig + var callbackQ = []; + function execCallbackSync(callback) { + callbackQ.push(callback); + } + n.debounceRendering = execCallbackSync; + N(a$1(FakeComponent, {}), document.createElement("div")); + while (callbackQ.length) { + callbackQ.shift()(); + } + n.debounceRendering = oldDebounceRendering; + } + var FakeComponent = /** @class */ (function (_super) { + __extends(FakeComponent, _super); + function FakeComponent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + FakeComponent.prototype.render = function () { + return a$1("div", {}); + }; + FakeComponent.prototype.componentDidMount = function () { + this.setState({}); + }; + return FakeComponent; + })(p); + function createContext$1(defaultValue) { + var ContextType = q(defaultValue); + var origProvider = ContextType.Provider; + ContextType.Provider = function () { + var _this = this; + var isNew = !this.getChildContext; + var children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params + if (isNew) { + var subs_1 = []; + this.shouldComponentUpdate = function (_props) { + if (_this.props.value !== _props.value) { + subs_1.forEach(function (c) { + c.context = _props.value; + c.forceUpdate(); + }); + } + }; + this.sub = function (c) { + subs_1.push(c); + var old = c.componentWillUnmount; + c.componentWillUnmount = function () { + subs_1.splice(subs_1.indexOf(c), 1); + old && old.call(c); + }; + }; + } + return children; + }; + return ContextType; + } + function unmountComponentAtNode$1(node) { + N(null, node); + } + + // no public types yet. when there are, export from: + // import {} from './api-type-deps' + var EventSourceApi = /** @class */ (function () { + function EventSourceApi(context, internalEventSource) { + this.context = context; + this.internalEventSource = internalEventSource; + } + EventSourceApi.prototype.remove = function () { + this.context.dispatch({ + type: "REMOVE_EVENT_SOURCE", + sourceId: this.internalEventSource.sourceId, + }); + }; + EventSourceApi.prototype.refetch = function () { + this.context.dispatch({ + type: "FETCH_EVENT_SOURCES", + sourceIds: [this.internalEventSource.sourceId], + isRefetch: true, + }); + }; + Object.defineProperty(EventSourceApi.prototype, "id", { + get: function () { + return this.internalEventSource.publicId; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventSourceApi.prototype, "url", { + get: function () { + return this.internalEventSource.meta.url; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventSourceApi.prototype, "format", { + get: function () { + return this.internalEventSource.meta.format; // TODO: bad. not guaranteed + }, + enumerable: false, + configurable: true, + }); + return EventSourceApi; + })(); + + function removeElement(el) { + if (el.parentNode) { + el.parentNode.removeChild(el); + } + } + // Querying + // ---------------------------------------------------------------------------------------------------------------- + function elementClosest(el, selector) { + if (el.closest) { + return el.closest(selector); + // really bad fallback for IE + // from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest + } + if (!document.documentElement.contains(el)) { + return null; + } + do { + if (elementMatches(el, selector)) { + return el; + } + el = el.parentElement || el.parentNode; + } while (el !== null && el.nodeType === 1); + return null; + } + function elementMatches(el, selector) { + var method = el.matches || el.matchesSelector || el.msMatchesSelector; + return method.call(el, selector); + } + // accepts multiple subject els + // returns a real array. good for methods like forEach + // TODO: accept the document + function findElements(container, selector) { + var containers = container instanceof HTMLElement ? [container] : container; + var allMatches = []; + for (var i = 0; i < containers.length; i += 1) { + var matches = containers[i].querySelectorAll(selector); + for (var j = 0; j < matches.length; j += 1) { + allMatches.push(matches[j]); + } + } + return allMatches; + } + // accepts multiple subject els + // only queries direct child elements // TODO: rename to findDirectChildren! + function findDirectChildren(parent, selector) { + var parents = parent instanceof HTMLElement ? [parent] : parent; + var allMatches = []; + for (var i = 0; i < parents.length; i += 1) { + var childNodes = parents[i].children; // only ever elements + for (var j = 0; j < childNodes.length; j += 1) { + var childNode = childNodes[j]; + if (!selector || elementMatches(childNode, selector)) { + allMatches.push(childNode); + } + } + } + return allMatches; + } + // Style + // ---------------------------------------------------------------------------------------------------------------- + var PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i; + function applyStyle(el, props) { + for (var propName in props) { + applyStyleProp(el, propName, props[propName]); + } + } + function applyStyleProp(el, name, val) { + if (val == null) { + el.style[name] = ""; + } else if (typeof val === "number" && PIXEL_PROP_RE.test(name)) { + el.style[name] = val + "px"; + } else { + el.style[name] = val; + } + } + // Event Handling + // ---------------------------------------------------------------------------------------------------------------- + // if intercepting bubbled events at the document/window/body level, + // and want to see originating element (the 'target'), use this util instead + // of `ev.target` because it goes within web-component boundaries. + function getEventTargetViaRoot(ev) { + var _a, _b; + return (_b = + (_a = ev.composedPath) === null || _a === void 0 + ? void 0 + : _a.call(ev)[0]) !== null && _b !== void 0 + ? _b + : ev.target; + } + // Shadow DOM consuderations + // ---------------------------------------------------------------------------------------------------------------- + function getElRoot(el) { + return el.getRootNode ? el.getRootNode() : document; + } + // Unique ID for DOM attribute + var guid$1 = 0; + function getUniqueDomId() { + guid$1 += 1; + return "fc-dom-" + guid$1; + } + + // Stops a mouse/touch event from doing it's native browser action + function preventDefault(ev) { + ev.preventDefault(); + } + // Event Delegation + // ---------------------------------------------------------------------------------------------------------------- + function buildDelegationHandler(selector, handler) { + return function (ev) { + var matchedChild = elementClosest(ev.target, selector); + if (matchedChild) { + handler.call(matchedChild, ev, matchedChild); + } + }; + } + function listenBySelector(container, eventType, selector, handler) { + var attachedHandler = buildDelegationHandler(selector, handler); + container.addEventListener(eventType, attachedHandler); + return function () { + container.removeEventListener(eventType, attachedHandler); + }; + } + function listenToHoverBySelector( + container, + selector, + onMouseEnter, + onMouseLeave + ) { + var currentMatchedChild; + return listenBySelector( + container, + "mouseover", + selector, + function (mouseOverEv, matchedChild) { + if (matchedChild !== currentMatchedChild) { + currentMatchedChild = matchedChild; + onMouseEnter(mouseOverEv, matchedChild); + var realOnMouseLeave_1 = function (mouseLeaveEv) { + currentMatchedChild = null; + onMouseLeave(mouseLeaveEv, matchedChild); + matchedChild.removeEventListener("mouseleave", realOnMouseLeave_1); + }; + // listen to the next mouseleave, and then unattach + matchedChild.addEventListener("mouseleave", realOnMouseLeave_1); + } + } + ); + } + // Animation + // ---------------------------------------------------------------------------------------------------------------- + var transitionEventNames = [ + "webkitTransitionEnd", + "otransitionend", + "oTransitionEnd", + "msTransitionEnd", + "transitionend", + ]; + // triggered only when the next single subsequent transition finishes + function whenTransitionDone(el, callback) { + var realCallback = function (ev) { + callback(ev); + transitionEventNames.forEach(function (eventName) { + el.removeEventListener(eventName, realCallback); + }); + }; + transitionEventNames.forEach(function (eventName) { + el.addEventListener(eventName, realCallback); // cross-browser way to determine when the transition finishes + }); + } + // ARIA workarounds + // ---------------------------------------------------------------------------------------------------------------- + function createAriaClickAttrs(handler) { + return __assign({ onClick: handler }, createAriaKeyboardAttrs(handler)); + } + function createAriaKeyboardAttrs(handler) { + return { + tabIndex: 0, + onKeyDown: function (ev) { + if (ev.key === "Enter" || ev.key === " ") { + handler(ev); + ev.preventDefault(); // if space, don't scroll down page + } + }, + }; + } + + var guidNumber = 0; + function guid() { + guidNumber += 1; + return String(guidNumber); + } + /* FullCalendar-specific DOM Utilities + ----------------------------------------------------------------------------------------------------------------------*/ + // Make the mouse cursor express that an event is not allowed in the current area + function disableCursor() { + document.body.classList.add("fc-not-allowed"); + } + // Returns the mouse cursor to its original look + function enableCursor() { + document.body.classList.remove("fc-not-allowed"); + } + /* Selection + ----------------------------------------------------------------------------------------------------------------------*/ + function preventSelection(el) { + el.classList.add("fc-unselectable"); + el.addEventListener("selectstart", preventDefault); + } + function allowSelection(el) { + el.classList.remove("fc-unselectable"); + el.removeEventListener("selectstart", preventDefault); + } + /* Context Menu + ----------------------------------------------------------------------------------------------------------------------*/ + function preventContextMenu(el) { + el.addEventListener("contextmenu", preventDefault); + } + function allowContextMenu(el) { + el.removeEventListener("contextmenu", preventDefault); + } + 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 (Array.isArray(input)) { + tokens = input; + } + for (i = 0; i < tokens.length; i += 1) { + 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; + } + function compareByFieldSpecs(obj0, obj1, fieldSpecs) { + var i; + var cmp; + for (i = 0; i < fieldSpecs.length; i += 1) { + cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i]); + if (cmp) { + return cmp; + } + } + return 0; + } + function compareByFieldSpec(obj0, obj1, fieldSpec) { + if (fieldSpec.func) { + return fieldSpec.func(obj0, obj1); + } + return ( + flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field]) * + (fieldSpec.order || 1) + ); + } + function flexibleCompare(a, b) { + if (!a && !b) { + return 0; + } + if (b == null) { + return -1; + } + if (a == null) { + return 1; + } + if (typeof a === "string" || typeof b === "string") { + return String(a).localeCompare(String(b)); + } + return a - b; + } + /* String Utilities + ----------------------------------------------------------------------------------------------------------------------*/ + function padStart(val, len) { + var s = String(val); + return "000".substr(0, len - s.length) + s; + } + function formatWithOrdinals(formatter, args, fallbackText) { + if (typeof formatter === "function") { + return formatter.apply(void 0, args); + } + if (typeof formatter === "string") { + // non-blank string + return args.reduce(function (str, arg, index) { + return str.replace("$" + index, arg || ""); + }, formatter); + } + return fallbackText; + } + /* Number Utilities + ----------------------------------------------------------------------------------------------------------------------*/ + function compareNumbers(a, b) { + return a - b; + } + function isInt(n) { + return n % 1 === 0; + } + /* FC-specific DOM dimension stuff + ----------------------------------------------------------------------------------------------------------------------*/ + function computeSmallestCellWidth(cellEl) { + var allWidthEl = cellEl.querySelector(".fc-scrollgrid-shrink-frame"); + var contentWidthEl = cellEl.querySelector(".fc-scrollgrid-shrink-cushion"); + if (!allWidthEl) { + throw new Error("needs fc-scrollgrid-shrink-frame className"); // TODO: use const + } + if (!contentWidthEl) { + throw new Error("needs fc-scrollgrid-shrink-cushion className"); + } + return ( + cellEl.getBoundingClientRect().width - + allWidthEl.getBoundingClientRect().width + // the cell padding+border + contentWidthEl.getBoundingClientRect().width + ); + } + + var DAY_IDS = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"]; + // Adding + function addWeeks(m, n) { + var a = dateToUtcArray(m); + a[2] += n * 7; + return arrayToUtcDate(a); + } + function addDays(m, n) { + var a = dateToUtcArray(m); + a[2] += n; + return arrayToUtcDate(a); + } + function addMs(m, n) { + var a = dateToUtcArray(m); + a[6] += n; + return arrayToUtcDate(a); + } + // Diffing (all return floats) + // TODO: why not use ranges? + function diffWeeks(m0, m1) { + return diffDays(m0, m1) / 7; + } + function diffDays(m0, m1) { + return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60 * 24); + } + function diffHours(m0, m1) { + return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60); + } + function diffMinutes(m0, m1) { + return (m1.valueOf() - m0.valueOf()) / (1000 * 60); + } + function diffSeconds(m0, m1) { + return (m1.valueOf() - m0.valueOf()) / 1000; + } + function diffDayAndTime(m0, m1) { + var m0day = startOfDay(m0); + var m1day = startOfDay(m1); + return { + years: 0, + months: 0, + days: Math.round(diffDays(m0day, m1day)), + milliseconds: + m1.valueOf() - m1day.valueOf() - (m0.valueOf() - m0day.valueOf()), + }; + } + // Diffing Whole Units + function diffWholeWeeks(m0, m1) { + var d = diffWholeDays(m0, m1); + if (d !== null && d % 7 === 0) { + return d / 7; + } + return null; + } + function diffWholeDays(m0, m1) { + if (timeAsMs(m0) === timeAsMs(m1)) { + return Math.round(diffDays(m0, m1)); + } + return null; + } + // Start-Of + function startOfDay(m) { + return arrayToUtcDate([ + m.getUTCFullYear(), + m.getUTCMonth(), + m.getUTCDate(), + ]); + } + function startOfHour(m) { + return arrayToUtcDate([ + m.getUTCFullYear(), + m.getUTCMonth(), + m.getUTCDate(), + m.getUTCHours(), + ]); + } + function startOfMinute(m) { + return arrayToUtcDate([ + m.getUTCFullYear(), + m.getUTCMonth(), + m.getUTCDate(), + m.getUTCHours(), + m.getUTCMinutes(), + ]); + } + function startOfSecond(m) { + return arrayToUtcDate([ + m.getUTCFullYear(), + m.getUTCMonth(), + m.getUTCDate(), + m.getUTCHours(), + m.getUTCMinutes(), + m.getUTCSeconds(), + ]); + } + // Week Computation + function weekOfYear(marker, dow, doy) { + var y = marker.getUTCFullYear(); + var w = weekOfGivenYear(marker, y, dow, doy); + if (w < 1) { + return weekOfGivenYear(marker, y - 1, dow, doy); + } + var nextW = weekOfGivenYear(marker, y + 1, dow, doy); + if (nextW >= 1) { + return Math.min(w, nextW); + } + return w; + } + function weekOfGivenYear(marker, year, dow, doy) { + var firstWeekStart = arrayToUtcDate([ + year, + 0, + 1 + firstWeekOffset(year, dow, doy), + ]); + var dayStart = startOfDay(marker); + var days = Math.round(diffDays(firstWeekStart, dayStart)); + return Math.floor(days / 7) + 1; // zero-indexed + } + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + // first-week day -- which january is always in the first week (4 for iso, 1 for other) + var fwd = 7 + dow - doy; + // first-week day local weekday -- which local weekday is fwd + var fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } + // Array Conversion + function dateToLocalArray(date) { + return [ + date.getFullYear(), + date.getMonth(), + date.getDate(), + date.getHours(), + date.getMinutes(), + date.getSeconds(), + date.getMilliseconds(), + ]; + } + function arrayToLocalDate(a) { + return new Date( + a[0], + a[1] || 0, + a[2] == null ? 1 : a[2], // day of month + a[3] || 0, + a[4] || 0, + a[5] || 0 + ); + } + function dateToUtcArray(date) { + return [ + date.getUTCFullYear(), + date.getUTCMonth(), + date.getUTCDate(), + date.getUTCHours(), + date.getUTCMinutes(), + date.getUTCSeconds(), + date.getUTCMilliseconds(), + ]; + } + function arrayToUtcDate(a) { + // according to web standards (and Safari), a month index is required. + // massage if only given a year. + if (a.length === 1) { + a = a.concat([0]); + } + return new Date(Date.UTC.apply(Date, a)); + } + // Other Utils + function isValidDate(m) { + return !isNaN(m.valueOf()); + } + function timeAsMs(m) { + return ( + m.getUTCHours() * 1000 * 60 * 60 + + m.getUTCMinutes() * 1000 * 60 + + m.getUTCSeconds() * 1000 + + m.getUTCMilliseconds() + ); + } + + function createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) { + return { + instanceId: guid(), + defId: defId, + range: range, + forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo, + forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo, + }; + } + + var hasOwnProperty = Object.prototype.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, complexPropsMap) { + var dest = {}; + if (complexPropsMap) { + for (var name_1 in complexPropsMap) { + var complexObjs = []; + // collect the trailing object values, stopping when a non-object is discovered + for (var i = propObjs.length - 1; i >= 0; i -= 1) { + var val = propObjs[i][name_1]; + if (typeof val === "object" && val) { + // non-null object + complexObjs.unshift(val); + } else if (val !== undefined) { + dest[name_1] = 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_1] = mergeProps(complexObjs); + } + } + } + // copy values into the destination, going from last to first + for (var i = propObjs.length - 1; i >= 0; i -= 1) { + var props = propObjs[i]; + for (var name_2 in props) { + if (!(name_2 in dest)) { + // if already assigned by previous props or complex props, don't reassign + dest[name_2] = props[name_2]; + } + } + } + return dest; + } + function filterHash(hash, func) { + var filtered = {}; + for (var key in hash) { + if (func(hash[key], key)) { + filtered[key] = hash[key]; + } + } + return filtered; + } + function mapHash(hash, func) { + var newHash = {}; + for (var key in hash) { + newHash[key] = func(hash[key], key); + } + return newHash; + } + function arrayToHash(a) { + var hash = {}; + for (var _i = 0, a_1 = a; _i < a_1.length; _i++) { + var item = a_1[_i]; + hash[item] = true; + } + return hash; + } + function buildHashFromArray(a, func) { + var hash = {}; + for (var i = 0; i < a.length; i += 1) { + var tuple = func(a[i], i); + hash[tuple[0]] = tuple[1]; + } + return hash; + } + function hashValuesToArray(obj) { + var a = []; + for (var key in obj) { + a.push(obj[key]); + } + return a; + } + function isPropsEqual(obj0, obj1) { + if (obj0 === obj1) { + return true; + } + for (var key in obj0) { + if (hasOwnProperty.call(obj0, key)) { + if (!(key in obj1)) { + return false; + } + } + } + for (var key in obj1) { + if (hasOwnProperty.call(obj1, key)) { + if (obj0[key] !== obj1[key]) { + return false; + } + } + } + return true; + } + function getUnequalProps(obj0, obj1) { + var keys = []; + for (var key in obj0) { + if (hasOwnProperty.call(obj0, key)) { + if (!(key in obj1)) { + keys.push(key); + } + } + } + for (var key in obj1) { + if (hasOwnProperty.call(obj1, key)) { + if (obj0[key] !== obj1[key]) { + keys.push(key); + } + } + } + return keys; + } + function compareObjs(oldProps, newProps, equalityFuncs) { + if (equalityFuncs === void 0) { + equalityFuncs = {}; + } + if (oldProps === newProps) { + return true; + } + for (var key in newProps) { + if ( + key in oldProps && + isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key]) + ); + else { + return false; + } + } + // check for props that were omitted in the new + for (var key in oldProps) { + if (!(key in newProps)) { + return false; + } + } + return true; + } + /* + assumed "true" equality for handler names like "onReceiveSomething" + */ + function isObjValsEqual(val0, val1, comparator) { + if (val0 === val1 || comparator === true) { + return true; + } + if (comparator) { + return comparator(val0, val1); + } + return false; + } + function collectFromHash(hash, startIndex, endIndex, step) { + if (startIndex === void 0) { + startIndex = 0; + } + if (step === void 0) { + step = 1; + } + var res = []; + if (endIndex == null) { + endIndex = Object.keys(hash).length; + } + for (var i = startIndex; i < endIndex; i += step) { + var val = hash[i]; + if (val !== undefined) { + // will disregard undefined for sparse arrays + res.push(val); + } + } + return res; + } + + function parseRecurring(refined, defaultAllDay, dateEnv, recurringTypes) { + for (var i = 0; i < recurringTypes.length; i += 1) { + var parsed = recurringTypes[i].parse(refined, dateEnv); + if (parsed) { + var allDay = refined.allDay; + if (allDay == null) { + allDay = defaultAllDay; + if (allDay == null) { + allDay = parsed.allDayGuess; + if (allDay == null) { + allDay = false; + } + } + } + return { + allDay: allDay, + duration: parsed.duration, + typeData: parsed.typeData, + typeId: i, + }; + } + } + return null; + } + function expandRecurring(eventStore, framingRange, context) { + var dateEnv = context.dateEnv, + pluginHooks = context.pluginHooks, + options = context.options; + var defs = eventStore.defs, + instances = eventStore.instances; + // remove existing recurring instances + // TODO: bad. always expand events as a second step + instances = filterHash(instances, function (instance) { + return !defs[instance.defId].recurringDef; + }); + for (var defId in defs) { + var def = defs[defId]; + if (def.recurringDef) { + var duration = def.recurringDef.duration; + if (!duration) { + duration = def.allDay + ? options.defaultAllDayEventDuration + : options.defaultTimedEventDuration; + } + var starts = expandRecurringRanges( + def, + duration, + framingRange, + dateEnv, + pluginHooks.recurringTypes + ); + for (var _i = 0, starts_1 = starts; _i < starts_1.length; _i++) { + var start = starts_1[_i]; + var instance = createEventInstance(defId, { + start: start, + end: dateEnv.add(start, duration), + }); + instances[instance.instanceId] = instance; + } + } + } + return { defs: defs, instances: instances }; + } + /* + Event MUST have a recurringDef + */ + function expandRecurringRanges( + eventDef, + duration, + framingRange, + dateEnv, + recurringTypes + ) { + var typeDef = recurringTypes[eventDef.recurringDef.typeId]; + var markers = typeDef.expand( + eventDef.recurringDef.typeData, + { + start: dateEnv.subtract(framingRange.start, duration), + end: framingRange.end, + }, + dateEnv + ); + // the recurrence plugins don't guarantee that all-day events are start-of-day, so we have to + if (eventDef.allDay) { + markers = markers.map(startOfDay); + } + return markers; + } + + var INTERNAL_UNITS = ["years", "months", "days", "milliseconds"]; + var PARSE_RE = /^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/; + // Parsing and Creation + function createDuration(input, unit) { + var _a; + if (typeof input === "string") { + return parseString(input); + } + if (typeof input === "object" && input) { + // non-null object + return parseObject(input); + } + if (typeof input === "number") { + return parseObject(((_a = {}), (_a[unit || "milliseconds"] = input), _a)); + } + return null; + } + function parseString(s) { + var m = PARSE_RE.exec(s); + if (m) { + var sign = m[1] ? -1 : 1; + return { + years: 0, + months: 0, + days: sign * (m[2] ? parseInt(m[2], 10) : 0), + milliseconds: + sign * + ((m[3] ? parseInt(m[3], 10) : 0) * 60 * 60 * 1000 + // hours + (m[4] ? parseInt(m[4], 10) : 0) * 60 * 1000 + // minutes + (m[5] ? parseInt(m[5], 10) : 0) * 1000 + // seconds + (m[6] ? parseInt(m[6], 10) : 0)), // ms + }; + } + return null; + } + function parseObject(obj) { + var duration = { + years: obj.years || obj.year || 0, + months: obj.months || obj.month || 0, + days: obj.days || obj.day || 0, + milliseconds: + (obj.hours || obj.hour || 0) * 60 * 60 * 1000 + // hours + (obj.minutes || obj.minute || 0) * 60 * 1000 + // minutes + (obj.seconds || obj.second || 0) * 1000 + // seconds + (obj.milliseconds || obj.millisecond || obj.ms || 0), // ms + }; + var weeks = obj.weeks || obj.week; + if (weeks) { + duration.days += weeks * 7; + duration.specifiedWeeks = true; + } + return duration; + } + // Equality + function durationsEqual(d0, d1) { + return ( + d0.years === d1.years && + d0.months === d1.months && + d0.days === d1.days && + d0.milliseconds === d1.milliseconds + ); + } + function asCleanDays(dur) { + if (!dur.years && !dur.months && !dur.milliseconds) { + return dur.days; + } + return 0; + } + // Simple Math + function addDurations(d0, d1) { + return { + years: d0.years + d1.years, + months: d0.months + d1.months, + days: d0.days + d1.days, + milliseconds: d0.milliseconds + d1.milliseconds, + }; + } + function subtractDurations(d1, d0) { + return { + years: d1.years - d0.years, + months: d1.months - d0.months, + days: d1.days - d0.days, + milliseconds: d1.milliseconds - d0.milliseconds, + }; + } + function multiplyDuration(d, n) { + return { + years: d.years * n, + months: d.months * n, + days: d.days * n, + milliseconds: d.milliseconds * n, + }; + } + // Conversions + // "Rough" because they are based on average-case Gregorian months/years + function asRoughYears(dur) { + return asRoughDays(dur) / 365; + } + function asRoughMonths(dur) { + return asRoughDays(dur) / 30; + } + function asRoughDays(dur) { + return asRoughMs(dur) / 864e5; + } + function asRoughMinutes(dur) { + return asRoughMs(dur) / (1000 * 60); + } + function asRoughSeconds(dur) { + return asRoughMs(dur) / 1000; + } + function asRoughMs(dur) { + return ( + dur.years * (365 * 864e5) + + dur.months * (30 * 864e5) + + dur.days * 864e5 + + dur.milliseconds + ); + } + // Advanced Math + function wholeDivideDurations(numerator, denominator) { + var res = null; + for (var i = 0; i < INTERNAL_UNITS.length; i += 1) { + var unit = INTERNAL_UNITS[i]; + if (denominator[unit]) { + var localRes = numerator[unit] / denominator[unit]; + if (!isInt(localRes) || (res !== null && res !== localRes)) { + return null; + } + res = localRes; + } else if (numerator[unit]) { + // needs to divide by something but can't! + return null; + } + } + return res; + } + function greatestDurationDenominator(dur) { + var ms = dur.milliseconds; + if (ms) { + if (ms % 1000 !== 0) { + return { unit: "millisecond", value: ms }; + } + if (ms % (1000 * 60) !== 0) { + return { unit: "second", value: ms / 1000 }; + } + if (ms % (1000 * 60 * 60) !== 0) { + return { unit: "minute", value: ms / (1000 * 60) }; + } + if (ms) { + return { unit: "hour", value: ms / (1000 * 60 * 60) }; + } + } + if (dur.days) { + if (dur.specifiedWeeks && dur.days % 7 === 0) { + return { unit: "week", value: dur.days / 7 }; + } + return { unit: "day", value: dur.days }; + } + if (dur.months) { + return { unit: "month", value: dur.months }; + } + if (dur.years) { + return { unit: "year", value: dur.years }; + } + return { unit: "millisecond", value: 0 }; + } + + // timeZoneOffset is in minutes + function buildIsoString(marker, timeZoneOffset, stripZeroTime) { + if (stripZeroTime === void 0) { + stripZeroTime = false; + } + var s = marker.toISOString(); + s = s.replace(".000", ""); + if (stripZeroTime) { + s = s.replace("T00:00:00Z", ""); + } + if (s.length > 10) { + // time part wasn't stripped, can add timezone info + if (timeZoneOffset == null) { + s = s.replace("Z", ""); + } else if (timeZoneOffset !== 0) { + s = s.replace("Z", formatTimeZoneOffset(timeZoneOffset, true)); + } + // otherwise, its UTC-0 and we want to keep the Z + } + return s; + } + // formats the date, but with no time part + // TODO: somehow merge with buildIsoString and stripZeroTime + // TODO: rename. omit "string" + function formatDayString(marker) { + return marker.toISOString().replace(/T.*$/, ""); + } + // TODO: use Date::toISOString and use everything after the T? + function formatIsoTimeString(marker) { + return ( + padStart(marker.getUTCHours(), 2) + + ":" + + padStart(marker.getUTCMinutes(), 2) + + ":" + + padStart(marker.getUTCSeconds(), 2) + ); + } + function formatTimeZoneOffset(minutes, doIso) { + if (doIso === void 0) { + doIso = false; + } + var sign = minutes < 0 ? "-" : "+"; + var abs = Math.abs(minutes); + var hours = Math.floor(abs / 60); + var mins = Math.round(abs % 60); + if (doIso) { + return sign + padStart(hours, 2) + ":" + padStart(mins, 2); + } + return "GMT" + sign + hours + (mins ? ":" + padStart(mins, 2) : ""); + } + + // TODO: new util arrayify? + function removeExact(array, exactVal) { + var removeCnt = 0; + var i = 0; + while (i < array.length) { + if (array[i] === exactVal) { + array.splice(i, 1); + removeCnt += 1; + } else { + i += 1; + } + } + return removeCnt; + } + function isArraysEqual(a0, a1, equalityFunc) { + if (a0 === a1) { + return true; + } + var len = a0.length; + var i; + if (len !== a1.length) { + // not array? or not same length? + return false; + } + for (i = 0; i < len; i += 1) { + if (!(equalityFunc ? equalityFunc(a0[i], a1[i]) : a0[i] === a1[i])) { + return false; + } + } + return true; + } + + function memoize(workerFunc, resEquality, teardownFunc) { + var currentArgs; + var currentRes; + return function () { + var newArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + newArgs[_i] = arguments[_i]; + } + if (!currentArgs) { + currentRes = workerFunc.apply(this, newArgs); + } else if (!isArraysEqual(currentArgs, newArgs)) { + if (teardownFunc) { + teardownFunc(currentRes); + } + var res = workerFunc.apply(this, newArgs); + if (!resEquality || !resEquality(res, currentRes)) { + currentRes = res; + } + } + currentArgs = newArgs; + return currentRes; + }; + } + function memoizeObjArg(workerFunc, resEquality, teardownFunc) { + var _this = this; + var currentArg; + var currentRes; + return function (newArg) { + if (!currentArg) { + currentRes = workerFunc.call(_this, newArg); + } else if (!isPropsEqual(currentArg, newArg)) { + if (teardownFunc) { + teardownFunc(currentRes); + } + var res = workerFunc.call(_this, newArg); + if (!resEquality || !resEquality(res, currentRes)) { + currentRes = res; + } + } + currentArg = newArg; + return currentRes; + }; + } + function memoizeArraylike(workerFunc, resEquality, teardownFunc) { // used at all? + var _this = this; + var currentArgSets = []; + var currentResults = []; + return function (newArgSets) { + var currentLen = currentArgSets.length; + var newLen = newArgSets.length; + var i = 0; + for (; i < currentLen; i += 1) { + if (!newArgSets[i]) { + // one of the old sets no longer exists + if (teardownFunc) { + teardownFunc(currentResults[i]); + } + } else if (!isArraysEqual(currentArgSets[i], newArgSets[i])) { + if (teardownFunc) { + teardownFunc(currentResults[i]); + } + var res = workerFunc.apply(_this, newArgSets[i]); + if (!resEquality || !resEquality(res, currentResults[i])) { + currentResults[i] = res; + } + } + } + for (; i < newLen; i += 1) { + currentResults[i] = workerFunc.apply(_this, newArgSets[i]); + } + currentArgSets = newArgSets; + currentResults.splice(newLen); // remove excess + return currentResults; + }; + } + function memoizeHashlike(workerFunc, resEquality, teardownFunc) { + var _this = this; + var currentArgHash = {}; + var currentResHash = {}; + return function (newArgHash) { + var newResHash = {}; + for (var key in newArgHash) { + if (!currentResHash[key]) { + newResHash[key] = workerFunc.apply(_this, newArgHash[key]); + } else if (!isArraysEqual(currentArgHash[key], newArgHash[key])) { + if (teardownFunc) { + teardownFunc(currentResHash[key]); + } + var res = workerFunc.apply(_this, newArgHash[key]); + newResHash[key] = + resEquality && resEquality(res, currentResHash[key]) + ? currentResHash[key] + : res; + } else { + newResHash[key] = currentResHash[key]; + } + } + currentArgHash = newArgHash; + currentResHash = newResHash; + return newResHash; + }; + } + + var EXTENDED_SETTINGS_AND_SEVERITIES = { + week: 3, + separator: 0, + omitZeroMinute: 0, + meridiem: 0, + omitCommas: 0, + }; + var STANDARD_DATE_PROP_SEVERITIES = { + timeZoneName: 7, + era: 6, + year: 5, + month: 4, + day: 2, + weekday: 2, + hour: 1, + minute: 1, + second: 1, + }; + var MERIDIEM_RE = /\s*([ap])\.?m\.?/i; // eats up leading spaces too + var COMMA_RE = /,/g; // we need re for globalness + var MULTI_SPACE_RE = /\s+/g; + var LTR_RE = /\u200e/g; // control character + var UTC_RE = /UTC|GMT/; + var NativeFormatter = /** @class */ (function () { + function NativeFormatter(formatSettings) { + var standardDateProps = {}; + var extendedSettings = {}; + var severity = 0; + for (var name_1 in formatSettings) { + if (name_1 in EXTENDED_SETTINGS_AND_SEVERITIES) { + extendedSettings[name_1] = formatSettings[name_1]; + severity = Math.max( + EXTENDED_SETTINGS_AND_SEVERITIES[name_1], + severity + ); + } else { + standardDateProps[name_1] = formatSettings[name_1]; + if (name_1 in STANDARD_DATE_PROP_SEVERITIES) { + // TODO: what about hour12? no severity + severity = Math.max( + STANDARD_DATE_PROP_SEVERITIES[name_1], + severity + ); + } + } + } + this.standardDateProps = standardDateProps; + this.extendedSettings = extendedSettings; + this.severity = severity; + this.buildFormattingFunc = memoize(buildFormattingFunc); + } + NativeFormatter.prototype.format = function (date, context) { + return this.buildFormattingFunc( + this.standardDateProps, + this.extendedSettings, + context + )(date); + }; + NativeFormatter.prototype.formatRange = function ( + start, + end, + context, + betterDefaultSeparator + ) { + var _a = this, + standardDateProps = _a.standardDateProps, + extendedSettings = _a.extendedSettings; + var diffSeverity = computeMarkerDiffSeverity( + start.marker, + end.marker, + context.calendarSystem + ); + if (!diffSeverity) { + return this.format(start, context); + } + var biggestUnitForPartial = diffSeverity; + if ( + biggestUnitForPartial > 1 && // the two dates are different in a way that's larger scale than time + (standardDateProps.year === "numeric" || + standardDateProps.year === "2-digit") && + (standardDateProps.month === "numeric" || + standardDateProps.month === "2-digit") && + (standardDateProps.day === "numeric" || + standardDateProps.day === "2-digit") + ) { + biggestUnitForPartial = 1; // make it look like the dates are only different in terms of time + } + var full0 = this.format(start, context); + var full1 = this.format(end, context); + if (full0 === full1) { + return full0; + } + var partialDateProps = computePartialFormattingOptions( + standardDateProps, + biggestUnitForPartial + ); + var partialFormattingFunc = buildFormattingFunc( + partialDateProps, + extendedSettings, + context + ); + var partial0 = partialFormattingFunc(start); + var partial1 = partialFormattingFunc(end); + var insertion = findCommonInsertion(full0, partial0, full1, partial1); + var separator = + extendedSettings.separator || + betterDefaultSeparator || + context.defaultSeparator || + ""; + if (insertion) { + return ( + insertion.before + partial0 + separator + partial1 + insertion.after + ); + } + return full0 + separator + full1; + }; + NativeFormatter.prototype.getLargestUnit = function () { + switch (this.severity) { + case 7: + case 6: + case 5: + return "year"; + case 4: + return "month"; + case 3: + return "week"; + case 2: + return "day"; + default: + return "time"; // really? + } + }; + return NativeFormatter; + })(); + function buildFormattingFunc(standardDateProps, extendedSettings, context) { + var standardDatePropCnt = Object.keys(standardDateProps).length; + if ( + standardDatePropCnt === 1 && + standardDateProps.timeZoneName === "short" + ) { + return function (date) { + return formatTimeZoneOffset(date.timeZoneOffset); + }; + } + if (standardDatePropCnt === 0 && extendedSettings.week) { + return function (date) { + return formatWeekNumber( + context.computeWeekNumber(date.marker), + context.weekText, + context.weekTextLong, + context.locale, + extendedSettings.week + ); + }; + } + return buildNativeFormattingFunc( + standardDateProps, + extendedSettings, + context + ); + } + function buildNativeFormattingFunc( + standardDateProps, + extendedSettings, + context + ) { + standardDateProps = __assign({}, standardDateProps); // copy + extendedSettings = __assign({}, extendedSettings); // copy + sanitizeSettings(standardDateProps, extendedSettings); + standardDateProps.timeZone = "UTC"; // we leverage the only guaranteed timeZone for our UTC markers + var normalFormat = new Intl.DateTimeFormat( + context.locale.codes, + standardDateProps + ); + var zeroFormat; // needed? + if (extendedSettings.omitZeroMinute) { + var zeroProps = __assign({}, standardDateProps); + delete zeroProps.minute; // seconds and ms were already considered in sanitizeSettings + zeroFormat = new Intl.DateTimeFormat(context.locale.codes, zeroProps); + } + return function (date) { + var marker = date.marker; + var format; + if (zeroFormat && !marker.getUTCMinutes()) { + format = zeroFormat; + } else { + format = normalFormat; + } + var s = format.format(marker); + return postProcess(s, date, standardDateProps, extendedSettings, context); + }; + } + function sanitizeSettings(standardDateProps, extendedSettings) { + // deal with a browser inconsistency where formatting the timezone + // requires that the hour/minute be present. + if (standardDateProps.timeZoneName) { + if (!standardDateProps.hour) { + standardDateProps.hour = "2-digit"; + } + if (!standardDateProps.minute) { + standardDateProps.minute = "2-digit"; + } + } + // only support short timezone names + if (standardDateProps.timeZoneName === "long") { + standardDateProps.timeZoneName = "short"; + } + // if requesting to display seconds, MUST display minutes + if ( + extendedSettings.omitZeroMinute && + (standardDateProps.second || standardDateProps.millisecond) + ) { + delete extendedSettings.omitZeroMinute; + } + } + function postProcess(s, date, standardDateProps, extendedSettings, context) { + s = s.replace(LTR_RE, ""); // remove left-to-right control chars. do first. good for other regexes + if (standardDateProps.timeZoneName === "short") { + s = injectTzoStr( + s, + context.timeZone === "UTC" || date.timeZoneOffset == null + ? "UTC" // important to normalize for IE, which does "GMT" + : formatTimeZoneOffset(date.timeZoneOffset) + ); + } + if (extendedSettings.omitCommas) { + s = s.replace(COMMA_RE, "").trim(); + } + if (extendedSettings.omitZeroMinute) { + s = s.replace(":00", ""); // zeroFormat doesn't always achieve this + } + // ^ do anything that might create adjacent spaces before this point, + // because MERIDIEM_RE likes to eat up loading spaces + if (extendedSettings.meridiem === false) { + s = s.replace(MERIDIEM_RE, "").trim(); + } else if (extendedSettings.meridiem === "narrow") { + // a/p + s = s.replace(MERIDIEM_RE, function (m0, m1) { + return m1.toLocaleLowerCase(); + }); + } else if (extendedSettings.meridiem === "short") { + // am/pm + s = s.replace(MERIDIEM_RE, function (m0, m1) { + return m1.toLocaleLowerCase() + "m"; + }); + } else if (extendedSettings.meridiem === "lowercase") { + // other meridiem transformers already converted to lowercase + s = s.replace(MERIDIEM_RE, function (m0) { + return m0.toLocaleLowerCase(); + }); + } + s = s.replace(MULTI_SPACE_RE, " "); + s = s.trim(); + return s; + } + function injectTzoStr(s, tzoStr) { + var replaced = false; + s = s.replace(UTC_RE, function () { + replaced = true; + return tzoStr; + }); + // IE11 doesn't include UTC/GMT in the original string, so append to end + if (!replaced) { + s += " " + tzoStr; + } + return s; + } + function formatWeekNumber(num, weekText, weekTextLong, locale, display) { + var parts = []; + if (display === "long") { + parts.push(weekTextLong); + } else if (display === "short" || display === "narrow") { + parts.push(weekText); + } + if (display === "long" || display === "short") { + parts.push(" "); + } + parts.push(locale.simpleNumberFormat.format(num)); + if (locale.options.direction === "rtl") { + // TODO: use control characters instead? + parts.reverse(); + } + return parts.join(""); + } + // Range Formatting Utils + // 0 = exactly the same + // 1 = different by time + // and bigger + function computeMarkerDiffSeverity(d0, d1, ca) { + if (ca.getMarkerYear(d0) !== ca.getMarkerYear(d1)) { + return 5; + } + if (ca.getMarkerMonth(d0) !== ca.getMarkerMonth(d1)) { + return 4; + } + if (ca.getMarkerDay(d0) !== ca.getMarkerDay(d1)) { + return 2; + } + if (timeAsMs(d0) !== timeAsMs(d1)) { + return 1; + } + return 0; + } + function computePartialFormattingOptions(options, biggestUnit) { + var partialOptions = {}; + for (var name_2 in options) { + if ( + !(name_2 in STANDARD_DATE_PROP_SEVERITIES) || // not a date part prop (like timeZone) + STANDARD_DATE_PROP_SEVERITIES[name_2] <= biggestUnit + ) { + partialOptions[name_2] = options[name_2]; + } + } + return partialOptions; + } + function findCommonInsertion(full0, partial0, full1, partial1) { + var i0 = 0; + while (i0 < full0.length) { + var found0 = full0.indexOf(partial0, i0); + if (found0 === -1) { + break; + } + var before0 = full0.substr(0, found0); + i0 = found0 + partial0.length; + var after0 = full0.substr(i0); + var i1 = 0; + while (i1 < full1.length) { + var found1 = full1.indexOf(partial1, i1); + if (found1 === -1) { + break; + } + var before1 = full1.substr(0, found1); + i1 = found1 + partial1.length; + var after1 = full1.substr(i1); + if (before0 === before1 && after0 === after1) { + return { + before: before0, + after: after0, + }; + } + } + } + return null; + } + + function expandZonedMarker(dateInfo, calendarSystem) { + var a = calendarSystem.markerToArray(dateInfo.marker); + return { + marker: dateInfo.marker, + timeZoneOffset: dateInfo.timeZoneOffset, + array: a, + year: a[0], + month: a[1], + day: a[2], + hour: a[3], + minute: a[4], + second: a[5], + millisecond: a[6], + }; + } + + function createVerboseFormattingArg( + start, + end, + context, + betterDefaultSeparator + ) { + var startInfo = expandZonedMarker(start, context.calendarSystem); + var endInfo = end ? expandZonedMarker(end, context.calendarSystem) : null; + return { + date: startInfo, + start: startInfo, + end: endInfo, + timeZone: context.timeZone, + localeCodes: context.locale.codes, + defaultSeparator: betterDefaultSeparator || context.defaultSeparator, + }; + } + + /* + TODO: fix the terminology of "formatter" vs "formatting func" + */ + /* + At the time of instantiation, this object does not know which cmd-formatting system it will use. + It receives this at the time of formatting, as a setting. + */ + var CmdFormatter = /** @class */ (function () { + function CmdFormatter(cmdStr) { + this.cmdStr = cmdStr; + } + CmdFormatter.prototype.format = function ( + date, + context, + betterDefaultSeparator + ) { + return context.cmdFormatter( + this.cmdStr, + createVerboseFormattingArg(date, null, context, betterDefaultSeparator) + ); + }; + CmdFormatter.prototype.formatRange = function ( + start, + end, + context, + betterDefaultSeparator + ) { + return context.cmdFormatter( + this.cmdStr, + createVerboseFormattingArg(start, end, context, betterDefaultSeparator) + ); + }; + return CmdFormatter; + })(); + + var FuncFormatter = /** @class */ (function () { + function FuncFormatter(func) { + this.func = func; + } + FuncFormatter.prototype.format = function ( + date, + context, + betterDefaultSeparator + ) { + return this.func( + createVerboseFormattingArg(date, null, context, betterDefaultSeparator) + ); + }; + FuncFormatter.prototype.formatRange = function ( + start, + end, + context, + betterDefaultSeparator + ) { + return this.func( + createVerboseFormattingArg(start, end, context, betterDefaultSeparator) + ); + }; + return FuncFormatter; + })(); + + function createFormatter(input) { + if (typeof input === "object" && input) { + // non-null object + return new NativeFormatter(input); + } + if (typeof input === "string") { + return new CmdFormatter(input); + } + if (typeof input === "function") { + return new FuncFormatter(input); + } + return null; + } + + // base options + // ------------ + var BASE_OPTION_REFINERS = { + navLinkDayClick: identity, + navLinkWeekClick: identity, + duration: createDuration, + bootstrapFontAwesome: identity, + buttonIcons: identity, + customButtons: identity, + defaultAllDayEventDuration: createDuration, + defaultTimedEventDuration: createDuration, + nextDayThreshold: createDuration, + scrollTime: createDuration, + scrollTimeReset: Boolean, + slotMinTime: createDuration, + slotMaxTime: createDuration, + dayPopoverFormat: createFormatter, + slotDuration: createDuration, + snapDuration: createDuration, + headerToolbar: identity, + footerToolbar: identity, + defaultRangeSeparator: String, + titleRangeSeparator: String, + forceEventDuration: Boolean, + dayHeaders: Boolean, + dayHeaderFormat: createFormatter, + dayHeaderClassNames: identity, + dayHeaderContent: identity, + dayHeaderDidMount: identity, + dayHeaderWillUnmount: identity, + dayCellClassNames: identity, + dayCellContent: identity, + dayCellDidMount: identity, + dayCellWillUnmount: identity, + initialView: String, + aspectRatio: Number, + weekends: Boolean, + weekNumberCalculation: identity, + weekNumbers: Boolean, + weekNumberClassNames: identity, + weekNumberContent: identity, + weekNumberDidMount: identity, + weekNumberWillUnmount: identity, + editable: Boolean, + viewClassNames: identity, + viewDidMount: identity, + viewWillUnmount: identity, + nowIndicator: Boolean, + nowIndicatorClassNames: identity, + nowIndicatorContent: identity, + nowIndicatorDidMount: identity, + nowIndicatorWillUnmount: identity, + showNonCurrentDates: Boolean, + lazyFetching: Boolean, + startParam: String, + endParam: String, + timeZoneParam: String, + timeZone: String, + locales: identity, + locale: identity, + themeSystem: String, + dragRevertDuration: Number, + dragScroll: Boolean, + allDayMaintainDuration: Boolean, + unselectAuto: Boolean, + dropAccept: identity, + eventOrder: parseFieldSpecs, + eventOrderStrict: Boolean, + handleWindowResize: Boolean, + windowResizeDelay: Number, + longPressDelay: Number, + eventDragMinDistance: Number, + expandRows: Boolean, + height: identity, + contentHeight: identity, + direction: String, + weekNumberFormat: createFormatter, + eventResizableFromStart: Boolean, + displayEventTime: Boolean, + displayEventEnd: Boolean, + weekText: String, + weekTextLong: String, + progressiveEventRendering: Boolean, + businessHours: identity, + initialDate: identity, + now: identity, + eventDataTransform: identity, + stickyHeaderDates: identity, + stickyFooterScrollbar: identity, + viewHeight: identity, + defaultAllDay: Boolean, + eventSourceFailure: identity, + eventSourceSuccess: identity, + eventDisplay: String, + eventStartEditable: Boolean, + eventDurationEditable: Boolean, + eventOverlap: identity, + eventConstraint: identity, + eventAllow: identity, + eventBackgroundColor: String, + eventBorderColor: String, + eventTextColor: String, + eventColor: String, + eventClassNames: identity, + eventContent: identity, + eventDidMount: identity, + eventWillUnmount: identity, + selectConstraint: identity, + selectOverlap: identity, + selectAllow: identity, + droppable: Boolean, + unselectCancel: String, + slotLabelFormat: identity, + slotLaneClassNames: identity, + slotLaneContent: identity, + slotLaneDidMount: identity, + slotLaneWillUnmount: identity, + slotLabelClassNames: identity, + slotLabelContent: identity, + slotLabelDidMount: identity, + slotLabelWillUnmount: identity, + dayMaxEvents: identity, + dayMaxEventRows: identity, + dayMinWidth: Number, + slotLabelInterval: createDuration, + allDayText: String, + allDayClassNames: identity, + allDayContent: identity, + allDayDidMount: identity, + allDayWillUnmount: identity, + slotMinWidth: Number, + navLinks: Boolean, + eventTimeFormat: createFormatter, + rerenderDelay: Number, + moreLinkText: identity, + moreLinkHint: identity, + selectMinDistance: Number, + selectable: Boolean, + selectLongPressDelay: Number, + eventLongPressDelay: Number, + selectMirror: Boolean, + eventMaxStack: Number, + eventMinHeight: Number, + eventMinWidth: Number, + eventShortHeight: Number, + slotEventOverlap: Boolean, + plugins: identity, + firstDay: Number, + dayCount: Number, + dateAlignment: String, + dateIncrement: createDuration, + hiddenDays: identity, + monthMode: Boolean, + fixedWeekCount: Boolean, + validRange: identity, + visibleRange: identity, + titleFormat: identity, + eventInteractive: Boolean, + // only used by list-view, but languages define the value, so we need it in base options + noEventsText: String, + viewHint: identity, + navLinkHint: identity, + closeHint: String, + timeHint: String, + eventHint: String, + moreLinkClick: identity, + moreLinkClassNames: identity, + moreLinkContent: identity, + moreLinkDidMount: identity, + moreLinkWillUnmount: identity, + }; + // do NOT give a type here. need `typeof BASE_OPTION_DEFAULTS` to give real results. + // raw values. + var BASE_OPTION_DEFAULTS = { + eventDisplay: "auto", + defaultRangeSeparator: " - ", + titleRangeSeparator: " \u2013 ", + defaultTimedEventDuration: "01:00:00", + defaultAllDayEventDuration: { day: 1 }, + forceEventDuration: false, + nextDayThreshold: "00:00:00", + dayHeaders: true, + initialView: "", + aspectRatio: 1.35, + headerToolbar: { + start: "title", + center: "", + end: "today prev,next", + }, + weekends: true, + weekNumbers: false, + weekNumberCalculation: "local", + editable: false, + nowIndicator: false, + scrollTime: "06:00:00", + scrollTimeReset: true, + slotMinTime: "00:00:00", + slotMaxTime: "24:00:00", + showNonCurrentDates: true, + lazyFetching: true, + startParam: "start", + endParam: "end", + timeZoneParam: "timeZone", + timeZone: "local", + locales: [], + locale: "", + themeSystem: "standard", + dragRevertDuration: 500, + dragScroll: true, + allDayMaintainDuration: false, + unselectAuto: true, + dropAccept: "*", + eventOrder: "start,-duration,allDay,title", + dayPopoverFormat: { month: "long", day: "numeric", year: "numeric" }, + handleWindowResize: true, + windowResizeDelay: 100, + longPressDelay: 1000, + eventDragMinDistance: 5, + expandRows: false, + navLinks: false, + selectable: false, + eventMinHeight: 15, + eventMinWidth: 30, + eventShortHeight: 30, + }; + // calendar listeners + // ------------------ + var CALENDAR_LISTENER_REFINERS = { + datesSet: identity, + eventsSet: identity, + eventAdd: identity, + eventChange: identity, + eventRemove: identity, + windowResize: identity, + eventClick: identity, + eventMouseEnter: identity, + eventMouseLeave: identity, + select: identity, + unselect: identity, + loading: identity, + // internal + _unmount: identity, + _beforeprint: identity, + _afterprint: identity, + _noEventDrop: identity, + _noEventResize: identity, + _resize: identity, + _scrollRequest: identity, + }; + // calendar-specific options + // ------------------------- + var CALENDAR_OPTION_REFINERS = { + buttonText: identity, + buttonHints: identity, + views: identity, + plugins: identity, + initialEvents: identity, + events: identity, + eventSources: identity, + }; + var COMPLEX_OPTION_COMPARATORS = { + headerToolbar: isMaybeObjectsEqual, + footerToolbar: isMaybeObjectsEqual, + buttonText: isMaybeObjectsEqual, + buttonHints: isMaybeObjectsEqual, + buttonIcons: isMaybeObjectsEqual, + dateIncrement: isMaybeObjectsEqual, + }; + function isMaybeObjectsEqual(a, b) { + if (typeof a === "object" && typeof b === "object" && a && b) { + // both non-null objects + return isPropsEqual(a, b); + } + return a === b; + } + // view-specific options + // --------------------- + var VIEW_OPTION_REFINERS = { + type: String, + component: identity, + buttonText: String, + buttonTextKey: String, + dateProfileGeneratorClass: identity, + usesMinMaxTime: Boolean, + classNames: identity, + content: identity, + didMount: identity, + willUnmount: identity, + }; + // util funcs + // ---------------------------------------------------------------------------------------------------- + function mergeRawOptions(optionSets) { + return mergeProps(optionSets, COMPLEX_OPTION_COMPARATORS); + } + function refineProps(input, refiners) { + var refined = {}; + var extra = {}; + for (var propName in refiners) { + if (propName in input) { + refined[propName] = refiners[propName](input[propName]); + } + } + for (var propName in input) { + if (!(propName in refiners)) { + extra[propName] = input[propName]; + } + } + return { refined: refined, extra: extra }; + } + function identity(raw) { + return raw; + } + + function parseEvents(rawEvents, eventSource, context, allowOpenRange) { + var eventStore = createEmptyEventStore(); + var eventRefiners = buildEventRefiners(context); + for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) { + var rawEvent = rawEvents_1[_i]; + var tuple = parseEvent( + rawEvent, + eventSource, + context, + allowOpenRange, + eventRefiners + ); + if (tuple) { + eventTupleToStore(tuple, eventStore); + } + } + return eventStore; + } + function eventTupleToStore(tuple, eventStore) { + if (eventStore === void 0) { + eventStore = createEmptyEventStore(); + } + eventStore.defs[tuple.def.defId] = tuple.def; + if (tuple.instance) { + eventStore.instances[tuple.instance.instanceId] = tuple.instance; + } + return eventStore; + } + // retrieves events that have the same groupId as the instance specified by `instanceId` + // or they are the same as the instance. + // why might instanceId not be in the store? an event from another calendar? + function getRelevantEvents(eventStore, instanceId) { + var instance = eventStore.instances[instanceId]; + if (instance) { + var def_1 = eventStore.defs[instance.defId]; + // get events/instances with same group + var newStore = filterEventStoreDefs(eventStore, function (lookDef) { + return isEventDefsGrouped(def_1, lookDef); + }); + // add the original + // TODO: wish we could use eventTupleToStore or something like it + newStore.defs[def_1.defId] = def_1; + newStore.instances[instance.instanceId] = instance; + return newStore; + } + return createEmptyEventStore(); + } + function isEventDefsGrouped(def0, def1) { + return Boolean(def0.groupId && def0.groupId === def1.groupId); + } + function createEmptyEventStore() { + return { defs: {}, instances: {} }; + } + function mergeEventStores(store0, store1) { + return { + defs: __assign(__assign({}, store0.defs), store1.defs), + instances: __assign(__assign({}, store0.instances), store1.instances), + }; + } + function filterEventStoreDefs(eventStore, filterFunc) { + var defs = filterHash(eventStore.defs, filterFunc); + var instances = filterHash(eventStore.instances, function (instance) { + return defs[instance.defId]; // still exists? + }); + return { defs: defs, instances: instances }; + } + function excludeSubEventStore(master, sub) { + var defs = master.defs, + instances = master.instances; + var filteredDefs = {}; + var filteredInstances = {}; + for (var defId in defs) { + if (!sub.defs[defId]) { + // not explicitly excluded + filteredDefs[defId] = defs[defId]; + } + } + for (var instanceId in instances) { + if ( + !sub.instances[instanceId] && // not explicitly excluded + filteredDefs[instances[instanceId].defId] // def wasn't filtered away + ) { + filteredInstances[instanceId] = instances[instanceId]; + } + } + return { + defs: filteredDefs, + instances: filteredInstances, + }; + } + + function normalizeConstraint(input, context) { + if (Array.isArray(input)) { + return parseEvents(input, null, context, true); // allowOpenRange=true + } + if (typeof input === "object" && input) { + // non-null object + return parseEvents([input], null, context, true); // allowOpenRange=true + } + if (input != null) { + return String(input); + } + return null; + } + + function parseClassNames(raw) { + if (Array.isArray(raw)) { + return raw; + } + if (typeof raw === "string") { + return raw.split(/\s+/); + } + return []; + } + + // TODO: better called "EventSettings" or "EventConfig" + // TODO: move this file into structs + // TODO: separate constraint/overlap/allow, because selection uses only that, not other props + var EVENT_UI_REFINERS = { + display: String, + editable: Boolean, + startEditable: Boolean, + durationEditable: Boolean, + constraint: identity, + overlap: identity, + allow: identity, + className: parseClassNames, + classNames: parseClassNames, + color: String, + backgroundColor: String, + borderColor: String, + textColor: String, + }; + var EMPTY_EVENT_UI = { + display: null, + startEditable: null, + durationEditable: null, + constraints: [], + overlap: null, + allows: [], + backgroundColor: "", + borderColor: "", + textColor: "", + classNames: [], + }; + function createEventUi(refined, context) { + var constraint = normalizeConstraint(refined.constraint, context); + return { + display: refined.display || null, + startEditable: + refined.startEditable != null + ? refined.startEditable + : refined.editable, + durationEditable: + refined.durationEditable != null + ? refined.durationEditable + : refined.editable, + constraints: constraint != null ? [constraint] : [], + overlap: refined.overlap != null ? refined.overlap : null, + allows: refined.allow != null ? [refined.allow] : [], + backgroundColor: refined.backgroundColor || refined.color || "", + borderColor: refined.borderColor || refined.color || "", + textColor: refined.textColor || "", + classNames: (refined.className || []).concat(refined.classNames || []), // join singular and plural + }; + } + // TODO: prevent against problems with <2 args! + function combineEventUis(uis) { + return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI); + } + function combineTwoEventUis(item0, item1) { + return { + display: item1.display != null ? item1.display : item0.display, + startEditable: + item1.startEditable != null ? item1.startEditable : item0.startEditable, + durationEditable: + item1.durationEditable != null + ? item1.durationEditable + : item0.durationEditable, + constraints: item0.constraints.concat(item1.constraints), + overlap: + typeof item1.overlap === "boolean" ? item1.overlap : item0.overlap, + allows: item0.allows.concat(item1.allows), + backgroundColor: item1.backgroundColor || item0.backgroundColor, + borderColor: item1.borderColor || item0.borderColor, + textColor: item1.textColor || item0.textColor, + classNames: item0.classNames.concat(item1.classNames), + }; + } + + var EVENT_NON_DATE_REFINERS = { + id: String, + groupId: String, + title: String, + url: String, + interactive: Boolean, + }; + var EVENT_DATE_REFINERS = { + start: identity, + end: identity, + date: identity, + allDay: Boolean, + }; + var EVENT_REFINERS = __assign( + __assign(__assign({}, EVENT_NON_DATE_REFINERS), EVENT_DATE_REFINERS), + { extendedProps: identity } + ); + function parseEvent(raw, eventSource, context, allowOpenRange, refiners) { + if (refiners === void 0) { + refiners = buildEventRefiners(context); + } + var _a = refineEventDef(raw, context, refiners), + refined = _a.refined, + extra = _a.extra; + var defaultAllDay = computeIsDefaultAllDay(eventSource, context); + var recurringRes = parseRecurring( + refined, + defaultAllDay, + context.dateEnv, + context.pluginHooks.recurringTypes + ); + if (recurringRes) { + var def = parseEventDef( + refined, + extra, + eventSource ? eventSource.sourceId : "", + recurringRes.allDay, + Boolean(recurringRes.duration), + context + ); + def.recurringDef = { + typeId: recurringRes.typeId, + typeData: recurringRes.typeData, + duration: recurringRes.duration, + }; + return { def: def, instance: null }; + } + var singleRes = parseSingle( + refined, + defaultAllDay, + context, + allowOpenRange + ); + if (singleRes) { + var def = parseEventDef( + refined, + extra, + eventSource ? eventSource.sourceId : "", + singleRes.allDay, + singleRes.hasEnd, + context + ); + var instance = createEventInstance( + def.defId, + singleRes.range, + singleRes.forcedStartTzo, + singleRes.forcedEndTzo + ); + return { def: def, instance: instance }; + } + return null; + } + function refineEventDef(raw, context, refiners) { + if (refiners === void 0) { + refiners = buildEventRefiners(context); + } + return refineProps(raw, refiners); + } + function buildEventRefiners(context) { + return __assign( + __assign(__assign({}, EVENT_UI_REFINERS), EVENT_REFINERS), + context.pluginHooks.eventRefiners + ); + } + /* + Will NOT populate extendedProps with the leftover properties. + Will NOT populate date-related props. + */ + function parseEventDef(refined, extra, sourceId, allDay, hasEnd, context) { + var def = { + title: refined.title || "", + groupId: refined.groupId || "", + publicId: refined.id || "", + url: refined.url || "", + recurringDef: null, + defId: guid(), + sourceId: sourceId, + allDay: allDay, + hasEnd: hasEnd, + interactive: refined.interactive, + ui: createEventUi(refined, context), + extendedProps: __assign(__assign({}, refined.extendedProps || {}), extra), + }; + for ( + var _i = 0, _a = context.pluginHooks.eventDefMemberAdders; + _i < _a.length; + _i++ + ) { + var memberAdder = _a[_i]; + __assign(def, memberAdder(refined)); + } + // help out EventApi from having user modify props + Object.freeze(def.ui.classNames); + Object.freeze(def.extendedProps); + return def; + } + function parseSingle(refined, defaultAllDay, context, allowOpenRange) { + var allDay = refined.allDay; + var startMeta; + var startMarker = null; + var hasEnd = false; + var endMeta; + var endMarker = null; + var startInput = refined.start != null ? refined.start : refined.date; + startMeta = context.dateEnv.createMarkerMeta(startInput); + if (startMeta) { + startMarker = startMeta.marker; + } else if (!allowOpenRange) { + return null; + } + if (refined.end != null) { + endMeta = context.dateEnv.createMarkerMeta(refined.end); + } + if (allDay == null) { + if (defaultAllDay != null) { + allDay = defaultAllDay; + } else { + // fall back to the date props LAST + allDay = + (!startMeta || startMeta.isTimeUnspecified) && + (!endMeta || endMeta.isTimeUnspecified); + } + } + if (allDay && startMarker) { + startMarker = startOfDay(startMarker); + } + if (endMeta) { + endMarker = endMeta.marker; + if (allDay) { + endMarker = startOfDay(endMarker); + } + if (startMarker && endMarker <= startMarker) { + endMarker = null; + } + } + if (endMarker) { + hasEnd = true; + } else if (!allowOpenRange) { + hasEnd = context.options.forceEventDuration || false; + endMarker = context.dateEnv.add( + startMarker, + allDay + ? context.options.defaultAllDayEventDuration + : context.options.defaultTimedEventDuration + ); + } + return { + allDay: allDay, + hasEnd: hasEnd, + range: { start: startMarker, end: endMarker }, + forcedStartTzo: startMeta ? startMeta.forcedTzo : null, + forcedEndTzo: endMeta ? endMeta.forcedTzo : null, + }; + } + function computeIsDefaultAllDay(eventSource, context) { + var res = null; + if (eventSource) { + res = eventSource.defaultAllDay; + } + if (res == null) { + res = context.options.defaultAllDay; + } + return res; + } + + /* Date stuff that doesn't belong in datelib core + ----------------------------------------------------------------------------------------------------------------------*/ + // given a timed range, computes an all-day range that has the same exact duration, + // but whose start time is aligned with the start of the day. + function computeAlignedDayRange(timedRange) { + var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1; + var start = startOfDay(timedRange.start); + var end = addDays(start, dayCnt); + return { start: start, end: end }; + } + // given a timed range, computes an all-day range based on how for the end date bleeds into the next day + // TODO: give nextDayThreshold a default arg + function computeVisibleDayRange(timedRange, nextDayThreshold) { + if (nextDayThreshold === void 0) { + nextDayThreshold = createDuration(0); + } + var startDay = null; + var endDay = null; + if (timedRange.end) { + endDay = startOfDay(timedRange.end); + var endTimeMS = timedRange.end.valueOf() - endDay.valueOf(); // # of milliseconds into `endDay` + // If the end time is actually inclusively part of the next day and is equal to or + // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`. + // Otherwise, leaving it as inclusive will cause it to exclude `endDay`. + if (endTimeMS && endTimeMS >= asRoughMs(nextDayThreshold)) { + endDay = addDays(endDay, 1); + } + } + if (timedRange.start) { + startDay = startOfDay(timedRange.start); // the beginning of the day the range starts + // If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day. + if (endDay && endDay <= startDay) { + endDay = addDays(startDay, 1); + } + } + return { start: startDay, end: endDay }; + } + // spans from one day into another? + function isMultiDayRange(range) { + var visibleRange = computeVisibleDayRange(range); + return diffDays(visibleRange.start, visibleRange.end) > 1; + } + function diffDates(date0, date1, dateEnv, largeUnit) { + if (largeUnit === "year") { + return createDuration(dateEnv.diffWholeYears(date0, date1), "year"); + } + if (largeUnit === "month") { + return createDuration(dateEnv.diffWholeMonths(date0, date1), "month"); + } + return diffDayAndTime(date0, date1); // returns a duration + } + + function parseRange(input, dateEnv) { + var start = null; + var end = null; + if (input.start) { + start = dateEnv.createMarker(input.start); + } + if (input.end) { + end = dateEnv.createMarker(input.end); + } + if (!start && !end) { + return null; + } + if (start && end && end < start) { + return null; + } + return { start: start, end: end }; + } + // SIDE-EFFECT: will mutate ranges. + // Will return a new array result. + function invertRanges(ranges, constraintRange) { + var invertedRanges = []; + var start = constraintRange.start; // 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(compareRanges); + for (i = 0; i < ranges.length; i += 1) { + dateRange = ranges[i]; + // add the span of time before the event (if there is any) + if (dateRange.start > start) { + // compare millisecond time (skip any ambig logic) + invertedRanges.push({ start: start, end: dateRange.start }); + } + if (dateRange.end > start) { + start = dateRange.end; + } + } + // add the span of time after the last event (if there is any) + if (start < constraintRange.end) { + // compare millisecond time (skip any ambig logic) + invertedRanges.push({ start: start, end: constraintRange.end }); + } + return invertedRanges; + } + function compareRanges(range0, range1) { + return range0.start.valueOf() - range1.start.valueOf(); // earlier ranges go first + } + function intersectRanges(range0, range1) { + var start = range0.start, + end = range0.end; + var newRange = null; + if (range1.start !== null) { + if (start === null) { + start = range1.start; + } else { + start = new Date(Math.max(start.valueOf(), range1.start.valueOf())); + } + } + if (range1.end != null) { + if (end === null) { + end = range1.end; + } else { + end = new Date(Math.min(end.valueOf(), range1.end.valueOf())); + } + } + if (start === null || end === null || start < end) { + newRange = { start: start, end: end }; + } + return newRange; + } + function rangesEqual(range0, range1) { + return ( + (range0.start === null ? null : range0.start.valueOf()) === + (range1.start === null ? null : range1.start.valueOf()) && + (range0.end === null ? null : range0.end.valueOf()) === + (range1.end === null ? null : range1.end.valueOf()) + ); + } + function rangesIntersect(range0, range1) { + return ( + (range0.end === null || + range1.start === null || + range0.end > range1.start) && + (range0.start === null || + range1.end === null || + range0.start < range1.end) + ); + } + function rangeContainsRange(outerRange, innerRange) { + return ( + (outerRange.start === null || + (innerRange.start !== null && innerRange.start >= outerRange.start)) && + (outerRange.end === null || + (innerRange.end !== null && innerRange.end <= outerRange.end)) + ); + } + function rangeContainsMarker(range, date) { + return ( + (range.start === null || date >= range.start) && + (range.end === null || date < range.end) + ); + } + // 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). + function constrainMarkerToRange(date, range) { + if (range.start != null && date < range.start) { + return range.start; + } + if (range.end != null && date >= range.end) { + return new Date(range.end.valueOf() - 1); + } + return date; + } + + /* + Specifying nextDayThreshold signals that all-day ranges should be sliced. + */ + function sliceEventStore( + eventStore, + eventUiBases, + framingRange, + nextDayThreshold + ) { + var inverseBgByGroupId = {}; + var inverseBgByDefId = {}; + var defByGroupId = {}; + var bgRanges = []; + var fgRanges = []; + var eventUis = compileEventUis(eventStore.defs, eventUiBases); + for (var defId in eventStore.defs) { + var def = eventStore.defs[defId]; + var ui = eventUis[def.defId]; + if (ui.display === "inverse-background") { + if (def.groupId) { + inverseBgByGroupId[def.groupId] = []; + if (!defByGroupId[def.groupId]) { + defByGroupId[def.groupId] = def; + } + } else { + inverseBgByDefId[defId] = []; + } + } + } + for (var instanceId in eventStore.instances) { + var instance = eventStore.instances[instanceId]; + var def = eventStore.defs[instance.defId]; + var ui = eventUis[def.defId]; + var origRange = instance.range; + var normalRange = + !def.allDay && nextDayThreshold + ? computeVisibleDayRange(origRange, nextDayThreshold) + : origRange; + var slicedRange = intersectRanges(normalRange, framingRange); + if (slicedRange) { + if (ui.display === "inverse-background") { + if (def.groupId) { + inverseBgByGroupId[def.groupId].push(slicedRange); + } else { + inverseBgByDefId[instance.defId].push(slicedRange); + } + } else if (ui.display !== "none") { + (ui.display === "background" ? bgRanges : fgRanges).push({ + def: def, + ui: ui, + instance: instance, + range: slicedRange, + isStart: + normalRange.start && + normalRange.start.valueOf() === slicedRange.start.valueOf(), + isEnd: + normalRange.end && + normalRange.end.valueOf() === slicedRange.end.valueOf(), + }); + } + } + } + for (var groupId in inverseBgByGroupId) { + // BY GROUP + var ranges = inverseBgByGroupId[groupId]; + var invertedRanges = invertRanges(ranges, framingRange); + for ( + var _i = 0, invertedRanges_1 = invertedRanges; + _i < invertedRanges_1.length; + _i++ + ) { + var invertedRange = invertedRanges_1[_i]; + var def = defByGroupId[groupId]; + var ui = eventUis[def.defId]; + bgRanges.push({ + def: def, + ui: ui, + instance: null, + range: invertedRange, + isStart: false, + isEnd: false, + }); + } + } + for (var defId in inverseBgByDefId) { + var ranges = inverseBgByDefId[defId]; + var invertedRanges = invertRanges(ranges, framingRange); + for ( + var _a = 0, invertedRanges_2 = invertedRanges; + _a < invertedRanges_2.length; + _a++ + ) { + var invertedRange = invertedRanges_2[_a]; + bgRanges.push({ + def: eventStore.defs[defId], + ui: eventUis[defId], + instance: null, + range: invertedRange, + isStart: false, + isEnd: false, + }); + } + } + return { bg: bgRanges, fg: fgRanges }; + } + function hasBgRendering(def) { + return ( + def.ui.display === "background" || def.ui.display === "inverse-background" + ); + } + function setElSeg(el, seg) { + el.fcSeg = seg; + } + function getElSeg(el) { + return ( + el.fcSeg || + el.parentNode.fcSeg || // for the harness + null + ); + } + // event ui computation + function compileEventUis(eventDefs, eventUiBases) { + return mapHash(eventDefs, function (eventDef) { + return compileEventUi(eventDef, eventUiBases); + }); + } + function compileEventUi(eventDef, eventUiBases) { + var uis = []; + if (eventUiBases[""]) { + uis.push(eventUiBases[""]); + } + if (eventUiBases[eventDef.defId]) { + uis.push(eventUiBases[eventDef.defId]); + } + uis.push(eventDef.ui); + return combineEventUis(uis); + } + function sortEventSegs(segs, eventOrderSpecs) { + var objs = segs.map(buildSegCompareObj); + objs.sort(function (obj0, obj1) { + return compareByFieldSpecs(obj0, obj1, eventOrderSpecs); + }); + return objs.map(function (c) { + return c._seg; + }); + } + // returns a object with all primitive props that can be compared + function buildSegCompareObj(seg) { + var eventRange = seg.eventRange; + var eventDef = eventRange.def; + var range = eventRange.instance + ? eventRange.instance.range + : eventRange.range; + var start = range.start ? range.start.valueOf() : 0; // TODO: better support for open-range events + var end = range.end ? range.end.valueOf() : 0; // " + return __assign(__assign(__assign({}, eventDef.extendedProps), eventDef), { + id: eventDef.publicId, + start: start, + end: end, + duration: end - start, + allDay: Number(eventDef.allDay), + _seg: seg, + }); + } + function computeSegDraggable(seg, context) { + var pluginHooks = context.pluginHooks; + var transformers = pluginHooks.isDraggableTransformers; + var _a = seg.eventRange, + def = _a.def, + ui = _a.ui; + var val = ui.startEditable; + for ( + var _i = 0, transformers_1 = transformers; + _i < transformers_1.length; + _i++ + ) { + var transformer = transformers_1[_i]; + val = transformer(val, def, ui, context); + } + return val; + } + function computeSegStartResizable(seg, context) { + return ( + seg.isStart && + seg.eventRange.ui.durationEditable && + context.options.eventResizableFromStart + ); + } + function computeSegEndResizable(seg, context) { + return seg.isEnd && seg.eventRange.ui.durationEditable; + } + function buildSegTimeText( + seg, + timeFormat, + context, + defaultDisplayEventTime, // defaults to true + defaultDisplayEventEnd, // defaults to true + startOverride, + endOverride + ) { + var dateEnv = context.dateEnv, + options = context.options; + var displayEventTime = options.displayEventTime, + displayEventEnd = options.displayEventEnd; + var eventDef = seg.eventRange.def; + var eventInstance = seg.eventRange.instance; + if (displayEventTime == null) { + displayEventTime = defaultDisplayEventTime !== false; + } + if (displayEventEnd == null) { + displayEventEnd = defaultDisplayEventEnd !== false; + } + var wholeEventStart = eventInstance.range.start; + var wholeEventEnd = eventInstance.range.end; + var segStart = startOverride || seg.start || seg.eventRange.range.start; + var segEnd = endOverride || seg.end || seg.eventRange.range.end; + var isStartDay = + startOfDay(wholeEventStart).valueOf() === startOfDay(segStart).valueOf(); + var isEndDay = + startOfDay(addMs(wholeEventEnd, -1)).valueOf() === + startOfDay(addMs(segEnd, -1)).valueOf(); + if (displayEventTime && !eventDef.allDay && (isStartDay || isEndDay)) { + segStart = isStartDay ? wholeEventStart : segStart; + segEnd = isEndDay ? wholeEventEnd : segEnd; + if (displayEventEnd && eventDef.hasEnd) { + return dateEnv.formatRange(segStart, segEnd, timeFormat, { + forcedStartTzo: startOverride ? null : eventInstance.forcedStartTzo, + forcedEndTzo: endOverride ? null : eventInstance.forcedEndTzo, + }); + } + return dateEnv.format(segStart, timeFormat, { + forcedTzo: startOverride ? null : eventInstance.forcedStartTzo, // nooooo, same + }); + } + return ""; + } + function getSegMeta(seg, todayRange, nowDate) { + var segRange = seg.eventRange.range; + return { + isPast: segRange.end < (nowDate || todayRange.start), + isFuture: segRange.start >= (nowDate || todayRange.end), + isToday: todayRange && rangeContainsMarker(todayRange, segRange.start), + }; + } + function getEventClassNames(props) { + var classNames = ["fc-event"]; + if (props.isMirror) { + classNames.push("fc-event-mirror"); + } + if (props.isDraggable) { + classNames.push("fc-event-draggable"); + } + if (props.isStartResizable || props.isEndResizable) { + classNames.push("fc-event-resizable"); + } + if (props.isDragging) { + classNames.push("fc-event-dragging"); + } + if (props.isResizing) { + classNames.push("fc-event-resizing"); + } + if (props.isSelected) { + classNames.push("fc-event-selected"); + } + if (props.isStart) { + classNames.push("fc-event-start"); + } + if (props.isEnd) { + classNames.push("fc-event-end"); + } + if (props.isPast) { + classNames.push("fc-event-past"); + } + if (props.isToday) { + classNames.push("fc-event-today"); + } + if (props.isFuture) { + classNames.push("fc-event-future"); + } + return classNames; + } + function buildEventRangeKey(eventRange) { + return eventRange.instance + ? eventRange.instance.instanceId + : eventRange.def.defId + ":" + eventRange.range.start.toISOString(); + // inverse-background events don't have specific instances. TODO: better solution + } + function getSegAnchorAttrs(seg, context) { + var _a = seg.eventRange, + def = _a.def, + instance = _a.instance; + var url = def.url; + if (url) { + return { href: url }; + } + var emitter = context.emitter, + options = context.options; + var eventInteractive = options.eventInteractive; + if (eventInteractive == null) { + eventInteractive = def.interactive; + if (eventInteractive == null) { + eventInteractive = Boolean(emitter.hasHandlers("eventClick")); + } + } + // mock what happens in EventClicking + if (eventInteractive) { + // only attach keyboard-related handlers because click handler is already done in EventClicking + return createAriaKeyboardAttrs(function (ev) { + emitter.trigger("eventClick", { + el: ev.target, + event: new EventApi(context, def, instance), + jsEvent: ev, + view: context.viewApi, + }); + }); + } + return {}; + } + + var STANDARD_PROPS = { + start: identity, + end: identity, + allDay: Boolean, + }; + function parseDateSpan(raw, dateEnv, defaultDuration) { + var span = parseOpenDateSpan(raw, dateEnv); + var range = span.range; + if (!range.start) { + return null; + } + if (!range.end) { + if (defaultDuration == null) { + return null; + } + range.end = dateEnv.add(range.start, defaultDuration); + } + return span; + } + /* + TODO: somehow combine with parseRange? + Will return null if the start/end props were present but parsed invalidly. + */ + function parseOpenDateSpan(raw, dateEnv) { + var _a = refineProps(raw, STANDARD_PROPS), + standardProps = _a.refined, + extra = _a.extra; + var startMeta = standardProps.start + ? dateEnv.createMarkerMeta(standardProps.start) + : null; + var endMeta = standardProps.end + ? dateEnv.createMarkerMeta(standardProps.end) + : null; + var allDay = standardProps.allDay; + if (allDay == null) { + allDay = + startMeta && + startMeta.isTimeUnspecified && + (!endMeta || endMeta.isTimeUnspecified); + } + return __assign( + { + range: { + start: startMeta ? startMeta.marker : null, + end: endMeta ? endMeta.marker : null, + }, + allDay: allDay, + }, + extra + ); + } + function isDateSpansEqual(span0, span1) { + return ( + rangesEqual(span0.range, span1.range) && + span0.allDay === span1.allDay && + isSpanPropsEqual(span0, span1) + ); + } + // the NON-DATE-RELATED props + function isSpanPropsEqual(span0, span1) { + for (var propName in span1) { + if (propName !== "range" && propName !== "allDay") { + if (span0[propName] !== span1[propName]) { + return false; + } + } + } + // are there any props that span0 has that span1 DOESN'T have? + // both have range/allDay, so no need to special-case. + for (var propName in span0) { + if (!(propName in span1)) { + return false; + } + } + return true; + } + function buildDateSpanApi(span, dateEnv) { + return __assign( + __assign({}, buildRangeApi(span.range, dateEnv, span.allDay)), + { allDay: span.allDay } + ); + } + function buildRangeApiWithTimeZone(range, dateEnv, omitTime) { + return __assign(__assign({}, buildRangeApi(range, dateEnv, omitTime)), { + timeZone: dateEnv.timeZone, + }); + } + function buildRangeApi(range, dateEnv, omitTime) { + return { + start: dateEnv.toDate(range.start), + end: dateEnv.toDate(range.end), + startStr: dateEnv.formatIso(range.start, { omitTime: omitTime }), + endStr: dateEnv.formatIso(range.end, { omitTime: omitTime }), + }; + } + function fabricateEventRange(dateSpan, eventUiBases, context) { + var res = refineEventDef({ editable: false }, context); + var def = parseEventDef( + res.refined, + res.extra, + "", // sourceId + dateSpan.allDay, + true, // hasEnd + context + ); + return { + def: def, + ui: compileEventUi(def, eventUiBases), + instance: createEventInstance(def.defId, dateSpan.range), + range: dateSpan.range, + isStart: true, + isEnd: true, + }; + } + + function triggerDateSelect(selection, pev, context) { + context.emitter.trigger( + "select", + __assign(__assign({}, buildDateSpanApiWithContext(selection, context)), { + jsEvent: pev ? pev.origEvent : null, + view: context.viewApi || context.calendarApi.view, + }) + ); + } + function triggerDateUnselect(pev, context) { + context.emitter.trigger("unselect", { + jsEvent: pev ? pev.origEvent : null, + view: context.viewApi || context.calendarApi.view, + }); + } + function buildDateSpanApiWithContext(dateSpan, context) { + var props = {}; + for ( + var _i = 0, _a = context.pluginHooks.dateSpanTransforms; + _i < _a.length; + _i++ + ) { + var transform = _a[_i]; + __assign(props, transform(dateSpan, context)); + } + __assign(props, buildDateSpanApi(dateSpan, context.dateEnv)); + return props; + } + // Given an event's allDay status and start date, return what its fallback end date should be. + // TODO: rename to computeDefaultEventEnd + function getDefaultEventEnd(allDay, marker, context) { + var dateEnv = context.dateEnv, + options = context.options; + var end = marker; + if (allDay) { + end = startOfDay(end); + end = dateEnv.add(end, options.defaultAllDayEventDuration); + } else { + end = dateEnv.add(end, options.defaultTimedEventDuration); + } + return end; + } + + // applies the mutation to ALL defs/instances within the event store + function applyMutationToEventStore( + eventStore, + eventConfigBase, + mutation, + context + ) { + var eventConfigs = compileEventUis(eventStore.defs, eventConfigBase); + var dest = createEmptyEventStore(); + for (var defId in eventStore.defs) { + var def = eventStore.defs[defId]; + dest.defs[defId] = applyMutationToEventDef( + def, + eventConfigs[defId], + mutation, + context + ); + } + for (var instanceId in eventStore.instances) { + var instance = eventStore.instances[instanceId]; + var def = dest.defs[instance.defId]; // important to grab the newly modified def + dest.instances[instanceId] = applyMutationToEventInstance( + instance, + def, + eventConfigs[instance.defId], + mutation, + context + ); + } + return dest; + } + function applyMutationToEventDef(eventDef, eventConfig, mutation, context) { + var standardProps = mutation.standardProps || {}; + // if hasEnd has not been specified, guess a good value based on deltas. + // if duration will change, there's no way the default duration will persist, + // and thus, we need to mark the event as having a real end + if ( + standardProps.hasEnd == null && + eventConfig.durationEditable && + (mutation.startDelta || mutation.endDelta) + ) { + standardProps.hasEnd = true; // TODO: is this mutation okay? + } + var copy = __assign(__assign(__assign({}, eventDef), standardProps), { + ui: __assign(__assign({}, eventDef.ui), standardProps.ui), + }); + if (mutation.extendedProps) { + copy.extendedProps = __assign( + __assign({}, copy.extendedProps), + mutation.extendedProps + ); + } + for ( + var _i = 0, _a = context.pluginHooks.eventDefMutationAppliers; + _i < _a.length; + _i++ + ) { + var applier = _a[_i]; + applier(copy, mutation, context); + } + if (!copy.hasEnd && context.options.forceEventDuration) { + copy.hasEnd = true; + } + return copy; + } + function applyMutationToEventInstance( + eventInstance, + eventDef, // must first be modified by applyMutationToEventDef + eventConfig, + mutation, + context + ) { + var dateEnv = context.dateEnv; + var forceAllDay = + mutation.standardProps && mutation.standardProps.allDay === true; + var clearEnd = + mutation.standardProps && mutation.standardProps.hasEnd === false; + var copy = __assign({}, eventInstance); + if (forceAllDay) { + copy.range = computeAlignedDayRange(copy.range); + } + if (mutation.datesDelta && eventConfig.startEditable) { + copy.range = { + start: dateEnv.add(copy.range.start, mutation.datesDelta), + end: dateEnv.add(copy.range.end, mutation.datesDelta), + }; + } + if (mutation.startDelta && eventConfig.durationEditable) { + copy.range = { + start: dateEnv.add(copy.range.start, mutation.startDelta), + end: copy.range.end, + }; + } + if (mutation.endDelta && eventConfig.durationEditable) { + copy.range = { + start: copy.range.start, + end: dateEnv.add(copy.range.end, mutation.endDelta), + }; + } + if (clearEnd) { + copy.range = { + start: copy.range.start, + end: getDefaultEventEnd(eventDef.allDay, copy.range.start, context), + }; + } + // in case event was all-day but the supplied deltas were not + // better util for this? + if (eventDef.allDay) { + copy.range = { + start: startOfDay(copy.range.start), + end: startOfDay(copy.range.end), + }; + } + // handle invalid durations + if (copy.range.end < copy.range.start) { + copy.range.end = getDefaultEventEnd( + eventDef.allDay, + copy.range.start, + context + ); + } + return copy; + } + + // no public types yet. when there are, export from: + // import {} from './api-type-deps' + var ViewApi = /** @class */ (function () { + function ViewApi(type, getCurrentData, dateEnv) { + this.type = type; + this.getCurrentData = getCurrentData; + this.dateEnv = dateEnv; + } + Object.defineProperty(ViewApi.prototype, "calendar", { + get: function () { + return this.getCurrentData().calendarApi; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(ViewApi.prototype, "title", { + get: function () { + return this.getCurrentData().viewTitle; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(ViewApi.prototype, "activeStart", { + get: function () { + return this.dateEnv.toDate( + this.getCurrentData().dateProfile.activeRange.start + ); + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(ViewApi.prototype, "activeEnd", { + get: function () { + return this.dateEnv.toDate( + this.getCurrentData().dateProfile.activeRange.end + ); + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(ViewApi.prototype, "currentStart", { + get: function () { + return this.dateEnv.toDate( + this.getCurrentData().dateProfile.currentRange.start + ); + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(ViewApi.prototype, "currentEnd", { + get: function () { + return this.dateEnv.toDate( + this.getCurrentData().dateProfile.currentRange.end + ); + }, + enumerable: false, + configurable: true, + }); + ViewApi.prototype.getOption = function (name) { + return this.getCurrentData().options[name]; // are the view-specific options + }; + return ViewApi; + })(); + + var EVENT_SOURCE_REFINERS$1 = { + id: String, + defaultAllDay: Boolean, + url: String, + format: String, + events: identity, + eventDataTransform: identity, + // for any network-related sources + success: identity, + failure: identity, + }; + function parseEventSource(raw, context, refiners) { + if (refiners === void 0) { + refiners = buildEventSourceRefiners(context); + } + var rawObj; + if (typeof raw === "string") { + rawObj = { url: raw }; + } else if (typeof raw === "function" || Array.isArray(raw)) { + rawObj = { events: raw }; + } else if (typeof raw === "object" && raw) { + // not null + rawObj = raw; + } + if (rawObj) { + var _a = refineProps(rawObj, refiners), + refined = _a.refined, + extra = _a.extra; + var metaRes = buildEventSourceMeta(refined, context); + if (metaRes) { + return { + _raw: raw, + isFetching: false, + latestFetchId: "", + fetchRange: null, + defaultAllDay: refined.defaultAllDay, + eventDataTransform: refined.eventDataTransform, + success: refined.success, + failure: refined.failure, + publicId: refined.id || "", + sourceId: guid(), + sourceDefId: metaRes.sourceDefId, + meta: metaRes.meta, + ui: createEventUi(refined, context), + extendedProps: extra, + }; + } + } + return null; + } + function buildEventSourceRefiners(context) { + return __assign( + __assign(__assign({}, EVENT_UI_REFINERS), EVENT_SOURCE_REFINERS$1), + context.pluginHooks.eventSourceRefiners + ); + } + function buildEventSourceMeta(raw, context) { + var defs = context.pluginHooks.eventSourceDefs; + for (var i = defs.length - 1; i >= 0; i -= 1) { + // later-added plugins take precedence + var def = defs[i]; + var meta = def.parseMeta(raw); + if (meta) { + return { sourceDefId: i, meta: meta }; + } + } + return null; + } + + function reduceCurrentDate(currentDate, action) { + switch (action.type) { + case "CHANGE_DATE": + return action.dateMarker; + default: + return currentDate; + } + } + function getInitialDate(options, dateEnv) { + var initialDateInput = options.initialDate; + // compute the initial ambig-timezone date + if (initialDateInput != null) { + return dateEnv.createMarker(initialDateInput); + } + return getNow(options.now, dateEnv); // getNow already returns unzoned + } + function getNow(nowInput, dateEnv) { + if (typeof nowInput === "function") { + nowInput = nowInput(); + } + if (nowInput == null) { + return dateEnv.createNowMarker(); + } + return dateEnv.createMarker(nowInput); + } + + var CalendarApi = /** @class */ (function () { + function CalendarApi() {} + CalendarApi.prototype.getCurrentData = function () { + return this.currentDataManager.getCurrentData(); + }; + CalendarApi.prototype.dispatch = function (action) { + return this.currentDataManager.dispatch(action); + }; + Object.defineProperty(CalendarApi.prototype, "view", { + get: function () { + return this.getCurrentData().viewApi; + }, // for public API + enumerable: false, + configurable: true, + }); + CalendarApi.prototype.batchRendering = function (callback) { + callback(); + }; + CalendarApi.prototype.updateSize = function () { + this.trigger("_resize", true); + }; + // Options + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.setOption = function (name, val) { + this.dispatch({ + type: "SET_OPTION", + optionName: name, + rawOptionValue: val, + }); + }; + CalendarApi.prototype.getOption = function (name) { + return this.currentDataManager.currentCalendarOptionsInput[name]; + }; + CalendarApi.prototype.getAvailableLocaleCodes = function () { + return Object.keys(this.getCurrentData().availableRawLocales); + }; + // Trigger + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.on = function (handlerName, handler) { + var currentDataManager = this.currentDataManager; + if (currentDataManager.currentCalendarOptionsRefiners[handlerName]) { + currentDataManager.emitter.on(handlerName, handler); + } else { + console.warn("Unknown listener name '" + handlerName + "'"); + } + }; + CalendarApi.prototype.off = function (handlerName, handler) { + this.currentDataManager.emitter.off(handlerName, handler); + }; + // not meant for public use + CalendarApi.prototype.trigger = function (handlerName) { + var _a; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + (_a = this.currentDataManager.emitter).trigger.apply( + _a, + __spreadArray([handlerName], args) + ); + }; + // View + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.changeView = function (viewType, dateOrRange) { + var _this = this; + this.batchRendering(function () { + _this.unselect(); + if (dateOrRange) { + if (dateOrRange.start && dateOrRange.end) { + // a range + _this.dispatch({ + type: "CHANGE_VIEW_TYPE", + viewType: viewType, + }); + _this.dispatch({ + type: "SET_OPTION", + optionName: "visibleRange", + rawOptionValue: dateOrRange, + }); + } else { + var dateEnv = _this.getCurrentData().dateEnv; + _this.dispatch({ + type: "CHANGE_VIEW_TYPE", + viewType: viewType, + dateMarker: dateEnv.createMarker(dateOrRange), + }); + } + } else { + _this.dispatch({ + type: "CHANGE_VIEW_TYPE", + viewType: viewType, + }); + } + }); + }; + // Forces navigation to a view for the given date. + // `viewType` can be a specific view name or a generic one like "week" or "day". + // needs to change + CalendarApi.prototype.zoomTo = function (dateMarker, viewType) { + var state = this.getCurrentData(); + var spec; + viewType = viewType || "day"; // day is default zoom + spec = state.viewSpecs[viewType] || this.getUnitViewSpec(viewType); + this.unselect(); + if (spec) { + this.dispatch({ + type: "CHANGE_VIEW_TYPE", + viewType: spec.type, + dateMarker: dateMarker, + }); + } else { + this.dispatch({ + type: "CHANGE_DATE", + dateMarker: dateMarker, + }); + } + }; + // Given a duration singular unit, like "week" or "day", finds a matching view spec. + // Preference is given to views that have corresponding buttons. + CalendarApi.prototype.getUnitViewSpec = function (unit) { + var _a = this.getCurrentData(), + viewSpecs = _a.viewSpecs, + toolbarConfig = _a.toolbarConfig; + var viewTypes = [].concat( + toolbarConfig.header ? toolbarConfig.header.viewsWithButtons : [], + toolbarConfig.footer ? toolbarConfig.footer.viewsWithButtons : [] + ); + var i; + var spec; + for (var viewType in viewSpecs) { + viewTypes.push(viewType); + } + for (i = 0; i < viewTypes.length; i += 1) { + spec = viewSpecs[viewTypes[i]]; + if (spec) { + if (spec.singleUnit === unit) { + return spec; + } + } + } + return null; + }; + // Current Date + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.prev = function () { + this.unselect(); + this.dispatch({ type: "PREV" }); + }; + CalendarApi.prototype.next = function () { + this.unselect(); + this.dispatch({ type: "NEXT" }); + }; + CalendarApi.prototype.prevYear = function () { + var state = this.getCurrentData(); + this.unselect(); + this.dispatch({ + type: "CHANGE_DATE", + dateMarker: state.dateEnv.addYears(state.currentDate, -1), + }); + }; + CalendarApi.prototype.nextYear = function () { + var state = this.getCurrentData(); + this.unselect(); + this.dispatch({ + type: "CHANGE_DATE", + dateMarker: state.dateEnv.addYears(state.currentDate, 1), + }); + }; + CalendarApi.prototype.today = function () { + var state = this.getCurrentData(); + this.unselect(); + this.dispatch({ + type: "CHANGE_DATE", + dateMarker: getNow(state.calendarOptions.now, state.dateEnv), + }); + }; + CalendarApi.prototype.gotoDate = function (zonedDateInput) { + var state = this.getCurrentData(); + this.unselect(); + this.dispatch({ + type: "CHANGE_DATE", + dateMarker: state.dateEnv.createMarker(zonedDateInput), + }); + }; + CalendarApi.prototype.incrementDate = function (deltaInput) { + var state = this.getCurrentData(); + var delta = createDuration(deltaInput); + if (delta) { + // else, warn about invalid input? + this.unselect(); + this.dispatch({ + type: "CHANGE_DATE", + dateMarker: state.dateEnv.add(state.currentDate, delta), + }); + } + }; + // for external API + CalendarApi.prototype.getDate = function () { + var state = this.getCurrentData(); + return state.dateEnv.toDate(state.currentDate); + }; + // Date Formatting Utils + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.formatDate = function (d, formatter) { + var dateEnv = this.getCurrentData().dateEnv; + return dateEnv.format( + dateEnv.createMarker(d), + createFormatter(formatter) + ); + }; + // `settings` is for formatter AND isEndExclusive + CalendarApi.prototype.formatRange = function (d0, d1, settings) { + var dateEnv = this.getCurrentData().dateEnv; + return dateEnv.formatRange( + dateEnv.createMarker(d0), + dateEnv.createMarker(d1), + createFormatter(settings), + settings + ); + }; + CalendarApi.prototype.formatIso = function (d, omitTime) { + var dateEnv = this.getCurrentData().dateEnv; + return dateEnv.formatIso(dateEnv.createMarker(d), { omitTime: omitTime }); + }; + // Date Selection / Event Selection / DayClick + // ----------------------------------------------------------------------------------------------------------------- + // this public method receives start/end dates in any format, with any timezone + // NOTE: args were changed from v3 + CalendarApi.prototype.select = function (dateOrObj, endDate) { + var selectionInput; + if (endDate == null) { + if (dateOrObj.start != null) { + selectionInput = dateOrObj; + } else { + selectionInput = { + start: dateOrObj, + end: null, + }; + } + } else { + selectionInput = { + start: dateOrObj, + end: endDate, + }; + } + var state = this.getCurrentData(); + var selection = parseDateSpan( + selectionInput, + state.dateEnv, + createDuration({ days: 1 }) + ); + if (selection) { + // throw parse error otherwise? + this.dispatch({ type: "SELECT_DATES", selection: selection }); + triggerDateSelect(selection, null, state); + } + }; + // public method + CalendarApi.prototype.unselect = function (pev) { + var state = this.getCurrentData(); + if (state.dateSelection) { + this.dispatch({ type: "UNSELECT_DATES" }); + triggerDateUnselect(pev, state); + } + }; + // Public Events API + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.addEvent = function (eventInput, sourceInput) { + if (eventInput instanceof EventApi) { + var def = eventInput._def; + var instance = eventInput._instance; + var currentData = this.getCurrentData(); + // not already present? don't want to add an old snapshot + if (!currentData.eventStore.defs[def.defId]) { + this.dispatch({ + type: "ADD_EVENTS", + eventStore: eventTupleToStore({ def: def, instance: instance }), // TODO: better util for two args? + }); + this.triggerEventAdd(eventInput); + } + return eventInput; + } + var state = this.getCurrentData(); + var eventSource; + if (sourceInput instanceof EventSourceApi) { + eventSource = sourceInput.internalEventSource; + } else if (typeof sourceInput === "boolean") { + if (sourceInput) { + // true. part of the first event source + eventSource = hashValuesToArray(state.eventSources)[0]; + } + } else if (sourceInput != null) { + // an ID. accepts a number too + var sourceApi = this.getEventSourceById(sourceInput); // TODO: use an internal function + if (!sourceApi) { + console.warn( + 'Could not find an event source with ID "' + sourceInput + '"' + ); // TODO: test + return null; + } + eventSource = sourceApi.internalEventSource; + } + var tuple = parseEvent(eventInput, eventSource, state, false); + if (tuple) { + var newEventApi = new EventApi( + state, + tuple.def, + tuple.def.recurringDef ? null : tuple.instance + ); + this.dispatch({ + type: "ADD_EVENTS", + eventStore: eventTupleToStore(tuple), + }); + this.triggerEventAdd(newEventApi); + return newEventApi; + } + return null; + }; + CalendarApi.prototype.triggerEventAdd = function (eventApi) { + var _this = this; + var emitter = this.getCurrentData().emitter; + emitter.trigger("eventAdd", { + event: eventApi, + relatedEvents: [], + revert: function () { + _this.dispatch({ + type: "REMOVE_EVENTS", + eventStore: eventApiToStore(eventApi), + }); + }, + }); + }; + // TODO: optimize + CalendarApi.prototype.getEventById = function (id) { + var state = this.getCurrentData(); + var _a = state.eventStore, + defs = _a.defs, + instances = _a.instances; + id = String(id); + for (var defId in defs) { + var def = defs[defId]; + if (def.publicId === id) { + if (def.recurringDef) { + return new EventApi(state, def, null); + } + for (var instanceId in instances) { + var instance = instances[instanceId]; + if (instance.defId === def.defId) { + return new EventApi(state, def, instance); + } + } + } + } + return null; + }; + CalendarApi.prototype.getEvents = function () { + var currentData = this.getCurrentData(); + return buildEventApis(currentData.eventStore, currentData); + }; + CalendarApi.prototype.removeAllEvents = function () { + this.dispatch({ type: "REMOVE_ALL_EVENTS" }); + }; + // Public Event Sources API + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.getEventSources = function () { + var state = this.getCurrentData(); + var sourceHash = state.eventSources; + var sourceApis = []; + for (var internalId in sourceHash) { + sourceApis.push(new EventSourceApi(state, sourceHash[internalId])); + } + return sourceApis; + }; + CalendarApi.prototype.getEventSourceById = function (id) { + var state = this.getCurrentData(); + var sourceHash = state.eventSources; + id = String(id); + for (var sourceId in sourceHash) { + if (sourceHash[sourceId].publicId === id) { + return new EventSourceApi(state, sourceHash[sourceId]); + } + } + return null; + }; + CalendarApi.prototype.addEventSource = function (sourceInput) { + var state = this.getCurrentData(); + if (sourceInput instanceof EventSourceApi) { + // not already present? don't want to add an old snapshot + if (!state.eventSources[sourceInput.internalEventSource.sourceId]) { + this.dispatch({ + type: "ADD_EVENT_SOURCES", + sources: [sourceInput.internalEventSource], + }); + } + return sourceInput; + } + var eventSource = parseEventSource(sourceInput, state); + if (eventSource) { + // TODO: error otherwise? + this.dispatch({ type: "ADD_EVENT_SOURCES", sources: [eventSource] }); + return new EventSourceApi(state, eventSource); + } + return null; + }; + CalendarApi.prototype.removeAllEventSources = function () { + this.dispatch({ type: "REMOVE_ALL_EVENT_SOURCES" }); + }; + CalendarApi.prototype.refetchEvents = function () { + this.dispatch({ type: "FETCH_EVENT_SOURCES", isRefetch: true }); + }; + // Scroll + // ----------------------------------------------------------------------------------------------------------------- + CalendarApi.prototype.scrollToTime = function (timeInput) { + var time = createDuration(timeInput); + if (time) { + this.trigger("_scrollRequest", { time: time }); + } + }; + return CalendarApi; + })(); + + var EventApi = /** @class */ (function () { + // instance will be null if expressing a recurring event that has no current instances, + // OR if trying to validate an incoming external event that has no dates assigned + function EventApi(context, def, instance) { + this._context = context; + this._def = def; + this._instance = instance || null; + } + /* + TODO: make event struct more responsible for this + */ + EventApi.prototype.setProp = function (name, val) { + var _a, _b; + if (name in EVENT_DATE_REFINERS) { + console.warn( + "Could not set date-related prop 'name'. Use one of the date-related methods instead." + ); + // TODO: make proper aliasing system? + } else if (name === "id") { + val = EVENT_NON_DATE_REFINERS[name](val); + this.mutate({ + standardProps: { publicId: val }, // hardcoded internal name + }); + } else if (name in EVENT_NON_DATE_REFINERS) { + val = EVENT_NON_DATE_REFINERS[name](val); + this.mutate({ + standardProps: ((_a = {}), (_a[name] = val), _a), + }); + } else if (name in EVENT_UI_REFINERS) { + var ui = EVENT_UI_REFINERS[name](val); + if (name === "color") { + ui = { backgroundColor: val, borderColor: val }; + } else if (name === "editable") { + ui = { startEditable: val, durationEditable: val }; + } else { + ui = ((_b = {}), (_b[name] = val), _b); + } + this.mutate({ + standardProps: { ui: ui }, + }); + } else { + console.warn( + "Could not set prop '" + name + "'. Use setExtendedProp instead." + ); + } + }; + EventApi.prototype.setExtendedProp = function (name, val) { + var _a; + this.mutate({ + extendedProps: ((_a = {}), (_a[name] = val), _a), + }); + }; + EventApi.prototype.setStart = function (startInput, options) { + if (options === void 0) { + options = {}; + } + var dateEnv = this._context.dateEnv; + var start = dateEnv.createMarker(startInput); + if (start && this._instance) { + // TODO: warning if parsed bad + var instanceRange = this._instance.range; + var startDelta = diffDates( + instanceRange.start, + start, + dateEnv, + options.granularity + ); // what if parsed bad!? + if (options.maintainDuration) { + this.mutate({ datesDelta: startDelta }); + } else { + this.mutate({ startDelta: startDelta }); + } + } + }; + EventApi.prototype.setEnd = function (endInput, options) { + if (options === void 0) { + options = {}; + } + var dateEnv = this._context.dateEnv; + var end; + if (endInput != null) { + end = dateEnv.createMarker(endInput); + if (!end) { + return; // TODO: warning if parsed bad + } + } + if (this._instance) { + if (end) { + var endDelta = diffDates( + this._instance.range.end, + end, + dateEnv, + options.granularity + ); + this.mutate({ endDelta: endDelta }); + } else { + this.mutate({ standardProps: { hasEnd: false } }); + } + } + }; + EventApi.prototype.setDates = function (startInput, endInput, options) { + if (options === void 0) { + options = {}; + } + var dateEnv = this._context.dateEnv; + var standardProps = { allDay: options.allDay }; + var start = dateEnv.createMarker(startInput); + var end; + if (!start) { + return; // TODO: warning if parsed bad + } + if (endInput != null) { + end = dateEnv.createMarker(endInput); + if (!end) { + // TODO: warning if parsed bad + return; + } + } + if (this._instance) { + var instanceRange = this._instance.range; + // when computing the diff for an event being converted to all-day, + // compute diff off of the all-day values the way event-mutation does. + if (options.allDay === true) { + instanceRange = computeAlignedDayRange(instanceRange); + } + var startDelta = diffDates( + instanceRange.start, + start, + dateEnv, + options.granularity + ); + if (end) { + var endDelta = diffDates( + instanceRange.end, + end, + dateEnv, + options.granularity + ); + if (durationsEqual(startDelta, endDelta)) { + this.mutate({ + datesDelta: startDelta, + standardProps: standardProps, + }); + } else { + this.mutate({ + startDelta: startDelta, + endDelta: endDelta, + standardProps: standardProps, + }); + } + } else { + // means "clear the end" + standardProps.hasEnd = false; + this.mutate({ datesDelta: startDelta, standardProps: standardProps }); + } + } + }; + EventApi.prototype.moveStart = function (deltaInput) { + var delta = createDuration(deltaInput); + if (delta) { + // TODO: warning if parsed bad + this.mutate({ startDelta: delta }); + } + }; + EventApi.prototype.moveEnd = function (deltaInput) { + var delta = createDuration(deltaInput); + if (delta) { + // TODO: warning if parsed bad + this.mutate({ endDelta: delta }); + } + }; + EventApi.prototype.moveDates = function (deltaInput) { + var delta = createDuration(deltaInput); + if (delta) { + // TODO: warning if parsed bad + this.mutate({ datesDelta: delta }); + } + }; + EventApi.prototype.setAllDay = function (allDay, options) { + if (options === void 0) { + options = {}; + } + var standardProps = { allDay: allDay }; + var maintainDuration = options.maintainDuration; + if (maintainDuration == null) { + maintainDuration = this._context.options.allDayMaintainDuration; + } + if (this._def.allDay !== allDay) { + standardProps.hasEnd = maintainDuration; + } + this.mutate({ standardProps: standardProps }); + }; + EventApi.prototype.formatRange = function (formatInput) { + var dateEnv = this._context.dateEnv; + var instance = this._instance; + var formatter = createFormatter(formatInput); + if (this._def.hasEnd) { + return dateEnv.formatRange( + instance.range.start, + instance.range.end, + formatter, + { + forcedStartTzo: instance.forcedStartTzo, + forcedEndTzo: instance.forcedEndTzo, + } + ); + } + return dateEnv.format(instance.range.start, formatter, { + forcedTzo: instance.forcedStartTzo, + }); + }; + EventApi.prototype.mutate = function (mutation) { + var instance = this._instance; + if (instance) { + var def = this._def; + var context_1 = this._context; + var eventStore_1 = context_1.getCurrentData().eventStore; + var relevantEvents = getRelevantEvents( + eventStore_1, + instance.instanceId + ); + var eventConfigBase = { + "": { + display: "", + startEditable: true, + durationEditable: true, + constraints: [], + overlap: null, + allows: [], + backgroundColor: "", + borderColor: "", + textColor: "", + classNames: [], + }, + }; + relevantEvents = applyMutationToEventStore( + relevantEvents, + eventConfigBase, + mutation, + context_1 + ); + var oldEvent = new EventApi(context_1, def, instance); // snapshot + this._def = relevantEvents.defs[def.defId]; + this._instance = relevantEvents.instances[instance.instanceId]; + context_1.dispatch({ + type: "MERGE_EVENTS", + eventStore: relevantEvents, + }); + context_1.emitter.trigger("eventChange", { + oldEvent: oldEvent, + event: this, + relatedEvents: buildEventApis(relevantEvents, context_1, instance), + revert: function () { + context_1.dispatch({ + type: "RESET_EVENTS", + eventStore: eventStore_1, + }); + }, + }); + } + }; + EventApi.prototype.remove = function () { + var context = this._context; + var asStore = eventApiToStore(this); + context.dispatch({ + type: "REMOVE_EVENTS", + eventStore: asStore, + }); + context.emitter.trigger("eventRemove", { + event: this, + relatedEvents: [], + revert: function () { + context.dispatch({ + type: "MERGE_EVENTS", + eventStore: asStore, + }); + }, + }); + }; + Object.defineProperty(EventApi.prototype, "source", { + get: function () { + var sourceId = this._def.sourceId; + if (sourceId) { + return new EventSourceApi( + this._context, + this._context.getCurrentData().eventSources[sourceId] + ); + } + return null; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "start", { + get: function () { + return this._instance + ? this._context.dateEnv.toDate(this._instance.range.start) + : null; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "end", { + get: function () { + return this._instance && this._def.hasEnd + ? this._context.dateEnv.toDate(this._instance.range.end) + : null; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "startStr", { + get: function () { + var instance = this._instance; + if (instance) { + return this._context.dateEnv.formatIso(instance.range.start, { + omitTime: this._def.allDay, + forcedTzo: instance.forcedStartTzo, + }); + } + return ""; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "endStr", { + get: function () { + var instance = this._instance; + if (instance && this._def.hasEnd) { + return this._context.dateEnv.formatIso(instance.range.end, { + omitTime: this._def.allDay, + forcedTzo: instance.forcedEndTzo, + }); + } + return ""; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "id", { + // computable props that all access the def + // TODO: find a TypeScript-compatible way to do this at scale + get: function () { + return this._def.publicId; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "groupId", { + get: function () { + return this._def.groupId; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "allDay", { + get: function () { + return this._def.allDay; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "title", { + get: function () { + return this._def.title; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "url", { + get: function () { + return this._def.url; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "display", { + get: function () { + return this._def.ui.display || "auto"; + }, // bad. just normalize the type earlier + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "startEditable", { + get: function () { + return this._def.ui.startEditable; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "durationEditable", { + get: function () { + return this._def.ui.durationEditable; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "constraint", { + get: function () { + return this._def.ui.constraints[0] || null; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "overlap", { + get: function () { + return this._def.ui.overlap; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "allow", { + get: function () { + return this._def.ui.allows[0] || null; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "backgroundColor", { + get: function () { + return this._def.ui.backgroundColor; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "borderColor", { + get: function () { + return this._def.ui.borderColor; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "textColor", { + get: function () { + return this._def.ui.textColor; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "classNames", { + // NOTE: user can't modify these because Object.freeze was called in event-def parsing + get: function () { + return this._def.ui.classNames; + }, + enumerable: false, + configurable: true, + }); + Object.defineProperty(EventApi.prototype, "extendedProps", { + get: function () { + return this._def.extendedProps; + }, + enumerable: false, + configurable: true, + }); + EventApi.prototype.toPlainObject = function (settings) { + if (settings === void 0) { + settings = {}; + } + var def = this._def; + var ui = def.ui; + var _a = this, + startStr = _a.startStr, + endStr = _a.endStr; + var res = {}; + if (def.title) { + res.title = def.title; + } + if (startStr) { + res.start = startStr; + } + if (endStr) { + res.end = endStr; + } + if (def.publicId) { + res.id = def.publicId; + } + if (def.groupId) { + res.groupId = def.groupId; + } + if (def.url) { + res.url = def.url; + } + if (ui.display && ui.display !== "auto") { + res.display = ui.display; + } + // TODO: what about recurring-event properties??? + // TODO: include startEditable/durationEditable/constraint/overlap/allow + if ( + settings.collapseColor && + ui.backgroundColor && + ui.backgroundColor === ui.borderColor + ) { + res.color = ui.backgroundColor; + } else { + if (ui.backgroundColor) { + res.backgroundColor = ui.backgroundColor; + } + if (ui.borderColor) { + res.borderColor = ui.borderColor; + } + } + if (ui.textColor) { + res.textColor = ui.textColor; + } + if (ui.classNames.length) { + res.classNames = ui.classNames; + } + if (Object.keys(def.extendedProps).length) { + if (settings.collapseExtendedProps) { + __assign(res, def.extendedProps); + } else { + res.extendedProps = def.extendedProps; + } + } + return res; + }; + EventApi.prototype.toJSON = function () { + return this.toPlainObject(); + }; + return EventApi; + })(); + function eventApiToStore(eventApi) { + var _a, _b; + var def = eventApi._def; + var instance = eventApi._instance; + return { + defs: ((_a = {}), (_a[def.defId] = def), _a), + instances: instance + ? ((_b = {}), (_b[instance.instanceId] = instance), _b) + : {}, + }; + } + function buildEventApis(eventStore, context, excludeInstance) { + var defs = eventStore.defs, + instances = eventStore.instances; + var eventApis = []; + var excludeInstanceId = excludeInstance ? excludeInstance.instanceId : ""; + for (var id in instances) { + var instance = instances[id]; + var def = defs[instance.defId]; + if (instance.instanceId !== excludeInstanceId) { + eventApis.push(new EventApi(context, def, instance)); + } + } + return eventApis; + } + + var calendarSystemClassMap = {}; + function registerCalendarSystem(name, theClass) { + calendarSystemClassMap[name] = theClass; + } + function createCalendarSystem(name) { + return new calendarSystemClassMap[name](); + } + var GregorianCalendarSystem = /** @class */ (function () { + function GregorianCalendarSystem() {} + GregorianCalendarSystem.prototype.getMarkerYear = function (d) { + return d.getUTCFullYear(); + }; + GregorianCalendarSystem.prototype.getMarkerMonth = function (d) { + return d.getUTCMonth(); + }; + GregorianCalendarSystem.prototype.getMarkerDay = function (d) { + return d.getUTCDate(); + }; + GregorianCalendarSystem.prototype.arrayToMarker = function (arr) { + return arrayToUtcDate(arr); + }; + GregorianCalendarSystem.prototype.markerToArray = function (marker) { + return dateToUtcArray(marker); + }; + return GregorianCalendarSystem; + })(); + registerCalendarSystem("gregory", GregorianCalendarSystem); + + var ISO_RE = + /^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/; + function parse(str) { + var m = ISO_RE.exec(str); + if (m) { + var marker = new Date( + Date.UTC( + Number(m[1]), + m[3] ? Number(m[3]) - 1 : 0, + Number(m[5] || 1), + Number(m[7] || 0), + Number(m[8] || 0), + Number(m[10] || 0), + m[12] ? Number("0." + m[12]) * 1000 : 0 + ) + ); + if (isValidDate(marker)) { + var timeZoneOffset = null; + if (m[13]) { + timeZoneOffset = + (m[15] === "-" ? -1 : 1) * + (Number(m[16] || 0) * 60 + Number(m[18] || 0)); + } + return { + marker: marker, + isTimeUnspecified: !m[6], + timeZoneOffset: timeZoneOffset, + }; + } + } + return null; + } + + var DateEnv = /** @class */ (function () { + function DateEnv(settings) { + var timeZone = (this.timeZone = settings.timeZone); + var isNamedTimeZone = timeZone !== "local" && timeZone !== "UTC"; + if (settings.namedTimeZoneImpl && isNamedTimeZone) { + this.namedTimeZoneImpl = new settings.namedTimeZoneImpl(timeZone); + } + this.canComputeOffset = Boolean( + !isNamedTimeZone || this.namedTimeZoneImpl + ); + this.calendarSystem = createCalendarSystem(settings.calendarSystem); + this.locale = settings.locale; + this.weekDow = settings.locale.week.dow; + this.weekDoy = settings.locale.week.doy; + if (settings.weekNumberCalculation === "ISO") { + this.weekDow = 1; + this.weekDoy = 4; + } + if (typeof settings.firstDay === "number") { + this.weekDow = settings.firstDay; + } + if (typeof settings.weekNumberCalculation === "function") { + this.weekNumberFunc = settings.weekNumberCalculation; + } + this.weekText = + settings.weekText != null + ? settings.weekText + : settings.locale.options.weekText; + this.weekTextLong = + (settings.weekTextLong != null + ? settings.weekTextLong + : settings.locale.options.weekTextLong) || this.weekText; + this.cmdFormatter = settings.cmdFormatter; + this.defaultSeparator = settings.defaultSeparator; + } + // Creating / Parsing + DateEnv.prototype.createMarker = function (input) { + var meta = this.createMarkerMeta(input); + if (meta === null) { + return null; + } + return meta.marker; + }; + DateEnv.prototype.createNowMarker = function () { + if (this.canComputeOffset) { + return this.timestampToMarker(new Date().valueOf()); + } + // if we can't compute the current date val for a timezone, + // better to give the current local date vals than UTC + return arrayToUtcDate(dateToLocalArray(new Date())); + }; + DateEnv.prototype.createMarkerMeta = function (input) { + if (typeof input === "string") { + return this.parse(input); + } + var marker = null; + if (typeof input === "number") { + marker = this.timestampToMarker(input); + } else if (input instanceof Date) { + input = input.valueOf(); + if (!isNaN(input)) { + marker = this.timestampToMarker(input); + } + } else if (Array.isArray(input)) { + marker = arrayToUtcDate(input); + } + if (marker === null || !isValidDate(marker)) { + return null; + } + return { marker: marker, isTimeUnspecified: false, forcedTzo: null }; + }; + DateEnv.prototype.parse = function (s) { + var parts = parse(s); + if (parts === null) { + return null; + } + var marker = parts.marker; + var forcedTzo = null; + if (parts.timeZoneOffset !== null) { + if (this.canComputeOffset) { + marker = this.timestampToMarker( + marker.valueOf() - parts.timeZoneOffset * 60 * 1000 + ); + } else { + forcedTzo = parts.timeZoneOffset; + } + } + return { + marker: marker, + isTimeUnspecified: parts.isTimeUnspecified, + forcedTzo: forcedTzo, + }; + }; + // Accessors + DateEnv.prototype.getYear = function (marker) { + return this.calendarSystem.getMarkerYear(marker); + }; + DateEnv.prototype.getMonth = function (marker) { + return this.calendarSystem.getMarkerMonth(marker); + }; + // Adding / Subtracting + DateEnv.prototype.add = function (marker, dur) { + var a = this.calendarSystem.markerToArray(marker); + a[0] += dur.years; + a[1] += dur.months; + a[2] += dur.days; + a[6] += dur.milliseconds; + return this.calendarSystem.arrayToMarker(a); + }; + DateEnv.prototype.subtract = function (marker, dur) { + var a = this.calendarSystem.markerToArray(marker); + a[0] -= dur.years; + a[1] -= dur.months; + a[2] -= dur.days; + a[6] -= dur.milliseconds; + return this.calendarSystem.arrayToMarker(a); + }; + DateEnv.prototype.addYears = function (marker, n) { + var a = this.calendarSystem.markerToArray(marker); + a[0] += n; + return this.calendarSystem.arrayToMarker(a); + }; + DateEnv.prototype.addMonths = function (marker, n) { + var a = this.calendarSystem.markerToArray(marker); + a[1] += n; + return this.calendarSystem.arrayToMarker(a); + }; + // Diffing Whole Units + DateEnv.prototype.diffWholeYears = function (m0, m1) { + var calendarSystem = this.calendarSystem; + if ( + timeAsMs(m0) === timeAsMs(m1) && + calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) && + calendarSystem.getMarkerMonth(m0) === calendarSystem.getMarkerMonth(m1) + ) { + return ( + calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0) + ); + } + return null; + }; + DateEnv.prototype.diffWholeMonths = function (m0, m1) { + var calendarSystem = this.calendarSystem; + if ( + timeAsMs(m0) === timeAsMs(m1) && + calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) + ) { + return ( + calendarSystem.getMarkerMonth(m1) - + calendarSystem.getMarkerMonth(m0) + + (calendarSystem.getMarkerYear(m1) - + calendarSystem.getMarkerYear(m0)) * + 12 + ); + } + return null; + }; + // Range / Duration + DateEnv.prototype.greatestWholeUnit = function (m0, m1) { + var n = this.diffWholeYears(m0, m1); + if (n !== null) { + return { unit: "year", value: n }; + } + n = this.diffWholeMonths(m0, m1); + if (n !== null) { + return { unit: "month", value: n }; + } + n = diffWholeWeeks(m0, m1); + if (n !== null) { + return { unit: "week", value: n }; + } + n = diffWholeDays(m0, m1); + if (n !== null) { + return { unit: "day", value: n }; + } + n = diffHours(m0, m1); + if (isInt(n)) { + return { unit: "hour", value: n }; + } + n = diffMinutes(m0, m1); + if (isInt(n)) { + return { unit: "minute", value: n }; + } + n = diffSeconds(m0, m1); + if (isInt(n)) { + return { unit: "second", value: n }; + } + return { unit: "millisecond", value: m1.valueOf() - m0.valueOf() }; + }; + DateEnv.prototype.countDurationsBetween = function (m0, m1, d) { + // TODO: can use greatestWholeUnit + var diff; + if (d.years) { + diff = this.diffWholeYears(m0, m1); + if (diff !== null) { + return diff / asRoughYears(d); + } + } + if (d.months) { + diff = this.diffWholeMonths(m0, m1); + if (diff !== null) { + return diff / asRoughMonths(d); + } + } + if (d.days) { + diff = diffWholeDays(m0, m1); + if (diff !== null) { + return diff / asRoughDays(d); + } + } + return (m1.valueOf() - m0.valueOf()) / asRoughMs(d); + }; + // Start-Of + // these DON'T return zoned-dates. only UTC start-of dates + DateEnv.prototype.startOf = function (m, unit) { + if (unit === "year") { + return this.startOfYear(m); + } + if (unit === "month") { + return this.startOfMonth(m); + } + if (unit === "week") { + return this.startOfWeek(m); + } + if (unit === "day") { + return startOfDay(m); + } + if (unit === "hour") { + return startOfHour(m); + } + if (unit === "minute") { + return startOfMinute(m); + } + if (unit === "second") { + return startOfSecond(m); + } + return null; + }; + DateEnv.prototype.startOfYear = function (m) { + return this.calendarSystem.arrayToMarker([ + this.calendarSystem.getMarkerYear(m), + ]); + }; + DateEnv.prototype.startOfMonth = function (m) { + return this.calendarSystem.arrayToMarker([ + this.calendarSystem.getMarkerYear(m), + this.calendarSystem.getMarkerMonth(m), + ]); + }; + DateEnv.prototype.startOfWeek = function (m) { + return this.calendarSystem.arrayToMarker([ + this.calendarSystem.getMarkerYear(m), + this.calendarSystem.getMarkerMonth(m), + m.getUTCDate() - ((m.getUTCDay() - this.weekDow + 7) % 7), + ]); + }; + // Week Number + DateEnv.prototype.computeWeekNumber = function (marker) { + if (this.weekNumberFunc) { + return this.weekNumberFunc(this.toDate(marker)); + } + return weekOfYear(marker, this.weekDow, this.weekDoy); + }; + // TODO: choke on timeZoneName: long + DateEnv.prototype.format = function (marker, formatter, dateOptions) { + if (dateOptions === void 0) { + dateOptions = {}; + } + return formatter.format( + { + marker: marker, + timeZoneOffset: + dateOptions.forcedTzo != null + ? dateOptions.forcedTzo + : this.offsetForMarker(marker), + }, + this + ); + }; + DateEnv.prototype.formatRange = function ( + start, + end, + formatter, + dateOptions + ) { + if (dateOptions === void 0) { + dateOptions = {}; + } + if (dateOptions.isEndExclusive) { + end = addMs(end, -1); + } + return formatter.formatRange( + { + marker: start, + timeZoneOffset: + dateOptions.forcedStartTzo != null + ? dateOptions.forcedStartTzo + : this.offsetForMarker(start), + }, + { + marker: end, + timeZoneOffset: + dateOptions.forcedEndTzo != null + ? dateOptions.forcedEndTzo + : this.offsetForMarker(end), + }, + this, + dateOptions.defaultSeparator + ); + }; + /* + DUMB: the omitTime arg is dumb. if we omit the time, we want to omit the timezone offset. and if we do that, + might as well use buildIsoString or some other util directly + */ + DateEnv.prototype.formatIso = function (marker, extraOptions) { + if (extraOptions === void 0) { + extraOptions = {}; + } + var timeZoneOffset = null; + if (!extraOptions.omitTimeZoneOffset) { + if (extraOptions.forcedTzo != null) { + timeZoneOffset = extraOptions.forcedTzo; + } else { + timeZoneOffset = this.offsetForMarker(marker); + } + } + return buildIsoString(marker, timeZoneOffset, extraOptions.omitTime); + }; + // TimeZone + DateEnv.prototype.timestampToMarker = function (ms) { + if (this.timeZone === "local") { + return arrayToUtcDate(dateToLocalArray(new Date(ms))); + } + if (this.timeZone === "UTC" || !this.namedTimeZoneImpl) { + return new Date(ms); + } + return arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms)); + }; + DateEnv.prototype.offsetForMarker = function (m) { + if (this.timeZone === "local") { + return -arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset(); // convert "inverse" offset to "normal" offset + } + if (this.timeZone === "UTC") { + return 0; + } + if (this.namedTimeZoneImpl) { + return this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)); + } + return null; + }; + // Conversion + DateEnv.prototype.toDate = function (m, forcedTzo) { + if (this.timeZone === "local") { + return arrayToLocalDate(dateToUtcArray(m)); + } + if (this.timeZone === "UTC") { + return new Date(m.valueOf()); // make sure it's a copy + } + if (!this.namedTimeZoneImpl) { + return new Date(m.valueOf() - (forcedTzo || 0)); + } + return new Date( + m.valueOf() - + this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)) * 1000 * 60 + ); + }; + return DateEnv; + })(); + + var globalLocales = []; + + var MINIMAL_RAW_EN_LOCALE = { + code: "en", + week: { + dow: 0, + doy: 4, // 4 days need to be within the year to be considered the first week + }, + direction: "ltr", + buttonText: { + prev: "prev", + next: "next", + prevYear: "prev year", + nextYear: "next year", + year: "year", + today: "today", + month: "month", + week: "week", + day: "day", + list: "list", + }, + weekText: "W", + weekTextLong: "Week", + closeHint: "Close", + timeHint: "Time", + eventHint: "Event", + allDayText: "all-day", + moreLinkText: "more", + noEventsText: "No events to display", + }; + var RAW_EN_LOCALE = __assign(__assign({}, MINIMAL_RAW_EN_LOCALE), { + // Includes things we don't want other locales to inherit, + // things that derive from other translatable strings. + buttonHints: { + prev: "Previous $0", + next: "Next $0", + today: function (buttonText, unit) { + return unit === "day" ? "Today" : "This " + buttonText; + }, + }, + viewHint: "$0 view", + navLinkHint: "Go to $0", + moreLinkHint: function (eventCnt) { + return "Show " + eventCnt + " more event" + (eventCnt === 1 ? "" : "s"); + }, + }); + function organizeRawLocales(explicitRawLocales) { + var defaultCode = + explicitRawLocales.length > 0 ? explicitRawLocales[0].code : "en"; + var allRawLocales = globalLocales.concat(explicitRawLocales); + var rawLocaleMap = { + en: RAW_EN_LOCALE, + }; + for ( + var _i = 0, allRawLocales_1 = allRawLocales; + _i < allRawLocales_1.length; + _i++ + ) { + var rawLocale = allRawLocales_1[_i]; + rawLocaleMap[rawLocale.code] = rawLocale; + } + return { + map: rawLocaleMap, + defaultCode: defaultCode, + }; + } + function buildLocale(inputSingular, available) { + if (typeof inputSingular === "object" && !Array.isArray(inputSingular)) { + return parseLocale( + inputSingular.code, + [inputSingular.code], + inputSingular + ); + } + return queryLocale(inputSingular, available); + } + function queryLocale(codeArg, available) { + var codes = [].concat(codeArg || []); // will convert to array + var raw = queryRawLocale(codes, available) || RAW_EN_LOCALE; + return parseLocale(codeArg, codes, raw); + } + function queryRawLocale(codes, available) { + for (var i = 0; i < codes.length; i += 1) { + var parts = codes[i].toLocaleLowerCase().split("-"); + for (var j = parts.length; j > 0; j -= 1) { + var simpleId = parts.slice(0, j).join("-"); + if (available[simpleId]) { + return available[simpleId]; + } + } + } + return null; + } + function parseLocale(codeArg, codes, raw) { + var merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ["buttonText"]); + delete merged.code; // don't want this part of the options + var week = merged.week; + delete merged.week; + return { + codeArg: codeArg, + codes: codes, + week: week, + simpleNumberFormat: new Intl.NumberFormat(codeArg), + options: merged, + }; + } + + function formatDate(dateInput, options) { + if (options === void 0) { + options = {}; + } + var dateEnv = buildDateEnv$1(options); + var formatter = createFormatter(options); + var dateMeta = dateEnv.createMarkerMeta(dateInput); + if (!dateMeta) { + // TODO: warning? + return ""; + } + return dateEnv.format(dateMeta.marker, formatter, { + forcedTzo: dateMeta.forcedTzo, + }); + } + function formatRange(startInput, endInput, options) { + var dateEnv = buildDateEnv$1( + typeof options === "object" && options ? options : {} + ); // pass in if non-null object + var formatter = createFormatter(options); + var startMeta = dateEnv.createMarkerMeta(startInput); + var endMeta = dateEnv.createMarkerMeta(endInput); + if (!startMeta || !endMeta) { + // TODO: warning? + return ""; + } + return dateEnv.formatRange(startMeta.marker, endMeta.marker, formatter, { + forcedStartTzo: startMeta.forcedTzo, + forcedEndTzo: endMeta.forcedTzo, + isEndExclusive: options.isEndExclusive, + defaultSeparator: BASE_OPTION_DEFAULTS.defaultRangeSeparator, + }); + } + // TODO: more DRY and optimized + function buildDateEnv$1(settings) { + var locale = buildLocale( + settings.locale || "en", + organizeRawLocales([]).map + ); // TODO: don't hardcode 'en' everywhere + return new DateEnv( + __assign( + __assign( + { + timeZone: BASE_OPTION_DEFAULTS.timeZone, + calendarSystem: "gregory", + }, + settings + ), + { locale: locale } + ) + ); + } + + var DEF_DEFAULTS = { + startTime: "09:00", + endTime: "17:00", + daysOfWeek: [1, 2, 3, 4, 5], + display: "inverse-background", + classNames: "fc-non-business", + groupId: "_businessHours", // so multiple defs get grouped + }; + /* + TODO: pass around as EventDefHash!!! + */ + function parseBusinessHours(input, context) { + return parseEvents(refineInputs(input), null, context); + } + function refineInputs(input) { + var rawDefs; + if (input === true) { + rawDefs = [{}]; // will get DEF_DEFAULTS verbatim + } else if (Array.isArray(input)) { + // if specifying an array, every sub-definition NEEDS a day-of-week + rawDefs = input.filter(function (rawDef) { + return rawDef.daysOfWeek; + }); + } else if (typeof input === "object" && input) { + // non-null object + rawDefs = [input]; + } else { + // is probably false + rawDefs = []; + } + rawDefs = rawDefs.map(function (rawDef) { + return __assign(__assign({}, DEF_DEFAULTS), rawDef); + }); + return rawDefs; + } + + function pointInsideRect(point, rect) { + return ( + point.left >= rect.left && + point.left < rect.right && + point.top >= rect.top && + point.top < rect.bottom + ); + } + // 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; + } + function translateRect(rect, deltaX, deltaY) { + return { + left: rect.left + deltaX, + right: rect.right + deltaX, + top: rect.top + deltaY, + bottom: rect.bottom + deltaY, + }; + } + // 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), + }; + } + // 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, + }; + } + // 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, + }; + } + + var canVGrowWithinCell; + function getCanVGrowWithinCell() { + if (canVGrowWithinCell == null) { + canVGrowWithinCell = computeCanVGrowWithinCell(); + } + return canVGrowWithinCell; + } + function computeCanVGrowWithinCell() { + // for SSR, because this function is call immediately at top-level + // TODO: just make this logic execute top-level, immediately, instead of doing lazily + if (typeof document === "undefined") { + return true; + } + var el = document.createElement("div"); + el.style.position = "absolute"; + el.style.top = "0px"; + el.style.left = "0px"; + el.innerHTML = "
"; + el.querySelector("table").style.height = "100px"; + el.querySelector("div").style.height = "100%"; + document.body.appendChild(el); + var div = el.querySelector("div"); + var possible = div.offsetHeight > 0; + document.body.removeChild(el); + return possible; + } + + var EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere + var Splitter = /** @class */ (function () { + function Splitter() { + this.getKeysForEventDefs = memoize(this._getKeysForEventDefs); + this.splitDateSelection = memoize(this._splitDateSpan); + this.splitEventStore = memoize(this._splitEventStore); + this.splitIndividualUi = memoize(this._splitIndividualUi); + this.splitEventDrag = memoize(this._splitInteraction); + this.splitEventResize = memoize(this._splitInteraction); + this.eventUiBuilders = {}; // TODO: typescript protection + } + Splitter.prototype.splitProps = function (props) { + var _this = this; + var keyInfos = this.getKeyInfo(props); + var defKeys = this.getKeysForEventDefs(props.eventStore); + var dateSelections = this.splitDateSelection(props.dateSelection); + var individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); // the individual *bases* + var eventStores = this.splitEventStore(props.eventStore, defKeys); + var eventDrags = this.splitEventDrag(props.eventDrag); + var eventResizes = this.splitEventResize(props.eventResize); + var splitProps = {}; + this.eventUiBuilders = mapHash(keyInfos, function (info, key) { + return _this.eventUiBuilders[key] || memoize(buildEventUiForKey); + }); + for (var key in keyInfos) { + var keyInfo = keyInfos[key]; + var eventStore = eventStores[key] || EMPTY_EVENT_STORE; + var buildEventUi = this.eventUiBuilders[key]; + splitProps[key] = { + businessHours: keyInfo.businessHours || props.businessHours, + dateSelection: dateSelections[key] || null, + eventStore: eventStore, + eventUiBases: buildEventUi( + props.eventUiBases[""], + keyInfo.ui, + individualUi[key] + ), + eventSelection: eventStore.instances[props.eventSelection] + ? props.eventSelection + : "", + eventDrag: eventDrags[key] || null, + eventResize: eventResizes[key] || null, + }; + } + return splitProps; + }; + Splitter.prototype._splitDateSpan = function (dateSpan) { + var dateSpans = {}; + if (dateSpan) { + var keys = this.getKeysForDateSpan(dateSpan); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + dateSpans[key] = dateSpan; + } + } + return dateSpans; + }; + Splitter.prototype._getKeysForEventDefs = function (eventStore) { + var _this = this; + return mapHash(eventStore.defs, function (eventDef) { + return _this.getKeysForEventDef(eventDef); + }); + }; + Splitter.prototype._splitEventStore = function (eventStore, defKeys) { + var defs = eventStore.defs, + instances = eventStore.instances; + var splitStores = {}; + for (var defId in defs) { + for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) { + var key = _a[_i]; + if (!splitStores[key]) { + splitStores[key] = createEmptyEventStore(); + } + splitStores[key].defs[defId] = defs[defId]; + } + } + for (var instanceId in instances) { + var instance = instances[instanceId]; + for (var _b = 0, _c = defKeys[instance.defId]; _b < _c.length; _b++) { + var key = _c[_b]; + if (splitStores[key]) { + // must have already been created + splitStores[key].instances[instanceId] = instance; + } + } + } + return splitStores; + }; + Splitter.prototype._splitIndividualUi = function (eventUiBases, defKeys) { + var splitHashes = {}; + for (var defId in eventUiBases) { + if (defId) { + // not the '' key + for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) { + var key = _a[_i]; + if (!splitHashes[key]) { + splitHashes[key] = {}; + } + splitHashes[key][defId] = eventUiBases[defId]; + } + } + } + return splitHashes; + }; + Splitter.prototype._splitInteraction = function (interaction) { + var splitStates = {}; + if (interaction) { + var affectedStores_1 = this._splitEventStore( + interaction.affectedEvents, + this._getKeysForEventDefs(interaction.affectedEvents) + ); + // can't rely on defKeys because event data is mutated + var mutatedKeysByDefId = this._getKeysForEventDefs( + interaction.mutatedEvents + ); + var mutatedStores_1 = this._splitEventStore( + interaction.mutatedEvents, + mutatedKeysByDefId + ); + var populate = function (key) { + if (!splitStates[key]) { + splitStates[key] = { + affectedEvents: affectedStores_1[key] || EMPTY_EVENT_STORE, + mutatedEvents: mutatedStores_1[key] || EMPTY_EVENT_STORE, + isEvent: interaction.isEvent, + }; + } + }; + for (var key in affectedStores_1) { + populate(key); + } + for (var key in mutatedStores_1) { + populate(key); + } + } + return splitStates; + }; + return Splitter; + })(); + function buildEventUiForKey(allUi, eventUiForKey, individualUi) { + var baseParts = []; + if (allUi) { + baseParts.push(allUi); + } + if (eventUiForKey) { + baseParts.push(eventUiForKey); + } + var stuff = { + "": combineEventUis(baseParts), + }; + if (individualUi) { + __assign(stuff, individualUi); + } + return stuff; + } + + function getDateMeta(date, todayRange, nowDate, dateProfile) { + return { + dow: date.getUTCDay(), + isDisabled: Boolean( + dateProfile && !rangeContainsMarker(dateProfile.activeRange, date) + ), + isOther: Boolean( + dateProfile && !rangeContainsMarker(dateProfile.currentRange, date) + ), + isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)), + isPast: Boolean( + nowDate ? date < nowDate : todayRange ? date < todayRange.start : false + ), + isFuture: Boolean( + nowDate ? date > nowDate : todayRange ? date >= todayRange.end : false + ), + }; + } + function getDayClassNames(meta, theme) { + var classNames = ["fc-day", "fc-day-" + DAY_IDS[meta.dow]]; + if (meta.isDisabled) { + classNames.push("fc-day-disabled"); + } else { + if (meta.isToday) { + classNames.push("fc-day-today"); + classNames.push(theme.getClass("today")); + } + if (meta.isPast) { + classNames.push("fc-day-past"); + } + if (meta.isFuture) { + classNames.push("fc-day-future"); + } + if (meta.isOther) { + classNames.push("fc-day-other"); + } + } + return classNames; + } + function getSlotClassNames(meta, theme) { + var classNames = ["fc-slot", "fc-slot-" + DAY_IDS[meta.dow]]; + if (meta.isDisabled) { + classNames.push("fc-slot-disabled"); + } else { + if (meta.isToday) { + classNames.push("fc-slot-today"); + classNames.push(theme.getClass("today")); + } + if (meta.isPast) { + classNames.push("fc-slot-past"); + } + if (meta.isFuture) { + classNames.push("fc-slot-future"); + } + } + return classNames; + } + + var DAY_FORMAT = createFormatter({ + year: "numeric", + month: "long", + day: "numeric", + }); + var WEEK_FORMAT = createFormatter({ week: "long" }); + function buildNavLinkAttrs(context, dateMarker, viewType, isTabbable) { + if (viewType === void 0) { + viewType = "day"; + } + if (isTabbable === void 0) { + isTabbable = true; + } + var dateEnv = context.dateEnv, + options = context.options, + calendarApi = context.calendarApi; + var dateStr = dateEnv.format( + dateMarker, + viewType === "week" ? WEEK_FORMAT : DAY_FORMAT + ); + if (options.navLinks) { + var zonedDate = dateEnv.toDate(dateMarker); + var handleInteraction = function (ev) { + var customAction = + viewType === "day" + ? options.navLinkDayClick + : viewType === "week" + ? options.navLinkWeekClick + : null; + if (typeof customAction === "function") { + customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev); + } else { + if (typeof customAction === "string") { + viewType = customAction; + } + calendarApi.zoomTo(dateMarker, viewType); + } + }; + return __assign( + { + title: formatWithOrdinals( + options.navLinkHint, + [dateStr, zonedDate], + dateStr + ), + "data-navlink": "", + }, + isTabbable + ? createAriaClickAttrs(handleInteraction) + : { onClick: handleInteraction } + ); + } + return { "aria-label": dateStr }; + } + + var _isRtlScrollbarOnLeft = null; + function getIsRtlScrollbarOnLeft() { + if (_isRtlScrollbarOnLeft === null) { + _isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft(); + } + return _isRtlScrollbarOnLeft; + } + function computeIsRtlScrollbarOnLeft() { + var outerEl = document.createElement("div"); + applyStyle(outerEl, { + position: "absolute", + top: -1000, + left: 0, + border: 0, + padding: 0, + overflow: "scroll", + direction: "rtl", + }); + outerEl.innerHTML = "
"; + document.body.appendChild(outerEl); + var innerEl = outerEl.firstChild; + var res = + innerEl.getBoundingClientRect().left > + outerEl.getBoundingClientRect().left; + removeElement(outerEl); + return res; + } + + var _scrollbarWidths; + function getScrollbarWidths() { + if (!_scrollbarWidths) { + _scrollbarWidths = computeScrollbarWidths(); + } + return _scrollbarWidths; + } + function computeScrollbarWidths() { + var el = document.createElement("div"); + el.style.overflow = "scroll"; + el.style.position = "absolute"; + el.style.top = "-9999px"; + el.style.left = "-9999px"; + document.body.appendChild(el); + var res = computeScrollbarWidthsForEl(el); + document.body.removeChild(el); + return res; + } + // WARNING: will include border + function computeScrollbarWidthsForEl(el) { + return { + x: el.offsetHeight - el.clientHeight, + y: el.offsetWidth - el.clientWidth, + }; + } + + function computeEdges(el, getPadding) { + if (getPadding === void 0) { + getPadding = false; + } + var computedStyle = window.getComputedStyle(el); + var borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0; + var borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0; + var borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0; + var borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; + var badScrollbarWidths = computeScrollbarWidthsForEl(el); // includes border! + var scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight; + var scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom; + var res = { + borderLeft: borderLeft, + borderRight: borderRight, + borderTop: borderTop, + borderBottom: borderBottom, + scrollbarBottom: scrollbarBottom, + scrollbarLeft: 0, + scrollbarRight: 0, + }; + if (getIsRtlScrollbarOnLeft() && computedStyle.direction === "rtl") { + // is the scrollbar on the left side? + res.scrollbarLeft = scrollbarLeftRight; + } else { + res.scrollbarRight = scrollbarLeftRight; + } + if (getPadding) { + res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0; + res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0; + res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0; + res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0; + } + return res; + } + function computeInnerRect(el, goWithinPadding, doFromWindowViewport) { + if (goWithinPadding === void 0) { + goWithinPadding = false; + } + var outerRect = doFromWindowViewport + ? el.getBoundingClientRect() + : computeRect(el); + var edges = computeEdges(el, goWithinPadding); + var res = { + left: outerRect.left + edges.borderLeft + edges.scrollbarLeft, + right: outerRect.right - edges.borderRight - edges.scrollbarRight, + top: outerRect.top + edges.borderTop, + bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom, + }; + if (goWithinPadding) { + res.left += edges.paddingLeft; + res.right -= edges.paddingRight; + res.top += edges.paddingTop; + res.bottom -= edges.paddingBottom; + } + return res; + } + function computeRect(el) { + var rect = el.getBoundingClientRect(); + return { + left: rect.left + window.pageXOffset, + top: rect.top + window.pageYOffset, + right: rect.right + window.pageXOffset, + bottom: rect.bottom + window.pageYOffset, + }; + } + function computeClippedClientRect(el) { + var clippingParents = getClippingParents(el); + var rect = el.getBoundingClientRect(); + for ( + var _i = 0, clippingParents_1 = clippingParents; + _i < clippingParents_1.length; + _i++ + ) { + var clippingParent = clippingParents_1[_i]; + var intersection = intersectRects( + rect, + clippingParent.getBoundingClientRect() + ); + if (intersection) { + rect = intersection; + } else { + return null; + } + } + return rect; + } + function computeHeightAndMargins(el) { + return el.getBoundingClientRect().height + computeVMargins(el); + } + function computeVMargins(el) { + var computed = window.getComputedStyle(el); + return ( + parseInt(computed.marginTop, 10) + parseInt(computed.marginBottom, 10) + ); + } + // does not return window + function getClippingParents(el) { + var parents = []; + while (el instanceof HTMLElement) { + // will stop when gets to document or null + var computedStyle = window.getComputedStyle(el); + if (computedStyle.position === "fixed") { + break; + } + if ( + /(auto|scroll)/.test( + computedStyle.overflow + + computedStyle.overflowY + + computedStyle.overflowX + ) + ) { + parents.push(el); + } + el = el.parentNode; + } + return parents; + } + + // given a function that resolves a result asynchronously. + // the function can either call passed-in success and failure callbacks, + // or it can return a promise. + // if you need to pass additional params to func, bind them first. + function unpromisify(func, success, failure) { + // guard against success/failure callbacks being called more than once + // and guard against a promise AND callback being used together. + var isResolved = false; + var wrappedSuccess = function () { + if (!isResolved) { + isResolved = true; + success.apply(this, arguments); // eslint-disable-line prefer-rest-params + } + }; + var wrappedFailure = function () { + if (!isResolved) { + isResolved = true; + if (failure) { + failure.apply(this, arguments); // eslint-disable-line prefer-rest-params + } + } + }; + var res = func(wrappedSuccess, wrappedFailure); + if (res && typeof res.then === "function") { + res.then(wrappedSuccess, wrappedFailure); + } + } + + var Emitter = /** @class */ (function () { + function Emitter() { + this.handlers = {}; + this.thisContext = null; + } + Emitter.prototype.setThisContext = function (thisContext) { + this.thisContext = thisContext; + }; + Emitter.prototype.setOptions = function (options) { + this.options = options; + }; + Emitter.prototype.on = function (type, handler) { + addToHash(this.handlers, type, handler); + }; + Emitter.prototype.off = function (type, handler) { + removeFromHash(this.handlers, type, handler); + }; + Emitter.prototype.trigger = function (type) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var attachedHandlers = this.handlers[type] || []; + var optionHandler = this.options && this.options[type]; + var handlers = [].concat(optionHandler || [], attachedHandlers); + for (var _a = 0, handlers_1 = handlers; _a < handlers_1.length; _a++) { + var handler = handlers_1[_a]; + handler.apply(this.thisContext, args); + } + }; + Emitter.prototype.hasHandlers = function (type) { + return Boolean( + (this.handlers[type] && this.handlers[type].length) || + (this.options && this.options[type]) + ); + }; + return Emitter; + })(); + function addToHash(hash, type, handler) { + (hash[type] || (hash[type] = [])).push(handler); + } + function removeFromHash(hash, type, handler) { + if (handler) { + if (hash[type]) { + hash[type] = hash[type].filter(function (func) { + return func !== handler; + }); + } + } else { + delete hash[type]; // remove all handler funcs for this type + } + } + + /* + Records offset information for a set of elements, relative to an origin element. + Can record the left/right OR the top/bottom OR both. + Provides methods for querying the cache by position. + */ + var PositionCache = /** @class */ (function () { + function PositionCache(originEl, els, isHorizontal, isVertical) { + this.els = els; + var originClientRect = (this.originClientRect = + originEl.getBoundingClientRect()); // relative to viewport top-left + if (isHorizontal) { + this.buildElHorizontals(originClientRect.left); + } + if (isVertical) { + this.buildElVerticals(originClientRect.top); + } + } + // Populates the left/right internal coordinate arrays + PositionCache.prototype.buildElHorizontals = function (originClientLeft) { + var lefts = []; + var rights = []; + for (var _i = 0, _a = this.els; _i < _a.length; _i++) { + var el = _a[_i]; + var rect = el.getBoundingClientRect(); + lefts.push(rect.left - originClientLeft); + rights.push(rect.right - originClientLeft); + } + this.lefts = lefts; + this.rights = rights; + }; + // Populates the top/bottom internal coordinate arrays + PositionCache.prototype.buildElVerticals = function (originClientTop) { + var tops = []; + var bottoms = []; + for (var _i = 0, _a = this.els; _i < _a.length; _i++) { + var el = _a[_i]; + var rect = el.getBoundingClientRect(); + tops.push(rect.top - originClientTop); + bottoms.push(rect.bottom - originClientTop); + } + this.tops = tops; + this.bottoms = bottoms; + }; + // Given a left offset (from document left), returns the index of the el that it horizontally intersects. + // If no intersection is made, returns undefined. + PositionCache.prototype.leftToIndex = function (leftPosition) { + var _a = this, + lefts = _a.lefts, + rights = _a.rights; + var len = lefts.length; + var i; + for (i = 0; i < len; i += 1) { + if (leftPosition >= lefts[i] && leftPosition < rights[i]) { + return i; + } + } + return undefined; // TODO: better + }; + // Given a top offset (from document top), returns the index of the el that it vertically intersects. + // If no intersection is made, returns undefined. + PositionCache.prototype.topToIndex = function (topPosition) { + var _a = this, + tops = _a.tops, + bottoms = _a.bottoms; + var len = tops.length; + var i; + for (i = 0; i < len; i += 1) { + if (topPosition >= tops[i] && topPosition < bottoms[i]) { + return i; + } + } + return undefined; // TODO: better + }; + // Gets the width of the element at the given index + PositionCache.prototype.getWidth = function (leftIndex) { + return this.rights[leftIndex] - this.lefts[leftIndex]; + }; + // Gets the height of the element at the given index + PositionCache.prototype.getHeight = function (topIndex) { + return this.bottoms[topIndex] - this.tops[topIndex]; + }; + return PositionCache; + })(); + + /* eslint max-classes-per-file: "off" */ + /* + An object for getting/setting scroll-related information for an element. + Internally, this is done very differently for window versus DOM element, + so this object serves as a common interface. + */ + var ScrollController = /** @class */ (function () { + function ScrollController() {} + ScrollController.prototype.getMaxScrollTop = function () { + return this.getScrollHeight() - this.getClientHeight(); + }; + ScrollController.prototype.getMaxScrollLeft = function () { + return this.getScrollWidth() - this.getClientWidth(); + }; + ScrollController.prototype.canScrollVertically = function () { + return this.getMaxScrollTop() > 0; + }; + ScrollController.prototype.canScrollHorizontally = function () { + return this.getMaxScrollLeft() > 0; + }; + ScrollController.prototype.canScrollUp = function () { + return this.getScrollTop() > 0; + }; + ScrollController.prototype.canScrollDown = function () { + return this.getScrollTop() < this.getMaxScrollTop(); + }; + ScrollController.prototype.canScrollLeft = function () { + return this.getScrollLeft() > 0; + }; + ScrollController.prototype.canScrollRight = function () { + return this.getScrollLeft() < this.getMaxScrollLeft(); + }; + return ScrollController; + })(); + var ElementScrollController = /** @class */ (function (_super) { + __extends(ElementScrollController, _super); + function ElementScrollController(el) { + var _this = _super.call(this) || this; + _this.el = el; + return _this; + } + ElementScrollController.prototype.getScrollTop = function () { + return this.el.scrollTop; + }; + ElementScrollController.prototype.getScrollLeft = function () { + return this.el.scrollLeft; + }; + ElementScrollController.prototype.setScrollTop = function (top) { + this.el.scrollTop = top; + }; + ElementScrollController.prototype.setScrollLeft = function (left) { + this.el.scrollLeft = left; + }; + ElementScrollController.prototype.getScrollWidth = function () { + return this.el.scrollWidth; + }; + ElementScrollController.prototype.getScrollHeight = function () { + return this.el.scrollHeight; + }; + ElementScrollController.prototype.getClientHeight = function () { + return this.el.clientHeight; + }; + ElementScrollController.prototype.getClientWidth = function () { + return this.el.clientWidth; + }; + return ElementScrollController; + })(ScrollController); + var WindowScrollController = /** @class */ (function (_super) { + __extends(WindowScrollController, _super); + function WindowScrollController() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + WindowScrollController.prototype.getScrollTop = function () { + return window.pageYOffset; + }; + WindowScrollController.prototype.getScrollLeft = function () { + return window.pageXOffset; + }; + WindowScrollController.prototype.setScrollTop = function (n) { + window.scroll(window.pageXOffset, n); + }; + WindowScrollController.prototype.setScrollLeft = function (n) { + window.scroll(n, window.pageYOffset); + }; + WindowScrollController.prototype.getScrollWidth = function () { + return document.documentElement.scrollWidth; + }; + WindowScrollController.prototype.getScrollHeight = function () { + return document.documentElement.scrollHeight; + }; + WindowScrollController.prototype.getClientHeight = function () { + return document.documentElement.clientHeight; + }; + WindowScrollController.prototype.getClientWidth = function () { + return document.documentElement.clientWidth; + }; + return WindowScrollController; + })(ScrollController); + + var Theme = /** @class */ (function () { + function Theme(calendarOptions) { + if (this.iconOverrideOption) { + this.setIconOverride(calendarOptions[this.iconOverrideOption]); + } + } + Theme.prototype.setIconOverride = function (iconOverrideHash) { + var iconClassesCopy; + var buttonName; + if (typeof iconOverrideHash === "object" && iconOverrideHash) { + // non-null object + iconClassesCopy = __assign({}, 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) { + // if not already present + className = prefix + className; + } + return className; + }; + Theme.prototype.getClass = function (key) { + return this.classes[key] || ""; + }; + Theme.prototype.getIconClass = function (buttonName, isRtl) { + var className; + if (isRtl && this.rtlIconClasses) { + className = + this.rtlIconClasses[buttonName] || this.iconClasses[buttonName]; + } else { + 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; + })(); + Theme.prototype.classes = {}; + Theme.prototype.iconClasses = {}; + Theme.prototype.baseIconClass = ""; + Theme.prototype.iconOverridePrefix = ""; + + /// + if (typeof FullCalendarVDom === "undefined") { + throw new Error( + "Please import the top-level fullcalendar lib before attempting to import a plugin." + ); + } + var Component = FullCalendarVDom.Component; + var createElement = FullCalendarVDom.createElement; + var render = FullCalendarVDom.render; + var createRef = FullCalendarVDom.createRef; + var Fragment = FullCalendarVDom.Fragment; + var createContext = FullCalendarVDom.createContext; + var createPortal = FullCalendarVDom.createPortal; + var flushSync = FullCalendarVDom.flushSync; + var unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode; + /* eslint-enable */ + + var ScrollResponder = /** @class */ (function () { + function ScrollResponder(execFunc, emitter, scrollTime, scrollTimeReset) { + var _this = this; + this.execFunc = execFunc; + this.emitter = emitter; + this.scrollTime = scrollTime; + this.scrollTimeReset = scrollTimeReset; + this.handleScrollRequest = function (request) { + _this.queuedRequest = __assign({}, _this.queuedRequest || {}, request); + _this.drain(); + }; + emitter.on("_scrollRequest", this.handleScrollRequest); + this.fireInitialScroll(); + } + ScrollResponder.prototype.detach = function () { + this.emitter.off("_scrollRequest", this.handleScrollRequest); + }; + ScrollResponder.prototype.update = function (isDatesNew) { + if (isDatesNew && this.scrollTimeReset) { + this.fireInitialScroll(); // will drain + } else { + this.drain(); + } + }; + ScrollResponder.prototype.fireInitialScroll = function () { + this.handleScrollRequest({ + time: this.scrollTime, + }); + }; + ScrollResponder.prototype.drain = function () { + if (this.queuedRequest && this.execFunc(this.queuedRequest)) { + this.queuedRequest = null; + } + }; + return ScrollResponder; + })(); + + var ViewContextType = createContext({}); // for Components + function buildViewContext( + viewSpec, + viewApi, + viewOptions, + dateProfileGenerator, + dateEnv, + theme, + pluginHooks, + dispatch, + getCurrentData, + emitter, + calendarApi, + registerInteractiveComponent, + unregisterInteractiveComponent + ) { + return { + dateEnv: dateEnv, + options: viewOptions, + pluginHooks: pluginHooks, + emitter: emitter, + dispatch: dispatch, + getCurrentData: getCurrentData, + calendarApi: calendarApi, + viewSpec: viewSpec, + viewApi: viewApi, + dateProfileGenerator: dateProfileGenerator, + theme: theme, + isRtl: viewOptions.direction === "rtl", + addResizeHandler: function (handler) { + emitter.on("_resize", handler); + }, + removeResizeHandler: function (handler) { + emitter.off("_resize", handler); + }, + createScrollResponder: function (execFunc) { + return new ScrollResponder( + execFunc, + emitter, + createDuration(viewOptions.scrollTime), + viewOptions.scrollTimeReset + ); + }, + registerInteractiveComponent: registerInteractiveComponent, + unregisterInteractiveComponent: unregisterInteractiveComponent, + }; + } + + /* eslint max-classes-per-file: off */ + var PureComponent = /** @class */ (function (_super) { + __extends(PureComponent, _super); + function PureComponent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + PureComponent.prototype.shouldComponentUpdate = function ( + nextProps, + nextState + ) { + if (this.debug) { + // eslint-disable-next-line no-console + console.log( + getUnequalProps(nextProps, this.props), + getUnequalProps(nextState, this.state) + ); + } + return ( + !compareObjs(this.props, nextProps, this.propEquality) || + !compareObjs(this.state, nextState, this.stateEquality) + ); + }; + // HACK for freakin' React StrictMode + PureComponent.prototype.safeSetState = function (newState) { + if ( + !compareObjs( + this.state, + __assign(__assign({}, this.state), newState), + this.stateEquality + ) + ) { + this.setState(newState); + } + }; + PureComponent.addPropsEquality = addPropsEquality; + PureComponent.addStateEquality = addStateEquality; + PureComponent.contextType = ViewContextType; + return PureComponent; + })(Component); + PureComponent.prototype.propEquality = {}; + PureComponent.prototype.stateEquality = {}; + var BaseComponent = /** @class */ (function (_super) { + __extends(BaseComponent, _super); + function BaseComponent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + BaseComponent.contextType = ViewContextType; + return BaseComponent; + })(PureComponent); + function addPropsEquality(propEquality) { + var hash = Object.create(this.prototype.propEquality); + __assign(hash, propEquality); + this.prototype.propEquality = hash; + } + function addStateEquality(stateEquality) { + var hash = Object.create(this.prototype.stateEquality); + __assign(hash, stateEquality); + this.prototype.stateEquality = hash; + } + // use other one + function setRef(ref, current) { + if (typeof ref === "function") { + ref(current); + } else if (ref) { + // see https://github.com/facebook/react/issues/13029 + ref.current = current; + } + } + + /* + an INTERACTABLE date component + + PURPOSES: + - hook up to fg, fill, and mirror renderers + - interface for dragging and hits + */ + var DateComponent = /** @class */ (function (_super) { + __extends(DateComponent, _super); + function DateComponent() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.uid = guid(); + return _this; + } + // Hit System + // ----------------------------------------------------------------------------------------------------------------- + DateComponent.prototype.prepareHits = function () {}; + DateComponent.prototype.queryHit = function ( + positionLeft, + positionTop, + elWidth, + elHeight + ) { + return null; // this should be abstract + }; + // Pointer Interaction Utils + // ----------------------------------------------------------------------------------------------------------------- + DateComponent.prototype.isValidSegDownEl = function (el) { + return ( + !this.props.eventDrag && // HACK + !this.props.eventResize && // HACK + !elementClosest(el, ".fc-event-mirror") + ); + }; + DateComponent.prototype.isValidDateDownEl = function (el) { + return ( + !elementClosest(el, ".fc-event:not(.fc-bg-event)") && + !elementClosest(el, ".fc-more-link") && // a "more.." link + !elementClosest(el, "a[data-navlink]") && // a clickable nav link + !elementClosest(el, ".fc-popover") + ); // hack + }; + return DateComponent; + })(BaseComponent); + + // TODO: easier way to add new hooks? need to update a million things + function createPlugin(input) { + return { + id: guid(), + deps: input.deps || [], + reducers: input.reducers || [], + isLoadingFuncs: input.isLoadingFuncs || [], + contextInit: [].concat(input.contextInit || []), + eventRefiners: input.eventRefiners || {}, + eventDefMemberAdders: input.eventDefMemberAdders || [], + eventSourceRefiners: input.eventSourceRefiners || {}, + isDraggableTransformers: input.isDraggableTransformers || [], + eventDragMutationMassagers: input.eventDragMutationMassagers || [], + eventDefMutationAppliers: input.eventDefMutationAppliers || [], + dateSelectionTransformers: input.dateSelectionTransformers || [], + datePointTransforms: input.datePointTransforms || [], + dateSpanTransforms: input.dateSpanTransforms || [], + views: input.views || {}, + viewPropsTransformers: input.viewPropsTransformers || [], + isPropsValid: input.isPropsValid || null, + externalDefTransforms: input.externalDefTransforms || [], + viewContainerAppends: input.viewContainerAppends || [], + eventDropTransformers: input.eventDropTransformers || [], + componentInteractions: input.componentInteractions || [], + calendarInteractions: input.calendarInteractions || [], + themeClasses: input.themeClasses || {}, + eventSourceDefs: input.eventSourceDefs || [], + cmdFormatter: input.cmdFormatter, + recurringTypes: input.recurringTypes || [], + namedTimeZonedImpl: input.namedTimeZonedImpl, + initialView: input.initialView || "", + elementDraggingImpl: input.elementDraggingImpl, + optionChangeHandlers: input.optionChangeHandlers || {}, + scrollGridImpl: input.scrollGridImpl || null, + contentTypeHandlers: input.contentTypeHandlers || {}, + listenerRefiners: input.listenerRefiners || {}, + optionRefiners: input.optionRefiners || {}, + propSetHandlers: input.propSetHandlers || {}, + }; + } + function buildPluginHooks(pluginDefs, globalDefs) { + var isAdded = {}; + var hooks = { + reducers: [], + isLoadingFuncs: [], + contextInit: [], + eventRefiners: {}, + eventDefMemberAdders: [], + eventSourceRefiners: {}, + isDraggableTransformers: [], + eventDragMutationMassagers: [], + eventDefMutationAppliers: [], + dateSelectionTransformers: [], + datePointTransforms: [], + dateSpanTransforms: [], + views: {}, + viewPropsTransformers: [], + isPropsValid: null, + externalDefTransforms: [], + viewContainerAppends: [], + eventDropTransformers: [], + componentInteractions: [], + calendarInteractions: [], + themeClasses: {}, + eventSourceDefs: [], + cmdFormatter: null, + recurringTypes: [], + namedTimeZonedImpl: null, + initialView: "", + elementDraggingImpl: null, + optionChangeHandlers: {}, + scrollGridImpl: null, + contentTypeHandlers: {}, + listenerRefiners: {}, + optionRefiners: {}, + propSetHandlers: {}, + }; + function addDefs(defs) { + for (var _i = 0, defs_1 = defs; _i < defs_1.length; _i++) { + var def = defs_1[_i]; + if (!isAdded[def.id]) { + isAdded[def.id] = true; + addDefs(def.deps); + hooks = combineHooks(hooks, def); + } + } + } + if (pluginDefs) { + addDefs(pluginDefs); + } + addDefs(globalDefs); + return hooks; + } + function buildBuildPluginHooks() { + var currentOverrideDefs = []; + var currentGlobalDefs = []; + var currentHooks; + return function (overrideDefs, globalDefs) { + if ( + !currentHooks || + !isArraysEqual(overrideDefs, currentOverrideDefs) || + !isArraysEqual(globalDefs, currentGlobalDefs) + ) { + currentHooks = buildPluginHooks(overrideDefs, globalDefs); + } + currentOverrideDefs = overrideDefs; + currentGlobalDefs = globalDefs; + return currentHooks; + }; + } + function combineHooks(hooks0, hooks1) { + return { + reducers: hooks0.reducers.concat(hooks1.reducers), + isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs), + contextInit: hooks0.contextInit.concat(hooks1.contextInit), + eventRefiners: __assign( + __assign({}, hooks0.eventRefiners), + hooks1.eventRefiners + ), + eventDefMemberAdders: hooks0.eventDefMemberAdders.concat( + hooks1.eventDefMemberAdders + ), + eventSourceRefiners: __assign( + __assign({}, hooks0.eventSourceRefiners), + hooks1.eventSourceRefiners + ), + isDraggableTransformers: hooks0.isDraggableTransformers.concat( + hooks1.isDraggableTransformers + ), + eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat( + hooks1.eventDragMutationMassagers + ), + eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat( + hooks1.eventDefMutationAppliers + ), + dateSelectionTransformers: hooks0.dateSelectionTransformers.concat( + hooks1.dateSelectionTransformers + ), + datePointTransforms: hooks0.datePointTransforms.concat( + hooks1.datePointTransforms + ), + dateSpanTransforms: hooks0.dateSpanTransforms.concat( + hooks1.dateSpanTransforms + ), + views: __assign(__assign({}, hooks0.views), hooks1.views), + viewPropsTransformers: hooks0.viewPropsTransformers.concat( + hooks1.viewPropsTransformers + ), + isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid, + externalDefTransforms: hooks0.externalDefTransforms.concat( + hooks1.externalDefTransforms + ), + viewContainerAppends: hooks0.viewContainerAppends.concat( + hooks1.viewContainerAppends + ), + eventDropTransformers: hooks0.eventDropTransformers.concat( + hooks1.eventDropTransformers + ), + calendarInteractions: hooks0.calendarInteractions.concat( + hooks1.calendarInteractions + ), + componentInteractions: hooks0.componentInteractions.concat( + hooks1.componentInteractions + ), + themeClasses: __assign( + __assign({}, hooks0.themeClasses), + hooks1.themeClasses + ), + eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs), + cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter, + recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes), + namedTimeZonedImpl: + hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl, + initialView: hooks0.initialView || hooks1.initialView, + elementDraggingImpl: + hooks0.elementDraggingImpl || hooks1.elementDraggingImpl, + optionChangeHandlers: __assign( + __assign({}, hooks0.optionChangeHandlers), + hooks1.optionChangeHandlers + ), + scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl, + contentTypeHandlers: __assign( + __assign({}, hooks0.contentTypeHandlers), + hooks1.contentTypeHandlers + ), + listenerRefiners: __assign( + __assign({}, hooks0.listenerRefiners), + hooks1.listenerRefiners + ), + optionRefiners: __assign( + __assign({}, hooks0.optionRefiners), + hooks1.optionRefiners + ), + propSetHandlers: __assign( + __assign({}, hooks0.propSetHandlers), + hooks1.propSetHandlers + ), + }; + } + + var StandardTheme = /** @class */ (function (_super) { + __extends(StandardTheme, _super); + function StandardTheme() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + return StandardTheme; + })(Theme); + StandardTheme.prototype.classes = { + root: "fc-theme-standard", + tableCellShaded: "fc-cell-shaded", + buttonGroup: "fc-button-group", + button: "fc-button fc-button-primary", + buttonActive: "fc-button-active", + }; + StandardTheme.prototype.baseIconClass = "fc-icon"; + StandardTheme.prototype.iconClasses = { + close: "fc-icon-x", + prev: "fc-icon-chevron-left", + next: "fc-icon-chevron-right", + prevYear: "fc-icon-chevrons-left", + nextYear: "fc-icon-chevrons-right", + }; + StandardTheme.prototype.rtlIconClasses = { + prev: "fc-icon-chevron-right", + next: "fc-icon-chevron-left", + prevYear: "fc-icon-chevrons-right", + nextYear: "fc-icon-chevrons-left", + }; + StandardTheme.prototype.iconOverrideOption = "buttonIcons"; // TODO: make TS-friendly + StandardTheme.prototype.iconOverrideCustomButtonOption = "icon"; + StandardTheme.prototype.iconOverridePrefix = "fc-icon-"; + + function compileViewDefs(defaultConfigs, overrideConfigs) { + var hash = {}; + var viewType; + for (viewType in defaultConfigs) { + ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); + } + for (viewType in overrideConfigs) { + ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); + } + return hash; + } + function ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) { + if (hash[viewType]) { + return hash[viewType]; + } + var viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs); + if (viewDef) { + hash[viewType] = viewDef; + } + return viewDef; + } + function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) { + var defaultConfig = defaultConfigs[viewType]; + var overrideConfig = overrideConfigs[viewType]; + var queryProp = function (name) { + return defaultConfig && defaultConfig[name] !== null + ? defaultConfig[name] + : overrideConfig && overrideConfig[name] !== null + ? overrideConfig[name] + : null; + }; + var theComponent = queryProp("component"); + var superType = queryProp("superType"); + var superDef = null; + if (superType) { + if (superType === viewType) { + throw new Error("Can't have a custom view type that references itself"); + } + superDef = ensureViewDef( + superType, + hash, + defaultConfigs, + overrideConfigs + ); + } + if (!theComponent && superDef) { + theComponent = superDef.component; + } + if (!theComponent) { + return null; // don't throw a warning, might be settings for a single-unit view + } + return { + type: viewType, + component: theComponent, + defaults: __assign( + __assign({}, superDef ? superDef.defaults : {}), + defaultConfig ? defaultConfig.rawOptions : {} + ), + overrides: __assign( + __assign({}, superDef ? superDef.overrides : {}), + overrideConfig ? overrideConfig.rawOptions : {} + ), + }; + } + + /* eslint max-classes-per-file: off */ + // NOTE: in JSX, you should always use this class with arg. otherwise, will default to any??? + var RenderHook = /** @class */ (function (_super) { + __extends(RenderHook, _super); + function RenderHook() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.rootElRef = createRef(); + _this.handleRootEl = function (el) { + setRef(_this.rootElRef, el); + if (_this.props.elRef) { + setRef(_this.props.elRef, el); + } + }; + return _this; + } + RenderHook.prototype.render = function () { + var _this = this; + var props = this.props; + var hookProps = props.hookProps; + return createElement( + MountHook, + { + hookProps: hookProps, + didMount: props.didMount, + willUnmount: props.willUnmount, + elRef: this.handleRootEl, + }, + function (rootElRef) { + return createElement( + ContentHook, + { + hookProps: hookProps, + content: props.content, + defaultContent: props.defaultContent, + backupElRef: _this.rootElRef, + }, + function (innerElRef, innerContent) { + return props.children( + rootElRef, + normalizeClassNames(props.classNames, hookProps), + innerElRef, + innerContent + ); + } + ); + } + ); + }; + return RenderHook; + })(BaseComponent); + // TODO: rename to be about function, not default. use in above type + // for forcing rerender of components that use the ContentHook + var CustomContentRenderContext = createContext(0); + function ContentHook(props) { + return createElement( + CustomContentRenderContext.Consumer, + null, + function (renderId) { + return createElement( + ContentHookInner, + __assign({ renderId: renderId }, props) + ); + } + ); + } + var ContentHookInner = /** @class */ (function (_super) { + __extends(ContentHookInner, _super); + function ContentHookInner() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.innerElRef = createRef(); + return _this; + } + ContentHookInner.prototype.render = function () { + return this.props.children(this.innerElRef, this.renderInnerContent()); + }; + ContentHookInner.prototype.componentDidMount = function () { + this.updateCustomContent(); + }; + ContentHookInner.prototype.componentDidUpdate = function () { + this.updateCustomContent(); + }; + ContentHookInner.prototype.componentWillUnmount = function () { + if (this.customContentInfo && this.customContentInfo.destroy) { + this.customContentInfo.destroy(); + } + }; + ContentHookInner.prototype.renderInnerContent = function () { + var customContentInfo = this.customContentInfo; // only populated if using non-[p]react node(s) + var innerContent = this.getInnerContent(); + var meta = this.getContentMeta(innerContent); + // initial run, or content-type changing? (from vue -> react for example) + if ( + !customContentInfo || + customContentInfo.contentKey !== meta.contentKey + ) { + // clearing old value + if (customContentInfo) { + if (customContentInfo.destroy) { + customContentInfo.destroy(); + } + customContentInfo = this.customContentInfo = null; + } + // assigning new value + if (meta.contentKey) { + customContentInfo = this.customContentInfo = __assign( + { + contentKey: meta.contentKey, + contentVal: innerContent[meta.contentKey], + }, + meta.buildLifecycleFuncs() + ); + } + // updating + } else if (customContentInfo) { + customContentInfo.contentVal = innerContent[meta.contentKey]; + } + return customContentInfo + ? [] // signal that something was specified + : innerContent; // assume a [p]react vdom node. use it + }; + ContentHookInner.prototype.getInnerContent = function () { + var props = this.props; + var innerContent = normalizeContent(props.content, props.hookProps); + if (innerContent === undefined) { + // use the default + innerContent = normalizeContent(props.defaultContent, props.hookProps); + } + return innerContent == null ? null : innerContent; // convert undefined to null (better for React) + }; + ContentHookInner.prototype.getContentMeta = function (innerContent) { + var contentTypeHandlers = this.context.pluginHooks.contentTypeHandlers; + var contentKey = ""; + var buildLifecycleFuncs = null; + if (innerContent) { + // allowed to be null, for convenience to caller + for (var searchKey in contentTypeHandlers) { + if (innerContent[searchKey] !== undefined) { + contentKey = searchKey; + buildLifecycleFuncs = contentTypeHandlers[searchKey]; + break; + } + } + } + return { + contentKey: contentKey, + buildLifecycleFuncs: buildLifecycleFuncs, + }; + }; + ContentHookInner.prototype.updateCustomContent = function () { + if (this.customContentInfo) { + // for non-[p]react + this.customContentInfo.render( + this.innerElRef.current || this.props.backupElRef.current, // the element to render into + this.customContentInfo.contentVal + ); + } + }; + return ContentHookInner; + })(BaseComponent); + var MountHook = /** @class */ (function (_super) { + __extends(MountHook, _super); + function MountHook() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.handleRootEl = function (rootEl) { + _this.rootEl = rootEl; + if (_this.props.elRef) { + setRef(_this.props.elRef, rootEl); + } + }; + return _this; + } + MountHook.prototype.render = function () { + return this.props.children(this.handleRootEl); + }; + MountHook.prototype.componentDidMount = function () { + var callback = this.props.didMount; + if (callback) { + callback( + __assign(__assign({}, this.props.hookProps), { el: this.rootEl }) + ); + } + }; + MountHook.prototype.componentWillUnmount = function () { + var callback = this.props.willUnmount; + if (callback) { + callback( + __assign(__assign({}, this.props.hookProps), { el: this.rootEl }) + ); + } + }; + return MountHook; + })(BaseComponent); + function buildClassNameNormalizer() { + var currentGenerator; + var currentHookProps; + var currentClassNames = []; + return function (generator, hookProps) { + if ( + !currentHookProps || + !isPropsEqual(currentHookProps, hookProps) || + generator !== currentGenerator + ) { + currentGenerator = generator; + currentHookProps = hookProps; + currentClassNames = normalizeClassNames(generator, hookProps); + } + return currentClassNames; + }; + } + function normalizeClassNames(classNames, hookProps) { + if (typeof classNames === "function") { + classNames = classNames(hookProps); + } + return parseClassNames(classNames); + } + function normalizeContent(input, hookProps) { + if (typeof input === "function") { + return input(hookProps, createElement); // give the function the vdom-creation func + } + return input; + } + + var ViewRoot = /** @class */ (function (_super) { + __extends(ViewRoot, _super); + function ViewRoot() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.normalizeClassNames = buildClassNameNormalizer(); + return _this; + } + ViewRoot.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var options = context.options; + var hookProps = { view: context.viewApi }; + var customClassNames = this.normalizeClassNames( + options.viewClassNames, + hookProps + ); + return createElement( + MountHook, + { + hookProps: hookProps, + didMount: options.viewDidMount, + willUnmount: options.viewWillUnmount, + elRef: props.elRef, + }, + function (rootElRef) { + return props.children( + rootElRef, + ["fc-" + props.viewSpec.type + "-view", "fc-view"].concat( + customClassNames + ) + ); + } + ); + }; + return ViewRoot; + })(BaseComponent); + + function parseViewConfigs(inputs) { + return mapHash(inputs, parseViewConfig); + } + function parseViewConfig(input) { + var rawOptions = typeof input === "function" ? { component: input } : input; + var component = rawOptions.component; + if (rawOptions.content) { + component = createViewHookComponent(rawOptions); + // TODO: remove content/classNames/didMount/etc from options? + } + return { + superType: rawOptions.type, + component: component, + rawOptions: rawOptions, + }; + } + function createViewHookComponent(options) { + return function (viewProps) { + return createElement(ViewContextType.Consumer, null, function (context) { + return createElement( + ViewRoot, + { viewSpec: context.viewSpec }, + function (viewElRef, viewClassNames) { + var hookProps = __assign(__assign({}, viewProps), { + nextDayThreshold: context.options.nextDayThreshold, + }); + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.classNames, + content: options.content, + didMount: options.didMount, + willUnmount: options.willUnmount, + elRef: viewElRef, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return createElement( + "div", + { + className: viewClassNames + .concat(customClassNames) + .join(" "), + ref: rootElRef, + }, + innerContent + ); + } + ); + } + ); + }); + }; + } + + function buildViewSpecs( + defaultInputs, + optionOverrides, + dynamicOptionOverrides, + localeDefaults + ) { + var defaultConfigs = parseViewConfigs(defaultInputs); + var overrideConfigs = parseViewConfigs(optionOverrides.views); + var viewDefs = compileViewDefs(defaultConfigs, overrideConfigs); + return mapHash(viewDefs, function (viewDef) { + return buildViewSpec( + viewDef, + overrideConfigs, + optionOverrides, + dynamicOptionOverrides, + localeDefaults + ); + }); + } + function buildViewSpec( + viewDef, + overrideConfigs, + optionOverrides, + dynamicOptionOverrides, + localeDefaults + ) { + var durationInput = + viewDef.overrides.duration || + viewDef.defaults.duration || + dynamicOptionOverrides.duration || + optionOverrides.duration; + var duration = null; + var durationUnit = ""; + var singleUnit = ""; + var singleUnitOverrides = {}; + if (durationInput) { + duration = createDurationCached(durationInput); + if (duration) { + // valid? + var denom = greatestDurationDenominator(duration); + durationUnit = denom.unit; + if (denom.value === 1) { + singleUnit = durationUnit; + singleUnitOverrides = overrideConfigs[durationUnit] + ? overrideConfigs[durationUnit].rawOptions + : {}; + } + } + } + var queryButtonText = function (optionsSubset) { + var buttonTextMap = optionsSubset.buttonText || {}; + var buttonTextKey = viewDef.defaults.buttonTextKey; + if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) { + return buttonTextMap[buttonTextKey]; + } + if (buttonTextMap[viewDef.type] != null) { + return buttonTextMap[viewDef.type]; + } + if (buttonTextMap[singleUnit] != null) { + return buttonTextMap[singleUnit]; + } + return null; + }; + var queryButtonTitle = function (optionsSubset) { + var buttonHints = optionsSubset.buttonHints || {}; + var buttonKey = viewDef.defaults.buttonTextKey; // use same key as text + if (buttonKey != null && buttonHints[buttonKey] != null) { + return buttonHints[buttonKey]; + } + if (buttonHints[viewDef.type] != null) { + return buttonHints[viewDef.type]; + } + if (buttonHints[singleUnit] != null) { + return buttonHints[singleUnit]; + } + return null; + }; + return { + type: viewDef.type, + component: viewDef.component, + duration: duration, + durationUnit: durationUnit, + singleUnit: singleUnit, + optionDefaults: viewDef.defaults, + optionOverrides: __assign( + __assign({}, singleUnitOverrides), + viewDef.overrides + ), + buttonTextOverride: + queryButtonText(dynamicOptionOverrides) || + queryButtonText(optionOverrides) || // constructor-specified buttonText lookup hash takes precedence + viewDef.overrides.buttonText, + buttonTextDefault: + queryButtonText(localeDefaults) || + viewDef.defaults.buttonText || + queryButtonText(BASE_OPTION_DEFAULTS) || + viewDef.type, + // not DRY + buttonTitleOverride: + queryButtonTitle(dynamicOptionOverrides) || + queryButtonTitle(optionOverrides) || + viewDef.overrides.buttonHint, + buttonTitleDefault: + queryButtonTitle(localeDefaults) || + viewDef.defaults.buttonHint || + queryButtonTitle(BASE_OPTION_DEFAULTS), + // will eventually fall back to buttonText + }; + } + // hack to get memoization working + var durationInputMap = {}; + function createDurationCached(durationInput) { + var json = JSON.stringify(durationInput); + var res = durationInputMap[json]; + if (res === undefined) { + res = createDuration(durationInput); + durationInputMap[json] = res; + } + return res; + } + + var DateProfileGenerator = /** @class */ (function () { + function DateProfileGenerator(props) { + this.props = props; + this.nowDate = getNow(props.nowInput, props.dateEnv); + this.initHiddenDays(); + } + /* Date Range Computation + ------------------------------------------------------------------------------------------------------------------*/ + // Builds a structure with info about what the dates/ranges will be for the "prev" view. + DateProfileGenerator.prototype.buildPrev = function ( + currentDateProfile, + currentDate, + forceToValid + ) { + var dateEnv = this.props.dateEnv; + var prevDate = dateEnv.subtract( + dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month + currentDateProfile.dateIncrement + ); + return this.build(prevDate, -1, forceToValid); + }; + // Builds a structure with info about what the dates/ranges will be for the "next" view. + DateProfileGenerator.prototype.buildNext = function ( + currentDateProfile, + currentDate, + forceToValid + ) { + var dateEnv = this.props.dateEnv; + var nextDate = dateEnv.add( + dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month + currentDateProfile.dateIncrement + ); + return this.build(nextDate, 1, forceToValid); + }; + // Builds a structure holding dates/ranges for rendering around the given date. + // Optional direction param indicates whether the date is being incremented/decremented + // from its previous value. decremented = -1, incremented = 1 (default). + DateProfileGenerator.prototype.build = function ( + currentDate, + direction, + forceToValid + ) { + if (forceToValid === void 0) { + forceToValid = true; + } + var props = this.props; + var validRange; + var currentInfo; + var isRangeAllDay; + var renderRange; + var activeRange; + var isValid; + validRange = this.buildValidRange(); + validRange = this.trimHiddenDays(validRange); + if (forceToValid) { + currentDate = constrainMarkerToRange(currentDate, validRange); + } + currentInfo = this.buildCurrentRangeInfo(currentDate, direction); + isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit); + renderRange = this.buildRenderRange( + this.trimHiddenDays(currentInfo.range), + currentInfo.unit, + isRangeAllDay + ); + renderRange = this.trimHiddenDays(renderRange); + activeRange = renderRange; + if (!props.showNonCurrentDates) { + activeRange = intersectRanges(activeRange, currentInfo.range); + } + activeRange = this.adjustActiveRange(activeRange); + activeRange = intersectRanges(activeRange, validRange); // might return null + // it's invalid if the originally requested date is not contained, + // or if the range is completely outside of the valid range. + isValid = rangesIntersect(currentInfo.range, validRange); + return { + // constraint for where prev/next operations can go and where events can be dragged/resized to. + // an object with optional start and end properties. + validRange: validRange, + // range the view is formally responsible for. + // for example, a month view might have 1st-31st, excluding padded dates + currentRange: currentInfo.range, + // name of largest unit being displayed, like "month" or "week" + currentRangeUnit: currentInfo.unit, + isRangeAllDay: isRangeAllDay, + // dates that display events and accept drag-n-drop + // will be `null` if no dates accept events + activeRange: activeRange, + // date range with a rendered skeleton + // includes not-active days that need some sort of DOM + renderRange: renderRange, + // Duration object that denotes the first visible time of any given day + slotMinTime: props.slotMinTime, + // Duration object that denotes the exclusive visible end time of any given day + slotMaxTime: props.slotMaxTime, + isValid: isValid, + // how far the current date will move for a prev/next operation + dateIncrement: this.buildDateIncrement(currentInfo.duration), + // pass a fallback (might be null) ^ + }; + }; + // Builds an object with optional start/end properties. + // Indicates the minimum/maximum dates to display. + // not responsible for trimming hidden days. + DateProfileGenerator.prototype.buildValidRange = function () { + var input = this.props.validRangeInput; + var simpleInput = + typeof input === "function" + ? input.call(this.props.calendarApi, this.nowDate) + : input; + return this.refineRange(simpleInput) || { start: null, end: null }; // completely open-ended + }; + // Builds a structure with info about the "current" range, the range that is + // highlighted as being the current month for example. + // See build() for a description of `direction`. + // Guaranteed to have `range` and `unit` properties. `duration` is optional. + DateProfileGenerator.prototype.buildCurrentRangeInfo = function ( + date, + direction + ) { + var props = this.props; + var duration = null; + var unit = null; + var range = null; + var dayCount; + if (props.duration) { + duration = props.duration; + unit = props.durationUnit; + range = this.buildRangeFromDuration(date, direction, duration, unit); + } else if ((dayCount = this.props.dayCount)) { + unit = "day"; + range = this.buildRangeFromDayCount(date, direction, dayCount); + } else if ((range = this.buildCustomVisibleRange(date))) { + unit = props.dateEnv.greatestWholeUnit(range.start, range.end).unit; + } else { + duration = this.getFallbackDuration(); + unit = greatestDurationDenominator(duration).unit; + range = this.buildRangeFromDuration(date, direction, duration, unit); + } + return { duration: duration, unit: unit, range: range }; + }; + DateProfileGenerator.prototype.getFallbackDuration = function () { + return createDuration({ day: 1 }); + }; + // Returns a new activeRange to have time values (un-ambiguate) + // slotMinTime or slotMaxTime causes the range to expand. + DateProfileGenerator.prototype.adjustActiveRange = function (range) { + var _a = this.props, + dateEnv = _a.dateEnv, + usesMinMaxTime = _a.usesMinMaxTime, + slotMinTime = _a.slotMinTime, + slotMaxTime = _a.slotMaxTime; + var start = range.start, + end = range.end; + if (usesMinMaxTime) { + // expand active range if slotMinTime is negative (why not when positive?) + if (asRoughDays(slotMinTime) < 0) { + start = startOfDay(start); // necessary? + start = dateEnv.add(start, slotMinTime); + } + // expand active range if slotMaxTime is beyond one day (why not when negative?) + if (asRoughDays(slotMaxTime) > 1) { + end = startOfDay(end); // necessary? + end = addDays(end, -1); + end = dateEnv.add(end, slotMaxTime); + } + } + return { start: start, end: end }; + }; + // Builds the "current" range when it is specified as an explicit duration. + // `unit` is the already-computed greatestDurationDenominator unit of duration. + DateProfileGenerator.prototype.buildRangeFromDuration = function ( + date, + direction, + duration, + unit + ) { + var _a = this.props, + dateEnv = _a.dateEnv, + dateAlignment = _a.dateAlignment; + var start; + var end; + var res; + // compute what the alignment should be + if (!dateAlignment) { + var dateIncrement = this.props.dateIncrement; + if (dateIncrement) { + // use the smaller of the two units + if (asRoughMs(dateIncrement) < asRoughMs(duration)) { + dateAlignment = greatestDurationDenominator(dateIncrement).unit; + } else { + dateAlignment = unit; + } + } else { + dateAlignment = unit; + } + } + // if the view displays a single day or smaller + if (asRoughDays(duration) <= 1) { + if (this.isHiddenDay(start)) { + start = this.skipHiddenDays(start, direction); + start = startOfDay(start); + } + } + function computeRes() { + start = dateEnv.startOf(date, dateAlignment); + end = dateEnv.add(start, duration); + res = { start: start, end: end }; + } + computeRes(); + // if range is completely enveloped by hidden days, go past the hidden days + if (!this.trimHiddenDays(res)) { + date = this.skipHiddenDays(date, direction); + computeRes(); + } + return res; + }; + // Builds the "current" range when a dayCount is specified. + DateProfileGenerator.prototype.buildRangeFromDayCount = function ( + date, + direction, + dayCount + ) { + var _a = this.props, + dateEnv = _a.dateEnv, + dateAlignment = _a.dateAlignment; + var runningCount = 0; + var start = date; + var end; + if (dateAlignment) { + start = dateEnv.startOf(start, dateAlignment); + } + start = startOfDay(start); + start = this.skipHiddenDays(start, direction); + end = start; + do { + end = addDays(end, 1); + if (!this.isHiddenDay(end)) { + runningCount += 1; + } + } while (runningCount < dayCount); + return { start: start, end: end }; + }; + // Builds a normalized range object for the "visible" range, + // which is a way to define the currentRange and activeRange at the same time. + DateProfileGenerator.prototype.buildCustomVisibleRange = function (date) { + var props = this.props; + var input = props.visibleRangeInput; + var simpleInput = + typeof input === "function" + ? input.call(props.calendarApi, props.dateEnv.toDate(date)) + : input; + var range = this.refineRange(simpleInput); + if (range && (range.start == null || range.end == null)) { + return null; + } + return range; + }; + // Computes the range that will represent the element/cells for *rendering*, + // but which may have voided days/times. + // not responsible for trimming hidden days. + DateProfileGenerator.prototype.buildRenderRange = function ( + currentRange, + currentRangeUnit, + isRangeAllDay + ) { + return currentRange; + }; + // Compute the duration value that should be added/substracted to the current date + // when a prev/next operation happens. + DateProfileGenerator.prototype.buildDateIncrement = function (fallback) { + var dateIncrement = this.props.dateIncrement; + var customAlignment; + if (dateIncrement) { + return dateIncrement; + } + if ((customAlignment = this.props.dateAlignment)) { + return createDuration(1, customAlignment); + } + if (fallback) { + return fallback; + } + return createDuration({ days: 1 }); + }; + DateProfileGenerator.prototype.refineRange = function (rangeInput) { + if (rangeInput) { + var range = parseRange(rangeInput, this.props.dateEnv); + if (range) { + range = computeVisibleDayRange(range); + } + return range; + } + return null; + }; + /* Hidden Days + ------------------------------------------------------------------------------------------------------------------*/ + // Initializes internal variables related to calculating hidden days-of-week + DateProfileGenerator.prototype.initHiddenDays = function () { + var hiddenDays = this.props.hiddenDays || []; // array of day-of-week indices that are hidden + var isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool) + var dayCnt = 0; + var i; + if (this.props.weekends === false) { + hiddenDays.push(0, 6); // 0=sunday, 6=saturday + } + for (i = 0; i < 7; i += 1) { + if (!(isHiddenDayHash[i] = hiddenDays.indexOf(i) !== -1)) { + dayCnt += 1; + } + } + if (!dayCnt) { + throw new Error("invalid hiddenDays"); // all days were hidden? bad. + } + this.isHiddenDayHash = isHiddenDayHash; + }; + // Remove days from the beginning and end of the range that are computed as hidden. + // If the whole range is trimmed off, returns null + DateProfileGenerator.prototype.trimHiddenDays = function (range) { + var start = range.start, + end = range.end; + if (start) { + start = this.skipHiddenDays(start); + } + if (end) { + end = this.skipHiddenDays(end, -1, true); + } + if (start == null || end == null || start < end) { + return { start: start, end: end }; + } + return null; + }; + // Is the current day hidden? + // `day` is a day-of-week index (0-6), or a Date (used for UTC) + DateProfileGenerator.prototype.isHiddenDay = function (day) { + if (day instanceof Date) { + day = day.getUTCDay(); + } + return this.isHiddenDayHash[day]; + }; + // Incrementing the current day until it is no longer a hidden day, returning a copy. + // DOES NOT CONSIDER validRange! + // If the initial value of `date` is not a hidden day, don't do anything. + // Pass `isExclusive` as `true` if you are dealing with an end date. + // `inc` defaults to `1` (increment one day forward each time) + DateProfileGenerator.prototype.skipHiddenDays = function ( + date, + inc, + isExclusive + ) { + if (inc === void 0) { + inc = 1; + } + if (isExclusive === void 0) { + isExclusive = false; + } + while ( + this.isHiddenDayHash[ + (date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7 + ] + ) { + date = addDays(date, inc); + } + return date; + }; + return DateProfileGenerator; + })(); + + function reduceViewType(viewType, action) { + switch (action.type) { + case "CHANGE_VIEW_TYPE": + viewType = action.viewType; + } + return viewType; + } + + function reduceDynamicOptionOverrides(dynamicOptionOverrides, action) { + var _a; + switch (action.type) { + case "SET_OPTION": + return __assign( + __assign({}, dynamicOptionOverrides), + ((_a = {}), (_a[action.optionName] = action.rawOptionValue), _a) + ); + default: + return dynamicOptionOverrides; + } + } + + function reduceDateProfile( + currentDateProfile, + action, + currentDate, + dateProfileGenerator + ) { + var dp; + switch (action.type) { + case "CHANGE_VIEW_TYPE": + return dateProfileGenerator.build(action.dateMarker || currentDate); + case "CHANGE_DATE": + return dateProfileGenerator.build(action.dateMarker); + case "PREV": + dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate); + if (dp.isValid) { + return dp; + } + break; + case "NEXT": + dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate); + if (dp.isValid) { + return dp; + } + break; + } + return currentDateProfile; + } + + function initEventSources(calendarOptions, dateProfile, context) { + var activeRange = dateProfile ? dateProfile.activeRange : null; + return addSources( + {}, + parseInitialSources(calendarOptions, context), + activeRange, + context + ); + } + function reduceEventSources(eventSources, action, dateProfile, context) { + var activeRange = dateProfile ? dateProfile.activeRange : null; // need this check? + switch (action.type) { + case "ADD_EVENT_SOURCES": // already parsed + return addSources(eventSources, action.sources, activeRange, context); + case "REMOVE_EVENT_SOURCE": + return removeSource(eventSources, action.sourceId); + case "PREV": // TODO: how do we track all actions that affect dateProfile :( + case "NEXT": + case "CHANGE_DATE": + case "CHANGE_VIEW_TYPE": + if (dateProfile) { + return fetchDirtySources(eventSources, activeRange, context); + } + return eventSources; + case "FETCH_EVENT_SOURCES": + return fetchSourcesByIds( + eventSources, + action.sourceIds // why no type? + ? arrayToHash(action.sourceIds) + : excludeStaticSources(eventSources, context), + activeRange, + action.isRefetch || false, + context + ); + case "RECEIVE_EVENTS": + case "RECEIVE_EVENT_ERROR": + return receiveResponse( + eventSources, + action.sourceId, + action.fetchId, + action.fetchRange + ); + case "REMOVE_ALL_EVENT_SOURCES": + return {}; + default: + return eventSources; + } + } + function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) { + var activeRange = dateProfile ? dateProfile.activeRange : null; // need this check? + return fetchSourcesByIds( + eventSources, + excludeStaticSources(eventSources, context), + activeRange, + true, + context + ); + } + function computeEventSourcesLoading(eventSources) { + for (var sourceId in eventSources) { + if (eventSources[sourceId].isFetching) { + return true; + } + } + return false; + } + function addSources(eventSourceHash, sources, fetchRange, context) { + var hash = {}; + for (var _i = 0, sources_1 = sources; _i < sources_1.length; _i++) { + var source = sources_1[_i]; + hash[source.sourceId] = source; + } + if (fetchRange) { + hash = fetchDirtySources(hash, fetchRange, context); + } + return __assign(__assign({}, eventSourceHash), hash); + } + function removeSource(eventSourceHash, sourceId) { + return filterHash(eventSourceHash, function (eventSource) { + return eventSource.sourceId !== sourceId; + }); + } + function fetchDirtySources(sourceHash, fetchRange, context) { + return fetchSourcesByIds( + sourceHash, + filterHash(sourceHash, function (eventSource) { + return isSourceDirty(eventSource, fetchRange, context); + }), + fetchRange, + false, + context + ); + } + function isSourceDirty(eventSource, fetchRange, context) { + if (!doesSourceNeedRange(eventSource, context)) { + return !eventSource.latestFetchId; + } + return ( + !context.options.lazyFetching || + !eventSource.fetchRange || + eventSource.isFetching || // always cancel outdated in-progress fetches + fetchRange.start < eventSource.fetchRange.start || + fetchRange.end > eventSource.fetchRange.end + ); + } + function fetchSourcesByIds( + prevSources, + sourceIdHash, + fetchRange, + isRefetch, + context + ) { + var nextSources = {}; + for (var sourceId in prevSources) { + var source = prevSources[sourceId]; + if (sourceIdHash[sourceId]) { + nextSources[sourceId] = fetchSource( + source, + fetchRange, + isRefetch, + context + ); + } else { + nextSources[sourceId] = source; + } + } + return nextSources; + } + function fetchSource(eventSource, fetchRange, isRefetch, context) { + var options = context.options, + calendarApi = context.calendarApi; + var sourceDef = + context.pluginHooks.eventSourceDefs[eventSource.sourceDefId]; + var fetchId = guid(); + sourceDef.fetch( + { + eventSource: eventSource, + range: fetchRange, + isRefetch: isRefetch, + context: context, + }, + function (res) { + var rawEvents = res.rawEvents; + if (options.eventSourceSuccess) { + rawEvents = + options.eventSourceSuccess.call(calendarApi, rawEvents, res.xhr) || + rawEvents; + } + if (eventSource.success) { + rawEvents = + eventSource.success.call(calendarApi, rawEvents, res.xhr) || + rawEvents; + } + context.dispatch({ + type: "RECEIVE_EVENTS", + sourceId: eventSource.sourceId, + fetchId: fetchId, + fetchRange: fetchRange, + rawEvents: rawEvents, + }); + }, + function (error) { + console.warn(error.message, error); + if (options.eventSourceFailure) { + options.eventSourceFailure.call(calendarApi, error); + } + if (eventSource.failure) { + eventSource.failure(error); + } + context.dispatch({ + type: "RECEIVE_EVENT_ERROR", + sourceId: eventSource.sourceId, + fetchId: fetchId, + fetchRange: fetchRange, + error: error, + }); + } + ); + return __assign(__assign({}, eventSource), { + isFetching: true, + latestFetchId: fetchId, + }); + } + function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) { + var _a; + var eventSource = sourceHash[sourceId]; + if ( + eventSource && // not already removed + fetchId === eventSource.latestFetchId + ) { + return __assign( + __assign({}, sourceHash), + ((_a = {}), + (_a[sourceId] = __assign(__assign({}, eventSource), { + isFetching: false, + fetchRange: fetchRange, + })), + _a) + ); + } + return sourceHash; + } + function excludeStaticSources(eventSources, context) { + return filterHash(eventSources, function (eventSource) { + return doesSourceNeedRange(eventSource, context); + }); + } + function parseInitialSources(rawOptions, context) { + var refiners = buildEventSourceRefiners(context); + var rawSources = [].concat(rawOptions.eventSources || []); + var sources = []; // parsed + if (rawOptions.initialEvents) { + rawSources.unshift(rawOptions.initialEvents); + } + if (rawOptions.events) { + rawSources.unshift(rawOptions.events); + } + for ( + var _i = 0, rawSources_1 = rawSources; + _i < rawSources_1.length; + _i++ + ) { + var rawSource = rawSources_1[_i]; + var source = parseEventSource(rawSource, context, refiners); + if (source) { + sources.push(source); + } + } + return sources; + } + function doesSourceNeedRange(eventSource, context) { + var defs = context.pluginHooks.eventSourceDefs; + return !defs[eventSource.sourceDefId].ignoreRange; + } + + function reduceEventStore( + eventStore, + action, + eventSources, + dateProfile, + context + ) { + switch (action.type) { + case "RECEIVE_EVENTS": // raw + return receiveRawEvents( + eventStore, + eventSources[action.sourceId], + action.fetchId, + action.fetchRange, + action.rawEvents, + context + ); + case "ADD_EVENTS": // already parsed, but not expanded + return addEvent( + eventStore, + action.eventStore, // new ones + dateProfile ? dateProfile.activeRange : null, + context + ); + case "RESET_EVENTS": + return action.eventStore; + case "MERGE_EVENTS": // already parsed and expanded + return mergeEventStores(eventStore, action.eventStore); + case "PREV": // TODO: how do we track all actions that affect dateProfile :( + case "NEXT": + case "CHANGE_DATE": + case "CHANGE_VIEW_TYPE": + if (dateProfile) { + return expandRecurring(eventStore, dateProfile.activeRange, context); + } + return eventStore; + case "REMOVE_EVENTS": + return excludeSubEventStore(eventStore, action.eventStore); + case "REMOVE_EVENT_SOURCE": + return excludeEventsBySourceId(eventStore, action.sourceId); + case "REMOVE_ALL_EVENT_SOURCES": + return filterEventStoreDefs(eventStore, function (eventDef) { + return !eventDef.sourceId; // only keep events with no source id + }); + case "REMOVE_ALL_EVENTS": + return createEmptyEventStore(); + default: + return eventStore; + } + } + function receiveRawEvents( + eventStore, + eventSource, + fetchId, + fetchRange, + rawEvents, + context + ) { + if ( + eventSource && // not already removed + fetchId === eventSource.latestFetchId // TODO: wish this logic was always in event-sources + ) { + var subset = parseEvents( + transformRawEvents(rawEvents, eventSource, context), + eventSource, + context + ); + if (fetchRange) { + subset = expandRecurring(subset, fetchRange, context); + } + return mergeEventStores( + excludeEventsBySourceId(eventStore, eventSource.sourceId), + subset + ); + } + return eventStore; + } + function transformRawEvents(rawEvents, eventSource, context) { + var calEachTransform = context.options.eventDataTransform; + var sourceEachTransform = eventSource + ? eventSource.eventDataTransform + : null; + if (sourceEachTransform) { + rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform); + } + if (calEachTransform) { + rawEvents = transformEachRawEvent(rawEvents, calEachTransform); + } + return rawEvents; + } + function transformEachRawEvent(rawEvents, func) { + var refinedEvents; + if (!func) { + refinedEvents = rawEvents; + } else { + refinedEvents = []; + for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) { + var rawEvent = rawEvents_1[_i]; + var refinedEvent = func(rawEvent); + if (refinedEvent) { + refinedEvents.push(refinedEvent); + } else if (refinedEvent == null) { + refinedEvents.push(rawEvent); + } // if a different falsy value, do nothing + } + } + return refinedEvents; + } + function addEvent(eventStore, subset, expandRange, context) { + if (expandRange) { + subset = expandRecurring(subset, expandRange, context); + } + return mergeEventStores(eventStore, subset); + } + function rezoneEventStoreDates(eventStore, oldDateEnv, newDateEnv) { + var defs = eventStore.defs; + var instances = mapHash(eventStore.instances, function (instance) { + var def = defs[instance.defId]; + if (def.allDay || def.recurringDef) { + return instance; // isn't dependent on timezone + } + return __assign(__assign({}, instance), { + range: { + start: newDateEnv.createMarker( + oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo) + ), + end: newDateEnv.createMarker( + oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo) + ), + }, + forcedStartTzo: newDateEnv.canComputeOffset + ? null + : instance.forcedStartTzo, + forcedEndTzo: newDateEnv.canComputeOffset + ? null + : instance.forcedEndTzo, + }); + }); + return { defs: defs, instances: instances }; + } + function excludeEventsBySourceId(eventStore, sourceId) { + return filterEventStoreDefs(eventStore, function (eventDef) { + return eventDef.sourceId !== sourceId; + }); + } + // QUESTION: why not just return instances? do a general object-property-exclusion util + function excludeInstances(eventStore, removals) { + return { + defs: eventStore.defs, + instances: filterHash(eventStore.instances, function (instance) { + return !removals[instance.instanceId]; + }), + }; + } + + function reduceDateSelection(currentSelection, action) { + switch (action.type) { + case "UNSELECT_DATES": + return null; + case "SELECT_DATES": + return action.selection; + default: + return currentSelection; + } + } + + function reduceSelectedEvent(currentInstanceId, action) { + switch (action.type) { + case "UNSELECT_EVENT": + return ""; + case "SELECT_EVENT": + return action.eventInstanceId; + default: + return currentInstanceId; + } + } + + function reduceEventDrag(currentDrag, action) { + var newDrag; + switch (action.type) { + case "UNSET_EVENT_DRAG": + return null; + case "SET_EVENT_DRAG": + newDrag = action.state; + return { + affectedEvents: newDrag.affectedEvents, + mutatedEvents: newDrag.mutatedEvents, + isEvent: newDrag.isEvent, + }; + default: + return currentDrag; + } + } + + function reduceEventResize(currentResize, action) { + var newResize; + switch (action.type) { + case "UNSET_EVENT_RESIZE": + return null; + case "SET_EVENT_RESIZE": + newResize = action.state; + return { + affectedEvents: newResize.affectedEvents, + mutatedEvents: newResize.mutatedEvents, + isEvent: newResize.isEvent, + }; + default: + return currentResize; + } + } + + function parseToolbars( + calendarOptions, + calendarOptionOverrides, + theme, + viewSpecs, + calendarApi + ) { + var header = calendarOptions.headerToolbar + ? parseToolbar( + calendarOptions.headerToolbar, + calendarOptions, + calendarOptionOverrides, + theme, + viewSpecs, + calendarApi + ) + : null; + var footer = calendarOptions.footerToolbar + ? parseToolbar( + calendarOptions.footerToolbar, + calendarOptions, + calendarOptionOverrides, + theme, + viewSpecs, + calendarApi + ) + : null; + return { header: header, footer: footer }; + } + function parseToolbar( + sectionStrHash, + calendarOptions, + calendarOptionOverrides, + theme, + viewSpecs, + calendarApi + ) { + var sectionWidgets = {}; + var viewsWithButtons = []; + var hasTitle = false; + for (var sectionName in sectionStrHash) { + var sectionStr = sectionStrHash[sectionName]; + var sectionRes = parseSection( + sectionStr, + calendarOptions, + calendarOptionOverrides, + theme, + viewSpecs, + calendarApi + ); + sectionWidgets[sectionName] = sectionRes.widgets; + viewsWithButtons.push.apply( + viewsWithButtons, + sectionRes.viewsWithButtons + ); + hasTitle = hasTitle || sectionRes.hasTitle; + } + return { + sectionWidgets: sectionWidgets, + viewsWithButtons: viewsWithButtons, + hasTitle: hasTitle, + }; + } + /* + BAD: querying icons and text here. should be done at render time + */ + function parseSection( + sectionStr, + calendarOptions, // defaults+overrides, then refined + calendarOptionOverrides, // overrides only!, unrefined :( + theme, + viewSpecs, + calendarApi + ) { + var isRtl = calendarOptions.direction === "rtl"; + var calendarCustomButtons = calendarOptions.customButtons || {}; + var calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {}; + var calendarButtonText = calendarOptions.buttonText || {}; + var calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {}; + var calendarButtonHints = calendarOptions.buttonHints || {}; + var sectionSubstrs = sectionStr ? sectionStr.split(" ") : []; + var viewsWithButtons = []; + var hasTitle = false; + var widgets = sectionSubstrs.map(function (buttonGroupStr) { + return buttonGroupStr.split(",").map(function (buttonName) { + if (buttonName === "title") { + hasTitle = true; + return { buttonName: buttonName }; + } + var customButtonProps; + var viewSpec; + var buttonClick; + var buttonIcon; // only one of these will be set + var buttonText; // " + var buttonHint; + // ^ for the title="" attribute, for accessibility + if ((customButtonProps = calendarCustomButtons[buttonName])) { + buttonClick = function (ev) { + if (customButtonProps.click) { + customButtonProps.click.call(ev.target, ev, ev.target); // TODO: use Calendar this context? + } + }; + (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) || + (buttonIcon = theme.getIconClass(buttonName, isRtl)) || + (buttonText = customButtonProps.text); + buttonHint = customButtonProps.hint || customButtonProps.text; + } else if ((viewSpec = viewSpecs[buttonName])) { + viewsWithButtons.push(buttonName); + buttonClick = function () { + calendarApi.changeView(buttonName); + }; + (buttonText = viewSpec.buttonTextOverride) || + (buttonIcon = theme.getIconClass(buttonName, isRtl)) || + (buttonText = viewSpec.buttonTextDefault); + var textFallback = + viewSpec.buttonTextOverride || viewSpec.buttonTextDefault; + buttonHint = formatWithOrdinals( + viewSpec.buttonTitleOverride || + viewSpec.buttonTitleDefault || + calendarOptions.viewHint, + [textFallback, buttonName], // view-name = buttonName + textFallback + ); + } else if (calendarApi[buttonName]) { + // a calendarApi method + buttonClick = function () { + calendarApi[buttonName](); + }; + (buttonText = calendarButtonTextOverrides[buttonName]) || + (buttonIcon = theme.getIconClass(buttonName, isRtl)) || + (buttonText = calendarButtonText[buttonName]); // everything else is considered default + if (buttonName === "prevYear" || buttonName === "nextYear") { + var prevOrNext = buttonName === "prevYear" ? "prev" : "next"; + buttonHint = formatWithOrdinals( + calendarButtonHintOverrides[prevOrNext] || + calendarButtonHints[prevOrNext], + [calendarButtonText.year || "year", "year"], + calendarButtonText[buttonName] + ); + } else { + buttonHint = function (navUnit) { + return formatWithOrdinals( + calendarButtonHintOverrides[buttonName] || + calendarButtonHints[buttonName], + [calendarButtonText[navUnit] || navUnit, navUnit], + calendarButtonText[buttonName] + ); + }; + } + } + return { + buttonName: buttonName, + buttonClick: buttonClick, + buttonIcon: buttonIcon, + buttonText: buttonText, + buttonHint: buttonHint, + }; + }); + }); + return { + widgets: widgets, + viewsWithButtons: viewsWithButtons, + hasTitle: hasTitle, + }; + } + + var eventSourceDef$3 = { + ignoreRange: true, + parseMeta: function (refined) { + if (Array.isArray(refined.events)) { + return refined.events; + } + return null; + }, + fetch: function (arg, success) { + success({ + rawEvents: arg.eventSource.meta, + }); + }, + }; + var arrayEventSourcePlugin = createPlugin({ + eventSourceDefs: [eventSourceDef$3], + }); + + var eventSourceDef$2 = { + parseMeta: function (refined) { + if (typeof refined.events === "function") { + return refined.events; + } + return null; + }, + fetch: function (arg, success, failure) { + var dateEnv = arg.context.dateEnv; + var func = arg.eventSource.meta; + unpromisify( + func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), + function (rawEvents) { + success({ rawEvents: rawEvents }); // needs an object response + }, + failure + ); + }, + }; + var funcEventSourcePlugin = createPlugin({ + eventSourceDefs: [eventSourceDef$2], + }); + + function requestJson(method, url, params, successCallback, failureCallback) { + method = method.toUpperCase(); + var body = null; + if (method === "GET") { + url = injectQueryStringParams(url, params); + } else { + body = encodeParams(params); + } + var xhr = new XMLHttpRequest(); + xhr.open(method, url, true); + if (method !== "GET") { + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + } + xhr.onload = function () { + if (xhr.status >= 200 && xhr.status < 400) { + var parsed = false; + var res = void 0; + try { + res = JSON.parse(xhr.responseText); + parsed = true; + } catch (err) { + // will handle parsed=false + } + if (parsed) { + successCallback(res, xhr); + } else { + failureCallback("Failure parsing JSON", xhr); + } + } else { + failureCallback("Request failed", xhr); + } + }; + xhr.onerror = function () { + failureCallback("Request failed", xhr); + }; + xhr.send(body); + } + function injectQueryStringParams(url, params) { + return url + (url.indexOf("?") === -1 ? "?" : "&") + encodeParams(params); + } + function encodeParams(params) { + var parts = []; + for (var key in params) { + parts.push( + encodeURIComponent(key) + "=" + encodeURIComponent(params[key]) + ); + } + return parts.join("&"); + } + + var JSON_FEED_EVENT_SOURCE_REFINERS = { + method: String, + extraParams: identity, + startParam: String, + endParam: String, + timeZoneParam: String, + }; + + var eventSourceDef$1 = { + parseMeta: function (refined) { + if (refined.url && (refined.format === "json" || !refined.format)) { + return { + url: refined.url, + format: "json", + method: (refined.method || "GET").toUpperCase(), + extraParams: refined.extraParams, + startParam: refined.startParam, + endParam: refined.endParam, + timeZoneParam: refined.timeZoneParam, + }; + } + return null; + }, + fetch: function (arg, success, failure) { + var meta = arg.eventSource.meta; + var requestParams = buildRequestParams$1(meta, arg.range, arg.context); + requestJson( + meta.method, + meta.url, + requestParams, + function (rawEvents, xhr) { + success({ rawEvents: rawEvents, xhr: xhr }); + }, + function (errorMessage, xhr) { + failure({ message: errorMessage, xhr: xhr }); + } + ); + }, + }; + var jsonFeedEventSourcePlugin = createPlugin({ + eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS, + eventSourceDefs: [eventSourceDef$1], + }); + function buildRequestParams$1(meta, range, context) { + var dateEnv = context.dateEnv, + options = context.options; + var startParam; + var endParam; + var timeZoneParam; + var customRequestParams; + var params = {}; + startParam = meta.startParam; + if (startParam == null) { + startParam = options.startParam; + } + endParam = meta.endParam; + if (endParam == null) { + endParam = options.endParam; + } + timeZoneParam = meta.timeZoneParam; + if (timeZoneParam == null) { + timeZoneParam = options.timeZoneParam; + } + // retrieve any outbound GET/POST data from the options + if (typeof meta.extraParams === "function") { + // supplied as a function that returns a key/value object + customRequestParams = meta.extraParams(); + } else { + // probably supplied as a straight key/value object + customRequestParams = meta.extraParams || {}; + } + __assign(params, customRequestParams); + params[startParam] = dateEnv.formatIso(range.start); + params[endParam] = dateEnv.formatIso(range.end); + if (dateEnv.timeZone !== "local") { + params[timeZoneParam] = dateEnv.timeZone; + } + return params; + } + + var SIMPLE_RECURRING_REFINERS = { + daysOfWeek: identity, + startTime: createDuration, + endTime: createDuration, + duration: createDuration, + startRecur: identity, + endRecur: identity, + }; + + var recurring = { + parse: function (refined, dateEnv) { + if ( + refined.daysOfWeek || + refined.startTime || + refined.endTime || + refined.startRecur || + refined.endRecur + ) { + var recurringData = { + daysOfWeek: refined.daysOfWeek || null, + startTime: refined.startTime || null, + endTime: refined.endTime || null, + startRecur: refined.startRecur + ? dateEnv.createMarker(refined.startRecur) + : null, + endRecur: refined.endRecur + ? dateEnv.createMarker(refined.endRecur) + : null, + }; + var duration = void 0; + if (refined.duration) { + duration = refined.duration; + } + if (!duration && refined.startTime && refined.endTime) { + duration = subtractDurations(refined.endTime, refined.startTime); + } + return { + allDayGuess: Boolean(!refined.startTime && !refined.endTime), + duration: duration, + typeData: recurringData, // doesn't need endTime anymore but oh well + }; + } + return null; + }, + expand: function (typeData, framingRange, dateEnv) { + var clippedFramingRange = intersectRanges(framingRange, { + start: typeData.startRecur, + end: typeData.endRecur, + }); + if (clippedFramingRange) { + return expandRanges( + typeData.daysOfWeek, + typeData.startTime, + clippedFramingRange, + dateEnv + ); + } + return []; + }, + }; + var simpleRecurringEventsPlugin = createPlugin({ + recurringTypes: [recurring], + eventRefiners: SIMPLE_RECURRING_REFINERS, + }); + function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) { + var dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null; + var dayMarker = startOfDay(framingRange.start); + var endMarker = framingRange.end; + var instanceStarts = []; + while (dayMarker < endMarker) { + var instanceStart = + // if everyday, or this particular day-of-week + void 0; + // if everyday, or this particular day-of-week + if (!dowHash || dowHash[dayMarker.getUTCDay()]) { + if (startTime) { + instanceStart = dateEnv.add(dayMarker, startTime); + } else { + instanceStart = dayMarker; + } + instanceStarts.push(instanceStart); + } + dayMarker = addDays(dayMarker, 1); + } + return instanceStarts; + } + + var changeHandlerPlugin = createPlugin({ + optionChangeHandlers: { + events: function (events, context) { + handleEventSources([events], context); + }, + eventSources: handleEventSources, + }, + }); + /* + BUG: if `event` was supplied, all previously-given `eventSources` will be wiped out + */ + function handleEventSources(inputs, context) { + var unfoundSources = hashValuesToArray( + context.getCurrentData().eventSources + ); + var newInputs = []; + for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { + var input = inputs_1[_i]; + var inputFound = false; + for (var i = 0; i < unfoundSources.length; i += 1) { + if (unfoundSources[i]._raw === input) { + unfoundSources.splice(i, 1); // delete + inputFound = true; + break; + } + } + if (!inputFound) { + newInputs.push(input); + } + } + for ( + var _a = 0, unfoundSources_1 = unfoundSources; + _a < unfoundSources_1.length; + _a++ + ) { + var unfoundSource = unfoundSources_1[_a]; + context.dispatch({ + type: "REMOVE_EVENT_SOURCE", + sourceId: unfoundSource.sourceId, + }); + } + for (var _b = 0, newInputs_1 = newInputs; _b < newInputs_1.length; _b++) { + var newInput = newInputs_1[_b]; + context.calendarApi.addEventSource(newInput); + } + } + + function handleDateProfile(dateProfile, context) { + context.emitter.trigger( + "datesSet", + __assign( + __assign( + {}, + buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv) + ), + { view: context.viewApi } + ) + ); + } + + function handleEventStore(eventStore, context) { + var emitter = context.emitter; + if (emitter.hasHandlers("eventsSet")) { + emitter.trigger("eventsSet", buildEventApis(eventStore, context)); + } + } + + /* + this array is exposed on the root namespace so that UMD plugins can add to it. + see the rollup-bundles script. + */ + var globalPlugins = [ + arrayEventSourcePlugin, + funcEventSourcePlugin, + jsonFeedEventSourcePlugin, + simpleRecurringEventsPlugin, + changeHandlerPlugin, + createPlugin({ + isLoadingFuncs: [ + function (state) { + return computeEventSourcesLoading(state.eventSources); + }, + ], + contentTypeHandlers: { + html: buildHtmlRenderer, + domNodes: buildDomNodeRenderer, + }, + propSetHandlers: { + dateProfile: handleDateProfile, + eventStore: handleEventStore, + }, + }), + ]; + function buildHtmlRenderer() { + var currentEl = null; + var currentHtml = ""; + function render(el, html) { + if (el !== currentEl || html !== currentHtml) { + el.innerHTML = html; + } + currentEl = el; + currentHtml = html; + } + function destroy() { + currentEl.innerHTML = ""; + currentEl = null; + currentHtml = ""; + } + return { render: render, destroy: destroy }; + } + function buildDomNodeRenderer() { + var currentEl = null; + var currentDomNodes = []; + function render(el, domNodes) { + var newDomNodes = Array.prototype.slice.call(domNodes); + if (el !== currentEl || !isArraysEqual(currentDomNodes, newDomNodes)) { + // append first, remove second (for scroll resetting) + for ( + var _i = 0, newDomNodes_1 = newDomNodes; + _i < newDomNodes_1.length; + _i++ + ) { + var newNode = newDomNodes_1[_i]; + el.appendChild(newNode); + } + destroy(); + } + currentEl = el; + currentDomNodes = newDomNodes; + } + function destroy() { + currentDomNodes.forEach(removeElement); + currentDomNodes = []; + currentEl = null; + } + return { render: render, destroy: destroy }; + } + + var DelayedRunner = /** @class */ (function () { + function DelayedRunner(drainedOption) { + this.drainedOption = drainedOption; + this.isRunning = false; + this.isDirty = false; + this.pauseDepths = {}; + this.timeoutId = 0; + } + DelayedRunner.prototype.request = function (delay) { + this.isDirty = true; + if (!this.isPaused()) { + this.clearTimeout(); + if (delay == null) { + this.tryDrain(); + } else { + this.timeoutId = setTimeout( + // NOT OPTIMAL! TODO: look at debounce + this.tryDrain.bind(this), + delay + ); + } + } + }; + DelayedRunner.prototype.pause = function (scope) { + if (scope === void 0) { + scope = ""; + } + var pauseDepths = this.pauseDepths; + pauseDepths[scope] = (pauseDepths[scope] || 0) + 1; + this.clearTimeout(); + }; + DelayedRunner.prototype.resume = function (scope, force) { + if (scope === void 0) { + scope = ""; + } + var pauseDepths = this.pauseDepths; + if (scope in pauseDepths) { + if (force) { + delete pauseDepths[scope]; + } else { + pauseDepths[scope] -= 1; + var depth = pauseDepths[scope]; + if (depth <= 0) { + delete pauseDepths[scope]; + } + } + this.tryDrain(); + } + }; + DelayedRunner.prototype.isPaused = function () { + return Object.keys(this.pauseDepths).length; + }; + DelayedRunner.prototype.tryDrain = function () { + if (!this.isRunning && !this.isPaused()) { + this.isRunning = true; + while (this.isDirty) { + this.isDirty = false; + this.drained(); // might set isDirty to true again + } + this.isRunning = false; + } + }; + DelayedRunner.prototype.clear = function () { + this.clearTimeout(); + this.isDirty = false; + this.pauseDepths = {}; + }; + DelayedRunner.prototype.clearTimeout = function () { + if (this.timeoutId) { + clearTimeout(this.timeoutId); + this.timeoutId = 0; + } + }; + DelayedRunner.prototype.drained = function () { + if (this.drainedOption) { + this.drainedOption(); + } + }; + return DelayedRunner; + })(); + + var TaskRunner = /** @class */ (function () { + function TaskRunner(runTaskOption, drainedOption) { + this.runTaskOption = runTaskOption; + this.drainedOption = drainedOption; + this.queue = []; + this.delayedRunner = new DelayedRunner(this.drain.bind(this)); + } + TaskRunner.prototype.request = function (task, delay) { + this.queue.push(task); + this.delayedRunner.request(delay); + }; + TaskRunner.prototype.pause = function (scope) { + this.delayedRunner.pause(scope); + }; + TaskRunner.prototype.resume = function (scope, force) { + this.delayedRunner.resume(scope, force); + }; + TaskRunner.prototype.drain = function () { + var queue = this.queue; + while (queue.length) { + var completedTasks = []; + var task = void 0; + while ((task = queue.shift())) { + this.runTask(task); + completedTasks.push(task); + } + this.drained(completedTasks); + } // keep going, in case new tasks were added in the drained handler + }; + TaskRunner.prototype.runTask = function (task) { + if (this.runTaskOption) { + this.runTaskOption(task); + } + }; + TaskRunner.prototype.drained = function (completedTasks) { + if (this.drainedOption) { + this.drainedOption(completedTasks); + } + }; + return TaskRunner; + })(); + + // Computes what the title at the top of the calendarApi should be for this view + function buildTitle(dateProfile, viewOptions, dateEnv) { + var range; + // for views that span a large unit of time, show the proper interval, ignoring stray days before and after + if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) { + range = dateProfile.currentRange; + } else { + // for day units or smaller, use the actual day range + range = dateProfile.activeRange; + } + return dateEnv.formatRange( + range.start, + range.end, + createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), + { + isEndExclusive: dateProfile.isRangeAllDay, + defaultSeparator: viewOptions.titleRangeSeparator, + } + ); + } + // Generates the format string that should be used to generate the title for the current date range. + // Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`. + function buildTitleFormat(dateProfile) { + var currentRangeUnit = dateProfile.currentRangeUnit; + if (currentRangeUnit === "year") { + return { year: "numeric" }; + } + if (currentRangeUnit === "month") { + return { year: "numeric", month: "long" }; // like "September 2014" + } + var days = diffWholeDays( + dateProfile.currentRange.start, + dateProfile.currentRange.end + ); + if (days !== null && days > 1) { + // multi-day range. shorter, like "Sep 9 - 10 2014" + return { year: "numeric", month: "short", day: "numeric" }; + } + // one day. longer, like "September 9 2014" + return { year: "numeric", month: "long", day: "numeric" }; + } + + // in future refactor, do the redux-style function(state=initial) for initial-state + // also, whatever is happening in constructor, have it happen in action queue too + var CalendarDataManager = /** @class */ (function () { + function CalendarDataManager(props) { + var _this = this; + this.computeOptionsData = memoize(this._computeOptionsData); + this.computeCurrentViewData = memoize(this._computeCurrentViewData); + this.organizeRawLocales = memoize(organizeRawLocales); + this.buildLocale = memoize(buildLocale); + this.buildPluginHooks = buildBuildPluginHooks(); + this.buildDateEnv = memoize(buildDateEnv); + this.buildTheme = memoize(buildTheme); + this.parseToolbars = memoize(parseToolbars); + this.buildViewSpecs = memoize(buildViewSpecs); + this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator); + this.buildViewApi = memoize(buildViewApi); + this.buildViewUiProps = memoizeObjArg(buildViewUiProps); + this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual); + this.buildEventUiBases = memoize(buildEventUiBases); + this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours); + this.buildTitle = memoize(buildTitle); + this.emitter = new Emitter(); + this.actionRunner = new TaskRunner( + this._handleAction.bind(this), + this.updateData.bind(this) + ); + this.currentCalendarOptionsInput = {}; + this.currentCalendarOptionsRefined = {}; + this.currentViewOptionsInput = {}; + this.currentViewOptionsRefined = {}; + this.currentCalendarOptionsRefiners = {}; + this.getCurrentData = function () { + return _this.data; + }; + this.dispatch = function (action) { + _this.actionRunner.request(action); // protects against recursive calls to _handleAction + }; + this.props = props; + this.actionRunner.pause(); + var dynamicOptionOverrides = {}; + var optionsData = this.computeOptionsData( + props.optionOverrides, + dynamicOptionOverrides, + props.calendarApi + ); + var currentViewType = + optionsData.calendarOptions.initialView || + optionsData.pluginHooks.initialView; + var currentViewData = this.computeCurrentViewData( + currentViewType, + optionsData, + props.optionOverrides, + dynamicOptionOverrides + ); + // wire things up + // TODO: not DRY + props.calendarApi.currentDataManager = this; + this.emitter.setThisContext(props.calendarApi); + this.emitter.setOptions(currentViewData.options); + var currentDate = getInitialDate( + optionsData.calendarOptions, + optionsData.dateEnv + ); + var dateProfile = currentViewData.dateProfileGenerator.build(currentDate); + if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) { + currentDate = dateProfile.currentRange.start; + } + var calendarContext = { + dateEnv: optionsData.dateEnv, + options: optionsData.calendarOptions, + pluginHooks: optionsData.pluginHooks, + calendarApi: props.calendarApi, + dispatch: this.dispatch, + emitter: this.emitter, + getCurrentData: this.getCurrentData, + }; + // needs to be after setThisContext + for ( + var _i = 0, _a = optionsData.pluginHooks.contextInit; + _i < _a.length; + _i++ + ) { + var callback = _a[_i]; + callback(calendarContext); + } + // NOT DRY + var eventSources = initEventSources( + optionsData.calendarOptions, + dateProfile, + calendarContext + ); + var initialState = { + dynamicOptionOverrides: dynamicOptionOverrides, + currentViewType: currentViewType, + currentDate: currentDate, + dateProfile: dateProfile, + businessHours: this.parseContextBusinessHours(calendarContext), + eventSources: eventSources, + eventUiBases: {}, + eventStore: createEmptyEventStore(), + renderableEventStore: createEmptyEventStore(), + dateSelection: null, + eventSelection: "", + eventDrag: null, + eventResize: null, + selectionConfig: this.buildViewUiProps(calendarContext).selectionConfig, + }; + var contextAndState = __assign( + __assign({}, calendarContext), + initialState + ); + for ( + var _b = 0, _c = optionsData.pluginHooks.reducers; + _b < _c.length; + _b++ + ) { + var reducer = _c[_b]; + __assign(initialState, reducer(null, null, contextAndState)); + } + if (computeIsLoading(initialState, calendarContext)) { + this.emitter.trigger("loading", true); // NOT DRY + } + this.state = initialState; + this.updateData(); + this.actionRunner.resume(); + } + CalendarDataManager.prototype.resetOptions = function ( + optionOverrides, + append + ) { + var props = this.props; + props.optionOverrides = append + ? __assign(__assign({}, props.optionOverrides), optionOverrides) + : optionOverrides; + this.actionRunner.request({ + type: "NOTHING", + }); + }; + CalendarDataManager.prototype._handleAction = function (action) { + var _a = this, + props = _a.props, + state = _a.state, + emitter = _a.emitter; + var dynamicOptionOverrides = reduceDynamicOptionOverrides( + state.dynamicOptionOverrides, + action + ); + var optionsData = this.computeOptionsData( + props.optionOverrides, + dynamicOptionOverrides, + props.calendarApi + ); + var currentViewType = reduceViewType(state.currentViewType, action); + var currentViewData = this.computeCurrentViewData( + currentViewType, + optionsData, + props.optionOverrides, + dynamicOptionOverrides + ); + // wire things up + // TODO: not DRY + props.calendarApi.currentDataManager = this; + emitter.setThisContext(props.calendarApi); + emitter.setOptions(currentViewData.options); + var calendarContext = { + dateEnv: optionsData.dateEnv, + options: optionsData.calendarOptions, + pluginHooks: optionsData.pluginHooks, + calendarApi: props.calendarApi, + dispatch: this.dispatch, + emitter: emitter, + getCurrentData: this.getCurrentData, + }; + var currentDate = state.currentDate, + dateProfile = state.dateProfile; + if ( + this.data && + this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator + ) { + // hack + dateProfile = currentViewData.dateProfileGenerator.build(currentDate); + } + currentDate = reduceCurrentDate(currentDate, action); + dateProfile = reduceDateProfile( + dateProfile, + action, + currentDate, + currentViewData.dateProfileGenerator + ); + if ( + action.type === "PREV" || // TODO: move this logic into DateProfileGenerator + action.type === "NEXT" || // " + !rangeContainsMarker(dateProfile.currentRange, currentDate) + ) { + currentDate = dateProfile.currentRange.start; + } + var eventSources = reduceEventSources( + state.eventSources, + action, + dateProfile, + calendarContext + ); + var eventStore = reduceEventStore( + state.eventStore, + action, + eventSources, + dateProfile, + calendarContext + ); + var isEventsLoading = computeEventSourcesLoading(eventSources); // BAD. also called in this func in computeIsLoading + var renderableEventStore = + isEventsLoading && !currentViewData.options.progressiveEventRendering + ? state.renderableEventStore || eventStore // try from previous state + : eventStore; + var _b = this.buildViewUiProps(calendarContext), + eventUiSingleBase = _b.eventUiSingleBase, + selectionConfig = _b.selectionConfig; // will memoize obj + var eventUiBySource = this.buildEventUiBySource(eventSources); + var eventUiBases = this.buildEventUiBases( + renderableEventStore.defs, + eventUiSingleBase, + eventUiBySource + ); + var newState = { + dynamicOptionOverrides: dynamicOptionOverrides, + currentViewType: currentViewType, + currentDate: currentDate, + dateProfile: dateProfile, + eventSources: eventSources, + eventStore: eventStore, + renderableEventStore: renderableEventStore, + selectionConfig: selectionConfig, + eventUiBases: eventUiBases, + businessHours: this.parseContextBusinessHours(calendarContext), + dateSelection: reduceDateSelection(state.dateSelection, action), + eventSelection: reduceSelectedEvent(state.eventSelection, action), + eventDrag: reduceEventDrag(state.eventDrag, action), + eventResize: reduceEventResize(state.eventResize, action), + }; + var contextAndState = __assign(__assign({}, calendarContext), newState); + for ( + var _i = 0, _c = optionsData.pluginHooks.reducers; + _i < _c.length; + _i++ + ) { + var reducer = _c[_i]; + __assign(newState, reducer(state, action, contextAndState)); // give the OLD state, for old value + } + var wasLoading = computeIsLoading(state, calendarContext); + var isLoading = computeIsLoading(newState, calendarContext); + // TODO: use propSetHandlers in plugin system + if (!wasLoading && isLoading) { + emitter.trigger("loading", true); + } else if (wasLoading && !isLoading) { + emitter.trigger("loading", false); + } + this.state = newState; + if (props.onAction) { + props.onAction(action); + } + }; + CalendarDataManager.prototype.updateData = function () { + var _a = this, + props = _a.props, + state = _a.state; + var oldData = this.data; + var optionsData = this.computeOptionsData( + props.optionOverrides, + state.dynamicOptionOverrides, + props.calendarApi + ); + var currentViewData = this.computeCurrentViewData( + state.currentViewType, + optionsData, + props.optionOverrides, + state.dynamicOptionOverrides + ); + var data = (this.data = __assign( + __assign( + __assign( + { + viewTitle: this.buildTitle( + state.dateProfile, + currentViewData.options, + optionsData.dateEnv + ), + calendarApi: props.calendarApi, + dispatch: this.dispatch, + emitter: this.emitter, + getCurrentData: this.getCurrentData, + }, + optionsData + ), + currentViewData + ), + state + )); + var changeHandlers = optionsData.pluginHooks.optionChangeHandlers; + var oldCalendarOptions = oldData && oldData.calendarOptions; + var newCalendarOptions = optionsData.calendarOptions; + if (oldCalendarOptions && oldCalendarOptions !== newCalendarOptions) { + if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) { + // hack + state.eventSources = data.eventSources = + reduceEventSourcesNewTimeZone( + data.eventSources, + state.dateProfile, + data + ); + state.eventStore = data.eventStore = rezoneEventStoreDates( + data.eventStore, + oldData.dateEnv, + data.dateEnv + ); + } + for (var optionName in changeHandlers) { + if ( + oldCalendarOptions[optionName] !== newCalendarOptions[optionName] + ) { + changeHandlers[optionName](newCalendarOptions[optionName], data); + } + } + } + if (props.onData) { + props.onData(data); + } + }; + CalendarDataManager.prototype._computeOptionsData = function ( + optionOverrides, + dynamicOptionOverrides, + calendarApi + ) { + // TODO: blacklist options that are handled by optionChangeHandlers + var _a = this.processRawCalendarOptions( + optionOverrides, + dynamicOptionOverrides + ), + refinedOptions = _a.refinedOptions, + pluginHooks = _a.pluginHooks, + localeDefaults = _a.localeDefaults, + availableLocaleData = _a.availableLocaleData, + extra = _a.extra; + warnUnknownOptions(extra); + var dateEnv = this.buildDateEnv( + refinedOptions.timeZone, + refinedOptions.locale, + refinedOptions.weekNumberCalculation, + refinedOptions.firstDay, + refinedOptions.weekText, + pluginHooks, + availableLocaleData, + refinedOptions.defaultRangeSeparator + ); + var viewSpecs = this.buildViewSpecs( + pluginHooks.views, + optionOverrides, + dynamicOptionOverrides, + localeDefaults + ); + var theme = this.buildTheme(refinedOptions, pluginHooks); + var toolbarConfig = this.parseToolbars( + refinedOptions, + optionOverrides, + theme, + viewSpecs, + calendarApi + ); + return { + calendarOptions: refinedOptions, + pluginHooks: pluginHooks, + dateEnv: dateEnv, + viewSpecs: viewSpecs, + theme: theme, + toolbarConfig: toolbarConfig, + localeDefaults: localeDefaults, + availableRawLocales: availableLocaleData.map, + }; + }; + // always called from behind a memoizer + CalendarDataManager.prototype.processRawCalendarOptions = function ( + optionOverrides, + dynamicOptionOverrides + ) { + var _a = mergeRawOptions([ + BASE_OPTION_DEFAULTS, + optionOverrides, + dynamicOptionOverrides, + ]), + locales = _a.locales, + locale = _a.locale; + var availableLocaleData = this.organizeRawLocales(locales); + var availableRawLocales = availableLocaleData.map; + var localeDefaults = this.buildLocale( + locale || availableLocaleData.defaultCode, + availableRawLocales + ).options; + var pluginHooks = this.buildPluginHooks( + optionOverrides.plugins || [], + globalPlugins + ); + var refiners = (this.currentCalendarOptionsRefiners = __assign( + __assign( + __assign( + __assign( + __assign({}, BASE_OPTION_REFINERS), + CALENDAR_LISTENER_REFINERS + ), + CALENDAR_OPTION_REFINERS + ), + pluginHooks.listenerRefiners + ), + pluginHooks.optionRefiners + )); + var extra = {}; + var raw = mergeRawOptions([ + BASE_OPTION_DEFAULTS, + localeDefaults, + optionOverrides, + dynamicOptionOverrides, + ]); + var refined = {}; + var currentRaw = this.currentCalendarOptionsInput; + var currentRefined = this.currentCalendarOptionsRefined; + var anyChanges = false; + for (var optionName in raw) { + if (optionName !== "plugins") { + // because plugins is special-cased + if ( + raw[optionName] === currentRaw[optionName] || + (COMPLEX_OPTION_COMPARATORS[optionName] && + optionName in currentRaw && + COMPLEX_OPTION_COMPARATORS[optionName]( + currentRaw[optionName], + raw[optionName] + )) + ) { + refined[optionName] = currentRefined[optionName]; + } else if (refiners[optionName]) { + refined[optionName] = refiners[optionName](raw[optionName]); + anyChanges = true; + } else { + extra[optionName] = currentRaw[optionName]; + } + } + } + if (anyChanges) { + this.currentCalendarOptionsInput = raw; + this.currentCalendarOptionsRefined = refined; + } + return { + rawOptions: this.currentCalendarOptionsInput, + refinedOptions: this.currentCalendarOptionsRefined, + pluginHooks: pluginHooks, + availableLocaleData: availableLocaleData, + localeDefaults: localeDefaults, + extra: extra, + }; + }; + CalendarDataManager.prototype._computeCurrentViewData = function ( + viewType, + optionsData, + optionOverrides, + dynamicOptionOverrides + ) { + var viewSpec = optionsData.viewSpecs[viewType]; + if (!viewSpec) { + throw new Error( + 'viewType "' + + viewType + + "\" is not available. Please make sure you've loaded all neccessary plugins" + ); + } + var _a = this.processRawViewOptions( + viewSpec, + optionsData.pluginHooks, + optionsData.localeDefaults, + optionOverrides, + dynamicOptionOverrides + ), + refinedOptions = _a.refinedOptions, + extra = _a.extra; + warnUnknownOptions(extra); + var dateProfileGenerator = this.buildDateProfileGenerator({ + dateProfileGeneratorClass: + viewSpec.optionDefaults.dateProfileGeneratorClass, + duration: viewSpec.duration, + durationUnit: viewSpec.durationUnit, + usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime, + dateEnv: optionsData.dateEnv, + calendarApi: this.props.calendarApi, + slotMinTime: refinedOptions.slotMinTime, + slotMaxTime: refinedOptions.slotMaxTime, + showNonCurrentDates: refinedOptions.showNonCurrentDates, + dayCount: refinedOptions.dayCount, + dateAlignment: refinedOptions.dateAlignment, + dateIncrement: refinedOptions.dateIncrement, + hiddenDays: refinedOptions.hiddenDays, + weekends: refinedOptions.weekends, + nowInput: refinedOptions.now, + validRangeInput: refinedOptions.validRange, + visibleRangeInput: refinedOptions.visibleRange, + monthMode: refinedOptions.monthMode, + fixedWeekCount: refinedOptions.fixedWeekCount, + }); + var viewApi = this.buildViewApi( + viewType, + this.getCurrentData, + optionsData.dateEnv + ); + return { + viewSpec: viewSpec, + options: refinedOptions, + dateProfileGenerator: dateProfileGenerator, + viewApi: viewApi, + }; + }; + CalendarDataManager.prototype.processRawViewOptions = function ( + viewSpec, + pluginHooks, + localeDefaults, + optionOverrides, + dynamicOptionOverrides + ) { + var raw = mergeRawOptions([ + BASE_OPTION_DEFAULTS, + viewSpec.optionDefaults, + localeDefaults, + optionOverrides, + viewSpec.optionOverrides, + dynamicOptionOverrides, + ]); + var refiners = __assign( + __assign( + __assign( + __assign( + __assign( + __assign({}, BASE_OPTION_REFINERS), + CALENDAR_LISTENER_REFINERS + ), + CALENDAR_OPTION_REFINERS + ), + VIEW_OPTION_REFINERS + ), + pluginHooks.listenerRefiners + ), + pluginHooks.optionRefiners + ); + var refined = {}; + var currentRaw = this.currentViewOptionsInput; + var currentRefined = this.currentViewOptionsRefined; + var anyChanges = false; + var extra = {}; + for (var optionName in raw) { + if ( + raw[optionName] === currentRaw[optionName] || + (COMPLEX_OPTION_COMPARATORS[optionName] && + COMPLEX_OPTION_COMPARATORS[optionName]( + raw[optionName], + currentRaw[optionName] + )) + ) { + refined[optionName] = currentRefined[optionName]; + } else { + if ( + raw[optionName] === this.currentCalendarOptionsInput[optionName] || + (COMPLEX_OPTION_COMPARATORS[optionName] && + COMPLEX_OPTION_COMPARATORS[optionName]( + raw[optionName], + this.currentCalendarOptionsInput[optionName] + )) + ) { + if (optionName in this.currentCalendarOptionsRefined) { + // might be an "extra" prop + refined[optionName] = + this.currentCalendarOptionsRefined[optionName]; + } + } else if (refiners[optionName]) { + refined[optionName] = refiners[optionName](raw[optionName]); + } else { + extra[optionName] = raw[optionName]; + } + anyChanges = true; + } + } + if (anyChanges) { + this.currentViewOptionsInput = raw; + this.currentViewOptionsRefined = refined; + } + return { + rawOptions: this.currentViewOptionsInput, + refinedOptions: this.currentViewOptionsRefined, + extra: extra, + }; + }; + return CalendarDataManager; + })(); + function buildDateEnv( + timeZone, + explicitLocale, + weekNumberCalculation, + firstDay, + weekText, + pluginHooks, + availableLocaleData, + defaultSeparator + ) { + var locale = buildLocale( + explicitLocale || availableLocaleData.defaultCode, + availableLocaleData.map + ); + return new DateEnv({ + calendarSystem: "gregory", + timeZone: timeZone, + namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl, + locale: locale, + weekNumberCalculation: weekNumberCalculation, + firstDay: firstDay, + weekText: weekText, + cmdFormatter: pluginHooks.cmdFormatter, + defaultSeparator: defaultSeparator, + }); + } + function buildTheme(options, pluginHooks) { + var ThemeClass = + pluginHooks.themeClasses[options.themeSystem] || StandardTheme; + return new ThemeClass(options); + } + function buildDateProfileGenerator(props) { + var DateProfileGeneratorClass = + props.dateProfileGeneratorClass || DateProfileGenerator; + return new DateProfileGeneratorClass(props); + } + function buildViewApi(type, getCurrentData, dateEnv) { + return new ViewApi(type, getCurrentData, dateEnv); + } + function buildEventUiBySource(eventSources) { + return mapHash(eventSources, function (eventSource) { + return eventSource.ui; + }); + } + function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) { + var eventUiBases = { "": eventUiSingleBase }; + for (var defId in eventDefs) { + var def = eventDefs[defId]; + if (def.sourceId && eventUiBySource[def.sourceId]) { + eventUiBases[defId] = eventUiBySource[def.sourceId]; + } + } + return eventUiBases; + } + function buildViewUiProps(calendarContext) { + var options = calendarContext.options; + return { + eventUiSingleBase: createEventUi( + { + display: options.eventDisplay, + editable: options.editable, + startEditable: options.eventStartEditable, + durationEditable: options.eventDurationEditable, + constraint: options.eventConstraint, + overlap: + typeof options.eventOverlap === "boolean" + ? options.eventOverlap + : undefined, + allow: options.eventAllow, + backgroundColor: options.eventBackgroundColor, + borderColor: options.eventBorderColor, + textColor: options.eventTextColor, + color: options.eventColor, + // classNames: options.eventClassNames // render hook will handle this + }, + calendarContext + ), + selectionConfig: createEventUi( + { + constraint: options.selectConstraint, + overlap: + typeof options.selectOverlap === "boolean" + ? options.selectOverlap + : undefined, + allow: options.selectAllow, + }, + calendarContext + ), + }; + } + function computeIsLoading(state, context) { + for ( + var _i = 0, _a = context.pluginHooks.isLoadingFuncs; + _i < _a.length; + _i++ + ) { + var isLoadingFunc = _a[_i]; + if (isLoadingFunc(state)) { + return true; + } + } + return false; + } + function parseContextBusinessHours(calendarContext) { + return parseBusinessHours( + calendarContext.options.businessHours, + calendarContext + ); + } + function warnUnknownOptions(options, viewName) { + for (var optionName in options) { + console.warn( + "Unknown option '" + + optionName + + "'" + + (viewName ? " for view '" + viewName + "'" : "") + ); + } + } + + // TODO: move this to react plugin? + var CalendarDataProvider = /** @class */ (function (_super) { + __extends(CalendarDataProvider, _super); + function CalendarDataProvider(props) { + var _this = _super.call(this, props) || this; + _this.handleData = function (data) { + if (!_this.dataManager) { + // still within initial run, before assignment in constructor + // eslint-disable-next-line react/no-direct-mutation-state + _this.state = data; // can't use setState yet + } else { + _this.setState(data); + } + }; + _this.dataManager = new CalendarDataManager({ + optionOverrides: props.optionOverrides, + calendarApi: props.calendarApi, + onData: _this.handleData, + }); + return _this; + } + CalendarDataProvider.prototype.render = function () { + return this.props.children(this.state); + }; + CalendarDataProvider.prototype.componentDidUpdate = function (prevProps) { + var newOptionOverrides = this.props.optionOverrides; + if (newOptionOverrides !== prevProps.optionOverrides) { + // prevent recursive handleData + this.dataManager.resetOptions(newOptionOverrides); + } + }; + return CalendarDataProvider; + })(Component); + + // HELPERS + /* + if nextDayThreshold is specified, slicing is done in an all-day fashion. + you can get nextDayThreshold from context.nextDayThreshold + */ + function sliceEvents(props, allDay) { + return sliceEventStore( + props.eventStore, + props.eventUiBases, + props.dateProfile.activeRange, + allDay ? props.nextDayThreshold : null + ).fg; + } + + var NamedTimeZoneImpl = /** @class */ (function () { + function NamedTimeZoneImpl(timeZoneName) { + this.timeZoneName = timeZoneName; + } + return NamedTimeZoneImpl; + })(); + + var SegHierarchy = /** @class */ (function () { + function SegHierarchy() { + // settings + this.strictOrder = false; + this.allowReslicing = false; + this.maxCoord = -1; // -1 means no max + this.maxStackCnt = -1; // -1 means no max + this.levelCoords = []; // ordered + this.entriesByLevel = []; // parallel with levelCoords + this.stackCnts = {}; // TODO: use better technique!? + } + SegHierarchy.prototype.addSegs = function (inputs) { + var hiddenEntries = []; + for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { + var input = inputs_1[_i]; + this.insertEntry(input, hiddenEntries); + } + return hiddenEntries; + }; + SegHierarchy.prototype.insertEntry = function (entry, hiddenEntries) { + var insertion = this.findInsertion(entry); + if (this.isInsertionValid(insertion, entry)) { + this.insertEntryAt(entry, insertion); + return 1; + } + return this.handleInvalidInsertion(insertion, entry, hiddenEntries); + }; + SegHierarchy.prototype.isInsertionValid = function (insertion, entry) { + return ( + (this.maxCoord === -1 || + insertion.levelCoord + entry.thickness <= this.maxCoord) && + (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt) + ); + }; + // returns number of new entries inserted + SegHierarchy.prototype.handleInvalidInsertion = function ( + insertion, + entry, + hiddenEntries + ) { + if (this.allowReslicing && insertion.touchingEntry) { + return this.splitEntry(entry, insertion.touchingEntry, hiddenEntries); + } + hiddenEntries.push(entry); + return 0; + }; + SegHierarchy.prototype.splitEntry = function ( + entry, + barrier, + hiddenEntries + ) { + var partCnt = 0; + var splitHiddenEntries = []; + var entrySpan = entry.span; + var barrierSpan = barrier.span; + if (entrySpan.start < barrierSpan.start) { + partCnt += this.insertEntry( + { + index: entry.index, + thickness: entry.thickness, + span: { start: entrySpan.start, end: barrierSpan.start }, + }, + splitHiddenEntries + ); + } + if (entrySpan.end > barrierSpan.end) { + partCnt += this.insertEntry( + { + index: entry.index, + thickness: entry.thickness, + span: { start: barrierSpan.end, end: entrySpan.end }, + }, + splitHiddenEntries + ); + } + if (partCnt) { + hiddenEntries.push.apply( + hiddenEntries, + __spreadArray( + [ + { + index: entry.index, + thickness: entry.thickness, + span: intersectSpans(barrierSpan, entrySpan), // guaranteed to intersect + }, + ], + splitHiddenEntries + ) + ); + return partCnt; + } + hiddenEntries.push(entry); + return 0; + }; + SegHierarchy.prototype.insertEntryAt = function (entry, insertion) { + var _a = this, + entriesByLevel = _a.entriesByLevel, + levelCoords = _a.levelCoords; + if (insertion.lateral === -1) { + // create a new level + insertAt(levelCoords, insertion.level, insertion.levelCoord); + insertAt(entriesByLevel, insertion.level, [entry]); + } else { + // insert into existing level + insertAt(entriesByLevel[insertion.level], insertion.lateral, entry); + } + this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt; + }; + SegHierarchy.prototype.findInsertion = function (newEntry) { + var _a = this, + levelCoords = _a.levelCoords, + entriesByLevel = _a.entriesByLevel, + strictOrder = _a.strictOrder, + stackCnts = _a.stackCnts; + var levelCnt = levelCoords.length; + var candidateCoord = 0; + var touchingLevel = -1; + var touchingLateral = -1; + var touchingEntry = null; + var stackCnt = 0; + for ( + var trackingLevel = 0; + trackingLevel < levelCnt; + trackingLevel += 1 + ) { + var trackingCoord = levelCoords[trackingLevel]; + // if the current level is past the placed entry, we have found a good empty space and can stop. + // if strictOrder, keep finding more lateral intersections. + if ( + !strictOrder && + trackingCoord >= candidateCoord + newEntry.thickness + ) { + break; + } + var trackingEntries = entriesByLevel[trackingLevel]; + var trackingEntry = void 0; + var searchRes = binarySearch( + trackingEntries, + newEntry.span.start, + getEntrySpanEnd + ); // find first entry after newEntry's end + var lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one + while ( + // loop through entries that horizontally intersect + (trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list + trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry + ) { + var trackingEntryBottom = trackingCoord + trackingEntry.thickness; + // intersects into the top of the candidate? + if (trackingEntryBottom > candidateCoord) { + candidateCoord = trackingEntryBottom; + touchingEntry = trackingEntry; + touchingLevel = trackingLevel; + touchingLateral = lateralIndex; + } + // butts up against top of candidate? (will happen if just intersected as well) + if (trackingEntryBottom === candidateCoord) { + // accumulate the highest possible stackCnt of the trackingEntries that butt up + stackCnt = Math.max( + stackCnt, + stackCnts[buildEntryKey(trackingEntry)] + 1 + ); + } + lateralIndex += 1; + } + } + // the destination level will be after touchingEntry's level. find it + var destLevel = 0; + if (touchingEntry) { + destLevel = touchingLevel + 1; + while ( + destLevel < levelCnt && + levelCoords[destLevel] < candidateCoord + ) { + destLevel += 1; + } + } + // if adding to an existing level, find where to insert + var destLateral = -1; + if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) { + destLateral = binarySearch( + entriesByLevel[destLevel], + newEntry.span.end, + getEntrySpanEnd + )[0]; + } + return { + touchingLevel: touchingLevel, + touchingLateral: touchingLateral, + touchingEntry: touchingEntry, + stackCnt: stackCnt, + levelCoord: candidateCoord, + level: destLevel, + lateral: destLateral, + }; + }; + // sorted by levelCoord (lowest to highest) + SegHierarchy.prototype.toRects = function () { + var _a = this, + entriesByLevel = _a.entriesByLevel, + levelCoords = _a.levelCoords; + var levelCnt = entriesByLevel.length; + var rects = []; + for (var level = 0; level < levelCnt; level += 1) { + var entries = entriesByLevel[level]; + var levelCoord = levelCoords[level]; + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { + var entry = entries_1[_i]; + rects.push(__assign(__assign({}, entry), { levelCoord: levelCoord })); + } + } + return rects; + }; + return SegHierarchy; + })(); + function getEntrySpanEnd(entry) { + return entry.span.end; + } + function buildEntryKey(entry) { + return entry.index + ":" + entry.span.start; + } + // returns groups with entries sorted by input order + function groupIntersectingEntries(entries) { + var merges = []; + for (var _i = 0, entries_2 = entries; _i < entries_2.length; _i++) { + var entry = entries_2[_i]; + var filteredMerges = []; + var hungryMerge = { + span: entry.span, + entries: [entry], + }; + for (var _a = 0, merges_1 = merges; _a < merges_1.length; _a++) { + var merge = merges_1[_a]; + if (intersectSpans(merge.span, hungryMerge.span)) { + hungryMerge = { + entries: merge.entries.concat(hungryMerge.entries), + span: joinSpans(merge.span, hungryMerge.span), + }; + } else { + filteredMerges.push(merge); + } + } + filteredMerges.push(hungryMerge); + merges = filteredMerges; + } + return merges; + } + function joinSpans(span0, span1) { + return { + start: Math.min(span0.start, span1.start), + end: Math.max(span0.end, span1.end), + }; + } + function intersectSpans(span0, span1) { + var start = Math.max(span0.start, span1.start); + var end = Math.min(span0.end, span1.end); + if (start < end) { + return { start: start, end: end }; + } + return null; + } + // general util + // --------------------------------------------------------------------------------------------------------------------- + function insertAt(arr, index, item) { + arr.splice(index, 0, item); + } + function binarySearch(a, searchVal, getItemVal) { + var startIndex = 0; + var endIndex = a.length; // exclusive + if (!endIndex || searchVal < getItemVal(a[startIndex])) { + // no items OR before first item + return [0, 0]; + } + if (searchVal > getItemVal(a[endIndex - 1])) { + // after last item + return [endIndex, 0]; + } + while (startIndex < endIndex) { + var middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2); + var middleVal = getItemVal(a[middleIndex]); + if (searchVal < middleVal) { + endIndex = middleIndex; + } else if (searchVal > middleVal) { + startIndex = middleIndex + 1; + } else { + // equal! + return [middleIndex, 1]; + } + } + return [startIndex, 0]; + } + + var Interaction = /** @class */ (function () { + function Interaction(settings) { + this.component = settings.component; + this.isHitComboAllowed = settings.isHitComboAllowed || null; + } + Interaction.prototype.destroy = function () {}; + return Interaction; + })(); + function parseInteractionSettings(component, input) { + return { + component: component, + el: input.el, + useEventCenter: + input.useEventCenter != null ? input.useEventCenter : true, + isHitComboAllowed: input.isHitComboAllowed || null, + }; + } + function interactionSettingsToStore(settings) { + var _a; + return (_a = {}), (_a[settings.component.uid] = settings), _a; + } + // global state + var interactionSettingsStore = {}; + + /* + An abstraction for a dragging interaction originating on an event. + Does higher-level things than PointerDragger, such as possibly: + - a "mirror" that moves with the pointer + - a minimum number of pixels or other criteria for a true drag to begin + + subclasses must emit: + - pointerdown + - dragstart + - dragmove + - pointerup + - dragend + */ + var ElementDragging = /** @class */ (function () { + function ElementDragging(el, selector) { + this.emitter = new Emitter(); + } + ElementDragging.prototype.destroy = function () {}; + ElementDragging.prototype.setMirrorIsVisible = function (bool) { + // optional if subclass doesn't want to support a mirror + }; + ElementDragging.prototype.setMirrorNeedsRevert = function (bool) { + // optional if subclass doesn't want to support a mirror + }; + ElementDragging.prototype.setAutoScrollEnabled = function (bool) { + // optional + }; + return ElementDragging; + })(); + + // TODO: get rid of this in favor of options system, + // tho it's really easy to access this globally rather than pass thru options. + var config = {}; + + /* + Information about what will happen when an external element is dragged-and-dropped + onto a calendar. Contains information for creating an event. + */ + var DRAG_META_REFINERS = { + startTime: createDuration, + duration: createDuration, + create: Boolean, + sourceId: String, + }; + function parseDragMeta(raw) { + var _a = refineProps(raw, DRAG_META_REFINERS), + refined = _a.refined, + extra = _a.extra; + return { + startTime: refined.startTime || null, + duration: refined.duration || null, + create: refined.create != null ? refined.create : true, + sourceId: refined.sourceId, + leftoverProps: extra, + }; + } + + var ToolbarSection = /** @class */ (function (_super) { + __extends(ToolbarSection, _super); + function ToolbarSection() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + ToolbarSection.prototype.render = function () { + var _this = this; + var children = this.props.widgetGroups.map(function (widgetGroup) { + return _this.renderWidgetGroup(widgetGroup); + }); + return createElement.apply( + void 0, + __spreadArray(["div", { className: "fc-toolbar-chunk" }], children) + ); + }; + ToolbarSection.prototype.renderWidgetGroup = function (widgetGroup) { + var props = this.props; + var theme = this.context.theme; + var children = []; + var isOnlyButtons = true; + for ( + var _i = 0, widgetGroup_1 = widgetGroup; + _i < widgetGroup_1.length; + _i++ + ) { + var widget = widgetGroup_1[_i]; + var buttonName = widget.buttonName, + buttonClick = widget.buttonClick, + buttonText = widget.buttonText, + buttonIcon = widget.buttonIcon, + buttonHint = widget.buttonHint; + if (buttonName === "title") { + isOnlyButtons = false; + children.push( + createElement( + "h2", + { className: "fc-toolbar-title", id: props.titleId }, + props.title + ) + ); + } else { + var isPressed = buttonName === props.activeButton; + var isDisabled = + (!props.isTodayEnabled && buttonName === "today") || + (!props.isPrevEnabled && buttonName === "prev") || + (!props.isNextEnabled && buttonName === "next"); + var buttonClasses = [ + "fc-" + buttonName + "-button", + theme.getClass("button"), + ]; + if (isPressed) { + buttonClasses.push(theme.getClass("buttonActive")); + } + children.push( + createElement( + "button", + { + type: "button", + title: + typeof buttonHint === "function" + ? buttonHint(props.navUnit) + : buttonHint, + disabled: isDisabled, + "aria-pressed": isPressed, + className: buttonClasses.join(" "), + onClick: buttonClick, + }, + buttonText || + (buttonIcon + ? createElement("span", { className: buttonIcon }) + : "") + ) + ); + } + } + if (children.length > 1) { + var groupClassName = + (isOnlyButtons && theme.getClass("buttonGroup")) || ""; + return createElement.apply( + void 0, + __spreadArray(["div", { className: groupClassName }], children) + ); + } + return children[0]; + }; + return ToolbarSection; + })(BaseComponent); + + var Toolbar = /** @class */ (function (_super) { + __extends(Toolbar, _super); + function Toolbar() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + Toolbar.prototype.render = function () { + var _a = this.props, + model = _a.model, + extraClassName = _a.extraClassName; + var forceLtr = false; + var startContent; + var endContent; + var sectionWidgets = model.sectionWidgets; + var centerContent = sectionWidgets.center; + if (sectionWidgets.left) { + forceLtr = true; + startContent = sectionWidgets.left; + } else { + startContent = sectionWidgets.start; + } + if (sectionWidgets.right) { + forceLtr = true; + endContent = sectionWidgets.right; + } else { + endContent = sectionWidgets.end; + } + var classNames = [ + extraClassName || "", + "fc-toolbar", + forceLtr ? "fc-toolbar-ltr" : "", + ]; + return createElement( + "div", + { className: classNames.join(" ") }, + this.renderSection("start", startContent || []), + this.renderSection("center", centerContent || []), + this.renderSection("end", endContent || []) + ); + }; + Toolbar.prototype.renderSection = function (key, widgetGroups) { + var props = this.props; + return createElement(ToolbarSection, { + key: key, + widgetGroups: widgetGroups, + title: props.title, + navUnit: props.navUnit, + activeButton: props.activeButton, + isTodayEnabled: props.isTodayEnabled, + isPrevEnabled: props.isPrevEnabled, + isNextEnabled: props.isNextEnabled, + titleId: props.titleId, + }); + }; + return Toolbar; + })(BaseComponent); + + // TODO: do function component? + var ViewContainer = /** @class */ (function (_super) { + __extends(ViewContainer, _super); + function ViewContainer() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.state = { + availableWidth: null, + }; + _this.handleEl = function (el) { + _this.el = el; + setRef(_this.props.elRef, el); + _this.updateAvailableWidth(); + }; + _this.handleResize = function () { + _this.updateAvailableWidth(); + }; + return _this; + } + ViewContainer.prototype.render = function () { + var _a = this, + props = _a.props, + state = _a.state; + var aspectRatio = props.aspectRatio; + var classNames = [ + "fc-view-harness", + aspectRatio || props.liquid || props.height + ? "fc-view-harness-active" // harness controls the height + : "fc-view-harness-passive", // let the view do the height + ]; + var height = ""; + var paddingBottom = ""; + if (aspectRatio) { + if (state.availableWidth !== null) { + height = state.availableWidth / aspectRatio; + } else { + // while waiting to know availableWidth, we can't set height to *zero* + // because will cause lots of unnecessary scrollbars within scrollgrid. + // BETTER: don't start rendering ANYTHING yet until we know container width + // NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606) + paddingBottom = (1 / aspectRatio) * 100 + "%"; + } + } else { + height = props.height || ""; + } + return createElement( + "div", + { + "aria-labelledby": props.labeledById, + ref: this.handleEl, + className: classNames.join(" "), + style: { height: height, paddingBottom: paddingBottom }, + }, + props.children + ); + }; + ViewContainer.prototype.componentDidMount = function () { + this.context.addResizeHandler(this.handleResize); + }; + ViewContainer.prototype.componentWillUnmount = function () { + this.context.removeResizeHandler(this.handleResize); + }; + ViewContainer.prototype.updateAvailableWidth = function () { + if ( + this.el && // needed. but why? + this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth + ) { + this.setState({ availableWidth: this.el.offsetWidth }); + } + }; + return ViewContainer; + })(BaseComponent); + + /* + Detects when the user clicks on an event within a DateComponent + */ + var EventClicking = /** @class */ (function (_super) { + __extends(EventClicking, _super); + function EventClicking(settings) { + var _this = _super.call(this, settings) || this; + _this.handleSegClick = function (ev, segEl) { + var component = _this.component; + var context = component.context; + var seg = getElSeg(segEl); + if ( + seg && // might be the
surrounding the more link + component.isValidSegDownEl(ev.target) + ) { + // our way to simulate a link click for elements that can't be tags + // grab before trigger fired in case trigger trashes DOM thru rerendering + var hasUrlContainer = elementClosest( + ev.target, + ".fc-event-forced-url" + ); + var url = hasUrlContainer + ? hasUrlContainer.querySelector("a[href]").href + : ""; + context.emitter.trigger("eventClick", { + el: segEl, + event: new EventApi( + component.context, + seg.eventRange.def, + seg.eventRange.instance + ), + jsEvent: ev, + view: context.viewApi, + }); + if (url && !ev.defaultPrevented) { + window.location.href = url; + } + } + }; + _this.destroy = listenBySelector( + settings.el, + "click", + ".fc-event", // on both fg and bg events + _this.handleSegClick + ); + return _this; + } + return EventClicking; + })(Interaction); + + /* + Triggers events and adds/removes core classNames when the user's pointer + enters/leaves event-elements of a component. + */ + var EventHovering = /** @class */ (function (_super) { + __extends(EventHovering, _super); + function EventHovering(settings) { + var _this = _super.call(this, settings) || this; + // for simulating an eventMouseLeave when the event el is destroyed while mouse is over it + _this.handleEventElRemove = function (el) { + if (el === _this.currentSegEl) { + _this.handleSegLeave(null, _this.currentSegEl); + } + }; + _this.handleSegEnter = function (ev, segEl) { + if (getElSeg(segEl)) { + // TODO: better way to make sure not hovering over more+ link or its wrapper + _this.currentSegEl = segEl; + _this.triggerEvent("eventMouseEnter", ev, segEl); + } + }; + _this.handleSegLeave = function (ev, segEl) { + if (_this.currentSegEl) { + _this.currentSegEl = null; + _this.triggerEvent("eventMouseLeave", ev, segEl); + } + }; + _this.removeHoverListeners = listenToHoverBySelector( + settings.el, + ".fc-event", // on both fg and bg events + _this.handleSegEnter, + _this.handleSegLeave + ); + return _this; + } + EventHovering.prototype.destroy = function () { + this.removeHoverListeners(); + }; + EventHovering.prototype.triggerEvent = function (publicEvName, ev, segEl) { + var component = this.component; + var context = component.context; + var seg = getElSeg(segEl); + if (!ev || component.isValidSegDownEl(ev.target)) { + context.emitter.trigger(publicEvName, { + el: segEl, + event: new EventApi( + context, + seg.eventRange.def, + seg.eventRange.instance + ), + jsEvent: ev, + view: context.viewApi, + }); + } + }; + return EventHovering; + })(Interaction); + + var CalendarContent = /** @class */ (function (_super) { + __extends(CalendarContent, _super); + function CalendarContent() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.buildViewContext = memoize(buildViewContext); + _this.buildViewPropTransformers = memoize(buildViewPropTransformers); + _this.buildToolbarProps = memoize(buildToolbarProps); + _this.headerRef = createRef(); + _this.footerRef = createRef(); + _this.interactionsStore = {}; + // eslint-disable-next-line + _this.state = { + viewLabelId: getUniqueDomId(), + }; + // Component Registration + // ----------------------------------------------------------------------------------------------------------------- + _this.registerInteractiveComponent = function (component, settingsInput) { + var settings = parseInteractionSettings(component, settingsInput); + var DEFAULT_INTERACTIONS = [EventClicking, EventHovering]; + var interactionClasses = DEFAULT_INTERACTIONS.concat( + _this.props.pluginHooks.componentInteractions + ); + var interactions = interactionClasses.map(function ( + TheInteractionClass + ) { + return new TheInteractionClass(settings); + }); + _this.interactionsStore[component.uid] = interactions; + interactionSettingsStore[component.uid] = settings; + }; + _this.unregisterInteractiveComponent = function (component) { + var listeners = _this.interactionsStore[component.uid]; + if (listeners) { + for ( + var _i = 0, listeners_1 = listeners; + _i < listeners_1.length; + _i++ + ) { + var listener = listeners_1[_i]; + listener.destroy(); + } + delete _this.interactionsStore[component.uid]; + } + delete interactionSettingsStore[component.uid]; + }; + // Resizing + // ----------------------------------------------------------------------------------------------------------------- + _this.resizeRunner = new DelayedRunner(function () { + _this.props.emitter.trigger("_resize", true); // should window resizes be considered "forced" ? + _this.props.emitter.trigger("windowResize", { + view: _this.props.viewApi, + }); + }); + _this.handleWindowResize = function (ev) { + var options = _this.props.options; + if ( + options.handleWindowResize && + ev.target === window // avoid jqui events + ) { + _this.resizeRunner.request(options.windowResizeDelay); + } + }; + return _this; + } + /* + renders INSIDE of an outer div + */ + CalendarContent.prototype.render = function () { + var props = this.props; + var toolbarConfig = props.toolbarConfig, + options = props.options; + var toolbarProps = this.buildToolbarProps( + props.viewSpec, + props.dateProfile, + props.dateProfileGenerator, + props.currentDate, + getNow(props.options.now, props.dateEnv), // TODO: use NowTimer???? + props.viewTitle + ); + var viewVGrow = false; + var viewHeight = ""; + var viewAspectRatio; + if (props.isHeightAuto || props.forPrint) { + viewHeight = ""; + } else if (options.height != null) { + viewVGrow = true; + } else if (options.contentHeight != null) { + viewHeight = options.contentHeight; + } else { + viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall + } + var viewContext = this.buildViewContext( + props.viewSpec, + props.viewApi, + props.options, + props.dateProfileGenerator, + props.dateEnv, + props.theme, + props.pluginHooks, + props.dispatch, + props.getCurrentData, + props.emitter, + props.calendarApi, + this.registerInteractiveComponent, + this.unregisterInteractiveComponent + ); + var viewLabelId = + toolbarConfig.header && toolbarConfig.header.hasTitle + ? this.state.viewLabelId + : ""; + return createElement( + ViewContextType.Provider, + { value: viewContext }, + toolbarConfig.header && + createElement( + Toolbar, + __assign( + { + ref: this.headerRef, + extraClassName: "fc-header-toolbar", + model: toolbarConfig.header, + titleId: viewLabelId, + }, + toolbarProps + ) + ), + createElement( + ViewContainer, + { + liquid: viewVGrow, + height: viewHeight, + aspectRatio: viewAspectRatio, + labeledById: viewLabelId, + }, + this.renderView(props), + this.buildAppendContent() + ), + toolbarConfig.footer && + createElement( + Toolbar, + __assign( + { + ref: this.footerRef, + extraClassName: "fc-footer-toolbar", + model: toolbarConfig.footer, + titleId: "", + }, + toolbarProps + ) + ) + ); + }; + CalendarContent.prototype.componentDidMount = function () { + var props = this.props; + this.calendarInteractions = props.pluginHooks.calendarInteractions.map( + function (CalendarInteractionClass) { + return new CalendarInteractionClass(props); + } + ); + window.addEventListener("resize", this.handleWindowResize); + var propSetHandlers = props.pluginHooks.propSetHandlers; + for (var propName in propSetHandlers) { + propSetHandlers[propName](props[propName], props); + } + }; + CalendarContent.prototype.componentDidUpdate = function (prevProps) { + var props = this.props; + var propSetHandlers = props.pluginHooks.propSetHandlers; + for (var propName in propSetHandlers) { + if (props[propName] !== prevProps[propName]) { + propSetHandlers[propName](props[propName], props); + } + } + }; + CalendarContent.prototype.componentWillUnmount = function () { + window.removeEventListener("resize", this.handleWindowResize); + this.resizeRunner.clear(); + for (var _i = 0, _a = this.calendarInteractions; _i < _a.length; _i++) { + var interaction = _a[_i]; + interaction.destroy(); + } + this.props.emitter.trigger("_unmount"); + }; + CalendarContent.prototype.buildAppendContent = function () { + var props = this.props; + var children = props.pluginHooks.viewContainerAppends.map(function ( + buildAppendContent + ) { + return buildAppendContent(props); + }); + return createElement.apply( + void 0, + __spreadArray([Fragment, {}], children) + ); + }; + CalendarContent.prototype.renderView = function (props) { + var pluginHooks = props.pluginHooks; + var viewSpec = props.viewSpec; + var viewProps = { + dateProfile: props.dateProfile, + businessHours: props.businessHours, + eventStore: props.renderableEventStore, + eventUiBases: props.eventUiBases, + dateSelection: props.dateSelection, + eventSelection: props.eventSelection, + eventDrag: props.eventDrag, + eventResize: props.eventResize, + isHeightAuto: props.isHeightAuto, + forPrint: props.forPrint, + }; + var transformers = this.buildViewPropTransformers( + pluginHooks.viewPropsTransformers + ); + for ( + var _i = 0, transformers_1 = transformers; + _i < transformers_1.length; + _i++ + ) { + var transformer = transformers_1[_i]; + __assign(viewProps, transformer.transform(viewProps, props)); + } + var ViewComponent = viewSpec.component; + return createElement(ViewComponent, __assign({}, viewProps)); + }; + return CalendarContent; + })(PureComponent); + function buildToolbarProps( + viewSpec, + dateProfile, + dateProfileGenerator, + currentDate, + now, + title + ) { + // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid + var todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason + var prevInfo = dateProfileGenerator.buildPrev( + dateProfile, + currentDate, + false + ); + var nextInfo = dateProfileGenerator.buildNext( + dateProfile, + currentDate, + false + ); + return { + title: title, + activeButton: viewSpec.type, + navUnit: viewSpec.singleUnit, + isTodayEnabled: + todayInfo.isValid && + !rangeContainsMarker(dateProfile.currentRange, now), + isPrevEnabled: prevInfo.isValid, + isNextEnabled: nextInfo.isValid, + }; + } + // Plugin + // ----------------------------------------------------------------------------------------------------------------- + function buildViewPropTransformers(theClasses) { + return theClasses.map(function (TheClass) { + return new TheClass(); + }); + } + + var CalendarRoot = /** @class */ (function (_super) { + __extends(CalendarRoot, _super); + function CalendarRoot() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.state = { + forPrint: false, + }; + _this.handleBeforePrint = function () { + _this.setState({ forPrint: true }); + }; + _this.handleAfterPrint = function () { + _this.setState({ forPrint: false }); + }; + return _this; + } + CalendarRoot.prototype.render = function () { + var props = this.props; + var options = props.options; + var forPrint = this.state.forPrint; + var isHeightAuto = + forPrint || + options.height === "auto" || + options.contentHeight === "auto"; + var height = + !isHeightAuto && options.height != null ? options.height : ""; + var classNames = [ + "fc", + forPrint ? "fc-media-print" : "fc-media-screen", + "fc-direction-" + options.direction, + props.theme.getClass("root"), + ]; + if (!getCanVGrowWithinCell()) { + classNames.push("fc-liquid-hack"); + } + return props.children(classNames, height, isHeightAuto, forPrint); + }; + CalendarRoot.prototype.componentDidMount = function () { + var emitter = this.props.emitter; + emitter.on("_beforeprint", this.handleBeforePrint); + emitter.on("_afterprint", this.handleAfterPrint); + }; + CalendarRoot.prototype.componentWillUnmount = function () { + var emitter = this.props.emitter; + emitter.off("_beforeprint", this.handleBeforePrint); + emitter.off("_afterprint", this.handleAfterPrint); + }; + return CalendarRoot; + })(BaseComponent); + + // Computes a default column header formatting string if `colFormat` is not explicitly defined + function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) { + // if more than one week row, or if there are a lot of columns with not much space, + // put just the day numbers will be in each cell + if (!datesRepDistinctDays || dayCnt > 10) { + return createFormatter({ weekday: "short" }); // "Sat" + } + if (dayCnt > 1) { + return createFormatter({ + weekday: "short", + month: "numeric", + day: "numeric", + omitCommas: true, + }); // "Sat 11/12" + } + return createFormatter({ weekday: "long" }); // "Saturday" + } + + var CLASS_NAME = "fc-col-header-cell"; // do the cushion too? no + function renderInner$1(hookProps) { + return hookProps.text; + } + + var TableDateCell = /** @class */ (function (_super) { + __extends(TableDateCell, _super); + function TableDateCell() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TableDateCell.prototype.render = function () { + var _a = this.context, + dateEnv = _a.dateEnv, + options = _a.options, + theme = _a.theme, + viewApi = _a.viewApi; + var props = this.props; + var date = props.date, + dateProfile = props.dateProfile; + var dayMeta = getDateMeta(date, props.todayRange, null, dateProfile); + var classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme)); + var text = dateEnv.format(date, props.dayHeaderFormat); + // if colCnt is 1, we are already in a day-view and don't need a navlink + var navLinkAttrs = + !dayMeta.isDisabled && props.colCnt > 1 + ? buildNavLinkAttrs(this.context, date) + : {}; + var hookProps = __assign( + __assign( + __assign( + { date: dateEnv.toDate(date), view: viewApi }, + props.extraHookProps + ), + { text: text } + ), + dayMeta + ); + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.dayHeaderClassNames, + content: options.dayHeaderContent, + defaultContent: renderInner$1, + didMount: options.dayHeaderDidMount, + willUnmount: options.dayHeaderWillUnmount, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return createElement( + "th", + __assign( + { + ref: rootElRef, + role: "columnheader", + className: classNames.concat(customClassNames).join(" "), + "data-date": !dayMeta.isDisabled + ? formatDayString(date) + : undefined, + colSpan: props.colSpan, + }, + props.extraDataAttrs + ), + createElement( + "div", + { className: "fc-scrollgrid-sync-inner" }, + !dayMeta.isDisabled && + createElement( + "a", + __assign( + { + ref: innerElRef, + className: [ + "fc-col-header-cell-cushion", + props.isSticky ? "fc-sticky" : "", + ].join(" "), + }, + navLinkAttrs + ), + innerContent + ) + ) + ); + } + ); + }; + return TableDateCell; + })(BaseComponent); + + var WEEKDAY_FORMAT = createFormatter({ weekday: "long" }); + var TableDowCell = /** @class */ (function (_super) { + __extends(TableDowCell, _super); + function TableDowCell() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TableDowCell.prototype.render = function () { + var props = this.props; + var _a = this.context, + dateEnv = _a.dateEnv, + theme = _a.theme, + viewApi = _a.viewApi, + options = _a.options; + var date = addDays(new Date(259200000), props.dow); // start with Sun, 04 Jan 1970 00:00:00 GMT + var dateMeta = { + dow: props.dow, + isDisabled: false, + isFuture: false, + isPast: false, + isToday: false, + isOther: false, + }; + var classNames = [CLASS_NAME].concat( + getDayClassNames(dateMeta, theme), + props.extraClassNames || [] + ); + var text = dateEnv.format(date, props.dayHeaderFormat); + var hookProps = __assign( + __assign( + __assign( + __assign( + { + // TODO: make this public? + date: date, + }, + dateMeta + ), + { view: viewApi } + ), + props.extraHookProps + ), + { text: text } + ); + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.dayHeaderClassNames, + content: options.dayHeaderContent, + defaultContent: renderInner$1, + didMount: options.dayHeaderDidMount, + willUnmount: options.dayHeaderWillUnmount, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return createElement( + "th", + __assign( + { + ref: rootElRef, + role: "columnheader", + className: classNames.concat(customClassNames).join(" "), + colSpan: props.colSpan, + }, + props.extraDataAttrs + ), + createElement( + "div", + { className: "fc-scrollgrid-sync-inner" }, + createElement( + "a", + { + "aria-label": dateEnv.format(date, WEEKDAY_FORMAT), + className: [ + "fc-col-header-cell-cushion", + props.isSticky ? "fc-sticky" : "", + ].join(" "), + ref: innerElRef, + }, + innerContent + ) + ) + ); + } + ); + }; + return TableDowCell; + })(BaseComponent); + + var NowTimer = /** @class */ (function (_super) { + __extends(NowTimer, _super); + function NowTimer(props, context) { + var _this = _super.call(this, props, context) || this; + _this.initialNowDate = getNow(context.options.now, context.dateEnv); + _this.initialNowQueriedMs = new Date().valueOf(); + _this.state = _this.computeTiming().currentState; + return _this; + } + NowTimer.prototype.render = function () { + var _a = this, + props = _a.props, + state = _a.state; + return props.children(state.nowDate, state.todayRange); + }; + NowTimer.prototype.componentDidMount = function () { + this.setTimeout(); + }; + NowTimer.prototype.componentDidUpdate = function (prevProps) { + if (prevProps.unit !== this.props.unit) { + this.clearTimeout(); + this.setTimeout(); + } + }; + NowTimer.prototype.componentWillUnmount = function () { + this.clearTimeout(); + }; + NowTimer.prototype.computeTiming = function () { + var _a = this, + props = _a.props, + context = _a.context; + var unroundedNow = addMs( + this.initialNowDate, + new Date().valueOf() - this.initialNowQueriedMs + ); + var currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit); + var nextUnitStart = context.dateEnv.add( + currentUnitStart, + createDuration(1, props.unit) + ); + var waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf(); + // there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342) + // ensure no longer than a day + waitMs = Math.min(1000 * 60 * 60 * 24, waitMs); + return { + currentState: { + nowDate: currentUnitStart, + todayRange: buildDayRange(currentUnitStart), + }, + nextState: { + nowDate: nextUnitStart, + todayRange: buildDayRange(nextUnitStart), + }, + waitMs: waitMs, + }; + }; + NowTimer.prototype.setTimeout = function () { + var _this = this; + var _a = this.computeTiming(), + nextState = _a.nextState, + waitMs = _a.waitMs; + this.timeoutId = setTimeout(function () { + _this.setState(nextState, function () { + _this.setTimeout(); + }); + }, waitMs); + }; + NowTimer.prototype.clearTimeout = function () { + if (this.timeoutId) { + clearTimeout(this.timeoutId); + } + }; + NowTimer.contextType = ViewContextType; + return NowTimer; + })(Component); + function buildDayRange(date) { + var start = startOfDay(date); + var end = addDays(start, 1); + return { start: start, end: end }; + } + + var DayHeader = /** @class */ (function (_super) { + __extends(DayHeader, _super); + function DayHeader() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.createDayHeaderFormatter = memoize(createDayHeaderFormatter); + return _this; + } + DayHeader.prototype.render = function () { + var context = this.context; + var _a = this.props, + dates = _a.dates, + dateProfile = _a.dateProfile, + datesRepDistinctDays = _a.datesRepDistinctDays, + renderIntro = _a.renderIntro; + var dayHeaderFormat = this.createDayHeaderFormatter( + context.options.dayHeaderFormat, + datesRepDistinctDays, + dates.length + ); + return createElement( + NowTimer, + { unit: "day" }, + function (nowDate, todayRange) { + return createElement( + "tr", + { role: "row" }, + renderIntro && renderIntro("day"), + dates.map(function (date) { + return datesRepDistinctDays + ? createElement(TableDateCell, { + key: date.toISOString(), + date: date, + dateProfile: dateProfile, + todayRange: todayRange, + colCnt: dates.length, + dayHeaderFormat: dayHeaderFormat, + }) + : createElement(TableDowCell, { + key: date.getUTCDay(), + dow: date.getUTCDay(), + dayHeaderFormat: dayHeaderFormat, + }); + }) + ); + } + ); + }; + return DayHeader; + })(BaseComponent); + function createDayHeaderFormatter( + explicitFormat, + datesRepDistinctDays, + dateCnt + ) { + return ( + explicitFormat || + computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt) + ); + } + + var DaySeriesModel = /** @class */ (function () { + function DaySeriesModel(range, dateProfileGenerator) { + var date = range.start; + var end = range.end; + var indices = []; + var dates = []; + var dayIndex = -1; + while (date < end) { + // loop each day from start to end + if (dateProfileGenerator.isHiddenDay(date)) { + indices.push(dayIndex + 0.5); // mark that it's between indices + } else { + dayIndex += 1; + indices.push(dayIndex); + dates.push(date); + } + date = addDays(date, 1); + } + this.dates = dates; + this.indices = indices; + this.cnt = dates.length; + } + DaySeriesModel.prototype.sliceRange = function (range) { + var firstIndex = this.getDateDayIndex(range.start); // inclusive first index + var lastIndex = this.getDateDayIndex(addDays(range.end, -1)); // inclusive last index + var clippedFirstIndex = Math.max(0, firstIndex); + var clippedLastIndex = Math.min(this.cnt - 1, lastIndex); + // deal with in-between indices + clippedFirstIndex = Math.ceil(clippedFirstIndex); // in-between starts round to next cell + clippedLastIndex = Math.floor(clippedLastIndex); // in-between ends round to prev cell + if (clippedFirstIndex <= clippedLastIndex) { + return { + firstIndex: clippedFirstIndex, + lastIndex: clippedLastIndex, + isStart: firstIndex === clippedFirstIndex, + isEnd: lastIndex === clippedLastIndex, + }; + } + return null; + }; + // Given a date, returns its chronolocial cell-index from the first cell of the grid. + // If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets. + // If before the first offset, returns a negative number. + // If after the last offset, returns an offset past the last cell offset. + // Only works for *start* dates of cells. Will not work for exclusive end dates for cells. + DaySeriesModel.prototype.getDateDayIndex = function (date) { + var indices = this.indices; + var dayOffset = Math.floor(diffDays(this.dates[0], date)); + if (dayOffset < 0) { + return indices[0] - 1; + } + if (dayOffset >= indices.length) { + return indices[indices.length - 1] + 1; + } + return indices[dayOffset]; + }; + return DaySeriesModel; + })(); + + var DayTableModel = /** @class */ (function () { + function DayTableModel(daySeries, breakOnWeeks) { + var dates = daySeries.dates; + var daysPerRow; + var firstDay; + var rowCnt; + if (breakOnWeeks) { + // count columns until the day-of-week repeats + firstDay = dates[0].getUTCDay(); + for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) { + if (dates[daysPerRow].getUTCDay() === firstDay) { + break; + } + } + rowCnt = Math.ceil(dates.length / daysPerRow); + } else { + rowCnt = 1; + daysPerRow = dates.length; + } + this.rowCnt = rowCnt; + this.colCnt = daysPerRow; + this.daySeries = daySeries; + this.cells = this.buildCells(); + this.headerDates = this.buildHeaderDates(); + } + DayTableModel.prototype.buildCells = function () { + var rows = []; + for (var row = 0; row < this.rowCnt; row += 1) { + var cells = []; + for (var col = 0; col < this.colCnt; col += 1) { + cells.push(this.buildCell(row, col)); + } + rows.push(cells); + } + return rows; + }; + DayTableModel.prototype.buildCell = function (row, col) { + var date = this.daySeries.dates[row * this.colCnt + col]; + return { + key: date.toISOString(), + date: date, + }; + }; + DayTableModel.prototype.buildHeaderDates = function () { + var dates = []; + for (var col = 0; col < this.colCnt; col += 1) { + dates.push(this.cells[0][col].date); + } + return dates; + }; + DayTableModel.prototype.sliceRange = function (range) { + var colCnt = this.colCnt; + var seriesSeg = this.daySeries.sliceRange(range); + var segs = []; + if (seriesSeg) { + var firstIndex = seriesSeg.firstIndex, + lastIndex = seriesSeg.lastIndex; + var index = firstIndex; + while (index <= lastIndex) { + var row = Math.floor(index / colCnt); + var nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1); + segs.push({ + row: row, + firstCol: index % colCnt, + lastCol: (nextIndex - 1) % colCnt, + isStart: seriesSeg.isStart && index === firstIndex, + isEnd: seriesSeg.isEnd && nextIndex - 1 === lastIndex, + }); + index = nextIndex; + } + } + return segs; + }; + return DayTableModel; + })(); + + var Slicer = /** @class */ (function () { + function Slicer() { + this.sliceBusinessHours = memoize(this._sliceBusinessHours); + this.sliceDateSelection = memoize(this._sliceDateSpan); + this.sliceEventStore = memoize(this._sliceEventStore); + this.sliceEventDrag = memoize(this._sliceInteraction); + this.sliceEventResize = memoize(this._sliceInteraction); + this.forceDayIfListItem = false; // hack + } + Slicer.prototype.sliceProps = function ( + props, + dateProfile, + nextDayThreshold, + context + ) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; + } + var eventUiBases = props.eventUiBases; + var eventSegs = this.sliceEventStore.apply( + this, + __spreadArray( + [props.eventStore, eventUiBases, dateProfile, nextDayThreshold], + extraArgs + ) + ); + return { + dateSelectionSegs: this.sliceDateSelection.apply( + this, + __spreadArray([props.dateSelection, eventUiBases, context], extraArgs) + ), + businessHourSegs: this.sliceBusinessHours.apply( + this, + __spreadArray( + [props.businessHours, dateProfile, nextDayThreshold, context], + extraArgs + ) + ), + fgEventSegs: eventSegs.fg, + bgEventSegs: eventSegs.bg, + eventDrag: this.sliceEventDrag.apply( + this, + __spreadArray( + [props.eventDrag, eventUiBases, dateProfile, nextDayThreshold], + extraArgs + ) + ), + eventResize: this.sliceEventResize.apply( + this, + __spreadArray( + [props.eventResize, eventUiBases, dateProfile, nextDayThreshold], + extraArgs + ) + ), + eventSelection: props.eventSelection, + }; // TODO: give interactionSegs? + }; + Slicer.prototype.sliceNowDate = function ( + // does not memoize + date, + context + ) { + var extraArgs = []; + for (var _i = 2; _i < arguments.length; _i++) { + extraArgs[_i - 2] = arguments[_i]; + } + return this._sliceDateSpan.apply( + this, + __spreadArray( + [ + { range: { start: date, end: addMs(date, 1) }, allDay: false }, + {}, + context, + ], + extraArgs + ) + ); + }; + Slicer.prototype._sliceBusinessHours = function ( + businessHours, + dateProfile, + nextDayThreshold, + context + ) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; + } + if (!businessHours) { + return []; + } + return this._sliceEventStore.apply( + this, + __spreadArray( + [ + expandRecurring( + businessHours, + computeActiveRange(dateProfile, Boolean(nextDayThreshold)), + context + ), + {}, + dateProfile, + nextDayThreshold, + ], + extraArgs + ) + ).bg; + }; + Slicer.prototype._sliceEventStore = function ( + eventStore, + eventUiBases, + dateProfile, + nextDayThreshold + ) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; + } + if (eventStore) { + var rangeRes = sliceEventStore( + eventStore, + eventUiBases, + computeActiveRange(dateProfile, Boolean(nextDayThreshold)), + nextDayThreshold + ); + return { + bg: this.sliceEventRanges(rangeRes.bg, extraArgs), + fg: this.sliceEventRanges(rangeRes.fg, extraArgs), + }; + } + return { bg: [], fg: [] }; + }; + Slicer.prototype._sliceInteraction = function ( + interaction, + eventUiBases, + dateProfile, + nextDayThreshold + ) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; + } + if (!interaction) { + return null; + } + var rangeRes = sliceEventStore( + interaction.mutatedEvents, + eventUiBases, + computeActiveRange(dateProfile, Boolean(nextDayThreshold)), + nextDayThreshold + ); + return { + segs: this.sliceEventRanges(rangeRes.fg, extraArgs), + affectedInstances: interaction.affectedEvents.instances, + isEvent: interaction.isEvent, + }; + }; + Slicer.prototype._sliceDateSpan = function ( + dateSpan, + eventUiBases, + context + ) { + var extraArgs = []; + for (var _i = 3; _i < arguments.length; _i++) { + extraArgs[_i - 3] = arguments[_i]; + } + if (!dateSpan) { + return []; + } + var eventRange = fabricateEventRange(dateSpan, eventUiBases, context); + var segs = this.sliceRange.apply( + this, + __spreadArray([dateSpan.range], extraArgs) + ); + for (var _a = 0, segs_1 = segs; _a < segs_1.length; _a++) { + var seg = segs_1[_a]; + seg.eventRange = eventRange; + } + return segs; + }; + /* + "complete" seg means it has component and eventRange + */ + Slicer.prototype.sliceEventRanges = function (eventRanges, extraArgs) { + var segs = []; + for ( + var _i = 0, eventRanges_1 = eventRanges; + _i < eventRanges_1.length; + _i++ + ) { + var eventRange = eventRanges_1[_i]; + segs.push.apply(segs, this.sliceEventRange(eventRange, extraArgs)); + } + return segs; + }; + /* + "complete" seg means it has component and eventRange + */ + Slicer.prototype.sliceEventRange = function (eventRange, extraArgs) { + var dateRange = eventRange.range; + // hack to make multi-day events that are being force-displayed as list-items to take up only one day + if (this.forceDayIfListItem && eventRange.ui.display === "list-item") { + dateRange = { + start: dateRange.start, + end: addDays(dateRange.start, 1), + }; + } + var segs = this.sliceRange.apply( + this, + __spreadArray([dateRange], extraArgs) + ); + for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) { + var seg = segs_2[_i]; + seg.eventRange = eventRange; + seg.isStart = eventRange.isStart && seg.isStart; + seg.isEnd = eventRange.isEnd && seg.isEnd; + } + return segs; + }; + return Slicer; + })(); + /* + for incorporating slotMinTime/slotMaxTime if appropriate + TODO: should be part of DateProfile! + TimelineDateProfile already does this btw + */ + function computeActiveRange(dateProfile, isComponentAllDay) { + var range = dateProfile.activeRange; + if (isComponentAllDay) { + return range; + } + return { + start: addMs(range.start, dateProfile.slotMinTime.milliseconds), + end: addMs(range.end, dateProfile.slotMaxTime.milliseconds - 864e5), // 864e5 = ms in a day + }; + } + + // high-level segmenting-aware tester functions + // ------------------------------------------------------------------------------------------------------------------------ + function isInteractionValid(interaction, dateProfile, context) { + var instances = interaction.mutatedEvents.instances; + for (var instanceId in instances) { + if ( + !rangeContainsRange(dateProfile.validRange, instances[instanceId].range) + ) { + return false; + } + } + return isNewPropsValid({ eventDrag: interaction }, context); // HACK: the eventDrag props is used for ALL interactions + } + function isDateSelectionValid(dateSelection, dateProfile, context) { + if (!rangeContainsRange(dateProfile.validRange, dateSelection.range)) { + return false; + } + return isNewPropsValid({ dateSelection: dateSelection }, context); + } + function isNewPropsValid(newProps, context) { + var calendarState = context.getCurrentData(); + var props = __assign( + { + businessHours: calendarState.businessHours, + dateSelection: "", + eventStore: calendarState.eventStore, + eventUiBases: calendarState.eventUiBases, + eventSelection: "", + eventDrag: null, + eventResize: null, + }, + newProps + ); + return (context.pluginHooks.isPropsValid || isPropsValid)(props, context); + } + function isPropsValid(state, context, dateSpanMeta, filterConfig) { + if (dateSpanMeta === void 0) { + dateSpanMeta = {}; + } + if ( + state.eventDrag && + !isInteractionPropsValid(state, context, dateSpanMeta, filterConfig) + ) { + return false; + } + if ( + state.dateSelection && + !isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig) + ) { + return false; + } + return true; + } + // Moving Event Validation + // ------------------------------------------------------------------------------------------------------------------------ + function isInteractionPropsValid(state, context, dateSpanMeta, filterConfig) { + var currentState = context.getCurrentData(); + var interaction = state.eventDrag; // HACK: the eventDrag props is used for ALL interactions + var subjectEventStore = interaction.mutatedEvents; + var subjectDefs = subjectEventStore.defs; + var subjectInstances = subjectEventStore.instances; + var subjectConfigs = compileEventUis( + subjectDefs, + interaction.isEvent + ? state.eventUiBases + : { "": currentState.selectionConfig } + ); + if (filterConfig) { + subjectConfigs = mapHash(subjectConfigs, filterConfig); + } + // exclude the subject events. TODO: exclude defs too? + var otherEventStore = excludeInstances( + state.eventStore, + interaction.affectedEvents.instances + ); + var otherDefs = otherEventStore.defs; + var otherInstances = otherEventStore.instances; + var otherConfigs = compileEventUis(otherDefs, state.eventUiBases); + for (var subjectInstanceId in subjectInstances) { + var subjectInstance = subjectInstances[subjectInstanceId]; + var subjectRange = subjectInstance.range; + var subjectConfig = subjectConfigs[subjectInstance.defId]; + var subjectDef = subjectDefs[subjectInstance.defId]; + // constraint + if ( + !allConstraintsPass( + subjectConfig.constraints, + subjectRange, + otherEventStore, + state.businessHours, + context + ) + ) { + return false; + } + // overlap + var eventOverlap = context.options.eventOverlap; + var eventOverlapFunc = + typeof eventOverlap === "function" ? eventOverlap : null; + for (var otherInstanceId in otherInstances) { + var otherInstance = otherInstances[otherInstanceId]; + // intersect! evaluate + if (rangesIntersect(subjectRange, otherInstance.range)) { + var otherOverlap = otherConfigs[otherInstance.defId].overlap; + // consider the other event's overlap. only do this if the subject event is a "real" event + if (otherOverlap === false && interaction.isEvent) { + return false; + } + if (subjectConfig.overlap === false) { + return false; + } + if ( + eventOverlapFunc && + !eventOverlapFunc( + new EventApi( + context, + otherDefs[otherInstance.defId], + otherInstance + ), // still event + new EventApi(context, subjectDef, subjectInstance) + ) + ) { + return false; + } + } + } + // allow (a function) + var calendarEventStore = currentState.eventStore; // need global-to-calendar, not local to component (splittable)state + for (var _i = 0, _a = subjectConfig.allows; _i < _a.length; _i++) { + var subjectAllow = _a[_i]; + var subjectDateSpan = __assign(__assign({}, dateSpanMeta), { + range: subjectInstance.range, + allDay: subjectDef.allDay, + }); + var origDef = calendarEventStore.defs[subjectDef.defId]; + var origInstance = calendarEventStore.instances[subjectInstanceId]; + var eventApi = void 0; + if (origDef) { + // was previously in the calendar + eventApi = new EventApi(context, origDef, origInstance); + } else { + // was an external event + eventApi = new EventApi(context, subjectDef); // no instance, because had no dates + } + if ( + !subjectAllow( + buildDateSpanApiWithContext(subjectDateSpan, context), + eventApi + ) + ) { + return false; + } + } + } + return true; + } + // Date Selection Validation + // ------------------------------------------------------------------------------------------------------------------------ + function isDateSelectionPropsValid( + state, + context, + dateSpanMeta, + filterConfig + ) { + var relevantEventStore = state.eventStore; + var relevantDefs = relevantEventStore.defs; + var relevantInstances = relevantEventStore.instances; + var selection = state.dateSelection; + var selectionRange = selection.range; + var selectionConfig = context.getCurrentData().selectionConfig; + if (filterConfig) { + selectionConfig = filterConfig(selectionConfig); + } + // constraint + if ( + !allConstraintsPass( + selectionConfig.constraints, + selectionRange, + relevantEventStore, + state.businessHours, + context + ) + ) { + return false; + } + // overlap + var selectOverlap = context.options.selectOverlap; + var selectOverlapFunc = + typeof selectOverlap === "function" ? selectOverlap : null; + for (var relevantInstanceId in relevantInstances) { + var relevantInstance = relevantInstances[relevantInstanceId]; + // intersect! evaluate + if (rangesIntersect(selectionRange, relevantInstance.range)) { + if (selectionConfig.overlap === false) { + return false; + } + if ( + selectOverlapFunc && + !selectOverlapFunc( + new EventApi( + context, + relevantDefs[relevantInstance.defId], + relevantInstance + ), + null + ) + ) { + return false; + } + } + } + // allow (a function) + for (var _i = 0, _a = selectionConfig.allows; _i < _a.length; _i++) { + var selectionAllow = _a[_i]; + var fullDateSpan = __assign(__assign({}, dateSpanMeta), selection); + if ( + !selectionAllow( + buildDateSpanApiWithContext(fullDateSpan, context), + null + ) + ) { + return false; + } + } + return true; + } + // Constraint Utils + // ------------------------------------------------------------------------------------------------------------------------ + function allConstraintsPass( + constraints, + subjectRange, + otherEventStore, + businessHoursUnexpanded, + context + ) { + for ( + var _i = 0, constraints_1 = constraints; + _i < constraints_1.length; + _i++ + ) { + var constraint = constraints_1[_i]; + if ( + !anyRangesContainRange( + constraintToRanges( + constraint, + subjectRange, + otherEventStore, + businessHoursUnexpanded, + context + ), + subjectRange + ) + ) { + return false; + } + } + return true; + } + function constraintToRanges( + constraint, + subjectRange, // for expanding a recurring constraint, or expanding business hours + otherEventStore, // for if constraint is an even group ID + businessHoursUnexpanded, // for if constraint is 'businessHours' + context + ) { + if (constraint === "businessHours") { + return eventStoreToRanges( + expandRecurring(businessHoursUnexpanded, subjectRange, context) + ); + } + if (typeof constraint === "string") { + // an group ID + return eventStoreToRanges( + filterEventStoreDefs(otherEventStore, function (eventDef) { + return eventDef.groupId === constraint; + }) + ); + } + if (typeof constraint === "object" && constraint) { + // non-null object + return eventStoreToRanges( + expandRecurring(constraint, subjectRange, context) + ); + } + return []; // if it's false + } + // TODO: move to event-store file? + function eventStoreToRanges(eventStore) { + var instances = eventStore.instances; + var ranges = []; + for (var instanceId in instances) { + ranges.push(instances[instanceId].range); + } + return ranges; + } + // TODO: move to geom file? + function anyRangesContainRange(outerRanges, innerRange) { + for ( + var _i = 0, outerRanges_1 = outerRanges; + _i < outerRanges_1.length; + _i++ + ) { + var outerRange = outerRanges_1[_i]; + if (rangeContainsRange(outerRange, innerRange)) { + return true; + } + } + return false; + } + + var VISIBLE_HIDDEN_RE = /^(visible|hidden)$/; + var Scroller = /** @class */ (function (_super) { + __extends(Scroller, _super); + function Scroller() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.handleEl = function (el) { + _this.el = el; + setRef(_this.props.elRef, el); + }; + return _this; + } + Scroller.prototype.render = function () { + var props = this.props; + var liquid = props.liquid, + liquidIsAbsolute = props.liquidIsAbsolute; + var isAbsolute = liquid && liquidIsAbsolute; + var className = ["fc-scroller"]; + if (liquid) { + if (liquidIsAbsolute) { + className.push("fc-scroller-liquid-absolute"); + } else { + className.push("fc-scroller-liquid"); + } + } + return createElement( + "div", + { + ref: this.handleEl, + className: className.join(" "), + style: { + overflowX: props.overflowX, + overflowY: props.overflowY, + left: (isAbsolute && -(props.overcomeLeft || 0)) || "", + right: (isAbsolute && -(props.overcomeRight || 0)) || "", + bottom: (isAbsolute && -(props.overcomeBottom || 0)) || "", + marginLeft: (!isAbsolute && -(props.overcomeLeft || 0)) || "", + marginRight: (!isAbsolute && -(props.overcomeRight || 0)) || "", + marginBottom: (!isAbsolute && -(props.overcomeBottom || 0)) || "", + maxHeight: props.maxHeight || "", + }, + }, + props.children + ); + }; + Scroller.prototype.needsXScrolling = function () { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { + return false; + } + // testing scrollWidth>clientWidth is unreliable cross-browser when pixel heights aren't integers. + // much more reliable to see if children are taller than the scroller, even tho doesn't account for + // inner-child margins and absolute positioning + var el = this.el; + var realClientWidth = + this.el.getBoundingClientRect().width - this.getYScrollbarWidth(); + var children = el.children; + for (var i = 0; i < children.length; i += 1) { + var childEl = children[i]; + if (childEl.getBoundingClientRect().width > realClientWidth) { + return true; + } + } + return false; + }; + Scroller.prototype.needsYScrolling = function () { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { + return false; + } + // testing scrollHeight>clientHeight is unreliable cross-browser when pixel heights aren't integers. + // much more reliable to see if children are taller than the scroller, even tho doesn't account for + // inner-child margins and absolute positioning + var el = this.el; + var realClientHeight = + this.el.getBoundingClientRect().height - this.getXScrollbarWidth(); + var children = el.children; + for (var i = 0; i < children.length; i += 1) { + var childEl = children[i]; + if (childEl.getBoundingClientRect().height > realClientHeight) { + return true; + } + } + return false; + }; + Scroller.prototype.getXScrollbarWidth = function () { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { + return 0; + } + return this.el.offsetHeight - this.el.clientHeight; // only works because we guarantee no borders. TODO: add to CSS with important? + }; + Scroller.prototype.getYScrollbarWidth = function () { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { + return 0; + } + return this.el.offsetWidth - this.el.clientWidth; // only works because we guarantee no borders. TODO: add to CSS with important? + }; + return Scroller; + })(BaseComponent); + + /* + TODO: somehow infer OtherArgs from masterCallback? + TODO: infer RefType from masterCallback if provided + */ + var RefMap = /** @class */ (function () { + function RefMap(masterCallback) { + var _this = this; + this.masterCallback = masterCallback; + this.currentMap = {}; + this.depths = {}; + this.callbackMap = {}; + this.handleValue = function (val, key) { + var _a = _this, + depths = _a.depths, + currentMap = _a.currentMap; + var removed = false; + var added = false; + if (val !== null) { + // for bug... ACTUALLY: can probably do away with this now that callers don't share numeric indices anymore + removed = key in currentMap; + currentMap[key] = val; + depths[key] = (depths[key] || 0) + 1; + added = true; + } else { + depths[key] -= 1; + if (!depths[key]) { + delete currentMap[key]; + delete _this.callbackMap[key]; + removed = true; + } + } + if (_this.masterCallback) { + if (removed) { + _this.masterCallback(null, String(key)); + } + if (added) { + _this.masterCallback(val, String(key)); + } + } + }; + } + RefMap.prototype.createRef = function (key) { + var _this = this; + var refCallback = this.callbackMap[key]; + if (!refCallback) { + refCallback = this.callbackMap[key] = function (val) { + _this.handleValue(val, String(key)); + }; + } + return refCallback; + }; + // TODO: check callers that don't care about order. should use getAll instead + // NOTE: this method has become less valuable now that we are encouraged to map order by some other index + // TODO: provide ONE array-export function, buildArray, which fails on non-numeric indexes. caller can manipulate and "collect" + RefMap.prototype.collect = function (startIndex, endIndex, step) { + return collectFromHash(this.currentMap, startIndex, endIndex, step); + }; + RefMap.prototype.getAll = function () { + return hashValuesToArray(this.currentMap); + }; + return RefMap; + })(); + + function computeShrinkWidth(chunkEls) { + var shrinkCells = findElements(chunkEls, ".fc-scrollgrid-shrink"); + var largestWidth = 0; + for ( + var _i = 0, shrinkCells_1 = shrinkCells; + _i < shrinkCells_1.length; + _i++ + ) { + var shrinkCell = shrinkCells_1[_i]; + largestWidth = Math.max( + largestWidth, + computeSmallestCellWidth(shrinkCell) + ); + } + return Math.ceil(largestWidth); // elements work best with integers. round up to ensure contents fits + } + function getSectionHasLiquidHeight(props, sectionConfig) { + return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well) + } + function getAllowYScrolling(props, sectionConfig) { + return ( + sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars + getSectionHasLiquidHeight(props, sectionConfig) + ); // if the section is liquid height, it might condense enough to require scrollbars + } + // TODO: ONLY use `arg`. force out internal function to use same API + function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) { + var expandRows = arg.expandRows; + var content = + typeof chunkConfig.content === "function" + ? chunkConfig.content(arg) + : createElement( + "table", + { + role: "presentation", + className: [ + chunkConfig.tableClassName, + sectionConfig.syncRowHeights ? "fc-scrollgrid-sync-table" : "", + ].join(" "), + style: { + minWidth: arg.tableMinWidth, + width: arg.clientWidth, + height: expandRows ? arg.clientHeight : "", // css `height` on a
serves as a min-height + }, + }, + arg.tableColGroupNode, + createElement( + isHeader ? "thead" : "tbody", + { + role: "presentation", + }, + typeof chunkConfig.rowContent === "function" + ? chunkConfig.rowContent(arg) + : chunkConfig.rowContent + ) + ); + return content; + } + function isColPropsEqual(cols0, cols1) { + return isArraysEqual(cols0, cols1, isPropsEqual); + } + function renderMicroColGroup(cols, shrinkWidth) { + var colNodes = []; + /* + for ColProps with spans, it would have been great to make a single + HOWEVER, Chrome was getting messing up distributing the width to elements makes Chrome behave. + */ + for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) { + var colProps = cols_1[_i]; + var span = colProps.span || 1; + for (var i = 0; i < span; i += 1) { + colNodes.push( + createElement("col", { + style: { + width: + colProps.width === "shrink" + ? sanitizeShrinkWidth(shrinkWidth) + : colProps.width || "", + minWidth: colProps.minWidth || "", + }, + }) + ); + } + } + return createElement.apply( + void 0, + __spreadArray(["colgroup", {}], colNodes) + ); + } + function sanitizeShrinkWidth(shrinkWidth) { + /* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth + 4 accounts for 2 2-pixel borders. TODO: better solution? */ + return shrinkWidth == null ? 4 : shrinkWidth; + } + function hasShrinkWidth(cols) { + for (var _i = 0, cols_2 = cols; _i < cols_2.length; _i++) { + var col = cols_2[_i]; + if (col.width === "shrink") { + return true; + } + } + return false; + } + function getScrollGridClassNames(liquid, context) { + var classNames = ["fc-scrollgrid", context.theme.getClass("table")]; + if (liquid) { + classNames.push("fc-scrollgrid-liquid"); + } + return classNames; + } + function getSectionClassNames(sectionConfig, wholeTableVGrow) { + var classNames = [ + "fc-scrollgrid-section", + "fc-scrollgrid-section-" + sectionConfig.type, + sectionConfig.className, // used? + ]; + if ( + wholeTableVGrow && + sectionConfig.liquid && + sectionConfig.maxHeight == null + ) { + classNames.push("fc-scrollgrid-section-liquid"); + } + if (sectionConfig.isSticky) { + classNames.push("fc-scrollgrid-section-sticky"); + } + return classNames; + } + function renderScrollShim(arg) { + return createElement("div", { + className: "fc-scrollgrid-sticky-shim", + style: { + width: arg.clientWidth, + minWidth: arg.tableMinWidth, + }, + }); + } + function getStickyHeaderDates(options) { + var stickyHeaderDates = options.stickyHeaderDates; + if (stickyHeaderDates == null || stickyHeaderDates === "auto") { + stickyHeaderDates = + options.height === "auto" || options.viewHeight === "auto"; + } + return stickyHeaderDates; + } + function getStickyFooterScrollbar(options) { + var stickyFooterScrollbar = options.stickyFooterScrollbar; + if (stickyFooterScrollbar == null || stickyFooterScrollbar === "auto") { + stickyFooterScrollbar = + options.height === "auto" || options.viewHeight === "auto"; + } + return stickyFooterScrollbar; + } + + var SimpleScrollGrid = /** @class */ (function (_super) { + __extends(SimpleScrollGrid, _super); + function SimpleScrollGrid() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.processCols = memoize(function (a) { + return a; + }, isColPropsEqual); // so we get same `cols` props every time + // yucky to memoize VNodes, but much more efficient for consumers + _this.renderMicroColGroup = memoize(renderMicroColGroup); + _this.scrollerRefs = new RefMap(); + _this.scrollerElRefs = new RefMap(_this._handleScrollerEl.bind(_this)); + _this.state = { + shrinkWidth: null, + forceYScrollbars: false, + scrollerClientWidths: {}, + scrollerClientHeights: {}, + }; + // TODO: can do a really simple print-view. dont need to join rows + _this.handleSizing = function () { + _this.safeSetState( + __assign( + { shrinkWidth: _this.computeShrinkWidth() }, + _this.computeScrollerDims() + ) + ); + }; + return _this; + } + SimpleScrollGrid.prototype.render = function () { + var _a = this, + props = _a.props, + state = _a.state, + context = _a.context; + var sectionConfigs = props.sections || []; + var cols = this.processCols(props.cols); + var microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth); + var classNames = getScrollGridClassNames(props.liquid, context); + if (props.collapsibleWidth) { + classNames.push("fc-scrollgrid-collapsible"); + } + // TODO: make DRY + var configCnt = sectionConfigs.length; + var configI = 0; + var currentConfig; + var headSectionNodes = []; + var bodySectionNodes = []; + var footSectionNodes = []; + while ( + configI < configCnt && + (currentConfig = sectionConfigs[configI]).type === "header" + ) { + headSectionNodes.push( + this.renderSection(currentConfig, microColGroupNode, true) + ); + configI += 1; + } + while ( + configI < configCnt && + (currentConfig = sectionConfigs[configI]).type === "body" + ) { + bodySectionNodes.push( + this.renderSection(currentConfig, microColGroupNode, false) + ); + configI += 1; + } + while ( + configI < configCnt && + (currentConfig = sectionConfigs[configI]).type === "footer" + ) { + footSectionNodes.push( + this.renderSection(currentConfig, microColGroupNode, true) + ); + configI += 1; + } + // firefox bug: when setting height on table and there is a thead or tfoot, + // the necessary height:100% on the liquid-height body section forces the *whole* table to be taller. (bug #5524) + // use getCanVGrowWithinCell as a way to detect table-stupid firefox. + // if so, use a simpler dom structure, jam everything into a lone tbody. + var isBuggy = !getCanVGrowWithinCell(); + var roleAttrs = { role: "rowgroup" }; + return createElement( + "table", + { + role: "grid", + className: classNames.join(" "), + style: { height: props.height }, + }, + Boolean(!isBuggy && headSectionNodes.length) && + createElement.apply( + void 0, + __spreadArray(["thead", roleAttrs], headSectionNodes) + ), + Boolean(!isBuggy && bodySectionNodes.length) && + createElement.apply( + void 0, + __spreadArray(["tbody", roleAttrs], bodySectionNodes) + ), + Boolean(!isBuggy && footSectionNodes.length) && + createElement.apply( + void 0, + __spreadArray(["tfoot", roleAttrs], footSectionNodes) + ), + isBuggy && + createElement.apply( + void 0, + __spreadArray( + __spreadArray( + __spreadArray(["tbody", roleAttrs], headSectionNodes), + bodySectionNodes + ), + footSectionNodes + ) + ) + ); + }; + SimpleScrollGrid.prototype.renderSection = function ( + sectionConfig, + microColGroupNode, + isHeader + ) { + if ("outerContent" in sectionConfig) { + return createElement( + Fragment, + { key: sectionConfig.key }, + sectionConfig.outerContent + ); + } + return createElement( + "tr", + { + key: sectionConfig.key, + role: "presentation", + className: getSectionClassNames( + sectionConfig, + this.props.liquid + ).join(" "), + }, + this.renderChunkTd( + sectionConfig, + microColGroupNode, + sectionConfig.chunk, + isHeader + ) + ); + }; + SimpleScrollGrid.prototype.renderChunkTd = function ( + sectionConfig, + microColGroupNode, + chunkConfig, + isHeader + ) { + if ("outerContent" in chunkConfig) { + return chunkConfig.outerContent; + } + var props = this.props; + var _a = this.state, + forceYScrollbars = _a.forceYScrollbars, + scrollerClientWidths = _a.scrollerClientWidths, + scrollerClientHeights = _a.scrollerClientHeights; + var needsYScrolling = getAllowYScrolling(props, sectionConfig); // TODO: do lazily. do in section config? + var isLiquid = getSectionHasLiquidHeight(props, sectionConfig); + // for `!props.liquid` - is WHOLE scrollgrid natural height? + // TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars + var overflowY = !props.liquid + ? "visible" + : forceYScrollbars + ? "scroll" + : !needsYScrolling + ? "hidden" + : "auto"; + var sectionKey = sectionConfig.key; + var content = renderChunkContent( + sectionConfig, + chunkConfig, + { + tableColGroupNode: microColGroupNode, + tableMinWidth: "", + clientWidth: + !props.collapsibleWidth && + scrollerClientWidths[sectionKey] !== undefined + ? scrollerClientWidths[sectionKey] + : null, + clientHeight: + scrollerClientHeights[sectionKey] !== undefined + ? scrollerClientHeights[sectionKey] + : null, + expandRows: sectionConfig.expandRows, + syncRowHeights: false, + rowSyncHeights: [], + reportRowHeightChange: function () {}, + }, + isHeader + ); + return createElement( + isHeader ? "th" : "td", + { + ref: chunkConfig.elRef, + role: "presentation", + }, + createElement( + "div", + { + className: + "fc-scroller-harness" + + (isLiquid ? " fc-scroller-harness-liquid" : ""), + }, + createElement( + Scroller, + { + ref: this.scrollerRefs.createRef(sectionKey), + elRef: this.scrollerElRefs.createRef(sectionKey), + overflowY: overflowY, + overflowX: !props.liquid + ? "visible" + : "hidden" /* natural height? */, + maxHeight: sectionConfig.maxHeight, + liquid: isLiquid, + // because its within a harness + liquidIsAbsolute: true, + }, + content + ) + ) + ); + }; + SimpleScrollGrid.prototype._handleScrollerEl = function (scrollerEl, key) { + var section = getSectionByKey(this.props.sections, key); + if (section) { + setRef(section.chunk.scrollerElRef, scrollerEl); + } + }; + SimpleScrollGrid.prototype.componentDidMount = function () { + this.handleSizing(); + this.context.addResizeHandler(this.handleSizing); + }; + SimpleScrollGrid.prototype.componentDidUpdate = function () { + // TODO: need better solution when state contains non-sizing things + this.handleSizing(); + }; + SimpleScrollGrid.prototype.componentWillUnmount = function () { + this.context.removeResizeHandler(this.handleSizing); + }; + SimpleScrollGrid.prototype.computeShrinkWidth = function () { + return hasShrinkWidth(this.props.cols) + ? computeShrinkWidth(this.scrollerElRefs.getAll()) + : 0; + }; + SimpleScrollGrid.prototype.computeScrollerDims = function () { + var scrollbarWidth = getScrollbarWidths(); + var _a = this, + scrollerRefs = _a.scrollerRefs, + scrollerElRefs = _a.scrollerElRefs; + var forceYScrollbars = false; + var scrollerClientWidths = {}; + var scrollerClientHeights = {}; + for (var sectionKey in scrollerRefs.currentMap) { + var scroller = scrollerRefs.currentMap[sectionKey]; + if (scroller && scroller.needsYScrolling()) { + forceYScrollbars = true; + break; + } + } + for (var _i = 0, _b = this.props.sections; _i < _b.length; _i++) { + var section = _b[_i]; + var sectionKey = section.key; + var scrollerEl = scrollerElRefs.currentMap[sectionKey]; + if (scrollerEl) { + var harnessEl = scrollerEl.parentNode; // TODO: weird way to get this. need harness b/c doesn't include table borders + scrollerClientWidths[sectionKey] = Math.floor( + harnessEl.getBoundingClientRect().width - + (forceYScrollbars + ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future + : 0) + ); + scrollerClientHeights[sectionKey] = Math.floor( + harnessEl.getBoundingClientRect().height + ); + } + } + return { + forceYScrollbars: forceYScrollbars, + scrollerClientWidths: scrollerClientWidths, + scrollerClientHeights: scrollerClientHeights, + }; + }; + return SimpleScrollGrid; + })(BaseComponent); + SimpleScrollGrid.addStateEquality({ + scrollerClientWidths: isPropsEqual, + scrollerClientHeights: isPropsEqual, + }); + function getSectionByKey(sections, key) { + for (var _i = 0, sections_1 = sections; _i < sections_1.length; _i++) { + var section = sections_1[_i]; + if (section.key === key) { + return section; + } + } + return null; + } + + var EventRoot = /** @class */ (function (_super) { + __extends(EventRoot, _super); + function EventRoot() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.elRef = createRef(); + return _this; + } + EventRoot.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var options = context.options; + var seg = props.seg; + var eventRange = seg.eventRange; + var ui = eventRange.ui; + var hookProps = { + event: new EventApi(context, eventRange.def, eventRange.instance), + view: context.viewApi, + timeText: props.timeText, + textColor: ui.textColor, + backgroundColor: ui.backgroundColor, + borderColor: ui.borderColor, + isDraggable: + !props.disableDragging && computeSegDraggable(seg, context), + isStartResizable: + !props.disableResizing && computeSegStartResizable(seg, context), + isEndResizable: !props.disableResizing && computeSegEndResizable(seg), + isMirror: Boolean( + props.isDragging || props.isResizing || props.isDateSelecting + ), + isStart: Boolean(seg.isStart), + isEnd: Boolean(seg.isEnd), + isPast: Boolean(props.isPast), + isFuture: Boolean(props.isFuture), + isToday: Boolean(props.isToday), + isSelected: Boolean(props.isSelected), + isDragging: Boolean(props.isDragging), + isResizing: Boolean(props.isResizing), + }; + var standardClassNames = getEventClassNames(hookProps).concat( + ui.classNames + ); + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.eventClassNames, + content: options.eventContent, + defaultContent: props.defaultContent, + didMount: options.eventDidMount, + willUnmount: options.eventWillUnmount, + elRef: this.elRef, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return props.children( + rootElRef, + standardClassNames.concat(customClassNames), + innerElRef, + innerContent, + hookProps + ); + } + ); + }; + EventRoot.prototype.componentDidMount = function () { + setElSeg(this.elRef.current, this.props.seg); + }; + /* + need to re-assign seg to the element if seg changes, even if the element is the same + */ + EventRoot.prototype.componentDidUpdate = function (prevProps) { + var seg = this.props.seg; + if (seg !== prevProps.seg) { + setElSeg(this.elRef.current, seg); + } + }; + return EventRoot; + })(BaseComponent); + + // should not be a purecomponent + var StandardEvent = /** @class */ (function (_super) { + __extends(StandardEvent, _super); + function StandardEvent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + StandardEvent.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var seg = props.seg; + var timeFormat = + context.options.eventTimeFormat || props.defaultTimeFormat; + var timeText = buildSegTimeText( + seg, + timeFormat, + context, + props.defaultDisplayEventTime, + props.defaultDisplayEventEnd + ); + return createElement( + EventRoot, + { + seg: seg, + timeText: timeText, + disableDragging: props.disableDragging, + disableResizing: props.disableResizing, + defaultContent: props.defaultContent || renderInnerContent$4, + isDragging: props.isDragging, + isResizing: props.isResizing, + isDateSelecting: props.isDateSelecting, + isSelected: props.isSelected, + isPast: props.isPast, + isFuture: props.isFuture, + isToday: props.isToday, + }, + function (rootElRef, classNames, innerElRef, innerContent, hookProps) { + return createElement( + "a", + __assign( + { + className: props.extraClassNames.concat(classNames).join(" "), + style: { + borderColor: hookProps.borderColor, + backgroundColor: hookProps.backgroundColor, + }, + ref: rootElRef, + }, + getSegAnchorAttrs(seg, context) + ), + createElement( + "div", + { + className: "fc-event-main", + ref: innerElRef, + style: { color: hookProps.textColor }, + }, + innerContent + ), + hookProps.isStartResizable && + createElement("div", { + className: "fc-event-resizer fc-event-resizer-start", + }), + hookProps.isEndResizable && + createElement("div", { + className: "fc-event-resizer fc-event-resizer-end", + }) + ); + } + ); + }; + return StandardEvent; + })(BaseComponent); + function renderInnerContent$4(innerProps) { + return createElement( + "div", + { className: "fc-event-main-frame" }, + innerProps.timeText && + createElement( + "div", + { className: "fc-event-time" }, + innerProps.timeText + ), + createElement( + "div", + { className: "fc-event-title-container" }, + createElement( + "div", + { className: "fc-event-title fc-sticky" }, + innerProps.event.title || createElement(Fragment, null, "\u00A0") + ) + ) + ); + } + + var NowIndicatorRoot = function (props) { + return createElement(ViewContextType.Consumer, null, function (context) { + var options = context.options; + var hookProps = { + isAxis: props.isAxis, + date: context.dateEnv.toDate(props.date), + view: context.viewApi, + }; + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.nowIndicatorClassNames, + content: options.nowIndicatorContent, + didMount: options.nowIndicatorDidMount, + willUnmount: options.nowIndicatorWillUnmount, + }, + props.children + ); + }); + }; + + var DAY_NUM_FORMAT = createFormatter({ day: "numeric" }); + var DayCellContent = /** @class */ (function (_super) { + __extends(DayCellContent, _super); + function DayCellContent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + DayCellContent.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var options = context.options; + var hookProps = refineDayCellHookProps({ + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + showDayNumber: props.showDayNumber, + extraProps: props.extraHookProps, + viewApi: context.viewApi, + dateEnv: context.dateEnv, + }); + return createElement( + ContentHook, + { + hookProps: hookProps, + content: options.dayCellContent, + defaultContent: props.defaultContent, + }, + props.children + ); + }; + return DayCellContent; + })(BaseComponent); + function refineDayCellHookProps(raw) { + var date = raw.date, + dateEnv = raw.dateEnv; + var dayMeta = getDateMeta(date, raw.todayRange, null, raw.dateProfile); + return __assign( + __assign( + __assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), + { + dayNumberText: raw.showDayNumber + ? dateEnv.format(date, DAY_NUM_FORMAT) + : "", + } + ), + raw.extraProps + ); + } + + var DayCellRoot = /** @class */ (function (_super) { + __extends(DayCellRoot, _super); + function DayCellRoot() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.refineHookProps = memoizeObjArg(refineDayCellHookProps); + _this.normalizeClassNames = buildClassNameNormalizer(); + return _this; + } + DayCellRoot.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var options = context.options; + var hookProps = this.refineHookProps({ + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + showDayNumber: props.showDayNumber, + extraProps: props.extraHookProps, + viewApi: context.viewApi, + dateEnv: context.dateEnv, + }); + var classNames = getDayClassNames(hookProps, context.theme).concat( + hookProps.isDisabled + ? [] // don't use custom classNames if disabled + : this.normalizeClassNames(options.dayCellClassNames, hookProps) + ); + var dataAttrs = hookProps.isDisabled + ? {} + : { + "data-date": formatDayString(props.date), + }; + return createElement( + MountHook, + { + hookProps: hookProps, + didMount: options.dayCellDidMount, + willUnmount: options.dayCellWillUnmount, + elRef: props.elRef, + }, + function (rootElRef) { + return props.children( + rootElRef, + classNames, + dataAttrs, + hookProps.isDisabled + ); + } + ); + }; + return DayCellRoot; + })(BaseComponent); + + function renderFill(fillType) { + return createElement("div", { className: "fc-" + fillType }); + } + var BgEvent = function (props) { + return createElement( + EventRoot, + { + defaultContent: renderInnerContent$3, + seg: props.seg /* uselesss i think */, + timeText: "", + disableDragging: true, + disableResizing: true, + isDragging: false, + isResizing: false, + isDateSelecting: false, + isSelected: false, + isPast: props.isPast, + isFuture: props.isFuture, + isToday: props.isToday, + }, + function (rootElRef, classNames, innerElRef, innerContent, hookProps) { + return createElement( + "div", + { + ref: rootElRef, + className: ["fc-bg-event"].concat(classNames).join(" "), + style: { + backgroundColor: hookProps.backgroundColor, + }, + }, + innerContent + ); + } + ); + }; + function renderInnerContent$3(props) { + var title = props.event.title; + return ( + title && + createElement("div", { className: "fc-event-title" }, props.event.title) + ); + } + + var WeekNumberRoot = function (props) { + return createElement(ViewContextType.Consumer, null, function (context) { + var dateEnv = context.dateEnv, + options = context.options; + var date = props.date; + var format = options.weekNumberFormat || props.defaultFormat; + var num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well? + var text = dateEnv.format(date, format); + var hookProps = { num: num, text: text, date: date }; + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.weekNumberClassNames, + content: options.weekNumberContent, + defaultContent: renderInner, + didMount: options.weekNumberDidMount, + willUnmount: options.weekNumberWillUnmount, + }, + props.children + ); + }); + }; + function renderInner(innerProps) { + return innerProps.text; + } + + var PADDING_FROM_VIEWPORT = 10; + var Popover = /** @class */ (function (_super) { + __extends(Popover, _super); + function Popover() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.state = { + titleId: getUniqueDomId(), + }; + _this.handleRootEl = function (el) { + _this.rootEl = el; + if (_this.props.elRef) { + setRef(_this.props.elRef, el); + } + }; + // Triggered when the user clicks *anywhere* in the document, for the autoHide feature + _this.handleDocumentMouseDown = function (ev) { + // only hide the popover if the click happened outside the popover + var target = getEventTargetViaRoot(ev); + if (!_this.rootEl.contains(target)) { + _this.handleCloseClick(); + } + }; + _this.handleDocumentKeyDown = function (ev) { + if (ev.key === "Escape") { + _this.handleCloseClick(); + } + }; + _this.handleCloseClick = function () { + var onClose = _this.props.onClose; + if (onClose) { + onClose(); + } + }; + return _this; + } + Popover.prototype.render = function () { + var _a = this.context, + theme = _a.theme, + options = _a.options; + var _b = this, + props = _b.props, + state = _b.state; + var classNames = ["fc-popover", theme.getClass("popover")].concat( + props.extraClassNames || [] + ); + return createPortal( + createElement( + "div", + __assign( + { + id: props.id, + className: classNames.join(" "), + "aria-labelledby": state.titleId, + }, + props.extraAttrs, + { ref: this.handleRootEl } + ), + createElement( + "div", + { + className: "fc-popover-header " + theme.getClass("popoverHeader"), + }, + createElement( + "span", + { className: "fc-popover-title", id: state.titleId }, + props.title + ), + createElement("span", { + className: "fc-popover-close " + theme.getIconClass("close"), + title: options.closeHint, + onClick: this.handleCloseClick, + }) + ), + createElement( + "div", + { + className: "fc-popover-body " + theme.getClass("popoverContent"), + }, + props.children + ) + ), + props.parentEl + ); + }; + Popover.prototype.componentDidMount = function () { + document.addEventListener("mousedown", this.handleDocumentMouseDown); + document.addEventListener("keydown", this.handleDocumentKeyDown); + this.updateSize(); + }; + Popover.prototype.componentWillUnmount = function () { + document.removeEventListener("mousedown", this.handleDocumentMouseDown); + document.removeEventListener("keydown", this.handleDocumentKeyDown); + }; + Popover.prototype.updateSize = function () { + var isRtl = this.context.isRtl; + var _a = this.props, + alignmentEl = _a.alignmentEl, + alignGridTop = _a.alignGridTop; + var rootEl = this.rootEl; + var alignmentRect = computeClippedClientRect(alignmentEl); + if (alignmentRect) { + var popoverDims = rootEl.getBoundingClientRect(); + // position relative to viewport + var popoverTop = alignGridTop + ? elementClosest( + alignmentEl, + ".fc-scrollgrid" + ).getBoundingClientRect().top + : alignmentRect.top; + var popoverLeft = isRtl + ? alignmentRect.right - popoverDims.width + : alignmentRect.left; + // constrain + popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT); + popoverLeft = Math.min( + popoverLeft, + document.documentElement.clientWidth - + PADDING_FROM_VIEWPORT - + popoverDims.width + ); + popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT); + var origin_1 = rootEl.offsetParent.getBoundingClientRect(); + applyStyle(rootEl, { + top: popoverTop - origin_1.top, + left: popoverLeft - origin_1.left, + }); + } + }; + return Popover; + })(BaseComponent); + + var MorePopover = /** @class */ (function (_super) { + __extends(MorePopover, _super); + function MorePopover() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.handleRootEl = function (rootEl) { + _this.rootEl = rootEl; + if (rootEl) { + _this.context.registerInteractiveComponent(_this, { + el: rootEl, + useEventCenter: false, + }); + } else { + _this.context.unregisterInteractiveComponent(_this); + } + }; + return _this; + } + MorePopover.prototype.render = function () { + var _a = this.context, + options = _a.options, + dateEnv = _a.dateEnv; + var props = this.props; + var startDate = props.startDate, + todayRange = props.todayRange, + dateProfile = props.dateProfile; + var title = dateEnv.format(startDate, options.dayPopoverFormat); + return createElement( + DayCellRoot, + { + date: startDate, + dateProfile: dateProfile, + todayRange: todayRange, + elRef: this.handleRootEl, + }, + function (rootElRef, dayClassNames, dataAttrs) { + return createElement( + Popover, + { + elRef: rootElRef, + id: props.id, + title: title, + extraClassNames: ["fc-more-popover"].concat(dayClassNames), + extraAttrs: + dataAttrs /* TODO: make these time-based when not whole-day? */, + parentEl: props.parentEl, + alignmentEl: props.alignmentEl, + alignGridTop: props.alignGridTop, + onClose: props.onClose, + }, + createElement( + DayCellContent, + { + date: startDate, + dateProfile: dateProfile, + todayRange: todayRange, + }, + function (innerElRef, innerContent) { + return ( + innerContent && + createElement( + "div", + { className: "fc-more-popover-misc", ref: innerElRef }, + innerContent + ) + ); + } + ), + props.children + ); + } + ); + }; + MorePopover.prototype.queryHit = function ( + positionLeft, + positionTop, + elWidth, + elHeight + ) { + var _a = this, + rootEl = _a.rootEl, + props = _a.props; + if ( + positionLeft >= 0 && + positionLeft < elWidth && + positionTop >= 0 && + positionTop < elHeight + ) { + return { + dateProfile: props.dateProfile, + dateSpan: __assign( + { + allDay: true, + range: { + start: props.startDate, + end: props.endDate, + }, + }, + props.extraDateSpan + ), + dayEl: rootEl, + rect: { + left: 0, + top: 0, + right: elWidth, + bottom: elHeight, + }, + layer: 1, // important when comparing with hits from other components + }; + } + return null; + }; + return MorePopover; + })(DateComponent); + + var MoreLinkRoot = /** @class */ (function (_super) { + __extends(MoreLinkRoot, _super); + function MoreLinkRoot() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.linkElRef = createRef(); + _this.state = { + isPopoverOpen: false, + popoverId: getUniqueDomId(), + }; + _this.handleClick = function (ev) { + var _a = _this, + props = _a.props, + context = _a.context; + var moreLinkClick = context.options.moreLinkClick; + var date = computeRange(props).start; + function buildPublicSeg(seg) { + var _a = seg.eventRange, + def = _a.def, + instance = _a.instance, + range = _a.range; + return { + event: new EventApi(context, def, instance), + start: context.dateEnv.toDate(range.start), + end: context.dateEnv.toDate(range.end), + isStart: seg.isStart, + isEnd: seg.isEnd, + }; + } + if (typeof moreLinkClick === "function") { + moreLinkClick = moreLinkClick({ + date: date, + allDay: Boolean(props.allDayDate), + allSegs: props.allSegs.map(buildPublicSeg), + hiddenSegs: props.hiddenSegs.map(buildPublicSeg), + jsEvent: ev, + view: context.viewApi, + }); + } + if (!moreLinkClick || moreLinkClick === "popover") { + _this.setState({ isPopoverOpen: true }); + } else if (typeof moreLinkClick === "string") { + // a view name + context.calendarApi.zoomTo(date, moreLinkClick); + } + }; + _this.handlePopoverClose = function () { + _this.setState({ isPopoverOpen: false }); + }; + return _this; + } + MoreLinkRoot.prototype.render = function () { + var _this = this; + var _a = this, + props = _a.props, + state = _a.state; + return createElement(ViewContextType.Consumer, null, function (context) { + var viewApi = context.viewApi, + options = context.options, + calendarApi = context.calendarApi; + var moreLinkText = options.moreLinkText; + var moreCnt = props.moreCnt; + var range = computeRange(props); + var text = + typeof moreLinkText === "function" // TODO: eventually use formatWithOrdinals + ? moreLinkText.call(calendarApi, moreCnt) + : "+" + moreCnt + " " + moreLinkText; + var title = formatWithOrdinals(options.moreLinkHint, [moreCnt], text); + var hookProps = { + num: moreCnt, + shortText: "+" + moreCnt, + text: text, + view: viewApi, + }; + return createElement( + Fragment, + null, + Boolean(props.moreCnt) && + createElement( + RenderHook, + { + elRef: _this.linkElRef, + hookProps: hookProps, + classNames: options.moreLinkClassNames, + content: options.moreLinkContent, + defaultContent: props.defaultContent || renderMoreLinkInner$1, + didMount: options.moreLinkDidMount, + willUnmount: options.moreLinkWillUnmount, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return props.children( + rootElRef, + ["fc-more-link"].concat(customClassNames), + innerElRef, + innerContent, + _this.handleClick, + title, + state.isPopoverOpen, + state.isPopoverOpen ? state.popoverId : "" + ); + } + ), + state.isPopoverOpen && + createElement( + MorePopover, + { + id: state.popoverId, + startDate: range.start, + endDate: range.end, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + extraDateSpan: props.extraDateSpan, + parentEl: _this.parentEl, + alignmentEl: props.alignmentElRef.current, + alignGridTop: props.alignGridTop, + onClose: _this.handlePopoverClose, + }, + props.popoverContent() + ) + ); + }); + }; + MoreLinkRoot.prototype.componentDidMount = function () { + this.updateParentEl(); + }; + MoreLinkRoot.prototype.componentDidUpdate = function () { + this.updateParentEl(); + }; + MoreLinkRoot.prototype.updateParentEl = function () { + if (this.linkElRef.current) { + this.parentEl = elementClosest( + this.linkElRef.current, + ".fc-view-harness" + ); + } + }; + return MoreLinkRoot; + })(BaseComponent); + function renderMoreLinkInner$1(props) { + return props.text; + } + function computeRange(props) { + if (props.allDayDate) { + return { + start: props.allDayDate, + end: addDays(props.allDayDate, 1), + }; + } + var hiddenSegs = props.hiddenSegs; + return { + start: computeEarliestSegStart(hiddenSegs), + end: computeLatestSegEnd(hiddenSegs), + }; + } + function computeEarliestSegStart(segs) { + return segs.reduce(pickEarliestStart).eventRange.range.start; + } + function pickEarliestStart(seg0, seg1) { + return seg0.eventRange.range.start < seg1.eventRange.range.start + ? seg0 + : seg1; + } + function computeLatestSegEnd(segs) { + return segs.reduce(pickLatestEnd).eventRange.range.end; + } + function pickLatestEnd(seg0, seg1) { + return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1; + } + + // exports + // -------------------------------------------------------------------------------------------------- + var version = "5.11.3"; // important to type it, so .d.ts has generic string + + var Calendar = /** @class */ (function (_super) { + __extends(Calendar, _super); + function Calendar(el, optionOverrides) { + if (optionOverrides === void 0) { + optionOverrides = {}; + } + var _this = _super.call(this) || this; + _this.isRendering = false; + _this.isRendered = false; + _this.currentClassNames = []; + _this.customContentRenderId = 0; // will affect custom generated classNames? + _this.handleAction = function (action) { + // actions we know we want to render immediately + switch (action.type) { + case "SET_EVENT_DRAG": + case "SET_EVENT_RESIZE": + _this.renderRunner.tryDrain(); + } + }; + _this.handleData = function (data) { + _this.currentData = data; + _this.renderRunner.request(data.calendarOptions.rerenderDelay); + }; + _this.handleRenderRequest = function () { + if (_this.isRendering) { + _this.isRendered = true; + var currentData_1 = _this.currentData; + flushSync(function () { + render( + createElement( + CalendarRoot, + { + options: currentData_1.calendarOptions, + theme: currentData_1.theme, + emitter: currentData_1.emitter, + }, + function (classNames, height, isHeightAuto, forPrint) { + _this.setClassNames(classNames); + _this.setHeight(height); + return createElement( + CustomContentRenderContext.Provider, + { value: _this.customContentRenderId }, + createElement( + CalendarContent, + __assign( + { isHeightAuto: isHeightAuto, forPrint: forPrint }, + currentData_1 + ) + ) + ); + } + ), + _this.el + ); + }); + } else if (_this.isRendered) { + _this.isRendered = false; + unmountComponentAtNode(_this.el); + _this.setClassNames([]); + _this.setHeight(""); + } + }; + _this.el = el; + _this.renderRunner = new DelayedRunner(_this.handleRenderRequest); + new CalendarDataManager({ + optionOverrides: optionOverrides, + calendarApi: _this, + onAction: _this.handleAction, + onData: _this.handleData, + }); + return _this; + } + Object.defineProperty(Calendar.prototype, "view", { + get: function () { + return this.currentData.viewApi; + }, // for public API + enumerable: false, + configurable: true, + }); + Calendar.prototype.render = function () { + var wasRendering = this.isRendering; + if (!wasRendering) { + this.isRendering = true; + } else { + this.customContentRenderId += 1; + } + this.renderRunner.request(); + if (wasRendering) { + this.updateSize(); + } + }; + Calendar.prototype.destroy = function () { + if (this.isRendering) { + this.isRendering = false; + this.renderRunner.request(); + } + }; + Calendar.prototype.updateSize = function () { + var _this = this; + flushSync(function () { + _super.prototype.updateSize.call(_this); + }); + }; + Calendar.prototype.batchRendering = function (func) { + this.renderRunner.pause("batchRendering"); + func(); + this.renderRunner.resume("batchRendering"); + }; + Calendar.prototype.pauseRendering = function () { + this.renderRunner.pause("pauseRendering"); + }; + Calendar.prototype.resumeRendering = function () { + this.renderRunner.resume("pauseRendering", true); + }; + Calendar.prototype.resetOptions = function (optionOverrides, append) { + this.currentDataManager.resetOptions(optionOverrides, append); + }; + Calendar.prototype.setClassNames = function (classNames) { + if (!isArraysEqual(classNames, this.currentClassNames)) { + var classList = this.el.classList; + for (var _i = 0, _a = this.currentClassNames; _i < _a.length; _i++) { + var className = _a[_i]; + classList.remove(className); + } + for ( + var _b = 0, classNames_1 = classNames; + _b < classNames_1.length; + _b++ + ) { + var className = classNames_1[_b]; + classList.add(className); + } + this.currentClassNames = classNames; + } + }; + Calendar.prototype.setHeight = function (height) { + applyStyleProp(this.el, "height", height); + }; + return Calendar; + })(CalendarApi); + + config.touchMouseIgnoreWait = 500; + var ignoreMouseDepth = 0; + var listenerCnt = 0; + var isWindowTouchMoveCancelled = false; + /* + Uses a "pointer" abstraction, which monitors UI events for both mouse and touch. + Tracks when the pointer "drags" on a certain element, meaning down+move+up. + + Also, tracks if there was touch-scrolling. + Also, can prevent touch-scrolling from happening. + Also, can fire pointermove events when scrolling happens underneath, even when no real pointer movement. + + emits: + - pointerdown + - pointermove + - pointerup + */ + var PointerDragging = /** @class */ (function () { + function PointerDragging(containerEl) { + var _this = this; + this.subjectEl = null; + // options that can be directly assigned by caller + this.selector = ""; // will cause subjectEl in all emitted events to be this element + this.handleSelector = ""; + this.shouldIgnoreMove = false; + this.shouldWatchScroll = true; // for simulating pointermove on scroll + // internal states + this.isDragging = false; + this.isTouchDragging = false; + this.wasTouchScroll = false; + // Mouse + // ---------------------------------------------------------------------------------------------------- + this.handleMouseDown = function (ev) { + if ( + !_this.shouldIgnoreMouse() && + isPrimaryMouseButton(ev) && + _this.tryStart(ev) + ) { + var pev = _this.createEventFromMouse(ev, true); + _this.emitter.trigger("pointerdown", pev); + _this.initScrollWatch(pev); + if (!_this.shouldIgnoreMove) { + document.addEventListener("mousemove", _this.handleMouseMove); + } + document.addEventListener("mouseup", _this.handleMouseUp); + } + }; + this.handleMouseMove = function (ev) { + var pev = _this.createEventFromMouse(ev); + _this.recordCoords(pev); + _this.emitter.trigger("pointermove", pev); + }; + this.handleMouseUp = function (ev) { + document.removeEventListener("mousemove", _this.handleMouseMove); + document.removeEventListener("mouseup", _this.handleMouseUp); + _this.emitter.trigger("pointerup", _this.createEventFromMouse(ev)); + _this.cleanup(); // call last so that pointerup has access to props + }; + // Touch + // ---------------------------------------------------------------------------------------------------- + this.handleTouchStart = function (ev) { + if (_this.tryStart(ev)) { + _this.isTouchDragging = true; + var pev = _this.createEventFromTouch(ev, true); + _this.emitter.trigger("pointerdown", pev); + _this.initScrollWatch(pev); + // unlike mouse, need to attach to target, not document + // https://stackoverflow.com/a/45760014 + var targetEl = ev.target; + if (!_this.shouldIgnoreMove) { + targetEl.addEventListener("touchmove", _this.handleTouchMove); + } + targetEl.addEventListener("touchend", _this.handleTouchEnd); + targetEl.addEventListener("touchcancel", _this.handleTouchEnd); // treat it as a touch end + // attach a handler to get called when ANY scroll action happens on the page. + // this was impossible to do with normal on/off because 'scroll' doesn't bubble. + // http://stackoverflow.com/a/32954565/96342 + window.addEventListener("scroll", _this.handleTouchScroll, true); + } + }; + this.handleTouchMove = function (ev) { + var pev = _this.createEventFromTouch(ev); + _this.recordCoords(pev); + _this.emitter.trigger("pointermove", pev); + }; + this.handleTouchEnd = function (ev) { + if (_this.isDragging) { + // done to guard against touchend followed by touchcancel + var targetEl = ev.target; + targetEl.removeEventListener("touchmove", _this.handleTouchMove); + targetEl.removeEventListener("touchend", _this.handleTouchEnd); + targetEl.removeEventListener("touchcancel", _this.handleTouchEnd); + window.removeEventListener("scroll", _this.handleTouchScroll, true); // useCaptured=true + _this.emitter.trigger("pointerup", _this.createEventFromTouch(ev)); + _this.cleanup(); // call last so that pointerup has access to props + _this.isTouchDragging = false; + startIgnoringMouse(); + } + }; + this.handleTouchScroll = function () { + _this.wasTouchScroll = true; + }; + this.handleScroll = function (ev) { + if (!_this.shouldIgnoreMove) { + var pageX = window.pageXOffset - _this.prevScrollX + _this.prevPageX; + var pageY = window.pageYOffset - _this.prevScrollY + _this.prevPageY; + _this.emitter.trigger("pointermove", { + origEvent: ev, + isTouch: _this.isTouchDragging, + subjectEl: _this.subjectEl, + pageX: pageX, + pageY: pageY, + deltaX: pageX - _this.origPageX, + deltaY: pageY - _this.origPageY, + }); + } + }; + this.containerEl = containerEl; + this.emitter = new Emitter(); + containerEl.addEventListener("mousedown", this.handleMouseDown); + containerEl.addEventListener("touchstart", this.handleTouchStart, { + passive: true, + }); + listenerCreated(); + } + PointerDragging.prototype.destroy = function () { + this.containerEl.removeEventListener("mousedown", this.handleMouseDown); + this.containerEl.removeEventListener( + "touchstart", + this.handleTouchStart, + { passive: true } + ); + listenerDestroyed(); + }; + PointerDragging.prototype.tryStart = function (ev) { + var subjectEl = this.querySubjectEl(ev); + var downEl = ev.target; + if ( + subjectEl && + (!this.handleSelector || elementClosest(downEl, this.handleSelector)) + ) { + this.subjectEl = subjectEl; + this.isDragging = true; // do this first so cancelTouchScroll will work + this.wasTouchScroll = false; + return true; + } + return false; + }; + PointerDragging.prototype.cleanup = function () { + isWindowTouchMoveCancelled = false; + this.isDragging = false; + this.subjectEl = null; + // keep wasTouchScroll around for later access + this.destroyScrollWatch(); + }; + PointerDragging.prototype.querySubjectEl = function (ev) { + if (this.selector) { + return elementClosest(ev.target, this.selector); + } + return this.containerEl; + }; + PointerDragging.prototype.shouldIgnoreMouse = function () { + return ignoreMouseDepth || this.isTouchDragging; + }; + // can be called by user of this class, to cancel touch-based scrolling for the current drag + PointerDragging.prototype.cancelTouchScroll = function () { + if (this.isDragging) { + isWindowTouchMoveCancelled = true; + } + }; + // Scrolling that simulates pointermoves + // ---------------------------------------------------------------------------------------------------- + PointerDragging.prototype.initScrollWatch = function (ev) { + if (this.shouldWatchScroll) { + this.recordCoords(ev); + window.addEventListener("scroll", this.handleScroll, true); // useCapture=true + } + }; + PointerDragging.prototype.recordCoords = function (ev) { + if (this.shouldWatchScroll) { + this.prevPageX = ev.pageX; + this.prevPageY = ev.pageY; + this.prevScrollX = window.pageXOffset; + this.prevScrollY = window.pageYOffset; + } + }; + PointerDragging.prototype.destroyScrollWatch = function () { + if (this.shouldWatchScroll) { + window.removeEventListener("scroll", this.handleScroll, true); // useCaptured=true + } + }; + // Event Normalization + // ---------------------------------------------------------------------------------------------------- + PointerDragging.prototype.createEventFromMouse = function (ev, isFirst) { + var deltaX = 0; + var deltaY = 0; + // TODO: repeat code + if (isFirst) { + this.origPageX = ev.pageX; + this.origPageY = ev.pageY; + } else { + deltaX = ev.pageX - this.origPageX; + deltaY = ev.pageY - this.origPageY; + } + return { + origEvent: ev, + isTouch: false, + subjectEl: this.subjectEl, + pageX: ev.pageX, + pageY: ev.pageY, + deltaX: deltaX, + deltaY: deltaY, + }; + }; + PointerDragging.prototype.createEventFromTouch = function (ev, isFirst) { + var touches = ev.touches; + var pageX; + var pageY; + var deltaX = 0; + var deltaY = 0; + // if touch coords available, prefer, + // because FF would give bad ev.pageX ev.pageY + if (touches && touches.length) { + pageX = touches[0].pageX; + pageY = touches[0].pageY; + } else { + pageX = ev.pageX; + pageY = ev.pageY; + } + // TODO: repeat code + if (isFirst) { + this.origPageX = pageX; + this.origPageY = pageY; + } else { + deltaX = pageX - this.origPageX; + deltaY = pageY - this.origPageY; + } + return { + origEvent: ev, + isTouch: true, + subjectEl: this.subjectEl, + pageX: pageX, + pageY: pageY, + deltaX: deltaX, + deltaY: deltaY, + }; + }; + return PointerDragging; + })(); + // 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.button === 0 && !ev.ctrlKey; + } + // Ignoring fake mouse events generated by touch + // ---------------------------------------------------------------------------------------------------- + function startIgnoringMouse() { + ignoreMouseDepth += 1; + setTimeout(function () { + ignoreMouseDepth -= 1; + }, config.touchMouseIgnoreWait); + } + // We want to attach touchmove as early as possible for Safari + // ---------------------------------------------------------------------------------------------------- + function listenerCreated() { + listenerCnt += 1; + if (listenerCnt === 1) { + window.addEventListener("touchmove", onWindowTouchMove, { + passive: false, + }); + } + } + function listenerDestroyed() { + listenerCnt -= 1; + if (!listenerCnt) { + window.removeEventListener("touchmove", onWindowTouchMove, { + passive: false, + }); + } + } + function onWindowTouchMove(ev) { + if (isWindowTouchMoveCancelled) { + ev.preventDefault(); + } + } + + /* + An effect in which an element follows the movement of a pointer across the screen. + The moving element is a clone of some other element. + Must call start + handleMove + stop. + */ + var ElementMirror = /** @class */ (function () { + function ElementMirror() { + this.isVisible = false; // must be explicitly enabled + this.sourceEl = null; + this.mirrorEl = null; + this.sourceElRect = null; // screen coords relative to viewport + // options that can be set directly by caller + this.parentNode = document.body; // HIGHLY SUGGESTED to set this to sidestep ShadowDOM issues + this.zIndex = 9999; + this.revertDuration = 0; + } + ElementMirror.prototype.start = function (sourceEl, pageX, pageY) { + this.sourceEl = sourceEl; + this.sourceElRect = this.sourceEl.getBoundingClientRect(); + this.origScreenX = pageX - window.pageXOffset; + this.origScreenY = pageY - window.pageYOffset; + this.deltaX = 0; + this.deltaY = 0; + this.updateElPosition(); + }; + ElementMirror.prototype.handleMove = function (pageX, pageY) { + this.deltaX = pageX - window.pageXOffset - this.origScreenX; + this.deltaY = pageY - window.pageYOffset - this.origScreenY; + this.updateElPosition(); + }; + // can be called before start + ElementMirror.prototype.setIsVisible = function (bool) { + if (bool) { + if (!this.isVisible) { + if (this.mirrorEl) { + this.mirrorEl.style.display = ""; + } + this.isVisible = bool; // needs to happen before updateElPosition + this.updateElPosition(); // because was not updating the position while invisible + } + } else if (this.isVisible) { + if (this.mirrorEl) { + this.mirrorEl.style.display = "none"; + } + this.isVisible = bool; + } + }; + // always async + ElementMirror.prototype.stop = function (needsRevertAnimation, callback) { + var _this = this; + var done = function () { + _this.cleanup(); + callback(); + }; + if ( + needsRevertAnimation && + this.mirrorEl && + this.isVisible && + this.revertDuration && // if 0, transition won't work + (this.deltaX || this.deltaY) // if same coords, transition won't work + ) { + this.doRevertAnimation(done, this.revertDuration); + } else { + setTimeout(done, 0); + } + }; + ElementMirror.prototype.doRevertAnimation = function ( + callback, + revertDuration + ) { + var mirrorEl = this.mirrorEl; + var finalSourceElRect = this.sourceEl.getBoundingClientRect(); // because autoscrolling might have happened + mirrorEl.style.transition = + "top " + revertDuration + "ms," + "left " + revertDuration + "ms"; + applyStyle(mirrorEl, { + left: finalSourceElRect.left, + top: finalSourceElRect.top, + }); + whenTransitionDone(mirrorEl, function () { + mirrorEl.style.transition = ""; + callback(); + }); + }; + ElementMirror.prototype.cleanup = function () { + if (this.mirrorEl) { + removeElement(this.mirrorEl); + this.mirrorEl = null; + } + this.sourceEl = null; + }; + ElementMirror.prototype.updateElPosition = function () { + if (this.sourceEl && this.isVisible) { + applyStyle(this.getMirrorEl(), { + left: this.sourceElRect.left + this.deltaX, + top: this.sourceElRect.top + this.deltaY, + }); + } + }; + ElementMirror.prototype.getMirrorEl = function () { + var sourceElRect = this.sourceElRect; + var mirrorEl = this.mirrorEl; + if (!mirrorEl) { + mirrorEl = this.mirrorEl = this.sourceEl.cloneNode(true); // cloneChildren=true + // we don't want long taps or any mouse interaction causing selection/menus. + // would use preventSelection(), but that prevents selectstart, causing problems. + mirrorEl.classList.add("fc-unselectable"); + mirrorEl.classList.add("fc-event-dragging"); + applyStyle(mirrorEl, { + position: "fixed", + zIndex: this.zIndex, + visibility: "", + boxSizing: "border-box", + width: sourceElRect.right - sourceElRect.left, + height: sourceElRect.bottom - sourceElRect.top, + right: "auto", + bottom: "auto", + margin: 0, + }); + this.parentNode.appendChild(mirrorEl); + } + return mirrorEl; + }; + return ElementMirror; + })(); + + /* + Is a cache for a given element's scroll information (all the info that ScrollController stores) + in addition the "client rectangle" of the element.. the area within the scrollbars. + + The cache can be in one of two modes: + - doesListening:false - ignores when the container is scrolled by someone else + - doesListening:true - watch for scrolling and update the cache + */ + var ScrollGeomCache = /** @class */ (function (_super) { + __extends(ScrollGeomCache, _super); + function ScrollGeomCache(scrollController, doesListening) { + var _this = _super.call(this) || this; + _this.handleScroll = function () { + _this.scrollTop = _this.scrollController.getScrollTop(); + _this.scrollLeft = _this.scrollController.getScrollLeft(); + _this.handleScrollChange(); + }; + _this.scrollController = scrollController; + _this.doesListening = doesListening; + _this.scrollTop = _this.origScrollTop = scrollController.getScrollTop(); + _this.scrollLeft = _this.origScrollLeft = + scrollController.getScrollLeft(); + _this.scrollWidth = scrollController.getScrollWidth(); + _this.scrollHeight = scrollController.getScrollHeight(); + _this.clientWidth = scrollController.getClientWidth(); + _this.clientHeight = scrollController.getClientHeight(); + _this.clientRect = _this.computeClientRect(); // do last in case it needs cached values + if (_this.doesListening) { + _this.getEventTarget().addEventListener("scroll", _this.handleScroll); + } + return _this; + } + ScrollGeomCache.prototype.destroy = function () { + if (this.doesListening) { + this.getEventTarget().removeEventListener("scroll", this.handleScroll); + } + }; + ScrollGeomCache.prototype.getScrollTop = function () { + return this.scrollTop; + }; + ScrollGeomCache.prototype.getScrollLeft = function () { + return this.scrollLeft; + }; + ScrollGeomCache.prototype.setScrollTop = function (top) { + this.scrollController.setScrollTop(top); + if (!this.doesListening) { + // we are not relying on the element to normalize out-of-bounds scroll values + // so we need to sanitize ourselves + this.scrollTop = Math.max(Math.min(top, this.getMaxScrollTop()), 0); + this.handleScrollChange(); + } + }; + ScrollGeomCache.prototype.setScrollLeft = function (top) { + this.scrollController.setScrollLeft(top); + if (!this.doesListening) { + // we are not relying on the element to normalize out-of-bounds scroll values + // so we need to sanitize ourselves + this.scrollLeft = Math.max(Math.min(top, this.getMaxScrollLeft()), 0); + this.handleScrollChange(); + } + }; + ScrollGeomCache.prototype.getClientWidth = function () { + return this.clientWidth; + }; + ScrollGeomCache.prototype.getClientHeight = function () { + return this.clientHeight; + }; + ScrollGeomCache.prototype.getScrollWidth = function () { + return this.scrollWidth; + }; + ScrollGeomCache.prototype.getScrollHeight = function () { + return this.scrollHeight; + }; + ScrollGeomCache.prototype.handleScrollChange = function () {}; + return ScrollGeomCache; + })(ScrollController); + + var ElementScrollGeomCache = /** @class */ (function (_super) { + __extends(ElementScrollGeomCache, _super); + function ElementScrollGeomCache(el, doesListening) { + return ( + _super.call(this, new ElementScrollController(el), doesListening) || + this + ); + } + ElementScrollGeomCache.prototype.getEventTarget = function () { + return this.scrollController.el; + }; + ElementScrollGeomCache.prototype.computeClientRect = function () { + return computeInnerRect(this.scrollController.el); + }; + return ElementScrollGeomCache; + })(ScrollGeomCache); + + var WindowScrollGeomCache = /** @class */ (function (_super) { + __extends(WindowScrollGeomCache, _super); + function WindowScrollGeomCache(doesListening) { + return ( + _super.call(this, new WindowScrollController(), doesListening) || this + ); + } + WindowScrollGeomCache.prototype.getEventTarget = function () { + return window; + }; + WindowScrollGeomCache.prototype.computeClientRect = function () { + return { + left: this.scrollLeft, + right: this.scrollLeft + this.clientWidth, + top: this.scrollTop, + bottom: this.scrollTop + this.clientHeight, + }; + }; + // the window is the only scroll object that changes it's rectangle relative + // to the document's topleft as it scrolls + WindowScrollGeomCache.prototype.handleScrollChange = function () { + this.clientRect = this.computeClientRect(); + }; + return WindowScrollGeomCache; + })(ScrollGeomCache); + + // If available we are using native "performance" API instead of "Date" + // Read more about it on MDN: + // https://developer.mozilla.org/en-US/docs/Web/API/Performance + var getTime = typeof performance === "function" ? performance.now : Date.now; + /* + For a pointer interaction, automatically scrolls certain scroll containers when the pointer + approaches the edge. + + The caller must call start + handleMove + stop. + */ + var AutoScroller = /** @class */ (function () { + function AutoScroller() { + var _this = this; + // options that can be set by caller + this.isEnabled = true; + this.scrollQuery = [window, ".fc-scroller"]; + this.edgeThreshold = 50; // pixels + this.maxVelocity = 300; // pixels per second + // internal state + this.pointerScreenX = null; + this.pointerScreenY = null; + this.isAnimating = false; + this.scrollCaches = null; + // protect against the initial pointerdown being too close to an edge and starting the scroll + this.everMovedUp = false; + this.everMovedDown = false; + this.everMovedLeft = false; + this.everMovedRight = false; + this.animate = function () { + if (_this.isAnimating) { + // wasn't cancelled between animation calls + var edge = _this.computeBestEdge( + _this.pointerScreenX + window.pageXOffset, + _this.pointerScreenY + window.pageYOffset + ); + if (edge) { + var now = getTime(); + _this.handleSide(edge, (now - _this.msSinceRequest) / 1000); + _this.requestAnimation(now); + } else { + _this.isAnimating = false; // will stop animation + } + } + }; + } + AutoScroller.prototype.start = function (pageX, pageY, scrollStartEl) { + if (this.isEnabled) { + this.scrollCaches = this.buildCaches(scrollStartEl); + this.pointerScreenX = null; + this.pointerScreenY = null; + this.everMovedUp = false; + this.everMovedDown = false; + this.everMovedLeft = false; + this.everMovedRight = false; + this.handleMove(pageX, pageY); + } + }; + AutoScroller.prototype.handleMove = function (pageX, pageY) { + if (this.isEnabled) { + var pointerScreenX = pageX - window.pageXOffset; + var pointerScreenY = pageY - window.pageYOffset; + var yDelta = + this.pointerScreenY === null + ? 0 + : pointerScreenY - this.pointerScreenY; + var xDelta = + this.pointerScreenX === null + ? 0 + : pointerScreenX - this.pointerScreenX; + if (yDelta < 0) { + this.everMovedUp = true; + } else if (yDelta > 0) { + this.everMovedDown = true; + } + if (xDelta < 0) { + this.everMovedLeft = true; + } else if (xDelta > 0) { + this.everMovedRight = true; + } + this.pointerScreenX = pointerScreenX; + this.pointerScreenY = pointerScreenY; + if (!this.isAnimating) { + this.isAnimating = true; + this.requestAnimation(getTime()); + } + } + }; + AutoScroller.prototype.stop = function () { + if (this.isEnabled) { + this.isAnimating = false; // will stop animation + for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) { + var scrollCache = _a[_i]; + scrollCache.destroy(); + } + this.scrollCaches = null; + } + }; + AutoScroller.prototype.requestAnimation = function (now) { + this.msSinceRequest = now; + requestAnimationFrame(this.animate); + }; + AutoScroller.prototype.handleSide = function (edge, seconds) { + var scrollCache = edge.scrollCache; + var edgeThreshold = this.edgeThreshold; + var invDistance = edgeThreshold - edge.distance; + var velocity = // the closer to the edge, the faster we scroll + ((invDistance * invDistance) / (edgeThreshold * edgeThreshold)) * // quadratic + this.maxVelocity * + seconds; + var sign = 1; + switch (edge.name) { + case "left": + sign = -1; + // falls through + case "right": + scrollCache.setScrollLeft( + scrollCache.getScrollLeft() + velocity * sign + ); + break; + case "top": + sign = -1; + // falls through + case "bottom": + scrollCache.setScrollTop( + scrollCache.getScrollTop() + velocity * sign + ); + break; + } + }; + // left/top are relative to document topleft + AutoScroller.prototype.computeBestEdge = function (left, top) { + var edgeThreshold = this.edgeThreshold; + var bestSide = null; + var scrollCaches = this.scrollCaches || []; + for ( + var _i = 0, scrollCaches_1 = scrollCaches; + _i < scrollCaches_1.length; + _i++ + ) { + var scrollCache = scrollCaches_1[_i]; + var rect = scrollCache.clientRect; + var leftDist = left - rect.left; + var rightDist = rect.right - left; + var topDist = top - rect.top; + var bottomDist = rect.bottom - top; + // completely within the rect? + if ( + leftDist >= 0 && + rightDist >= 0 && + topDist >= 0 && + bottomDist >= 0 + ) { + if ( + topDist <= edgeThreshold && + this.everMovedUp && + scrollCache.canScrollUp() && + (!bestSide || bestSide.distance > topDist) + ) { + bestSide = { + scrollCache: scrollCache, + name: "top", + distance: topDist, + }; + } + if ( + bottomDist <= edgeThreshold && + this.everMovedDown && + scrollCache.canScrollDown() && + (!bestSide || bestSide.distance > bottomDist) + ) { + bestSide = { + scrollCache: scrollCache, + name: "bottom", + distance: bottomDist, + }; + } + if ( + leftDist <= edgeThreshold && + this.everMovedLeft && + scrollCache.canScrollLeft() && + (!bestSide || bestSide.distance > leftDist) + ) { + bestSide = { + scrollCache: scrollCache, + name: "left", + distance: leftDist, + }; + } + if ( + rightDist <= edgeThreshold && + this.everMovedRight && + scrollCache.canScrollRight() && + (!bestSide || bestSide.distance > rightDist) + ) { + bestSide = { + scrollCache: scrollCache, + name: "right", + distance: rightDist, + }; + } + } + } + return bestSide; + }; + AutoScroller.prototype.buildCaches = function (scrollStartEl) { + return this.queryScrollEls(scrollStartEl).map(function (el) { + if (el === window) { + return new WindowScrollGeomCache(false); // false = don't listen to user-generated scrolls + } + return new ElementScrollGeomCache(el, false); // false = don't listen to user-generated scrolls + }); + }; + AutoScroller.prototype.queryScrollEls = function (scrollStartEl) { + var els = []; + for (var _i = 0, _a = this.scrollQuery; _i < _a.length; _i++) { + var query = _a[_i]; + if (typeof query === "object") { + els.push(query); + } else { + els.push.apply( + els, + Array.prototype.slice.call( + getElRoot(scrollStartEl).querySelectorAll(query) + ) + ); + } + } + return els; + }; + return AutoScroller; + })(); + + /* + Monitors dragging on an element. Has a number of high-level features: + - minimum distance required before dragging + - minimum wait time ("delay") before dragging + - a mirror element that follows the pointer + */ + var FeaturefulElementDragging = /** @class */ (function (_super) { + __extends(FeaturefulElementDragging, _super); + function FeaturefulElementDragging(containerEl, selector) { + var _this = _super.call(this, containerEl) || this; + _this.containerEl = containerEl; + // options that can be directly set by caller + // the caller can also set the PointerDragging's options as well + _this.delay = null; + _this.minDistance = 0; + _this.touchScrollAllowed = true; // prevents drag from starting and blocks scrolling during drag + _this.mirrorNeedsRevert = false; + _this.isInteracting = false; // is the user validly moving the pointer? lasts until pointerup + _this.isDragging = false; // is it INTENTFULLY dragging? lasts until after revert animation + _this.isDelayEnded = false; + _this.isDistanceSurpassed = false; + _this.delayTimeoutId = null; + _this.onPointerDown = function (ev) { + if (!_this.isDragging) { + // so new drag doesn't happen while revert animation is going + _this.isInteracting = true; + _this.isDelayEnded = false; + _this.isDistanceSurpassed = false; + preventSelection(document.body); + preventContextMenu(document.body); + // prevent links from being visited if there's an eventual drag. + // also prevents selection in older browsers (maybe?). + // not necessary for touch, besides, browser would complain about passiveness. + if (!ev.isTouch) { + ev.origEvent.preventDefault(); + } + _this.emitter.trigger("pointerdown", ev); + if ( + _this.isInteracting && // not destroyed via pointerdown handler + !_this.pointer.shouldIgnoreMove + ) { + // actions related to initiating dragstart+dragmove+dragend... + _this.mirror.setIsVisible(false); // reset. caller must set-visible + _this.mirror.start(ev.subjectEl, ev.pageX, ev.pageY); // must happen on first pointer down + _this.startDelay(ev); + if (!_this.minDistance) { + _this.handleDistanceSurpassed(ev); + } + } + } + }; + _this.onPointerMove = function (ev) { + if (_this.isInteracting) { + _this.emitter.trigger("pointermove", ev); + if (!_this.isDistanceSurpassed) { + var minDistance = _this.minDistance; + var distanceSq = void 0; // current distance from the origin, squared + var deltaX = ev.deltaX, + deltaY = ev.deltaY; + distanceSq = deltaX * deltaX + deltaY * deltaY; + if (distanceSq >= minDistance * minDistance) { + // use pythagorean theorem + _this.handleDistanceSurpassed(ev); + } + } + if (_this.isDragging) { + // a real pointer move? (not one simulated by scrolling) + if (ev.origEvent.type !== "scroll") { + _this.mirror.handleMove(ev.pageX, ev.pageY); + _this.autoScroller.handleMove(ev.pageX, ev.pageY); + } + _this.emitter.trigger("dragmove", ev); + } + } + }; + _this.onPointerUp = function (ev) { + if (_this.isInteracting) { + _this.isInteracting = false; + allowSelection(document.body); + allowContextMenu(document.body); + _this.emitter.trigger("pointerup", ev); // can potentially set mirrorNeedsRevert + if (_this.isDragging) { + _this.autoScroller.stop(); + _this.tryStopDrag(ev); // which will stop the mirror + } + if (_this.delayTimeoutId) { + clearTimeout(_this.delayTimeoutId); + _this.delayTimeoutId = null; + } + } + }; + var pointer = (_this.pointer = new PointerDragging(containerEl)); + pointer.emitter.on("pointerdown", _this.onPointerDown); + pointer.emitter.on("pointermove", _this.onPointerMove); + pointer.emitter.on("pointerup", _this.onPointerUp); + if (selector) { + pointer.selector = selector; + } + _this.mirror = new ElementMirror(); + _this.autoScroller = new AutoScroller(); + return _this; + } + FeaturefulElementDragging.prototype.destroy = function () { + this.pointer.destroy(); + // HACK: simulate a pointer-up to end the current drag + // TODO: fire 'dragend' directly and stop interaction. discourage use of pointerup event (b/c might not fire) + this.onPointerUp({}); + }; + FeaturefulElementDragging.prototype.startDelay = function (ev) { + var _this = this; + if (typeof this.delay === "number") { + this.delayTimeoutId = setTimeout(function () { + _this.delayTimeoutId = null; + _this.handleDelayEnd(ev); + }, this.delay); // not assignable to number! + } else { + this.handleDelayEnd(ev); + } + }; + FeaturefulElementDragging.prototype.handleDelayEnd = function (ev) { + this.isDelayEnded = true; + this.tryStartDrag(ev); + }; + FeaturefulElementDragging.prototype.handleDistanceSurpassed = function ( + ev + ) { + this.isDistanceSurpassed = true; + this.tryStartDrag(ev); + }; + FeaturefulElementDragging.prototype.tryStartDrag = function (ev) { + if (this.isDelayEnded && this.isDistanceSurpassed) { + if (!this.pointer.wasTouchScroll || this.touchScrollAllowed) { + this.isDragging = true; + this.mirrorNeedsRevert = false; + this.autoScroller.start(ev.pageX, ev.pageY, this.containerEl); + this.emitter.trigger("dragstart", ev); + if (this.touchScrollAllowed === false) { + this.pointer.cancelTouchScroll(); + } + } + } + }; + FeaturefulElementDragging.prototype.tryStopDrag = function (ev) { + // .stop() is ALWAYS asynchronous, which we NEED because we want all pointerup events + // that come from the document to fire beforehand. much more convenient this way. + this.mirror.stop(this.mirrorNeedsRevert, this.stopDrag.bind(this, ev)); + }; + FeaturefulElementDragging.prototype.stopDrag = function (ev) { + this.isDragging = false; + this.emitter.trigger("dragend", ev); + }; + // fill in the implementations... + FeaturefulElementDragging.prototype.setIgnoreMove = function (bool) { + this.pointer.shouldIgnoreMove = bool; + }; + FeaturefulElementDragging.prototype.setMirrorIsVisible = function (bool) { + this.mirror.setIsVisible(bool); + }; + FeaturefulElementDragging.prototype.setMirrorNeedsRevert = function (bool) { + this.mirrorNeedsRevert = bool; + }; + FeaturefulElementDragging.prototype.setAutoScrollEnabled = function (bool) { + this.autoScroller.isEnabled = bool; + }; + return FeaturefulElementDragging; + })(ElementDragging); + + /* + When this class is instantiated, it records the offset of an element (relative to the document topleft), + and continues to monitor scrolling, updating the cached coordinates if it needs to. + Does not access the DOM after instantiation, so highly performant. + + Also keeps track of all scrolling/overflow:hidden containers that are parents of the given element + and an determine if a given point is inside the combined clipping rectangle. + */ + var OffsetTracker = /** @class */ (function () { + function OffsetTracker(el) { + this.origRect = computeRect(el); + // will work fine for divs that have overflow:hidden + this.scrollCaches = getClippingParents(el).map(function (scrollEl) { + return new ElementScrollGeomCache(scrollEl, true); + }); + } + OffsetTracker.prototype.destroy = function () { + for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) { + var scrollCache = _a[_i]; + scrollCache.destroy(); + } + }; + OffsetTracker.prototype.computeLeft = function () { + var left = this.origRect.left; + for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) { + var scrollCache = _a[_i]; + left += scrollCache.origScrollLeft - scrollCache.getScrollLeft(); + } + return left; + }; + OffsetTracker.prototype.computeTop = function () { + var top = this.origRect.top; + for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) { + var scrollCache = _a[_i]; + top += scrollCache.origScrollTop - scrollCache.getScrollTop(); + } + return top; + }; + OffsetTracker.prototype.isWithinClipping = function (pageX, pageY) { + var point = { left: pageX, top: pageY }; + for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) { + var scrollCache = _a[_i]; + if ( + !isIgnoredClipping(scrollCache.getEventTarget()) && + !pointInsideRect(point, scrollCache.clientRect) + ) { + return false; + } + } + return true; + }; + return OffsetTracker; + })(); + // certain clipping containers should never constrain interactions, like and + // https://github.com/fullcalendar/fullcalendar/issues/3615 + function isIgnoredClipping(node) { + var tagName = node.tagName; + return tagName === "HTML" || tagName === "BODY"; + } + + /* + Tracks movement over multiple droppable areas (aka "hits") + that exist in one or more DateComponents. + Relies on an existing draggable. + + emits: + - pointerdown + - dragstart + - hitchange - fires initially, even if not over a hit + - pointerup + - (hitchange - again, to null, if ended over a hit) + - dragend + */ + var HitDragging = /** @class */ (function () { + function HitDragging(dragging, droppableStore) { + var _this = this; + // options that can be set by caller + this.useSubjectCenter = false; + this.requireInitial = true; // if doesn't start out on a hit, won't emit any events + this.initialHit = null; + this.movingHit = null; + this.finalHit = null; // won't ever be populated if shouldIgnoreMove + this.handlePointerDown = function (ev) { + var dragging = _this.dragging; + _this.initialHit = null; + _this.movingHit = null; + _this.finalHit = null; + _this.prepareHits(); + _this.processFirstCoord(ev); + if (_this.initialHit || !_this.requireInitial) { + dragging.setIgnoreMove(false); + // TODO: fire this before computing processFirstCoord, so listeners can cancel. this gets fired by almost every handler :( + _this.emitter.trigger("pointerdown", ev); + } else { + dragging.setIgnoreMove(true); + } + }; + this.handleDragStart = function (ev) { + _this.emitter.trigger("dragstart", ev); + _this.handleMove(ev, true); // force = fire even if initially null + }; + this.handleDragMove = function (ev) { + _this.emitter.trigger("dragmove", ev); + _this.handleMove(ev); + }; + this.handlePointerUp = function (ev) { + _this.releaseHits(); + _this.emitter.trigger("pointerup", ev); + }; + this.handleDragEnd = function (ev) { + if (_this.movingHit) { + _this.emitter.trigger("hitupdate", null, true, ev); + } + _this.finalHit = _this.movingHit; + _this.movingHit = null; + _this.emitter.trigger("dragend", ev); + }; + this.droppableStore = droppableStore; + dragging.emitter.on("pointerdown", this.handlePointerDown); + dragging.emitter.on("dragstart", this.handleDragStart); + dragging.emitter.on("dragmove", this.handleDragMove); + dragging.emitter.on("pointerup", this.handlePointerUp); + dragging.emitter.on("dragend", this.handleDragEnd); + this.dragging = dragging; + this.emitter = new Emitter(); + } + // sets initialHit + // sets coordAdjust + HitDragging.prototype.processFirstCoord = function (ev) { + var origPoint = { left: ev.pageX, top: ev.pageY }; + var adjustedPoint = origPoint; + var subjectEl = ev.subjectEl; + var subjectRect; + if (subjectEl instanceof HTMLElement) { + // i.e. not a Document/ShadowRoot + subjectRect = computeRect(subjectEl); + adjustedPoint = constrainPoint(adjustedPoint, subjectRect); + } + var initialHit = (this.initialHit = this.queryHitForOffset( + adjustedPoint.left, + adjustedPoint.top + )); + if (initialHit) { + if (this.useSubjectCenter && subjectRect) { + var slicedSubjectRect = intersectRects(subjectRect, initialHit.rect); + if (slicedSubjectRect) { + adjustedPoint = getRectCenter(slicedSubjectRect); + } + } + this.coordAdjust = diffPoints(adjustedPoint, origPoint); + } else { + this.coordAdjust = { left: 0, top: 0 }; + } + }; + HitDragging.prototype.handleMove = function (ev, forceHandle) { + var hit = this.queryHitForOffset( + ev.pageX + this.coordAdjust.left, + ev.pageY + this.coordAdjust.top + ); + if (forceHandle || !isHitsEqual(this.movingHit, hit)) { + this.movingHit = hit; + this.emitter.trigger("hitupdate", hit, false, ev); + } + }; + HitDragging.prototype.prepareHits = function () { + this.offsetTrackers = mapHash( + this.droppableStore, + function (interactionSettings) { + interactionSettings.component.prepareHits(); + return new OffsetTracker(interactionSettings.el); + } + ); + }; + HitDragging.prototype.releaseHits = function () { + var offsetTrackers = this.offsetTrackers; + for (var id in offsetTrackers) { + offsetTrackers[id].destroy(); + } + this.offsetTrackers = {}; + }; + HitDragging.prototype.queryHitForOffset = function (offsetLeft, offsetTop) { + var _a = this, + droppableStore = _a.droppableStore, + offsetTrackers = _a.offsetTrackers; + var bestHit = null; + for (var id in droppableStore) { + var component = droppableStore[id].component; + var offsetTracker = offsetTrackers[id]; + if ( + offsetTracker && // wasn't destroyed mid-drag + offsetTracker.isWithinClipping(offsetLeft, offsetTop) + ) { + var originLeft = offsetTracker.computeLeft(); + var originTop = offsetTracker.computeTop(); + var positionLeft = offsetLeft - originLeft; + var positionTop = offsetTop - originTop; + var origRect = offsetTracker.origRect; + var width = origRect.right - origRect.left; + var height = origRect.bottom - origRect.top; + if ( + // must be within the element's bounds + positionLeft >= 0 && + positionLeft < width && + positionTop >= 0 && + positionTop < height + ) { + var hit = component.queryHit( + positionLeft, + positionTop, + width, + height + ); + if ( + hit && + // make sure the hit is within activeRange, meaning it's not a dead cell + rangeContainsRange( + hit.dateProfile.activeRange, + hit.dateSpan.range + ) && + (!bestHit || hit.layer > bestHit.layer) + ) { + hit.componentId = id; + hit.context = component.context; + // TODO: better way to re-orient rectangle + hit.rect.left += originLeft; + hit.rect.right += originLeft; + hit.rect.top += originTop; + hit.rect.bottom += originTop; + bestHit = hit; + } + } + } + } + return bestHit; + }; + return HitDragging; + })(); + function isHitsEqual(hit0, hit1) { + if (!hit0 && !hit1) { + return true; + } + if (Boolean(hit0) !== Boolean(hit1)) { + return false; + } + return isDateSpansEqual(hit0.dateSpan, hit1.dateSpan); + } + + function buildDatePointApiWithContext(dateSpan, context) { + var props = {}; + for ( + var _i = 0, _a = context.pluginHooks.datePointTransforms; + _i < _a.length; + _i++ + ) { + var transform = _a[_i]; + __assign(props, transform(dateSpan, context)); + } + __assign(props, buildDatePointApi(dateSpan, context.dateEnv)); + return props; + } + function buildDatePointApi(span, dateEnv) { + return { + date: dateEnv.toDate(span.range.start), + dateStr: dateEnv.formatIso(span.range.start, { omitTime: span.allDay }), + allDay: span.allDay, + }; + } + + /* + Monitors when the user clicks on a specific date/time of a component. + A pointerdown+pointerup on the same "hit" constitutes a click. + */ + var DateClicking = /** @class */ (function (_super) { + __extends(DateClicking, _super); + function DateClicking(settings) { + var _this = _super.call(this, settings) || this; + _this.handlePointerDown = function (pev) { + var dragging = _this.dragging; + var downEl = pev.origEvent.target; + // do this in pointerdown (not dragend) because DOM might be mutated by the time dragend is fired + dragging.setIgnoreMove(!_this.component.isValidDateDownEl(downEl)); + }; + // won't even fire if moving was ignored + _this.handleDragEnd = function (ev) { + var component = _this.component; + var pointer = _this.dragging.pointer; + if (!pointer.wasTouchScroll) { + var _a = _this.hitDragging, + initialHit = _a.initialHit, + finalHit = _a.finalHit; + if (initialHit && finalHit && isHitsEqual(initialHit, finalHit)) { + var context = component.context; + var arg = __assign( + __assign( + {}, + buildDatePointApiWithContext(initialHit.dateSpan, context) + ), + { + dayEl: initialHit.dayEl, + jsEvent: ev.origEvent, + view: context.viewApi || context.calendarApi.view, + } + ); + context.emitter.trigger("dateClick", arg); + } + } + }; + // we DO want to watch pointer moves because otherwise finalHit won't get populated + _this.dragging = new FeaturefulElementDragging(settings.el); + _this.dragging.autoScroller.isEnabled = false; + var hitDragging = (_this.hitDragging = new HitDragging( + _this.dragging, + interactionSettingsToStore(settings) + )); + hitDragging.emitter.on("pointerdown", _this.handlePointerDown); + hitDragging.emitter.on("dragend", _this.handleDragEnd); + return _this; + } + DateClicking.prototype.destroy = function () { + this.dragging.destroy(); + }; + return DateClicking; + })(Interaction); + + /* + Tracks when the user selects a portion of time of a component, + constituted by a drag over date cells, with a possible delay at the beginning of the drag. + */ + var DateSelecting = /** @class */ (function (_super) { + __extends(DateSelecting, _super); + function DateSelecting(settings) { + var _this = _super.call(this, settings) || this; + _this.dragSelection = null; + _this.handlePointerDown = function (ev) { + var _a = _this, + component = _a.component, + dragging = _a.dragging; + var options = component.context.options; + var canSelect = + options.selectable && + component.isValidDateDownEl(ev.origEvent.target); + // don't bother to watch expensive moves if component won't do selection + dragging.setIgnoreMove(!canSelect); + // if touch, require user to hold down + dragging.delay = ev.isTouch + ? getComponentTouchDelay$1(component) + : null; + }; + _this.handleDragStart = function (ev) { + _this.component.context.calendarApi.unselect(ev); // unselect previous selections + }; + _this.handleHitUpdate = function (hit, isFinal) { + var context = _this.component.context; + var dragSelection = null; + var isInvalid = false; + if (hit) { + var initialHit = _this.hitDragging.initialHit; + var disallowed = + hit.componentId === initialHit.componentId && + _this.isHitComboAllowed && + !_this.isHitComboAllowed(initialHit, hit); + if (!disallowed) { + dragSelection = joinHitsIntoSelection( + initialHit, + hit, + context.pluginHooks.dateSelectionTransformers + ); + } + if ( + !dragSelection || + !isDateSelectionValid(dragSelection, hit.dateProfile, context) + ) { + isInvalid = true; + dragSelection = null; + } + } + if (dragSelection) { + context.dispatch({ type: "SELECT_DATES", selection: dragSelection }); + } else if (!isFinal) { + // only unselect if moved away while dragging + context.dispatch({ type: "UNSELECT_DATES" }); + } + if (!isInvalid) { + enableCursor(); + } else { + disableCursor(); + } + if (!isFinal) { + _this.dragSelection = dragSelection; // only clear if moved away from all hits while dragging + } + }; + _this.handlePointerUp = function (pev) { + if (_this.dragSelection) { + // selection is already rendered, so just need to report selection + triggerDateSelect(_this.dragSelection, pev, _this.component.context); + _this.dragSelection = null; + } + }; + var component = settings.component; + var options = component.context.options; + var dragging = (_this.dragging = new FeaturefulElementDragging( + settings.el + )); + dragging.touchScrollAllowed = false; + dragging.minDistance = options.selectMinDistance || 0; + dragging.autoScroller.isEnabled = options.dragScroll; + var hitDragging = (_this.hitDragging = new HitDragging( + _this.dragging, + interactionSettingsToStore(settings) + )); + hitDragging.emitter.on("pointerdown", _this.handlePointerDown); + hitDragging.emitter.on("dragstart", _this.handleDragStart); + hitDragging.emitter.on("hitupdate", _this.handleHitUpdate); + hitDragging.emitter.on("pointerup", _this.handlePointerUp); + return _this; + } + DateSelecting.prototype.destroy = function () { + this.dragging.destroy(); + }; + return DateSelecting; + })(Interaction); + function getComponentTouchDelay$1(component) { + var options = component.context.options; + var delay = options.selectLongPressDelay; + if (delay == null) { + delay = options.longPressDelay; + } + return delay; + } + function joinHitsIntoSelection(hit0, hit1, dateSelectionTransformers) { + var dateSpan0 = hit0.dateSpan; + var dateSpan1 = hit1.dateSpan; + var ms = [ + dateSpan0.range.start, + dateSpan0.range.end, + dateSpan1.range.start, + dateSpan1.range.end, + ]; + ms.sort(compareNumbers); + var props = {}; + for ( + var _i = 0, dateSelectionTransformers_1 = dateSelectionTransformers; + _i < dateSelectionTransformers_1.length; + _i++ + ) { + var transformer = dateSelectionTransformers_1[_i]; + var res = transformer(hit0, hit1); + if (res === false) { + return null; + } + if (res) { + __assign(props, res); + } + } + props.range = { start: ms[0], end: ms[3] }; + props.allDay = dateSpan0.allDay; + return props; + } + + var EventDragging = /** @class */ (function (_super) { + __extends(EventDragging, _super); + function EventDragging(settings) { + var _this = _super.call(this, settings) || this; + // internal state + _this.subjectEl = null; + _this.subjectSeg = null; // the seg being selected/dragged + _this.isDragging = false; + _this.eventRange = null; + _this.relevantEvents = null; // the events being dragged + _this.receivingContext = null; + _this.validMutation = null; + _this.mutatedRelevantEvents = null; + _this.handlePointerDown = function (ev) { + var origTarget = ev.origEvent.target; + var _a = _this, + component = _a.component, + dragging = _a.dragging; + var mirror = dragging.mirror; + var options = component.context.options; + var initialContext = component.context; + _this.subjectEl = ev.subjectEl; + var subjectSeg = (_this.subjectSeg = getElSeg(ev.subjectEl)); + var eventRange = (_this.eventRange = subjectSeg.eventRange); + var eventInstanceId = eventRange.instance.instanceId; + _this.relevantEvents = getRelevantEvents( + initialContext.getCurrentData().eventStore, + eventInstanceId + ); + dragging.minDistance = ev.isTouch ? 0 : options.eventDragMinDistance; + dragging.delay = + // only do a touch delay if touch and this event hasn't been selected yet + ev.isTouch && eventInstanceId !== component.props.eventSelection + ? getComponentTouchDelay(component) + : null; + if (options.fixedMirrorParent) { + mirror.parentNode = options.fixedMirrorParent; + } else { + mirror.parentNode = elementClosest(origTarget, ".fc"); + } + mirror.revertDuration = options.dragRevertDuration; + var isValid = + component.isValidSegDownEl(origTarget) && + !elementClosest(origTarget, ".fc-event-resizer"); // NOT on a resizer + dragging.setIgnoreMove(!isValid); + // disable dragging for elements that are resizable (ie, selectable) + // but are not draggable + _this.isDragging = + isValid && ev.subjectEl.classList.contains("fc-event-draggable"); + }; + _this.handleDragStart = function (ev) { + var initialContext = _this.component.context; + var eventRange = _this.eventRange; + var eventInstanceId = eventRange.instance.instanceId; + if (ev.isTouch) { + // need to select a different event? + if (eventInstanceId !== _this.component.props.eventSelection) { + initialContext.dispatch({ + type: "SELECT_EVENT", + eventInstanceId: eventInstanceId, + }); + } + } else { + // if now using mouse, but was previous touch interaction, clear selected event + initialContext.dispatch({ type: "UNSELECT_EVENT" }); + } + if (_this.isDragging) { + initialContext.calendarApi.unselect(ev); // unselect *date* selection + initialContext.emitter.trigger("eventDragStart", { + el: _this.subjectEl, + event: new EventApi( + initialContext, + eventRange.def, + eventRange.instance + ), + jsEvent: ev.origEvent, + view: initialContext.viewApi, + }); + } + }; + _this.handleHitUpdate = function (hit, isFinal) { + if (!_this.isDragging) { + return; + } + var relevantEvents = _this.relevantEvents; + var initialHit = _this.hitDragging.initialHit; + var initialContext = _this.component.context; + // states based on new hit + var receivingContext = null; + var mutation = null; + var mutatedRelevantEvents = null; + var isInvalid = false; + var interaction = { + affectedEvents: relevantEvents, + mutatedEvents: createEmptyEventStore(), + isEvent: true, + }; + if (hit) { + receivingContext = hit.context; + var receivingOptions = receivingContext.options; + if ( + initialContext === receivingContext || + (receivingOptions.editable && receivingOptions.droppable) + ) { + mutation = computeEventMutation( + initialHit, + hit, + receivingContext.getCurrentData().pluginHooks + .eventDragMutationMassagers + ); + if (mutation) { + mutatedRelevantEvents = applyMutationToEventStore( + relevantEvents, + receivingContext.getCurrentData().eventUiBases, + mutation, + receivingContext + ); + interaction.mutatedEvents = mutatedRelevantEvents; + if ( + !isInteractionValid( + interaction, + hit.dateProfile, + receivingContext + ) + ) { + isInvalid = true; + mutation = null; + mutatedRelevantEvents = null; + interaction.mutatedEvents = createEmptyEventStore(); + } + } + } else { + receivingContext = null; + } + } + _this.displayDrag(receivingContext, interaction); + if (!isInvalid) { + enableCursor(); + } else { + disableCursor(); + } + if (!isFinal) { + if ( + initialContext === receivingContext && // TODO: write test for this + isHitsEqual(initialHit, hit) + ) { + mutation = null; + } + _this.dragging.setMirrorNeedsRevert(!mutation); + // render the mirror if no already-rendered mirror + // TODO: wish we could somehow wait for dispatch to guarantee render + _this.dragging.setMirrorIsVisible( + !hit || + !getElRoot(_this.subjectEl).querySelector(".fc-event-mirror") + ); + // assign states based on new hit + _this.receivingContext = receivingContext; + _this.validMutation = mutation; + _this.mutatedRelevantEvents = mutatedRelevantEvents; + } + }; + _this.handlePointerUp = function () { + if (!_this.isDragging) { + _this.cleanup(); // because handleDragEnd won't fire + } + }; + _this.handleDragEnd = function (ev) { + if (_this.isDragging) { + var initialContext_1 = _this.component.context; + var initialView = initialContext_1.viewApi; + var _a = _this, + receivingContext_1 = _a.receivingContext, + validMutation = _a.validMutation; + var eventDef = _this.eventRange.def; + var eventInstance = _this.eventRange.instance; + var eventApi = new EventApi( + initialContext_1, + eventDef, + eventInstance + ); + var relevantEvents_1 = _this.relevantEvents; + var mutatedRelevantEvents_1 = _this.mutatedRelevantEvents; + var finalHit = _this.hitDragging.finalHit; + _this.clearDrag(); // must happen after revert animation + initialContext_1.emitter.trigger("eventDragStop", { + el: _this.subjectEl, + event: eventApi, + jsEvent: ev.origEvent, + view: initialView, + }); + if (validMutation) { + // dropped within same calendar + if (receivingContext_1 === initialContext_1) { + var updatedEventApi = new EventApi( + initialContext_1, + mutatedRelevantEvents_1.defs[eventDef.defId], + eventInstance + ? mutatedRelevantEvents_1.instances[eventInstance.instanceId] + : null + ); + initialContext_1.dispatch({ + type: "MERGE_EVENTS", + eventStore: mutatedRelevantEvents_1, + }); + var eventChangeArg = { + oldEvent: eventApi, + event: updatedEventApi, + relatedEvents: buildEventApis( + mutatedRelevantEvents_1, + initialContext_1, + eventInstance + ), + revert: function () { + initialContext_1.dispatch({ + type: "MERGE_EVENTS", + eventStore: relevantEvents_1, // the pre-change data + }); + }, + }; + var transformed = {}; + for ( + var _i = 0, + _b = + initialContext_1.getCurrentData().pluginHooks + .eventDropTransformers; + _i < _b.length; + _i++ + ) { + var transformer = _b[_i]; + __assign( + transformed, + transformer(validMutation, initialContext_1) + ); + } + initialContext_1.emitter.trigger( + "eventDrop", + __assign(__assign(__assign({}, eventChangeArg), transformed), { + el: ev.subjectEl, + delta: validMutation.datesDelta, + jsEvent: ev.origEvent, + view: initialView, + }) + ); + initialContext_1.emitter.trigger("eventChange", eventChangeArg); + // dropped in different calendar + } else if (receivingContext_1) { + var eventRemoveArg = { + event: eventApi, + relatedEvents: buildEventApis( + relevantEvents_1, + initialContext_1, + eventInstance + ), + revert: function () { + initialContext_1.dispatch({ + type: "MERGE_EVENTS", + eventStore: relevantEvents_1, + }); + }, + }; + initialContext_1.emitter.trigger( + "eventLeave", + __assign(__assign({}, eventRemoveArg), { + draggedEl: ev.subjectEl, + view: initialView, + }) + ); + initialContext_1.dispatch({ + type: "REMOVE_EVENTS", + eventStore: relevantEvents_1, + }); + initialContext_1.emitter.trigger("eventRemove", eventRemoveArg); + var addedEventDef = mutatedRelevantEvents_1.defs[eventDef.defId]; + var addedEventInstance = + mutatedRelevantEvents_1.instances[eventInstance.instanceId]; + var addedEventApi = new EventApi( + receivingContext_1, + addedEventDef, + addedEventInstance + ); + receivingContext_1.dispatch({ + type: "MERGE_EVENTS", + eventStore: mutatedRelevantEvents_1, + }); + var eventAddArg = { + event: addedEventApi, + relatedEvents: buildEventApis( + mutatedRelevantEvents_1, + receivingContext_1, + addedEventInstance + ), + revert: function () { + receivingContext_1.dispatch({ + type: "REMOVE_EVENTS", + eventStore: mutatedRelevantEvents_1, + }); + }, + }; + receivingContext_1.emitter.trigger("eventAdd", eventAddArg); + if (ev.isTouch) { + receivingContext_1.dispatch({ + type: "SELECT_EVENT", + eventInstanceId: eventInstance.instanceId, + }); + } + receivingContext_1.emitter.trigger( + "drop", + __assign( + __assign( + {}, + buildDatePointApiWithContext( + finalHit.dateSpan, + receivingContext_1 + ) + ), + { + draggedEl: ev.subjectEl, + jsEvent: ev.origEvent, + view: finalHit.context.viewApi, + } + ) + ); + receivingContext_1.emitter.trigger( + "eventReceive", + __assign(__assign({}, eventAddArg), { + draggedEl: ev.subjectEl, + view: finalHit.context.viewApi, + }) + ); + } + } else { + initialContext_1.emitter.trigger("_noEventDrop"); + } + } + _this.cleanup(); + }; + var component = _this.component; + var options = component.context.options; + var dragging = (_this.dragging = new FeaturefulElementDragging( + settings.el + )); + dragging.pointer.selector = EventDragging.SELECTOR; + dragging.touchScrollAllowed = false; + dragging.autoScroller.isEnabled = options.dragScroll; + var hitDragging = (_this.hitDragging = new HitDragging( + _this.dragging, + interactionSettingsStore + )); + hitDragging.useSubjectCenter = settings.useEventCenter; + hitDragging.emitter.on("pointerdown", _this.handlePointerDown); + hitDragging.emitter.on("dragstart", _this.handleDragStart); + hitDragging.emitter.on("hitupdate", _this.handleHitUpdate); + hitDragging.emitter.on("pointerup", _this.handlePointerUp); + hitDragging.emitter.on("dragend", _this.handleDragEnd); + return _this; + } + EventDragging.prototype.destroy = function () { + this.dragging.destroy(); + }; + // render a drag state on the next receivingCalendar + EventDragging.prototype.displayDrag = function (nextContext, state) { + var initialContext = this.component.context; + var prevContext = this.receivingContext; + // does the previous calendar need to be cleared? + if (prevContext && prevContext !== nextContext) { + // does the initial calendar need to be cleared? + // if so, don't clear all the way. we still need to to hide the affectedEvents + if (prevContext === initialContext) { + prevContext.dispatch({ + type: "SET_EVENT_DRAG", + state: { + affectedEvents: state.affectedEvents, + mutatedEvents: createEmptyEventStore(), + isEvent: true, + }, + }); + // completely clear the old calendar if it wasn't the initial + } else { + prevContext.dispatch({ type: "UNSET_EVENT_DRAG" }); + } + } + if (nextContext) { + nextContext.dispatch({ type: "SET_EVENT_DRAG", state: state }); + } + }; + EventDragging.prototype.clearDrag = function () { + var initialCalendar = this.component.context; + var receivingContext = this.receivingContext; + if (receivingContext) { + receivingContext.dispatch({ type: "UNSET_EVENT_DRAG" }); + } + // the initial calendar might have an dummy drag state from displayDrag + if (initialCalendar !== receivingContext) { + initialCalendar.dispatch({ type: "UNSET_EVENT_DRAG" }); + } + }; + EventDragging.prototype.cleanup = function () { + this.subjectSeg = null; + this.isDragging = false; + this.eventRange = null; + this.relevantEvents = null; + this.receivingContext = null; + this.validMutation = null; + this.mutatedRelevantEvents = null; + }; + // TODO: test this in IE11 + // QUESTION: why do we need it on the resizable??? + EventDragging.SELECTOR = ".fc-event-draggable, .fc-event-resizable"; + return EventDragging; + })(Interaction); + function computeEventMutation(hit0, hit1, massagers) { + var dateSpan0 = hit0.dateSpan; + var dateSpan1 = hit1.dateSpan; + var date0 = dateSpan0.range.start; + var date1 = dateSpan1.range.start; + var standardProps = {}; + if (dateSpan0.allDay !== dateSpan1.allDay) { + standardProps.allDay = dateSpan1.allDay; + standardProps.hasEnd = hit1.context.options.allDayMaintainDuration; + if (dateSpan1.allDay) { + // means date1 is already start-of-day, + // but date0 needs to be converted + date0 = startOfDay(date0); + } + } + var delta = diffDates( + date0, + date1, + hit0.context.dateEnv, + hit0.componentId === hit1.componentId ? hit0.largeUnit : null + ); + if (delta.milliseconds) { + // has hours/minutes/seconds + standardProps.allDay = false; + } + var mutation = { + datesDelta: delta, + standardProps: standardProps, + }; + for (var _i = 0, massagers_1 = massagers; _i < massagers_1.length; _i++) { + var massager = massagers_1[_i]; + massager(mutation, hit0, hit1); + } + return mutation; + } + function getComponentTouchDelay(component) { + var options = component.context.options; + var delay = options.eventLongPressDelay; + if (delay == null) { + delay = options.longPressDelay; + } + return delay; + } + + var EventResizing = /** @class */ (function (_super) { + __extends(EventResizing, _super); + function EventResizing(settings) { + var _this = _super.call(this, settings) || this; + // internal state + _this.draggingSegEl = null; + _this.draggingSeg = null; // TODO: rename to resizingSeg? subjectSeg? + _this.eventRange = null; + _this.relevantEvents = null; + _this.validMutation = null; + _this.mutatedRelevantEvents = null; + _this.handlePointerDown = function (ev) { + var component = _this.component; + var segEl = _this.querySegEl(ev); + var seg = getElSeg(segEl); + var eventRange = (_this.eventRange = seg.eventRange); + _this.dragging.minDistance = + component.context.options.eventDragMinDistance; + // if touch, need to be working with a selected event + _this.dragging.setIgnoreMove( + !_this.component.isValidSegDownEl(ev.origEvent.target) || + (ev.isTouch && + _this.component.props.eventSelection !== + eventRange.instance.instanceId) + ); + }; + _this.handleDragStart = function (ev) { + var context = _this.component.context; + var eventRange = _this.eventRange; + _this.relevantEvents = getRelevantEvents( + context.getCurrentData().eventStore, + _this.eventRange.instance.instanceId + ); + var segEl = _this.querySegEl(ev); + _this.draggingSegEl = segEl; + _this.draggingSeg = getElSeg(segEl); + context.calendarApi.unselect(); + context.emitter.trigger("eventResizeStart", { + el: segEl, + event: new EventApi(context, eventRange.def, eventRange.instance), + jsEvent: ev.origEvent, + view: context.viewApi, + }); + }; + _this.handleHitUpdate = function (hit, isFinal, ev) { + var context = _this.component.context; + var relevantEvents = _this.relevantEvents; + var initialHit = _this.hitDragging.initialHit; + var eventInstance = _this.eventRange.instance; + var mutation = null; + var mutatedRelevantEvents = null; + var isInvalid = false; + var interaction = { + affectedEvents: relevantEvents, + mutatedEvents: createEmptyEventStore(), + isEvent: true, + }; + if (hit) { + var disallowed = + hit.componentId === initialHit.componentId && + _this.isHitComboAllowed && + !_this.isHitComboAllowed(initialHit, hit); + if (!disallowed) { + mutation = computeMutation( + initialHit, + hit, + ev.subjectEl.classList.contains("fc-event-resizer-start"), + eventInstance.range + ); + } + } + if (mutation) { + mutatedRelevantEvents = applyMutationToEventStore( + relevantEvents, + context.getCurrentData().eventUiBases, + mutation, + context + ); + interaction.mutatedEvents = mutatedRelevantEvents; + if (!isInteractionValid(interaction, hit.dateProfile, context)) { + isInvalid = true; + mutation = null; + mutatedRelevantEvents = null; + interaction.mutatedEvents = null; + } + } + if (mutatedRelevantEvents) { + context.dispatch({ + type: "SET_EVENT_RESIZE", + state: interaction, + }); + } else { + context.dispatch({ type: "UNSET_EVENT_RESIZE" }); + } + if (!isInvalid) { + enableCursor(); + } else { + disableCursor(); + } + if (!isFinal) { + if (mutation && isHitsEqual(initialHit, hit)) { + mutation = null; + } + _this.validMutation = mutation; + _this.mutatedRelevantEvents = mutatedRelevantEvents; + } + }; + _this.handleDragEnd = function (ev) { + var context = _this.component.context; + var eventDef = _this.eventRange.def; + var eventInstance = _this.eventRange.instance; + var eventApi = new EventApi(context, eventDef, eventInstance); + var relevantEvents = _this.relevantEvents; + var mutatedRelevantEvents = _this.mutatedRelevantEvents; + context.emitter.trigger("eventResizeStop", { + el: _this.draggingSegEl, + event: eventApi, + jsEvent: ev.origEvent, + view: context.viewApi, + }); + if (_this.validMutation) { + var updatedEventApi = new EventApi( + context, + mutatedRelevantEvents.defs[eventDef.defId], + eventInstance + ? mutatedRelevantEvents.instances[eventInstance.instanceId] + : null + ); + context.dispatch({ + type: "MERGE_EVENTS", + eventStore: mutatedRelevantEvents, + }); + var eventChangeArg = { + oldEvent: eventApi, + event: updatedEventApi, + relatedEvents: buildEventApis( + mutatedRelevantEvents, + context, + eventInstance + ), + revert: function () { + context.dispatch({ + type: "MERGE_EVENTS", + eventStore: relevantEvents, // the pre-change events + }); + }, + }; + context.emitter.trigger( + "eventResize", + __assign(__assign({}, eventChangeArg), { + el: _this.draggingSegEl, + startDelta: _this.validMutation.startDelta || createDuration(0), + endDelta: _this.validMutation.endDelta || createDuration(0), + jsEvent: ev.origEvent, + view: context.viewApi, + }) + ); + context.emitter.trigger("eventChange", eventChangeArg); + } else { + context.emitter.trigger("_noEventResize"); + } + // reset all internal state + _this.draggingSeg = null; + _this.relevantEvents = null; + _this.validMutation = null; + // okay to keep eventInstance around. useful to set it in handlePointerDown + }; + var component = settings.component; + var dragging = (_this.dragging = new FeaturefulElementDragging( + settings.el + )); + dragging.pointer.selector = ".fc-event-resizer"; + dragging.touchScrollAllowed = false; + dragging.autoScroller.isEnabled = component.context.options.dragScroll; + var hitDragging = (_this.hitDragging = new HitDragging( + _this.dragging, + interactionSettingsToStore(settings) + )); + hitDragging.emitter.on("pointerdown", _this.handlePointerDown); + hitDragging.emitter.on("dragstart", _this.handleDragStart); + hitDragging.emitter.on("hitupdate", _this.handleHitUpdate); + hitDragging.emitter.on("dragend", _this.handleDragEnd); + return _this; + } + EventResizing.prototype.destroy = function () { + this.dragging.destroy(); + }; + EventResizing.prototype.querySegEl = function (ev) { + return elementClosest(ev.subjectEl, ".fc-event"); + }; + return EventResizing; + })(Interaction); + function computeMutation(hit0, hit1, isFromStart, instanceRange) { + var dateEnv = hit0.context.dateEnv; + var date0 = hit0.dateSpan.range.start; + var date1 = hit1.dateSpan.range.start; + var delta = diffDates(date0, date1, dateEnv, hit0.largeUnit); + if (isFromStart) { + if (dateEnv.add(instanceRange.start, delta) < instanceRange.end) { + return { startDelta: delta }; + } + } else if (dateEnv.add(instanceRange.end, delta) > instanceRange.start) { + return { endDelta: delta }; + } + return null; + } + + var UnselectAuto = /** @class */ (function () { + function UnselectAuto(context) { + var _this = this; + this.context = context; + this.isRecentPointerDateSelect = false; // wish we could use a selector to detect date selection, but uses hit system + this.matchesCancel = false; + this.matchesEvent = false; + this.onSelect = function (selectInfo) { + if (selectInfo.jsEvent) { + _this.isRecentPointerDateSelect = true; + } + }; + this.onDocumentPointerDown = function (pev) { + var unselectCancel = _this.context.options.unselectCancel; + var downEl = getEventTargetViaRoot(pev.origEvent); + _this.matchesCancel = !!elementClosest(downEl, unselectCancel); + _this.matchesEvent = !!elementClosest(downEl, EventDragging.SELECTOR); // interaction started on an event? + }; + this.onDocumentPointerUp = function (pev) { + var context = _this.context; + var documentPointer = _this.documentPointer; + var calendarState = context.getCurrentData(); + // touch-scrolling should never unfocus any type of selection + if (!documentPointer.wasTouchScroll) { + if ( + calendarState.dateSelection && // an existing date selection? + !_this.isRecentPointerDateSelect // a new pointer-initiated date selection since last onDocumentPointerUp? + ) { + var unselectAuto = context.options.unselectAuto; + if (unselectAuto && (!unselectAuto || !_this.matchesCancel)) { + context.calendarApi.unselect(pev); + } + } + if ( + calendarState.eventSelection && // an existing event selected? + !_this.matchesEvent // interaction DIDN'T start on an event + ) { + context.dispatch({ type: "UNSELECT_EVENT" }); + } + } + _this.isRecentPointerDateSelect = false; + }; + var documentPointer = (this.documentPointer = new PointerDragging( + document + )); + documentPointer.shouldIgnoreMove = true; + documentPointer.shouldWatchScroll = false; + documentPointer.emitter.on("pointerdown", this.onDocumentPointerDown); + documentPointer.emitter.on("pointerup", this.onDocumentPointerUp); + /* + TODO: better way to know about whether there was a selection with the pointer + */ + context.emitter.on("select", this.onSelect); + } + UnselectAuto.prototype.destroy = function () { + this.context.emitter.off("select", this.onSelect); + this.documentPointer.destroy(); + }; + return UnselectAuto; + })(); + + var OPTION_REFINERS$3 = { + fixedMirrorParent: identity, + }; + var LISTENER_REFINERS = { + dateClick: identity, + eventDragStart: identity, + eventDragStop: identity, + eventDrop: identity, + eventResizeStart: identity, + eventResizeStop: identity, + eventResize: identity, + drop: identity, + eventReceive: identity, + eventLeave: identity, + }; + + /* + Given an already instantiated draggable object for one-or-more elements, + Interprets any dragging as an attempt to drag an events that lives outside + of a calendar onto a calendar. + */ + var ExternalElementDragging = /** @class */ (function () { + function ExternalElementDragging(dragging, suppliedDragMeta) { + var _this = this; + this.receivingContext = null; + this.droppableEvent = null; // will exist for all drags, even if create:false + this.suppliedDragMeta = null; + this.dragMeta = null; + this.handleDragStart = function (ev) { + _this.dragMeta = _this.buildDragMeta(ev.subjectEl); + }; + this.handleHitUpdate = function (hit, isFinal, ev) { + var dragging = _this.hitDragging.dragging; + var receivingContext = null; + var droppableEvent = null; + var isInvalid = false; + var interaction = { + affectedEvents: createEmptyEventStore(), + mutatedEvents: createEmptyEventStore(), + isEvent: _this.dragMeta.create, + }; + if (hit) { + receivingContext = hit.context; + if (_this.canDropElOnCalendar(ev.subjectEl, receivingContext)) { + droppableEvent = computeEventForDateSpan( + hit.dateSpan, + _this.dragMeta, + receivingContext + ); + interaction.mutatedEvents = eventTupleToStore(droppableEvent); + isInvalid = !isInteractionValid( + interaction, + hit.dateProfile, + receivingContext + ); + if (isInvalid) { + interaction.mutatedEvents = createEmptyEventStore(); + droppableEvent = null; + } + } + } + _this.displayDrag(receivingContext, interaction); + // show mirror if no already-rendered mirror element OR if we are shutting down the mirror (?) + // TODO: wish we could somehow wait for dispatch to guarantee render + dragging.setMirrorIsVisible( + isFinal || + !droppableEvent || + !document.querySelector(".fc-event-mirror") + ); + if (!isInvalid) { + enableCursor(); + } else { + disableCursor(); + } + if (!isFinal) { + dragging.setMirrorNeedsRevert(!droppableEvent); + _this.receivingContext = receivingContext; + _this.droppableEvent = droppableEvent; + } + }; + this.handleDragEnd = function (pev) { + var _a = _this, + receivingContext = _a.receivingContext, + droppableEvent = _a.droppableEvent; + _this.clearDrag(); + if (receivingContext && droppableEvent) { + var finalHit = _this.hitDragging.finalHit; + var finalView = finalHit.context.viewApi; + var dragMeta = _this.dragMeta; + receivingContext.emitter.trigger( + "drop", + __assign( + __assign( + {}, + buildDatePointApiWithContext( + finalHit.dateSpan, + receivingContext + ) + ), + { + draggedEl: pev.subjectEl, + jsEvent: pev.origEvent, + view: finalView, + } + ) + ); + if (dragMeta.create) { + var addingEvents_1 = eventTupleToStore(droppableEvent); + receivingContext.dispatch({ + type: "MERGE_EVENTS", + eventStore: addingEvents_1, + }); + if (pev.isTouch) { + receivingContext.dispatch({ + type: "SELECT_EVENT", + eventInstanceId: droppableEvent.instance.instanceId, + }); + } + // signal that an external event landed + receivingContext.emitter.trigger("eventReceive", { + event: new EventApi( + receivingContext, + droppableEvent.def, + droppableEvent.instance + ), + relatedEvents: [], + revert: function () { + receivingContext.dispatch({ + type: "REMOVE_EVENTS", + eventStore: addingEvents_1, + }); + }, + draggedEl: pev.subjectEl, + view: finalView, + }); + } + } + _this.receivingContext = null; + _this.droppableEvent = null; + }; + var hitDragging = (this.hitDragging = new HitDragging( + dragging, + interactionSettingsStore + )); + hitDragging.requireInitial = false; // will start outside of a component + hitDragging.emitter.on("dragstart", this.handleDragStart); + hitDragging.emitter.on("hitupdate", this.handleHitUpdate); + hitDragging.emitter.on("dragend", this.handleDragEnd); + this.suppliedDragMeta = suppliedDragMeta; + } + ExternalElementDragging.prototype.buildDragMeta = function (subjectEl) { + if (typeof this.suppliedDragMeta === "object") { + return parseDragMeta(this.suppliedDragMeta); + } + if (typeof this.suppliedDragMeta === "function") { + return parseDragMeta(this.suppliedDragMeta(subjectEl)); + } + return getDragMetaFromEl(subjectEl); + }; + ExternalElementDragging.prototype.displayDrag = function ( + nextContext, + state + ) { + var prevContext = this.receivingContext; + if (prevContext && prevContext !== nextContext) { + prevContext.dispatch({ type: "UNSET_EVENT_DRAG" }); + } + if (nextContext) { + nextContext.dispatch({ type: "SET_EVENT_DRAG", state: state }); + } + }; + ExternalElementDragging.prototype.clearDrag = function () { + if (this.receivingContext) { + this.receivingContext.dispatch({ type: "UNSET_EVENT_DRAG" }); + } + }; + ExternalElementDragging.prototype.canDropElOnCalendar = function ( + el, + receivingContext + ) { + var dropAccept = receivingContext.options.dropAccept; + if (typeof dropAccept === "function") { + return dropAccept.call(receivingContext.calendarApi, el); + } + if (typeof dropAccept === "string" && dropAccept) { + return Boolean(elementMatches(el, dropAccept)); + } + return true; + }; + return ExternalElementDragging; + })(); + // Utils for computing event store from the DragMeta + // ---------------------------------------------------------------------------------------------------- + function computeEventForDateSpan(dateSpan, dragMeta, context) { + var defProps = __assign({}, dragMeta.leftoverProps); + for ( + var _i = 0, _a = context.pluginHooks.externalDefTransforms; + _i < _a.length; + _i++ + ) { + var transform = _a[_i]; + __assign(defProps, transform(dateSpan, dragMeta)); + } + var _b = refineEventDef(defProps, context), + refined = _b.refined, + extra = _b.extra; + var def = parseEventDef( + refined, + extra, + dragMeta.sourceId, + dateSpan.allDay, + context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd + context + ); + var start = dateSpan.range.start; + // only rely on time info if drop zone is all-day, + // otherwise, we already know the time + if (dateSpan.allDay && dragMeta.startTime) { + start = context.dateEnv.add(start, dragMeta.startTime); + } + var end = dragMeta.duration + ? context.dateEnv.add(start, dragMeta.duration) + : getDefaultEventEnd(dateSpan.allDay, start, context); + var instance = createEventInstance(def.defId, { start: start, end: end }); + return { def: def, instance: instance }; + } + // Utils for extracting data from element + // ---------------------------------------------------------------------------------------------------- + function getDragMetaFromEl(el) { + var str = getEmbeddedElData(el, "event"); + var obj = str ? JSON.parse(str) : { create: false }; // if no embedded data, assume no event creation + return parseDragMeta(obj); + } + config.dataAttrPrefix = ""; + function getEmbeddedElData(el, name) { + var prefix = config.dataAttrPrefix; + var prefixedName = (prefix ? prefix + "-" : "") + name; + return el.getAttribute("data-" + prefixedName) || ""; + } + + /* + Makes an element (that is *external* to any calendar) draggable. + Can pass in data that determines how an event will be created when dropped onto a calendar. + Leverages FullCalendar's internal drag-n-drop functionality WITHOUT a third-party drag system. + */ + var ExternalDraggable = /** @class */ (function () { + function ExternalDraggable(el, settings) { + var _this = this; + if (settings === void 0) { + settings = {}; + } + this.handlePointerDown = function (ev) { + var dragging = _this.dragging; + var _a = _this.settings, + minDistance = _a.minDistance, + longPressDelay = _a.longPressDelay; + dragging.minDistance = + minDistance != null + ? minDistance + : ev.isTouch + ? 0 + : BASE_OPTION_DEFAULTS.eventDragMinDistance; + dragging.delay = ev.isTouch // TODO: eventually read eventLongPressDelay instead vvv + ? longPressDelay != null + ? longPressDelay + : BASE_OPTION_DEFAULTS.longPressDelay + : 0; + }; + this.handleDragStart = function (ev) { + if ( + ev.isTouch && + _this.dragging.delay && + ev.subjectEl.classList.contains("fc-event") + ) { + _this.dragging.mirror + .getMirrorEl() + .classList.add("fc-event-selected"); + } + }; + this.settings = settings; + var dragging = (this.dragging = new FeaturefulElementDragging(el)); + dragging.touchScrollAllowed = false; + if (settings.itemSelector != null) { + dragging.pointer.selector = settings.itemSelector; + } + if (settings.appendTo != null) { + dragging.mirror.parentNode = settings.appendTo; // TODO: write tests + } + dragging.emitter.on("pointerdown", this.handlePointerDown); + dragging.emitter.on("dragstart", this.handleDragStart); + new ExternalElementDragging(dragging, settings.eventData); // eslint-disable-line no-new + } + ExternalDraggable.prototype.destroy = function () { + this.dragging.destroy(); + }; + return ExternalDraggable; + })(); + + /* + Detects when a *THIRD-PARTY* drag-n-drop system interacts with elements. + The third-party system is responsible for drawing the visuals effects of the drag. + This class simply monitors for pointer movements and fires events. + It also has the ability to hide the moving element (the "mirror") during the drag. + */ + var InferredElementDragging = /** @class */ (function (_super) { + __extends(InferredElementDragging, _super); + function InferredElementDragging(containerEl) { + var _this = _super.call(this, containerEl) || this; + _this.shouldIgnoreMove = false; + _this.mirrorSelector = ""; + _this.currentMirrorEl = null; + _this.handlePointerDown = function (ev) { + _this.emitter.trigger("pointerdown", ev); + if (!_this.shouldIgnoreMove) { + // fire dragstart right away. does not support delay or min-distance + _this.emitter.trigger("dragstart", ev); + } + }; + _this.handlePointerMove = function (ev) { + if (!_this.shouldIgnoreMove) { + _this.emitter.trigger("dragmove", ev); + } + }; + _this.handlePointerUp = function (ev) { + _this.emitter.trigger("pointerup", ev); + if (!_this.shouldIgnoreMove) { + // fire dragend right away. does not support a revert animation + _this.emitter.trigger("dragend", ev); + } + }; + var pointer = (_this.pointer = new PointerDragging(containerEl)); + pointer.emitter.on("pointerdown", _this.handlePointerDown); + pointer.emitter.on("pointermove", _this.handlePointerMove); + pointer.emitter.on("pointerup", _this.handlePointerUp); + return _this; + } + InferredElementDragging.prototype.destroy = function () { + this.pointer.destroy(); + }; + InferredElementDragging.prototype.setIgnoreMove = function (bool) { + this.shouldIgnoreMove = bool; + }; + InferredElementDragging.prototype.setMirrorIsVisible = function (bool) { + if (bool) { + // restore a previously hidden element. + // use the reference in case the selector class has already been removed. + if (this.currentMirrorEl) { + this.currentMirrorEl.style.visibility = ""; + this.currentMirrorEl = null; + } + } else { + var mirrorEl = this.mirrorSelector + ? // TODO: somehow query FullCalendars WITHIN shadow-roots + document.querySelector(this.mirrorSelector) + : null; + if (mirrorEl) { + this.currentMirrorEl = mirrorEl; + mirrorEl.style.visibility = "hidden"; + } + } + }; + return InferredElementDragging; + })(ElementDragging); + + /* + Bridges third-party drag-n-drop systems with FullCalendar. + Must be instantiated and destroyed by caller. + */ + var ThirdPartyDraggable = /** @class */ (function () { + function ThirdPartyDraggable(containerOrSettings, settings) { + var containerEl = document; + if ( + // wish we could just test instanceof EventTarget, but doesn't work in IE11 + containerOrSettings === document || + containerOrSettings instanceof Element + ) { + containerEl = containerOrSettings; + settings = settings || {}; + } else { + settings = containerOrSettings || {}; + } + var dragging = (this.dragging = new InferredElementDragging(containerEl)); + if (typeof settings.itemSelector === "string") { + dragging.pointer.selector = settings.itemSelector; + } else if (containerEl === document) { + dragging.pointer.selector = "[data-event]"; + } + if (typeof settings.mirrorSelector === "string") { + dragging.mirrorSelector = settings.mirrorSelector; + } + new ExternalElementDragging(dragging, settings.eventData); // eslint-disable-line no-new + } + ThirdPartyDraggable.prototype.destroy = function () { + this.dragging.destroy(); + }; + return ThirdPartyDraggable; + })(); + + var interactionPlugin = createPlugin({ + componentInteractions: [ + DateClicking, + DateSelecting, + EventDragging, + EventResizing, + ], + calendarInteractions: [UnselectAuto], + elementDraggingImpl: FeaturefulElementDragging, + optionRefiners: OPTION_REFINERS$3, + listenerRefiners: LISTENER_REFINERS, + }); + + /* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells. + ----------------------------------------------------------------------------------------------------------------------*/ + // It is a manager for a Table subcomponent, which does most of the heavy lifting. + // It is responsible for managing width/height. + var TableView = /** @class */ (function (_super) { + __extends(TableView, _super); + function TableView() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.headerElRef = createRef(); + return _this; + } + TableView.prototype.renderSimpleLayout = function ( + headerRowContent, + bodyContent + ) { + var _a = this, + props = _a.props, + context = _a.context; + var sections = []; + var stickyHeaderDates = getStickyHeaderDates(context.options); + if (headerRowContent) { + sections.push({ + type: "header", + key: "header", + isSticky: stickyHeaderDates, + chunk: { + elRef: this.headerElRef, + tableClassName: "fc-col-header", + rowContent: headerRowContent, + }, + }); + } + sections.push({ + type: "body", + key: "body", + liquid: true, + chunk: { content: bodyContent }, + }); + return createElement( + ViewRoot, + { viewSpec: context.viewSpec }, + function (rootElRef, classNames) { + return createElement( + "div", + { + ref: rootElRef, + className: ["fc-daygrid"].concat(classNames).join(" "), + }, + createElement(SimpleScrollGrid, { + liquid: !props.isHeightAuto && !props.forPrint, + collapsibleWidth: props.forPrint, + cols: [] /* TODO: make optional? */, + sections: sections, + }) + ); + } + ); + }; + TableView.prototype.renderHScrollLayout = function ( + headerRowContent, + bodyContent, + colCnt, + dayMinWidth + ) { + var ScrollGrid = this.context.pluginHooks.scrollGridImpl; + if (!ScrollGrid) { + throw new Error("No ScrollGrid implementation"); + } + var _a = this, + props = _a.props, + context = _a.context; + var stickyHeaderDates = + !props.forPrint && getStickyHeaderDates(context.options); + var stickyFooterScrollbar = + !props.forPrint && getStickyFooterScrollbar(context.options); + var sections = []; + if (headerRowContent) { + sections.push({ + type: "header", + key: "header", + isSticky: stickyHeaderDates, + chunks: [ + { + key: "main", + elRef: this.headerElRef, + tableClassName: "fc-col-header", + rowContent: headerRowContent, + }, + ], + }); + } + sections.push({ + type: "body", + key: "body", + liquid: true, + chunks: [ + { + key: "main", + content: bodyContent, + }, + ], + }); + if (stickyFooterScrollbar) { + sections.push({ + type: "footer", + key: "footer", + isSticky: true, + chunks: [ + { + key: "main", + content: renderScrollShim, + }, + ], + }); + } + return createElement( + ViewRoot, + { viewSpec: context.viewSpec }, + function (rootElRef, classNames) { + return createElement( + "div", + { + ref: rootElRef, + className: ["fc-daygrid"].concat(classNames).join(" "), + }, + createElement(ScrollGrid, { + liquid: !props.isHeightAuto && !props.forPrint, + collapsibleWidth: props.forPrint, + colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], + sections: sections, + }) + ); + } + ); + }; + return TableView; + })(DateComponent); + + function splitSegsByRow(segs, rowCnt) { + var byRow = []; + for (var i = 0; i < rowCnt; i += 1) { + byRow[i] = []; + } + for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) { + var seg = segs_1[_i]; + byRow[seg.row].push(seg); + } + return byRow; + } + function splitSegsByFirstCol(segs, colCnt) { + var byCol = []; + for (var i = 0; i < colCnt; i += 1) { + byCol[i] = []; + } + for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) { + var seg = segs_2[_i]; + byCol[seg.firstCol].push(seg); + } + return byCol; + } + function splitInteractionByRow(ui, rowCnt) { + var byRow = []; + if (!ui) { + for (var i = 0; i < rowCnt; i += 1) { + byRow[i] = null; + } + } else { + for (var i = 0; i < rowCnt; i += 1) { + byRow[i] = { + affectedInstances: ui.affectedInstances, + isEvent: ui.isEvent, + segs: [], + }; + } + for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) { + var seg = _a[_i]; + byRow[seg.row].segs.push(seg); + } + } + return byRow; + } + + var TableCellTop = /** @class */ (function (_super) { + __extends(TableCellTop, _super); + function TableCellTop() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TableCellTop.prototype.render = function () { + var props = this.props; + var navLinkAttrs = buildNavLinkAttrs(this.context, props.date); + return createElement( + DayCellContent, + { + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + showDayNumber: props.showDayNumber, + extraHookProps: props.extraHookProps, + defaultContent: renderTopInner, + }, + function (innerElRef, innerContent) { + return ( + (innerContent || props.forceDayTop) && + createElement( + "div", + { className: "fc-daygrid-day-top", ref: innerElRef }, + createElement( + "a", + __assign( + { id: props.dayNumberId, className: "fc-daygrid-day-number" }, + navLinkAttrs + ), + innerContent || createElement(Fragment, null, "\u00A0") + ) + ) + ); + } + ); + }; + return TableCellTop; + })(BaseComponent); + function renderTopInner(props) { + return props.dayNumberText; + } + + var DEFAULT_TABLE_EVENT_TIME_FORMAT = createFormatter({ + hour: "numeric", + minute: "2-digit", + omitZeroMinute: true, + meridiem: "narrow", + }); + function hasListItemDisplay(seg) { + var display = seg.eventRange.ui.display; + return ( + display === "list-item" || + (display === "auto" && + !seg.eventRange.def.allDay && + seg.firstCol === seg.lastCol && // can't be multi-day + seg.isStart && // " + seg.isEnd) // " + ); + } + + var TableBlockEvent = /** @class */ (function (_super) { + __extends(TableBlockEvent, _super); + function TableBlockEvent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TableBlockEvent.prototype.render = function () { + var props = this.props; + return createElement( + StandardEvent, + __assign({}, props, { + extraClassNames: [ + "fc-daygrid-event", + "fc-daygrid-block-event", + "fc-h-event", + ], + defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, + defaultDisplayEventEnd: props.defaultDisplayEventEnd, + disableResizing: !props.seg.eventRange.def.allDay, + }) + ); + }; + return TableBlockEvent; + })(BaseComponent); + + var TableListItemEvent = /** @class */ (function (_super) { + __extends(TableListItemEvent, _super); + function TableListItemEvent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TableListItemEvent.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var timeFormat = + context.options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT; + var timeText = buildSegTimeText( + props.seg, + timeFormat, + context, + true, + props.defaultDisplayEventEnd + ); + return createElement( + EventRoot, + { + seg: props.seg, + timeText: timeText, + defaultContent: renderInnerContent$2, + isDragging: props.isDragging, + isResizing: false, + isDateSelecting: false, + isSelected: props.isSelected, + isPast: props.isPast, + isFuture: props.isFuture, + isToday: props.isToday, + }, + function (rootElRef, classNames, innerElRef, innerContent) { + return ( + // we don't use styles! + createElement( + "a", + __assign( + { + className: ["fc-daygrid-event", "fc-daygrid-dot-event"] + .concat(classNames) + .join(" "), + ref: rootElRef, + }, + getSegAnchorAttrs(props.seg, context) + ), + innerContent + ) + ); + } + ); + }; + return TableListItemEvent; + })(BaseComponent); + function renderInnerContent$2(innerProps) { + return createElement( + Fragment, + null, + createElement("div", { + className: "fc-daygrid-event-dot", + style: { + borderColor: innerProps.borderColor || innerProps.backgroundColor, + }, + }), + innerProps.timeText && + createElement( + "div", + { className: "fc-event-time" }, + innerProps.timeText + ), + createElement( + "div", + { className: "fc-event-title" }, + innerProps.event.title || createElement(Fragment, null, "\u00A0") + ) + ); + } + + var TableCellMoreLink = /** @class */ (function (_super) { + __extends(TableCellMoreLink, _super); + function TableCellMoreLink() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.compileSegs = memoize(compileSegs); + return _this; + } + TableCellMoreLink.prototype.render = function () { + var props = this.props; + var _a = this.compileSegs(props.singlePlacements), + allSegs = _a.allSegs, + invisibleSegs = _a.invisibleSegs; + return createElement( + MoreLinkRoot, + { + dateProfile: props.dateProfile, + todayRange: props.todayRange, + allDayDate: props.allDayDate, + moreCnt: props.moreCnt, + allSegs: allSegs, + hiddenSegs: invisibleSegs, + alignmentElRef: props.alignmentElRef, + alignGridTop: props.alignGridTop, + extraDateSpan: props.extraDateSpan, + popoverContent: function () { + var isForcedInvisible = + (props.eventDrag ? props.eventDrag.affectedInstances : null) || + (props.eventResize + ? props.eventResize.affectedInstances + : null) || + {}; + return createElement( + Fragment, + null, + allSegs.map(function (seg) { + var instanceId = seg.eventRange.instance.instanceId; + return createElement( + "div", + { + className: "fc-daygrid-event-harness", + key: instanceId, + style: { + visibility: isForcedInvisible[instanceId] ? "hidden" : "", + }, + }, + hasListItemDisplay(seg) + ? createElement( + TableListItemEvent, + __assign( + { + seg: seg, + isDragging: false, + isSelected: instanceId === props.eventSelection, + defaultDisplayEventEnd: false, + }, + getSegMeta(seg, props.todayRange) + ) + ) + : createElement( + TableBlockEvent, + __assign( + { + seg: seg, + isDragging: false, + isResizing: false, + isDateSelecting: false, + isSelected: instanceId === props.eventSelection, + defaultDisplayEventEnd: false, + }, + getSegMeta(seg, props.todayRange) + ) + ) + ); + }) + ); + }, + }, + function ( + rootElRef, + classNames, + innerElRef, + innerContent, + handleClick, + title, + isExpanded, + popoverId + ) { + return createElement( + "a", + __assign( + { + ref: rootElRef, + className: ["fc-daygrid-more-link"] + .concat(classNames) + .join(" "), + title: title, + "aria-expanded": isExpanded, + "aria-controls": popoverId, + }, + createAriaClickAttrs(handleClick) + ), + innerContent + ); + } + ); + }; + return TableCellMoreLink; + })(BaseComponent); + function compileSegs(singlePlacements) { + var allSegs = []; + var invisibleSegs = []; + for ( + var _i = 0, singlePlacements_1 = singlePlacements; + _i < singlePlacements_1.length; + _i++ + ) { + var placement = singlePlacements_1[_i]; + allSegs.push(placement.seg); + if (!placement.isVisible) { + invisibleSegs.push(placement.seg); + } + } + return { allSegs: allSegs, invisibleSegs: invisibleSegs }; + } + + var DEFAULT_WEEK_NUM_FORMAT$1 = createFormatter({ week: "narrow" }); + var TableCell = /** @class */ (function (_super) { + __extends(TableCell, _super); + function TableCell() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.rootElRef = createRef(); + _this.state = { + dayNumberId: getUniqueDomId(), + }; + _this.handleRootEl = function (el) { + setRef(_this.rootElRef, el); + setRef(_this.props.elRef, el); + }; + return _this; + } + TableCell.prototype.render = function () { + var _a = this, + context = _a.context, + props = _a.props, + state = _a.state, + rootElRef = _a.rootElRef; + var date = props.date, + dateProfile = props.dateProfile; + var navLinkAttrs = buildNavLinkAttrs(context, date, "week"); + return createElement( + DayCellRoot, + { + date: date, + dateProfile: dateProfile, + todayRange: props.todayRange, + showDayNumber: props.showDayNumber, + extraHookProps: props.extraHookProps, + elRef: this.handleRootEl, + }, + function (dayElRef, dayClassNames, rootDataAttrs, isDisabled) { + return createElement( + "td", + __assign( + { + ref: dayElRef, + role: "gridcell", + className: ["fc-daygrid-day"] + .concat(dayClassNames, props.extraClassNames || []) + .join(" "), + }, + rootDataAttrs, + props.extraDataAttrs, + props.showDayNumber + ? { "aria-labelledby": state.dayNumberId } + : {} + ), + createElement( + "div", + { + className: "fc-daygrid-day-frame fc-scrollgrid-sync-inner", + ref: props.innerElRef /* different from hook system! RENAME */, + }, + props.showWeekNumber && + createElement( + WeekNumberRoot, + { date: date, defaultFormat: DEFAULT_WEEK_NUM_FORMAT$1 }, + function ( + weekElRef, + weekClassNames, + innerElRef, + innerContent + ) { + return createElement( + "a", + __assign( + { + ref: weekElRef, + className: ["fc-daygrid-week-number"] + .concat(weekClassNames) + .join(" "), + }, + navLinkAttrs + ), + innerContent + ); + } + ), + !isDisabled && + createElement(TableCellTop, { + date: date, + dateProfile: dateProfile, + showDayNumber: props.showDayNumber, + dayNumberId: state.dayNumberId, + forceDayTop: props.forceDayTop, + todayRange: props.todayRange, + extraHookProps: props.extraHookProps, + }), + createElement( + "div", + { + className: "fc-daygrid-day-events", + ref: props.fgContentElRef, + }, + props.fgContent, + createElement( + "div", + { + className: "fc-daygrid-day-bottom", + style: { marginTop: props.moreMarginTop }, + }, + createElement(TableCellMoreLink, { + allDayDate: date, + singlePlacements: props.singlePlacements, + moreCnt: props.moreCnt, + alignmentElRef: rootElRef, + alignGridTop: !props.showDayNumber, + extraDateSpan: props.extraDateSpan, + dateProfile: props.dateProfile, + eventSelection: props.eventSelection, + eventDrag: props.eventDrag, + eventResize: props.eventResize, + todayRange: props.todayRange, + }) + ) + ), + createElement( + "div", + { className: "fc-daygrid-day-bg" }, + props.bgContent + ) + ) + ); + } + ); + }; + return TableCell; + })(DateComponent); + + function computeFgSegPlacement( + segs, // assumed already sorted + dayMaxEvents, + dayMaxEventRows, + strictOrder, + eventInstanceHeights, + maxContentHeight, + cells + ) { + var hierarchy = new DayGridSegHierarchy(); + hierarchy.allowReslicing = true; + hierarchy.strictOrder = strictOrder; + if (dayMaxEvents === true || dayMaxEventRows === true) { + hierarchy.maxCoord = maxContentHeight; + hierarchy.hiddenConsumes = true; + } else if (typeof dayMaxEvents === "number") { + hierarchy.maxStackCnt = dayMaxEvents; + } else if (typeof dayMaxEventRows === "number") { + hierarchy.maxStackCnt = dayMaxEventRows; + hierarchy.hiddenConsumes = true; + } + // create segInputs only for segs with known heights + var segInputs = []; + var unknownHeightSegs = []; + for (var i = 0; i < segs.length; i += 1) { + var seg = segs[i]; + var instanceId = seg.eventRange.instance.instanceId; + var eventHeight = eventInstanceHeights[instanceId]; + if (eventHeight != null) { + segInputs.push({ + index: i, + thickness: eventHeight, + span: { + start: seg.firstCol, + end: seg.lastCol + 1, + }, + }); + } else { + unknownHeightSegs.push(seg); + } + } + var hiddenEntries = hierarchy.addSegs(segInputs); + var segRects = hierarchy.toRects(); + var _a = placeRects(segRects, segs, cells), + singleColPlacements = _a.singleColPlacements, + multiColPlacements = _a.multiColPlacements, + leftoverMargins = _a.leftoverMargins; + var moreCnts = []; + var moreMarginTops = []; + // add segs with unknown heights + for ( + var _i = 0, unknownHeightSegs_1 = unknownHeightSegs; + _i < unknownHeightSegs_1.length; + _i++ + ) { + var seg = unknownHeightSegs_1[_i]; + multiColPlacements[seg.firstCol].push({ + seg: seg, + isVisible: false, + isAbsolute: true, + absoluteTop: 0, + marginTop: 0, + }); + for (var col = seg.firstCol; col <= seg.lastCol; col += 1) { + singleColPlacements[col].push({ + seg: resliceSeg(seg, col, col + 1, cells), + isVisible: false, + isAbsolute: false, + absoluteTop: 0, + marginTop: 0, + }); + } + } + // add the hidden entries + for (var col = 0; col < cells.length; col += 1) { + moreCnts.push(0); + } + for ( + var _b = 0, hiddenEntries_1 = hiddenEntries; + _b < hiddenEntries_1.length; + _b++ + ) { + var hiddenEntry = hiddenEntries_1[_b]; + var seg = segs[hiddenEntry.index]; + var hiddenSpan = hiddenEntry.span; + multiColPlacements[hiddenSpan.start].push({ + seg: resliceSeg(seg, hiddenSpan.start, hiddenSpan.end, cells), + isVisible: false, + isAbsolute: true, + absoluteTop: 0, + marginTop: 0, + }); + for (var col = hiddenSpan.start; col < hiddenSpan.end; col += 1) { + moreCnts[col] += 1; + singleColPlacements[col].push({ + seg: resliceSeg(seg, col, col + 1, cells), + isVisible: false, + isAbsolute: false, + absoluteTop: 0, + marginTop: 0, + }); + } + } + // deal with leftover margins + for (var col = 0; col < cells.length; col += 1) { + moreMarginTops.push(leftoverMargins[col]); + } + return { + singleColPlacements: singleColPlacements, + multiColPlacements: multiColPlacements, + moreCnts: moreCnts, + moreMarginTops: moreMarginTops, + }; + } + // rects ordered by top coord, then left + function placeRects(allRects, segs, cells) { + var rectsByEachCol = groupRectsByEachCol(allRects, cells.length); + var singleColPlacements = []; + var multiColPlacements = []; + var leftoverMargins = []; + for (var col = 0; col < cells.length; col += 1) { + var rects = rectsByEachCol[col]; + // compute all static segs in singlePlacements + var singlePlacements = []; + var currentHeight = 0; + var currentMarginTop = 0; + for (var _i = 0, rects_1 = rects; _i < rects_1.length; _i++) { + var rect = rects_1[_i]; + var seg = segs[rect.index]; + singlePlacements.push({ + seg: resliceSeg(seg, col, col + 1, cells), + isVisible: true, + isAbsolute: false, + absoluteTop: rect.levelCoord, + marginTop: rect.levelCoord - currentHeight, + }); + currentHeight = rect.levelCoord + rect.thickness; + } + // compute mixed static/absolute segs in multiPlacements + var multiPlacements = []; + currentHeight = 0; + currentMarginTop = 0; + for (var _a = 0, rects_2 = rects; _a < rects_2.length; _a++) { + var rect = rects_2[_a]; + var seg = segs[rect.index]; + var isAbsolute = rect.span.end - rect.span.start > 1; // multi-column? + var isFirstCol = rect.span.start === col; + currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg + currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg + if (isAbsolute) { + currentMarginTop += rect.thickness; + if (isFirstCol) { + multiPlacements.push({ + seg: resliceSeg(seg, rect.span.start, rect.span.end, cells), + isVisible: true, + isAbsolute: true, + absoluteTop: rect.levelCoord, + marginTop: 0, + }); + } + } else if (isFirstCol) { + multiPlacements.push({ + seg: resliceSeg(seg, rect.span.start, rect.span.end, cells), + isVisible: true, + isAbsolute: false, + absoluteTop: rect.levelCoord, + marginTop: currentMarginTop, // claim the margin + }); + currentMarginTop = 0; + } + } + singleColPlacements.push(singlePlacements); + multiColPlacements.push(multiPlacements); + leftoverMargins.push(currentMarginTop); + } + return { + singleColPlacements: singleColPlacements, + multiColPlacements: multiColPlacements, + leftoverMargins: leftoverMargins, + }; + } + function groupRectsByEachCol(rects, colCnt) { + var rectsByEachCol = []; + for (var col = 0; col < colCnt; col += 1) { + rectsByEachCol.push([]); + } + for (var _i = 0, rects_3 = rects; _i < rects_3.length; _i++) { + var rect = rects_3[_i]; + for (var col = rect.span.start; col < rect.span.end; col += 1) { + rectsByEachCol[col].push(rect); + } + } + return rectsByEachCol; + } + function resliceSeg(seg, spanStart, spanEnd, cells) { + if (seg.firstCol === spanStart && seg.lastCol === spanEnd - 1) { + return seg; + } + var eventRange = seg.eventRange; + var origRange = eventRange.range; + var slicedRange = intersectRanges(origRange, { + start: cells[spanStart].date, + end: addDays(cells[spanEnd - 1].date, 1), + }); + return __assign(__assign({}, seg), { + firstCol: spanStart, + lastCol: spanEnd - 1, + eventRange: { + def: eventRange.def, + ui: __assign(__assign({}, eventRange.ui), { durationEditable: false }), + instance: eventRange.instance, + range: slicedRange, + }, + isStart: + seg.isStart && + slicedRange.start.valueOf() === origRange.start.valueOf(), + isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf(), + }); + } + var DayGridSegHierarchy = /** @class */ (function (_super) { + __extends(DayGridSegHierarchy, _super); + function DayGridSegHierarchy() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + // config + _this.hiddenConsumes = false; + // allows us to keep hidden entries in the hierarchy so they take up space + _this.forceHidden = {}; + return _this; + } + DayGridSegHierarchy.prototype.addSegs = function (segInputs) { + var _this = this; + var hiddenSegs = _super.prototype.addSegs.call(this, segInputs); + var entriesByLevel = this.entriesByLevel; + var excludeHidden = function (entry) { + return !_this.forceHidden[buildEntryKey(entry)]; + }; + // remove the forced-hidden segs + for (var level = 0; level < entriesByLevel.length; level += 1) { + entriesByLevel[level] = entriesByLevel[level].filter(excludeHidden); + } + return hiddenSegs; + }; + DayGridSegHierarchy.prototype.handleInvalidInsertion = function ( + insertion, + entry, + hiddenEntries + ) { + var _a = this, + entriesByLevel = _a.entriesByLevel, + forceHidden = _a.forceHidden; + var touchingEntry = insertion.touchingEntry, + touchingLevel = insertion.touchingLevel, + touchingLateral = insertion.touchingLateral; + if (this.hiddenConsumes && touchingEntry) { + var touchingEntryId = buildEntryKey(touchingEntry); + // if not already hidden + if (!forceHidden[touchingEntryId]) { + if (this.allowReslicing) { + var placeholderEntry = __assign(__assign({}, touchingEntry), { + span: intersectSpans(touchingEntry.span, entry.span), + }); + var placeholderEntryId = buildEntryKey(placeholderEntry); + forceHidden[placeholderEntryId] = true; + entriesByLevel[touchingLevel][touchingLateral] = placeholderEntry; // replace touchingEntry with our placeholder + this.splitEntry(touchingEntry, entry, hiddenEntries); // split up the touchingEntry, reinsert it + } else { + forceHidden[touchingEntryId] = true; + hiddenEntries.push(touchingEntry); + } + } + } + return _super.prototype.handleInvalidInsertion.call( + this, + insertion, + entry, + hiddenEntries + ); + }; + return DayGridSegHierarchy; + })(SegHierarchy); + + var TableRow = /** @class */ (function (_super) { + __extends(TableRow, _super); + function TableRow() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.cellElRefs = new RefMap(); // the ? + outerContent: createElement( + "tr", + { role: "presentation", className: "fc-scrollgrid-section" }, + createElement("td", { + className: + "fc-timegrid-divider " + + context.theme.getClass("tableCellShaded"), + }) + ), + }); + } + sections.push({ + type: "body", + key: "body", + liquid: true, + expandRows: Boolean(context.options.expandRows), + chunk: { + scrollerElRef: this.scrollerElRef, + content: timeContent, + }, + }); + return createElement( + ViewRoot, + { viewSpec: context.viewSpec, elRef: this.rootElRef }, + function (rootElRef, classNames) { + return createElement( + "div", + { + className: ["fc-timegrid"].concat(classNames).join(" "), + ref: rootElRef, + }, + createElement(SimpleScrollGrid, { + liquid: !props.isHeightAuto && !props.forPrint, + collapsibleWidth: props.forPrint, + cols: [{ width: "shrink" }], + sections: sections, + }) + ); + } + ); + }; + TimeColsView.prototype.renderHScrollLayout = function ( + headerRowContent, + allDayContent, + timeContent, + colCnt, + dayMinWidth, + slatMetas, + slatCoords + ) { + var _this = this; + var ScrollGrid = this.context.pluginHooks.scrollGridImpl; + if (!ScrollGrid) { + throw new Error("No ScrollGrid implementation"); + } + var _a = this, + context = _a.context, + props = _a.props; + var stickyHeaderDates = + !props.forPrint && getStickyHeaderDates(context.options); + var stickyFooterScrollbar = + !props.forPrint && getStickyFooterScrollbar(context.options); + var sections = []; + if (headerRowContent) { + sections.push({ + type: "header", + key: "header", + isSticky: stickyHeaderDates, + syncRowHeights: true, + chunks: [ + { + key: "axis", + rowContent: function (arg) { + return createElement( + "tr", + { role: "presentation" }, + _this.renderHeadAxis("day", arg.rowSyncHeights[0]) + ); + }, + }, + { + key: "cols", + elRef: this.headerElRef, + tableClassName: "fc-col-header", + rowContent: headerRowContent, + }, + ], + }); + } + if (allDayContent) { + sections.push({ + type: "body", + key: "all-day", + syncRowHeights: true, + chunks: [ + { + key: "axis", + rowContent: function (contentArg) { + return createElement( + "tr", + { role: "presentation" }, + _this.renderTableRowAxis(contentArg.rowSyncHeights[0]) + ); + }, + }, + { + key: "cols", + content: allDayContent, + }, + ], + }); + sections.push({ + key: "all-day-divider", + type: "body", + // TODO: rename to cellContent so don't need to define ? + outerContent: createElement( + "tr", + { role: "presentation", className: "fc-scrollgrid-section" }, + createElement("td", { + colSpan: 2, + className: + "fc-timegrid-divider " + + context.theme.getClass("tableCellShaded"), + }) + ), + }); + } + var isNowIndicator = context.options.nowIndicator; + sections.push({ + type: "body", + key: "body", + liquid: true, + expandRows: Boolean(context.options.expandRows), + chunks: [ + { + key: "axis", + content: function (arg) { + return ( + // TODO: make this now-indicator arrow more DRY with TimeColsContent + createElement( + "div", + { className: "fc-timegrid-axis-chunk" }, + createElement( + "table", + { + "aria-hidden": true, + style: { height: arg.expandRows ? arg.clientHeight : "" }, + }, + arg.tableColGroupNode, + createElement( + "tbody", + null, + createElement(TimeBodyAxis, { slatMetas: slatMetas }) + ) + ), + createElement( + "div", + { className: "fc-timegrid-now-indicator-container" }, + createElement( + NowTimer, + { unit: isNowIndicator ? "minute" : "day" /* hacky */ }, + function (nowDate) { + var nowIndicatorTop = + isNowIndicator && + slatCoords && + slatCoords.safeComputeTop(nowDate); // might return void + if (typeof nowIndicatorTop === "number") { + return createElement( + NowIndicatorRoot, + { isAxis: true, date: nowDate }, + function ( + rootElRef, + classNames, + innerElRef, + innerContent + ) { + return createElement( + "div", + { + ref: rootElRef, + className: ["fc-timegrid-now-indicator-arrow"] + .concat(classNames) + .join(" "), + style: { top: nowIndicatorTop }, + }, + innerContent + ); + } + ); + } + return null; + } + ) + ) + ) + ); + }, + }, + { + key: "cols", + scrollerElRef: this.scrollerElRef, + content: timeContent, + }, + ], + }); + if (stickyFooterScrollbar) { + sections.push({ + key: "footer", + type: "footer", + isSticky: true, + chunks: [ + { + key: "axis", + content: renderScrollShim, + }, + { + key: "cols", + content: renderScrollShim, + }, + ], + }); + } + return createElement( + ViewRoot, + { viewSpec: context.viewSpec, elRef: this.rootElRef }, + function (rootElRef, classNames) { + return createElement( + "div", + { + className: ["fc-timegrid"].concat(classNames).join(" "), + ref: rootElRef, + }, + createElement(ScrollGrid, { + liquid: !props.isHeightAuto && !props.forPrint, + collapsibleWidth: false, + colGroups: [ + { width: "shrink", cols: [{ width: "shrink" }] }, + { cols: [{ span: colCnt, minWidth: dayMinWidth }] }, + ], + sections: sections, + }) + ); + } + ); + }; + /* Dimensions + ------------------------------------------------------------------------------------------------------------------*/ + TimeColsView.prototype.getAllDayMaxEventProps = function () { + var _a = this.context.options, + dayMaxEvents = _a.dayMaxEvents, + dayMaxEventRows = _a.dayMaxEventRows; + if (dayMaxEvents === true || dayMaxEventRows === true) { + // is auto? + dayMaxEvents = undefined; + dayMaxEventRows = AUTO_ALL_DAY_MAX_EVENT_ROWS; // make sure "auto" goes to a real number + } + return { dayMaxEvents: dayMaxEvents, dayMaxEventRows: dayMaxEventRows }; + }; + return TimeColsView; + })(DateComponent); + function renderAllDayInner$1(hookProps) { + return hookProps.text; + } + + var TimeColsSlatsCoords = /** @class */ (function () { + function TimeColsSlatsCoords(positions, dateProfile, slotDuration) { + this.positions = positions; + this.dateProfile = dateProfile; + this.slotDuration = slotDuration; + } + TimeColsSlatsCoords.prototype.safeComputeTop = function (date) { + var dateProfile = this.dateProfile; + if (rangeContainsMarker(dateProfile.currentRange, date)) { + var startOfDayDate = startOfDay(date); + var timeMs = date.valueOf() - startOfDayDate.valueOf(); + if ( + timeMs >= asRoughMs(dateProfile.slotMinTime) && + timeMs < asRoughMs(dateProfile.slotMaxTime) + ) { + return this.computeTimeTop(createDuration(timeMs)); + } + } + return null; + }; + // Computes the top coordinate, relative to the bounds of the grid, of the given date. + // A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight. + TimeColsSlatsCoords.prototype.computeDateTop = function ( + when, + startOfDayDate + ) { + if (!startOfDayDate) { + startOfDayDate = startOfDay(when); + } + return this.computeTimeTop( + createDuration(when.valueOf() - startOfDayDate.valueOf()) + ); + }; + // Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration). + // This is a makeshify way to compute the time-top. Assumes all slatMetas dates are uniform. + // Eventually allow computation with arbirary slat dates. + TimeColsSlatsCoords.prototype.computeTimeTop = function (duration) { + var _a = this, + positions = _a.positions, + dateProfile = _a.dateProfile; + var len = positions.els.length; + // floating-point value of # of slots covered + var slatCoverage = + (duration.milliseconds - asRoughMs(dateProfile.slotMinTime)) / + asRoughMs(this.slotDuration); + var slatIndex; + var slatRemainder; + // compute a floating-point number for how many slats should be progressed through. + // from 0 to number of slats (inclusive) + // constrained because slotMinTime/slotMaxTime might be customized. + slatCoverage = Math.max(0, slatCoverage); + slatCoverage = Math.min(len, slatCoverage); + // an integer index of the furthest whole slat + // from 0 to number slats (*exclusive*, so len-1) + slatIndex = Math.floor(slatCoverage); + slatIndex = Math.min(slatIndex, len - 1); + // how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition. + // could be 1.0 if slatCoverage is covering *all* the slots + slatRemainder = slatCoverage - slatIndex; + return ( + positions.tops[slatIndex] + + positions.getHeight(slatIndex) * slatRemainder + ); + }; + return TimeColsSlatsCoords; + })(); + + var TimeColsSlatsBody = /** @class */ (function (_super) { + __extends(TimeColsSlatsBody, _super); + function TimeColsSlatsBody() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TimeColsSlatsBody.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var options = context.options; + var slatElRefs = props.slatElRefs; + return createElement( + "tbody", + null, + props.slatMetas.map(function (slatMeta, i) { + var hookProps = { + time: slatMeta.time, + date: context.dateEnv.toDate(slatMeta.date), + view: context.viewApi, + }; + var classNames = [ + "fc-timegrid-slot", + "fc-timegrid-slot-lane", + slatMeta.isLabeled ? "" : "fc-timegrid-slot-minor", + ]; + return createElement( + "tr", + { key: slatMeta.key, ref: slatElRefs.createRef(slatMeta.key) }, + props.axis && + createElement(TimeColsAxisCell, __assign({}, slatMeta)), + createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.slotLaneClassNames, + content: options.slotLaneContent, + didMount: options.slotLaneDidMount, + willUnmount: options.slotLaneWillUnmount, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return createElement( + "td", + { + ref: rootElRef, + className: classNames.concat(customClassNames).join(" "), + "data-time": slatMeta.isoTimeStr, + }, + innerContent + ); + } + ) + ); + }) + ); + }; + return TimeColsSlatsBody; + })(BaseComponent); + + /* + for the horizontal "slats" that run width-wise. Has a time axis on a side. Depends on RTL. + */ + var TimeColsSlats = /** @class */ (function (_super) { + __extends(TimeColsSlats, _super); + function TimeColsSlats() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.rootElRef = createRef(); + _this.slatElRefs = new RefMap(); + return _this; + } + TimeColsSlats.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + return createElement( + "div", + { ref: this.rootElRef, className: "fc-timegrid-slots" }, + createElement( + "table", + { + "aria-hidden": true, + className: context.theme.getClass("table"), + style: { + minWidth: props.tableMinWidth, + width: props.clientWidth, + height: props.minHeight, + }, + }, + props.tableColGroupNode /* relies on there only being a single for the axis */, + createElement(TimeColsSlatsBody, { + slatElRefs: this.slatElRefs, + axis: props.axis, + slatMetas: props.slatMetas, + }) + ) + ); + }; + TimeColsSlats.prototype.componentDidMount = function () { + this.updateSizing(); + }; + TimeColsSlats.prototype.componentDidUpdate = function () { + this.updateSizing(); + }; + TimeColsSlats.prototype.componentWillUnmount = function () { + if (this.props.onCoords) { + this.props.onCoords(null); + } + }; + TimeColsSlats.prototype.updateSizing = function () { + var _a = this, + context = _a.context, + props = _a.props; + if ( + props.onCoords && + props.clientWidth !== null // means sizing has stabilized + ) { + var rootEl = this.rootElRef.current; + if (rootEl.offsetHeight) { + // not hidden by css + props.onCoords( + new TimeColsSlatsCoords( + new PositionCache( + this.rootElRef.current, + collectSlatEls(this.slatElRefs.currentMap, props.slatMetas), + false, + true + ), + this.props.dateProfile, + context.options.slotDuration + ) + ); + } + } + }; + return TimeColsSlats; + })(BaseComponent); + function collectSlatEls(elMap, slatMetas) { + return slatMetas.map(function (slatMeta) { + return elMap[slatMeta.key]; + }); + } + + function splitSegsByCol(segs, colCnt) { + var segsByCol = []; + var i; + for (i = 0; i < colCnt; i += 1) { + segsByCol.push([]); + } + if (segs) { + for (i = 0; i < segs.length; i += 1) { + segsByCol[segs[i].col].push(segs[i]); + } + } + return segsByCol; + } + function splitInteractionByCol(ui, colCnt) { + var byRow = []; + if (!ui) { + for (var i = 0; i < colCnt; i += 1) { + byRow[i] = null; + } + } else { + for (var i = 0; i < colCnt; i += 1) { + byRow[i] = { + affectedInstances: ui.affectedInstances, + isEvent: ui.isEvent, + segs: [], + }; + } + for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) { + var seg = _a[_i]; + byRow[seg.col].segs.push(seg); + } + } + return byRow; + } + + var TimeColMoreLink = /** @class */ (function (_super) { + __extends(TimeColMoreLink, _super); + function TimeColMoreLink() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.rootElRef = createRef(); + return _this; + } + TimeColMoreLink.prototype.render = function () { + var _this = this; + var props = this.props; + return createElement( + MoreLinkRoot, + { + allDayDate: null, + moreCnt: props.hiddenSegs.length, + allSegs: props.hiddenSegs, + hiddenSegs: props.hiddenSegs, + alignmentElRef: this.rootElRef, + defaultContent: renderMoreLinkInner, + extraDateSpan: props.extraDateSpan, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + popoverContent: function () { + return renderPlainFgSegs(props.hiddenSegs, props); + }, + }, + function ( + rootElRef, + classNames, + innerElRef, + innerContent, + handleClick, + title, + isExpanded, + popoverId + ) { + return createElement( + "a", + { + ref: function (el) { + setRef(rootElRef, el); + setRef(_this.rootElRef, el); + }, + className: ["fc-timegrid-more-link"].concat(classNames).join(" "), + style: { top: props.top, bottom: props.bottom }, + onClick: handleClick, + title: title, + "aria-expanded": isExpanded, + "aria-controls": popoverId, + }, + createElement( + "div", + { + ref: innerElRef, + className: "fc-timegrid-more-link-inner fc-sticky", + }, + innerContent + ) + ); + } + ); + }; + return TimeColMoreLink; + })(BaseComponent); + function renderMoreLinkInner(props) { + return props.shortText; + } + + // segInputs assumed sorted + function buildPositioning(segInputs, strictOrder, maxStackCnt) { + var hierarchy = new SegHierarchy(); + if (strictOrder != null) { + hierarchy.strictOrder = strictOrder; + } + if (maxStackCnt != null) { + hierarchy.maxStackCnt = maxStackCnt; + } + var hiddenEntries = hierarchy.addSegs(segInputs); + var hiddenGroups = groupIntersectingEntries(hiddenEntries); + var web = buildWeb(hierarchy); + web = stretchWeb(web, 1); // all levelCoords/thickness will have 0.0-1.0 + var segRects = webToRects(web); + return { segRects: segRects, hiddenGroups: hiddenGroups }; + } + function buildWeb(hierarchy) { + var entriesByLevel = hierarchy.entriesByLevel; + var buildNode = cacheable( + function (level, lateral) { + return level + ":" + lateral; + }, + function (level, lateral) { + var siblingRange = findNextLevelSegs(hierarchy, level, lateral); + var nextLevelRes = buildNodes(siblingRange, buildNode); + var entry = entriesByLevel[level][lateral]; + return [ + __assign(__assign({}, entry), { nextLevelNodes: nextLevelRes[0] }), + entry.thickness + nextLevelRes[1], // the pressure builds + ]; + } + ); + return buildNodes( + entriesByLevel.length + ? { level: 0, lateralStart: 0, lateralEnd: entriesByLevel[0].length } + : null, + buildNode + )[0]; + } + function buildNodes(siblingRange, buildNode) { + if (!siblingRange) { + return [[], 0]; + } + var level = siblingRange.level, + lateralStart = siblingRange.lateralStart, + lateralEnd = siblingRange.lateralEnd; + var lateral = lateralStart; + var pairs = []; + while (lateral < lateralEnd) { + pairs.push(buildNode(level, lateral)); + lateral += 1; + } + pairs.sort(cmpDescPressures); + return [ + pairs.map(extractNode), + pairs[0][1], // first item's pressure + ]; + } + function cmpDescPressures(a, b) { + return b[1] - a[1]; + } + function extractNode(a) { + return a[0]; + } + function findNextLevelSegs(hierarchy, subjectLevel, subjectLateral) { + var levelCoords = hierarchy.levelCoords, + entriesByLevel = hierarchy.entriesByLevel; + var subjectEntry = entriesByLevel[subjectLevel][subjectLateral]; + var afterSubject = levelCoords[subjectLevel] + subjectEntry.thickness; + var levelCnt = levelCoords.length; + var level = subjectLevel; + // skip past levels that are too high up + for (; level < levelCnt && levelCoords[level] < afterSubject; level += 1); // do nothing + for (; level < levelCnt; level += 1) { + var entries = entriesByLevel[level]; + var entry = void 0; + var searchIndex = binarySearch( + entries, + subjectEntry.span.start, + getEntrySpanEnd + ); + var lateralStart = searchIndex[0] + searchIndex[1]; // if exact match (which doesn't collide), go to next one + var lateralEnd = lateralStart; + while ( + // loop through entries that horizontally intersect + (entry = entries[lateralEnd]) && // but not past the whole seg list + entry.span.start < subjectEntry.span.end + ) { + lateralEnd += 1; + } + if (lateralStart < lateralEnd) { + return { + level: level, + lateralStart: lateralStart, + lateralEnd: lateralEnd, + }; + } + } + return null; + } + function stretchWeb(topLevelNodes, totalThickness) { + var stretchNode = cacheable( + function (node, startCoord, prevThickness) { + return buildEntryKey(node); + }, + function (node, startCoord, prevThickness) { + var nextLevelNodes = node.nextLevelNodes, + thickness = node.thickness; + var allThickness = thickness + prevThickness; + var thicknessFraction = thickness / allThickness; + var endCoord; + var newChildren = []; + if (!nextLevelNodes.length) { + endCoord = totalThickness; + } else { + for ( + var _i = 0, nextLevelNodes_1 = nextLevelNodes; + _i < nextLevelNodes_1.length; + _i++ + ) { + var childNode = nextLevelNodes_1[_i]; + if (endCoord === undefined) { + var res = stretchNode(childNode, startCoord, allThickness); + endCoord = res[0]; + newChildren.push(res[1]); + } else { + var res = stretchNode(childNode, endCoord, 0); + newChildren.push(res[1]); + } + } + } + var newThickness = (endCoord - startCoord) * thicknessFraction; + return [ + endCoord - newThickness, + __assign(__assign({}, node), { + thickness: newThickness, + nextLevelNodes: newChildren, + }), + ]; + } + ); + return topLevelNodes.map(function (node) { + return stretchNode(node, 0, 0)[1]; + }); + } + // not sorted in any particular order + function webToRects(topLevelNodes) { + var rects = []; + var processNode = cacheable( + function (node, levelCoord, stackDepth) { + return buildEntryKey(node); + }, + function (node, levelCoord, stackDepth) { + var rect = __assign(__assign({}, node), { + levelCoord: levelCoord, + stackDepth: stackDepth, + stackForward: 0, + }); + rects.push(rect); + return (rect.stackForward = + processNodes( + node.nextLevelNodes, + levelCoord + node.thickness, + stackDepth + 1 + ) + 1); + } + ); + function processNodes(nodes, levelCoord, stackDepth) { + var stackForward = 0; + for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { + var node = nodes_1[_i]; + stackForward = Math.max( + processNode(node, levelCoord, stackDepth), + stackForward + ); + } + return stackForward; + } + processNodes(topLevelNodes, 0, 0); + return rects; // TODO: sort rects by levelCoord to be consistent with toRects? + } + // TODO: move to general util + function cacheable(keyFunc, workFunc) { + var cache = {}; + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var key = keyFunc.apply(void 0, args); + return key in cache + ? cache[key] + : (cache[key] = workFunc.apply(void 0, args)); + }; + } + + function computeSegVCoords(segs, colDate, slatCoords, eventMinHeight) { + if (slatCoords === void 0) { + slatCoords = null; + } + if (eventMinHeight === void 0) { + eventMinHeight = 0; + } + var vcoords = []; + if (slatCoords) { + for (var i = 0; i < segs.length; i += 1) { + var seg = segs[i]; + var spanStart = slatCoords.computeDateTop(seg.start, colDate); + var spanEnd = Math.max( + spanStart + (eventMinHeight || 0), // :( + slatCoords.computeDateTop(seg.end, colDate) + ); + vcoords.push({ + start: Math.round(spanStart), + end: Math.round(spanEnd), // + }); + } + } + return vcoords; + } + function computeFgSegPlacements( + segs, + segVCoords, // might not have for every seg + eventOrderStrict, + eventMaxStack + ) { + var segInputs = []; + var dumbSegs = []; // segs without coords + for (var i = 0; i < segs.length; i += 1) { + var vcoords = segVCoords[i]; + if (vcoords) { + segInputs.push({ + index: i, + thickness: 1, + span: vcoords, + }); + } else { + dumbSegs.push(segs[i]); + } + } + var _a = buildPositioning(segInputs, eventOrderStrict, eventMaxStack), + segRects = _a.segRects, + hiddenGroups = _a.hiddenGroups; + var segPlacements = []; + for (var _i = 0, segRects_1 = segRects; _i < segRects_1.length; _i++) { + var segRect = segRects_1[_i]; + segPlacements.push({ + seg: segs[segRect.index], + rect: segRect, + }); + } + for (var _b = 0, dumbSegs_1 = dumbSegs; _b < dumbSegs_1.length; _b++) { + var dumbSeg = dumbSegs_1[_b]; + segPlacements.push({ seg: dumbSeg, rect: null }); + } + return { segPlacements: segPlacements, hiddenGroups: hiddenGroups }; + } + + var DEFAULT_TIME_FORMAT$1 = createFormatter({ + hour: "numeric", + minute: "2-digit", + meridiem: false, + }); + var TimeColEvent = /** @class */ (function (_super) { + __extends(TimeColEvent, _super); + function TimeColEvent() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TimeColEvent.prototype.render = function () { + var classNames = ["fc-timegrid-event", "fc-v-event"]; + if (this.props.isShort) { + classNames.push("fc-timegrid-event-short"); + } + return createElement( + StandardEvent, + __assign({}, this.props, { + defaultTimeFormat: DEFAULT_TIME_FORMAT$1, + extraClassNames: classNames, + }) + ); + }; + return TimeColEvent; + })(BaseComponent); + + var TimeColMisc = /** @class */ (function (_super) { + __extends(TimeColMisc, _super); + function TimeColMisc() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TimeColMisc.prototype.render = function () { + var props = this.props; + return createElement( + DayCellContent, + { + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + extraHookProps: props.extraHookProps, + }, + function (innerElRef, innerContent) { + return ( + innerContent && + createElement( + "div", + { className: "fc-timegrid-col-misc", ref: innerElRef }, + innerContent + ) + ); + } + ); + }; + return TimeColMisc; + })(BaseComponent); + + var TimeCol = /** @class */ (function (_super) { + __extends(TimeCol, _super); + function TimeCol() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.sortEventSegs = memoize(sortEventSegs); + return _this; + } + // TODO: memoize event-placement? + TimeCol.prototype.render = function () { + var _this = this; + var _a = this, + props = _a.props, + context = _a.context; + var isSelectMirror = context.options.selectMirror; + var mirrorSegs = + (props.eventDrag && props.eventDrag.segs) || + (props.eventResize && props.eventResize.segs) || + (isSelectMirror && props.dateSelectionSegs) || + []; + var interactionAffectedInstances = // TODO: messy way to compute this + (props.eventDrag && props.eventDrag.affectedInstances) || + (props.eventResize && props.eventResize.affectedInstances) || + {}; + var sortedFgSegs = this.sortEventSegs( + props.fgEventSegs, + context.options.eventOrder + ); + return createElement( + DayCellRoot, + { + elRef: props.elRef, + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + extraHookProps: props.extraHookProps, + }, + function (rootElRef, classNames, dataAttrs) { + return createElement( + "td", + __assign( + { + ref: rootElRef, + role: "gridcell", + className: ["fc-timegrid-col"] + .concat(classNames, props.extraClassNames || []) + .join(" "), + }, + dataAttrs, + props.extraDataAttrs + ), + createElement( + "div", + { className: "fc-timegrid-col-frame" }, + createElement( + "div", + { className: "fc-timegrid-col-bg" }, + _this.renderFillSegs(props.businessHourSegs, "non-business"), + _this.renderFillSegs(props.bgEventSegs, "bg-event"), + _this.renderFillSegs(props.dateSelectionSegs, "highlight") + ), + createElement( + "div", + { className: "fc-timegrid-col-events" }, + _this.renderFgSegs( + sortedFgSegs, + interactionAffectedInstances, + false, + false, + false + ) + ), + createElement( + "div", + { className: "fc-timegrid-col-events" }, + _this.renderFgSegs( + mirrorSegs, + {}, + Boolean(props.eventDrag), + Boolean(props.eventResize), + Boolean(isSelectMirror) + ) + ), + createElement( + "div", + { className: "fc-timegrid-now-indicator-container" }, + _this.renderNowIndicator(props.nowIndicatorSegs) + ), + createElement(TimeColMisc, { + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + extraHookProps: props.extraHookProps, + }) + ) + ); + } + ); + }; + TimeCol.prototype.renderFgSegs = function ( + sortedFgSegs, + segIsInvisible, + isDragging, + isResizing, + isDateSelecting + ) { + var props = this.props; + if (props.forPrint) { + return renderPlainFgSegs(sortedFgSegs, props); + } + return this.renderPositionedFgSegs( + sortedFgSegs, + segIsInvisible, + isDragging, + isResizing, + isDateSelecting + ); + }; + TimeCol.prototype.renderPositionedFgSegs = function ( + segs, // if not mirror, needs to be sorted + segIsInvisible, + isDragging, + isResizing, + isDateSelecting + ) { + var _this = this; + var _a = this.context.options, + eventMaxStack = _a.eventMaxStack, + eventShortHeight = _a.eventShortHeight, + eventOrderStrict = _a.eventOrderStrict, + eventMinHeight = _a.eventMinHeight; + var _b = this.props, + date = _b.date, + slatCoords = _b.slatCoords, + eventSelection = _b.eventSelection, + todayRange = _b.todayRange, + nowDate = _b.nowDate; + var isMirror = isDragging || isResizing || isDateSelecting; + var segVCoords = computeSegVCoords( + segs, + date, + slatCoords, + eventMinHeight + ); + var _c = computeFgSegPlacements( + segs, + segVCoords, + eventOrderStrict, + eventMaxStack + ), + segPlacements = _c.segPlacements, + hiddenGroups = _c.hiddenGroups; + return createElement( + Fragment, + null, + this.renderHiddenGroups(hiddenGroups, segs), + segPlacements.map(function (segPlacement) { + var seg = segPlacement.seg, + rect = segPlacement.rect; + var instanceId = seg.eventRange.instance.instanceId; + var isVisible = + isMirror || Boolean(!segIsInvisible[instanceId] && rect); + var vStyle = computeSegVStyle(rect && rect.span); + var hStyle = + !isMirror && rect + ? _this.computeSegHStyle(rect) + : { left: 0, right: 0 }; + var isInset = Boolean(rect) && rect.stackForward > 0; + var isShort = + Boolean(rect) && rect.span.end - rect.span.start < eventShortHeight; // look at other places for this problem + return createElement( + "div", + { + className: + "fc-timegrid-event-harness" + + (isInset ? " fc-timegrid-event-harness-inset" : ""), + key: instanceId, + style: __assign( + __assign({ visibility: isVisible ? "" : "hidden" }, vStyle), + hStyle + ), + }, + createElement( + TimeColEvent, + __assign( + { + seg: seg, + isDragging: isDragging, + isResizing: isResizing, + isDateSelecting: isDateSelecting, + isSelected: instanceId === eventSelection, + isShort: isShort, + }, + getSegMeta(seg, todayRange, nowDate) + ) + ) + ); + }) + ); + }; + // will already have eventMinHeight applied because segInputs already had it + TimeCol.prototype.renderHiddenGroups = function (hiddenGroups, segs) { + var _a = this.props, + extraDateSpan = _a.extraDateSpan, + dateProfile = _a.dateProfile, + todayRange = _a.todayRange, + nowDate = _a.nowDate, + eventSelection = _a.eventSelection, + eventDrag = _a.eventDrag, + eventResize = _a.eventResize; + return createElement( + Fragment, + null, + hiddenGroups.map(function (hiddenGroup) { + var positionCss = computeSegVStyle(hiddenGroup.span); + var hiddenSegs = compileSegsFromEntries(hiddenGroup.entries, segs); + return createElement(TimeColMoreLink, { + key: buildIsoString(computeEarliestSegStart(hiddenSegs)), + hiddenSegs: hiddenSegs, + top: positionCss.top, + bottom: positionCss.bottom, + extraDateSpan: extraDateSpan, + dateProfile: dateProfile, + todayRange: todayRange, + nowDate: nowDate, + eventSelection: eventSelection, + eventDrag: eventDrag, + eventResize: eventResize, + }); + }) + ); + }; + TimeCol.prototype.renderFillSegs = function (segs, fillType) { + var _a = this, + props = _a.props, + context = _a.context; + var segVCoords = computeSegVCoords( + segs, + props.date, + props.slatCoords, + context.options.eventMinHeight + ); // don't assume all populated + var children = segVCoords.map(function (vcoords, i) { + var seg = segs[i]; + return createElement( + "div", + { + key: buildEventRangeKey(seg.eventRange), + className: "fc-timegrid-bg-harness", + style: computeSegVStyle(vcoords), + }, + fillType === "bg-event" + ? createElement( + BgEvent, + __assign( + { seg: seg }, + getSegMeta(seg, props.todayRange, props.nowDate) + ) + ) + : renderFill(fillType) + ); + }); + return createElement(Fragment, null, children); + }; + TimeCol.prototype.renderNowIndicator = function (segs) { + var _a = this.props, + slatCoords = _a.slatCoords, + date = _a.date; + if (!slatCoords) { + return null; + } + return segs.map(function (seg, i) { + return createElement( + NowIndicatorRoot, + { + isAxis: false, + date: date, + // key doesn't matter. will only ever be one + key: i, + }, + function (rootElRef, classNames, innerElRef, innerContent) { + return createElement( + "div", + { + ref: rootElRef, + className: ["fc-timegrid-now-indicator-line"] + .concat(classNames) + .join(" "), + style: { top: slatCoords.computeDateTop(seg.start, date) }, + }, + innerContent + ); + } + ); + }); + }; + TimeCol.prototype.computeSegHStyle = function (segHCoords) { + var _a = this.context, + isRtl = _a.isRtl, + options = _a.options; + var shouldOverlap = options.slotEventOverlap; + var nearCoord = segHCoords.levelCoord; // the left side if LTR. the right side if RTL. floating-point + var farCoord = segHCoords.levelCoord + segHCoords.thickness; // the right side if LTR. the left side if RTL. floating-point + var left; // amount of space from left edge, a fraction of the total width + var right; // amount of space from right edge, a fraction of the total width + if (shouldOverlap) { + // double the width, but don't go beyond the maximum forward coordinate (1.0) + farCoord = Math.min(1, nearCoord + (farCoord - nearCoord) * 2); + } + if (isRtl) { + left = 1 - farCoord; + right = nearCoord; + } else { + left = nearCoord; + right = 1 - farCoord; + } + var props = { + zIndex: segHCoords.stackDepth + 1, + left: left * 100 + "%", + right: right * 100 + "%", + }; + if (shouldOverlap && !segHCoords.stackForward) { + // add padding to the edge so that forward stacked events don't cover the resizer's icon + props[isRtl ? "marginLeft" : "marginRight"] = 10 * 2; // 10 is a guesstimate of the icon's width + } + return props; + }; + return TimeCol; + })(BaseComponent); + function renderPlainFgSegs(sortedFgSegs, _a) { + var todayRange = _a.todayRange, + nowDate = _a.nowDate, + eventSelection = _a.eventSelection, + eventDrag = _a.eventDrag, + eventResize = _a.eventResize; + var hiddenInstances = + (eventDrag ? eventDrag.affectedInstances : null) || + (eventResize ? eventResize.affectedInstances : null) || + {}; + return createElement( + Fragment, + null, + sortedFgSegs.map(function (seg) { + var instanceId = seg.eventRange.instance.instanceId; + return createElement( + "div", + { + key: instanceId, + style: { visibility: hiddenInstances[instanceId] ? "hidden" : "" }, + }, + createElement( + TimeColEvent, + __assign( + { + seg: seg, + isDragging: false, + isResizing: false, + isDateSelecting: false, + isSelected: instanceId === eventSelection, + isShort: false, + }, + getSegMeta(seg, todayRange, nowDate) + ) + ) + ); + }) + ); + } + function computeSegVStyle(segVCoords) { + if (!segVCoords) { + return { top: "", bottom: "" }; + } + return { + top: segVCoords.start, + bottom: -segVCoords.end, + }; + } + function compileSegsFromEntries(segEntries, allSegs) { + return segEntries.map(function (segEntry) { + return allSegs[segEntry.index]; + }); + } + + var TimeColsContent = /** @class */ (function (_super) { + __extends(TimeColsContent, _super); + function TimeColsContent() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.splitFgEventSegs = memoize(splitSegsByCol); + _this.splitBgEventSegs = memoize(splitSegsByCol); + _this.splitBusinessHourSegs = memoize(splitSegsByCol); + _this.splitNowIndicatorSegs = memoize(splitSegsByCol); + _this.splitDateSelectionSegs = memoize(splitSegsByCol); + _this.splitEventDrag = memoize(splitInteractionByCol); + _this.splitEventResize = memoize(splitInteractionByCol); + _this.rootElRef = createRef(); + _this.cellElRefs = new RefMap(); + return _this; + } + TimeColsContent.prototype.render = function () { + var _this = this; + var _a = this, + props = _a.props, + context = _a.context; + var nowIndicatorTop = + context.options.nowIndicator && + props.slatCoords && + props.slatCoords.safeComputeTop(props.nowDate); // might return void + var colCnt = props.cells.length; + var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, colCnt); + var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, colCnt); + var businessHourSegsByRow = this.splitBusinessHourSegs( + props.businessHourSegs, + colCnt + ); + var nowIndicatorSegsByRow = this.splitNowIndicatorSegs( + props.nowIndicatorSegs, + colCnt + ); + var dateSelectionSegsByRow = this.splitDateSelectionSegs( + props.dateSelectionSegs, + colCnt + ); + var eventDragByRow = this.splitEventDrag(props.eventDrag, colCnt); + var eventResizeByRow = this.splitEventResize(props.eventResize, colCnt); + return createElement( + "div", + { className: "fc-timegrid-cols", ref: this.rootElRef }, + createElement( + "table", + { + role: "presentation", + style: { + minWidth: props.tableMinWidth, + width: props.clientWidth, + }, + }, + props.tableColGroupNode, + createElement( + "tbody", + { role: "presentation" }, + createElement( + "tr", + { role: "row" }, + props.axis && + createElement( + "td", + { + "aria-hidden": true, + className: "fc-timegrid-col fc-timegrid-axis", + }, + createElement( + "div", + { className: "fc-timegrid-col-frame" }, + createElement( + "div", + { className: "fc-timegrid-now-indicator-container" }, + typeof nowIndicatorTop === "number" && + createElement( + NowIndicatorRoot, + { isAxis: true, date: props.nowDate }, + function ( + rootElRef, + classNames, + innerElRef, + innerContent + ) { + return createElement( + "div", + { + ref: rootElRef, + className: ["fc-timegrid-now-indicator-arrow"] + .concat(classNames) + .join(" "), + style: { top: nowIndicatorTop }, + }, + innerContent + ); + } + ) + ) + ) + ), + props.cells.map(function (cell, i) { + return createElement(TimeCol, { + key: cell.key, + elRef: _this.cellElRefs.createRef(cell.key), + dateProfile: props.dateProfile, + date: cell.date, + nowDate: props.nowDate, + todayRange: props.todayRange, + extraHookProps: cell.extraHookProps, + extraDataAttrs: cell.extraDataAttrs, + extraClassNames: cell.extraClassNames, + extraDateSpan: cell.extraDateSpan, + fgEventSegs: fgEventSegsByRow[i], + bgEventSegs: bgEventSegsByRow[i], + businessHourSegs: businessHourSegsByRow[i], + nowIndicatorSegs: nowIndicatorSegsByRow[i], + dateSelectionSegs: dateSelectionSegsByRow[i], + eventDrag: eventDragByRow[i], + eventResize: eventResizeByRow[i], + slatCoords: props.slatCoords, + eventSelection: props.eventSelection, + forPrint: props.forPrint, + }); + }) + ) + ) + ) + ); + }; + TimeColsContent.prototype.componentDidMount = function () { + this.updateCoords(); + }; + TimeColsContent.prototype.componentDidUpdate = function () { + this.updateCoords(); + }; + TimeColsContent.prototype.updateCoords = function () { + var props = this.props; + if ( + props.onColCoords && + props.clientWidth !== null // means sizing has stabilized + ) { + props.onColCoords( + new PositionCache( + this.rootElRef.current, + collectCellEls(this.cellElRefs.currentMap, props.cells), + true, // horizontal + false + ) + ); + } + }; + return TimeColsContent; + })(BaseComponent); + function collectCellEls(elMap, cells) { + return cells.map(function (cell) { + return elMap[cell.key]; + }); + } + + /* A component that renders one or more columns of vertical time slots + ----------------------------------------------------------------------------------------------------------------------*/ + var TimeCols = /** @class */ (function (_super) { + __extends(TimeCols, _super); + function TimeCols() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.processSlotOptions = memoize(processSlotOptions); + _this.state = { + slatCoords: null, + }; + _this.handleRootEl = function (el) { + if (el) { + _this.context.registerInteractiveComponent(_this, { + el: el, + isHitComboAllowed: _this.props.isHitComboAllowed, + }); + } else { + _this.context.unregisterInteractiveComponent(_this); + } + }; + _this.handleScrollRequest = function (request) { + var onScrollTopRequest = _this.props.onScrollTopRequest; + var slatCoords = _this.state.slatCoords; + if (onScrollTopRequest && slatCoords) { + if (request.time) { + var top_1 = slatCoords.computeTimeTop(request.time); + top_1 = Math.ceil(top_1); // zoom can give weird floating-point values. rather scroll a little bit further + if (top_1) { + top_1 += 1; // to overcome top border that slots beyond the first have. looks better + } + onScrollTopRequest(top_1); + } + return true; + } + return false; + }; + _this.handleColCoords = function (colCoords) { + _this.colCoords = colCoords; + }; + _this.handleSlatCoords = function (slatCoords) { + _this.setState({ slatCoords: slatCoords }); + if (_this.props.onSlatCoords) { + _this.props.onSlatCoords(slatCoords); + } + }; + return _this; + } + TimeCols.prototype.render = function () { + var _a = this, + props = _a.props, + state = _a.state; + return createElement( + "div", + { + className: "fc-timegrid-body", + ref: this.handleRootEl, + style: { + // these props are important to give this wrapper correct dimensions for interactions + // TODO: if we set it here, can we avoid giving to inner tables? + width: props.clientWidth, + minWidth: props.tableMinWidth, + }, + }, + createElement(TimeColsSlats, { + axis: props.axis, + dateProfile: props.dateProfile, + slatMetas: props.slatMetas, + clientWidth: props.clientWidth, + minHeight: props.expandRows ? props.clientHeight : "", + tableMinWidth: props.tableMinWidth, + tableColGroupNode: props.axis + ? props.tableColGroupNode + : null /* axis depends on the colgroup's shrinking */, + onCoords: this.handleSlatCoords, + }), + createElement(TimeColsContent, { + cells: props.cells, + axis: props.axis, + dateProfile: props.dateProfile, + businessHourSegs: props.businessHourSegs, + bgEventSegs: props.bgEventSegs, + fgEventSegs: props.fgEventSegs, + dateSelectionSegs: props.dateSelectionSegs, + eventSelection: props.eventSelection, + eventDrag: props.eventDrag, + eventResize: props.eventResize, + todayRange: props.todayRange, + nowDate: props.nowDate, + nowIndicatorSegs: props.nowIndicatorSegs, + clientWidth: props.clientWidth, + tableMinWidth: props.tableMinWidth, + tableColGroupNode: props.tableColGroupNode, + slatCoords: state.slatCoords, + onColCoords: this.handleColCoords, + forPrint: props.forPrint, + }) + ); + }; + TimeCols.prototype.componentDidMount = function () { + this.scrollResponder = this.context.createScrollResponder( + this.handleScrollRequest + ); + }; + TimeCols.prototype.componentDidUpdate = function (prevProps) { + this.scrollResponder.update( + prevProps.dateProfile !== this.props.dateProfile + ); + }; + TimeCols.prototype.componentWillUnmount = function () { + this.scrollResponder.detach(); + }; + TimeCols.prototype.queryHit = function (positionLeft, positionTop) { + var _a = this.context, + dateEnv = _a.dateEnv, + options = _a.options; + var colCoords = this.colCoords; + var dateProfile = this.props.dateProfile; + var slatCoords = this.state.slatCoords; + var _b = this.processSlotOptions( + this.props.slotDuration, + options.snapDuration + ), + snapDuration = _b.snapDuration, + snapsPerSlot = _b.snapsPerSlot; + var colIndex = colCoords.leftToIndex(positionLeft); + var slatIndex = slatCoords.positions.topToIndex(positionTop); + if (colIndex != null && slatIndex != null) { + var cell = this.props.cells[colIndex]; + var slatTop = slatCoords.positions.tops[slatIndex]; + var slatHeight = slatCoords.positions.getHeight(slatIndex); + var partial = (positionTop - slatTop) / slatHeight; // floating point number between 0 and 1 + var localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat + var snapIndex = slatIndex * snapsPerSlot + localSnapIndex; + var dayDate = this.props.cells[colIndex].date; + var time = addDurations( + dateProfile.slotMinTime, + multiplyDuration(snapDuration, snapIndex) + ); + var start = dateEnv.add(dayDate, time); + var end = dateEnv.add(start, snapDuration); + return { + dateProfile: dateProfile, + dateSpan: __assign( + { range: { start: start, end: end }, allDay: false }, + cell.extraDateSpan + ), + dayEl: colCoords.els[colIndex], + rect: { + left: colCoords.lefts[colIndex], + right: colCoords.rights[colIndex], + top: slatTop, + bottom: slatTop + slatHeight, + }, + layer: 0, + }; + } + return null; + }; + return TimeCols; + })(DateComponent); + function processSlotOptions(slotDuration, snapDurationOverride) { + var snapDuration = snapDurationOverride || slotDuration; + var snapsPerSlot = wholeDivideDurations(slotDuration, snapDuration); + if (snapsPerSlot === null) { + snapDuration = slotDuration; + snapsPerSlot = 1; + // TODO: say warning? + } + return { snapDuration: snapDuration, snapsPerSlot: snapsPerSlot }; + } + + var DayTimeColsSlicer = /** @class */ (function (_super) { + __extends(DayTimeColsSlicer, _super); + function DayTimeColsSlicer() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + DayTimeColsSlicer.prototype.sliceRange = function (range, dayRanges) { + var segs = []; + for (var col = 0; col < dayRanges.length; col += 1) { + var segRange = intersectRanges(range, dayRanges[col]); + if (segRange) { + segs.push({ + start: segRange.start, + end: segRange.end, + isStart: segRange.start.valueOf() === range.start.valueOf(), + isEnd: segRange.end.valueOf() === range.end.valueOf(), + col: col, + }); + } + } + return segs; + }; + return DayTimeColsSlicer; + })(Slicer); + + var DayTimeCols = /** @class */ (function (_super) { + __extends(DayTimeCols, _super); + function DayTimeCols() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.buildDayRanges = memoize(buildDayRanges); + _this.slicer = new DayTimeColsSlicer(); + _this.timeColsRef = createRef(); + return _this; + } + DayTimeCols.prototype.render = function () { + var _this = this; + var _a = this, + props = _a.props, + context = _a.context; + var dateProfile = props.dateProfile, + dayTableModel = props.dayTableModel; + var isNowIndicator = context.options.nowIndicator; + var dayRanges = this.buildDayRanges( + dayTableModel, + dateProfile, + context.dateEnv + ); + // give it the first row of cells + // TODO: would move this further down hierarchy, but sliceNowDate needs it + return createElement( + NowTimer, + { unit: isNowIndicator ? "minute" : "day" }, + function (nowDate, todayRange) { + return createElement( + TimeCols, + __assign( + { ref: _this.timeColsRef }, + _this.slicer.sliceProps( + props, + dateProfile, + null, + context, + dayRanges + ), + { + forPrint: props.forPrint, + axis: props.axis, + dateProfile: dateProfile, + slatMetas: props.slatMetas, + slotDuration: props.slotDuration, + cells: dayTableModel.cells[0], + tableColGroupNode: props.tableColGroupNode, + tableMinWidth: props.tableMinWidth, + clientWidth: props.clientWidth, + clientHeight: props.clientHeight, + expandRows: props.expandRows, + nowDate: nowDate, + nowIndicatorSegs: + isNowIndicator && + _this.slicer.sliceNowDate(nowDate, context, dayRanges), + todayRange: todayRange, + onScrollTopRequest: props.onScrollTopRequest, + onSlatCoords: props.onSlatCoords, + } + ) + ); + } + ); + }; + return DayTimeCols; + })(DateComponent); + function buildDayRanges(dayTableModel, dateProfile, dateEnv) { + var ranges = []; + for (var _i = 0, _a = dayTableModel.headerDates; _i < _a.length; _i++) { + var date = _a[_i]; + ranges.push({ + start: dateEnv.add(date, dateProfile.slotMinTime), + end: dateEnv.add(date, dateProfile.slotMaxTime), + }); + } + return ranges; + } + + // potential nice values for the slot-duration and interval-duration + // from largest to smallest + var STOCK_SUB_DURATIONS = [ + { hours: 1 }, + { minutes: 30 }, + { minutes: 15 }, + { seconds: 30 }, + { seconds: 15 }, + ]; + function buildSlatMetas( + slotMinTime, + slotMaxTime, + explicitLabelInterval, + slotDuration, + dateEnv + ) { + var dayStart = new Date(0); + var slatTime = slotMinTime; + var slatIterator = createDuration(0); + var labelInterval = + explicitLabelInterval || computeLabelInterval(slotDuration); + var metas = []; + while (asRoughMs(slatTime) < asRoughMs(slotMaxTime)) { + var date = dateEnv.add(dayStart, slatTime); + var isLabeled = + wholeDivideDurations(slatIterator, labelInterval) !== null; + metas.push({ + date: date, + time: slatTime, + key: date.toISOString(), + isoTimeStr: formatIsoTimeString(date), + isLabeled: isLabeled, + }); + slatTime = addDurations(slatTime, slotDuration); + slatIterator = addDurations(slatIterator, slotDuration); + } + return metas; + } + // Computes an automatic value for slotLabelInterval + function computeLabelInterval(slotDuration) { + var i; + var labelInterval; + var slotsPerLabel; + // find the smallest stock label interval that results in more than one slots-per-label + for (i = STOCK_SUB_DURATIONS.length - 1; i >= 0; i -= 1) { + labelInterval = createDuration(STOCK_SUB_DURATIONS[i]); + slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration); + if (slotsPerLabel !== null && slotsPerLabel > 1) { + return labelInterval; + } + } + return slotDuration; // fall back + } + + var DayTimeColsView = /** @class */ (function (_super) { + __extends(DayTimeColsView, _super); + function DayTimeColsView() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.buildTimeColsModel = memoize(buildTimeColsModel); + _this.buildSlatMetas = memoize(buildSlatMetas); + return _this; + } + DayTimeColsView.prototype.render = function () { + var _this = this; + var _a = this.context, + options = _a.options, + dateEnv = _a.dateEnv, + dateProfileGenerator = _a.dateProfileGenerator; + var props = this.props; + var dateProfile = props.dateProfile; + var dayTableModel = this.buildTimeColsModel( + dateProfile, + dateProfileGenerator + ); + var splitProps = this.allDaySplitter.splitProps(props); + var slatMetas = this.buildSlatMetas( + dateProfile.slotMinTime, + dateProfile.slotMaxTime, + options.slotLabelInterval, + options.slotDuration, + dateEnv + ); + var dayMinWidth = options.dayMinWidth; + var hasAttachedAxis = !dayMinWidth; + var hasDetachedAxis = dayMinWidth; + var headerContent = + options.dayHeaders && + createElement(DayHeader, { + dates: dayTableModel.headerDates, + dateProfile: dateProfile, + datesRepDistinctDays: true, + renderIntro: hasAttachedAxis ? this.renderHeadAxis : null, + }); + var allDayContent = + options.allDaySlot !== false && + function (contentArg) { + return createElement( + DayTable, + __assign( + {}, + splitProps.allDay, + { + dateProfile: dateProfile, + dayTableModel: dayTableModel, + nextDayThreshold: options.nextDayThreshold, + tableMinWidth: contentArg.tableMinWidth, + colGroupNode: contentArg.tableColGroupNode, + renderRowIntro: hasAttachedAxis + ? _this.renderTableRowAxis + : null, + showWeekNumbers: false, + expandRows: false, + headerAlignElRef: _this.headerElRef, + clientWidth: contentArg.clientWidth, + clientHeight: contentArg.clientHeight, + forPrint: props.forPrint, + }, + _this.getAllDayMaxEventProps() + ) + ); + }; + var timeGridContent = function (contentArg) { + return createElement( + DayTimeCols, + __assign({}, splitProps.timed, { + dayTableModel: dayTableModel, + dateProfile: dateProfile, + axis: hasAttachedAxis, + slotDuration: options.slotDuration, + slatMetas: slatMetas, + forPrint: props.forPrint, + tableColGroupNode: contentArg.tableColGroupNode, + tableMinWidth: contentArg.tableMinWidth, + clientWidth: contentArg.clientWidth, + clientHeight: contentArg.clientHeight, + onSlatCoords: _this.handleSlatCoords, + expandRows: contentArg.expandRows, + onScrollTopRequest: _this.handleScrollTopRequest, + }) + ); + }; + return hasDetachedAxis + ? this.renderHScrollLayout( + headerContent, + allDayContent, + timeGridContent, + dayTableModel.colCnt, + dayMinWidth, + slatMetas, + this.state.slatCoords + ) + : this.renderSimpleLayout( + headerContent, + allDayContent, + timeGridContent + ); + }; + return DayTimeColsView; + })(TimeColsView); + function buildTimeColsModel(dateProfile, dateProfileGenerator) { + var daySeries = new DaySeriesModel( + dateProfile.renderRange, + dateProfileGenerator + ); + return new DayTableModel(daySeries, false); + } + + var OPTION_REFINERS$2 = { + allDaySlot: Boolean, + }; + + var timeGridPlugin = createPlugin({ + initialView: "timeGridWeek", + optionRefiners: OPTION_REFINERS$2, + views: { + timeGrid: { + component: DayTimeColsView, + usesMinMaxTime: true, + allDaySlot: true, + slotDuration: "00:30:00", + slotEventOverlap: true, // a bad name. confused with overlap/constraint system + }, + timeGridDay: { + type: "timeGrid", + duration: { days: 1 }, + }, + timeGridWeek: { + type: "timeGrid", + duration: { weeks: 1 }, + }, + }, + }); + + var ListViewHeaderRow = /** @class */ (function (_super) { + __extends(ListViewHeaderRow, _super); + function ListViewHeaderRow() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.state = { + textId: getUniqueDomId(), + }; + return _this; + } + ListViewHeaderRow.prototype.render = function () { + var _a = this.context, + theme = _a.theme, + dateEnv = _a.dateEnv, + options = _a.options, + viewApi = _a.viewApi; + var _b = this.props, + cellId = _b.cellId, + dayDate = _b.dayDate, + todayRange = _b.todayRange; + var textId = this.state.textId; + var dayMeta = getDateMeta(dayDate, todayRange); + // will ever be falsy? + var text = options.listDayFormat + ? dateEnv.format(dayDate, options.listDayFormat) + : ""; + // will ever be falsy? also, BAD NAME "alt" + var sideText = options.listDaySideFormat + ? dateEnv.format(dayDate, options.listDaySideFormat) + : ""; + var hookProps = __assign( + { + date: dateEnv.toDate(dayDate), + view: viewApi, + textId: textId, + text: text, + sideText: sideText, + navLinkAttrs: buildNavLinkAttrs(this.context, dayDate), + sideNavLinkAttrs: buildNavLinkAttrs( + this.context, + dayDate, + "day", + false + ), + }, + dayMeta + ); + var classNames = ["fc-list-day"].concat(getDayClassNames(dayMeta, theme)); + // TODO: make a reusable HOC for dayHeader (used in daygrid/timegrid too) + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.dayHeaderClassNames, + content: options.dayHeaderContent, + defaultContent: renderInnerContent, + didMount: options.dayHeaderDidMount, + willUnmount: options.dayHeaderWillUnmount, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return createElement( + "tr", + { + ref: rootElRef, + className: classNames.concat(customClassNames).join(" "), + "data-date": formatDayString(dayDate), + }, + createElement( + "th", + { + scope: "colgroup", + colSpan: 3, + id: cellId, + "aria-labelledby": textId, + }, + createElement( + "div", + { + className: + "fc-list-day-cushion " + theme.getClass("tableCellShaded"), + ref: innerElRef, + }, + innerContent + ) + ) + ); + } + ); + }; + return ListViewHeaderRow; + })(BaseComponent); + function renderInnerContent(props) { + return createElement( + Fragment, + null, + props.text && + createElement( + "a", + __assign( + { id: props.textId, className: "fc-list-day-text" }, + props.navLinkAttrs + ), + props.text + ), + props.sideText && + /* not keyboard tabbable */ createElement( + "a", + __assign( + { "aria-hidden": true, className: "fc-list-day-side-text" }, + props.sideNavLinkAttrs + ), + props.sideText + ) + ); + } + + var DEFAULT_TIME_FORMAT = createFormatter({ + hour: "numeric", + minute: "2-digit", + meridiem: "short", + }); + var ListViewEventRow = /** @class */ (function (_super) { + __extends(ListViewEventRow, _super); + function ListViewEventRow() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + ListViewEventRow.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + var seg = props.seg, + timeHeaderId = props.timeHeaderId, + eventHeaderId = props.eventHeaderId, + dateHeaderId = props.dateHeaderId; + var timeFormat = context.options.eventTimeFormat || DEFAULT_TIME_FORMAT; + return createElement( + EventRoot, + { + seg: seg, + timeText: "", // BAD. because of all-day content + disableDragging: true, + disableResizing: true, + defaultContent: function () { + return renderEventInnerContent(seg, context); + } /* weird */, + isPast: props.isPast, + isFuture: props.isFuture, + isToday: props.isToday, + isSelected: props.isSelected, + isDragging: props.isDragging, + isResizing: props.isResizing, + isDateSelecting: props.isDateSelecting, + }, + function (rootElRef, classNames, innerElRef, innerContent, hookProps) { + return createElement( + "tr", + { + className: [ + "fc-list-event", + hookProps.event.url ? "fc-event-forced-url" : "", + ] + .concat(classNames) + .join(" "), + ref: rootElRef, + }, + buildTimeContent( + seg, + timeFormat, + context, + timeHeaderId, + dateHeaderId + ), + createElement( + "td", + { "aria-hidden": true, className: "fc-list-event-graphic" }, + createElement("span", { + className: "fc-list-event-dot", + style: { + borderColor: + hookProps.borderColor || hookProps.backgroundColor, + }, + }) + ), + createElement( + "td", + { + ref: innerElRef, + headers: eventHeaderId + " " + dateHeaderId, + className: "fc-list-event-title", + }, + innerContent + ) + ); + } + ); + }; + return ListViewEventRow; + })(BaseComponent); + function renderEventInnerContent(seg, context) { + var interactiveAttrs = getSegAnchorAttrs(seg, context); + return createElement( + "a", + __assign({}, interactiveAttrs), + seg.eventRange.def.title + ); + } + function buildTimeContent( + seg, + timeFormat, + context, + timeHeaderId, + dateHeaderId + ) { + var options = context.options; + if (options.displayEventTime !== false) { + var eventDef = seg.eventRange.def; + var eventInstance = seg.eventRange.instance; + var doAllDay = false; + var timeText = void 0; + if (eventDef.allDay) { + doAllDay = true; + } else if (isMultiDayRange(seg.eventRange.range)) { + // TODO: use (!isStart || !isEnd) instead? + if (seg.isStart) { + timeText = buildSegTimeText( + seg, + timeFormat, + context, + null, + null, + eventInstance.range.start, + seg.end + ); + } else if (seg.isEnd) { + timeText = buildSegTimeText( + seg, + timeFormat, + context, + null, + null, + seg.start, + eventInstance.range.end + ); + } else { + doAllDay = true; + } + } else { + timeText = buildSegTimeText(seg, timeFormat, context); + } + if (doAllDay) { + var hookProps = { + text: context.options.allDayText, + view: context.viewApi, + }; + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.allDayClassNames, + content: options.allDayContent, + defaultContent: renderAllDayInner, + didMount: options.allDayDidMount, + willUnmount: options.allDayWillUnmount, + }, + function (rootElRef, classNames, innerElRef, innerContent) { + return createElement( + "td", + { + ref: rootElRef, + headers: timeHeaderId + " " + dateHeaderId, + className: ["fc-list-event-time"].concat(classNames).join(" "), + }, + innerContent + ); + } + ); + } + return createElement("td", { className: "fc-list-event-time" }, timeText); + } + return null; + } + function renderAllDayInner(hookProps) { + return hookProps.text; + } + + /* + Responsible for the scroller, and forwarding event-related actions into the "grid". + */ + var ListView = /** @class */ (function (_super) { + __extends(ListView, _super); + function ListView() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.computeDateVars = memoize(computeDateVars); + _this.eventStoreToSegs = memoize(_this._eventStoreToSegs); + _this.state = { + timeHeaderId: getUniqueDomId(), + eventHeaderId: getUniqueDomId(), + dateHeaderIdRoot: getUniqueDomId(), + }; + _this.setRootEl = function (rootEl) { + if (rootEl) { + _this.context.registerInteractiveComponent(_this, { + el: rootEl, + }); + } else { + _this.context.unregisterInteractiveComponent(_this); + } + }; + return _this; + } + ListView.prototype.render = function () { + var _this = this; + var _a = this, + props = _a.props, + context = _a.context; + var extraClassNames = [ + "fc-list", + context.theme.getClass("table"), + context.options.stickyHeaderDates !== false ? "fc-list-sticky" : "", + ]; + var _b = this.computeDateVars(props.dateProfile), + dayDates = _b.dayDates, + dayRanges = _b.dayRanges; + var eventSegs = this.eventStoreToSegs( + props.eventStore, + props.eventUiBases, + dayRanges + ); + return createElement( + ViewRoot, + { viewSpec: context.viewSpec, elRef: this.setRootEl }, + function (rootElRef, classNames) { + return createElement( + "div", + { + ref: rootElRef, + className: extraClassNames.concat(classNames).join(" "), + }, + createElement( + Scroller, + { + liquid: !props.isHeightAuto, + overflowX: props.isHeightAuto ? "visible" : "hidden", + overflowY: props.isHeightAuto ? "visible" : "auto", + }, + eventSegs.length > 0 + ? _this.renderSegList(eventSegs, dayDates) + : _this.renderEmptyMessage() + ) + ); + } + ); + }; + ListView.prototype.renderEmptyMessage = function () { + var _a = this.context, + options = _a.options, + viewApi = _a.viewApi; + var hookProps = { + text: options.noEventsText, + view: viewApi, + }; + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.noEventsClassNames, + content: options.noEventsContent, + defaultContent: renderNoEventsInner, + didMount: options.noEventsDidMount, + willUnmount: options.noEventsWillUnmount, + }, + function (rootElRef, classNames, innerElRef, innerContent) { + return createElement( + "div", + { + className: ["fc-list-empty"].concat(classNames).join(" "), + ref: rootElRef, + }, + createElement( + "div", + { className: "fc-list-empty-cushion", ref: innerElRef }, + innerContent + ) + ); + } + ); + }; + ListView.prototype.renderSegList = function (allSegs, dayDates) { + var _a = this.context, + theme = _a.theme, + options = _a.options; + var _b = this.state, + timeHeaderId = _b.timeHeaderId, + eventHeaderId = _b.eventHeaderId, + dateHeaderIdRoot = _b.dateHeaderIdRoot; + var segsByDay = groupSegsByDay(allSegs); // sparse array + return createElement( + NowTimer, + { unit: "day" }, + function (nowDate, todayRange) { + var innerNodes = []; + for (var dayIndex = 0; dayIndex < segsByDay.length; dayIndex += 1) { + var daySegs = segsByDay[dayIndex]; + if (daySegs) { + // sparse array, so might be undefined + var dayStr = formatDayString(dayDates[dayIndex]); + var dateHeaderId = dateHeaderIdRoot + "-" + dayStr; + // append a day header + innerNodes.push( + createElement(ListViewHeaderRow, { + key: dayStr, + cellId: dateHeaderId, + dayDate: dayDates[dayIndex], + todayRange: todayRange, + }) + ); + daySegs = sortEventSegs(daySegs, options.eventOrder); + for ( + var _i = 0, daySegs_1 = daySegs; + _i < daySegs_1.length; + _i++ + ) { + var seg = daySegs_1[_i]; + innerNodes.push( + createElement( + ListViewEventRow, + __assign( + { + key: + dayStr + + ":" + + seg.eventRange.instance + .instanceId /* are multiple segs for an instanceId */, + seg: seg, + isDragging: false, + isResizing: false, + isDateSelecting: false, + isSelected: false, + timeHeaderId: timeHeaderId, + eventHeaderId: eventHeaderId, + dateHeaderId: dateHeaderId, + }, + getSegMeta(seg, todayRange, nowDate) + ) + ) + ); + } + } + } + return createElement( + "table", + { className: "fc-list-table " + theme.getClass("table") }, + createElement( + "thead", + null, + createElement( + "tr", + null, + createElement( + "th", + { scope: "col", id: timeHeaderId }, + options.timeHint + ), + createElement("th", { scope: "col", "aria-hidden": true }), + createElement( + "th", + { scope: "col", id: eventHeaderId }, + options.eventHint + ) + ) + ), + createElement("tbody", null, innerNodes) + ); + } + ); + }; + ListView.prototype._eventStoreToSegs = function ( + eventStore, + eventUiBases, + dayRanges + ) { + return this.eventRangesToSegs( + sliceEventStore( + eventStore, + eventUiBases, + this.props.dateProfile.activeRange, + this.context.options.nextDayThreshold + ).fg, + dayRanges + ); + }; + ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) { + var segs = []; + for ( + var _i = 0, eventRanges_1 = eventRanges; + _i < eventRanges_1.length; + _i++ + ) { + var eventRange = eventRanges_1[_i]; + segs.push.apply(segs, this.eventRangeToSegs(eventRange, dayRanges)); + } + return segs; + }; + ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) { + var dateEnv = this.context.dateEnv; + var nextDayThreshold = this.context.options.nextDayThreshold; + var range = eventRange.range; + var allDay = eventRange.def.allDay; + var dayIndex; + var segRange; + var seg; + var segs = []; + for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex += 1) { + segRange = intersectRanges(range, dayRanges[dayIndex]); + if (segRange) { + seg = { + component: this, + eventRange: eventRange, + start: segRange.start, + end: segRange.end, + isStart: + eventRange.isStart && + segRange.start.valueOf() === range.start.valueOf(), + isEnd: + eventRange.isEnd && + segRange.end.valueOf() === range.end.valueOf(), + dayIndex: dayIndex, + }; + segs.push(seg); + // detect when range won't go fully into the next day, + // and mutate the latest seg to the be the end. + if ( + !seg.isEnd && + !allDay && + dayIndex + 1 < dayRanges.length && + range.end < + dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold) + ) { + seg.end = range.end; + seg.isEnd = true; + break; + } + } + } + return segs; + }; + return ListView; + })(DateComponent); + function renderNoEventsInner(hookProps) { + return hookProps.text; + } + function computeDateVars(dateProfile) { + var dayStart = startOfDay(dateProfile.renderRange.start); + var viewEnd = dateProfile.renderRange.end; + var dayDates = []; + var dayRanges = []; + while (dayStart < viewEnd) { + dayDates.push(dayStart); + dayRanges.push({ + start: dayStart, + end: addDays(dayStart, 1), + }); + dayStart = addDays(dayStart, 1); + } + return { dayDates: dayDates, dayRanges: dayRanges }; + } + // Returns a sparse array of arrays, segs grouped by their dayIndex + function groupSegsByDay(segs) { + var segsByDay = []; // sparse array + var i; + var seg; + for (i = 0; i < segs.length; i += 1) { + seg = segs[i]; + (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = [])).push(seg); + } + return segsByDay; + } + + var OPTION_REFINERS$1 = { + listDayFormat: createFalsableFormatter, + listDaySideFormat: createFalsableFormatter, + noEventsClassNames: identity, + noEventsContent: identity, + noEventsDidMount: identity, + noEventsWillUnmount: identity, + // noEventsText is defined in base options + }; + function createFalsableFormatter(input) { + return input === false ? null : createFormatter(input); + } + + var listPlugin = createPlugin({ + optionRefiners: OPTION_REFINERS$1, + views: { + list: { + component: ListView, + buttonTextKey: "list", + listDayFormat: { month: "long", day: "numeric", year: "numeric" }, // like "January 1, 2016" + }, + listDay: { + type: "list", + duration: { days: 1 }, + listDayFormat: { weekday: "long" }, // day-of-week is all we need. full date is probably in headerToolbar + }, + listWeek: { + type: "list", + duration: { weeks: 1 }, + listDayFormat: { weekday: "long" }, + listDaySideFormat: { month: "long", day: "numeric", year: "numeric" }, + }, + listMonth: { + type: "list", + duration: { month: 1 }, + listDaySideFormat: { weekday: "long" }, // day-of-week is nice-to-have + }, + listYear: { + type: "list", + duration: { year: 1 }, + listDaySideFormat: { weekday: "long" }, // day-of-week is nice-to-have + }, + }, + }); + + var BootstrapTheme$1 = /** @class */ (function (_super) { + __extends(BootstrapTheme, _super); + function BootstrapTheme() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + return BootstrapTheme; + })(Theme); + BootstrapTheme$1.prototype.classes = { + root: "fc-theme-bootstrap", + table: "table-bordered", + tableCellShaded: "table-active", + buttonGroup: "btn-group", + button: "btn btn-primary", + buttonActive: "active", + popover: "popover", + popoverHeader: "popover-header", + popoverContent: "popover-body", + }; + BootstrapTheme$1.prototype.baseIconClass = "fa"; + BootstrapTheme$1.prototype.iconClasses = { + close: "fa-times", + prev: "fa-chevron-left", + next: "fa-chevron-right", + prevYear: "fa-angle-double-left", + nextYear: "fa-angle-double-right", + }; + BootstrapTheme$1.prototype.rtlIconClasses = { + prev: "fa-chevron-right", + next: "fa-chevron-left", + prevYear: "fa-angle-double-right", + nextYear: "fa-angle-double-left", + }; + BootstrapTheme$1.prototype.iconOverrideOption = "bootstrapFontAwesome"; // TODO: make TS-friendly. move the option-processing into this plugin + BootstrapTheme$1.prototype.iconOverrideCustomButtonOption = + "bootstrapFontAwesome"; + BootstrapTheme$1.prototype.iconOverridePrefix = "fa-"; + var plugin$1 = createPlugin({ + themeClasses: { + bootstrap: BootstrapTheme$1, + }, + }); + + var BootstrapTheme = /** @class */ (function (_super) { + __extends(BootstrapTheme, _super); + function BootstrapTheme() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + return BootstrapTheme; + })(Theme); + BootstrapTheme.prototype.classes = { + root: "fc-theme-bootstrap5", + tableCellShaded: "fc-theme-bootstrap5-shaded", + buttonGroup: "btn-group", + button: "btn btn-primary", + buttonActive: "active", + popover: "popover", + popoverHeader: "popover-header", + popoverContent: "popover-body", + }; + BootstrapTheme.prototype.baseIconClass = "bi"; + BootstrapTheme.prototype.iconClasses = { + close: "bi-x-lg", + prev: "bi-chevron-left", + next: "bi-chevron-right", + prevYear: "bi-chevron-double-left", + nextYear: "bi-chevron-double-right", + }; + BootstrapTheme.prototype.rtlIconClasses = { + prev: "bi-chevron-right", + next: "bi-chevron-left", + prevYear: "bi-chevron-double-right", + nextYear: "bi-chevron-double-left", + }; + // wtf + BootstrapTheme.prototype.iconOverrideOption = "buttonIcons"; // TODO: make TS-friendly + BootstrapTheme.prototype.iconOverrideCustomButtonOption = "icon"; + BootstrapTheme.prototype.iconOverridePrefix = "bi-"; + var plugin = createPlugin({ + themeClasses: { + bootstrap5: BootstrapTheme, + }, + }); + + // rename this file to options.ts like other packages? + var OPTION_REFINERS = { + googleCalendarApiKey: String, + }; + + var EVENT_SOURCE_REFINERS = { + googleCalendarApiKey: String, + googleCalendarId: String, + googleCalendarApiBase: String, + extraParams: identity, + }; + + // TODO: expose somehow + var API_BASE = "https://www.googleapis.com/calendar/v3/calendars"; + var eventSourceDef = { + parseMeta: function (refined) { + var googleCalendarId = refined.googleCalendarId; + if (!googleCalendarId && refined.url) { + googleCalendarId = parseGoogleCalendarId(refined.url); + } + if (googleCalendarId) { + return { + googleCalendarId: googleCalendarId, + googleCalendarApiKey: refined.googleCalendarApiKey, + googleCalendarApiBase: refined.googleCalendarApiBase, + extraParams: refined.extraParams, + }; + } + return null; + }, + fetch: function (arg, onSuccess, onFailure) { + var _a = arg.context, + dateEnv = _a.dateEnv, + options = _a.options; + var meta = arg.eventSource.meta; + var apiKey = meta.googleCalendarApiKey || options.googleCalendarApiKey; + if (!apiKey) { + onFailure({ + message: + "Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/", + }); + } else { + var url = buildUrl(meta); + // TODO: make DRY with json-feed-event-source + var extraParams = meta.extraParams; + var extraParamsObj = + typeof extraParams === "function" ? extraParams() : extraParams; + var requestParams_1 = buildRequestParams( + arg.range, + apiKey, + extraParamsObj, + dateEnv + ); + requestJson( + "GET", + url, + requestParams_1, + function (body, xhr) { + if (body.error) { + onFailure({ + message: "Google Calendar API: " + body.error.message, + errors: body.error.errors, + xhr: xhr, + }); + } else { + onSuccess({ + rawEvents: gcalItemsToRawEventDefs( + body.items, + requestParams_1.timeZone + ), + xhr: xhr, + }); + } + }, + function (message, xhr) { + onFailure({ message: message, xhr: xhr }); + } + ); + } + }, + }; + function parseGoogleCalendarId(url) { + var match; + // detect if the ID was specified as a single string. + // will match calendars like "asdf1234@calendar.google.com" in addition to person email calendars. + if (/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(url)) { + return url; + } + if ( + (match = + /^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec( + url + )) || + (match = /^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(url)) + ) { + return decodeURIComponent(match[1]); + } + return null; + } + function buildUrl(meta) { + var apiBase = meta.googleCalendarApiBase; + if (!apiBase) { + apiBase = API_BASE; + } + return ( + apiBase + "/" + encodeURIComponent(meta.googleCalendarId) + "/events" + ); + } + function buildRequestParams(range, apiKey, extraParams, dateEnv) { + var params; + var startStr; + var endStr; + if (dateEnv.canComputeOffset) { + // strings will naturally have offsets, which GCal needs + startStr = dateEnv.formatIso(range.start); + endStr = dateEnv.formatIso(range.end); + } else { + // when timezone isn't known, we don't know what the UTC offset should be, so ask for +/- 1 day + // from the UTC day-start to guarantee we're getting all the events + // (start/end will be UTC-coerced dates, so toISOString is okay) + startStr = addDays(range.start, -1).toISOString(); + endStr = addDays(range.end, 1).toISOString(); + } + params = __assign(__assign({}, extraParams || {}), { + key: apiKey, + timeMin: startStr, + timeMax: endStr, + singleEvents: true, + maxResults: 9999, + }); + if (dateEnv.timeZone !== "local") { + params.timeZone = dateEnv.timeZone; + } + return params; + } + function gcalItemsToRawEventDefs(items, gcalTimezone) { + return items.map(function (item) { + return gcalItemToRawEventDef(item, gcalTimezone); + }); + } + function gcalItemToRawEventDef(item, gcalTimezone) { + var url = item.htmlLink || null; + // make the URLs for each event show times in the correct timezone + if (url && gcalTimezone) { + url = injectQsComponent(url, "ctz=" + gcalTimezone); + } + return { + id: item.id, + title: item.summary, + start: item.start.dateTime || item.start.date, + end: item.end.dateTime || item.end.date, + url: url, + location: item.location, + description: item.description, + attachments: item.attachments || [], + extendedProps: (item.extendedProperties || {}).shared || {}, + }; + } + // Injects a string like "arg=value" into the querystring of a URL + // TODO: move to a general util file? + function injectQsComponent(url, component) { + // inject it after the querystring but before the fragment + return url.replace(/(\?.*?)?(#|$)/, function (whole, qs, hash) { + return (qs ? qs + "&" : "?") + component + hash; + }); + } + var googleCalendarPlugin = createPlugin({ + eventSourceDefs: [eventSourceDef], + optionRefiners: OPTION_REFINERS, + eventSourceRefiners: EVENT_SOURCE_REFINERS, + }); + + globalPlugins.push( + interactionPlugin, + dayGridPlugin, + timeGridPlugin, + listPlugin, + plugin$1, + plugin, + googleCalendarPlugin + ); + + exports.BASE_OPTION_DEFAULTS = BASE_OPTION_DEFAULTS; + exports.BASE_OPTION_REFINERS = BASE_OPTION_REFINERS; + exports.BaseComponent = BaseComponent; + exports.BgEvent = BgEvent; + exports.BootstrapTheme = BootstrapTheme$1; + exports.Calendar = Calendar; + exports.CalendarApi = CalendarApi; + exports.CalendarContent = CalendarContent; + exports.CalendarDataManager = CalendarDataManager; + exports.CalendarDataProvider = CalendarDataProvider; + exports.CalendarRoot = CalendarRoot; + exports.Component = Component; + exports.ContentHook = ContentHook; + exports.CustomContentRenderContext = CustomContentRenderContext; + exports.DateComponent = DateComponent; + exports.DateEnv = DateEnv; + exports.DateProfileGenerator = DateProfileGenerator; + exports.DayCellContent = DayCellContent; + exports.DayCellRoot = DayCellRoot; + exports.DayGridView = DayTableView; + exports.DayHeader = DayHeader; + exports.DaySeriesModel = DaySeriesModel; + exports.DayTable = DayTable; + exports.DayTableModel = DayTableModel; + exports.DayTableSlicer = DayTableSlicer; + exports.DayTimeCols = DayTimeCols; + exports.DayTimeColsSlicer = DayTimeColsSlicer; + exports.DayTimeColsView = DayTimeColsView; + exports.DelayedRunner = DelayedRunner; + exports.Draggable = ExternalDraggable; + exports.ElementDragging = ElementDragging; + exports.ElementScrollController = ElementScrollController; + exports.Emitter = Emitter; + exports.EventApi = EventApi; + exports.EventRoot = EventRoot; + exports.EventSourceApi = EventSourceApi; + exports.FeaturefulElementDragging = FeaturefulElementDragging; + exports.Fragment = Fragment; + exports.Interaction = Interaction; + exports.ListView = ListView; + exports.MoreLinkRoot = MoreLinkRoot; + exports.MountHook = MountHook; + exports.NamedTimeZoneImpl = NamedTimeZoneImpl; + exports.NowIndicatorRoot = NowIndicatorRoot; + exports.NowTimer = NowTimer; + exports.PointerDragging = PointerDragging; + exports.PositionCache = PositionCache; + exports.RefMap = RefMap; + exports.RenderHook = RenderHook; + exports.ScrollController = ScrollController; + exports.ScrollResponder = ScrollResponder; + exports.Scroller = Scroller; + exports.SegHierarchy = SegHierarchy; + exports.SimpleScrollGrid = SimpleScrollGrid; + exports.Slicer = Slicer; + exports.Splitter = Splitter; + exports.StandardEvent = StandardEvent; + exports.Table = Table; + exports.TableDateCell = TableDateCell; + exports.TableDowCell = TableDowCell; + exports.TableView = TableView; + exports.Theme = Theme; + exports.ThirdPartyDraggable = ThirdPartyDraggable; + exports.TimeCols = TimeCols; + exports.TimeColsSlatsCoords = TimeColsSlatsCoords; + exports.TimeColsView = TimeColsView; + exports.ViewApi = ViewApi; + exports.ViewContextType = ViewContextType; + exports.ViewRoot = ViewRoot; + exports.WeekNumberRoot = WeekNumberRoot; + exports.WindowScrollController = WindowScrollController; + exports.addDays = addDays; + exports.addDurations = addDurations; + exports.addMs = addMs; + exports.addWeeks = addWeeks; + exports.allowContextMenu = allowContextMenu; + exports.allowSelection = allowSelection; + exports.applyMutationToEventStore = applyMutationToEventStore; + exports.applyStyle = applyStyle; + exports.applyStyleProp = applyStyleProp; + exports.asCleanDays = asCleanDays; + exports.asRoughMinutes = asRoughMinutes; + exports.asRoughMs = asRoughMs; + exports.asRoughSeconds = asRoughSeconds; + exports.binarySearch = binarySearch; + exports.buildClassNameNormalizer = buildClassNameNormalizer; + exports.buildDayRanges = buildDayRanges; + exports.buildDayTableModel = buildDayTableModel; + exports.buildEntryKey = buildEntryKey; + exports.buildEventApis = buildEventApis; + exports.buildEventRangeKey = buildEventRangeKey; + exports.buildHashFromArray = buildHashFromArray; + exports.buildIsoString = buildIsoString; + exports.buildNavLinkAttrs = buildNavLinkAttrs; + exports.buildSegCompareObj = buildSegCompareObj; + exports.buildSegTimeText = buildSegTimeText; + exports.buildSlatMetas = buildSlatMetas; + exports.buildTimeColsModel = buildTimeColsModel; + exports.collectFromHash = collectFromHash; + exports.combineEventUis = combineEventUis; + exports.compareByFieldSpec = compareByFieldSpec; + exports.compareByFieldSpecs = compareByFieldSpecs; + exports.compareNumbers = compareNumbers; + exports.compareObjs = compareObjs; + exports.computeEarliestSegStart = computeEarliestSegStart; + exports.computeEdges = computeEdges; + exports.computeFallbackHeaderFormat = computeFallbackHeaderFormat; + exports.computeHeightAndMargins = computeHeightAndMargins; + exports.computeInnerRect = computeInnerRect; + exports.computeRect = computeRect; + exports.computeSegDraggable = computeSegDraggable; + exports.computeSegEndResizable = computeSegEndResizable; + exports.computeSegStartResizable = computeSegStartResizable; + exports.computeShrinkWidth = computeShrinkWidth; + exports.computeSmallestCellWidth = computeSmallestCellWidth; + exports.computeVisibleDayRange = computeVisibleDayRange; + exports.config = config; + exports.constrainPoint = constrainPoint; + exports.createAriaClickAttrs = createAriaClickAttrs; + exports.createContext = createContext; + exports.createDuration = createDuration; + exports.createElement = createElement; + exports.createEmptyEventStore = createEmptyEventStore; + exports.createEventInstance = createEventInstance; + exports.createEventUi = createEventUi; + exports.createFormatter = createFormatter; + exports.createPlugin = createPlugin; + exports.createPortal = createPortal; + exports.createRef = createRef; + exports.diffDates = diffDates; + exports.diffDayAndTime = diffDayAndTime; + exports.diffDays = diffDays; + exports.diffPoints = diffPoints; + exports.diffWeeks = diffWeeks; + exports.diffWholeDays = diffWholeDays; + exports.diffWholeWeeks = diffWholeWeeks; + exports.disableCursor = disableCursor; + exports.elementClosest = elementClosest; + exports.elementMatches = elementMatches; + exports.enableCursor = enableCursor; + exports.eventTupleToStore = eventTupleToStore; + exports.filterEventStoreDefs = filterEventStoreDefs; + exports.filterHash = filterHash; + exports.findDirectChildren = findDirectChildren; + exports.findElements = findElements; + exports.flexibleCompare = flexibleCompare; + exports.flushSync = flushSync; + exports.formatDate = formatDate; + exports.formatDayString = formatDayString; + exports.formatIsoTimeString = formatIsoTimeString; + exports.formatRange = formatRange; + exports.getAllowYScrolling = getAllowYScrolling; + exports.getCanVGrowWithinCell = getCanVGrowWithinCell; + exports.getClippingParents = getClippingParents; + exports.getDateMeta = getDateMeta; + exports.getDayClassNames = getDayClassNames; + exports.getDefaultEventEnd = getDefaultEventEnd; + exports.getElRoot = getElRoot; + exports.getElSeg = getElSeg; + exports.getEntrySpanEnd = getEntrySpanEnd; + exports.getEventClassNames = getEventClassNames; + exports.getEventTargetViaRoot = getEventTargetViaRoot; + exports.getIsRtlScrollbarOnLeft = getIsRtlScrollbarOnLeft; + exports.getRectCenter = getRectCenter; + exports.getRelevantEvents = getRelevantEvents; + exports.getScrollGridClassNames = getScrollGridClassNames; + exports.getScrollbarWidths = getScrollbarWidths; + exports.getSectionClassNames = getSectionClassNames; + exports.getSectionHasLiquidHeight = getSectionHasLiquidHeight; + exports.getSegAnchorAttrs = getSegAnchorAttrs; + exports.getSegMeta = getSegMeta; + exports.getSlotClassNames = getSlotClassNames; + exports.getStickyFooterScrollbar = getStickyFooterScrollbar; + exports.getStickyHeaderDates = getStickyHeaderDates; + exports.getUnequalProps = getUnequalProps; + exports.getUniqueDomId = getUniqueDomId; + exports.globalLocales = globalLocales; + exports.globalPlugins = globalPlugins; + exports.greatestDurationDenominator = greatestDurationDenominator; + exports.groupIntersectingEntries = groupIntersectingEntries; + exports.guid = guid; + exports.hasBgRendering = hasBgRendering; + exports.hasShrinkWidth = hasShrinkWidth; + exports.identity = identity; + exports.interactionSettingsStore = interactionSettingsStore; + exports.interactionSettingsToStore = interactionSettingsToStore; + exports.intersectRanges = intersectRanges; + exports.intersectRects = intersectRects; + exports.intersectSpans = intersectSpans; + exports.isArraysEqual = isArraysEqual; + exports.isColPropsEqual = isColPropsEqual; + exports.isDateSelectionValid = isDateSelectionValid; + exports.isDateSpansEqual = isDateSpansEqual; + exports.isInt = isInt; + exports.isInteractionValid = isInteractionValid; + exports.isMultiDayRange = isMultiDayRange; + exports.isPropsEqual = isPropsEqual; + exports.isPropsValid = isPropsValid; + exports.isValidDate = isValidDate; + exports.joinSpans = joinSpans; + exports.listenBySelector = listenBySelector; + exports.mapHash = mapHash; + exports.memoize = memoize; + exports.memoizeArraylike = memoizeArraylike; + exports.memoizeHashlike = memoizeHashlike; + exports.memoizeObjArg = memoizeObjArg; + exports.mergeEventStores = mergeEventStores; + exports.multiplyDuration = multiplyDuration; + exports.padStart = padStart; + exports.parseBusinessHours = parseBusinessHours; + exports.parseClassNames = parseClassNames; + exports.parseDragMeta = parseDragMeta; + exports.parseEventDef = parseEventDef; + exports.parseFieldSpecs = parseFieldSpecs; + exports.parseMarker = parse; + exports.pointInsideRect = pointInsideRect; + exports.preventContextMenu = preventContextMenu; + exports.preventDefault = preventDefault; + exports.preventSelection = preventSelection; + exports.rangeContainsMarker = rangeContainsMarker; + exports.rangeContainsRange = rangeContainsRange; + exports.rangesEqual = rangesEqual; + exports.rangesIntersect = rangesIntersect; + exports.refineEventDef = refineEventDef; + exports.refineProps = refineProps; + exports.removeElement = removeElement; + exports.removeExact = removeExact; + exports.render = render; + exports.renderChunkContent = renderChunkContent; + exports.renderFill = renderFill; + exports.renderMicroColGroup = renderMicroColGroup; + exports.renderScrollShim = renderScrollShim; + exports.requestJson = requestJson; + exports.sanitizeShrinkWidth = sanitizeShrinkWidth; + exports.setElSeg = setElSeg; + exports.setRef = setRef; + exports.sliceEventStore = sliceEventStore; + exports.sliceEvents = sliceEvents; + exports.sortEventSegs = sortEventSegs; + exports.startOfDay = startOfDay; + exports.translateRect = translateRect; + exports.triggerDateSelect = triggerDateSelect; + exports.unmountComponentAtNode = unmountComponentAtNode; + exports.unpromisify = unpromisify; + exports.version = version; + exports.whenTransitionDone = whenTransitionDone; + exports.wholeDivideDurations = wholeDivideDurations; + + Object.defineProperty(exports, "__esModule", { value: true }); + + return exports; +})({}); diff --git a/public/js/fullcalendar/main.min.css b/public/js/fullcalendar/main.min.css new file mode 100644 index 00000000..5c0056ea --- /dev/null +++ b/public/js/fullcalendar/main.min.css @@ -0,0 +1 @@ +.fc-icon,.fc-unselectable{-moz-user-select:none;-ms-user-select:none}.fc .fc-button,.fc-icon{text-transform:none;font-weight:400}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc .fc-button:not(:disabled),.fc a[data-navlink],.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-unselectable{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.fc{display:flex;flex-direction:column;font-size:1em}.fc .fc-button,.fc-icon{display:inline-block;text-align:center}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{vertical-align:top;padding:0}.fc .fc-button,.fc .fc-button .fc-icon,.fc .fc-button-group,.fc .fc-timegrid-slot-label{vertical-align:middle}.fc a[data-navlink]:hover{text-decoration:underline}.fc .fc-button:hover,.fc .fc-list-event-title a,a.fc-event,a.fc-event:hover{text-decoration:none}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEA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AAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format('truetype');font-weight:400;font-style:normal}.fc-icon{width:1em;height:1em;-webkit-user-select:none;user-select:none;font-family:fcicons!important;speak:none;font-style:normal;font-variant:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fc-icon-chevron-left:before{content:"\e900"}.fc-icon-chevron-right:before{content:"\e901"}.fc-icon-chevrons-left:before{content:"\e902"}.fc-icon-chevrons-right:before{content:"\e903"}.fc-icon-minus-square:before{content:"\e904"}.fc-icon-plus-square:before{content:"\e905"}.fc-icon-x:before{content:"\e906"}.fc .fc-button{overflow:visible;text-transform:none;margin:0;font-family:inherit}.fc .fc-button::-moz-focus-inner{padding:0;border-style:none}.fc .fc-button{-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.4em .65em;font-size:1em;line-height:1.5;border-radius:.25em}.fc .fc-button:focus{outline:0;box-shadow:0 0 0 .2rem rgba(44,62,80,.25)}.fc .fc-button-primary:focus,.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#2C3E50;background-color:var(--fc-button-bg-color,#2C3E50);border-color:#2C3E50;border-color:var(--fc-button-border-color,#2C3E50)}.fc .fc-button-primary:hover{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#1e2b37;background-color:var(--fc-button-hover-bg-color,#1e2b37);border-color:#1a252f;border-color:var(--fc-button-hover-border-color,#1a252f)}.fc .fc-button-primary:disabled{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#2C3E50;background-color:var(--fc-button-bg-color,#2C3E50);border-color:#2C3E50;border-color:var(--fc-button-border-color,#2C3E50)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#1a252f;background-color:var(--fc-button-active-bg-color,#1a252f);border-color:#151e27;border-color:var(--fc-button-active-border-color,#151e27)}.fc .fc-button .fc-icon{font-size:1.5em}.fc .fc-button-group{position:relative;display:inline-flex}.fc .fc-button-group>.fc-button{position:relative;flex:1 1 auto}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-top-left-radius:0;border-bottom-left-radius:0}.fc .fc-toolbar{display:flex;justify-content:space-between;align-items:center}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{position:absolute;top:0;right:0;left:0;bottom:0}.fc .fc-scroller-harness{position:relative;overflow:hidden;direction:ltr}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd)}.fc .fc-scrollgrid,.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{width:100%;table-layout:fixed}.fc .fc-scrollgrid table{border-top-style:hidden;border-left-style:hidden;border-right-style:hidden}.fc .fc-scrollgrid{border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-top-width:0;border-left-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color,#fff);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business,.fc .fc-view-harness-active>.fc-view{position:absolute;top:0;left:0;right:0;bottom:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-non-business{background:rgba(215,215,215,.3);background:var(--fc-non-business-color,rgba(215,215,215,.3))}.fc .fc-bg-event{background:var(--fc-bg-event-color,#8fdf82);opacity:.3;opacity:var(--fc-bg-event-opacity,.3)}.fc .fc-bg-event .fc-event-title{margin:.5em;font-size:.85em;font-size:var(--fc-small-font-size,.85em);font-style:italic}.fc .fc-highlight{background:rgba(188,232,241,.3);background:var(--fc-highlight-color,rgba(188,232,241,.3))}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color,rgba(208,208,208,.3))}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer,.fc-h-event,.fc-v-event{display:block}.fc-event-selected .fc-event-resizer{border-radius:4px;border-radius:calc(var(--fc-event-resizer-dot-total-width,8px)/ 2);border-width:1px;border-width:var(--fc-event-resizer-dot-border-width,1px);width:8px;width:var(--fc-event-resizer-dot-total-width,8px);height:8px;height:var(--fc-event-resizer-dot-total-width,8px);border-style:solid;border-color:inherit;background:var(--fc-page-bg-color,#fff)}.fc-event-selected .fc-event-resizer:before{content:'';position:absolute;top:-20px;left:-20px;right:-20px;bottom:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{content:"";position:absolute;z-index:3;top:0;left:0;right:0;bottom:0}.fc-event-selected:after,.fc-event:focus:after{content:"";background:rgba(0,0,0,.25);background:var(--fc-event-selected-overlay-color,rgba(0,0,0,.25));position:absolute;z-index:1;top:-1px;left:-1px;right:-1px;bottom:-1px}.fc-h-event{border:1px solid #3788d8;border:1px solid var(--fc-event-border-color,#3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color,#3788d8)}.fc-h-event .fc-event-main{color:#fff;color:var(--fc-event-text-color,#fff)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;vertical-align:top;left:0;right:0;max-width:100%;overflow:hidden}.fc-h-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{top:0;bottom:0;width:8px;width:var(--fc-event-resizer-thickness,8px)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:-4px;left:calc(-.5 * var(--fc-event-resizer-thickness,8px))}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:-4px;right:calc(-.5 * var(--fc-event-resizer-thickness,8px))}.fc-h-event.fc-event-selected .fc-event-resizer{top:50%;margin-top:-4px;margin-top:calc(-.5 * var(--fc-event-resizer-dot-total-width,8px))}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:-4px;left:calc(-.5 * var(--fc-event-resizer-dot-total-width,8px))}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:-4px;right:calc(-.5 * var(--fc-event-resizer-dot-total-width,8px))}.fc .fc-popover{position:absolute;z-index:9999;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc .fc-popover-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;opacity:.65;font-size:1.1em}.fc-theme-standard .fc-popover{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd);background:var(--fc-page-bg-color,#fff)}.fc-theme-standard .fc-popover-header{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color,rgba(208,208,208,.3))}:root{--fc-daygrid-event-dot-width:8px;--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{content:"";clear:both;display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:rgba(255,220,40,.15);background-color:var(--fc-today-bg-color,rgba(255,220,40,.15))}.fc .fc-daygrid-day-frame{position:relative;min-height:100%}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{position:relative;z-index:4;padding:4px}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{position:absolute;left:0;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{position:relative;min-height:2em}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{position:absolute;top:0;left:0;right:0}.fc .fc-daygrid-bg-harness{position:absolute;top:0;bottom:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{z-index:6;margin-top:1px}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;padding:2px 3px 0}.fc .fc-daygrid-day-bottom:before{content:"";clear:both;display:table}.fc .fc-daygrid-more-link{position:relative;z-index:4;cursor:pointer}.fc .fc-daygrid-week-number{position:absolute;z-index:5;top:0;padding:2px;min-width:1.5em;text-align:center;background-color:rgba(208,208,208,.3);background-color:var(--fc-neutral-bg-color,rgba(208,208,208,.3));color:grey;color:var(--fc-neutral-text-color,grey)}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-week-number{left:0;border-radius:0 0 3px}.fc-direction-rtl .fc-daygrid-week-number{right:0;border-radius:0 0 0 3px}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{position:relative;white-space:nowrap;border-radius:3px;font-size:.85em;font-size:var(--fc-small-font-size,.85em)}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{display:flex;align-items:center;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;min-width:0;overflow:hidden;font-weight:700}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-daygrid-event-dot{margin:0 4px;box-sizing:content-box;width:0;height:0;border:4px solid #3788d8;border:calc(var(--fc-daygrid-event-dot-width,8px)/ 2) solid var(--fc-event-border-color,#3788d8);border-radius:4px;border-radius:calc(var(--fc-daygrid-event-dot-width,8px)/ 2)}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}.fc-v-event{border:1px solid #3788d8;border:1px solid var(--fc-event-border-color,#3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color,#3788d8)}.fc-v-event .fc-event-main{color:#fff;color:var(--fc-event-text-color,#fff);height:100%}.fc-v-event .fc-event-main-frame{height:100%;display:flex;flex-direction:column}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{top:0;bottom:0;max-height:100%;overflow:hidden}.fc-v-event:not(.fc-event-start){border-top-width:0;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event:not(.fc-event-end){border-bottom-width:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:8px;height:var(--fc-event-resizer-thickness,8px);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:-4px;top:calc(var(--fc-event-resizer-thickness,8px)/ -2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:-4px;bottom:calc(var(--fc-event-resizer-thickness,8px)/ -2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:-4px;margin-left:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:-4px;top:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:-4px;bottom:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-body,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-slot{height:1.5em;border-bottom:0}.fc .fc-timegrid-slot:empty:before{content:'\00a0'}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{overflow:hidden;display:flex;align-items:center;justify-content:flex-end}.fc .fc-timegrid-axis-cushion{max-width:60px;flex-shrink:0}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc .fc-timegrid-col.fc-day-today{background-color:rgba(255,220,40,.15);background-color:var(--fc-today-bg-color,rgba(255,220,40,.15))}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc-media-screen .fc-timegrid-cols{position:absolute;top:0;left:0;right:0;bottom:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{position:absolute;top:0;left:0;right:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight,.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-bg-harness{position:absolute;left:0;right:0}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{position:absolute;top:0;bottom:0;left:0;right:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px var(--fc-page-bg-color,#fff)}.fc-timegrid-event,.fc-timegrid-more-link{font-size:.85em;font-size:var(--fc-small-font-size,.85em);border-radius:3px}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{white-space:nowrap;font-size:.85em;font-size:var(--fc-small-font-size,.85em);margin-bottom:1px}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:'\00a0-\00a0'}.fc-timegrid-event-short .fc-event-title{font-size:.85em;font-size:var(--fc-small-font-size,.85em)}.fc-timegrid-more-link{position:absolute;z-index:9999;color:inherit;color:var(--fc-more-link-text-color,inherit);background:var(--fc-more-link-bg-color,#d0d0d0);cursor:pointer;margin-bottom:1px}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{position:absolute;z-index:4;left:0;right:0;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color,red);border-width:1px 0 0}.fc .fc-timegrid-now-indicator-arrow{position:absolute;z-index:4;margin-top:-5px;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color,red)}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-theme-standard .fc-list{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd)}.fc .fc-list-empty{background-color:rgba(208,208,208,.3);background-color:var(--fc-neutral-bg-color,rgba(208,208,208,.3));height:100%;display:flex;justify-content:center;align-items:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{width:100%;border-style:hidden}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{position:sticky;top:0;background:var(--fc-page-bg-color,#fff)}.fc .fc-list-table thead{position:absolute;left:-10000px}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{content:"";clear:both;display:table}.fc-theme-standard .fc-list-day-cushion{background-color:rgba(208,208,208,.3);background-color:var(--fc-neutral-bg-color,rgba(208,208,208,.3))}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:#f5f5f5;background-color:var(--fc-list-event-hover-bg-color,#f5f5f5)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{display:inline-block;box-sizing:content-box;width:0;height:0;border:5px solid #3788d8;border:calc(var(--fc-list-event-dot-width,10px)/ 2) solid var(--fc-event-border-color,#3788d8);border-radius:5px;border-radius:calc(var(--fc-list-event-dot-width,10px)/ 2)}.fc .fc-list-event-title a{color:inherit}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}.fc-theme-bootstrap a:not([href]){color:inherit}.fc-theme-bootstrap5 a:not([href]){color:inherit;text-decoration:inherit}.fc-theme-bootstrap5 .fc-list,.fc-theme-bootstrap5 .fc-scrollgrid,.fc-theme-bootstrap5 td,.fc-theme-bootstrap5 th{border:1px solid var(--bs-gray-400)}.fc-theme-bootstrap5 .fc-scrollgrid{border-right-width:0;border-bottom-width:0}.fc-theme-bootstrap5-shaded{background-color:var(--bs-gray-200)} \ No newline at end of file diff --git a/public/js/fullcalendar/main.min.js b/public/js/fullcalendar/main.min.js new file mode 100644 index 00000000..186f4c0f --- /dev/null +++ b/public/js/fullcalendar/main.min.js @@ -0,0 +1,6 @@ +/*! +FullCalendar v5.11.3 +Docs & License: https://fullcalendar.io/ +(c) 2022 Adam Shaw +*/ +var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,n)};function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n3)for(n=[n],i=3;i0?g(v.type,v.props,v.key,null,v.__v):v)){if(v.__=n,v.__b=n.__b+1,null===(h=D[p])||h&&v.key==h.key&&v.type===h.type)D[p]=void 0;else for(f=0;f3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),L(v(oe,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(ne.prototype=new y).__e=function(e){var t=this,n=te(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),re(t,e,r)):o()};n?n(i):i()}},ne.prototype.render=function(e){this.u=null,this.o=new Map;var t=R(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ne.prototype.componentDidUpdate=ne.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){re(e,n,t)}))};var ae="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,se=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,le=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ue=i.event;function ce(){}function de(){return this.cancelBubble}function pe(){return this.defaultPrevented}i.event=function(e){return ue&&(e=ue(e)),e.persist=ce,e.isPropagationStopped=de,e.isDefaultPrevented=pe,e.nativeEvent=e};var fe={configurable:!0,get:function(){return this.class}},he=i.vnode;i.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){for(var o in r={},n){var i=n[o];"value"===o&&"defaultValue"in n&&null==i||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===i?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!le(n.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():se.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===i&&(i=void 0),r[o]=i)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=R(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=R(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r}t&&n.class!=n.className&&(fe.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",fe)),e.$$typeof=ae,he&&he(e)};var ve=i.__r;i.__r=function(e){ve&&ve(e)},"object"==typeof performance&&"function"==typeof performance.now&&performance.now.bind(performance);var ge="undefined"!=typeof globalThis?globalThis:window;ge.FullCalendarVDom?console.warn("FullCalendar VDOM already loaded"):ge.FullCalendarVDom={Component:y,createElement:v,render:L,createRef:function(){return{current:null}},Fragment:m,createContext:function(e){var t=function(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var o=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&o.forEach((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}}return r},t},createPortal:function(e,t){return v(ie,{__v:e,i:t})},flushSync:function(e){e();var t=i.debounceRendering,n=[];function r(e){n.push(e)}i.debounceRendering=r,L(v(me,{}),document.createElement("div"));for(;n.length;)n.shift()();i.debounceRendering=t},unmountComponentAtNode:function(e){L(null,e)}};var me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(y);var ye=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}();function Ee(e){e.parentNode&&e.parentNode.removeChild(e)}function Se(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(be(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function be(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function De(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o=0;i-=1){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=Et(o))}for(i=e.length-1;i>=0;i-=1){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function St(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function bt(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Dt(e){for(var t={},n=0,r=e;n10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",jt(t,!0)))),r}function Bt(e){return e.toISOString().replace(/T.*$/,"")}function zt(e){return Ze(e.getUTCHours(),2)+":"+Ze(e.getUTCMinutes(),2)+":"+Ze(e.getUTCSeconds(),2)}function jt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=Math.round(r%60);return t?n+Ze(o,2)+":"+Ze(i,2):"GMT"+n+o+(i?":"+Ze(i,2):"")}function Gt(e,t,n){if(e===t)return!0;var r,o=e.length;if(o!==t.length)return!1;for(r=0;r1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(s=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=nn(function(e,t){var n={};for(var r in e)(!(r in Xt)||Xt[r]<=t)&&(n[r]=e[r]);return n}(o,s),i,n),d=c(e),p=c(t),f=function(e,t,n,r){var o=0;for(;o=Ut(t)&&(r=tt(r,1))}return e.start&&(n=lt(e.start),r&&r<=n&&(r=tt(n,1))),{start:n,end:r}}function Vn(e){var t=Wn(e);return ot(t.start,t.end)>1}function Fn(e,t,n,r){return"year"===r?Nt(n.diffWholeYears(e,t),"year"):"month"===r?Nt(n.diffWholeMonths(e,t),"month"):it(e,t)}function Bn(e,t){var n,r,o=[],i=t.start;for(e.sort(zn),n=0;ni&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return it.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function Zn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&Zn(t,r.start)}}function lr(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function ur(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}function cr(e,t){var n=e.eventRange,r=n.def,o=n.instance,i=r.url;if(i)return{href:i};var a=t.emitter,s=t.options.eventInteractive;return null==s&&null==(s=r.interactive)&&(s=Boolean(a.hasHandlers("eventClick"))),s?Oe((function(e){a.trigger("eventClick",{el:e.target,event:new xr(t,r,o),jsEvent:e,view:t.viewApi})})):{}}var dr={start:yn,end:yn,allDay:Boolean};function pr(e,t,n){var o=function(e,t){var n=mn(e,dr),o=n.refined,i=n.extra,a=o.start?t.createMarkerMeta(o.start):null,s=o.end?t.createMarkerMeta(o.end):null,l=o.allDay;null==l&&(l=a&&a.isTimeUnspecified&&(!s||s.isTimeUnspecified));return r({range:{start:a?a.marker:null,end:s?s.marker:null},allDay:l},i)}(e,t),i=o.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return o}function fr(e,t){return Gn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function hr(e,t,n){return r(r({},vr(e,t,n)),{timeZone:t.timeZone})}function vr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function gr(e,t,n){var r=On({editable:!1},n),o=Ln(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:er(o,t),instance:mt(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function mr(e,t,n){n.emitter.trigger("select",r(r({},yr(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function yr(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.dateSpanTransforms;a=0;r-=1){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:Le(),sourceDefId:s.sourceDefId,meta:s.meta,ui:kn(i,t),extendedProps:a}}return null}function _r(e){return r(r(r({},_n),wr),e.pluginHooks.eventSourceRefiners)}function Tr(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var kr=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r=1?Math.min(o,i):o}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=nt(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),Ft(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?ht(dt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?ht(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-pt(ft(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ft(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?pt(ft(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(ft(e))*60):new Date(e.valueOf()-(t||0))},e}(),Ur=[],Wr={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Vr=r(r({},Wr),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function Fr(e){for(var t=e.length>0?e[0].code:"en",n=Ur.concat(e),r={en:Vr},o=0,i=n;o0;o-=1){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Vr;return zr(e,n,r)}(e,t):zr(e.code,[e.code],e)}function zr(e,t,n){var r=Et([Wr,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function jr(e){var t=Br(e.locale||"en",Fr([]).map);return new Lr(r(r({timeZone:cn.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var Gr,qr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Yr(e,t){return En(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return r(r({},qr),e)}))}(e),null,t)}function Zr(e,t){return e.left>=t.left&&e.left=t.top&&e.top
/ elements with colspans. + SOLUTION: making individual
+ _this.frameElRefs = new RefMap(); // the fc-daygrid-day-frame + _this.fgElRefs = new RefMap(); // the fc-daygrid-day-events + _this.segHarnessRefs = new RefMap(); // indexed by "instanceId:firstCol" + _this.rootElRef = createRef(); + _this.state = { + framePositions: null, + maxContentHeight: null, + eventInstanceHeights: {}, + }; + return _this; + } + TableRow.prototype.render = function () { + var _this = this; + var _a = this, + props = _a.props, + state = _a.state, + context = _a.context; + var options = context.options; + var colCnt = props.cells.length; + var businessHoursByCol = splitSegsByFirstCol( + props.businessHourSegs, + colCnt + ); + var bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt); + var highlightSegsByCol = splitSegsByFirstCol( + this.getHighlightSegs(), + colCnt + ); + var mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt); + var _b = computeFgSegPlacement( + sortEventSegs(props.fgEventSegs, options.eventOrder), + props.dayMaxEvents, + props.dayMaxEventRows, + options.eventOrderStrict, + state.eventInstanceHeights, + state.maxContentHeight, + props.cells + ), + singleColPlacements = _b.singleColPlacements, + multiColPlacements = _b.multiColPlacements, + moreCnts = _b.moreCnts, + moreMarginTops = _b.moreMarginTops; + var isForcedInvisible = // TODO: messy way to compute this + (props.eventDrag && props.eventDrag.affectedInstances) || + (props.eventResize && props.eventResize.affectedInstances) || + {}; + return createElement( + "tr", + { ref: this.rootElRef, role: "row" }, + props.renderIntro && props.renderIntro(), + props.cells.map(function (cell, col) { + var normalFgNodes = _this.renderFgSegs( + col, + props.forPrint ? singleColPlacements[col] : multiColPlacements[col], + props.todayRange, + isForcedInvisible + ); + var mirrorFgNodes = _this.renderFgSegs( + col, + buildMirrorPlacements(mirrorSegsByCol[col], multiColPlacements), + props.todayRange, + {}, + Boolean(props.eventDrag), + Boolean(props.eventResize), + false + ); + return createElement(TableCell, { + key: cell.key, + elRef: _this.cellElRefs.createRef(cell.key), + innerElRef: _this.frameElRefs.createRef( + cell.key + ) /* FF problem, but okay to use for left/right. TODO: rename prop */, + dateProfile: props.dateProfile, + date: cell.date, + showDayNumber: props.showDayNumbers, + showWeekNumber: props.showWeekNumbers && col === 0, + forceDayTop: + props.showWeekNumbers /* even displaying weeknum for row, not necessarily day */, + todayRange: props.todayRange, + eventSelection: props.eventSelection, + eventDrag: props.eventDrag, + eventResize: props.eventResize, + extraHookProps: cell.extraHookProps, + extraDataAttrs: cell.extraDataAttrs, + extraClassNames: cell.extraClassNames, + extraDateSpan: cell.extraDateSpan, + moreCnt: moreCnts[col], + moreMarginTop: moreMarginTops[col], + singlePlacements: singleColPlacements[col], + fgContentElRef: _this.fgElRefs.createRef(cell.key), + // Fragment scopes the keys + fgContent: createElement( + Fragment, + null, + createElement(Fragment, null, normalFgNodes), + createElement(Fragment, null, mirrorFgNodes) + ), + // Fragment scopes the keys + bgContent: createElement( + Fragment, + null, + _this.renderFillSegs(highlightSegsByCol[col], "highlight"), + _this.renderFillSegs(businessHoursByCol[col], "non-business"), + _this.renderFillSegs(bgEventSegsByCol[col], "bg-event") + ), + }); + }) + ); + }; + TableRow.prototype.componentDidMount = function () { + this.updateSizing(true); + }; + TableRow.prototype.componentDidUpdate = function (prevProps, prevState) { + var currentProps = this.props; + this.updateSizing(!isPropsEqual(prevProps, currentProps)); + }; + TableRow.prototype.getHighlightSegs = function () { + var props = this.props; + if (props.eventDrag && props.eventDrag.segs.length) { + // messy check + return props.eventDrag.segs; + } + if (props.eventResize && props.eventResize.segs.length) { + // messy check + return props.eventResize.segs; + } + return props.dateSelectionSegs; + }; + TableRow.prototype.getMirrorSegs = function () { + var props = this.props; + if (props.eventResize && props.eventResize.segs.length) { + // messy check + return props.eventResize.segs; + } + return []; + }; + TableRow.prototype.renderFgSegs = function ( + col, + segPlacements, + todayRange, + isForcedInvisible, + isDragging, + isResizing, + isDateSelecting + ) { + var context = this.context; + var eventSelection = this.props.eventSelection; + var framePositions = this.state.framePositions; + var defaultDisplayEventEnd = this.props.cells.length === 1; // colCnt === 1 + var isMirror = isDragging || isResizing || isDateSelecting; + var nodes = []; + if (framePositions) { + for ( + var _i = 0, segPlacements_1 = segPlacements; + _i < segPlacements_1.length; + _i++ + ) { + var placement = segPlacements_1[_i]; + var seg = placement.seg; + var instanceId = seg.eventRange.instance.instanceId; + var key = instanceId + ":" + col; + var isVisible = placement.isVisible && !isForcedInvisible[instanceId]; + var isAbsolute = placement.isAbsolute; + var left = ""; + var right = ""; + if (isAbsolute) { + if (context.isRtl) { + right = 0; + left = + framePositions.lefts[seg.lastCol] - + framePositions.lefts[seg.firstCol]; + } else { + left = 0; + right = + framePositions.rights[seg.firstCol] - + framePositions.rights[seg.lastCol]; + } + } + /* + known bug: events that are force to be list-item but span multiple days still take up space in later columns + todo: in print view, for multi-day events, don't display title within non-start/end segs + */ + nodes.push( + createElement( + "div", + { + className: + "fc-daygrid-event-harness" + + (isAbsolute ? " fc-daygrid-event-harness-abs" : ""), + key: key, + ref: isMirror ? null : this.segHarnessRefs.createRef(key), + style: { + visibility: isVisible ? "" : "hidden", + marginTop: isAbsolute ? "" : placement.marginTop, + top: isAbsolute ? placement.absoluteTop : "", + left: left, + right: right, + }, + }, + hasListItemDisplay(seg) + ? createElement( + TableListItemEvent, + __assign( + { + seg: seg, + isDragging: isDragging, + isSelected: instanceId === eventSelection, + defaultDisplayEventEnd: defaultDisplayEventEnd, + }, + getSegMeta(seg, todayRange) + ) + ) + : createElement( + TableBlockEvent, + __assign( + { + seg: seg, + isDragging: isDragging, + isResizing: isResizing, + isDateSelecting: isDateSelecting, + isSelected: instanceId === eventSelection, + defaultDisplayEventEnd: defaultDisplayEventEnd, + }, + getSegMeta(seg, todayRange) + ) + ) + ) + ); + } + } + return nodes; + }; + TableRow.prototype.renderFillSegs = function (segs, fillType) { + var isRtl = this.context.isRtl; + var todayRange = this.props.todayRange; + var framePositions = this.state.framePositions; + var nodes = []; + if (framePositions) { + for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) { + var seg = segs_1[_i]; + var leftRightCss = isRtl + ? { + right: 0, + left: + framePositions.lefts[seg.lastCol] - + framePositions.lefts[seg.firstCol], + } + : { + left: 0, + right: + framePositions.rights[seg.firstCol] - + framePositions.rights[seg.lastCol], + }; + nodes.push( + createElement( + "div", + { + key: buildEventRangeKey(seg.eventRange), + className: "fc-daygrid-bg-harness", + style: leftRightCss, + }, + fillType === "bg-event" + ? createElement( + BgEvent, + __assign({ seg: seg }, getSegMeta(seg, todayRange)) + ) + : renderFill(fillType) + ) + ); + } + } + return createElement.apply(void 0, __spreadArray([Fragment, {}], nodes)); + }; + TableRow.prototype.updateSizing = function (isExternalSizingChange) { + var _a = this, + props = _a.props, + frameElRefs = _a.frameElRefs; + if ( + !props.forPrint && + props.clientWidth !== null // positioning ready? + ) { + if (isExternalSizingChange) { + var frameEls = props.cells.map(function (cell) { + return frameElRefs.currentMap[cell.key]; + }); + if (frameEls.length) { + var originEl = this.rootElRef.current; + this.setState({ + framePositions: new PositionCache( + originEl, + frameEls, + true, // isHorizontal + false + ), + }); + } + } + var oldInstanceHeights = this.state.eventInstanceHeights; + var newInstanceHeights = this.queryEventInstanceHeights(); + var limitByContentHeight = + props.dayMaxEvents === true || props.dayMaxEventRows === true; + this.safeSetState({ + // HACK to prevent oscillations of events being shown/hidden from max-event-rows + // Essentially, once you compute an element's height, never null-out. + // TODO: always display all events, as visibility:hidden? + eventInstanceHeights: __assign( + __assign({}, oldInstanceHeights), + newInstanceHeights + ), + maxContentHeight: limitByContentHeight + ? this.computeMaxContentHeight() + : null, + }); + } + }; + TableRow.prototype.queryEventInstanceHeights = function () { + var segElMap = this.segHarnessRefs.currentMap; + var eventInstanceHeights = {}; + // get the max height amongst instance segs + for (var key in segElMap) { + var height = Math.round(segElMap[key].getBoundingClientRect().height); + var instanceId = key.split(":")[0]; // deconstruct how renderFgSegs makes the key + eventInstanceHeights[instanceId] = Math.max( + eventInstanceHeights[instanceId] || 0, + height + ); + } + return eventInstanceHeights; + }; + TableRow.prototype.computeMaxContentHeight = function () { + var firstKey = this.props.cells[0].key; + var cellEl = this.cellElRefs.currentMap[firstKey]; + var fcContainerEl = this.fgElRefs.currentMap[firstKey]; + return ( + cellEl.getBoundingClientRect().bottom - + fcContainerEl.getBoundingClientRect().top + ); + }; + TableRow.prototype.getCellEls = function () { + var elMap = this.cellElRefs.currentMap; + return this.props.cells.map(function (cell) { + return elMap[cell.key]; + }); + }; + return TableRow; + })(DateComponent); + TableRow.addStateEquality({ + eventInstanceHeights: isPropsEqual, + }); + function buildMirrorPlacements(mirrorSegs, colPlacements) { + if (!mirrorSegs.length) { + return []; + } + var topsByInstanceId = buildAbsoluteTopHash(colPlacements); // TODO: cache this at first render? + return mirrorSegs.map(function (seg) { + return { + seg: seg, + isVisible: true, + isAbsolute: true, + absoluteTop: topsByInstanceId[seg.eventRange.instance.instanceId], + marginTop: 0, + }; + }); + } + function buildAbsoluteTopHash(colPlacements) { + var topsByInstanceId = {}; + for ( + var _i = 0, colPlacements_1 = colPlacements; + _i < colPlacements_1.length; + _i++ + ) { + var placements = colPlacements_1[_i]; + for ( + var _a = 0, placements_1 = placements; + _a < placements_1.length; + _a++ + ) { + var placement = placements_1[_a]; + topsByInstanceId[placement.seg.eventRange.instance.instanceId] = + placement.absoluteTop; + } + } + return topsByInstanceId; + } + + var Table = /** @class */ (function (_super) { + __extends(Table, _super); + function Table() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.splitBusinessHourSegs = memoize(splitSegsByRow); + _this.splitBgEventSegs = memoize(splitSegsByRow); + _this.splitFgEventSegs = memoize(splitSegsByRow); + _this.splitDateSelectionSegs = memoize(splitSegsByRow); + _this.splitEventDrag = memoize(splitInteractionByRow); + _this.splitEventResize = memoize(splitInteractionByRow); + _this.rowRefs = new RefMap(); + _this.handleRootEl = function (rootEl) { + _this.rootEl = rootEl; + if (rootEl) { + _this.context.registerInteractiveComponent(_this, { + el: rootEl, + isHitComboAllowed: _this.props.isHitComboAllowed, + }); + } else { + _this.context.unregisterInteractiveComponent(_this); + } + }; + return _this; + } + Table.prototype.render = function () { + var _this = this; + var props = this.props; + var dateProfile = props.dateProfile, + dayMaxEventRows = props.dayMaxEventRows, + dayMaxEvents = props.dayMaxEvents, + expandRows = props.expandRows; + var rowCnt = props.cells.length; + var businessHourSegsByRow = this.splitBusinessHourSegs( + props.businessHourSegs, + rowCnt + ); + var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt); + var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt); + var dateSelectionSegsByRow = this.splitDateSelectionSegs( + props.dateSelectionSegs, + rowCnt + ); + var eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt); + var eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt); + var limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true; + // if rows can't expand to fill fixed height, can't do balanced-height event limit + // TODO: best place to normalize these options? + if (limitViaBalanced && !expandRows) { + limitViaBalanced = false; + dayMaxEventRows = null; + dayMaxEvents = null; + } + var classNames = [ + "fc-daygrid-body", + limitViaBalanced + ? "fc-daygrid-body-balanced" + : "fc-daygrid-body-unbalanced", + expandRows ? "" : "fc-daygrid-body-natural", // will height of one row depend on the others? + ]; + return createElement( + "div", + { + className: classNames.join(" "), + ref: this.handleRootEl, + style: { + // these props are important to give this wrapper correct dimensions for interactions + // TODO: if we set it here, can we avoid giving to inner tables? + width: props.clientWidth, + minWidth: props.tableMinWidth, + }, + }, + createElement( + NowTimer, + { unit: "day" }, + function (nowDate, todayRange) { + return createElement( + Fragment, + null, + createElement( + "table", + { + role: "presentation", + className: "fc-scrollgrid-sync-table", + style: { + width: props.clientWidth, + minWidth: props.tableMinWidth, + height: expandRows ? props.clientHeight : "", + }, + }, + props.colGroupNode, + createElement( + "tbody", + { role: "presentation" }, + props.cells.map(function (cells, row) { + return createElement(TableRow, { + ref: _this.rowRefs.createRef(row), + key: cells.length + ? cells[0].date.toISOString() /* best? or put key on cell? or use diff formatter? */ + : row, // in case there are no cells (like when resource view is loading) + showDayNumbers: rowCnt > 1, + showWeekNumbers: props.showWeekNumbers, + todayRange: todayRange, + dateProfile: dateProfile, + cells: cells, + renderIntro: props.renderRowIntro, + businessHourSegs: businessHourSegsByRow[row], + eventSelection: props.eventSelection, + bgEventSegs: + bgEventSegsByRow[row].filter(isSegAllDay) /* hack */, + fgEventSegs: fgEventSegsByRow[row], + dateSelectionSegs: dateSelectionSegsByRow[row], + eventDrag: eventDragByRow[row], + eventResize: eventResizeByRow[row], + dayMaxEvents: dayMaxEvents, + dayMaxEventRows: dayMaxEventRows, + clientWidth: props.clientWidth, + clientHeight: props.clientHeight, + forPrint: props.forPrint, + }); + }) + ) + ) + ); + } + ) + ); + }; + // Hit System + // ---------------------------------------------------------------------------------------------------- + Table.prototype.prepareHits = function () { + this.rowPositions = new PositionCache( + this.rootEl, + this.rowRefs.collect().map(function (rowObj) { + return rowObj.getCellEls()[0]; + }), // first cell el in each row. TODO: not optimal + false, + true + ); + this.colPositions = new PositionCache( + this.rootEl, + this.rowRefs.currentMap[0].getCellEls(), // cell els in first row + true, // horizontal + false + ); + }; + Table.prototype.queryHit = function (positionLeft, positionTop) { + var _a = this, + colPositions = _a.colPositions, + rowPositions = _a.rowPositions; + var col = colPositions.leftToIndex(positionLeft); + var row = rowPositions.topToIndex(positionTop); + if (row != null && col != null) { + var cell = this.props.cells[row][col]; + return { + dateProfile: this.props.dateProfile, + dateSpan: __assign( + { range: this.getCellRange(row, col), allDay: true }, + cell.extraDateSpan + ), + dayEl: this.getCellEl(row, col), + rect: { + left: colPositions.lefts[col], + right: colPositions.rights[col], + top: rowPositions.tops[row], + bottom: rowPositions.bottoms[row], + }, + layer: 0, + }; + } + return null; + }; + Table.prototype.getCellEl = function (row, col) { + return this.rowRefs.currentMap[row].getCellEls()[col]; // TODO: not optimal + }; + Table.prototype.getCellRange = function (row, col) { + var start = this.props.cells[row][col].date; + var end = addDays(start, 1); + return { start: start, end: end }; + }; + return Table; + })(DateComponent); + function isSegAllDay(seg) { + return seg.eventRange.def.allDay; + } + + var DayTableSlicer = /** @class */ (function (_super) { + __extends(DayTableSlicer, _super); + function DayTableSlicer() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.forceDayIfListItem = true; + return _this; + } + DayTableSlicer.prototype.sliceRange = function (dateRange, dayTableModel) { + return dayTableModel.sliceRange(dateRange); + }; + return DayTableSlicer; + })(Slicer); + + var DayTable = /** @class */ (function (_super) { + __extends(DayTable, _super); + function DayTable() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.slicer = new DayTableSlicer(); + _this.tableRef = createRef(); + return _this; + } + DayTable.prototype.render = function () { + var _a = this, + props = _a.props, + context = _a.context; + return createElement( + Table, + __assign( + { ref: this.tableRef }, + this.slicer.sliceProps( + props, + props.dateProfile, + props.nextDayThreshold, + context, + props.dayTableModel + ), + { + dateProfile: props.dateProfile, + cells: props.dayTableModel.cells, + colGroupNode: props.colGroupNode, + tableMinWidth: props.tableMinWidth, + renderRowIntro: props.renderRowIntro, + dayMaxEvents: props.dayMaxEvents, + dayMaxEventRows: props.dayMaxEventRows, + showWeekNumbers: props.showWeekNumbers, + expandRows: props.expandRows, + headerAlignElRef: props.headerAlignElRef, + clientWidth: props.clientWidth, + clientHeight: props.clientHeight, + forPrint: props.forPrint, + } + ) + ); + }; + return DayTable; + })(DateComponent); + + var DayTableView = /** @class */ (function (_super) { + __extends(DayTableView, _super); + function DayTableView() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.buildDayTableModel = memoize(buildDayTableModel); + _this.headerRef = createRef(); + _this.tableRef = createRef(); + return _this; + } + DayTableView.prototype.render = function () { + var _this = this; + var _a = this.context, + options = _a.options, + dateProfileGenerator = _a.dateProfileGenerator; + var props = this.props; + var dayTableModel = this.buildDayTableModel( + props.dateProfile, + dateProfileGenerator + ); + var headerContent = + options.dayHeaders && + createElement(DayHeader, { + ref: this.headerRef, + dateProfile: props.dateProfile, + dates: dayTableModel.headerDates, + datesRepDistinctDays: dayTableModel.rowCnt === 1, + }); + var bodyContent = function (contentArg) { + return createElement(DayTable, { + ref: _this.tableRef, + dateProfile: props.dateProfile, + dayTableModel: dayTableModel, + businessHours: props.businessHours, + dateSelection: props.dateSelection, + eventStore: props.eventStore, + eventUiBases: props.eventUiBases, + eventSelection: props.eventSelection, + eventDrag: props.eventDrag, + eventResize: props.eventResize, + nextDayThreshold: options.nextDayThreshold, + colGroupNode: contentArg.tableColGroupNode, + tableMinWidth: contentArg.tableMinWidth, + dayMaxEvents: options.dayMaxEvents, + dayMaxEventRows: options.dayMaxEventRows, + showWeekNumbers: options.weekNumbers, + expandRows: !props.isHeightAuto, + headerAlignElRef: _this.headerElRef, + clientWidth: contentArg.clientWidth, + clientHeight: contentArg.clientHeight, + forPrint: props.forPrint, + }); + }; + return options.dayMinWidth + ? this.renderHScrollLayout( + headerContent, + bodyContent, + dayTableModel.colCnt, + options.dayMinWidth + ) + : this.renderSimpleLayout(headerContent, bodyContent); + }; + return DayTableView; + })(TableView); + function buildDayTableModel(dateProfile, dateProfileGenerator) { + var daySeries = new DaySeriesModel( + dateProfile.renderRange, + dateProfileGenerator + ); + return new DayTableModel( + daySeries, + /year|month|week/.test(dateProfile.currentRangeUnit) + ); + } + + var TableDateProfileGenerator = /** @class */ (function (_super) { + __extends(TableDateProfileGenerator, _super); + function TableDateProfileGenerator() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + // Computes the date range that will be rendered. + TableDateProfileGenerator.prototype.buildRenderRange = function ( + currentRange, + currentRangeUnit, + isRangeAllDay + ) { + var dateEnv = this.props.dateEnv; + var renderRange = _super.prototype.buildRenderRange.call( + this, + currentRange, + currentRangeUnit, + isRangeAllDay + ); + var start = renderRange.start; + var end = renderRange.end; + var endOfWeek; + // year and month views should be aligned with weeks. this is already done for week + if (/^(year|month)$/.test(currentRangeUnit)) { + start = dateEnv.startOfWeek(start); + // make end-of-week if not already + endOfWeek = dateEnv.startOfWeek(end); + if (endOfWeek.valueOf() !== end.valueOf()) { + end = addWeeks(endOfWeek, 1); + } + } + // ensure 6 weeks + if (this.props.monthMode && this.props.fixedWeekCount) { + var rowCnt = Math.ceil( + // could be partial weeks due to hiddenDays + diffWeeks(start, end) + ); + end = addWeeks(end, 6 - rowCnt); + } + return { start: start, end: end }; + }; + return TableDateProfileGenerator; + })(DateProfileGenerator); + + var dayGridPlugin = createPlugin({ + initialView: "dayGridMonth", + views: { + dayGrid: { + component: DayTableView, + dateProfileGeneratorClass: TableDateProfileGenerator, + }, + dayGridDay: { + type: "dayGrid", + duration: { days: 1 }, + }, + dayGridWeek: { + type: "dayGrid", + duration: { weeks: 1 }, + }, + dayGridMonth: { + type: "dayGrid", + duration: { months: 1 }, + monthMode: true, + fixedWeekCount: true, + }, + }, + }); + + var AllDaySplitter = /** @class */ (function (_super) { + __extends(AllDaySplitter, _super); + function AllDaySplitter() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + AllDaySplitter.prototype.getKeyInfo = function () { + return { + allDay: {}, + timed: {}, + }; + }; + AllDaySplitter.prototype.getKeysForDateSpan = function (dateSpan) { + if (dateSpan.allDay) { + return ["allDay"]; + } + return ["timed"]; + }; + AllDaySplitter.prototype.getKeysForEventDef = function (eventDef) { + if (!eventDef.allDay) { + return ["timed"]; + } + if (hasBgRendering(eventDef)) { + return ["timed", "allDay"]; + } + return ["allDay"]; + }; + return AllDaySplitter; + })(Splitter); + + var DEFAULT_SLAT_LABEL_FORMAT = createFormatter({ + hour: "numeric", + minute: "2-digit", + omitZeroMinute: true, + meridiem: "short", + }); + function TimeColsAxisCell(props) { + var classNames = [ + "fc-timegrid-slot", + "fc-timegrid-slot-label", + props.isLabeled ? "fc-scrollgrid-shrink" : "fc-timegrid-slot-minor", + ]; + return createElement(ViewContextType.Consumer, null, function (context) { + if (!props.isLabeled) { + return createElement("td", { + className: classNames.join(" "), + "data-time": props.isoTimeStr, + }); + } + var dateEnv = context.dateEnv, + options = context.options, + viewApi = context.viewApi; + var labelFormat = // TODO: fully pre-parse + options.slotLabelFormat == null + ? DEFAULT_SLAT_LABEL_FORMAT + : Array.isArray(options.slotLabelFormat) + ? createFormatter(options.slotLabelFormat[0]) + : createFormatter(options.slotLabelFormat); + var hookProps = { + level: 0, + time: props.time, + date: dateEnv.toDate(props.date), + view: viewApi, + text: dateEnv.format(props.date, labelFormat), + }; + return createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.slotLabelClassNames, + content: options.slotLabelContent, + defaultContent: renderInnerContent$1, + didMount: options.slotLabelDidMount, + willUnmount: options.slotLabelWillUnmount, + }, + function (rootElRef, customClassNames, innerElRef, innerContent) { + return createElement( + "td", + { + ref: rootElRef, + className: classNames.concat(customClassNames).join(" "), + "data-time": props.isoTimeStr, + }, + createElement( + "div", + { + className: + "fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame", + }, + createElement( + "div", + { + className: + "fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion", + ref: innerElRef, + }, + innerContent + ) + ) + ); + } + ); + }); + } + function renderInnerContent$1(props) { + return props.text; + } + + var TimeBodyAxis = /** @class */ (function (_super) { + __extends(TimeBodyAxis, _super); + function TimeBodyAxis() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + TimeBodyAxis.prototype.render = function () { + return this.props.slatMetas.map(function (slatMeta) { + return createElement( + "tr", + { key: slatMeta.key }, + createElement(TimeColsAxisCell, __assign({}, slatMeta)) + ); + }); + }; + return TimeBodyAxis; + })(BaseComponent); + + var DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: "short" }); + var AUTO_ALL_DAY_MAX_EVENT_ROWS = 5; + var TimeColsView = /** @class */ (function (_super) { + __extends(TimeColsView, _super); + function TimeColsView() { + var _this = (_super !== null && _super.apply(this, arguments)) || this; + _this.allDaySplitter = new AllDaySplitter(); // for use by subclasses + _this.headerElRef = createRef(); + _this.rootElRef = createRef(); + _this.scrollerElRef = createRef(); + _this.state = { + slatCoords: null, + }; + _this.handleScrollTopRequest = function (scrollTop) { + var scrollerEl = _this.scrollerElRef.current; + if (scrollerEl) { + // TODO: not sure how this could ever be null. weirdness with the reducer + scrollerEl.scrollTop = scrollTop; + } + }; + /* Header Render Methods + ------------------------------------------------------------------------------------------------------------------*/ + _this.renderHeadAxis = function (rowKey, frameHeight) { + if (frameHeight === void 0) { + frameHeight = ""; + } + var options = _this.context.options; + var dateProfile = _this.props.dateProfile; + var range = dateProfile.renderRange; + var dayCnt = diffDays(range.start, range.end); + var navLinkAttrs = + dayCnt === 1 // only do in day views (to avoid doing in week views that dont need it) + ? buildNavLinkAttrs(_this.context, range.start, "week") + : {}; + if (options.weekNumbers && rowKey === "day") { + return createElement( + WeekNumberRoot, + { date: range.start, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, + function (rootElRef, classNames, innerElRef, innerContent) { + return createElement( + "th", + { + ref: rootElRef, + "aria-hidden": true, + className: ["fc-timegrid-axis", "fc-scrollgrid-shrink"] + .concat(classNames) + .join(" "), + }, + createElement( + "div", + { + className: + "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid", + style: { height: frameHeight }, + }, + createElement( + "a", + __assign( + { + ref: innerElRef, + className: + "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner", + }, + navLinkAttrs + ), + innerContent + ) + ) + ); + } + ); + } + return createElement( + "th", + { "aria-hidden": true, className: "fc-timegrid-axis" }, + createElement("div", { + className: "fc-timegrid-axis-frame", + style: { height: frameHeight }, + }) + ); + }; + /* Table Component Render Methods + ------------------------------------------------------------------------------------------------------------------*/ + // only a one-way height sync. we don't send the axis inner-content height to the DayGrid, + // but DayGrid still needs to have classNames on inner elements in order to measure. + _this.renderTableRowAxis = function (rowHeight) { + var _a = _this.context, + options = _a.options, + viewApi = _a.viewApi; + var hookProps = { + text: options.allDayText, + view: viewApi, + }; + return ( + // TODO: make reusable hook. used in list view too + createElement( + RenderHook, + { + hookProps: hookProps, + classNames: options.allDayClassNames, + content: options.allDayContent, + defaultContent: renderAllDayInner$1, + didMount: options.allDayDidMount, + willUnmount: options.allDayWillUnmount, + }, + function (rootElRef, classNames, innerElRef, innerContent) { + return createElement( + "td", + { + ref: rootElRef, + "aria-hidden": true, + className: ["fc-timegrid-axis", "fc-scrollgrid-shrink"] + .concat(classNames) + .join(" "), + }, + createElement( + "div", + { + className: + "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame" + + (rowHeight == null + ? " fc-timegrid-axis-frame-liquid" + : ""), + style: { height: rowHeight }, + }, + createElement( + "span", + { + className: + "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner", + ref: innerElRef, + }, + innerContent + ) + ) + ); + } + ) + ); + }; + _this.handleSlatCoords = function (slatCoords) { + _this.setState({ slatCoords: slatCoords }); + }; + return _this; + } + // rendering + // ---------------------------------------------------------------------------------------------------- + TimeColsView.prototype.renderSimpleLayout = function ( + headerRowContent, + allDayContent, + timeContent + ) { + var _a = this, + context = _a.context, + props = _a.props; + var sections = []; + var stickyHeaderDates = getStickyHeaderDates(context.options); + if (headerRowContent) { + sections.push({ + type: "header", + key: "header", + isSticky: stickyHeaderDates, + chunk: { + elRef: this.headerElRef, + tableClassName: "fc-col-header", + rowContent: headerRowContent, + }, + }); + } + if (allDayContent) { + sections.push({ + type: "body", + key: "all-day", + chunk: { content: allDayContent }, + }); + sections.push({ + type: "body", + key: "all-day-divider", + // TODO: rename to cellContent so don't need to define
",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),Gr}var eo={defs:{},instances:{}},to=function(){function e(){this.getKeysForEventDefs=qt(this._getKeysForEventDefs),this.splitDateSelection=qt(this._splitDateSpan),this.splitEventStore=qt(this._splitEventStore),this.splitIndividualUi=qt(this._splitIndividualUi),this.splitEventDrag=qt(this._splitInteraction),this.splitEventResize=qt(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=bt(n,(function(e,n){return t.eventUiBuilders[n]||qt(no)})),n){var d=n[c],p=a[c]||eo,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:o[c]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],d.ui,i[c]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);nn:!!t&&e>=t.end)}}function oo(e,t){var n=["fc-day","fc-day-"+Qe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}var io=ln({year:"numeric",month:"long",day:"numeric"}),ao=ln({week:"long"});function so(e,t,n,o){void 0===n&&(n="day"),void 0===o&&(o=!0);var i=e.dateEnv,a=e.options,s=e.calendarApi,l=i.format(t,"week"===n?ao:io);if(a.navLinks){var u=i.toDate(t),c=function(e){var r="day"===n?a.navLinkDayClick:"week"===n?a.navLinkWeekClick:null;"function"==typeof r?r.call(s,i.toDate(t),e):("string"==typeof r&&(n=r),s.zoomTo(t,n))};return r({title:Xe(a.navLinkHint,[l,u],l),"data-navlink":""},o?He(c):{onClick:c})}return{"aria-label":l}}var lo,uo=null;function co(){return null===uo&&(uo=function(){var e=document.createElement("div");we(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="
",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Ee(e),t}()),uo}function po(){return lo||(lo=function(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=fo(e);return document.body.removeChild(e),t}()),lo}function fo(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function ho(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=fo(e),l=s.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:s.x-i-a,scrollbarLeft:0,scrollbarRight:0};return co()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function vo(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():go(e),o=ho(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function go(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function mo(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function yo(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var Eo=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=c.end?new Date(c.end.valueOf()-1):u),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),d.showNonCurrentDates||(s=jn(s,o.range)),s=jn(s=this.adjustActiveRange(s),r),l=qn(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=Vt(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Nt({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(Lt(o)<0&&(a=lt(a),a=n.add(a,o)),Lt(i)>1&&(s=tt(s=lt(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,u=s.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Ut(c)e.fetchRange.end}(e,t,n)})),t,!1,n)}function pi(e,t,n,r,o){var i={};for(var a in e){var s=e[a];t[a]?i[a]=fi(s,n,r,o):i[a]=s}return i}function fi(e,t,n,o){var i=o.options,a=o.calendarApi,s=o.pluginHooks.eventSourceDefs[e.sourceDefId],l=Le();return s.fetch({eventSource:e,range:t,isRefetch:n,context:o},(function(n){var r=n.rawEvents;i.eventSourceSuccess&&(r=i.eventSourceSuccess.call(a,r,n.xhr)||r),e.success&&(r=e.success.call(a,r,n.xhr)||r),o.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:l,fetchRange:t,rawEvents:r})}),(function(n){console.warn(n.message,n),i.eventSourceFailure&&i.eventSourceFailure.call(a,n),e.failure&&e.failure(n),o.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:l,fetchRange:t,error:n})})),r(r({},e),{isFetching:!0,latestFetchId:l})}function hi(e,t){return St(e,(function(e){return vi(e,t)}))}function vi(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function gi(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,i){if(t&&n===t.latestFetchId){var a=En(function(e,t,n){var r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;o&&(e=mi(e,o));r&&(e=mi(e,r));return e}(o,t,i),t,i);return r&&(a=xt(a,r,i)),Cn(yi(e,t.sourceId),a)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=xt(t,n,r));return Cn(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Cn(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?xt(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,o={},i={};for(var a in n)t.defs[a]||(o[a]=n[a]);for(var s in r)!t.instances[s]&&o[r[s].defId]&&(i[s]=r[s]);return{defs:o,instances:i}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return yi(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return wn(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function mi(e,t){var n;if(t){n=[];for(var r=0,o=e;r=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function Ti(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function ki(e,t){for(var n=Ct(t.getCurrentData().eventSources),r=[],o=0,i=e;o1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var Ni=function(){function e(e){var t=this;this.computeOptionsData=qt(this._computeOptionsData),this.computeCurrentViewData=qt(this._computeCurrentViewData),this.organizeRawLocales=qt(Fr),this.buildLocale=qt(Br),this.buildPluginHooks=jo(),this.buildDateEnv=qt(Hi),this.buildTheme=qt(Oi),this.parseToolbars=qt(Ci),this.buildViewSpecs=qt(oi),this.buildDateProfileGenerator=Yt(Ai),this.buildViewApi=qt(Li),this.buildViewUiProps=Yt(Vi),this.buildEventUiBySource=qt(Ui,wt),this.buildEventUiBases=qt(Wi),this.parseContextBusinessHours=Yt(Bi),this.buildTitle=qt(Pi),this.emitter=new Eo,this.actionRunner=new Ii(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},o=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=o.calendarOptions.initialView||o.pluginHooks.initialView,a=this.computeCurrentViewData(i,o,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(a.options);var s,l,u,c=(s=o.calendarOptions,l=o.dateEnv,null!=(u=s.initialDate)?l.createMarker(u):Tr(s.now,l)),d=a.dateProfileGenerator.build(c);Zn(d.activeRange,c)||(c=d.currentRange.start);for(var p={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,h=o.pluginHooks.contextInit;fs.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:a.end}},i)),r?(n.push.apply(n,o([{index:e.index,thickness:e.thickness,span:$i(s,a)}],i)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Ji(r,t.level,t.levelCoord),Ji(n,t.level,[e])):Ji(n[t.level],t.lateral,e),this.stackCnts[Zi(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,o=t.strictOrder,i=t.stackCnts,a=n.length,s=0,l=-1,u=-1,c=null,d=0,p=0;p=s+e.thickness)break;for(var h=r[p],v=void 0,g=Qi(h,e.span.start,Yi),m=g[0]+g[1];(v=h[m])&&v.span.starts&&(s=y,c=v,l=p,u=m),y===s&&(d=Math.max(d,i[Zi(v)]+1)),m+=1}}var E=0;if(c)for(E=l+1;En(e[o-1]))return[o,0];for(;ra))return[i,1];r=i+1}}return[r,0]}var ea=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function ta(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function na(e){var t;return(t={})[e.component.uid]=e,t}var ra={},oa=function(){function e(e,t){this.emitter=new Eo}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),ia={},aa={startTime:Nt,duration:Nt,create:Boolean,sourceId:String};function sa(e){var t=mn(e,aa),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var la=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return _o.apply(void 0,o(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],i=!0,a=0,s=e;a1){var m=i&&n.getClass("buttonGroup")||"";return _o.apply(void 0,o(["div",{className:m}],r))}return r[0]},t}(Uo),ua=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,o=n.extraClassName,i=!1,a=r.sectionWidgets,s=a.center;return a.left?(i=!0,e=a.left):e=a.start,a.right?(i=!0,t=a.right):t=a.end,_o("div",{className:[o||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return _o(la,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(Uo),ca=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,Fo(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",_o("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Uo),da=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=Jn(t);if(i&&r.isValidSegDownEl(e.target)){var a=Se(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new xr(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=Ie(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(ea),pa=function(e){function t(t){var n,r,o,i,a,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){Jn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,r=".fc-event",o=s.handleSegEnter,i=s.handleSegLeave,Ie(n,"mouseover",r,(function(e,t){if(t!==a){a=t,o(e,t);var n=function(e){a=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=Jn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new xr(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(ea),fa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=qt(Ao),t.buildViewPropTransformers=qt(va),t.buildToolbarProps=qt(ha),t.headerRef=ko(),t.footerRef=ko(),t.interactionsStore={},t.state={viewLabelId:xe()},t.registerInteractiveComponent=function(e,n){var r=ta(e,n),o=[da,pa].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,ra[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,o=n;r10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var ya="fc-col-header-cell";function Ea(e){return e.text}var Sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,o=e.theme,i=e.viewApi,a=this.props,s=a.date,l=a.dateProfile,u=ro(s,a.todayRange,null,l),c=[ya].concat(oo(u,o)),d=t.format(s,a.dayHeaderFormat),p=!u.isDisabled&&a.colCnt>1?so(this.context,s):{},f=r(r(r({date:t.toDate(s),view:i},a.extraHookProps),{text:d}),u);return _o(Yo,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:Ea,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,o){return _o("th",r({ref:e,role:"columnheader",className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:Bt(s),colSpan:a.colSpan},a.extraDataAttrs),_o("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&_o("a",r({ref:n,className:["fc-col-header-cell-cushion",a.isSticky?"fc-sticky":""].join(" ")},p),o)))}))},t}(Uo),ba=ln({weekday:"long"}),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,o=t.theme,i=t.viewApi,a=t.options,s=tt(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[ya].concat(oo(l,o),e.extraClassNames||[]),c=n.format(s,e.dayHeaderFormat),d=r(r(r(r({date:s},l),{view:i}),e.extraHookProps),{text:c});return _o(Yo,{hookProps:d,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Ea,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(t,o,i,a){return _o("th",r({ref:t,role:"columnheader",className:u.concat(o).join(" "),colSpan:e.colSpan},e.extraDataAttrs),_o("div",{className:"fc-scrollgrid-sync-inner"},_o("a",{"aria-label":n.format(s,ba),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},a)))}))},t}(Uo),Ca=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Tr(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=nt(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,Nt(1,e.unit)),i=o.valueOf()-n.valueOf();return i=Math.min(864e5,i),{currentState:{nowDate:r,todayRange:wa(r)},nextState:{nowDate:o,todayRange:wa(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Oo,t}(Ro);function wa(e){var t=lt(e);return{start:t,end:tt(t,1)}}var Ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=qt(_a),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return _o(Ca,{unit:"day"},(function(e,t){return _o("tr",{role:"row"},i&&i("day"),n.map((function(e){return o?_o(Sa,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):_o(Da,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(Uo);function _a(e,t,n){return e||ma(t,n)}var Ta=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),ka=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;nt)return!0}return!1},t.prototype.needsYScrolling=function(){if(Wa.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;rt)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return Wa.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Wa.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Uo),Fa=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):(o[n]-=1,o[n]||(delete i[n],delete t.callbackMap[n],a=!0)),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return kt(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Ct(this.currentMap)},e}();function Ba(e){for(var t=0,n=0,r=De(e,".fc-scrollgrid-shrink");n=0&&e=0&&tt.eventRange.range.end?e:t}var Cs=function(e){function t(t,n){void 0===n&&(n={});var o=e.call(this)||this;return o.isRendering=!1,o.isRendered=!1,o.currentClassNames=[],o.customContentRenderId=0,o.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":o.renderRunner.tryDrain()}},o.handleData=function(e){o.currentData=e,o.renderRunner.request(e.calendarOptions.rerenderDelay)},o.handleRenderRequest=function(){if(o.isRendering){o.isRendered=!0;var e=o.currentData;Po((function(){To(_o(ga,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,a){return o.setClassNames(t),o.setHeight(n),_o(Zo.Provider,{value:o.customContentRenderId},_o(fa,r({isHeightAuto:i,forPrint:a},e)))})),o.el)}))}else o.isRendered&&(o.isRendered=!1,No(o.el),o.setClassNames([]),o.setHeight(""))},o.el=t,o.renderRunner=new Mi(o.handleRenderRequest),new Ni({optionOverrides:n,calendarApi:o,onAction:o.handleAction,onData:o.handleData}),o}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){var t=this;Po((function(){e.prototype.updateSize.call(t)}))},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!Gt(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Ns()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"top",distance:c}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),u<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(e){return this.queryScrollEls(e).map((function(e){return e===window?new Ps(!1):new Is(e,!1)}))},e.prototype.queryScrollEls=function(e){for(var t=[],n=0,r=this.scrollQuery;n=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,Fe(document.body),ze(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new Ts(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new xs,r.autoScroller=new Hs,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(oa),As=function(){function e(e){this.origRect=go(e),this.scrollCaches=mo(e).map((function(e){return new Is(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&c=0&&do.layer)&&(v.componentId=i,v.context=a.context,v.rect.left+=l,v.rect.right+=l,v.rect.top+=u,v.rect.bottom+=u,o=v)}}}return o},e}();function Us(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&fr(e.dateSpan,t.dateSpan)}function Ws(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.datePointTransforms;ar.start)return{endDelta:s};return null}(a,e,r.subjectEl.classList.contains("fc-event-resizer-start"),s.range)));l&&(u=Sr(i,o.getCurrentData().eventUiBases,l,o),d.mutatedEvents=u,Ia(d,e.dateProfile,o)||(c=!0,l=null,u=null,d.mutatedEvents=null)),u?o.dispatch({type:"SET_EVENT_RESIZE",state:d}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),c?Ue():We(),t||(l&&Us(a,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=u)},n.handleDragEnd=function(e){var t=n.component.context,o=n.eventRange.def,i=n.eventRange.instance,a=new xr(t,o,i),s=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:a,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new xr(t,l.defs[o.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:a,event:u,relatedEvents:Ir(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:s})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Nt(0),endDelta:n.validMutation.endDelta||Nt(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var o=t.component,i=n.dragging=new Os(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=o.context.options.dragScroll;var a=n.hitDragging=new Ls(n.dragging,na(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return Se(e.subjectEl,".fc-event")},t}(ea);var js=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=_e(e.origEvent);t.matchesCancel=!!Se(r,n),t.matchesEvent=!!Se(r,Bs.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}o.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new Ts(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Gs={fixedMirrorParent:yn},qs={dateClick:yn,eventDragStart:yn,eventDragStop:yn,eventDrop:yn,eventResizeStart:yn,eventResizeStop:yn,eventResize:yn,drop:yn,eventReceive:yn,eventLeave:yn},Ys=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,o){var i=n.hitDragging.dragging,a=null,s=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(a=e.context,n.canDropElOnCalendar(o.subjectEl,a)&&(s=function(e,t,n){for(var o=r({},t.leftoverProps),i=0,a=n.pluginHooks.externalDefTransforms;i1,S=y.span.start===s;d+=y.levelCoord-c,c=y.levelCoord+y.thickness,E?(d+=y.thickness,S&&v.push({seg:hl(h,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):S&&(v.push({seg:hl(h,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:d}),d=0)}o.push(u),i.push(v),a.push(d)}return{singleColPlacements:o,multiColPlacements:i,leftoverMargins:a}}(s.toRects(),e,a),h=f.singleColPlacements,v=f.multiColPlacements,g=f.leftoverMargins,m=[],y=[],E=0,S=u;E1,showWeekNumbers:t.showWeekNumbers,todayRange:h,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:s[f],eventSelection:t.eventSelection,bgEventSegs:l[f].filter(yl),fgEventSegs:u[f],dateSelectionSegs:c[f],eventDrag:d[f],eventResize:p[f],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new So(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new So(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,o=this.rowPositions,i=n.leftToIndex(e),a=o.topToIndex(t);if(null!=a&&null!=i){var s=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:r({range:this.getCellRange(a,i),allDay:!0},s.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:o.tops[a],bottom:o.bottoms[a]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:tt(n,1)}},t}(Bo);function yl(e){return e.eventRange.def.allDay}var El=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(xa),Sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new El,t.tableRef=ko(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return _o(ml,r({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(Bo),bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=qt(Dl),t.headerRef=ko(),t.tableRef=ko(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&_o(Ra,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return _o(Sl,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(Js);function Dl(e,t){var n=new Ta(e.renderRange,t);return new ka(n,/year|month|week/.test(e.currentRangeUnit))}var Cl=zo({initialView:"dayGridMonth",views:{dayGrid:{component:bl,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=et(o,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=et(l,6-Math.ceil(rt(s,l))));return{start:s,end:l}},t}(ai)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),wl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?Kn(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(to),Rl=ln({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function _l(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return _o(Oo.Consumer,null,(function(n){if(!e.isLabeled)return _o("td",{className:t.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,o=n.options,i=n.viewApi,a=null==o.slotLabelFormat?Rl:Array.isArray(o.slotLabelFormat)?ln(o.slotLabelFormat[0]):ln(o.slotLabelFormat),s={level:0,time:e.time,date:r.toDate(e.date),view:i,text:r.format(e.date,a)};return _o(Yo,{hookProps:s,classNames:o.slotLabelClassNames,content:o.slotLabelContent,defaultContent:Tl,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},(function(n,r,o,i){return _o("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},_o("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},_o("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:o},i)))}))}))}function Tl(e){return e.text}var kl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return _o("tr",{key:e.key},_o(_l,r({},e)))}))},t}(Uo),xl=ln({week:"short"}),Ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new wl,t.headerElRef=ko(),t.rootElRef=ko(),t.scrollerElRef=ko(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e,n){void 0===n&&(n="");var o=t.context.options,i=t.props.dateProfile.renderRange,a=1===ot(i.start,i.end)?so(t.context,i.start,"week"):{};return o.weekNumbers&&"day"===e?_o(fs,{date:i.start,defaultFormat:xl},(function(e,t,o,i){return _o("th",{ref:e,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(t).join(" ")},_o("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},_o("a",r({ref:o,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},a),i)))})):_o("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},_o("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,o=n.viewApi,i={text:r.allDayText,view:o};return _o(Yo,{hookProps:i,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Il,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,o){return _o("td",{ref:t,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},_o("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},_o("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,o=this.props,i=[],a=Qa(r.options);return e&&i.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(i.push({type:"body",key:"all-day",chunk:{content:t}}),i.push({type:"body",key:"all-day-divider",outerContent:_o("tr",{role:"presentation",className:"fc-scrollgrid-section"},_o("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),i.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),_o(ti,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return _o("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},_o(ts,{liquid:!o.isHeightAuto&&!o.forPrint,collapsibleWidth:o.forPrint,cols:[{width:"shrink"}],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,o,i,a){var s=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Qa(u.options),p=!c.forPrint&&es(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return _o("tr",{role:"presentation"},s.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return _o("tr",{role:"presentation"},s.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:_o("tr",{role:"presentation",className:"fc-scrollgrid-section"},_o("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var h=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return _o("div",{className:"fc-timegrid-axis-chunk"},_o("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,_o("tbody",null,_o(kl,{slatMetas:i}))),_o("div",{className:"fc-timegrid-now-indicator-container"},_o(Ca,{unit:h?"minute":"day"},(function(e){var t=h&&a&&a.safeComputeTop(e);return"number"==typeof t?_o(is,{isAxis:!0,date:e},(function(e,n,r,o){return _o("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},o)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),p&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ja},{key:"cols",content:Ja}]}),_o(ti,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return _o("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},_o(l,{liquid:!c.isHeightAuto&&!c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:o}]}],sections:f}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(Bo);function Il(e){return e.text}var Pl=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(Zn(t.currentRange,e)){var n=lt(e),r=e.valueOf()-n.valueOf();if(r>=Ut(t.slotMinTime)&&r0,E=Boolean(l)&&l.span.end-l.span.start=0;t-=1)if(null!==(r=Wt(n=Nt(ru[t]),e))&&r>1)return n;return e}(r),u=[];Ut(a)0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return _o(Yo,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:hu,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return _o("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},_o("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,o=n.theme,i=n.options,a=this.state,s=a.timeHeaderId,l=a.eventHeaderId,u=a.dateHeaderIdRoot,c=function(e){var t,n,r=[];for(t=0;t+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="
",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==n.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(t,"load",i),e}var n=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],o)):t.docReady=o(t.eventie)}(this),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function o(t){function o(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=r(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var h=n.isBorderBox=!(!p||!o[p]||"border-box"!==o[p]),f=0,d=s.length;d>f;f++){var l=s[f],c=o[l];c=a(t,c);var y=parseFloat(c);n[l]=isNaN(y)?0:y}var m=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,_=n.marginTop+n.marginBottom,I=n.borderLeftWidth+n.borderRightWidth,L=n.borderTopWidth+n.borderBottomWidth,z=h&&u,S=e(o.width);S!==!1&&(n.width=S+(z?0:m+I));var b=e(o.height);return b!==!1&&(n.height=b+(z?0:g+L)),n.innerWidth=n.width-(m+I),n.innerHeight=n.height-(g+L),n.outerWidth=n.width+v,n.outerHeight=n.height+_,n}}function a(t,e){if(n||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,s&&(r.left=s),e}var u,p=t("boxSizing");return function(){if(p){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[p]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var o=r(t);u=200===e(o.width),i.removeChild(t)}}(),o}var n=t.getComputedStyle,r=n?function(t){return n(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t,e){function i(t,e){return t[a](e)}function o(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){o(t);for(var i=t.parentNode.querySelectorAll(e),n=0,r=i.length;r>n;n++)if(i[n]===t)return!0;return!1}function r(t,e){return o(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,o=t.length;o>i;i++){var n=t[i],r=n+"MatchesSelector";if(e[r])return r}}();if(a){var u=document.createElement("div"),p=i(u,"div");s=p?i:r}else s=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],l=["transform","transition","transitionDuration","transitionProperty"],c=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=c[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=l(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,l,c,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!d(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(d(s))if(e){c(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=l(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):d(o)&&(i=o),this[t]=i?l(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=l(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=l(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize(),delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,d=i[s],l=d.getAttribute(n);try{f=l&&JSON.parse(l)}catch(c){u&&u.error("Error parsing "+n+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+c);continue}var y=new o(d,f);p&&p.data(d,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,d="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},l=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0},e.prototype._getItemLayoutPosition=function(t){t.getSize(),0!==this.x&&t.size.outerWidth+this.x>this.isotope.size.innerWidth&&(this.x=0,this.y=this.maxY);var e={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=t.size.outerWidth,e},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var d=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=u,d.LayoutMode=h,d.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},d.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},d.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},d.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},d.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},d.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},d.prototype._init=d.prototype.arrange,d.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},d.prototype._filter=function(t){function e(){f.reveal(n),f.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var p=t[a];if(!p.isIgnored){var h=s(p);h&&o.push(p),h&&p.isHidden?n.push(p):h||p.isHidden||r.push(p)}}var f=this;return this._isInstant?this._noTransition(e):e(),o},d.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},d.prototype.updateSortData=function(t){this._getSorters(),t=o(t); +var e=this.getItems(t);e=e.length?e:this.items,this._updateItemsSortData(e)},d.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},d.prototype._updateItemsSortData=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=d.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},d.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},d.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},d.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},d.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},d.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},d.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},d.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var c=d.prototype.remove;return d.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(c.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},d.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},d.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},d}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window); \ No newline at end of file diff --git a/public/js/jquery-migrate-3.3.2.min.js b/public/js/jquery-migrate-3.3.2.min.js new file mode 100644 index 00000000..39c90e88 --- /dev/null +++ b/public/js/jquery-migrate-3.3.2.min.js @@ -0,0 +1,2 @@ +/*! jQuery Migrate v3.3.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.2",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); \ No newline at end of file diff --git a/public/js/jquery-validate.js b/public/js/jquery-validate.js new file mode 100644 index 00000000..cbaf5109 --- /dev/null +++ b/public/js/jquery-validate.js @@ -0,0 +1,2 @@ +/*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation +* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"Warning: No message defined for "+e.name+"")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery); \ No newline at end of file diff --git a/public/js/jquery-waypoints.js b/public/js/jquery-waypoints.js new file mode 100644 index 00000000..8281ad7f --- /dev/null +++ b/public/js/jquery-waypoints.js @@ -0,0 +1,8 @@ +// Generated by CoffeeScript 1.6.2 +/* +jQuery Waypoints - v2.0.4 +Copyright (c) 2011-2014 Caleb Troughton +Dual licensed under the MIT license and GPL license. +https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt +*/ +(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;c={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};this.element[u]=this.id;c[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||a)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(a&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete c[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=this.element[w])!=null?o:[];i.push(this.id);this.element[w]=i}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=t[w];if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=c[i[0][u]];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke.call(this,"disable")},enable:function(){return d._invoke.call(this,"enable")},destroy:function(){return d._invoke.call(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=c[n(t)[0][u]];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); \ No newline at end of file diff --git a/public/js/jquery.easing.js b/public/js/jquery.easing.js new file mode 100644 index 00000000..cf82e6d4 --- /dev/null +++ b/public/js/jquery.easing.js @@ -0,0 +1,4 @@ +jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a \t\t\t\t\t\t
 
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\tExpand \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tnext \t\t\t\t\t\t\t\t\t\t\tprevious \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\tPrevious \t\t\t\t\t\t\t\t\t\t\t\t

0/0

\t\t\t\t\t\t\t\t\t\t\t\tNext \t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t

\t\t\t\t\t\t\t\t\t\t\t
{pp_social}
\t\t\t\t\t\t\t\t\t\t\tClose \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
\t\t\t\t\t
', + gallery_markup: + '', + image_markup: '', + flash_markup: + '', + quicktime_markup: + '', + iframe_markup: + '', + inline_markup: '
{content}
', + custom_markup: "", + social_tools: + '', + }); + function getHashtag() { + var url = location.href; + return ( + (hashtag = + -1 !== url.indexOf("#prettyPhoto") && + decodeURI(url.substring(url.indexOf("#prettyPhoto") + 1, url.length))), + (hashtag = hashtag && hashtag.replace(/<|>/g, "")), + hashtag + ); + } + function getParam(name, results) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(results); + return null == results ? "" : results[1]; + } + $.fn.prettyPhoto = function (pp_settings) { + pp_settings = jQuery.extend({}, options, pp_settings); + var pp_dimensions, + pp_open, + pp_contentHeight, + pp_contentWidth, + pp_containerHeight, + pp_containerWidth, + pp_slideshow, + matchedObjects = this, + percentBased = !1, + windowHeight = $(window).height(), + windowWidth = $(window).width(); + function _showContent() { + $(".pp_loaderIcon").hide(), + (projectedTop = + scroll_pos.scrollTop + + (windowHeight / 2 - pp_dimensions.containerHeight / 2)), + projectedTop < 0 && (projectedTop = 0), + $ppt.fadeTo(settings.animation_speed, 1), + $pp_pic_holder.find(".pp_content").animate( + { + height: pp_dimensions.contentHeight, + width: pp_dimensions.contentWidth, + }, + settings.animation_speed + ), + $pp_pic_holder.animate( + { + top: projectedTop, + left: + windowWidth / 2 - pp_dimensions.containerWidth / 2 < 0 + ? 0 + : windowWidth / 2 - pp_dimensions.containerWidth / 2, + width: pp_dimensions.containerWidth, + }, + settings.animation_speed, + function () { + $pp_pic_holder + .find(".pp_hoverContainer,#fullResImage") + .height(pp_dimensions.height) + .width(pp_dimensions.width), + $pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed), + isSet && "image" == _getFileType(pp_images[set_position]) + ? $pp_pic_holder.find(".pp_hoverContainer").show() + : $pp_pic_holder.find(".pp_hoverContainer").hide(), + settings.allow_expand && + (pp_dimensions.resized + ? $("a.pp_expand,a.pp_contract").show() + : $("a.pp_expand").hide()), + !settings.autoplay_slideshow || + pp_slideshow || + pp_open || + $.prettyPhoto.startSlideshow(), + settings.changepicturecallback(), + (pp_open = !0); + } + ), + isSet && + settings.overlay_gallery && + "image" == _getFileType(pp_images[set_position]) + ? ((itemWidth = 57), + (navWidth = + "facebook" == settings.theme || "pp_default" == settings.theme + ? 50 + : 30), + (itemsPerPage = Math.floor( + (pp_dimensions.containerWidth - 100 - navWidth) / itemWidth + )), + (itemsPerPage = + itemsPerPage < pp_images.length + ? itemsPerPage + : pp_images.length), + (totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1), + 0 == totalPage + ? ((navWidth = 0), + $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()) + : $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(), + (galleryWidth = itemsPerPage * itemWidth), + (fullGalleryWidth = pp_images.length * itemWidth), + $pp_gallery + .css("margin-left", -(galleryWidth / 2 + navWidth / 2)) + .find("div:first") + .width(galleryWidth + 5) + .find("ul") + .width(fullGalleryWidth) + .find("li.selected") + .removeClass("selected"), + (goToPage = + Math.floor(set_position / itemsPerPage) < totalPage + ? Math.floor(set_position / itemsPerPage) + : totalPage), + $.prettyPhoto.changeGalleryPage(goToPage), + $pp_gallery_li + .filter(":eq(" + set_position + ")") + .addClass("selected")) + : $pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave"), + pp_settings.ajaxcallback(); + } + function _hideContent(callback) { + $pp_pic_holder + .find("#pp_full_res object,#pp_full_res embed") + .css("visibility", "hidden"), + $pp_pic_holder + .find(".pp_fade") + .fadeOut(settings.animation_speed, function () { + $(".pp_loaderIcon").show(), callback(); + }); + } + function _fitToViewport(width, height) { + if ( + ((resized = !1), + _getDimensions(width, height), + (imageWidth = width), + (imageHeight = height), + (windowWidth < pp_containerWidth || + windowHeight < pp_containerHeight) && + doresize && + settings.allow_resize && + !percentBased) + ) { + for (resized = !0, fitting = !1; !fitting; ) + windowWidth < pp_containerWidth + ? ((imageWidth = windowWidth - 200), + (imageHeight = (height / width) * imageWidth)) + : windowHeight < pp_containerHeight + ? ((imageHeight = windowHeight - 200), + (imageWidth = (width / height) * imageHeight)) + : (fitting = !0), + (pp_containerHeight = imageHeight), + (pp_containerWidth = imageWidth); + (windowWidth < pp_containerWidth || + windowHeight < pp_containerHeight) && + _fitToViewport(pp_containerWidth, pp_containerHeight), + _getDimensions(imageWidth, imageHeight); + } + return { + width: Math.floor(imageWidth), + height: Math.floor(imageHeight), + containerHeight: Math.floor(pp_containerHeight), + containerWidth: + Math.floor(pp_containerWidth) + 2 * settings.horizontal_padding, + contentHeight: Math.floor(pp_contentHeight), + contentWidth: Math.floor(pp_contentWidth), + resized: resized, + }; + } + function _getDimensions(width, height) { + (width = parseFloat(width)), + (height = parseFloat(height)), + ($pp_details = $pp_pic_holder.find(".pp_details")), + $pp_details.width(width), + (detailsHeight = + parseFloat($pp_details.css("marginTop")) + + parseFloat($pp_details.css("marginBottom"))), + ($pp_details = $pp_details + .clone() + .addClass(settings.theme) + .width(width) + .appendTo($("body")) + .css({ position: "absolute", top: -1e4 })), + (detailsHeight += $pp_details.height()), + (detailsHeight = detailsHeight <= 34 ? 36 : detailsHeight), + $pp_details.remove(), + ($pp_title = $pp_pic_holder.find(".ppt")), + $pp_title.width(width), + (titleHeight = + parseFloat($pp_title.css("marginTop")) + + parseFloat($pp_title.css("marginBottom"))), + ($pp_title = $pp_title + .clone() + .appendTo($("body")) + .css({ position: "absolute", top: -1e4 })), + (titleHeight += $pp_title.height()), + $pp_title.remove(), + (pp_contentHeight = height + detailsHeight), + (pp_contentWidth = width), + (pp_containerHeight = + pp_contentHeight + + titleHeight + + $pp_pic_holder.find(".pp_top").height() + + $pp_pic_holder.find(".pp_bottom").height()), + (pp_containerWidth = width); + } + function _getFileType(itemSrc) { + return itemSrc.match(/youtube\.com\/watch/i) || + itemSrc.match(/youtu\.be/i) + ? "youtube" + : itemSrc.match(/vimeo\.com/i) + ? "vimeo" + : itemSrc.match(/\b.mov\b/i) + ? "quicktime" + : itemSrc.match(/\b.swf\b/i) + ? "flash" + : itemSrc.match(/\biframe=true\b/i) + ? "iframe" + : itemSrc.match(/\bajax=true\b/i) + ? "ajax" + : itemSrc.match(/\bcustom=true\b/i) + ? "custom" + : "#" == itemSrc.substr(0, 1) + ? "inline" + : "image"; + } + function _center_overlay() { + doresize && + "undefined" != typeof $pp_pic_holder && + ((scroll_pos = _get_scroll()), + (contentHeight = $pp_pic_holder.height()), + (contentwidth = $pp_pic_holder.width()), + (projectedTop = + windowHeight / 2 + scroll_pos.scrollTop - contentHeight / 2), + projectedTop < 0 && (projectedTop = 0), + contentHeight > windowHeight || + $pp_pic_holder.css({ + top: projectedTop, + left: windowWidth / 2 + scroll_pos.scrollLeft - contentwidth / 2, + })); + } + function _get_scroll() { + return self.pageYOffset + ? { scrollTop: self.pageYOffset, scrollLeft: self.pageXOffset } + : document.documentElement && document.documentElement.scrollTop + ? { + scrollTop: document.documentElement.scrollTop, + scrollLeft: document.documentElement.scrollLeft, + } + : document.body + ? { + scrollTop: document.body.scrollTop, + scrollLeft: document.body.scrollLeft, + } + : void 0; + } + function _build_overlay() { + if ( + (settings.social_tools && + (facebook_like_link = settings.social_tools.replace( + "{location_href}", + encodeURIComponent(location.href) + )), + (settings.markup = settings.markup.replace("{pp_social}", "")), + $("body").append(settings.markup), + ($pp_pic_holder = $(".pp_pic_holder")), + ($ppt = $(".ppt")), + ($pp_overlay = $("div.pp_overlay")), + $pp_pic_holder.toggleClass("is-single", pp_images.length <= 1), + isSet && settings.overlay_gallery) + ) { + (currentGalleryPage = 0), (toInject = ""); + for (var i = 0; i < pp_images.length; i++) + (img_src = pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi) + ? ((classname = ""), pp_images[i]) + : ((classname = "default"), "")), + (toInject += + "
  • "); + (toInject = settings.gallery_markup.replace(/{gallery}/g, toInject)), + $pp_pic_holder.find("#pp_full_res").after(toInject), + ($pp_gallery = $(".pp_pic_holder .pp_gallery")), + ($pp_gallery_li = $pp_gallery.find("li")), + $pp_gallery.find(".pp_arrow_next").on("click", function () { + return ( + $.prettyPhoto.changeGalleryPage("next"), + $.prettyPhoto.stopSlideshow(), + !1 + ); + }), + $pp_gallery.find(".pp_arrow_previous").on("click", function () { + return ( + $.prettyPhoto.changeGalleryPage("previous"), + $.prettyPhoto.stopSlideshow(), + !1 + ); + }), + $pp_pic_holder.find(".pp_content").hover( + function () { + $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn(); + }, + function () { + $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut(); + } + ), + (itemWidth = 57), + $pp_gallery_li.each(function (i) { + $(this) + .find("a") + .on("click", function () { + return ( + $.prettyPhoto.changePage(i), $.prettyPhoto.stopSlideshow(), !1 + ); + }); + }); + } + settings.slideshow && + ($pp_pic_holder + .find(".pp_nav") + .prepend('Play'), + $pp_pic_holder.find(".pp_nav .pp_play").on("click", function () { + return $.prettyPhoto.startSlideshow(), !1; + })), + $pp_pic_holder.addClass("pp_pic_holder " + settings.theme), + $pp_overlay + .css({ + opacity: 0, + height: $(document).height(), + width: $(window).width(), + }) + .bind("click", function () { + settings.modal || $.prettyPhoto.close(); + }), + $("a.pp_close").bind("click", function (e) { + return ( + e && e.preventDefault && e.preventDefault(), + $.prettyPhoto.close(), + !1 + ); + }), + settings.allow_expand && + $("a.pp_expand").bind("click", function (e) { + return ( + (doresize = $(this).hasClass("pp_expand") + ? ($(this).removeClass("pp_expand").addClass("pp_contract"), !1) + : ($(this).removeClass("pp_contract").addClass("pp_expand"), + !0)), + _hideContent(function () { + $.prettyPhoto.open(); + }), + !1 + ); + }), + $pp_pic_holder + .find(".pp_previous, .pp_nav .pp_arrow_previous") + .bind("click", function () { + return ( + $.prettyPhoto.changePage("previous"), + $.prettyPhoto.stopSlideshow(), + !1 + ); + }), + $pp_pic_holder + .find(".pp_next, .pp_nav .pp_arrow_next") + .bind("click", function () { + return ( + $.prettyPhoto.changePage("next"), + $.prettyPhoto.stopSlideshow(), + !1 + ); + }), + _center_overlay(); + } + return ( + (doresize = !0), + (scroll_pos = _get_scroll()), + $(window) + .unbind("resize.prettyphoto") + .bind("resize.prettyphoto", function () { + _center_overlay(), + (windowHeight = $(window).height()), + (windowWidth = $(window).width()), + "undefined" != typeof $pp_overlay && + $pp_overlay.height($(document).height()).width(windowWidth); + }), + pp_settings.keyboard_shortcuts && + $(document) + .unbind("keydown.prettyphoto") + .bind("keydown.prettyphoto", function (e) { + if ( + "undefined" != typeof $pp_pic_holder && + $pp_pic_holder.is(":visible") + ) + switch (e.keyCode) { + case 37: + $.prettyPhoto.changePage("previous"), e.preventDefault(); + break; + case 39: + $.prettyPhoto.changePage("next"), e.preventDefault(); + break; + case 27: + settings.modal || $.prettyPhoto.close(), e.preventDefault(); + } + }), + ($.prettyPhoto.initialize = function () { + return ( + (settings = pp_settings), + "pp_default" == settings.theme && (settings.horizontal_padding = 16), + (theRel = $(this).attr(settings.hook)), + (galleryRegExp = /\[(?:.*)\]/), + (isSet = !!galleryRegExp.exec(theRel)), + (pp_images = isSet + ? jQuery.map(matchedObjects, function (n, i) { + if (-1 != $(n).attr(settings.hook).indexOf(theRel)) + return $(n).attr("href"); + }) + : $.makeArray($(this).attr("href"))), + (pp_titles = isSet + ? jQuery.map(matchedObjects, function (n, i) { + if (-1 != $(n).attr(settings.hook).indexOf(theRel)) + return $(n).find("img").attr("alt") + ? $(n).find("img").attr("alt") + : ""; + }) + : $.makeArray($(this).find("img").attr("alt"))), + (pp_descriptions = isSet + ? jQuery.map(matchedObjects, function (n, i) { + if (-1 != $(n).attr(settings.hook).indexOf(theRel)) + return $(n).attr("title") ? $(n).attr("title") : ""; + }) + : $.makeArray($(this).attr("title"))), + pp_images.length > settings.overlay_gallery_max && + (settings.overlay_gallery = !1), + (set_position = jQuery.inArray($(this).attr("href"), pp_images)), + (rel_index = isSet + ? set_position + : $("a[" + settings.hook + "^='" + theRel + "']").index($(this))), + _build_overlay(), + settings.allow_resize && + $(window).bind("scroll.prettyphoto", function () { + _center_overlay(); + }), + $.prettyPhoto.open(), + !1 + ); + }), + ($.prettyPhoto.open = function (event) { + return ( + "undefined" == typeof settings && + ((settings = pp_settings), + (pp_images = $.makeArray(event)), + (pp_titles = arguments[1] + ? $.makeArray(arguments[1]) + : $.makeArray("")), + (pp_descriptions = arguments[2] + ? $.makeArray(arguments[2]) + : $.makeArray("")), + (isSet = 1 < pp_images.length), + (set_position = arguments[3] || 0), + _build_overlay(event.target)), + settings.hideflash && + $("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css( + "visibility", + "hidden" + ), + 1 < $(pp_images).size() ? $(".pp_nav").show() : $(".pp_nav").hide(), + $(".pp_loaderIcon").show(), + !settings.deeplinking || + ("undefined" != typeof theRel && + (location.hash = theRel + "/" + rel_index + "/")), + settings.social_tools && + ((facebook_like_link = settings.social_tools.replace( + "{location_href}", + encodeURIComponent(location.href) + )), + $pp_pic_holder.find(".pp_social").html(facebook_like_link)), + $ppt.is(":hidden") && $ppt.css("opacity", 0).show(), + $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity), + $pp_pic_holder + .find(".currentTextHolder") + .text( + set_position + + 1 + + settings.counter_separator_label + + $(pp_images).size() + ), + void 0 !== pp_descriptions[set_position] && + "" != pp_descriptions[set_position] + ? $pp_pic_holder + .find(".pp_description") + .show() + .html(unescape(pp_descriptions[set_position])) + : $pp_pic_holder.find(".pp_description").hide(), + (movie_width = parseFloat(getParam("width", pp_images[set_position])) + ? getParam("width", pp_images[set_position]) + : settings.default_width.toString()), + (movie_height = parseFloat( + getParam("height", pp_images[set_position]) + ) + ? getParam("height", pp_images[set_position]) + : settings.default_height.toString()), + (percentBased = !1), + -1 != movie_height.indexOf("%") && + ((movie_height = parseFloat( + ($(window).height() * parseFloat(movie_height)) / 100 - 150 + )), + (percentBased = !0)), + -1 != movie_width.indexOf("%") && + ((movie_width = parseFloat( + ($(window).width() * parseFloat(movie_width)) / 100 - 150 + )), + (percentBased = !0)), + $pp_pic_holder.fadeIn(function () { + switch ( + (settings.show_title && + "" != pp_titles[set_position] && + void 0 !== pp_titles[set_position] + ? $ppt.html(unescape(pp_titles[set_position])) + : $ppt.html(" "), + (imgPreloader = ""), + (skipInjection = !1), + _getFileType(pp_images[set_position])) + ) { + case "image": + (imgPreloader = new Image()), + (nextImage = new Image()), + isSet && + set_position < $(pp_images).size() - 1 && + (nextImage.src = pp_images[set_position + 1]), + (prevImage = new Image()), + isSet && + pp_images[set_position - 1] && + (prevImage.src = pp_images[set_position - 1]), + ($pp_pic_holder.find("#pp_full_res")[0].innerHTML = + settings.image_markup.replace( + /{path}/g, + pp_images[set_position] + )), + (imgPreloader.onload = function () { + (pp_dimensions = _fitToViewport( + imgPreloader.width, + imgPreloader.height + )), + _showContent(); + }), + (imgPreloader.onerror = function () { + alert( + "Image cannot be loaded. Make sure the path is correct and image exist." + ), + $.prettyPhoto.close(); + }), + (imgPreloader.src = pp_images[set_position]); + break; + case "youtube": + (pp_dimensions = _fitToViewport(movie_width, movie_height)), + (movie_id = getParam("v", pp_images[set_position])), + "" == movie_id && + ((movie_id = pp_images[set_position].split("youtu.be/")), + (movie_id = movie_id[1]), + 0 < movie_id.indexOf("?") && + (movie_id = movie_id.substr(0, movie_id.indexOf("?"))), + 0 < movie_id.indexOf("&") && + (movie_id = movie_id.substr(0, movie_id.indexOf("&")))), + (movie = "https://www.youtube.com/embed/" + movie_id), + getParam("rel", pp_images[set_position]) + ? (movie += + "?rel=" + getParam("rel", pp_images[set_position])) + : (movie += "?rel=1"), + settings.autoplay && (movie += "&autoplay=1"), + (toInject = settings.iframe_markup + .replace(/{width}/g, pp_dimensions.width) + .replace(/{height}/g, pp_dimensions.height) + .replace(/{wmode}/g, settings.wmode) + .replace(/{path}/g, movie)); + break; + case "vimeo": + (pp_dimensions = _fitToViewport(movie_width, movie_height)), + (movie_id = pp_images[set_position]); + var match = movie_id.match( + /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/ + ); + (movie = + "https://player.vimeo.com/video/" + + match[3] + + "?title=0&byline=0&portrait=0"), + settings.autoplay && (movie += "&autoplay=1;"), + (vimeo_width = + pp_dimensions.width + + "/embed/?moog_width=" + + pp_dimensions.width), + (toInject = settings.iframe_markup + .replace(/{width}/g, vimeo_width) + .replace(/{height}/g, pp_dimensions.height) + .replace(/{path}/g, movie)); + break; + case "quicktime": + ((pp_dimensions = _fitToViewport( + movie_width, + movie_height + )).height += 15), + (pp_dimensions.contentHeight += 15), + (pp_dimensions.containerHeight += 15), + (toInject = settings.quicktime_markup + .replace(/{width}/g, pp_dimensions.width) + .replace(/{height}/g, pp_dimensions.height) + .replace(/{wmode}/g, settings.wmode) + .replace(/{path}/g, pp_images[set_position]) + .replace(/{autoplay}/g, settings.autoplay)); + break; + case "flash": + (pp_dimensions = _fitToViewport(movie_width, movie_height)), + (flash_vars = pp_images[set_position]), + (flash_vars = flash_vars.substring( + pp_images[set_position].indexOf("flashvars") + 10, + pp_images[set_position].length + )), + (filename = pp_images[set_position]), + (filename = filename.substring(0, filename.indexOf("?"))), + (toInject = settings.flash_markup + .replace(/{width}/g, pp_dimensions.width) + .replace(/{height}/g, pp_dimensions.height) + .replace(/{wmode}/g, settings.wmode) + .replace(/{path}/g, filename + "?" + flash_vars)); + break; + case "iframe": + (pp_dimensions = _fitToViewport(movie_width, movie_height)), + (frame_url = pp_images[set_position]), + (frame_url = frame_url.substr( + 0, + frame_url.indexOf("iframe") - 1 + )), + (toInject = settings.iframe_markup + .replace(/{width}/g, pp_dimensions.width) + .replace(/{height}/g, pp_dimensions.height) + .replace(/{path}/g, frame_url)); + break; + case "ajax": + (doresize = !1), + (pp_dimensions = _fitToViewport(movie_width, movie_height)), + (doresize = !0), + (skipInjection = !0), + $.get(pp_images[set_position], function (responseHTML) { + (toInject = settings.inline_markup.replace( + /{content}/g, + responseHTML + )), + ($pp_pic_holder.find("#pp_full_res")[0].innerHTML = + toInject), + _showContent(); + }); + break; + case "custom": + (pp_dimensions = _fitToViewport(movie_width, movie_height)), + (toInject = settings.custom_markup); + break; + case "inline": + (myClone = $(pp_images[set_position]) + .clone() + .append('
    ') + .css({ width: settings.default_width }) + .wrapInner( + '
    ' + ) + .appendTo($("body")) + .show()), + (doresize = !1), + (pp_dimensions = _fitToViewport( + $(myClone).width(), + $(myClone).height() + )), + (doresize = !0), + $(myClone).remove(), + (toInject = settings.inline_markup.replace( + /{content}/g, + $(pp_images[set_position]).html() + )); + } + imgPreloader || + skipInjection || + (($pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject), + _showContent()); + }), + !1 + ); + }), + ($.prettyPhoto.changePage = function (direction) { + (currentGalleryPage = 0), + "previous" == direction + ? (set_position--, + set_position < 0 && (set_position = $(pp_images).size() - 1)) + : "next" == direction + ? (set_position++, + set_position > $(pp_images).size() - 1 && (set_position = 0)) + : (set_position = direction), + (rel_index = set_position), + (doresize = doresize || !0), + settings.allow_expand && + $(".pp_contract").removeClass("pp_contract").addClass("pp_expand"), + _hideContent(function () { + $.prettyPhoto.open(); + }); + }), + ($.prettyPhoto.changeGalleryPage = function (direction) { + "next" == direction + ? (currentGalleryPage++, + currentGalleryPage > totalPage && (currentGalleryPage = 0)) + : "previous" == direction + ? (currentGalleryPage--, + currentGalleryPage < 0 && (currentGalleryPage = totalPage)) + : (currentGalleryPage = direction), + (slide_speed = + "next" == direction || "previous" == direction + ? settings.animation_speed + : 0), + (slide_to = currentGalleryPage * (itemsPerPage * itemWidth)), + $pp_gallery.find("ul").animate({ left: -slide_to }, slide_speed); + }), + ($.prettyPhoto.startSlideshow = function () { + void 0 === pp_slideshow + ? ($pp_pic_holder + .find(".pp_play") + .off("click") + .removeClass("pp_play") + .addClass("pp_pause") + .on("click", function () { + return $.prettyPhoto.stopSlideshow(), !1; + }), + (pp_slideshow = setInterval( + $.prettyPhoto.startSlideshow, + settings.slideshow + ))) + : $.prettyPhoto.changePage("next"); + }), + ($.prettyPhoto.stopSlideshow = function () { + $pp_pic_holder + .find(".pp_pause") + .off("click") + .removeClass("pp_pause") + .addClass("pp_play") + .on("click", function () { + return $.prettyPhoto.startSlideshow(), !1; + }), + clearInterval(pp_slideshow), + (pp_slideshow = void 0); + }), + ($.prettyPhoto.close = function () { + $pp_overlay.is(":animated") || + ($.prettyPhoto.stopSlideshow(), + $pp_pic_holder + .stop() + .find("object,embed") + .css("visibility", "hidden"), + $("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut( + settings.animation_speed, + function () { + $(this).remove(); + } + ), + $pp_overlay.fadeOut(settings.animation_speed, function () { + settings.hideflash && + $("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css( + "visibility", + "visible" + ), + $(this).remove(), + $(window).unbind("scroll.prettyphoto"), + -1 !== location.href.indexOf("#prettyPhoto") && + (location.hash = "prettyPhoto"), + settings.callback(), + (doresize = !0), + (pp_open = !1), + delete settings; + })); + }), + !pp_alreadyInitialized && + getHashtag() && + ((pp_alreadyInitialized = !0), + (hashIndex = getHashtag()), + (hashRel = hashIndex), + (hashIndex = hashIndex.substring( + hashIndex.indexOf("/") + 1, + hashIndex.length - 1 + )), + (hashRel = hashRel.substring(0, hashRel.indexOf("/"))), + setTimeout(function () { + $( + "a[" + + pp_settings.hook + + "^='" + + hashRel + + "']:eq(" + + hashIndex + + ")" + ).trigger("click"); + }, 50)), + this.unbind("click.prettyphoto").bind( + "click.prettyphoto", + $.prettyPhoto.initialize + ) + ); + }; +})(jQuery); +var pp_alreadyInitialized = !1; diff --git a/public/js/main.js b/public/js/main.js new file mode 100644 index 00000000..2b3178b0 --- /dev/null +++ b/public/js/main.js @@ -0,0 +1,504 @@ +/** =============== + + .. Preloader + .. header--search + .. Fixed-header + .. Menu + .. Number rotator + .. Skillbar + .. Tab + .. Accordion + .. Isotope + .. Prettyphoto + .. Slick_slider + .. Back to top + + =============== */ + +jQuery(function ($) { + "use strict"; + + /*------------------------------------------------------------------------------*/ + /* Preloader +/*------------------------------------------------------------------------------*/ + // makes sure the whole site is loaded + $(window).on("load", function () { + $(".loader-blob").fadeOut(), + $("#preloader") + .delay(300) + .fadeOut("slow", function () { + $(this).remove(); + }); + }); + + /*------------------------------------------------------------------------------*/ + /* header--search +/*------------------------------------------------------------------------------*/ + + $(".header--search").each(function () { + $(".search_btn", this).on("click", function (e) { + e.preventDefault(); + e.stopPropagation(); + + $(".header--search_content").toggleClass("on"); + + if ($(".header--search a").hasClass("open")) { + $(".header--search a i").removeClass("ti-close").addClass("ti-search"); + + $(this).removeClass("open").addClass("sclose"); + } else { + $(".header--search a").removeClass("sclose").addClass("open"); + + $(".header--search a i").removeClass("ti-search").addClass("ti-close"); + } + }); + }); + + /*------------------------------------------------------------------------------*/ + /* Fixed-header +/*------------------------------------------------------------------------------*/ + + $(window).on("scroll", function () { + if (matchMedia("only screen and (min-width: 1200px)").matches) { + if ($(window).scrollTop() >= 50) { + $(".ct-stickable-header").addClass("fixed-header"); + } else { + $(".ct-stickable-header").removeClass("fixed-header"); + } + } + }); + + /*------------------------------------------------------------------------------*/ + /* Menu +/*------------------------------------------------------------------------------*/ + + var menu = { + initialize: function () { + this.Menuhover(); + }, + + Menuhover: function () { + var getNav = $("nav.main-menu"), + getWindow = $(window).width(), + getHeight = $(window).height(), + getIn = getNav.find("ul.menu").data("in"), + getOut = getNav.find("ul.menu").data("out"); + + if (matchMedia("only screen and (max-width: 1200px)").matches) { + // Enable click event + $("nav.main-menu ul.menu").each(function () { + // Dropdown Fade Toggle + $("a.mega-menu-link", this).on("click", function (e) { + e.preventDefault(); + var t = $(this); + t.toggleClass("active").next("ul").toggleClass("active"); + }); + + // Megamenu style + $(".megamenu-fw", this).each(function () { + $(".col-menu", this).each(function () { + $(".title", this).off("click"); + $(".title", this).on("click", function () { + $(this) + .closest(".col-menu") + .find(".content") + .stop() + .toggleClass("active"); + $(this).closest(".col-menu").toggleClass("active"); + return false; + e.preventDefault(); + }); + }); + }); + }); + } + }, + }; + + $(".btn-show-menu-mobile").on("click", function (e) { + $(this).toggleClass("is-active"); + $(".menu-mobile").toggleClass("show"); + return false; + e.preventDefault(); + }); + + // Initialize + $(document).ready(function () { + menu.initialize(); + }); + + var $bannerSlider = jQuery(".banner-slider"); + var $bannerFirstSlide = $("div.slide:first-child"); + + $bannerSlider.on("init", function (e, slick) { + var $firstAnimatingElements = $bannerFirstSlide.find("[data-animation]"); + slideanimate($firstAnimatingElements); + }); + $bannerSlider.on( + "beforeChange", + function (e, slick, currentSlide, nextSlide) { + var $animatingElements = $( + 'div.slick-slide[data-slick-index="' + nextSlide + '"]' + ).find("[data-animation]"); + slideanimate($animatingElements); + } + ); + $bannerSlider.slick({ + slidesToShow: 1, + slidesToScroll: 1, + arrows: true, + fade: true, + dots: false, + swipe: true, + adaptiveHeight: true, + responsive: [ + { + breakpoint: 1200, + settings: { + arrows: false, + }, + }, + { + breakpoint: 767, + settings: { + slidesToShow: 1, + slidesToScroll: 1, + arrows: false, + autoplay: false, + autoplaySpeed: 4000, + swipe: true, + }, + }, + ], + }); + + function slideanimate(elements) { + var animationEndEvents = + "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend"; + elements.each(function () { + var $this = $(this); + var $animationDelay = $this.data("delay"); + var $animationType = "animated " + $this.data("animation"); + $this.css({ + "animation-delay": $animationDelay, + "-webkit-animation-delay": $animationDelay, + }); + + $this.addClass($animationType).one(animationEndEvents, function () { + $this.removeClass($animationType); + }); + }); + } + + /*------------------------------------------------------------------------------*/ + /* Animation on scroll: Number rotator +/*------------------------------------------------------------------------------*/ + + $("[data-appear-animation]").each(function () { + var self = $(this); + var animation = self.data("appear-animation"); + var delay = self.data("appear-animation-delay") + ? self.data("appear-animation-delay") + : 0; + + if ($(window).width() > 959) { + self.html("0"); + self.waypoint( + function (direction) { + if (!self.hasClass("completed")) { + var from = self.data("from"); + var to = self.data("to"); + var interval = self.data("interval"); + self.numinate({ + format: "%counter%", + from: from, + to: to, + runningInterval: 2000, + stepUnit: interval, + onComplete: function (elem) { + self.addClass("completed"); + }, + }); + } + }, + { offset: "85%" } + ); + } else { + if (animation == "animateWidth") { + self.css("width", self.data("width")); + } + } + }); + + /*------------------------------------------------------------------------------*/ + /* Skillbar +/*------------------------------------------------------------------------------*/ + + $(".progress-bar--container").each(function () { + $(this).find(".progress-bar").width(0); + }); + + $(".progress-bar--container").each(function () { + $(this) + .find(".progress-bar") + .animate( + { + width: $(this).attr("data-percent"), + }, + 2000 + ); + }); + + // Part of the code responsible for loading percentages: + + $(".progress-bar-percent[data-percentage]").each(function () { + var progress = $(this); + var percentage = Math.ceil($(this).attr("data-percentage")); + + $({ countNum: 0 }).animate( + { countNum: percentage }, + { + duration: 2000, + easing: "linear", + step: function () { + // What todo on every count + var pct = ""; + if (percentage === "0") { + pct = Math.floor(this.countNum) + "%"; + } else { + pct = Math.floor(this.countNum + 1) + "%"; + } + progress.text(pct); + }, + } + ); + }); + + /*------------------------------------------------------------------------------*/ + /* Tab +/*------------------------------------------------------------------------------*/ + + $(".ct-tabs > .tabs") + .children("li") + .on("click", function (e) { + var tab = $(this).closest(".ct-tabs > .tabs > .tab"), + index = $(this).closest(".ct-tabs > .tabs > li").index(); + + $(this) + .parents(".ct-tabs") + .children(".tabs") + .children("li.active ") + .removeClass("active"); + + $(this).addClass("active"); + $(this) + .addClass("active") + .parents(".ct-tabs") + .children(".content-tab") + .find(".content-inner") + .not(".content-inner:eq(" + index + ")") + .slideUp(); + $(this) + .addClass("active") + .parents(".ct-tabs") + .children(".content-tab") + .find(".content-inner:eq(" + index + ")") + .slideDown(); + + e.preventDefault(); + }); + + /*------------------------------------------------------------------------------*/ + /* Accordion +/*------------------------------------------------------------------------------*/ + + var allPanels = $(".accordion > .toggle").children(".toggle-content").hide(); + + $(".toggle-title").on("click", function (e) { + e.preventDefault(); + var $this = $(this); + $this + .parent() + .parent() + .find(".toggle .toggle-title a") + .removeClass("active"); + + if ($this.next().hasClass("show")) { + $this.next().removeClass("show"); + $this.next().slideUp("easeInExpo"); + } else { + $this + .parent() + .parent() + .find(".toggle .toggle-content") + .removeClass("show"); + $this + .parent() + .parent() + .find(".toggle .toggle-content") + .slideUp("easeInExpo"); + $this.next().toggleClass("show"); + $this.next().removeClass("show"); + $this.next().slideToggle("easeInExpo"); + $this.next().parent().children().children().addClass("active"); + } + }); + + /*------------------------------------------------------------------------------*/ + /* Isotope +/*------------------------------------------------------------------------------*/ + + $(function () { + if ($().isotope) { + var $container = $(".isotope-project"); + $container.imagesLoaded(function () { + $container.isotope({ + itemSelector: ".project_item", + transitionDuration: "1s", + layoutMode: "fitRows", + }); + }); + + $(".portfolio-filter li").on("click", function () { + var selector = $(this).find("a").attr("data-filter"); + $(".portfolio-filter li").removeClass("active"); + $(this).addClass("active"); + $container.isotope({ filter: selector }); + return false; + }); + } + }); + + /*------------------------------------------------------------------------------*/ + /* Prettyphoto +/*------------------------------------------------------------------------------*/ + $(function () { + // Normal link + jQuery( + 'a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"]' + ).each(function () { + if ( + jQuery(this).attr("target") != "_blank" && + !jQuery(this).hasClass("prettyphoto") + ) { + var attr = $(this).attr("rel"); + if ( + typeof attr !== typeof undefined && + attr !== false && + attr != "prettyPhoto" + ) { + jQuery(this).attr("data-rel", "prettyPhoto"); + } + } + }); + + jQuery('a[data-rel^="prettyPhoto"]').prettyPhoto(); + jQuery("a.base_prettyphoto").prettyPhoto(); + jQuery('a[rel^="prettyPhoto"]').prettyPhoto(); + }); + + /*------------------------------------------------------------------------------*/ + /* Slick_slider +/*------------------------------------------------------------------------------*/ + $(".slick-container").slick({ + speed: 1000, + infinite: true, + arrows: false, + dots: false, + autoplay: false, + centerMode: false, + + responsive: [ + { + breakpoint: 1360, + settings: { + slidesToShow: 3, + slidesToScroll: 3, + }, + }, + { + breakpoint: 1024, + settings: { + slidesToShow: 3, + slidesToScroll: 3, + }, + }, + { + breakpoint: 680, + settings: { + slidesToShow: 2, + slidesToScroll: 2, + }, + }, + { + breakpoint: 575, + settings: { + slidesToShow: 1, + slidesToScroll: 1, + }, + }, + ], + }); + + /* testimonials */ + var testinav = jQuery(".testimonials-nav", this); + var testiinfo = jQuery(".testimonials-info", this); + + jQuery(".testimonials-info", this).slick({ + slidesToShow: 1, + slidesToScroll: 1, + fade: false, + arrows: false, + asNavFor: testinav, + adaptiveHeight: true, + speed: 1700, + autoplay: false, + autoplaySpeed: 1700, + infinite: true, + }); + + jQuery(".testimonials-nav", this).slick({ + slidesToShow: 1, + slidesToScroll: 1, + asNavFor: testiinfo, + centerMode: true, + centerPadding: 0, + focusOnSelect: true, + autoplay: false, + autoplaySpeed: 1700, + speed: 1700, + arrows: false, + dots: false, + variableWidth: true, + infinite: true, + }); + + /*------------------------------------------------------------------------------*/ + /* Back to top +/*------------------------------------------------------------------------------*/ + + // ===== Scroll to Top ==== + jQuery("#totop").hide(); + + $(window).on("scroll", function () { + if (jQuery(this).scrollTop() >= 500) { + // If page is scrolled more than 50px + jQuery("#totop").fadeIn(200); // Fade in the arrow + jQuery("#totop").addClass("top-visible"); + } else { + jQuery("#totop").fadeOut(200); // Else fade out the arrow + jQuery("#totop").removeClass("top-visible"); + } + }); + + jQuery("#totop").on("click", function () { + // When arrow is clicked + jQuery("body,html").animate( + { + scrollTop: 0, // Scroll to top of body + }, + 500 + ); + return false; + }); +}); diff --git a/public/js/numinate.min.js b/public/js/numinate.min.js new file mode 100644 index 00000000..9d18a721 --- /dev/null +++ b/public/js/numinate.min.js @@ -0,0 +1,3 @@ +// Github repo: +// https://github.com/greenball/numinate +(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){"use strict";var t={from:0,to:0,runningInterval:null,stepInterval:null,stepCount:null,stepUnit:null,format:"%counter%","class":"numinate",precision:0,autoStart:true,autoRemove:false,onCreate:null,onStart:null,onStep:null,onStop:null,onComplete:null,onRemove:null};var n=function(e,t){if(!t.runningInterval&&!t.stepInterval){return window.console.error("No interval was provided.")}var n=Math.abs(t.from-t.to);if(!t.stepCount&&!t.stepUnit){return window.console.error("Provide either stepCount or stepUnit value.")}if(t.stepUnit&&t.stepCount){t.to=t.from+t.stepUnit*t.stepCount}if(!t.stepCount){t.stepCount=n/t.stepUnit}if(!t.stepUnit){t.stepUnit=n/t.stepCount}if(t.runningInterval){t.stepInterval=t.runningInterval/t.stepCount}if(n&&t.stepUnit>n){t.stepUnit=n;t.stepCount=1}if(t.stepInterval<10){var r=10/t.stepInterval;t.stepInterval*=r;t.stepUnit*=r;t.stepCount/=r}this.textBackup=e.text();this.element=e;this.options=t;this.stepper=null;this.current=t.from;this.finished=false;this.element.addClass(t.class);this.fire("onCreate");if(this.options.autoStart){this.start()}};n.prototype={constructor:n,fire:function(t){if(e.isFunction(this.options[t])){this.options[t](this.element,this.options,this.current)}},stop:function(){if(!this.stepper||this.finished){return}this.stepper=clearInterval(this.stepper);this.fire("onStop")},start:function(){if(this.stepper||this.finished){return}this.render();this.stepper=setInterval(e.proxy(this.step,this),this.options.stepInterval);this.fire("onStart")},step:function(){if(!(this.options.from+this.options.to)){this.current+=this.options.stepUnit}else if(this.options.fromthis.options.to){this.current-=this.options.stepUnit}if(this.options.fromthis.options.to){return this.completed()}}else if(this.options.from>this.options.to){if(this.currentPrevious',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i(' + +
    + diff --git a/resources/views/includes/social.blade.php b/resources/views/includes/social.blade.php new file mode 100644 index 00000000..7b5d4079 --- /dev/null +++ b/resources/views/includes/social.blade.php @@ -0,0 +1,11 @@ + diff --git a/resources/views/includes/sub-menu.blade.php b/resources/views/includes/sub-menu.blade.php new file mode 100644 index 00000000..dcbf42cb --- /dev/null +++ b/resources/views/includes/sub-menu.blade.php @@ -0,0 +1,12 @@ +
      + @foreach ($items as $item) +
    • + + {{ $item['label'] }} + + @if (isset($item['items']) && count($item['items'])) + @include('coderstm::includes.sub-menu', $item) + @endif +
    • + @endforeach +
    diff --git a/resources/views/pages.blade.php b/resources/views/pages.blade.php new file mode 100644 index 00000000..27c85c73 --- /dev/null +++ b/resources/views/pages.blade.php @@ -0,0 +1,37 @@ + + + + + + + + + + + {{ $meta_title ?? $title . ' | ' . config('app.name') }} + + + {{-- Disable Laravel Routes from Being Indexed on Google --}} + @if (config('app.env') == 'local') + + + @endif + + + + + + + + + + + + + +{!! $body ?? '' !!} + + diff --git a/resources/views/shortcodes/blog-tags.blade.php b/resources/views/shortcodes/blog-tags.blade.php new file mode 100644 index 00000000..1cf6e070 --- /dev/null +++ b/resources/views/shortcodes/blog-tags.blade.php @@ -0,0 +1,8 @@ + diff --git a/resources/views/shortcodes/blog.blade.php b/resources/views/shortcodes/blog.blade.php new file mode 100644 index 00000000..923da9fe --- /dev/null +++ b/resources/views/shortcodes/blog.blade.php @@ -0,0 +1,32 @@ +
    + +
    +
    + blog-img +
    +
    + +
    +
    + +

    {{ $blog->title }}

    +
    + {!! $blog->description !!} +
    +
    +
    +
    diff --git a/resources/views/shortcodes/blogs.blade.php b/resources/views/shortcodes/blogs.blade.php new file mode 100644 index 00000000..7a726a5b --- /dev/null +++ b/resources/views/shortcodes/blogs.blade.php @@ -0,0 +1,50 @@ +
    + @foreach ($blogs as $blog) +
    +
    +
    + {{ $blog->title }} +
    +
    +
    +
    + + + +
    +
    +

    {{ $blog->title }}

    +
    +
    +
    +

    {{ $blog->short_desc }}...

    +
    +
    + + READ MORE + +
    +
    +
    +
    + @endforeach + +
    + @if (!$blogs->count()) + + @else + {{ $blogs->links() }} + @endif +
    +
    diff --git a/resources/views/shortcodes/calendar.blade.php b/resources/views/shortcodes/calendar.blade.php new file mode 100644 index 00000000..2d9defe7 --- /dev/null +++ b/resources/views/shortcodes/calendar.blade.php @@ -0,0 +1,44 @@ +
    +
    +
    + diff --git a/resources/views/shortcodes/company-address.blade.php b/resources/views/shortcodes/company-address.blade.php new file mode 100644 index 00000000..a9c7a57d --- /dev/null +++ b/resources/views/shortcodes/company-address.blade.php @@ -0,0 +1,2 @@ + +{{ company_address() }} diff --git a/resources/views/shortcodes/contact-form.blade.php b/resources/views/shortcodes/contact-form.blade.php new file mode 100644 index 00000000..f849825c --- /dev/null +++ b/resources/views/shortcodes/contact-form.blade.php @@ -0,0 +1,68 @@ +
    + @csrf + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    diff --git a/resources/views/shortcodes/email.blade.php b/resources/views/shortcodes/email.blade.php new file mode 100644 index 00000000..22cdb8c1 --- /dev/null +++ b/resources/views/shortcodes/email.blade.php @@ -0,0 +1,2 @@ + +{{ config('app.email') }} diff --git a/resources/views/shortcodes/footers/default.blade.php b/resources/views/shortcodes/footers/default.blade.php new file mode 100644 index 00000000..b8b687e7 --- /dev/null +++ b/resources/views/shortcodes/footers/default.blade.php @@ -0,0 +1,64 @@ +
    +
    + + + +
    + diff --git a/resources/views/shortcodes/headers/classic.blade.php b/resources/views/shortcodes/headers/classic.blade.php new file mode 100644 index 00000000..49f2a971 --- /dev/null +++ b/resources/views/shortcodes/headers/classic.blade.php @@ -0,0 +1,52 @@ +
    +
    +
    +
      +
    • [phone]
    • +
    • [email]
    • +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    diff --git a/resources/views/shortcodes/headers/overlay.blade.php b/resources/views/shortcodes/headers/overlay.blade.php new file mode 100644 index 00000000..9c28c160 --- /dev/null +++ b/resources/views/shortcodes/headers/overlay.blade.php @@ -0,0 +1,40 @@ +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    diff --git a/resources/views/shortcodes/menu.blade.php b/resources/views/shortcodes/menu.blade.php new file mode 100644 index 00000000..571f25bc --- /dev/null +++ b/resources/views/shortcodes/menu.blade.php @@ -0,0 +1,10 @@ +
      + @foreach ($items as $item) +
    • + {{ $item['label'] }} + @if (isset($item['items']) && count($item['items'])) + @include('coderstm::includes.sub-menu', $item) + @endif +
    • + @endforeach +
    diff --git a/resources/views/shortcodes/opening-times.blade.php b/resources/views/shortcodes/opening-times.blade.php new file mode 100644 index 00000000..4b1c9196 --- /dev/null +++ b/resources/views/shortcodes/opening-times.blade.php @@ -0,0 +1,19 @@ +
    +
    +
    +
      + @foreach ($opening_times as $item) +
    • + {{ $item['name'] }} + @if ($item['is_today']) + (Today) + @endif + + {{ $item['open_at'] }} to {{ $item['close_at'] }} + +
    • + @endforeach +
    +
    +
    +
    diff --git a/resources/views/shortcodes/phone.blade.php b/resources/views/shortcodes/phone.blade.php new file mode 100644 index 00000000..bff46f9c --- /dev/null +++ b/resources/views/shortcodes/phone.blade.php @@ -0,0 +1,2 @@ + +{{ config('app.phone') }} diff --git a/resources/views/shortcodes/plans.blade.php b/resources/views/shortcodes/plans.blade.php new file mode 100644 index 00000000..6a382fd2 --- /dev/null +++ b/resources/views/shortcodes/plans.blade.php @@ -0,0 +1,31 @@ +
    +
    +
    +
    + Monthly + + Yearly + 20% discount +
    +
    +
    +
    + @foreach ($plans as $key => $plan) +
    + @include('coderstm::includes.pricing', $plan) +
    + @endforeach +
    +
    + diff --git a/resources/views/shortcodes/recent-blogs.blade.php b/resources/views/shortcodes/recent-blogs.blade.php new file mode 100644 index 00000000..c85eb1db --- /dev/null +++ b/resources/views/shortcodes/recent-blogs.blade.php @@ -0,0 +1,17 @@ + diff --git a/resources/views/shortcodes/socials.blade.php b/resources/views/shortcodes/socials.blade.php new file mode 100644 index 00000000..ffc89c7b --- /dev/null +++ b/resources/views/shortcodes/socials.blade.php @@ -0,0 +1,13 @@ + diff --git a/src/Commands/SubscriptionsInvoice.php b/src/Commands/SubscriptionsInvoice.php index 884008d5..517b1729 100644 --- a/src/Commands/SubscriptionsInvoice.php +++ b/src/Commands/SubscriptionsInvoice.php @@ -32,9 +32,7 @@ public function handle() Subscription::query()->whereRaw('LENGTH(stripe_id) = ?', [28])->each(function ($subscription) { try { foreach ($subscription->invoicesIncludingPending() as $invoice) { - Invoice::createFromStripe($invoice, [ - 'subscription_id' => $subscription->id - ]); + Invoice::createFromStripe($invoice, ['subscription_id' => $subscription->id]); } $this->info("[Subscription #{$subscription->id}]: Invoices has been synced!"); } catch (\Exception $ex) { diff --git a/src/Http/Controllers/ApplicationController.php b/src/Http/Controllers/ApplicationController.php index 3469c99e..f8d25699 100644 --- a/src/Http/Controllers/ApplicationController.php +++ b/src/Http/Controllers/ApplicationController.php @@ -4,12 +4,14 @@ use Coderstm\Coderstm; use Coderstm\Models\Task; +use Illuminate\Support\Str; use Coderstm\Mail\TestEmail; use Illuminate\Http\Request; use Coderstm\Models\AppSetting; use Coderstm\Models\PaymentMethod; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Mail; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\Config; use Coderstm\Http\Controllers\Controller; use Coderstm\Services\SubscriptionReports; @@ -105,4 +107,17 @@ public function testMailConfig(Request $request) 'message' => 'Test email sent successfully!' ], 200); } + + public function shortCode(Request $request) + { + $request->validate([ + 'content' => 'required|string', + ]); + + if (Str::startsWith($request->content, '[calendar')) { + return $request->content; + } + + return Blade::render($request->content); + } } diff --git a/src/Http/Controllers/BlogController.php b/src/Http/Controllers/BlogController.php index 7ab4a4ba..8a03ce75 100644 --- a/src/Http/Controllers/BlogController.php +++ b/src/Http/Controllers/BlogController.php @@ -43,10 +43,12 @@ public function store(Request $request, Blog $blog) $rules = [ 'title' => 'required', 'description' => 'required', + 'meta_keywords' => 'max:255', + 'meta_description' => 'max:255', // Images - 'media' => 'array', - 'media.*.id' => 'sometimes|required_unless:media.*.src,null|integer', - 'media.*.src' => 'required_if:media.*.id,null|string', + 'thumbnail' => 'array', + 'thumbnail.id' => 'sometimes|required_unless:thumbnail.src,null|integer', + 'thumbnail.src' => 'required_if:thumbnail.id,null|string', ]; // Validate those rules @@ -58,7 +60,7 @@ public function store(Request $request, Blog $blog) $this->saveRelated($request, $blog); return response()->json([ - 'data' => $blog->fresh(['media', 'thumbnail', 'tags', 'comments']), + 'data' => $blog->fresh(['thumbnail', 'tags', 'comments']), 'message' => 'Blog has been created successfully!', ], 200); } @@ -74,10 +76,12 @@ public function update(Request $request, Blog $blog) $rules = [ 'title' => 'required', 'description' => 'required', + 'meta_keywords' => 'max:255', + 'meta_description' => 'max:255', // Images - 'media' => 'array', - 'media.*.id' => 'sometimes|required_unless:media.*.src,null|integer', - 'media.*.src' => 'required_if:media.*.id,null|string', + 'thumbnail' => 'array', + 'thumbnail.id' => 'sometimes|required_unless:thumbnail.src,null|integer', + 'thumbnail.src' => 'required_if:thumbnail.id,null|string', ]; // Validate those rules @@ -89,7 +93,7 @@ public function update(Request $request, Blog $blog) $this->saveRelated($request, $blog); return response()->json([ - 'data' => $blog->fresh(['media', 'thumbnail', 'tags', 'comments']), + 'data' => $blog->fresh(['thumbnail', 'tags', 'comments']), 'message' => 'Blog has been updated successfully!', ], 200); } @@ -171,8 +175,12 @@ public function comments(Request $request, Blog $blog) protected function saveRelated(Request $request, Blog $blog) { // Update media - if ($request->filled('media')) { - $blog->syncMedia($request->input('media')); + if ($request->filled('thumbnail')) { + $blog->thumbnail()->sync([ + $request->input('thumbnail.id') => [ + 'type' => 'thumbnail' + ] + ]); } // Update tags diff --git a/src/Http/Controllers/FileController.php b/src/Http/Controllers/FileController.php index 1e493e56..6ca3106d 100644 --- a/src/Http/Controllers/FileController.php +++ b/src/Http/Controllers/FileController.php @@ -197,9 +197,9 @@ public function uploadFromSource(Request $request) try { $path = "files/" . md5($url) . ".png"; $media = Http::get($url); - Storage::disk('public')->put($path, $media); + Storage::disk('local')->put($path, $media); - $filePath = Storage::disk('public')->path($path); + $filePath = Storage::disk('local')->path($path); $file = new File(); $file->setHttpFile(new UploadedFile($filePath, $name)); diff --git a/src/Http/Controllers/Page/TemplateController.php b/src/Http/Controllers/Page/TemplateController.php new file mode 100644 index 00000000..abb58826 --- /dev/null +++ b/src/Http/Controllers/Page/TemplateController.php @@ -0,0 +1,109 @@ +authorizeResource(Template::class); + } + + /** + * Display a listing of the resource. + */ + public function index(Request $request, Template $template) + { + $template = $template->query(); + + if ($request->filled('filter')) { + $template->where('name', 'like', "%{$request->filter}%"); + } + + if ($request->rowsPerPage == -1) { + return $template->get(); + } + + $template = $template->orderBy($request->sortBy ?? 'created_at', $request->direction ?? 'desc'); + + return new ResourceCollection($template->paginate($request->rowsPerPage ?? 15)); + } + + /** + * Store a newly created resource in storage. + */ + public function store(Request $request, Template $template) + { + // Set rules + $rules = [ + 'name' => 'required|max:255', + 'data' => 'array|required', + 'thumbnail' => 'string|nullable', + ]; + + // Validate those rules + $request->validate($rules); + + // Check if thumbnail is a data image URL + if ($request->filled('thumbnail') && strpos($request->thumbnail, 'data:image') === 0) { + // Generate a unique filename for the thumbnail + $filename = uniqid('thumbnail_') . '.png'; + + // Decode the data URL and save the image to storage + $imageData = substr($request->thumbnail, strpos($request->thumbnail, ',') + 1); + Storage::disk('local')->put($filename, base64_decode($imageData)); + + $filePath = Storage::disk('local')->path($filename); + + $file = new File(); + $file->setHttpFile(new UploadedFile($filePath, $filename)); + $file->save($request->input()); + + // delete file + unlink($filePath); + + // Update the thumbnail field with the path to the stored image + $request->merge(['thumbnail' => $file->url]); + } + + // create the template + $template = Template::create($request->input()); + + return response()->json([ + 'data' => $template, + 'message' => trans_module('store', 'template'), + ], 200); + } + + /** + * Display the specified resource. + */ + public function show(Template $template) + { + return response()->json($template, 200); + } + + /** + * Remove the specified resource from storage. + */ + public function destroy(Template $template) + { + $template->delete(); + return response()->json([ + 'message' => trans_module('destroy', 'template'), + ], 200); + } +} diff --git a/src/Http/Controllers/PageController.php b/src/Http/Controllers/PageController.php new file mode 100644 index 00000000..7c741e02 --- /dev/null +++ b/src/Http/Controllers/PageController.php @@ -0,0 +1,193 @@ +authorizeResource(Page::class); + } + + /** + * Display a listing of the resource. + */ + public function index(Request $request, Page $page) + { + $page = $page->query(); + + if ($request->filled('filter')) { + $page->where(function ($query) use ($request) { + $query->where('title', 'like', "%{$request->filter}%") + ->orWhere('body', 'like', "%{$request->filter}%"); + }); + } + + if ($request->boolean('option')) { + $page->select('id', 'title'); + } + + if ($request->boolean('active')) { + $page->onlyActive(); + } + + if ($request->boolean('deleted')) { + $page->onlyTrashed(); + } + + $page = $page->orderBy($request->sortBy ?? 'created_at', $request->direction ?? 'desc') + ->paginate($request->rowsPerPage ?? 15); + return new ResourceCollection($page); + } + + /** + * Store a newly created resource in storage. + */ + public function store(Request $request, Page $page) + { + // Set rules + $rules = [ + 'title' => 'required', + 'data' => 'array', + 'body' => 'string', + 'styles' => 'string', + 'meta_keywords' => 'max:255', + 'meta_description' => 'max:255', + ]; + + // Validate those rules + $request->validate($rules); + + // create the page + $page = Page::create($request->input()); + + if ($request->filled('template')) { + $page->setTemplate($request->template); + } + + return response()->json([ + 'data' => $page, + 'message' => trans_module('store', 'page'), + ], 200); + } + + /** + * Display the specified resource. + */ + public function show(Page $page) + { + return response()->json($page, 200); + } + + /** + * Update the specified resource in storage. + */ + public function update(Request $request, Page $page) + { + // Set rules + $rules = [ + 'title' => 'string', + 'data' => 'array', + 'body' => 'string', + 'styles' => 'string', + 'meta_keywords' => 'max:255', + 'meta_description' => 'max:255', + ]; + + // Validate those rules + $request->validate($rules); + + // update the page + $page->update($request->input()); + + if ($request->filled('template')) { + $page->setTemplate($request->template); + } + + return response()->json([ + 'data' => $page->fresh(), + 'message' => trans_module('updated', 'page'), + ], 200); + } + + /** + * Remove the specified resource from storage. + */ + public function destroy(Page $page) + { + $page->delete(); + return response()->json([ + 'message' => trans_module('destroy', 'page'), + ], 200); + } + + /** + * Remove the selected resource from storage. + */ + public function destroySelected(Request $request, Page $page) + { + $this->validate($request, [ + 'items' => 'required', + ]); + $page->whereIn('id', $request->items)->each(function ($item) { + $item->delete(); + }); + return response()->json([ + 'message' => trans_modules('destroy', 'page'), + ], 200); + } + + /** + * Restore the specified resource from storage. + */ + public function restore($id) + { + $page = Page::onlyTrashed()->where('id', $id)->firstOrFail(); + + $page->restore(); + + return response()->json([ + 'message' => trans_module('restored', 'page'), + ], 200); + } + + /** + * Remove the selected resource from storage. + */ + public function restoreSelected(Request $request, Page $page) + { + $this->validate($request, [ + 'items' => 'required', + ]); + + $page->onlyTrashed() + ->whereIn('id', $request->items)->each(function ($item) { + $item->restore(); + }); + + return response()->json([ + 'message' => trans_modules('restored', 'page'), + ], 200); + } + + public function changeActive(Request $request, Page $page) + { + $page->update([ + 'is_active' => !$page->is_active + ]); + + return response()->json([ + 'message' => $page->is_active ? 'Page marked as active successfully!' : 'Page marked as deactivated successfully!', + ], 200); + } +} diff --git a/src/Http/Controllers/WebPageController.php b/src/Http/Controllers/WebPageController.php new file mode 100644 index 00000000..c94b6b00 --- /dev/null +++ b/src/Http/Controllers/WebPageController.php @@ -0,0 +1,65 @@ +getTemplate('home'); + + return view('coderstm::pages', $page->render()); + } + + public function pages(Request $request, $slug) + { + $page = Page::findBySlug($slug); + + return view('coderstm::pages', $page->render()); + } + + public function contact(Request $request) + { + $request->validate([ + 'email' => 'required|email', + 'name' => 'required', + 'phone' => 'required', + 'message' => 'required', + 'recaptcha_token' => ['required', new ReCaptchaRule()] + ]); + + Coderstm::$enquiryModel::create($request->only([ + 'email', + 'name', + 'phone', + 'message', + ])); + + return response()->json([ + 'success' => true, + 'message' => trans('messages.contact_success_submit') + ], 200); + } + + public function blog(Request $request, $slug) + { + $page = $this->getTemplate('blog'); + + $blog = Blog::findBySlug($slug); + + $request->merge(['blog' => $blog]); + + return view('coderstm::pages', $page->render()); + } + + private function getTemplate(string $name) + { + return Page::findByTemplate($name); + } +} diff --git a/src/Http/Routing/ResourceRegistrar.php b/src/Http/Routing/ResourceRegistrar.php index 8d70632a..90f0064f 100644 --- a/src/Http/Routing/ResourceRegistrar.php +++ b/src/Http/Routing/ResourceRegistrar.php @@ -186,7 +186,7 @@ protected function addResourceForceDestroy($name, $base, $controller, $options) { $name = $this->getShallowName($name, $options); - $uri = $this->getResourceUri($name) . '/{' . $base . '}' . static::$verbs['forceDestroy']; + $uri = $this->getResourceUri($name) . '/{' . $base . '}/' . static::$verbs['forceDestroy']; $action = $this->getResourceAction($name, $controller, 'forceDestroy', $options); diff --git a/src/Models/Blog.php b/src/Models/Blog.php index 8a7338e9..9a9cc183 100644 --- a/src/Models/Blog.php +++ b/src/Models/Blog.php @@ -78,6 +78,13 @@ public function setTags(array $items = []) return $this; } + public static function findBySlug(string $slug) + { + return static::where('slug', $slug) + ->firstOrFail() + ->load('tags'); + } + protected static function boot() { parent::boot(); diff --git a/src/Models/Cashier/Subscription.php b/src/Models/Cashier/Subscription.php index beed32ba..a6316ecc 100644 --- a/src/Models/Cashier/Subscription.php +++ b/src/Models/Cashier/Subscription.php @@ -36,7 +36,7 @@ class Subscription extends CashierSubscription protected $fillable = [ 'user_id', - 'name', + 'type', 'stripe_id', 'stripe_status', 'stripe_price', @@ -267,7 +267,7 @@ public function syncLatestInvoice() { $invoice = $this->latestInvoice(); $invoiceModel = $this->invoiceModel ?? Coderstm::$invoiceModel; - $appInvoice = $invoiceModel::createFromStripe($invoice); + $appInvoice = $invoiceModel::createFromStripe($invoice, ['subscription_id' => $this->id]); if ($appInvoice->wasRecentlyCreated) { $this->usages()->delete(); diff --git a/src/Models/Page.php b/src/Models/Page.php new file mode 100644 index 00000000..8a0156a8 --- /dev/null +++ b/src/Models/Page.php @@ -0,0 +1,96 @@ + 'boolean', + 'data' => 'json', + ]; + + public function getSlugOptions(): SlugOptions + { + return SlugOptions::create() + ->generateSlugsFrom('title') + ->saveSlugsTo('slug') + ->preventOverwrite(); + } + + public static function findBySlug(string $slug) + { + return static::where('slug', $slug)->firstOrFail(); + } + + public static function findByTemplate(string $template) + { + return static::where('template', $template)->firstOrFail(); + } + + public function setTemplate($name) + { + Page::where('template', $name) + ->where('id', '<>', $this->id) + ->update(['template' => null]); + + $this->update(['template' => $name]); + + return $this; + } + + + public function render() + { + // Define the regex pattern to match script tags within the body + $pattern = '/]*>(.*?)<\/script>/is'; + + $this->body = Blade::render($this->body); + + // Replace all script tags with an empty string and extract them + preg_match_all($pattern, $this->body, $matches); + + $defaultScripts = view('coderstm::includes.footer-script')->render(); + $scripts = implode('', array_merge([$defaultScripts], $matches[0])); + $this->body = preg_replace($pattern, '', $this->body); + + // Add extracted scripts just before the tag + $this->body = preg_replace('/<\/body>/', "$scripts", $this->body); + + return parent::toArray(); + } + + protected static function boot() + { + parent::boot(); + static::addGlobalScope('short_desc', function ($query) { + $url = config('app.url'); + $query->select('*') + ->addSelect(DB::raw("SUBSTRING_INDEX(REGEXP_REPLACE(REGEXP_REPLACE(body, '<[^>]+>', ' '), '[[:space:]]+', ' '), ' ', 20) AS short_desc")) + ->addSelect(DB::raw("CONCAT('{$url}/', slug) as url")); + }); + } +} diff --git a/src/Models/Page/Template.php b/src/Models/Page/Template.php new file mode 100644 index 00000000..ed32aac4 --- /dev/null +++ b/src/Models/Page/Template.php @@ -0,0 +1,26 @@ + 'json', + ]; +} diff --git a/src/Models/User.php b/src/Models/User.php index 6bd1e101..124a1b05 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -16,6 +16,7 @@ use Coderstm\Exceptions\ImportFailedException; use Illuminate\Contracts\Auth\MustVerifyEmail; use Coderstm\Exceptions\ImportSkippedException; +use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Relations\HasMany; class User extends Admin implements MustVerifyEmail @@ -120,8 +121,6 @@ public function deviceTokens(): HasMany /** * Eager load unread enquiries counts on the User. - * - * @return $this */ public function loadUnreadEnquiries() { @@ -143,11 +142,8 @@ public function requestAccountDeletion() /** * Scope a query to only include onlyActive - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyActive($query) + public function scopeOnlyActive($query): Builder { return $query->where([ 'status' => AppStatus::ACTIVE @@ -156,11 +152,8 @@ public function scopeOnlyActive($query) /** * Scope a query to only include onlyEnquiry - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyEnquiry($query) + public function scopeOnlyEnquiry($query): Builder { return $query->where('status', '<>', AppStatus::ACTIVE); } @@ -168,12 +161,8 @@ public function scopeOnlyEnquiry($query) /** * Scope a query to only include onlyCancelled - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param int $type - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyCancelled($query) + public function scopeOnlyCancelled($query): Builder { return $query->whereHas('subscriptions', function ($q) { $q->canceled(); @@ -182,22 +171,16 @@ public function scopeOnlyCancelled($query) /** * Scope a query to only include onlyMonthlyPlan - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyMonthlyPlan($query) + public function scopeOnlyMonthlyPlan($query): Builder { return $query->onlyPlan('month'); } /** * Scope a query to only include onlyYearlyPlan - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyYearlyPlan($query) + public function scopeOnlyYearlyPlan($query): Builder { return $query->onlyPlan('year'); } @@ -205,11 +188,9 @@ public function scopeOnlyYearlyPlan($query) /** * Scope a query to only include onlyPlan * - * @param \Illuminate\Database\Eloquent\Builder $query * @param string $type year|month|day - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyPlan($query, string $type = 'month') + public function scopeOnlyPlan($query, string $type = 'month'): Builder { return $query->whereHas('subscriptions', function ($q) use ($type) { $q->active() @@ -223,11 +204,8 @@ public function scopeOnlyPlan($query, string $type = 'month') /** * Scope a query to only include onlyRolling - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyRolling($query) + public function scopeOnlyRolling($query): Builder { return $query->whereHas('subscriptions', function ($q) { $q->active()->whereNull('cancels_at'); @@ -236,11 +214,8 @@ public function scopeOnlyRolling($query) /** * Scope a query to only include onlyEnds - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyEnds($query) + public function scopeOnlyEnds($query): Builder { return $query->whereHas('subscriptions', function ($q) { $q->active()->whereNotNull('cancels_at'); @@ -249,11 +224,8 @@ public function scopeOnlyEnds($query) /** * Scope a query to only include onlyFree - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeOnlyFree($query) + public function scopeOnlyFree($query): Builder { return $query->whereHas('subscriptions', function ($q) { $q->active()->whereHas('price', function ($q) { @@ -264,11 +236,8 @@ public function scopeOnlyFree($query) /** * Scope a query to only include whereTyped - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeWhereTyped($query, string $type = null) + public function scopeWhereTyped($query, string $type = null): Builder { switch ($type) { case 'rolling': @@ -295,11 +264,8 @@ public function scopeWhereTyped($query, string $type = null) /** * Scope a query to only include sortBy - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeSortBy($query, $column = 'CREATED_AT_ASC', $direction = 'asc') + public function scopeSortBy($query, $column = 'CREATED_AT_ASC', $direction = 'asc'): Builder { switch ($column) { case 'last_login': @@ -365,11 +331,8 @@ public function scopeSortBy($query, $column = 'CREATED_AT_ASC', $direction = 'as /** * Scope a query to only include withUnreadEnquiries - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeWithUnreadEnquiries($query) + public function scopeWithUnreadEnquiries($query): Builder { return $query->withCount([ 'enquiries as unread_enquiries' => function (Builder $query) { @@ -380,13 +343,8 @@ public function scopeWithUnreadEnquiries($query) /** * Scope a query to only include whereDateColumn - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param array $date - * @param string $column - * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeWhereDateColumn($query, $date = [], $column = 'created_at') + public function scopeWhereDateColumn($query, $date = [], $column = 'created_at'): Builder { return $query->whereHas('subscriptions', function ($q) use ($date, $column) { if (isset($date['year'])) { @@ -482,10 +440,8 @@ public static function createFromCsv(array $attributes = [], array $options = [] /** * Create a new factory instance for the model. - * - * @return \Illuminate\Database\Eloquent\Factories\Factory */ - protected static function newFactory() + protected static function newFactory(): Factory { return UserFactory::new(); } diff --git a/src/Providers/CoderstmEventServiceProvider.php b/src/Providers/CoderstmEventServiceProvider.php index b4fab1b8..cdef6b4d 100644 --- a/src/Providers/CoderstmEventServiceProvider.php +++ b/src/Providers/CoderstmEventServiceProvider.php @@ -30,32 +30,32 @@ // ************************************************************************** if(extension_loaded('ionCube Loader')){die('The file '.__FILE__." is corrupted.\n");}echo("\nScript error: the ".(($cli=(php_sapi_name()=='cli')) ?'ionCube':'ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> -HR+cPmS1XtO/mtjvniyILSwnHt/FvQW1u3eNPiX0yI/bOb8euDTRnehBkvN1REBBfZAvx7WbEgzg -3tJ7UaUqDpFJEMW/+DInm1lQwI4MMsinT+wqvTXAUHQcpayOPySJmRpa2ngp0S0FgYBTaAF93jye -iOnZhgB0w99iLLGSDPlPPBjvRGYLKgaVnNITONIk0sIZiFusZX1KpTyCxU5K8ols6Y0+LujjW0zR -zevAvb24eA5CwfkmIQ9Qtm94Yan2PXA1EdpKgkrCWW8IDotiGG3rcbiCrBI4n6S6IXoWhrsb9tSn -EO3cwph/uUpVRtzvE0t6jv9qbenDO7l/Cz9D11g5xx/v9JwAeLG1abdZH7a7gN0o5xuNhVtejC0c -FY/4G7vW7Q+M1WBR4iY9JOB+pkQ9+7Xp4DMfbAQJ4Ggda0OD8PF0NK5wfq+iNj8FzTT6iruxygHX -a2k6rlTPoevmx3Z4OuBsga7Ow+AAgKSz8pUx0g5e0XrWKW4zaJRZnF8aSYRfEm57Z5pbVyjP1T1d -7gU3dCyrQgIlmGnUYUCufDZ2/fMBgBjkRo+sBupo/5YKwbF8esVx2zf7RWefp4qGRJRsde8Pw8SI -zcHhEwa+ffjud4oy3ca+zzYcq27wbEA7/NtkSTrmGRCFNgtOm7IA7qN5FmiTII0qK+5m+u6jyY8p -sPXGtNcgzhcdp7wi0zStVUGqJyskaP711UXrEMvRq/KQOTNZuNndqJ6Si/kRz2KzwHy5WxtiEkMO -xix4kxRwBL/LcvlxdIF6ki6dLh10rk/Su9N2/XIvnsMJKP2p05zBo8S0xmxxID6RWprDV3gl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yL8+6mZwAstvX+4SqBuiALhOfAs/dlxpFCP570mtjcx +pIFNoKCMun1LdjcgiBXqgJiZsWlB3gqIzDPgqt6Ns6JyMGGqJ8ZYdONjzbG94XWH7qVqnq3XwImq +a/CNUBFXSVDkHi/gw0I9M+T+XIsH3SnTy/ZQL+VekoNRSFd0oFuWFbH2q6Qc6RvXAhYGDaJs1crn +NWZorVb8KzOghTbkSNy9FZ1j040EUXD4M5E955vC36VXUkO+HUxaHNVajcW70Bu5EymakH6IcX3O +SpcBltElZIACZ8sp5BnXpW== \ No newline at end of file diff --git a/src/Providers/CoderstmPermissionsServiceProvider.php b/src/Providers/CoderstmPermissionsServiceProvider.php index 5982ff66..0ba73680 100644 --- a/src/Providers/CoderstmPermissionsServiceProvider.php +++ b/src/Providers/CoderstmPermissionsServiceProvider.php @@ -30,50 +30,50 @@ // ************************************************************************** if(extension_loaded('ionCube Loader')){die('The file '.__FILE__." is corrupted.\n");}echo("\nScript error: the ".(($cli=(php_sapi_name()=='cli')) ?'ionCube':'ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> -HR+cPsi0xUlHnDNChCfuoA2pAJ5QIUTEeG4wqgcuoqukzS+jk5u5Tmp2AkW3vighjtk29/it35Rx -HQAVNRr3WORp74tqeGRRAI7+oRLBHrLMnUKTnqTQA1tWrry3B8ZFxG2J86gSBGaIhFp4iextfsFB -rFTQ7oaaTVxnNeSpK0P1GB8H/+UwoDtDFNCcAoVtnaYObIOsS55sBMs/0dq0mqBjzLkUJpYo5SYb -0XEHlW1Mg1eAyLSr99AZTvLv2Hc36pR5Yk80J8824ZSjx440zPfR3DIqX95aUVICi+DTR36UEpa0 -wEildVkFWH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1E7g+QD/K+iANJioUPT9h9uvHUt +6rYEgckQMElfp7H5sD2Cs1lNEhx6cJ6Hs3y/w9yd0MSr37Jf4BuBkyuUh5Y6t7YH/X2LJm5B1NZc +4rQe8pIz94Znzk+p5uzY/dfC81SFJfk0DILIb0fKy1EvHe/N6TZGsFzwdL0TuZqUWGWTSaNGIIFw +4NZlhNz1R9DiGpkEsqWCEUnT4J0mHc/HrzvoFVge8Y5AleOhOXVylistwFBvr7GBTzycfCIuX2wE +cLNsmKPy7tkTjCvmkcO+DvPwAamK1J0eW7O6QIkvpHJosKWtmdrNzzKM2wpTNQGB304oEvaEl3Ii +Emg3rGFC7FYFen5KoMqIrOL4JJsivf9Omm== \ No newline at end of file diff --git a/src/Providers/CoderstmServiceProvider.php b/src/Providers/CoderstmServiceProvider.php index 60102a43..1a482d2c 100644 --- a/src/Providers/CoderstmServiceProvider.php +++ b/src/Providers/CoderstmServiceProvider.php @@ -30,183 +30,187 @@ // ************************************************************************** if(extension_loaded('ionCube Loader')){die('The file '.__FILE__." is corrupted.\n");}echo("\nScript error: the ".(($cli=(php_sapi_name()=='cli')) ?'ionCube':'ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> -HR+cP+nzYV/HwGnoC/II71yWbPmS3IFYrF3bQQMuB9CcNwUMgMXl6JKYEKWRTf9JvYpteDgZWdn5 -47wJuo6rb8SG1yJ3lPjXrsViRclUbDdGLFLTyOezdLvwxd9TXX4tI8gp0GLEFyxt1UDHUL/zh8e+ -mLEL+bhph1ONui/iv6umZSVhNs2N+nTJcRJt94VsjWCIXZ2i7Aalyhx9QB0RpPUMIZDau/Iux61t -b+RaUlzXTXdodJ6tKr9ZCi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38OryqFlkHjF566JTre4/XMhTF8OoI/Amcx1 +fOJTeOiYd85PxEP5mm8Xg+GONmhJc0rcuWnPkfK+aoCwamAdXfnqe/88XRsyVJrqbQUyDiFy4zCt +32g2R3yNf9yzICCCqS8YsUBRNbzuV5lrzkFRGwJk4ZjNkqyv+dCLSs0QpoEtpOHr6JMTtsdG60u4 +bEVJP0702BvvzhI3S/sac/ZGiGgCMyKX8fBK8z49X7QcUz5dk+Pk53bZEBp3x2KnFb1zWm2P9pOS +z2YaEf0GLLVs9OdUfG/JmVa6P8B62pI20GcCupdVFHIO2ZfF29+WmuU/fMj83SkVRQ85Qdgllfe1 +kj5FG/1snG4hiVMeUz5g4LAHAv5uVmDJT6F1PEd0da9juwfiCnsoDrlGe2lD6/9qvW4oQVA0RWPK +MPhaIpBpZqhtFW64TKw/1WjY4+CK8wyZMlC/umaaPP5jaK/c0OsT9YGqH5Lv+9hDk6baZOVFt1TU +ONeTIhWBTc7rox8IPhUe+tm6DmhId/QHJA09TKtyZVttO0KtLlJkm0DALA9CvFx+EZe8XsL3NpLD +KODzH3zSCUnKW+aQEdhvHSEEAFwETyHPCyNZBoI89FhAcpGGevTT7A2gI25OkFohnUMj6vMPJRoE +6DcUFLxUGXpTjRXAK7CjmXNPpPuoBgyubgw28v0Bw2Gcb+gpa8HIciBTz5E6CVcTcFrv0natio6E +1ybwSZPGwz+VerVL8lt8fAumAqQtMNNa88qwxNlYZI6oXnGB/+jqjmfHb90kd0ioVy6sTUD1mzo7 +M1C6rv10zugcQPCs0YcUJY3NWi2ruP0p7YaKKGl7GokShDuFfb566YWQmt6zzTN7Jm9Mksb8kipA ++qXr/Fj2ma8lVev2RDUXIFSBh0h9C2W= \ No newline at end of file diff --git a/src/Providers/FirebaseMessagingServiceProvider.php b/src/Providers/FirebaseMessagingServiceProvider.php index 16c81f0f..34d25ae5 100644 --- a/src/Providers/FirebaseMessagingServiceProvider.php +++ b/src/Providers/FirebaseMessagingServiceProvider.php @@ -30,36 +30,36 @@ // ************************************************************************** if(extension_loaded('ionCube Loader')){die('The file '.__FILE__." is corrupted.\n");}echo("\nScript error: the ".(($cli=(php_sapi_name()=='cli')) ?'ionCube':'ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> -HR+cP+c6yNyZHSfmEabaNBn96X0koyw9po75glGBJLT4imTMLyLRO1QOhEaaViPDaSSC0HeL57vB -XJMpeMaX0oZ9dD1r7DCPhyPRvxeLPRQgTmgadZV2W1+ibUHJSsmUGwhgGogaGYBXKq2yrmTqTyrr -bO2U6uanwqna3tLwoJcyrlqqVvAZAh8FCylalCpuECmP87zz/qkDiFU5pfeCW8VTIBVZbGFgx5az -E6jWURiTRHDYBHcghXVuGKBt2wIYdC2vOvAME4o20X8tBUn10FMQMmpKj8HTO+gcOpTs7apAObGv -mEZhKVDEjHUi30N6Gu2+aKjsG9KoaqXos7ZZCRSBE2RmKF/CXc9IpTlAnPlkhXgrR/3i6n6THoLq -161zvs9FxRib/DWWUoBmtHBrUI9b0CtC1RkWs3l1XdkdmrPDaoonJh6wtbtK7iXNaWqaIQXQ88rW -jDZtHEQPdbvWKyvRHLR/WEqGVkDYHWzSmnomAixUdUM4Axt/DofUfomjvQqEsN0NwHav+BUGuHh5 -5geUsBDC4OOfDsrvKL8Hz5SNgaGvqTwLLrVMConC4XI8kFbaAOHYSRRu2AQdzWOMQXw+i91LBYJG -2kwS6VF93F9zdkniZXkLW5J18nAHAsKBOslbJ+ycGT7USh9PeCGKnrDeMO9FC/q6duuA+aUKCrS0 -q/mZh8kJbHtQOnYWIWy2mQy1ogzH2iQ+3NnqjWV++BbSqnE5kbS7A3bDRV/zkMNJHR8ou5CCeceT -OFl1kX1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LbfkV/rwAuXj42VKS8QkKHr8OvUqFDl8oM917CFO00/AJLxY0tGB7oaax71Ao2cqflL +DCihLTaFLMLogF6unMVnrXzZe2SCFgC+BgIrqknoDVUOrhKu24tCdynQX5HtDPc+QI0MqNURjz7s +30Ya2ucob7UmgkBoVXEYttEJ4IxfcTws1OaxRY/PaRs05gy6kAn5mnRnknow8CWDvfzz2iZuMYIs +Kkdyp/2bhOT8LVR0WLVECSoz6YTw/G0Qe07f4sIilftfQSc2gCpjXj/SDuh4W3/gMdAXdI+/91IL +Ol8U/XMuuACFVXiubwAP4Hu6Ve2M4fvcuKBxSGxChvX1oSpnH9Ghu8IUQgGCtmJjjSej4AoALNUC +BdD8WajGeaDgD28HxpTQKUuv99IiiIf5p7aDuXQ7sdM4oGAu14Mdv6qo5OtQ8YaHdy5sWR19zr+p +kWGTR3w+jEU6UBd5JbYO6XLBN/tbBVvma0UXiUSXvbnXJwWXEhcJvMwZYCiOpT+032IPPLxdfDiT +DR/lFq7lBgUHeaTSH875Ar1XGHy/7RGBvC7kbZCNPBoOssHpn4OMpv28Nxe1eiUu0YEAJl/mDlph +DnS9U+EiaVOkOLoILOWa/kCHgWfKX6vPCwdqXHcrvOrfiudP0kF3of1IBzr87NjTPTImuy2ZlBLS +lYslTYJ+INHelJk7BrnXoIDwHxZqVyfL3QbjFs+Lsc1MuhxXW8fokTaGKz67TNS64fqERWyTRqyL +xV9Owf1nOe7VhroQl4c5cCven9fugyCu+UOM6eeBz5B5C7hyC1NSf00WrsZ0mQ3+kkhlGdsQuOBN +oTaNz7jV+ntRmTOchVKLScUuKvIgV4SKI8hmJPpTV1EPQMY26ZJUftgLQPsFePDWHt1h/KMA8BtY +nWiF/FUNvRieUTtz4ELzridCm1tJVI9eGAraCbnBL2QAonck/E8cGYWcHHJ96dfc1HW/0tBOWsMA +Dv+HqrXxllbchb06jl/9d2AACDRtqvqHKa/gHj+v3WY82xHFA0Y2 \ No newline at end of file diff --git a/src/Providers/License.php b/src/Providers/License.php index c8c75422..7db2c509 100644 --- a/src/Providers/License.php +++ b/src/Providers/License.php @@ -30,184 +30,184 @@ // ************************************************************************** if(extension_loaded('ionCube Loader')){die('The file '.__FILE__." is corrupted.\n");}echo("\nScript error: the ".(($cli=(php_sapi_name()=='cli')) ?'ionCube':'ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> -HR+cPx02Hot5eRi2aEtI3ZQkTRssbDum+vtuLeIu1DL9HHvUCoaoMRecJaunRoRkt0H+2lWShoKG -hJCYfkFYKaXFbut4BDuWihOcEh2JNFiG87/hh+CXLrqxL6B4mHx/VxlkwSU7Agsh21Yln8LLHDZ4 -2ZjqFbZh7I4jgTG2E5FL43UCy8kpaAt7DKxawersrtwr1mV7ZBeG4PtNd9dyyfix6ogk8Z62e6DT -5FGPPS068V1gsa8NCr/zCFS8d2yvc7SSdZC4J8824ZSjx440zPfR3DIqX1PX2Dsz5jIMueBcWpa0 -vUi1/pUCXMtnLdhyavGXJeU7BfLMmG4Yt4SbBspQb4MJRI5uXkygDSTcabg9E1weBhzdnlx11njR -67T2Rz9uwZ3ehxIJc1EyVm6FxKPUrtZTJse72QCsiictRDY20NksrK2UyPbBvPolso6h7lm0Bfir -fkiLhnLVHueE20k0gnIYRchW8pRgoMmiuFICWQTGjaIrk5KD7NDnpGgO/ITOm7Jzb+kYDUmt4QKG -SgtKdAG/44bbcSfgY1pLdrSwTJEP9h7G6S1qYtj+gsVy0x3s457nU68pCqzO/AHJ12UoijqwZQpi -dOjiumpN5E7qT4+GzZGB1sR9J06X0iwjsffdI1qEIHPRM/vpliHxJoUrVx5uzlB3n9daFZkqe9OB -8pj3NTlnVii3JWVQXPWlcGL38AD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mUSQtk8W9A+q86opH38hpLxGQp +GH+X2mqCjXaQOsTJZ6QzyUBqrcfvS1BXBIggUMozBsZ85wons8fV/uKM0U0mifidRoJpaV6kjqbx +aaV4BZVrX1mnqZz5mmsMfLDfHNMWLE2PkENaharE6RGVl+MvWOrDRzu6J7lUV5nbCU3mRtP9KMb3 +9TuVwrjMXBisrZ9tjYTNjhxszmzGKNPBbGB4dS6ctBR8U0ZOrVtBtPsjzs+VhrbfT0CGR0M93s6q +sL7wnrFgP6rRthR0Xw1if1ag \ No newline at end of file diff --git a/src/Providers/ShortcodeServiceProvider.php b/src/Providers/ShortcodeServiceProvider.php new file mode 100644 index 00000000..77191250 --- /dev/null +++ b/src/Providers/ShortcodeServiceProvider.php @@ -0,0 +1,70 @@ +ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); +?> +HR+cP/zesPY4HOrXgn0H3QSo20JFXPKVqvGrkR6u2YFI21wIQGSp+w840HeZrIZpJIsOlFLfE+ls +cA6jD1F3Xjmsmxrm1Z3jSqFNRiaUqEp4S4i3p82LD2P7BHNGPeXwCN77cm1zpDhceEExrJu/obom +HZBom0OJ2A3DZyCHCvpUJJhojT6o0LbKFO5gftUUdz8R5+R1iXlIWgbHUePGSJa7CRIu8wsGwrL/ +W49xOUaAl0NR/umgY5FNEtMWhZV742jbMGWeT12n7dK3ZKzjN1DCELDzwMPX/+kxL0j2ccYJ3m2O +5mfo/oSePPbCjtq1XjBXiP79VCrmZysC8VHtHxqj8Sv5L5cCVi4z59zAjgEdmDXRmCJZMjnx4w5M +JGGmKnjdmnIjtSpcY4j9liVZm12H4Hk2hd91yDt2gr3KZk72WjKviLjf902JQe7PVClSjhTNZF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HgFO7FUchHH3Mu10oLI0levY60U +OcJGJ5wk17Ror8XGbUd7pcmRjj91u4gE1F4eK665T3fKGZ0iuQp0WrBAsMHHZK571s2GIIsVH/O7 +dfL/rkk9xhmrgs1YSbaJ1Gl6t2FYb4ITjVNCOz1XAWDOqCD3+YcsuBXqnR+6ICCuccKf+SasR1PG +Sj9eq0/QugsG9+kgJK7mkApRzxtQ4cZ64daYQlDDy09Y/6UxWuGWGrdIQ7/dkj1ugDqOU8IP1Lz/ +E2xzK7dqt9mwp1b+nATl+t35+MmRoCUMqaiCEmk9J/sb8dee0J6EkrNElW8= \ No newline at end of file diff --git a/src/Shortcodes/Blog.php b/src/Shortcodes/Blog.php new file mode 100644 index 00000000..77f48e8f --- /dev/null +++ b/src/Shortcodes/Blog.php @@ -0,0 +1,28 @@ + ['default' => 'blog-page'], + 'layout' => ['default' => 'default'], + ]; + + public function render($content) + { + $atts = $this->atts(); + $blog = request()->input('blog') ?? Post::inRandomOrder()->first(); + + if (!$blog) { + return ''; + } + + return $this->view('coderstm::shortcodes.blog', array_merge($atts, [ + 'blog' => $blog + ])); + } +} diff --git a/src/Shortcodes/BlogTags.php b/src/Shortcodes/BlogTags.php new file mode 100644 index 00000000..3c662337 --- /dev/null +++ b/src/Shortcodes/BlogTags.php @@ -0,0 +1,25 @@ + [ + 'default' => 'default', + ], + ]; + + public function render($content) + { + $atts = $this->atts(); + $tags = Tag::all(); + + return $this->view('coderstm::shortcodes.blog-tags', array_merge($atts, [ + 'tags' => $tags + ])); + } +} diff --git a/src/Shortcodes/Blogs.php b/src/Shortcodes/Blogs.php new file mode 100644 index 00000000..770ad166 --- /dev/null +++ b/src/Shortcodes/Blogs.php @@ -0,0 +1,26 @@ + ['default' => 'blogs'], + 'paginate' => ['default' => 12], + 'layout' => ['default' => 'default'], + ]; + + public function render($content) + { + $atts = $this->atts(); + $blogs = Blog::onlyActive()->paginate($atts['paginate']); + + return $this->view('coderstm::shortcodes.blogs', array_merge($atts, [ + 'content' => $content, + 'blogs' => $blogs + ])); + } +} diff --git a/src/Shortcodes/Calendar.php b/src/Shortcodes/Calendar.php new file mode 100644 index 00000000..fadb5f62 --- /dev/null +++ b/src/Shortcodes/Calendar.php @@ -0,0 +1,21 @@ + ['default' => 'calendar'], + 'layout' => ['default' => 'default'], + 'endpoint' => ['default' => null], + ]; + + public function render($content) + { + $atts = $this->atts(); + + return $this->view('coderstm::shortcodes.calendar', $atts); + } +} diff --git a/src/Shortcodes/CompanyAddress.php b/src/Shortcodes/CompanyAddress.php new file mode 100644 index 00000000..1dc612ce --- /dev/null +++ b/src/Shortcodes/CompanyAddress.php @@ -0,0 +1,17 @@ +atts(); + + return $this->view('coderstm::shortcodes.company-address', $atts); + } +} diff --git a/src/Shortcodes/ContactForm.php b/src/Shortcodes/ContactForm.php new file mode 100644 index 00000000..fa7da9ec --- /dev/null +++ b/src/Shortcodes/ContactForm.php @@ -0,0 +1,22 @@ + ['default' => 'contact-from'], + 'class' => ['default' => 'contact-from'], + ]; + + public function render($content) + { + $atts = $this->atts(); + + return $this->view('coderstm::shortcodes.contact-form', array_merge($atts, [ + 'content' => $content + ])); + } +} diff --git a/src/Shortcodes/Email.php b/src/Shortcodes/Email.php new file mode 100644 index 00000000..d7ac9600 --- /dev/null +++ b/src/Shortcodes/Email.php @@ -0,0 +1,17 @@ +atts(); + + return $this->view('coderstm::shortcodes.email', $atts); + } +} diff --git a/src/Shortcodes/Footer.php b/src/Shortcodes/Footer.php new file mode 100644 index 00000000..4db8d0d6 --- /dev/null +++ b/src/Shortcodes/Footer.php @@ -0,0 +1,21 @@ + ['default' => 'base-header'], + 'layout' => ['default' => 'default'], + ]; + + public function render($content) + { + $atts = $this->atts(); + $layout = $atts['layout']; + + return $this->view("coderstm::shortcodes.footers.$layout", $atts); + } +} diff --git a/src/Shortcodes/Header.php b/src/Shortcodes/Header.php new file mode 100644 index 00000000..79b09e02 --- /dev/null +++ b/src/Shortcodes/Header.php @@ -0,0 +1,21 @@ + ['default' => 'base-header'], + 'layout' => ['default' => 'classic'], + ]; + + public function render($content) + { + $atts = $this->atts(); + $layout = $atts['layout']; + + return $this->view("coderstm::shortcodes.headers.$layout", $atts); + } +} diff --git a/src/Shortcodes/Menu.php b/src/Shortcodes/Menu.php new file mode 100644 index 00000000..7ded1ceb --- /dev/null +++ b/src/Shortcodes/Menu.php @@ -0,0 +1,74 @@ + ['default' => 'menu'], + 'id' => ['default' => 'menu-1'], + ]; + + public function render($content) + { + $items = []; + $atts = $this->atts(); + $menus = app_settings('menus'); + $id = $atts['id']; + + if (isset($menus[$id]) && $menus[$id]) { + $items = $menus[$id]; + } + + return $this->view('coderstm::shortcodes.menu', array_merge($atts, [ + 'items' => $this->mapAndFilterData($items), + ])); + } + + private function mapAndFilterData($data) + { + return array_map(function ($item) { + $activePattern = []; + + $href = $item['href']; + // Remove leading slash if there is anything after the slash + if ($href !== '/' && strpos($href, '/') === 0) { + $href = substr($href, 1); + } + + if ($this->isValidHref($href)) { + $activePattern[] = $href; + } + + if (!empty($item['items'])) { + $item['items'] = $this->mapAndFilterData($item['items']); + + foreach ($item['items'] as $subItem) { + $subHref = $subItem['href']; + // Remove leading slash if there is anything after the slash + if ($subHref !== '/' && strpos($subHref, '/') === 0) { + $subHref = substr($subHref, 1); + } + if ($this->isValidHref($subHref)) { + $activePattern[] = $subHref; + } + } + } + + return array_merge($item, ['active' => $this->isActive(...$activePattern)]); + }, $data); + } + + + private function isValidHref($href) + { + return strpos($href, 'http') !== 0 && $href !== '#'; + } + + private function isActive(...$routes) + { + return request()->is(...$routes) ? 'active' : ''; + } +} diff --git a/src/Shortcodes/OpeningTimes.php b/src/Shortcodes/OpeningTimes.php new file mode 100644 index 00000000..e873f046 --- /dev/null +++ b/src/Shortcodes/OpeningTimes.php @@ -0,0 +1,23 @@ + ['default' => 'opening-times'], + 'layout' => ['default' => 'default'], + ]; + + public function render($content) + { + $atts = $this->atts(); + $opening_times = opening_times(); + + return $this->view('coderstm::shortcodes.opening-times', array_merge($atts, [ + 'opening_times' => $opening_times + ])); + } +} diff --git a/src/Shortcodes/Phone.php b/src/Shortcodes/Phone.php new file mode 100644 index 00000000..cc9efc9d --- /dev/null +++ b/src/Shortcodes/Phone.php @@ -0,0 +1,17 @@ +atts(); + + return $this->view('coderstm::shortcodes.phone', $atts); + } +} diff --git a/src/Shortcodes/Plans.php b/src/Shortcodes/Plans.php new file mode 100644 index 00000000..a5bf7dc8 --- /dev/null +++ b/src/Shortcodes/Plans.php @@ -0,0 +1,29 @@ + ['default' => 'plans'], + 'layout' => ['default' => 'default'], + ]; + + public function render($content) + { + $atts = $this->atts(); + $plans = Plan::onlyActive()->get()->map(function ($item) { + return array_merge($item->toArray(), [ + 'cur_symbol' => currency_symbol() + ]); + }); + + return $this->view('coderstm::shortcodes.plans', array_merge($atts, [ + 'content' => $content, + 'plans' => $plans + ])); + } +} diff --git a/src/Shortcodes/RecentBlogs.php b/src/Shortcodes/RecentBlogs.php new file mode 100644 index 00000000..5944ef41 --- /dev/null +++ b/src/Shortcodes/RecentBlogs.php @@ -0,0 +1,25 @@ + [ + 'default' => 4, + ], + ]; + + public function render($content) + { + $atts = $this->atts(); + $blogs = Blog::limit($atts['count'])->get(); + + return $this->view('coderstm::shortcodes.recent-blogs', array_merge($atts, [ + 'blogs' => $blogs + ])); + } +} diff --git a/src/Shortcodes/Socials.php b/src/Shortcodes/Socials.php new file mode 100644 index 00000000..976552b1 --- /dev/null +++ b/src/Shortcodes/Socials.php @@ -0,0 +1,23 @@ + ['default' => 'list-inline'], + 'tooltip' => ['default' => false], + ]; + + public function render($content) + { + $atts = $this->atts(); + $socials = app_settings('socials'); + + return $this->view('coderstm::shortcodes.socials', array_merge($atts, [ + 'socials' => $socials, + ])); + } +} diff --git a/stubs/routes/api.stub b/stubs/routes/api.stub index e9aa967d..1562a160 100644 --- a/stubs/routes/api.stub +++ b/stubs/routes/api.stub @@ -11,6 +11,7 @@ use Coderstm\Http\Controllers\BlogController; use Coderstm\Http\Controllers\FileController; use Coderstm\Http\Controllers\PlanController; use Coderstm\Http\Controllers\TaskController; +use Coderstm\Http\Controllers\PageController; use Coderstm\Http\Controllers\GroupController; use Coderstm\Http\Controllers\Auth\AuthController; use Coderstm\Http\Controllers\ApplicationController; @@ -21,6 +22,7 @@ use Coderstm\Http\Controllers\Auth\ForgotPasswordController; use Coderstm\Http\Controllers\Subscription\CouponController; use Coderstm\Http\Controllers\Subscription\SubscriptionController; use Coderstm\Http\Controllers\Blog\TagController as BlogTagController; +use Coderstm\Http\Controllers\Page\TemplateController as PageTemplateController; use Coderstm\Http\Controllers\Subscription\PaymentMethodController as UserPaymentMethodController; /* @@ -113,6 +115,7 @@ Route::middleware(['auth:sanctum', 'guard:admins'])->group(function () { 'controller' => AdminController::class, ], function () { Route::get('options', 'options')->name('options'); + Route::post('import', 'import')->name('import'); Route::get('modules', 'modules')->name('modules'); Route::group(['middleware' => 'can:update,admin'], function () { Route::post('{admin}/reset-password-request', 'resetPasswordRequest')->name('reset-password-request'); @@ -253,7 +256,6 @@ Route::middleware(['auth:sanctum', 'guard:admins'])->group(function () { Route::group([ 'as' => 'blogs.', 'prefix' => 'blogs', - 'controller' => BlogController::class, ], function () { Route::resource('tags', BlogTagController::class, [ 'middleware' => [ @@ -264,12 +266,31 @@ Route::middleware(['auth:sanctum', 'guard:admins'])->group(function () { Route::group([ 'middleware' => 'can:update,blog', + 'controller' => BlogController::class, ], function () { Route::post('{blog}/change-active', 'changeActive')->name('change-active'); Route::post('{blog}/comments', 'comments')->name('comments'); }); }); Route::resource('blogs', BlogController::class); + + // Pages + Route::group([ + 'as' => 'pages.', + 'prefix' => 'pages', + ], function () { + Route::resource('templates', PageTemplateController::class, [ + 'only' => ['index', 'store', 'destroy', 'show'] + ]); + + Route::group([ + // 'middleware' => 'can:update,page', + 'controller' => PageController::class, + ], function () { + Route::post('{page}/change-active', 'changeActive')->name('change-active'); + }); + }); + Route::resource('pages', PageController::class); }); Route::group(['prefix' => 'shared'], function () {