New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-simple-calendar

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-simple-calendar - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

11

CHANGELOG.md
## Future?
* Mobile-compatible drag and drop
* Mobile-compatible drag and drop (#21)
* Handles to drag events to make them longer or shorter
* Add month name to the 1st of the month when viewing multiple months
* Provide better information to parent about visible date range (#69)
## 3.0.2 (2018-05-16)
* Added `top` scoped property to the `event` slot (#66, thanks @lochstar!)
* Tweak CSS for scrolling when ancestor uses `flex-direction: column` (#71)
* Ensure keys used internally for weeks and days don't collide with numeric event `id` values (#65)
## 3.0.1 (2018-05-08)
* Added the `eventTop`, `eventContentHeight`, and `eventBorderHeight` props to allow better theming. (#66)
* Added the `eventTop`, `eventContentHeight`, and `eventBorderHeight` props to allow better theming (#66)

@@ -11,0 +18,0 @@ ## 3.0.0 (2018-05-05)

2

dist/calendar-month.min.js

@@ -1,1 +0,1 @@

window.CalendarView=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){var r=n(11);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("1a1e81be",r,!1,{})},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("ab36f444",r,!1,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"CalendarViewHeader",props:{headerProps:{type:Object,required:!0}},methods:{onInput:function(e){this.$emit("input",e)}}}},function(e,t,n){"use strict";n.r(t);var r=n(2),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(16)),a=i(n(15));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.default={name:"CalendarView",components:{CalendarViewHeader:a.default},mixins:[r.default],props:{showDate:{type:Date,default:function(){}},displayPeriodUom:{type:String,default:function(){return"month"}},displayPeriodCount:{type:Number,default:function(){return 1}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},showEventTimes:{type:Boolean,default:function(){return!1}},timeFormatOptions:{type:Object,default:function(){}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}},dateClasses:{type:Object,default:function(){}},eventTop:{type:String,default:function(){return"1.4em"}},eventContentHeight:{type:String,default:function(){return"1.4em"}},eventBorderHeight:{type:String,default:function(){return"2px"}}},data:function(){return{currentDragEvent:null}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},defaultedShowDate:function(){return this.showDate||this.today()},periodStart:function(){return this.beginningOfPeriod(this.defaultedShowDate,this.displayPeriodUom,this.startingDayOfWeek)},periodEnd:function(){return this.addDays(this.incrementPeriod(this.periodStart,this.displayPeriodUom,this.displayPeriodCount),-1)},displayFirstDate:function(){return this.beginningOfWeek(this.periodStart,this.startingDayOfWeek)},displayLastDate:function(){return this.endOfWeek(this.periodEnd,this.startingDayOfWeek)},weeksOfPeriod:function(){var e=this,t=Math.floor((this.dayDiff(this.displayFirstDate,this.displayLastDate)+1)/7);return Array(t).fill().map(function(t,n){return e.addDays(e.displayFirstDate,7*n)})},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},fixedEvents:function(){return this.events.map(this.normalizeEvent)},periodLabel:function(){return this.formattedPeriod(this.periodStart,this.periodEnd,this.displayPeriodUom,this.monthNames)},headerProps:function(){return{previousYear:this.getIncrementedPeriod(-12),previousPeriod:this.getIncrementedPeriod(-1),nextPeriod:this.getIncrementedPeriod(1),nextYear:this.getIncrementedPeriod(12),currentPeriod:this.beginningOfPeriod(this.today(),this.displayPeriodUom,this.startingDayOfWeek),periodStart:this.periodStart,periodEnd:this.periodEnd,displayLocale:this.displayLocale,displayFirstDate:this.displayFirstDate,displayLastDate:this.displayLastDate,monthNames:this.monthNames,fixedEvents:this.fixedEvents}}},methods:{onClickDay:function(e){this.disablePast&&this.isInPast(e)||this.disableFuture&&this.isInFuture(e)||this.$emit("click-date",e)},onClickEvent:function(e,t){this.$emit("click-event",e,t)},onChangeDate:function(e){this.$emit("show-date-change",e)},getIncrementedPeriod:function(e){var t=this.incrementPeriod(this.periodStart,this.displayPeriodUom,e),n=this.incrementPeriod(t,this.displayPeriodUom,this.displayPeriodCount);return this.disablePast&&n<=this.today()?null:this.disableFuture&&t>this.today()?null:t},onDragStart:function(e,t){return!!this.enableDragDrop&&(this.currentDragEvent=e,t.dataTransfer.setData("text","foo"),this.$emit("drag-start",e),!0)},handleDragEvent:function(e,t){return!!this.enableDragDrop&&(!(!this.currentDragEvent&&!this.$scopedSlots.event)&&(this.$emit(e,this.currentDragEvent,t),!0))},onDragOver:function(e){this.handleDragEvent("drag-over-date",e)},onDragEnter:function(e,t){this.handleDragEvent("drag-enter-date",e)&&t.target.classList.add("draghover")},onDragLeave:function(e,t){this.handleDragEvent("drag-leave-date",e)&&t.target.classList.remove("draghover")},onDrop:function(e,t){this.handleDragEvent("drop-on-date",e)&&t.target.classList.remove("draghover")},findAndSortEventsInWeek:function(e){var t=this;return this.fixedEvents.filter(function(n){return n.startDate<t.addDays(e,7)&&n.endDate>=e},this).sort(function(e,t){return e.startDate<t.startDate?-1:t.startDate<e.startDate?1:e.endDate>t.endDate?-1:t.endDate>e.endDate?1:e.id<t.id?-1:1})},getWeekEvents:function(e){for(var t=this.findAndSortEventsInWeek(e),n=[],r=[[],[],[],[],[],[],[]],a=0;a<t.length;a++){var i=Object.assign({},t[a],{classes:[].concat(o(t[a].classes)),eventRow:0}),s=i.startDate<e,d=s?0:this.dayDiff(e,i.startDate),u=Math.min(7-d,this.dayDiff(this.addDays(e,d),i.endDate)+1);s&&i.classes.push("continued"),this.dayDiff(e,i.endDate)>6&&i.classes.push("toBeContinued"),i.originalEvent.url&&i.classes.push("hasUrl");for(var l=0;l<7;l++)if(l===d){for(var c=0;r[l][c];)c++;i.eventRow=c,r[l][c]=!0}else l<d+u&&(r[l][i.eventRow]=!0);i.classes.push("offset"+d),i.classes.push("span"+u),n.push(i)}return n},getFormattedTimeRange:function(e){var t=this.formattedTime(e.startDate,this.displayLocale,this.timeFormatOptions),n="";return this.isSameDateTime(e.startDate,e.endDate)||(n=this.formattedTime(e.endDate,this.displayLocale,this.timeFormatOptions)),(""!==t?'<span class="startTime">'+t+"</span>":"")+(""!==n?'<span class="endTime">'+n+"</span>":"")},getEventTitle:function(e){return this.showEventTimes?this.getFormattedTimeRange(e)+" "+e.title:e.title},getEventTop:function(e){var t=e.eventRow,n=this.eventContentHeight,r=this.eventBorderHeight;return"calc("+this.eventTop+" + "+t+"*"+n+" + "+t+"*"+r+")"}}}},function(e,t,n){"use strict";n.r(t);var r=n(4),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";function r(e,t,n,r,a,i,o,s){var d,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):a&&(d=s?function(){a.call(this,this.$root.$options.shadowRoot)}:a),d)if(u.functional){u._injectStyles=d;var l=u.render;u.render=function(e,t){return d.call(t),l(e,t)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,d):[d]}return{exports:e,options:u}}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"cv-header"},[n("div",{staticClass:"cv-header-nav"},[n("button",{staticClass:"previousYear",attrs:{disabled:!e.headerProps.previousYear},on:{click:function(t){e.onInput(e.headerProps.previousYear)}}},[e._v("<<")]),e._v(" "),n("button",{staticClass:"previousPeriod",attrs:{disabled:!e.headerProps.previousPeriod},on:{click:function(t){e.onInput(e.headerProps.previousPeriod)}}},[e._v("<")]),e._v(" "),n("button",{staticClass:"nextPeriod",attrs:{disabled:!e.headerProps.nextPeriod},on:{click:function(t){e.onInput(e.headerProps.nextPeriod)}}},[e._v(">")]),e._v(" "),n("button",{staticClass:"nextYear",attrs:{disabled:!e.headerProps.nextYear},on:{click:function(t){e.onInput(e.headerProps.nextYear)}}},[e._v(">>")]),e._v(" "),n("button",{staticClass:"currentPeriod",on:{click:function(t){e.onInput(e.headerProps.currentPeriod)}}},[e._v("Today")])]),e._v(" "),n("div",{staticClass:"periodLabel"},[e._t("label")],2)])},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["cv-wrapper","locale-"+e.languageCode(e.displayLocale),"locale-"+e.displayLocale,"y"+e.periodStart.getFullYear(),"m"+e.paddedMonth(e.periodStart),"period-"+e.displayPeriodUom,"periodCount-"+e.displayPeriodCount,{past:e.isPastMonth(e.periodStart),future:e.isFutureMonth(e.periodStart),noIntl:!e.supportsIntl}]},[e._t("header",[n("calendar-view-header",{attrs:{"header-props":e.headerProps},on:{input:e.onChangeDate}},[n("template",{slot:"label"},[e._v(e._s(e.periodLabel))])],2)],{headerProps:e.headerProps}),e._v(" "),n("div",{staticClass:"cv-header-days"},[e._l(e.weekdayNames,function(t,r){return[e._t("dayHeader",[n("div",{key:r,staticClass:"cv-header-day",class:"dow"+r},[e._v(e._s(t))])],{index:r,label:t})]})],2),e._v(" "),n("div",{staticClass:"cv-weeks"},e._l(e.weeksOfPeriod,function(t,r){return n("div",{key:r,class:["cv-week","week"+(r+1),"ws"+e.isoYearMonthDay(t)]},[e._l(e.daysOfWeek(t),function(t,r){return n("div",{key:r,class:["cv-day","dow"+t.getDay(),"d"+e.isoYearMonthDay(t),"d"+e.isoMonthDay(t),"d"+e.paddedDay(t),"instance"+e.instanceOfMonth(t),{outsideOfMonth:!e.isSameMonth(t,e.defaultedShowDate),today:e.isSameDate(t,e.today()),past:e.isInPast(t),future:e.isInFuture(t),last:e.isLastDayOfMonth(t),lastInstance:e.isLastInstanceOfMonth(t)}].concat(e.dateClasses&&e.dateClasses[e.isoYearMonthDay(t)]||null),on:{click:function(n){e.onClickDay(t)},drop:function(n){n.preventDefault(),e.onDrop(t,n)},dragover:function(n){n.preventDefault(),e.onDragOver(t)},dragenter:function(n){n.preventDefault(),e.onDragEnter(t,n)},dragleave:function(n){n.preventDefault(),e.onDragLeave(t,n)}}},[n("div",{staticClass:"cv-day-number"},[e._v(e._s(t.getDate()))]),e._v(" "),e._t("dayContent",null,{day:t})],2)}),e._v(" "),e._l(e.getWeekEvents(t),function(r){return[e._t("event",[n("div",{key:r.id,staticClass:"cv-event",class:r.classes,style:"top:"+e.getEventTop(r),attrs:{draggable:e.enableDragDrop,title:r.title},domProps:{innerHTML:e._s(e.getEventTitle(r))},on:{dragstart:function(t){e.onDragStart(r,t)},click:function(t){t.stopPropagation(),e.onClickEvent(r)}}})],{event:r,weekStartDate:t})]})],2)}))],2)},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;a<t.length;a++){var i=t[a],o=i[0],s={id:e+":"+a,css:i[1],media:i[2],sourceMap:i[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}n.r(t),n.d(t,"default",function(){return p});var a="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},o=a&&(document.head||document.getElementsByTagName("head")[0]),s=null,d=0,u=!1,l=function(){},c=null,f="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,a){u=n,c=a||{};var o=r(e,t);return v(o),function(t){for(var n=[],a=0;a<o.length;a++){var s=o[a];(d=i[s.id]).refs--,n.push(d)}t?v(o=r(e,t)):o=[];for(a=0;a<n.length;a++){var d;if(0===(d=n[a]).refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete i[d.id]}}}}function v(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(y(n.parts[a]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(a=0;a<n.parts.length;a++)o.push(y(n.parts[a]));i[n.id]={id:n.id,refs:1,parts:o}}}}function g(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function y(e){var t,n,r=document.querySelector("style["+f+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var a=d++;r=s||(s=g()),t=b.bind(null,r,a,!1),n=b.bind(null,r,a,!0)}else r=g(),t=function(e,t){var n=t.css,r=t.media,a=t.sourceMap;r&&e.setAttribute("media",r);c.ssrId&&e.setAttribute(f,t.id);a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var m,D=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function b(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=D(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([a]).join("\n")}var o;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var i=this[a][0];"number"==typeof i&&(r[i]=!0)}for(a=0;a<e.length;a++){var o=e[a];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,'\n.cv-wrapper{display:flex;flex-direction:column;height:100%;min-height:100%;max-height:100%\n}\n.cv-wrapper,.cv-wrapper div{box-sizing:border-box;line-height:1em;font-size:1em\n}\n.cv-header-days{flex-grow:0;flex-basis:auto;border-width:0 0 0 1px\n}\n.cv-header-day,.cv-header-days{display:flex;flex-shrink:0;flex-flow:row nowrap\n}\n.cv-header-day{flex-grow:1;flex-basis:0;align-items:center;justify-content:center;text-align:center;border-width:1px 1px 0 0\n}\n.cv-weeks{flex-shrink:1;flex-basis:auto;flex-flow:column nowrap;border-width:0 0 1px 1px\n}\n.cv-week,.cv-weeks{display:flex;flex-grow:1;overflow-y:auto;-ms-overflow-style:none\n}\n.cv-week{flex-flow:row nowrap;min-height:3em;border-width:0;position:relative;width:100%\n}\n.cv-day,.cv-week{flex-shrink:0;flex-basis:0\n}\n.cv-day{display:flex;flex-grow:1;position:relative;position:-webkit-sticky;position:sticky;top:0;border-width:1px 1px 0 0\n}\n.cv-day-number{position:absolute;right:0\n}\n.cv-event{position:absolute;white-space:nowrap;overflow:hidden;background-color:#f7f7f7;border-width:1px\n}\n.cv-day,.cv-event,.cv-header-day,.cv-header-days,.cv-week,.cv-weeks{border-style:solid;border-color:#ddd\n}\n.cv-event .endTime:before{content:"-"\n}\n.cv-day-number,.cv-event,.cv-header-day{padding:.2em\n}\n.cv-day-number:before{margin-right:.5em\n}\n.cv-event.offset0{left:0\n}\n.cv-event.offset1{left:14.28571%\n}\n.cv-event.offset2{left:28.57143%\n}\n.cv-event.offset3{left:42.85714%\n}\n.cv-event.offset4{left:57.14286%\n}\n.cv-event.offset5{left:71.42857%\n}\n.cv-event.offset6{left:85.71429%\n}\n.cv-event.span1{width:calc(14.28571% - .05em)\n}\n.cv-event.span2{width:calc(28.57143% - .05em)\n}\n.cv-event.span3{width:calc(42.85714% - .05em);text-align:center\n}\n.cv-event.span4{width:calc(57.14286% - .05em);text-align:center\n}\n.cv-event.span5{width:calc(71.42857% - .05em);text-align:center\n}\n.cv-event.span6{width:calc(85.71429% - .05em);text-align:center\n}\n.cv-event.span7{width:calc(100% - .05em);text-align:center\n}\n.cv-week::-webkit-scrollbar,.cv-weeks::-webkit-scrollbar{width:0;background:transparent\n}',""])},function(e,t,n){"use strict";var r=n(0);n.n(r).a},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,"\n.cv-header{display:flex;flex:0 1 auto;flex-flow:row nowrap;align-items:center;min-height:2.5em;border-width:1px 1px 0\n}\n.cv-header .periodLabel{display:flex;flex:1 1 auto;flex-flow:row nowrap;min-height:1.5em;line-height:1;font-size:1.5em\n}\n.cv-header,.cv-header button{border-style:solid;border-color:#ddd\n}\n.cv-header-nav,.cv-header .periodLabel{margin:.1em .6em\n}\n.cv-header-nav button,.cv-header .periodLabel{padding:.4em .6em\n}\n.cv-header button{box-sizing:border-box;line-height:1em;font-size:1em;border-width:1px\n}",""])},function(e,t,n){"use strict";var r=n(1);n.n(r).a},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n(3);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(14);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarViewHeader.vue",t.default=s.exports},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{today:function(){return this.dateOnly(new Date)},beginningOfPeriod:function(e,t,n){switch(t){case"year":return new Date(e.getFullYear(),0);case"month":return new Date(e.getFullYear(),e.getMonth());case"week":return this.beginningOfWeek(e,n);default:return null}},daysOfWeek:function(e){var t=this;return Array(7).fill().map(function(n,r){return t.addDays(e,r)})},addDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t,e.getHours(),e.getMinutes(),e.getSeconds())},beginningOfWeek:function(e,t){return this.addDays(e,(t-e.getDay()-7)%-7)},endOfWeek:function(e,t){return this.addDays(this.beginningOfWeek(e,t),7)},beginningOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth())},instanceOfMonth:function(e){return Math.ceil(e.getDate()/7)},incrementPeriod:function(e,t,n){return new Date(e.getFullYear()+("year"==t?n:0),e.getMonth()+("month"==t?n:0),e.getDate()+("week"==t?7*n:0))},paddedMonth:function(e){return("0"+String(e.getMonth()+1)).slice(-2)},paddedDay:function(e){return("0"+String(e.getDate())).slice(-2)},isoYearMonth:function(e){return e.getFullYear()+"-"+this.paddedMonth(e)},isoYearMonthDay:function(e){return this.isoYearMonth(e)+"-"+this.paddedDay(e)},isoMonthDay:function(e){return this.paddedMonth(e)+"-"+this.paddedDay(e)},formattedTime:function(e,t,n){if(0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds())return"";if(!this.supportsIntl()){var r=6e4*(new Date).getTimezoneOffset();return new Date(e-r).toISOString().slice(11,16)}return e.toLocaleTimeString(t,n)},formattedPeriod:function(e,t,n,r){var a=e.getFullYear()===t.getFullYear(),i=this.isSameMonth(e,t),o=!("year"===n)&&!("month"===n),s=[];return s.push(r[e.getMonth()]),o&&(s.push(" "),s.push(e.getDate())),a||(s.push(o?", ":" "),s.push(e.getFullYear())),i&&a?o&&s.push(" – "):(s.push(" – "),i||s.push(r[t.getMonth()]),o&&s.push(" ")),o?(s.push(t.getDate()),s.push(", ")):s.push(" "),s.push(t.getFullYear()),s.join("")},dayDiff:function(e,t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n.setUTCHours(0,0,0,0),r.setUTCHours(0,0,0,0),(n-r)/864e5},isSameDate:function(e,t){return 0===this.dayDiff(e,t)},isSameDateTime:function(e,t){return e.getTime()===t.getTime()},isSameMonth:function(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()},isPastMonth:function(e){return this.beginningOfMonth(e)<this.beginningOfMonth(this.today())},isFutureMonth:function(e){return this.beginningOfMonth(e)>this.beginningOfMonth(this.today())},isInFuture:function(e){return this.dateOnly(e)>this.today()},isInPast:function(e){return this.dateOnly(e)<this.today()},isLastInstanceOfMonth:function(e){return e.getMonth()!==this.addDays(e,7).getMonth()},isLastDayOfMonth:function(e){return e.getMonth()!==this.addDays(e,1).getMonth()},isSelectedDay:function(e){var t=this,n=Object.keys(this.dateClasses).find(function(n){return t.isSameDate(t.fromIsoStringToLocalDate(n),e)});return n?this.dateClasses[n]:void 0},fromIsoStringToLocalDate:function(e){var t=e.split(/\D/).map(function(e){return Number(e)});return t[1]--,new(Function.prototype.bind.apply(Date,[null].concat(r(t))))},toLocalDate:function(e){return"string"==typeof e?this.fromIsoStringToLocalDate(e):new Date(e)},dateOnly:function(e){var t=new Date(e);return t.setHours(0,0,0,0),t},languageCode:function(e){return e.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(e,t){if(!this.supportsIntl())return Array(12).fill("");var n=new Intl.DateTimeFormat(e,{month:t});return Array(12).fill().map(function(e,t){return n.format(new Date(2017,t,1))})},getFormattedWeekdayNames:function(e,t,n){if(!this.supportsIntl())return Array(7).fill("");var r=new Intl.DateTimeFormat(e,{weekday:t});return Array(7).fill().map(function(e,t){return r.format(new Date(2017,0,(t+1+n)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()},normalizeEvent:function(e){return{originalEvent:e,startDate:this.toLocalDate(e.startDate),endDate:this.toLocalDate(e.endDate||e.startDate),classes:e.classes?Array.isArray(e.classes)?[].concat(r(e.classes)):[e.classes]:[],title:e.title||"Untitled",id:e.id||"e"+Math.random().toString(36).substr(2,10)}}}}},function(e,t,n){"use strict";n.r(t);var r=n(8),a=n(5);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(12);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarView.vue",t.default=s.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(17),i=(r=a)&&r.__esModule?r:{default:r};t.default={install:function(e){e.component("calendar-view",i.default)}}}]);
window.CalendarView=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){var r=n(11);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("1a1e81be",r,!1,{})},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("ab36f444",r,!1,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"CalendarViewHeader",props:{headerProps:{type:Object,required:!0}},methods:{onInput:function(e){this.$emit("input",e)}}}},function(e,t,n){"use strict";n.r(t);var r=n(2),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(16)),a=i(n(15));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.default={name:"CalendarView",components:{CalendarViewHeader:a.default},mixins:[r.default],props:{showDate:{type:Date,default:function(){}},displayPeriodUom:{type:String,default:function(){return"month"}},displayPeriodCount:{type:Number,default:function(){return 1}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},showEventTimes:{type:Boolean,default:function(){return!1}},timeFormatOptions:{type:Object,default:function(){}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}},dateClasses:{type:Object,default:function(){}},eventTop:{type:String,default:function(){return"1.4em"}},eventContentHeight:{type:String,default:function(){return"1.4em"}},eventBorderHeight:{type:String,default:function(){return"2px"}}},data:function(){return{currentDragEvent:null}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},defaultedShowDate:function(){return this.showDate||this.today()},periodStart:function(){return this.beginningOfPeriod(this.defaultedShowDate,this.displayPeriodUom,this.startingDayOfWeek)},periodEnd:function(){return this.addDays(this.incrementPeriod(this.periodStart,this.displayPeriodUom,this.displayPeriodCount),-1)},displayFirstDate:function(){return this.beginningOfWeek(this.periodStart,this.startingDayOfWeek)},displayLastDate:function(){return this.endOfWeek(this.periodEnd,this.startingDayOfWeek)},weeksOfPeriod:function(){var e=this,t=Math.floor((this.dayDiff(this.displayFirstDate,this.displayLastDate)+1)/7);return Array(t).fill().map(function(t,n){return e.addDays(e.displayFirstDate,7*n)})},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},fixedEvents:function(){return this.events.map(this.normalizeEvent)},periodLabel:function(){return this.formattedPeriod(this.periodStart,this.periodEnd,this.displayPeriodUom,this.monthNames)},headerProps:function(){return{previousYear:this.getIncrementedPeriod(-12),previousPeriod:this.getIncrementedPeriod(-1),nextPeriod:this.getIncrementedPeriod(1),nextYear:this.getIncrementedPeriod(12),currentPeriod:this.beginningOfPeriod(this.today(),this.displayPeriodUom,this.startingDayOfWeek),periodStart:this.periodStart,periodEnd:this.periodEnd,displayLocale:this.displayLocale,displayFirstDate:this.displayFirstDate,displayLastDate:this.displayLastDate,monthNames:this.monthNames,fixedEvents:this.fixedEvents}}},methods:{onClickDay:function(e){this.disablePast&&this.isInPast(e)||this.disableFuture&&this.isInFuture(e)||this.$emit("click-date",e)},onClickEvent:function(e,t){this.$emit("click-event",e,t)},onChangeDate:function(e){this.$emit("show-date-change",e)},getIncrementedPeriod:function(e){var t=this.incrementPeriod(this.periodStart,this.displayPeriodUom,e),n=this.incrementPeriod(t,this.displayPeriodUom,this.displayPeriodCount);return this.disablePast&&n<=this.today()?null:this.disableFuture&&t>this.today()?null:t},onDragStart:function(e,t){return!!this.enableDragDrop&&(this.currentDragEvent=e,t.dataTransfer.setData("text","foo"),this.$emit("drag-start",e),!0)},handleDragEvent:function(e,t){return!!this.enableDragDrop&&(!(!this.currentDragEvent&&!this.$scopedSlots.event)&&(this.$emit(e,this.currentDragEvent,t),!0))},onDragOver:function(e){this.handleDragEvent("drag-over-date",e)},onDragEnter:function(e,t){this.handleDragEvent("drag-enter-date",e)&&t.target.classList.add("draghover")},onDragLeave:function(e,t){this.handleDragEvent("drag-leave-date",e)&&t.target.classList.remove("draghover")},onDrop:function(e,t){this.handleDragEvent("drop-on-date",e)&&t.target.classList.remove("draghover")},findAndSortEventsInWeek:function(e){var t=this;return this.fixedEvents.filter(function(n){return n.startDate<t.addDays(e,7)&&n.endDate>=e},this).sort(function(e,t){return e.startDate<t.startDate?-1:t.startDate<e.startDate?1:e.endDate>t.endDate?-1:t.endDate>e.endDate?1:e.id<t.id?-1:1})},getWeekEvents:function(e){for(var t=this.findAndSortEventsInWeek(e),n=[],r=[[],[],[],[],[],[],[]],a=0;a<t.length;a++){var i=Object.assign({},t[a],{classes:[].concat(o(t[a].classes)),eventRow:0}),s=i.startDate<e,d=s?0:this.dayDiff(e,i.startDate),u=Math.min(7-d,this.dayDiff(this.addDays(e,d),i.endDate)+1);s&&i.classes.push("continued"),this.dayDiff(e,i.endDate)>6&&i.classes.push("toBeContinued"),i.originalEvent.url&&i.classes.push("hasUrl");for(var l=0;l<7;l++)if(l===d){for(var c=0;r[l][c];)c++;i.eventRow=c,r[l][c]=!0}else l<d+u&&(r[l][i.eventRow]=!0);i.classes.push("offset"+d),i.classes.push("span"+u),n.push(i)}return n},getFormattedTimeRange:function(e){var t=this.formattedTime(e.startDate,this.displayLocale,this.timeFormatOptions),n="";return this.isSameDateTime(e.startDate,e.endDate)||(n=this.formattedTime(e.endDate,this.displayLocale,this.timeFormatOptions)),(""!==t?'<span class="startTime">'+t+"</span>":"")+(""!==n?'<span class="endTime">'+n+"</span>":"")},getEventTitle:function(e){return this.showEventTimes?this.getFormattedTimeRange(e)+" "+e.title:e.title},getEventTop:function(e){var t=e.eventRow,n=this.eventContentHeight,r=this.eventBorderHeight;return"calc("+this.eventTop+" + "+t+"*"+n+" + "+t+"*"+r+")"}}}},function(e,t,n){"use strict";n.r(t);var r=n(4),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";function r(e,t,n,r,a,i,o,s){var d,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):a&&(d=s?function(){a.call(this,this.$root.$options.shadowRoot)}:a),d)if(u.functional){u._injectStyles=d;var l=u.render;u.render=function(e,t){return d.call(t),l(e,t)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,d):[d]}return{exports:e,options:u}}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"cv-header"},[n("div",{staticClass:"cv-header-nav"},[n("button",{staticClass:"previousYear",attrs:{disabled:!e.headerProps.previousYear},on:{click:function(t){e.onInput(e.headerProps.previousYear)}}},[e._v("<<")]),e._v(" "),n("button",{staticClass:"previousPeriod",attrs:{disabled:!e.headerProps.previousPeriod},on:{click:function(t){e.onInput(e.headerProps.previousPeriod)}}},[e._v("<")]),e._v(" "),n("button",{staticClass:"nextPeriod",attrs:{disabled:!e.headerProps.nextPeriod},on:{click:function(t){e.onInput(e.headerProps.nextPeriod)}}},[e._v(">")]),e._v(" "),n("button",{staticClass:"nextYear",attrs:{disabled:!e.headerProps.nextYear},on:{click:function(t){e.onInput(e.headerProps.nextYear)}}},[e._v(">>")]),e._v(" "),n("button",{staticClass:"currentPeriod",on:{click:function(t){e.onInput(e.headerProps.currentPeriod)}}},[e._v("Today")])]),e._v(" "),n("div",{staticClass:"periodLabel"},[e._t("label")],2)])},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["cv-wrapper","locale-"+e.languageCode(e.displayLocale),"locale-"+e.displayLocale,"y"+e.periodStart.getFullYear(),"m"+e.paddedMonth(e.periodStart),"period-"+e.displayPeriodUom,"periodCount-"+e.displayPeriodCount,{past:e.isPastMonth(e.periodStart),future:e.isFutureMonth(e.periodStart),noIntl:!e.supportsIntl}]},[e._t("header",[n("calendar-view-header",{attrs:{"header-props":e.headerProps},on:{input:e.onChangeDate}},[n("template",{slot:"label"},[e._v(e._s(e.periodLabel))])],2)],{headerProps:e.headerProps}),e._v(" "),n("div",{staticClass:"cv-header-days"},[e._l(e.weekdayNames,function(t,r){return[e._t("dayHeader",[n("div",{key:r+"-dow",staticClass:"cv-header-day",class:"dow"+r},[e._v(e._s(t))])],{index:r+"-dow",label:t})]})],2),e._v(" "),n("div",{staticClass:"cv-weeks"},e._l(e.weeksOfPeriod,function(t,r){return n("div",{key:r+"-week",class:["cv-week","week"+(r+1),"ws"+e.isoYearMonthDay(t)]},[e._l(e.daysOfWeek(t),function(t,r){return n("div",{key:r+"-day",class:["cv-day","dow"+t.getDay(),"d"+e.isoYearMonthDay(t),"d"+e.isoMonthDay(t),"d"+e.paddedDay(t),"instance"+e.instanceOfMonth(t),{outsideOfMonth:!e.isSameMonth(t,e.defaultedShowDate),today:e.isSameDate(t,e.today()),past:e.isInPast(t),future:e.isInFuture(t),last:e.isLastDayOfMonth(t),lastInstance:e.isLastInstanceOfMonth(t)}].concat(e.dateClasses&&e.dateClasses[e.isoYearMonthDay(t)]||null),on:{click:function(n){e.onClickDay(t)},drop:function(n){n.preventDefault(),e.onDrop(t,n)},dragover:function(n){n.preventDefault(),e.onDragOver(t)},dragenter:function(n){n.preventDefault(),e.onDragEnter(t,n)},dragleave:function(n){n.preventDefault(),e.onDragLeave(t,n)}}},[n("div",{staticClass:"cv-day-number"},[e._v(e._s(t.getDate()))]),e._v(" "),e._t("dayContent",null,{day:t})],2)}),e._v(" "),e._l(e.getWeekEvents(t),function(r){return[e._t("event",[n("div",{key:r.id,staticClass:"cv-event",class:r.classes,style:"top:"+e.getEventTop(r),attrs:{draggable:e.enableDragDrop,title:r.title},domProps:{innerHTML:e._s(e.getEventTitle(r))},on:{dragstart:function(t){e.onDragStart(r,t)},click:function(t){t.stopPropagation(),e.onClickEvent(r)}}})],{event:r,weekStartDate:t,top:e.getEventTop(r)})]})],2)}))],2)},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;a<t.length;a++){var i=t[a],o=i[0],s={id:e+":"+a,css:i[1],media:i[2],sourceMap:i[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}n.r(t),n.d(t,"default",function(){return p});var a="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},o=a&&(document.head||document.getElementsByTagName("head")[0]),s=null,d=0,u=!1,l=function(){},c=null,f="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,a){u=n,c=a||{};var o=r(e,t);return v(o),function(t){for(var n=[],a=0;a<o.length;a++){var s=o[a];(d=i[s.id]).refs--,n.push(d)}t?v(o=r(e,t)):o=[];for(a=0;a<n.length;a++){var d;if(0===(d=n[a]).refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete i[d.id]}}}}function v(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(y(n.parts[a]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(a=0;a<n.parts.length;a++)o.push(y(n.parts[a]));i[n.id]={id:n.id,refs:1,parts:o}}}}function g(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function y(e){var t,n,r=document.querySelector("style["+f+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var a=d++;r=s||(s=g()),t=w.bind(null,r,a,!1),n=w.bind(null,r,a,!0)}else r=g(),t=function(e,t){var n=t.css,r=t.media,a=t.sourceMap;r&&e.setAttribute("media",r);c.ssrId&&e.setAttribute(f,t.id);a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var m,D=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function w(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=D(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([a]).join("\n")}var o;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var i=this[a][0];"number"==typeof i&&(r[i]=!0)}for(a=0;a<e.length;a++){var o=e[a];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,'\n.cv-wrapper{display:flex;flex-direction:column;flex-grow:1;height:100%;min-height:100%;max-height:100%;overflow-x:hidden;overflow-y:hidden\n}\n.cv-wrapper,.cv-wrapper div{box-sizing:border-box;line-height:1em;font-size:1em\n}\n.cv-header-days{flex-grow:0;flex-basis:auto;border-width:0 0 0 1px\n}\n.cv-header-day,.cv-header-days{display:flex;flex-shrink:0;flex-flow:row nowrap\n}\n.cv-header-day{flex-grow:1;flex-basis:0;align-items:center;justify-content:center;text-align:center;border-width:1px 1px 0 0\n}\n.cv-weeks{flex-shrink:1;flex-basis:auto;flex-flow:column nowrap;border-width:0 0 1px 1px\n}\n.cv-week,.cv-weeks{display:flex;flex-grow:1;overflow-y:auto;-ms-overflow-style:none\n}\n.cv-week{flex-flow:row nowrap;min-height:3em;border-width:0;position:relative;width:100%\n}\n.cv-day,.cv-week{flex-shrink:0;flex-basis:0\n}\n.cv-day{display:flex;flex-grow:1;position:relative;position:-webkit-sticky;position:sticky;top:0;border-width:1px 1px 0 0\n}\n.cv-day-number{position:absolute;right:0\n}\n.cv-event{position:absolute;white-space:nowrap;overflow:hidden;background-color:#f7f7f7;border-width:1px\n}\n.cv-day,.cv-event,.cv-header-day,.cv-header-days,.cv-week,.cv-weeks{border-style:solid;border-color:#ddd\n}\n.cv-event .endTime:before{content:"-"\n}\n.cv-day-number,.cv-event,.cv-header-day{padding:.2em\n}\n.cv-day-number:before{margin-right:.5em\n}\n.cv-event.offset0{left:0\n}\n.cv-event.offset1{left:14.28571%\n}\n.cv-event.offset2{left:28.57143%\n}\n.cv-event.offset3{left:42.85714%\n}\n.cv-event.offset4{left:57.14286%\n}\n.cv-event.offset5{left:71.42857%\n}\n.cv-event.offset6{left:85.71429%\n}\n.cv-event.span1{width:calc(14.28571% - .05em)\n}\n.cv-event.span2{width:calc(28.57143% - .05em)\n}\n.cv-event.span3{width:calc(42.85714% - .05em);text-align:center\n}\n.cv-event.span4{width:calc(57.14286% - .05em);text-align:center\n}\n.cv-event.span5{width:calc(71.42857% - .05em);text-align:center\n}\n.cv-event.span6{width:calc(85.71429% - .05em);text-align:center\n}\n.cv-event.span7{width:calc(100% - .05em);text-align:center\n}\n.cv-week::-webkit-scrollbar,.cv-weeks::-webkit-scrollbar{width:0;background:transparent\n}',""])},function(e,t,n){"use strict";var r=n(0);n.n(r).a},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,"\n.cv-header{display:flex;flex:0 1 auto;flex-flow:row nowrap;align-items:center;min-height:2.5em;border-width:1px 1px 0\n}\n.cv-header .periodLabel{display:flex;flex:1 1 auto;flex-flow:row nowrap;min-height:1.5em;line-height:1;font-size:1.5em\n}\n.cv-header,.cv-header button{border-style:solid;border-color:#ddd\n}\n.cv-header-nav,.cv-header .periodLabel{margin:.1em .6em\n}\n.cv-header-nav button,.cv-header .periodLabel{padding:.4em .6em\n}\n.cv-header button{box-sizing:border-box;line-height:1em;font-size:1em;border-width:1px\n}",""])},function(e,t,n){"use strict";var r=n(1);n.n(r).a},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n(3);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(14);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarViewHeader.vue",t.default=s.exports},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{today:function(){return this.dateOnly(new Date)},beginningOfPeriod:function(e,t,n){switch(t){case"year":return new Date(e.getFullYear(),0);case"month":return new Date(e.getFullYear(),e.getMonth());case"week":return this.beginningOfWeek(e,n);default:return null}},daysOfWeek:function(e){var t=this;return Array(7).fill().map(function(n,r){return t.addDays(e,r)})},addDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t,e.getHours(),e.getMinutes(),e.getSeconds())},beginningOfWeek:function(e,t){return this.addDays(e,(t-e.getDay()-7)%-7)},endOfWeek:function(e,t){return this.addDays(this.beginningOfWeek(e,t),7)},beginningOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth())},instanceOfMonth:function(e){return Math.ceil(e.getDate()/7)},incrementPeriod:function(e,t,n){return new Date(e.getFullYear()+("year"==t?n:0),e.getMonth()+("month"==t?n:0),e.getDate()+("week"==t?7*n:0))},paddedMonth:function(e){return("0"+String(e.getMonth()+1)).slice(-2)},paddedDay:function(e){return("0"+String(e.getDate())).slice(-2)},isoYearMonth:function(e){return e.getFullYear()+"-"+this.paddedMonth(e)},isoYearMonthDay:function(e){return this.isoYearMonth(e)+"-"+this.paddedDay(e)},isoMonthDay:function(e){return this.paddedMonth(e)+"-"+this.paddedDay(e)},formattedTime:function(e,t,n){if(0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds())return"";if(!this.supportsIntl()){var r=6e4*(new Date).getTimezoneOffset();return new Date(e-r).toISOString().slice(11,16)}return e.toLocaleTimeString(t,n)},formattedPeriod:function(e,t,n,r){var a=e.getFullYear()===t.getFullYear(),i=this.isSameMonth(e,t),o=!("year"===n)&&!("month"===n),s=[];return s.push(r[e.getMonth()]),o&&(s.push(" "),s.push(e.getDate())),a||(s.push(o?", ":" "),s.push(e.getFullYear())),i&&a?o&&s.push(" – "):(s.push(" – "),i||s.push(r[t.getMonth()]),o&&s.push(" ")),o?(s.push(t.getDate()),s.push(", ")):s.push(" "),s.push(t.getFullYear()),s.join("")},dayDiff:function(e,t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n.setUTCHours(0,0,0,0),r.setUTCHours(0,0,0,0),(n-r)/864e5},isSameDate:function(e,t){return 0===this.dayDiff(e,t)},isSameDateTime:function(e,t){return e.getTime()===t.getTime()},isSameMonth:function(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()},isPastMonth:function(e){return this.beginningOfMonth(e)<this.beginningOfMonth(this.today())},isFutureMonth:function(e){return this.beginningOfMonth(e)>this.beginningOfMonth(this.today())},isInFuture:function(e){return this.dateOnly(e)>this.today()},isInPast:function(e){return this.dateOnly(e)<this.today()},isLastInstanceOfMonth:function(e){return e.getMonth()!==this.addDays(e,7).getMonth()},isLastDayOfMonth:function(e){return e.getMonth()!==this.addDays(e,1).getMonth()},isSelectedDay:function(e){var t=this,n=Object.keys(this.dateClasses).find(function(n){return t.isSameDate(t.fromIsoStringToLocalDate(n),e)});return n?this.dateClasses[n]:void 0},fromIsoStringToLocalDate:function(e){var t=e.split(/\D/).map(function(e){return Number(e)});return t[1]--,new(Function.prototype.bind.apply(Date,[null].concat(r(t))))},toLocalDate:function(e){return"string"==typeof e?this.fromIsoStringToLocalDate(e):new Date(e)},dateOnly:function(e){var t=new Date(e);return t.setHours(0,0,0,0),t},languageCode:function(e){return e.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(e,t){if(!this.supportsIntl())return Array(12).fill("");var n=new Intl.DateTimeFormat(e,{month:t});return Array(12).fill().map(function(e,t){return n.format(new Date(2017,t,1))})},getFormattedWeekdayNames:function(e,t,n){if(!this.supportsIntl())return Array(7).fill("");var r=new Intl.DateTimeFormat(e,{weekday:t});return Array(7).fill().map(function(e,t){return r.format(new Date(2017,0,(t+1+n)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()},normalizeEvent:function(e){return{originalEvent:e,startDate:this.toLocalDate(e.startDate),endDate:this.toLocalDate(e.endDate||e.startDate),classes:e.classes?Array.isArray(e.classes)?[].concat(r(e.classes)):[e.classes]:[],title:e.title||"Untitled",id:e.id||"e"+Math.random().toString(36).substr(2,10)}}}}},function(e,t,n){"use strict";n.r(t);var r=n(8),a=n(5);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(12);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarView.vue",t.default=s.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(17),i=(r=a)&&r.__esModule?r:{default:r};t.default={install:function(e){e.component("calendar-view",i.default)}}}]);

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CalendarView",[],t):"object"==typeof exports?exports.CalendarView=t():e.CalendarView=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(e,t,n){var r=n(11);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("1a1e81be",r,!1,{})},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("ab36f444",r,!1,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"CalendarViewHeader",props:{headerProps:{type:Object,required:!0}},methods:{onInput:function(e){this.$emit("input",e)}}}},function(e,t,n){"use strict";n.r(t);var r=n(2),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(16)),a=i(n(15));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.default={name:"CalendarView",components:{CalendarViewHeader:a.default},mixins:[r.default],props:{showDate:{type:Date,default:function(){}},displayPeriodUom:{type:String,default:function(){return"month"}},displayPeriodCount:{type:Number,default:function(){return 1}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},showEventTimes:{type:Boolean,default:function(){return!1}},timeFormatOptions:{type:Object,default:function(){}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}},dateClasses:{type:Object,default:function(){}},eventTop:{type:String,default:function(){return"1.4em"}},eventContentHeight:{type:String,default:function(){return"1.4em"}},eventBorderHeight:{type:String,default:function(){return"2px"}}},data:function(){return{currentDragEvent:null}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},defaultedShowDate:function(){return this.showDate||this.today()},periodStart:function(){return this.beginningOfPeriod(this.defaultedShowDate,this.displayPeriodUom,this.startingDayOfWeek)},periodEnd:function(){return this.addDays(this.incrementPeriod(this.periodStart,this.displayPeriodUom,this.displayPeriodCount),-1)},displayFirstDate:function(){return this.beginningOfWeek(this.periodStart,this.startingDayOfWeek)},displayLastDate:function(){return this.endOfWeek(this.periodEnd,this.startingDayOfWeek)},weeksOfPeriod:function(){var e=this,t=Math.floor((this.dayDiff(this.displayFirstDate,this.displayLastDate)+1)/7);return Array(t).fill().map(function(t,n){return e.addDays(e.displayFirstDate,7*n)})},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},fixedEvents:function(){return this.events.map(this.normalizeEvent)},periodLabel:function(){return this.formattedPeriod(this.periodStart,this.periodEnd,this.displayPeriodUom,this.monthNames)},headerProps:function(){return{previousYear:this.getIncrementedPeriod(-12),previousPeriod:this.getIncrementedPeriod(-1),nextPeriod:this.getIncrementedPeriod(1),nextYear:this.getIncrementedPeriod(12),currentPeriod:this.beginningOfPeriod(this.today(),this.displayPeriodUom,this.startingDayOfWeek),periodStart:this.periodStart,periodEnd:this.periodEnd,displayLocale:this.displayLocale,displayFirstDate:this.displayFirstDate,displayLastDate:this.displayLastDate,monthNames:this.monthNames,fixedEvents:this.fixedEvents}}},methods:{onClickDay:function(e){this.disablePast&&this.isInPast(e)||this.disableFuture&&this.isInFuture(e)||this.$emit("click-date",e)},onClickEvent:function(e,t){this.$emit("click-event",e,t)},onChangeDate:function(e){this.$emit("show-date-change",e)},getIncrementedPeriod:function(e){var t=this.incrementPeriod(this.periodStart,this.displayPeriodUom,e),n=this.incrementPeriod(t,this.displayPeriodUom,this.displayPeriodCount);return this.disablePast&&n<=this.today()?null:this.disableFuture&&t>this.today()?null:t},onDragStart:function(e,t){return!!this.enableDragDrop&&(this.currentDragEvent=e,t.dataTransfer.setData("text","foo"),this.$emit("drag-start",e),!0)},handleDragEvent:function(e,t){return!!this.enableDragDrop&&(!(!this.currentDragEvent&&!this.$scopedSlots.event)&&(this.$emit(e,this.currentDragEvent,t),!0))},onDragOver:function(e){this.handleDragEvent("drag-over-date",e)},onDragEnter:function(e,t){this.handleDragEvent("drag-enter-date",e)&&t.target.classList.add("draghover")},onDragLeave:function(e,t){this.handleDragEvent("drag-leave-date",e)&&t.target.classList.remove("draghover")},onDrop:function(e,t){this.handleDragEvent("drop-on-date",e)&&t.target.classList.remove("draghover")},findAndSortEventsInWeek:function(e){var t=this;return this.fixedEvents.filter(function(n){return n.startDate<t.addDays(e,7)&&n.endDate>=e},this).sort(function(e,t){return e.startDate<t.startDate?-1:t.startDate<e.startDate?1:e.endDate>t.endDate?-1:t.endDate>e.endDate?1:e.id<t.id?-1:1})},getWeekEvents:function(e){for(var t=this.findAndSortEventsInWeek(e),n=[],r=[[],[],[],[],[],[],[]],a=0;a<t.length;a++){var i=Object.assign({},t[a],{classes:[].concat(o(t[a].classes)),eventRow:0}),s=i.startDate<e,d=s?0:this.dayDiff(e,i.startDate),u=Math.min(7-d,this.dayDiff(this.addDays(e,d),i.endDate)+1);s&&i.classes.push("continued"),this.dayDiff(e,i.endDate)>6&&i.classes.push("toBeContinued"),i.originalEvent.url&&i.classes.push("hasUrl");for(var l=0;l<7;l++)if(l===d){for(var c=0;r[l][c];)c++;i.eventRow=c,r[l][c]=!0}else l<d+u&&(r[l][i.eventRow]=!0);i.classes.push("offset"+d),i.classes.push("span"+u),n.push(i)}return n},getFormattedTimeRange:function(e){var t=this.formattedTime(e.startDate,this.displayLocale,this.timeFormatOptions),n="";return this.isSameDateTime(e.startDate,e.endDate)||(n=this.formattedTime(e.endDate,this.displayLocale,this.timeFormatOptions)),(""!==t?'<span class="startTime">'+t+"</span>":"")+(""!==n?'<span class="endTime">'+n+"</span>":"")},getEventTitle:function(e){return this.showEventTimes?this.getFormattedTimeRange(e)+" "+e.title:e.title},getEventTop:function(e){var t=e.eventRow,n=this.eventContentHeight,r=this.eventBorderHeight;return"calc("+this.eventTop+" + "+t+"*"+n+" + "+t+"*"+r+")"}}}},function(e,t,n){"use strict";n.r(t);var r=n(4),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";function r(e,t,n,r,a,i,o,s){var d,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):a&&(d=s?function(){a.call(this,this.$root.$options.shadowRoot)}:a),d)if(u.functional){u._injectStyles=d;var l=u.render;u.render=function(e,t){return d.call(t),l(e,t)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,d):[d]}return{exports:e,options:u}}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"cv-header"},[n("div",{staticClass:"cv-header-nav"},[n("button",{staticClass:"previousYear",attrs:{disabled:!e.headerProps.previousYear},on:{click:function(t){e.onInput(e.headerProps.previousYear)}}},[e._v("<<")]),e._v(" "),n("button",{staticClass:"previousPeriod",attrs:{disabled:!e.headerProps.previousPeriod},on:{click:function(t){e.onInput(e.headerProps.previousPeriod)}}},[e._v("<")]),e._v(" "),n("button",{staticClass:"nextPeriod",attrs:{disabled:!e.headerProps.nextPeriod},on:{click:function(t){e.onInput(e.headerProps.nextPeriod)}}},[e._v(">")]),e._v(" "),n("button",{staticClass:"nextYear",attrs:{disabled:!e.headerProps.nextYear},on:{click:function(t){e.onInput(e.headerProps.nextYear)}}},[e._v(">>")]),e._v(" "),n("button",{staticClass:"currentPeriod",on:{click:function(t){e.onInput(e.headerProps.currentPeriod)}}},[e._v("Today")])]),e._v(" "),n("div",{staticClass:"periodLabel"},[e._t("label")],2)])},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["cv-wrapper","locale-"+e.languageCode(e.displayLocale),"locale-"+e.displayLocale,"y"+e.periodStart.getFullYear(),"m"+e.paddedMonth(e.periodStart),"period-"+e.displayPeriodUom,"periodCount-"+e.displayPeriodCount,{past:e.isPastMonth(e.periodStart),future:e.isFutureMonth(e.periodStart),noIntl:!e.supportsIntl}]},[e._t("header",[n("calendar-view-header",{attrs:{"header-props":e.headerProps},on:{input:e.onChangeDate}},[n("template",{slot:"label"},[e._v(e._s(e.periodLabel))])],2)],{headerProps:e.headerProps}),e._v(" "),n("div",{staticClass:"cv-header-days"},[e._l(e.weekdayNames,function(t,r){return[e._t("dayHeader",[n("div",{key:r,staticClass:"cv-header-day",class:"dow"+r},[e._v(e._s(t))])],{index:r,label:t})]})],2),e._v(" "),n("div",{staticClass:"cv-weeks"},e._l(e.weeksOfPeriod,function(t,r){return n("div",{key:r,class:["cv-week","week"+(r+1),"ws"+e.isoYearMonthDay(t)]},[e._l(e.daysOfWeek(t),function(t,r){return n("div",{key:r,class:["cv-day","dow"+t.getDay(),"d"+e.isoYearMonthDay(t),"d"+e.isoMonthDay(t),"d"+e.paddedDay(t),"instance"+e.instanceOfMonth(t),{outsideOfMonth:!e.isSameMonth(t,e.defaultedShowDate),today:e.isSameDate(t,e.today()),past:e.isInPast(t),future:e.isInFuture(t),last:e.isLastDayOfMonth(t),lastInstance:e.isLastInstanceOfMonth(t)}].concat(e.dateClasses&&e.dateClasses[e.isoYearMonthDay(t)]||null),on:{click:function(n){e.onClickDay(t)},drop:function(n){n.preventDefault(),e.onDrop(t,n)},dragover:function(n){n.preventDefault(),e.onDragOver(t)},dragenter:function(n){n.preventDefault(),e.onDragEnter(t,n)},dragleave:function(n){n.preventDefault(),e.onDragLeave(t,n)}}},[n("div",{staticClass:"cv-day-number"},[e._v(e._s(t.getDate()))]),e._v(" "),e._t("dayContent",null,{day:t})],2)}),e._v(" "),e._l(e.getWeekEvents(t),function(r){return[e._t("event",[n("div",{key:r.id,staticClass:"cv-event",class:r.classes,style:"top:"+e.getEventTop(r),attrs:{draggable:e.enableDragDrop,title:r.title},domProps:{innerHTML:e._s(e.getEventTitle(r))},on:{dragstart:function(t){e.onDragStart(r,t)},click:function(t){t.stopPropagation(),e.onClickEvent(r)}}})],{event:r,weekStartDate:t})]})],2)}))],2)},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;a<t.length;a++){var i=t[a],o=i[0],s={id:e+":"+a,css:i[1],media:i[2],sourceMap:i[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}n.r(t),n.d(t,"default",function(){return p});var a="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},o=a&&(document.head||document.getElementsByTagName("head")[0]),s=null,d=0,u=!1,l=function(){},c=null,f="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,a){u=n,c=a||{};var o=r(e,t);return v(o),function(t){for(var n=[],a=0;a<o.length;a++){var s=o[a];(d=i[s.id]).refs--,n.push(d)}t?v(o=r(e,t)):o=[];for(a=0;a<n.length;a++){var d;if(0===(d=n[a]).refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete i[d.id]}}}}function v(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(y(n.parts[a]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(a=0;a<n.parts.length;a++)o.push(y(n.parts[a]));i[n.id]={id:n.id,refs:1,parts:o}}}}function g(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function y(e){var t,n,r=document.querySelector("style["+f+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var a=d++;r=s||(s=g()),t=b.bind(null,r,a,!1),n=b.bind(null,r,a,!0)}else r=g(),t=function(e,t){var n=t.css,r=t.media,a=t.sourceMap;r&&e.setAttribute("media",r);c.ssrId&&e.setAttribute(f,t.id);a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var m,D=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function b(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=D(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([a]).join("\n")}var o;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var i=this[a][0];"number"==typeof i&&(r[i]=!0)}for(a=0;a<e.length;a++){var o=e[a];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,'\n.cv-wrapper{display:flex;flex-direction:column;height:100%;min-height:100%;max-height:100%\n}\n.cv-wrapper,.cv-wrapper div{box-sizing:border-box;line-height:1em;font-size:1em\n}\n.cv-header-days{flex-grow:0;flex-basis:auto;border-width:0 0 0 1px\n}\n.cv-header-day,.cv-header-days{display:flex;flex-shrink:0;flex-flow:row nowrap\n}\n.cv-header-day{flex-grow:1;flex-basis:0;align-items:center;justify-content:center;text-align:center;border-width:1px 1px 0 0\n}\n.cv-weeks{flex-shrink:1;flex-basis:auto;flex-flow:column nowrap;border-width:0 0 1px 1px\n}\n.cv-week,.cv-weeks{display:flex;flex-grow:1;overflow-y:auto;-ms-overflow-style:none\n}\n.cv-week{flex-flow:row nowrap;min-height:3em;border-width:0;position:relative;width:100%\n}\n.cv-day,.cv-week{flex-shrink:0;flex-basis:0\n}\n.cv-day{display:flex;flex-grow:1;position:relative;position:-webkit-sticky;position:sticky;top:0;border-width:1px 1px 0 0\n}\n.cv-day-number{position:absolute;right:0\n}\n.cv-event{position:absolute;white-space:nowrap;overflow:hidden;background-color:#f7f7f7;border-width:1px\n}\n.cv-day,.cv-event,.cv-header-day,.cv-header-days,.cv-week,.cv-weeks{border-style:solid;border-color:#ddd\n}\n.cv-event .endTime:before{content:"-"\n}\n.cv-day-number,.cv-event,.cv-header-day{padding:.2em\n}\n.cv-day-number:before{margin-right:.5em\n}\n.cv-event.offset0{left:0\n}\n.cv-event.offset1{left:14.28571%\n}\n.cv-event.offset2{left:28.57143%\n}\n.cv-event.offset3{left:42.85714%\n}\n.cv-event.offset4{left:57.14286%\n}\n.cv-event.offset5{left:71.42857%\n}\n.cv-event.offset6{left:85.71429%\n}\n.cv-event.span1{width:calc(14.28571% - .05em)\n}\n.cv-event.span2{width:calc(28.57143% - .05em)\n}\n.cv-event.span3{width:calc(42.85714% - .05em);text-align:center\n}\n.cv-event.span4{width:calc(57.14286% - .05em);text-align:center\n}\n.cv-event.span5{width:calc(71.42857% - .05em);text-align:center\n}\n.cv-event.span6{width:calc(85.71429% - .05em);text-align:center\n}\n.cv-event.span7{width:calc(100% - .05em);text-align:center\n}\n.cv-week::-webkit-scrollbar,.cv-weeks::-webkit-scrollbar{width:0;background:transparent\n}',""])},function(e,t,n){"use strict";var r=n(0);n.n(r).a},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,"\n.cv-header{display:flex;flex:0 1 auto;flex-flow:row nowrap;align-items:center;min-height:2.5em;border-width:1px 1px 0\n}\n.cv-header .periodLabel{display:flex;flex:1 1 auto;flex-flow:row nowrap;min-height:1.5em;line-height:1;font-size:1.5em\n}\n.cv-header,.cv-header button{border-style:solid;border-color:#ddd\n}\n.cv-header-nav,.cv-header .periodLabel{margin:.1em .6em\n}\n.cv-header-nav button,.cv-header .periodLabel{padding:.4em .6em\n}\n.cv-header button{box-sizing:border-box;line-height:1em;font-size:1em;border-width:1px\n}",""])},function(e,t,n){"use strict";var r=n(1);n.n(r).a},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n(3);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(14);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarViewHeader.vue",t.default=s.exports},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{today:function(){return this.dateOnly(new Date)},beginningOfPeriod:function(e,t,n){switch(t){case"year":return new Date(e.getFullYear(),0);case"month":return new Date(e.getFullYear(),e.getMonth());case"week":return this.beginningOfWeek(e,n);default:return null}},daysOfWeek:function(e){var t=this;return Array(7).fill().map(function(n,r){return t.addDays(e,r)})},addDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t,e.getHours(),e.getMinutes(),e.getSeconds())},beginningOfWeek:function(e,t){return this.addDays(e,(t-e.getDay()-7)%-7)},endOfWeek:function(e,t){return this.addDays(this.beginningOfWeek(e,t),7)},beginningOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth())},instanceOfMonth:function(e){return Math.ceil(e.getDate()/7)},incrementPeriod:function(e,t,n){return new Date(e.getFullYear()+("year"==t?n:0),e.getMonth()+("month"==t?n:0),e.getDate()+("week"==t?7*n:0))},paddedMonth:function(e){return("0"+String(e.getMonth()+1)).slice(-2)},paddedDay:function(e){return("0"+String(e.getDate())).slice(-2)},isoYearMonth:function(e){return e.getFullYear()+"-"+this.paddedMonth(e)},isoYearMonthDay:function(e){return this.isoYearMonth(e)+"-"+this.paddedDay(e)},isoMonthDay:function(e){return this.paddedMonth(e)+"-"+this.paddedDay(e)},formattedTime:function(e,t,n){if(0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds())return"";if(!this.supportsIntl()){var r=6e4*(new Date).getTimezoneOffset();return new Date(e-r).toISOString().slice(11,16)}return e.toLocaleTimeString(t,n)},formattedPeriod:function(e,t,n,r){var a=e.getFullYear()===t.getFullYear(),i=this.isSameMonth(e,t),o=!("year"===n)&&!("month"===n),s=[];return s.push(r[e.getMonth()]),o&&(s.push(" "),s.push(e.getDate())),a||(s.push(o?", ":" "),s.push(e.getFullYear())),i&&a?o&&s.push(" – "):(s.push(" – "),i||s.push(r[t.getMonth()]),o&&s.push(" ")),o?(s.push(t.getDate()),s.push(", ")):s.push(" "),s.push(t.getFullYear()),s.join("")},dayDiff:function(e,t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n.setUTCHours(0,0,0,0),r.setUTCHours(0,0,0,0),(n-r)/864e5},isSameDate:function(e,t){return 0===this.dayDiff(e,t)},isSameDateTime:function(e,t){return e.getTime()===t.getTime()},isSameMonth:function(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()},isPastMonth:function(e){return this.beginningOfMonth(e)<this.beginningOfMonth(this.today())},isFutureMonth:function(e){return this.beginningOfMonth(e)>this.beginningOfMonth(this.today())},isInFuture:function(e){return this.dateOnly(e)>this.today()},isInPast:function(e){return this.dateOnly(e)<this.today()},isLastInstanceOfMonth:function(e){return e.getMonth()!==this.addDays(e,7).getMonth()},isLastDayOfMonth:function(e){return e.getMonth()!==this.addDays(e,1).getMonth()},isSelectedDay:function(e){var t=this,n=Object.keys(this.dateClasses).find(function(n){return t.isSameDate(t.fromIsoStringToLocalDate(n),e)});return n?this.dateClasses[n]:void 0},fromIsoStringToLocalDate:function(e){var t=e.split(/\D/).map(function(e){return Number(e)});return t[1]--,new(Function.prototype.bind.apply(Date,[null].concat(r(t))))},toLocalDate:function(e){return"string"==typeof e?this.fromIsoStringToLocalDate(e):new Date(e)},dateOnly:function(e){var t=new Date(e);return t.setHours(0,0,0,0),t},languageCode:function(e){return e.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(e,t){if(!this.supportsIntl())return Array(12).fill("");var n=new Intl.DateTimeFormat(e,{month:t});return Array(12).fill().map(function(e,t){return n.format(new Date(2017,t,1))})},getFormattedWeekdayNames:function(e,t,n){if(!this.supportsIntl())return Array(7).fill("");var r=new Intl.DateTimeFormat(e,{weekday:t});return Array(7).fill().map(function(e,t){return r.format(new Date(2017,0,(t+1+n)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()},normalizeEvent:function(e){return{originalEvent:e,startDate:this.toLocalDate(e.startDate),endDate:this.toLocalDate(e.endDate||e.startDate),classes:e.classes?Array.isArray(e.classes)?[].concat(r(e.classes)):[e.classes]:[],title:e.title||"Untitled",id:e.id||"e"+Math.random().toString(36).substr(2,10)}}}}},function(e,t,n){"use strict";n.r(t);var r=n(8),a=n(5);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(12);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarView.vue",t.default=s.exports}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CalendarView",[],t):"object"==typeof exports?exports.CalendarView=t():e.CalendarView=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(e,t,n){var r=n(11);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("1a1e81be",r,!1,{})},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("ab36f444",r,!1,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"CalendarViewHeader",props:{headerProps:{type:Object,required:!0}},methods:{onInput:function(e){this.$emit("input",e)}}}},function(e,t,n){"use strict";n.r(t);var r=n(2),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(16)),a=i(n(15));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.default={name:"CalendarView",components:{CalendarViewHeader:a.default},mixins:[r.default],props:{showDate:{type:Date,default:function(){}},displayPeriodUom:{type:String,default:function(){return"month"}},displayPeriodCount:{type:Number,default:function(){return 1}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},showEventTimes:{type:Boolean,default:function(){return!1}},timeFormatOptions:{type:Object,default:function(){}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}},dateClasses:{type:Object,default:function(){}},eventTop:{type:String,default:function(){return"1.4em"}},eventContentHeight:{type:String,default:function(){return"1.4em"}},eventBorderHeight:{type:String,default:function(){return"2px"}}},data:function(){return{currentDragEvent:null}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},defaultedShowDate:function(){return this.showDate||this.today()},periodStart:function(){return this.beginningOfPeriod(this.defaultedShowDate,this.displayPeriodUom,this.startingDayOfWeek)},periodEnd:function(){return this.addDays(this.incrementPeriod(this.periodStart,this.displayPeriodUom,this.displayPeriodCount),-1)},displayFirstDate:function(){return this.beginningOfWeek(this.periodStart,this.startingDayOfWeek)},displayLastDate:function(){return this.endOfWeek(this.periodEnd,this.startingDayOfWeek)},weeksOfPeriod:function(){var e=this,t=Math.floor((this.dayDiff(this.displayFirstDate,this.displayLastDate)+1)/7);return Array(t).fill().map(function(t,n){return e.addDays(e.displayFirstDate,7*n)})},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},fixedEvents:function(){return this.events.map(this.normalizeEvent)},periodLabel:function(){return this.formattedPeriod(this.periodStart,this.periodEnd,this.displayPeriodUom,this.monthNames)},headerProps:function(){return{previousYear:this.getIncrementedPeriod(-12),previousPeriod:this.getIncrementedPeriod(-1),nextPeriod:this.getIncrementedPeriod(1),nextYear:this.getIncrementedPeriod(12),currentPeriod:this.beginningOfPeriod(this.today(),this.displayPeriodUom,this.startingDayOfWeek),periodStart:this.periodStart,periodEnd:this.periodEnd,displayLocale:this.displayLocale,displayFirstDate:this.displayFirstDate,displayLastDate:this.displayLastDate,monthNames:this.monthNames,fixedEvents:this.fixedEvents}}},methods:{onClickDay:function(e){this.disablePast&&this.isInPast(e)||this.disableFuture&&this.isInFuture(e)||this.$emit("click-date",e)},onClickEvent:function(e,t){this.$emit("click-event",e,t)},onChangeDate:function(e){this.$emit("show-date-change",e)},getIncrementedPeriod:function(e){var t=this.incrementPeriod(this.periodStart,this.displayPeriodUom,e),n=this.incrementPeriod(t,this.displayPeriodUom,this.displayPeriodCount);return this.disablePast&&n<=this.today()?null:this.disableFuture&&t>this.today()?null:t},onDragStart:function(e,t){return!!this.enableDragDrop&&(this.currentDragEvent=e,t.dataTransfer.setData("text","foo"),this.$emit("drag-start",e),!0)},handleDragEvent:function(e,t){return!!this.enableDragDrop&&(!(!this.currentDragEvent&&!this.$scopedSlots.event)&&(this.$emit(e,this.currentDragEvent,t),!0))},onDragOver:function(e){this.handleDragEvent("drag-over-date",e)},onDragEnter:function(e,t){this.handleDragEvent("drag-enter-date",e)&&t.target.classList.add("draghover")},onDragLeave:function(e,t){this.handleDragEvent("drag-leave-date",e)&&t.target.classList.remove("draghover")},onDrop:function(e,t){this.handleDragEvent("drop-on-date",e)&&t.target.classList.remove("draghover")},findAndSortEventsInWeek:function(e){var t=this;return this.fixedEvents.filter(function(n){return n.startDate<t.addDays(e,7)&&n.endDate>=e},this).sort(function(e,t){return e.startDate<t.startDate?-1:t.startDate<e.startDate?1:e.endDate>t.endDate?-1:t.endDate>e.endDate?1:e.id<t.id?-1:1})},getWeekEvents:function(e){for(var t=this.findAndSortEventsInWeek(e),n=[],r=[[],[],[],[],[],[],[]],a=0;a<t.length;a++){var i=Object.assign({},t[a],{classes:[].concat(o(t[a].classes)),eventRow:0}),s=i.startDate<e,d=s?0:this.dayDiff(e,i.startDate),u=Math.min(7-d,this.dayDiff(this.addDays(e,d),i.endDate)+1);s&&i.classes.push("continued"),this.dayDiff(e,i.endDate)>6&&i.classes.push("toBeContinued"),i.originalEvent.url&&i.classes.push("hasUrl");for(var l=0;l<7;l++)if(l===d){for(var c=0;r[l][c];)c++;i.eventRow=c,r[l][c]=!0}else l<d+u&&(r[l][i.eventRow]=!0);i.classes.push("offset"+d),i.classes.push("span"+u),n.push(i)}return n},getFormattedTimeRange:function(e){var t=this.formattedTime(e.startDate,this.displayLocale,this.timeFormatOptions),n="";return this.isSameDateTime(e.startDate,e.endDate)||(n=this.formattedTime(e.endDate,this.displayLocale,this.timeFormatOptions)),(""!==t?'<span class="startTime">'+t+"</span>":"")+(""!==n?'<span class="endTime">'+n+"</span>":"")},getEventTitle:function(e){return this.showEventTimes?this.getFormattedTimeRange(e)+" "+e.title:e.title},getEventTop:function(e){var t=e.eventRow,n=this.eventContentHeight,r=this.eventBorderHeight;return"calc("+this.eventTop+" + "+t+"*"+n+" + "+t+"*"+r+")"}}}},function(e,t,n){"use strict";n.r(t);var r=n(4),a=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i);t.default=a.a},function(e,t,n){"use strict";function r(e,t,n,r,a,i,o,s){var d,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):a&&(d=s?function(){a.call(this,this.$root.$options.shadowRoot)}:a),d)if(u.functional){u._injectStyles=d;var l=u.render;u.render=function(e,t){return d.call(t),l(e,t)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,d):[d]}return{exports:e,options:u}}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"cv-header"},[n("div",{staticClass:"cv-header-nav"},[n("button",{staticClass:"previousYear",attrs:{disabled:!e.headerProps.previousYear},on:{click:function(t){e.onInput(e.headerProps.previousYear)}}},[e._v("<<")]),e._v(" "),n("button",{staticClass:"previousPeriod",attrs:{disabled:!e.headerProps.previousPeriod},on:{click:function(t){e.onInput(e.headerProps.previousPeriod)}}},[e._v("<")]),e._v(" "),n("button",{staticClass:"nextPeriod",attrs:{disabled:!e.headerProps.nextPeriod},on:{click:function(t){e.onInput(e.headerProps.nextPeriod)}}},[e._v(">")]),e._v(" "),n("button",{staticClass:"nextYear",attrs:{disabled:!e.headerProps.nextYear},on:{click:function(t){e.onInput(e.headerProps.nextYear)}}},[e._v(">>")]),e._v(" "),n("button",{staticClass:"currentPeriod",on:{click:function(t){e.onInput(e.headerProps.currentPeriod)}}},[e._v("Today")])]),e._v(" "),n("div",{staticClass:"periodLabel"},[e._t("label")],2)])},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["cv-wrapper","locale-"+e.languageCode(e.displayLocale),"locale-"+e.displayLocale,"y"+e.periodStart.getFullYear(),"m"+e.paddedMonth(e.periodStart),"period-"+e.displayPeriodUom,"periodCount-"+e.displayPeriodCount,{past:e.isPastMonth(e.periodStart),future:e.isFutureMonth(e.periodStart),noIntl:!e.supportsIntl}]},[e._t("header",[n("calendar-view-header",{attrs:{"header-props":e.headerProps},on:{input:e.onChangeDate}},[n("template",{slot:"label"},[e._v(e._s(e.periodLabel))])],2)],{headerProps:e.headerProps}),e._v(" "),n("div",{staticClass:"cv-header-days"},[e._l(e.weekdayNames,function(t,r){return[e._t("dayHeader",[n("div",{key:r+"-dow",staticClass:"cv-header-day",class:"dow"+r},[e._v(e._s(t))])],{index:r+"-dow",label:t})]})],2),e._v(" "),n("div",{staticClass:"cv-weeks"},e._l(e.weeksOfPeriod,function(t,r){return n("div",{key:r+"-week",class:["cv-week","week"+(r+1),"ws"+e.isoYearMonthDay(t)]},[e._l(e.daysOfWeek(t),function(t,r){return n("div",{key:r+"-day",class:["cv-day","dow"+t.getDay(),"d"+e.isoYearMonthDay(t),"d"+e.isoMonthDay(t),"d"+e.paddedDay(t),"instance"+e.instanceOfMonth(t),{outsideOfMonth:!e.isSameMonth(t,e.defaultedShowDate),today:e.isSameDate(t,e.today()),past:e.isInPast(t),future:e.isInFuture(t),last:e.isLastDayOfMonth(t),lastInstance:e.isLastInstanceOfMonth(t)}].concat(e.dateClasses&&e.dateClasses[e.isoYearMonthDay(t)]||null),on:{click:function(n){e.onClickDay(t)},drop:function(n){n.preventDefault(),e.onDrop(t,n)},dragover:function(n){n.preventDefault(),e.onDragOver(t)},dragenter:function(n){n.preventDefault(),e.onDragEnter(t,n)},dragleave:function(n){n.preventDefault(),e.onDragLeave(t,n)}}},[n("div",{staticClass:"cv-day-number"},[e._v(e._s(t.getDate()))]),e._v(" "),e._t("dayContent",null,{day:t})],2)}),e._v(" "),e._l(e.getWeekEvents(t),function(r){return[e._t("event",[n("div",{key:r.id,staticClass:"cv-event",class:r.classes,style:"top:"+e.getEventTop(r),attrs:{draggable:e.enableDragDrop,title:r.title},domProps:{innerHTML:e._s(e.getEventTitle(r))},on:{dragstart:function(t){e.onDragStart(r,t)},click:function(t){t.stopPropagation(),e.onClickEvent(r)}}})],{event:r,weekStartDate:t,top:e.getEventTop(r)})]})],2)}))],2)},a=[];r._withStripped=!0,n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a})},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;a<t.length;a++){var i=t[a],o=i[0],s={id:e+":"+a,css:i[1],media:i[2],sourceMap:i[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}n.r(t),n.d(t,"default",function(){return p});var a="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},o=a&&(document.head||document.getElementsByTagName("head")[0]),s=null,d=0,u=!1,l=function(){},c=null,f="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,a){u=n,c=a||{};var o=r(e,t);return v(o),function(t){for(var n=[],a=0;a<o.length;a++){var s=o[a];(d=i[s.id]).refs--,n.push(d)}t?v(o=r(e,t)):o=[];for(a=0;a<n.length;a++){var d;if(0===(d=n[a]).refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete i[d.id]}}}}function v(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(y(n.parts[a]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(a=0;a<n.parts.length;a++)o.push(y(n.parts[a]));i[n.id]={id:n.id,refs:1,parts:o}}}}function g(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function y(e){var t,n,r=document.querySelector("style["+f+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var a=d++;r=s||(s=g()),t=w.bind(null,r,a,!1),n=w.bind(null,r,a,!0)}else r=g(),t=function(e,t){var n=t.css,r=t.media,a=t.sourceMap;r&&e.setAttribute("media",r);c.ssrId&&e.setAttribute(f,t.id);a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var m,D=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function w(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=D(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([a]).join("\n")}var o;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var i=this[a][0];"number"==typeof i&&(r[i]=!0)}for(a=0;a<e.length;a++){var o=e[a];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,'\n.cv-wrapper{display:flex;flex-direction:column;flex-grow:1;height:100%;min-height:100%;max-height:100%;overflow-x:hidden;overflow-y:hidden\n}\n.cv-wrapper,.cv-wrapper div{box-sizing:border-box;line-height:1em;font-size:1em\n}\n.cv-header-days{flex-grow:0;flex-basis:auto;border-width:0 0 0 1px\n}\n.cv-header-day,.cv-header-days{display:flex;flex-shrink:0;flex-flow:row nowrap\n}\n.cv-header-day{flex-grow:1;flex-basis:0;align-items:center;justify-content:center;text-align:center;border-width:1px 1px 0 0\n}\n.cv-weeks{flex-shrink:1;flex-basis:auto;flex-flow:column nowrap;border-width:0 0 1px 1px\n}\n.cv-week,.cv-weeks{display:flex;flex-grow:1;overflow-y:auto;-ms-overflow-style:none\n}\n.cv-week{flex-flow:row nowrap;min-height:3em;border-width:0;position:relative;width:100%\n}\n.cv-day,.cv-week{flex-shrink:0;flex-basis:0\n}\n.cv-day{display:flex;flex-grow:1;position:relative;position:-webkit-sticky;position:sticky;top:0;border-width:1px 1px 0 0\n}\n.cv-day-number{position:absolute;right:0\n}\n.cv-event{position:absolute;white-space:nowrap;overflow:hidden;background-color:#f7f7f7;border-width:1px\n}\n.cv-day,.cv-event,.cv-header-day,.cv-header-days,.cv-week,.cv-weeks{border-style:solid;border-color:#ddd\n}\n.cv-event .endTime:before{content:"-"\n}\n.cv-day-number,.cv-event,.cv-header-day{padding:.2em\n}\n.cv-day-number:before{margin-right:.5em\n}\n.cv-event.offset0{left:0\n}\n.cv-event.offset1{left:14.28571%\n}\n.cv-event.offset2{left:28.57143%\n}\n.cv-event.offset3{left:42.85714%\n}\n.cv-event.offset4{left:57.14286%\n}\n.cv-event.offset5{left:71.42857%\n}\n.cv-event.offset6{left:85.71429%\n}\n.cv-event.span1{width:calc(14.28571% - .05em)\n}\n.cv-event.span2{width:calc(28.57143% - .05em)\n}\n.cv-event.span3{width:calc(42.85714% - .05em);text-align:center\n}\n.cv-event.span4{width:calc(57.14286% - .05em);text-align:center\n}\n.cv-event.span5{width:calc(71.42857% - .05em);text-align:center\n}\n.cv-event.span6{width:calc(85.71429% - .05em);text-align:center\n}\n.cv-event.span7{width:calc(100% - .05em);text-align:center\n}\n.cv-week::-webkit-scrollbar,.cv-weeks::-webkit-scrollbar{width:0;background:transparent\n}',""])},function(e,t,n){"use strict";var r=n(0);n.n(r).a},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,"\n.cv-header{display:flex;flex:0 1 auto;flex-flow:row nowrap;align-items:center;min-height:2.5em;border-width:1px 1px 0\n}\n.cv-header .periodLabel{display:flex;flex:1 1 auto;flex-flow:row nowrap;min-height:1.5em;line-height:1;font-size:1.5em\n}\n.cv-header,.cv-header button{border-style:solid;border-color:#ddd\n}\n.cv-header-nav,.cv-header .periodLabel{margin:.1em .6em\n}\n.cv-header-nav button,.cv-header .periodLabel{padding:.4em .6em\n}\n.cv-header button{box-sizing:border-box;line-height:1em;font-size:1em;border-width:1px\n}",""])},function(e,t,n){"use strict";var r=n(1);n.n(r).a},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n(3);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(14);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarViewHeader.vue",t.default=s.exports},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{today:function(){return this.dateOnly(new Date)},beginningOfPeriod:function(e,t,n){switch(t){case"year":return new Date(e.getFullYear(),0);case"month":return new Date(e.getFullYear(),e.getMonth());case"week":return this.beginningOfWeek(e,n);default:return null}},daysOfWeek:function(e){var t=this;return Array(7).fill().map(function(n,r){return t.addDays(e,r)})},addDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t,e.getHours(),e.getMinutes(),e.getSeconds())},beginningOfWeek:function(e,t){return this.addDays(e,(t-e.getDay()-7)%-7)},endOfWeek:function(e,t){return this.addDays(this.beginningOfWeek(e,t),7)},beginningOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth())},instanceOfMonth:function(e){return Math.ceil(e.getDate()/7)},incrementPeriod:function(e,t,n){return new Date(e.getFullYear()+("year"==t?n:0),e.getMonth()+("month"==t?n:0),e.getDate()+("week"==t?7*n:0))},paddedMonth:function(e){return("0"+String(e.getMonth()+1)).slice(-2)},paddedDay:function(e){return("0"+String(e.getDate())).slice(-2)},isoYearMonth:function(e){return e.getFullYear()+"-"+this.paddedMonth(e)},isoYearMonthDay:function(e){return this.isoYearMonth(e)+"-"+this.paddedDay(e)},isoMonthDay:function(e){return this.paddedMonth(e)+"-"+this.paddedDay(e)},formattedTime:function(e,t,n){if(0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds())return"";if(!this.supportsIntl()){var r=6e4*(new Date).getTimezoneOffset();return new Date(e-r).toISOString().slice(11,16)}return e.toLocaleTimeString(t,n)},formattedPeriod:function(e,t,n,r){var a=e.getFullYear()===t.getFullYear(),i=this.isSameMonth(e,t),o=!("year"===n)&&!("month"===n),s=[];return s.push(r[e.getMonth()]),o&&(s.push(" "),s.push(e.getDate())),a||(s.push(o?", ":" "),s.push(e.getFullYear())),i&&a?o&&s.push(" – "):(s.push(" – "),i||s.push(r[t.getMonth()]),o&&s.push(" ")),o?(s.push(t.getDate()),s.push(", ")):s.push(" "),s.push(t.getFullYear()),s.join("")},dayDiff:function(e,t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n.setUTCHours(0,0,0,0),r.setUTCHours(0,0,0,0),(n-r)/864e5},isSameDate:function(e,t){return 0===this.dayDiff(e,t)},isSameDateTime:function(e,t){return e.getTime()===t.getTime()},isSameMonth:function(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()},isPastMonth:function(e){return this.beginningOfMonth(e)<this.beginningOfMonth(this.today())},isFutureMonth:function(e){return this.beginningOfMonth(e)>this.beginningOfMonth(this.today())},isInFuture:function(e){return this.dateOnly(e)>this.today()},isInPast:function(e){return this.dateOnly(e)<this.today()},isLastInstanceOfMonth:function(e){return e.getMonth()!==this.addDays(e,7).getMonth()},isLastDayOfMonth:function(e){return e.getMonth()!==this.addDays(e,1).getMonth()},isSelectedDay:function(e){var t=this,n=Object.keys(this.dateClasses).find(function(n){return t.isSameDate(t.fromIsoStringToLocalDate(n),e)});return n?this.dateClasses[n]:void 0},fromIsoStringToLocalDate:function(e){var t=e.split(/\D/).map(function(e){return Number(e)});return t[1]--,new(Function.prototype.bind.apply(Date,[null].concat(r(t))))},toLocalDate:function(e){return"string"==typeof e?this.fromIsoStringToLocalDate(e):new Date(e)},dateOnly:function(e){var t=new Date(e);return t.setHours(0,0,0,0),t},languageCode:function(e){return e.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(e,t){if(!this.supportsIntl())return Array(12).fill("");var n=new Intl.DateTimeFormat(e,{month:t});return Array(12).fill().map(function(e,t){return n.format(new Date(2017,t,1))})},getFormattedWeekdayNames:function(e,t,n){if(!this.supportsIntl())return Array(7).fill("");var r=new Intl.DateTimeFormat(e,{weekday:t});return Array(7).fill().map(function(e,t){return r.format(new Date(2017,0,(t+1+n)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()},normalizeEvent:function(e){return{originalEvent:e,startDate:this.toLocalDate(e.startDate),endDate:this.toLocalDate(e.endDate||e.startDate),classes:e.classes?Array.isArray(e.classes)?[].concat(r(e.classes)):[e.classes]:[],title:e.title||"Untitled",id:e.id||"e"+Math.random().toString(36).substr(2,10)}}}}},function(e,t,n){"use strict";n.r(t);var r=n(8),a=n(5);for(var i in a)"default"!==i&&function(e){n.d(t,e,function(){return a[e]})}(i);n(12);var o=n(6),s=Object(o.a)(a.default,r.a,r.b,!1,null,null,null);s.options.__file="src/CalendarView.vue",t.default=s.exports}])});
{
"name": "vue-simple-calendar",
"version": "3.0.1",
"version": "3.0.2",
"description": "Simple calendar event control",

@@ -15,3 +15,3 @@ "author": "richardtallent <richard@tallent.us>",

"devDependencies": {
"autoprefixer": "^8.4.1",
"autoprefixer": "^8.5.0",
"babel-core": "^6.26.3",

@@ -21,3 +21,3 @@ "babel-eslint": "^8.2.3",

"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",

@@ -40,11 +40,11 @@ "copy-webpack-plugin": "^4.5.1",

"rimraf": "^2.6.2",
"stylelint": "^9.2.0",
"stylelint": "^9.2.1",
"stylelint-config-standard": "^18.2.0",
"url-loader": "^1.0.1",
"vue": "^2.5.16",
"vue-loader": "^15.0.9",
"vue-loader": "^15.0.11",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack": "^4.7.0",
"webpack-cli": "^2.1.2",
"webpack": "^4.8.3",
"webpack-cli": "^2.1.3",
"webpack-merge": "^4.1.2"

@@ -102,2 +102,2 @@ },

}
}
}

@@ -90,4 +90,10 @@ - [Introduction](#introduction)

Tips:
* The component will fill its parent's height and width, so be sure the parent has a minimum height that looks good.
* This is a pure component, it doesn't change its own state, so clicking the previous/next buttons don't do anything unless you provide a `show-date` attribute and update that attribute when the component fires the `show-date-changed` event.
* The component will fill its parent's height and width, so be sure the parent has a minimum height that is appropriate for the number of weeks and average events per week being shown.
* The calendar component's default header does not change the calendar's state, but it will listen for the header's `input` event and emit a `show-date-changed` event. The parent component/page should bind a listener to this event and use it to update the `show-date` prop (the new date is passed as the event's argument).
* To minimize impact of ancestor element layout on the calendar's functionality, it is **recommended** that the parent of the `<calendar-view>` component *only* contain the component, and that the parent have the following styles (#71):
```CSS
display: flex;
flex-direction: column;
flex-grow: 1;
```

@@ -160,3 +166,3 @@ Here's a minimal application example for a calendar with no events, but styled with the default theme and the US holidays theme:

* `dateClasses` - Optional object, where the key is a date in ISO form (e.g., "2018-04-15") and the value is a string or array of additional CSS classes that should be applied to the main element for that date. This could be useful for dynamically highlighting selected dates, holidays, blocked-off dates, etc.
* `eventsTop` - Optional string of a CSS height to be used as the baseline for where events are positioned relative the top of the week. By default, this is `1.4em`, the height of the standard `cv-day-number` element.
* `eventTop` - Optional string of a CSS height to be used as the baseline for where events are positioned relative the top of the week. By default, this is `1.4em`, the height of the standard `cv-day-number` element.
* `eventContentHeight` - Optional CSS string of the total height of your events, *not including* borders. The default is `1.4em` (1.0 from the font, 0.2 * 2 from the padding.). You would only set this if you're overriding the event height. This doesn't actually change the event height, it is only used to position the events below one another.

@@ -163,0 +169,0 @@ * `eventBorderHeight` - Optional CSS string of the sum of your events' top and bottom borders. The default is `2px`. You would only set this if you're overriding the event top and/or bottom border width. This doesn't actually change the borders, it is only used to position the events below one another.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc