diff --git a/assets/js/plugins/KimaiAPILink.js b/assets/js/plugins/KimaiAPILink.js
index 834cacf6..a2e9e5f1 100644
--- a/assets/js/plugins/KimaiAPILink.js
+++ b/assets/js/plugins/KimaiAPILink.js
@@ -80,7 +80,11 @@ export default class KimaiAPILink extends KimaiClickHandlerReducedInTableRow {
};
if (method === 'PATCH') {
- API.patch(url, {}, successHandle, errorHandle);
+ let data = {};
+ if (attributes.payload) {
+ data = attributes.payload;
+ }
+ API.patch(url, data, successHandle, errorHandle);
} else if (method === 'DELETE') {
API.delete(url, successHandle, errorHandle);
}
diff --git a/assets/js/plugins/KimaiRecentActivities.js b/assets/js/plugins/KimaiRecentActivities.js
index 8a072651..53e3a837 100644
--- a/assets/js/plugins/KimaiRecentActivities.js
+++ b/assets/js/plugins/KimaiRecentActivities.js
@@ -64,7 +64,12 @@ export default class KimaiRecentActivities extends KimaiPlugin {
.replace('%project%', timesheet.project.name)
.replace('%activity%', timesheet.activity.name);
- htmlToInsert += `
${ label }`;
+ htmlToInsert +=
+ `` +
+ `` +
+ ` ${ label }` +
+ `` +
+ ``;
}
this.itemList.innerHTML = htmlToInsert;
diff --git a/config/serializer/App/Entity.Timesheet.yml b/config/serializer/App/Entity.Timesheet.yml
index 81f9c23c..cbfde928 100644
--- a/config/serializer/App/Entity.Timesheet.yml
+++ b/config/serializer/App/Entity.Timesheet.yml
@@ -55,5 +55,4 @@ App\Entity\Timesheet:
getTags:
serialized_name: tags
exp: "object.getTagsAsArray()"
- type: array
- groups: [Default]
+ type: array
diff --git a/public/build/app.js b/public/build/app.js
index e6cb3548..add29583 100644
--- a/public/build/app.js
+++ b/public/build/app.js
@@ -74,7 +74,7 @@ if(void 0===t)throw new Error("AdminLTE requires jQuery");+function(t){"use stri
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
-!function(e,i){t.exports=i(n("olwm"),n("7t+N"))}("undefined"!=typeof self&&self,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=270)}({1:function(e,n){e.exports=t},2:function(t,e){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};e.__extends=function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}},270:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=n(271);i.EventSourceParser.registerClass(o.default),i.GcalEventSource=o.default},271:function(t,e,n){function i(t){var e;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(t)?t:(e=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(t))||(e=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(t))?decodeURIComponent(e[1]):void 0}function o(t,e){return t.replace(/(\?.*?)?(#|$)/,function(t,n,i){return(n?n+"&":"?")+e+i})}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),a=n(3),s=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.parse=function(t,e){var n;return"object"==typeof t?n=t:"string"==typeof t&&(n={url:t}),!!n&&s.EventSource.parse.call(this,n,e)},e.prototype.fetch=function(t,e,n){var i=this,o=this.buildUrl(),r=this.buildRequestParams(t,e,n),l=this.ajaxSettings||{},u=l.success;return r?(this.calendar.pushLoading(),s.Promise.construct(function(t,e){a.ajax(a.extend({},s.JsonFeedEventSource.AJAX_DEFAULTS,l,{url:o,data:r,success:function(n,o,l){var c,d;i.calendar.popLoading(),n.error?(i.reportError("Google Calendar API: "+n.error.message,n.error.errors),e()):n.items&&(c=i.gcalItemsToRawEventDefs(n.items,r.timeZone),d=s.applyAll(u,i,[n,o,l]),a.isArray(d)&&(c=d),t(i.parseEventDefs(c)))},error:function(t,n,o){i.reportError("Google Calendar network failure: "+n,[t,o]),i.calendar.popLoading(),e()}}))})):s.Promise.reject()},e.prototype.gcalItemsToRawEventDefs=function(t,e){var n=this;return t.map(function(t){return n.gcalItemToRawEventDef(t,e)})},e.prototype.gcalItemToRawEventDef=function(t,e){var n=t.htmlLink||null;n&&e&&(n=o(n,"ctz="+e));var i={};return"object"==typeof t.extendedProperties&&"object"==typeof t.extendedProperties.shared&&(i=t.extendedProperties.shared),{id:t.id,title:t.summary,start:t.start.dateTime||t.start.date,end:t.end.dateTime||t.end.date,url:n,location:t.location,description:t.description,extendedProperties:i}},e.prototype.buildUrl=function(){return e.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},e.prototype.buildRequestParams=function(t,e,n){var i,o=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return o?(t.hasZone()||(t=t.clone().utc().add(-1,"day")),e.hasZone()||(e=e.clone().utc().add(1,"day")),i=a.extend(this.ajaxSettings.data||{},{key:o,timeMin:t.format(),timeMax:e.format(),singleEvents:!0,maxResults:9999}),n&&"local"!==n&&(i.timeZone=n.replace(" ","_")),i):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},e.prototype.reportError=function(t,e){var n=this.calendar,i=n.opt("googleCalendarError"),o=e||[{message:t}];this.googleCalendarError&&this.googleCalendarError.apply(n,o),i&&i.apply(n,o),s.warn.apply(null,[t].concat(e||[]))},e.prototype.getPrimitive=function(){return this.googleCalendarId},e.prototype.applyManualStandardProps=function(t){var e=s.EventSource.prototype.applyManualStandardProps.apply(this,arguments),n=t.googleCalendarId;return null==n&&t.url&&(n=i(t.url)),null!=n&&(this.googleCalendarId=n,e)},e.prototype.applyMiscProps=function(t){this.ajaxSettings||(this.ajaxSettings={}),a.extend(this.ajaxSettings,t)},e.API_BASE="https://www.googleapis.com/calendar/v3/calendars",e}(s.EventSource);e.default=l,l.defineStandardProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0})},3:function(t,n){t.exports=e}})})},IArr:function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n("7t+N"),s=(n.n(a),n("ITav")),l=function(){function t(t,e){for(var n=0;n ul.menu");var n=this,i=function(){n.reloadRecentActivities()};setTimeout(i,500),document.addEventListener("kimai.timesheetStop",i),document.addEventListener("kimai.activityUpdate",i),document.addEventListener("kimai.projectUpdate",i),document.addEventListener("kimai.customerUpdate",i)}}},{key:"emptyList",value:function(){this.itemList.innerHTML=""}},{key:"setEntries",value:function(t){if(0===t.length)return void this.emptyList();var e="",n=!0,i=!1,o=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value,l=this.attributes.template.replace("%customer%",s.project.customer.name).replace("%project%",s.project.name).replace("%activity%",s.activity.name);e+=' '+l+""}}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}this.itemList.innerHTML=e}},{key:"reloadRecentActivities",value:function(){var t=this;this.getContainer().getPlugin("api").get(this.attributes.api,{},function(e){t.setEntries(e)})}}]),e}(a.a);e.a=l},ORgI:function(t,e,n){!function(t,e){e(n("PJh5"))}(0,function(t){"use strict";return t.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(t){return"午後"===t},meridiem:function(t,e,n){return t<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(t){return t.week()0)for(n=0;n0?"future":"past"];return S(n)?n(e):n.replace(/%s/i,e)}function A(t,e){var n=t.toLowerCase();ji[n]=ji[n+"s"]=ji[e]=t}function H(t){return"string"==typeof t?ji[t]||ji[t.toLowerCase()]:void 0}function N(t){var e,n,i={};for(n in t)u(t,n)&&(e=H(n))&&(i[e]=t[n]);return i}function F(t,e){Bi[t]=e}function Y(t){var e=[];for(var n in t)e.push({unit:n,priority:Bi[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function z(t,e,n){var i=""+Math.abs(t),o=e-i.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}function j(t,e,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),t&&(Ui[t]=o),e&&(Ui[e[0]]=function(){return z(o.apply(this,arguments),e[1],e[2])}),n&&(Ui[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function B(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function W(t){var e,n,i=t.match(Wi);for(e=0,n=i.length;e=0&&Vi.test(t);)t=t.replace(Vi,n),Vi.lastIndex=0,i-=1;return t}function U(t,e,n){co[t]=S(e)?e:function(t,i){return t&&n?n:e}}function q(t,e){return u(co,t)?co[t](e._strict,e._locale):new RegExp(G(t))}function G(t){return J(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,o){return e||n||i||o}))}function J(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),a(e)&&(i=function(t,n){n[e]=w(t)}),n=0;n=0?(s=new Date(t+400,e,n,i,o,r,a),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,o,r,a),s}function wt(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function xt(t,e,n){var i=7+e-n;return-(7+wt(t,0,i).getUTCDay()-e)%7+i-1}function _t(t,e,n,i,o){var r,a,s=(7+n-i)%7,l=xt(t,i,o),u=1+7*(e-1)+s+l;return u<=0?(r=t-1,a=Q(r)+u):u>Q(t)?(r=t+1,a=u-Q(t)):(r=t,a=u),{year:r,dayOfYear:a}}function Dt(t,e,n){var i,o,r=xt(t.year(),e,n),a=Math.floor((t.dayOfYear()-r-1)/7)+1;return a<1?(o=t.year()-1,i=a+kt(o,e,n)):a>kt(t.year(),e,n)?(i=a-kt(t.year(),e,n),o=t.year()+1):(o=t.year(),i=a),{week:i,year:o}}function kt(t,e,n){var i=xt(t,e,n),o=xt(t+1,e,n);return(Q(t)-i+o)/7}function St(t){return Dt(t,this._week.dow,this._week.doy).week}function Ct(){return this._week.dow}function Mt(){return this._week.doy}function Tt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Et(t){var e=Dt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Pt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function It(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ot(t,e){return t.slice(e,7).concat(t.slice(0,e))}function Lt(t,e){var i=n(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ot(i,this._week.dow):t?i[t.day()]:i}function Rt(t){return!0===t?Ot(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function At(t){return!0===t?Ot(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Ht(t,e,n){var i,o,r,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=d([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?(o=_o.call(this._weekdaysParse,a),-1!==o?o:null):"ddd"===e?(o=_o.call(this._shortWeekdaysParse,a),-1!==o?o:null):(o=_o.call(this._minWeekdaysParse,a),-1!==o?o:null):"dddd"===e?-1!==(o=_o.call(this._weekdaysParse,a))?o:-1!==(o=_o.call(this._shortWeekdaysParse,a))?o:(o=_o.call(this._minWeekdaysParse,a),-1!==o?o:null):"ddd"===e?-1!==(o=_o.call(this._shortWeekdaysParse,a))?o:-1!==(o=_o.call(this._weekdaysParse,a))?o:(o=_o.call(this._minWeekdaysParse,a),-1!==o?o:null):-1!==(o=_o.call(this._minWeekdaysParse,a))?o:-1!==(o=_o.call(this._weekdaysParse,a))?o:(o=_o.call(this._shortWeekdaysParse,a),-1!==o?o:null)}function Nt(t,e,n){var i,o,r;if(this._weekdaysParseExact)return Ht.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=d([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Ft(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Pt(t,this.localeData()),this.add(t-e,"d")):e}function Yt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function zt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=It(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function jt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Lo),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Bt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ro),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ao),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Vt(){function t(t,e){return e.length-t.length}var e,n,i,o,r,a=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),i=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(i),s.push(o),l.push(r),u.push(i),u.push(o),u.push(r);for(a.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=J(s[e]),l[e]=J(l[e]),u[e]=J(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function Ut(){return this.hours()||24}function qt(t,e){j(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Gt(t,e){return e._meridiemParse}function Jt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Zt(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Xt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,n,i,o,r=0;r0;){if(i=Qt(o.slice(0,e).join("-")))return i;if(n&&n.length>=e&&x(o,n,!0)>=e-1)break;e--}r++}return Ho}function Qt(e){var n=null;if(!zo[e]&&void 0!==t&&t&&t.exports)try{n=Ho._abbr;!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),te(n)}catch(t){}return zo[e]}function te(t,e){var n;return t&&(n=r(e)?ie(t):ee(t,e),n?Ho=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Ho._abbr}function ee(t,e){if(null!==e){var n,i=Yo;if(e.abbr=t,null!=zo[t])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=zo[t]._config;else if(null!=e.parentLocale)if(null!=zo[e.parentLocale])i=zo[e.parentLocale]._config;else{if(null==(n=Qt(e.parentLocale)))return jo[e.parentLocale]||(jo[e.parentLocale]=[]),jo[e.parentLocale].push({name:t,config:e}),null;i=n._config}return zo[t]=new T(M(i,e)),jo[t]&&jo[t].forEach(function(t){ee(t.name,t.config)}),te(t),zo[t]}return delete zo[t],null}function ne(t,e){if(null!=e){var n,i,o=Yo;i=Qt(t),null!=i&&(o=i._config),e=M(o,e),n=new T(e),n.parentLocale=zo[t],zo[t]=n,te(t)}else null!=zo[t]&&(null!=zo[t].parentLocale?zo[t]=zo[t].parentLocale:null!=zo[t]&&delete zo[t]);return zo[t]}function ie(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ho;if(!n(t)){if(e=Qt(t))return e;t=[t]}return Kt(t)}function oe(){return Hi(zo)}function re(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[po]<0||n[po]>11?po:n[mo]<1||n[mo]>lt(n[fo],n[po])?mo:n[go]<0||n[go]>24||24===n[go]&&(0!==n[vo]||0!==n[yo]||0!==n[bo])?go:n[vo]<0||n[vo]>59?vo:n[yo]<0||n[yo]>59?yo:n[bo]<0||n[bo]>999?bo:-1,f(t)._overflowDayOfYear&&(emo)&&(e=mo),f(t)._overflowWeeks&&-1===e&&(e=wo),f(t)._overflowWeekday&&-1===e&&(e=xo),f(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function se(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function le(t){var e,n,i,o,r,a=[];if(!t._d){for(i=se(t),t._w&&null==t._a[mo]&&null==t._a[po]&&ue(t),null!=t._dayOfYear&&(r=ae(t._a[fo],i[fo]),(t._dayOfYear>Q(r)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=wt(r,0,t._dayOfYear),t._a[po]=n.getUTCMonth(),t._a[mo]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=i[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[go]&&0===t._a[vo]&&0===t._a[yo]&&0===t._a[bo]&&(t._nextDay=!0,t._a[go]=0),t._d=(t._useUTC?wt:bt).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[go]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}function ue(t){var e,n,i,o,r,a,s,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)r=1,a=4,n=ae(e.GG,t._a[fo],Dt(Ce(),1,4).year),i=ae(e.W,1),((o=ae(e.E,1))<1||o>7)&&(l=!0);else{r=t._locale._week.dow,a=t._locale._week.doy;var u=Dt(Ce(),r,a);n=ae(e.gg,t._a[fo],u.year),i=ae(e.w,u.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+r,(e.e<0||e.e>6)&&(l=!0)):o=r}i<1||i>kt(n,r,a)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(s=_t(n,i,o,r,a),t._a[fo]=s.year,t._dayOfYear=s.dayOfYear)}function ce(t){var e,n,i,o,r,a,s=t._i,l=Bo.exec(s)||Wo.exec(s);if(l){for(f(t).iso=!0,e=0,n=$o.length;e0&&f(t).unusedInput.push(a),s=s.slice(s.indexOf(i)+i.length),u+=i.length),Ui[r]?(i?f(t).empty=!1:f(t).unusedTokens.push(r),K(r,i,t)):t._strict&&!i&&f(t).unusedTokens.push(r);f(t).charsLeftOver=l-u,s.length>0&&f(t).unusedInput.push(s),t._a[go]<=12&&!0===f(t).bigHour&&t._a[go]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[go]=be(t._locale,t._a[go],t._meridiem),le(t),re(t)}function be(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function we(t){var e,n,i,o,r;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qe(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=De(t),t._a){var e=t._isUTC?d(t._a):Ce(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ge(){return!!this.isValid()&&!this._isUTC}function Je(){return!!this.isValid()&&this._isUTC}function Ze(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Xe(t,e){var n,i,o,r=t,s=null;return Re(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(r={},e?r[e]=t:r.milliseconds=t):(s=er.exec(t))?(n="-"===s[1]?-1:1,r={y:0,d:w(s[mo])*n,h:w(s[go])*n,m:w(s[vo])*n,s:w(s[yo])*n,ms:w(Ae(1e3*s[bo]))*n}):(s=nr.exec(t))?(n="-"===s[1]?-1:1,r={y:Ke(s[2],n),M:Ke(s[3],n),w:Ke(s[4],n),d:Ke(s[5],n),h:Ke(s[6],n),m:Ke(s[7],n),s:Ke(s[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(o=tn(Ce(r.from),Ce(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Le(r),Re(t)&&u(t,"_locale")&&(i._locale=t._locale),i}function Ke(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Qe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function tn(t,e){var n;return t.isValid()&&e.isValid()?(e=Fe(e,t),t.isBefore(e)?n=Qe(t,e):(n=Qe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function en(t,e){return function(n,i){var o,r;return null===i||isNaN(+i)||(k(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),n="string"==typeof n?+n:n,o=Xe(n,i),nn(this,o,t),this}}function nn(t,n,i,o){var r=n._milliseconds,a=Ae(n._days),s=Ae(n._months);t.isValid()&&(o=null==o||o,s&&ft(t,it(t,"Month")+s*i),a&&ot(t,"Date",it(t,"Date")+a*i),r&&t._d.setTime(t._d.valueOf()+r*i),o&&e.updateOffset(t,a||s))}function on(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function rn(t,n){var i=t||Ce(),o=Fe(i,this).startOf("day"),r=e.calendarFormat(this,o)||"sameElse",a=n&&(S(n[r])?n[r].call(this,i):n[r]);return this.format(a||this.localeData().calendar(r,this,Ce(i)))}function an(){return new v(this)}function sn(t,e){var n=y(t)?t:Ce(t);return!(!this.isValid()||!n.isValid())&&(e=H(e)||"millisecond","millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()9999?V(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(n,"Z")):V(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function vn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+o)}function yn(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=V(this,t);return this.localeData().postformat(n)}function bn(t,e){return this.isValid()&&(y(t)&&t.isValid()||Ce(t).isValid())?Xe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function wn(t){return this.from(Ce(),t)}function xn(t,e){return this.isValid()&&(y(t)&&t.isValid()||Ce(t).isValid())?Xe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function _n(t){return this.to(Ce(),t)}function Dn(t){var e;return void 0===t?this._locale._abbr:(e=ie(t),null!=e&&(this._locale=e),this)}function kn(){return this._locale}function Sn(t,e){return(t%e+e)%e}function Cn(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-ur:new Date(t,e,n).valueOf()}function Mn(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-ur:Date.UTC(t,e,n)}function Tn(t){var n;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;var i=this._isUTC?Mn:Cn;switch(t){case"year":n=i(this.year(),0,1);break;case"quarter":n=i(this.year(),this.month()-this.month()%3,1);break;case"month":n=i(this.year(),this.month(),1);break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=i(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=Sn(n+(this._isUTC?0:this.utcOffset()*sr),lr);break;case"minute":n=this._d.valueOf(),n-=Sn(n,sr);break;case"second":n=this._d.valueOf(),n-=Sn(n,ar)}return this._d.setTime(n),e.updateOffset(this,!0),this}function En(t){var n;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;var i=this._isUTC?Mn:Cn;switch(t){case"year":n=i(this.year()+1,0,1)-1;break;case"quarter":n=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=i(this.year(),this.month()+1,1)-1;break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=lr-Sn(n+(this._isUTC?0:this.utcOffset()*sr),lr)-1;break;case"minute":n=this._d.valueOf(),n+=sr-Sn(n,sr)-1;break;case"second":n=this._d.valueOf(),n+=ar-Sn(n,ar)-1}return this._d.setTime(n),e.updateOffset(this,!0),this}function Pn(){return this._d.valueOf()-6e4*(this._offset||0)}function In(){return Math.floor(this.valueOf()/1e3)}function On(){return new Date(this.valueOf())}function Ln(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Rn(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function An(){return this.isValid()?this.toISOString():null}function Hn(){return p(this)}function Nn(){return c({},f(this))}function Fn(){return f(this).overflow}function Yn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function zn(t,e){j(0,[t,t.length],0,e)}function jn(t){return $n.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Bn(t){return $n.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Wn(){return kt(this.year(),1,4)}function Vn(){var t=this.localeData()._week;return kt(this.year(),t.dow,t.doy)}function $n(t,e,n,i,o){var r;return null==t?Dt(this,i,o).year:(r=kt(t,i,o),e>r&&(e=r),Un.call(this,t,e,n,i,o))}function Un(t,e,n,i,o){var r=_t(t,e,n,i,o),a=wt(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function qn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Gn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Jn(t,e){e[bo]=w(1e3*("0."+t))}function Zn(){return this._isUTC?"UTC":""}function Xn(){return this._isUTC?"Coordinated Universal Time":""}function Kn(t){return Ce(1e3*t)}function Qn(){return Ce.apply(null,arguments).parseZone()}function ti(t){return t}function ei(t,e,n,i){var o=ie(),r=d().set(i,e);return o[n](r,t)}function ni(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return ei(t,e,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=ei(t,i,n,"month");return o}function ii(t,e,n,i){"boolean"==typeof t?(a(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,a(e)&&(n=e,e=void 0),e=e||"");var o=ie(),r=t?o._week.dow:0;if(null!=n)return ei(e,(n+r)%7,i,"day");var s,l=[];for(s=0;s<7;s++)l[s]=ei(e,(s+r)%7,i,"day");return l}function oi(t,e){return ni(t,e,"months")}function ri(t,e){return ni(t,e,"monthsShort")}function ai(t,e,n){return ii(t,e,n,"weekdays")}function si(t,e,n){return ii(t,e,n,"weekdaysShort")}function li(t,e,n){return ii(t,e,n,"weekdaysMin")}function ui(){var t=this._data;return this._milliseconds=vr(this._milliseconds),this._days=vr(this._days),this._months=vr(this._months),t.milliseconds=vr(t.milliseconds),t.seconds=vr(t.seconds),t.minutes=vr(t.minutes),t.hours=vr(t.hours),t.months=vr(t.months),t.years=vr(t.years),this}function ci(t,e,n,i){var o=Xe(e,n);return t._milliseconds+=i*o._milliseconds,t._days+=i*o._days,t._months+=i*o._months,t._bubble()}function di(t,e){return ci(this,t,e,1)}function hi(t,e){return ci(this,t,e,-1)}function fi(t){return t<0?Math.floor(t):Math.ceil(t)}function pi(){var t,e,n,i,o,r=this._milliseconds,a=this._days,s=this._months,l=this._data;return r>=0&&a>=0&&s>=0||r<=0&&a<=0&&s<=0||(r+=864e5*fi(gi(s)+a),a=0,s=0),l.milliseconds=r%1e3,t=b(r/1e3),l.seconds=t%60,e=b(t/60),l.minutes=e%60,n=b(e/60),l.hours=n%24,a+=b(n/24),o=b(mi(a)),s+=o,a-=fi(gi(o)),i=b(s/12),s%=12,l.days=a,l.months=s,l.years=i,this}function mi(t){return 4800*t/146097}function gi(t){return 146097*t/4800}function vi(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=H(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+mi(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(gi(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function yi(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN}function bi(t){return function(){return this.as(t)}}function wi(){return Xe(this)}function xi(t){return t=H(t),this.isValid()?this[t+"s"]():NaN}function _i(t){return function(){return this.isValid()?this._data[t]:NaN}}function Di(){return b(this.days()/7)}function ki(t,e,n,i,o){return o.relativeTime(e||1,!!n,t,i)}function Si(t,e,n){var i=Xe(t).abs(),o=Rr(i.as("s")),r=Rr(i.as("m")),a=Rr(i.as("h")),s=Rr(i.as("d")),l=Rr(i.as("M")),u=Rr(i.as("y")),c=o<=Ar.ss&&["s",o]||o0,c[4]=n,ki.apply(null,c)}function Ci(t){return void 0===t?Rr:"function"==typeof t&&(Rr=t,!0)}function Mi(t,e){return void 0!==Ar[t]&&(void 0===e?Ar[t]:(Ar[t]=e,"s"===t&&(Ar.ss=e-1),!0))}function Ti(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=Si(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Ei(t){return(t>0)-(t<0)||+t}function Pi(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i=Hr(this._milliseconds)/1e3,o=Hr(this._days),r=Hr(this._months);t=b(i/60),e=b(t/60),i%=60,t%=60,n=b(r/12),r%=12;var a=n,s=r,l=o,u=e,c=t,d=i?i.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",p=Ei(this._months)!==Ei(h)?"-":"",m=Ei(this._days)!==Ei(h)?"-":"",g=Ei(this._milliseconds)!==Ei(h)?"-":"";return f+"P"+(a?p+a+"Y":"")+(s?p+s+"M":"")+(l?m+l+"D":"")+(u||c||d?"T":"")+(u?g+u+"H":"")+(c?g+c+"M":"")+(d?g+d+"S":"")}var Ii,Oi;Oi=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i68?1900:2e3)};var _o,Do=nt("FullYear",!0);_o=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:m()}),Ko=function(){return Date.now?Date.now():+new Date},Qo=["year","quarter","month","week","day","hour","minute","second","millisecond"];He("Z",":"),He("ZZ",""),U("Z",so),U("ZZ",so),Z(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ne(so,t)});var tr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var er=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,nr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Xe.fn=Le.prototype,Xe.invalid=Oe;var ir=en(1,"add"),or=en(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var rr=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)}),ar=1e3,sr=60*ar,lr=60*sr,ur=3506328*lr;j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),zn("gggg","weekYear"),zn("ggggg","weekYear"),zn("GGGG","isoWeekYear"),zn("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),U("G",ro),U("g",ro),U("GG",Ki,Gi),U("gg",Ki,Gi),U("GGGG",no,Zi),U("gggg",no,Zi),U("GGGGG",io,Xi),U("ggggg",io,Xi),X(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=w(t)}),X(["gg","GG"],function(t,n,i,o){n[o]=e.parseTwoDigitYear(t)}),j("Q",0,"Qo","quarter"),A("quarter","Q"),F("quarter",7),U("Q",qi),Z("Q",function(t,e){e[po]=3*(w(t)-1)}),j("D",["DD",2],"Do","date"),A("date","D"),F("date",9),U("D",Ki),U("DD",Ki,Gi),U("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Z(["D","DD"],mo),Z("Do",function(t,e){e[mo]=w(t.match(Ki)[0])});var cr=nt("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),F("dayOfYear",4),U("DDD",eo),U("DDDD",Ji),Z(["DDD","DDDD"],function(t,e,n){n._dayOfYear=w(t)}),j("m",["mm",2],0,"minute"),A("minute","m"),F("minute",14),U("m",Ki),U("mm",Ki,Gi),Z(["m","mm"],vo);var dr=nt("Minutes",!1);j("s",["ss",2],0,"second"),A("second","s"),F("second",15),U("s",Ki),U("ss",Ki,Gi),Z(["s","ss"],yo);var hr=nt("Seconds",!1);j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),F("millisecond",16),U("S",eo,qi),U("SS",eo,Gi),U("SSS",eo,Ji);var fr;for(fr="SSSS";fr.length<=9;fr+="S")U(fr,oo);for(fr="S";fr.length<=9;fr+="S")Z(fr,Jn);var pr=nt("Milliseconds",!1);j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var mr=v.prototype;mr.add=ir,mr.calendar=rn,mr.clone=an,mr.diff=fn,mr.endOf=En,mr.format=yn,mr.from=bn,mr.fromNow=wn,mr.to=xn,mr.toNow=_n,mr.get=rt,mr.invalidAt=Fn,mr.isAfter=sn,mr.isBefore=ln,mr.isBetween=un,mr.isSame=cn,mr.isSameOrAfter=dn,mr.isSameOrBefore=hn,mr.isValid=Hn,mr.lang=rr,mr.locale=Dn,mr.localeData=kn,mr.max=Xo,mr.min=Zo,mr.parsingFlags=Nn,mr.set=at,mr.startOf=Tn,mr.subtract=or,mr.toArray=Ln,mr.toObject=Rn,mr.toDate=On,mr.toISOString=gn,mr.inspect=vn,mr.toJSON=An,mr.toString=mn,mr.unix=In,mr.valueOf=Pn,mr.creationData=Yn,mr.year=Do,mr.isLeapYear=et,mr.weekYear=jn,mr.isoWeekYear=Bn,mr.quarter=mr.quarters=qn,mr.month=pt,mr.daysInMonth=mt,mr.week=mr.weeks=Tt,mr.isoWeek=mr.isoWeeks=Et,mr.weeksInYear=Vn,mr.isoWeeksInYear=Wn,mr.date=cr,mr.day=mr.days=Ft,mr.weekday=Yt,mr.isoWeekday=zt,mr.dayOfYear=Gn,mr.hour=mr.hours=Fo,mr.minute=mr.minutes=dr,mr.second=mr.seconds=hr,mr.millisecond=mr.milliseconds=pr,mr.utcOffset=ze,mr.utc=Be,mr.local=We,mr.parseZone=Ve,mr.hasAlignedHourOffset=$e,mr.isDST=Ue,mr.isLocal=Ge,mr.isUtcOffset=Je,mr.isUtc=Ze,mr.isUTC=Ze,mr.zoneAbbr=Zn,mr.zoneName=Xn,mr.dates=D("dates accessor is deprecated. Use date instead.",cr),mr.months=D("months accessor is deprecated. Use month instead",pt),mr.years=D("years accessor is deprecated. Use year instead",Do),mr.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",je),mr.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",qe);var gr=T.prototype;gr.calendar=E,gr.longDateFormat=P,gr.invalidDate=I,gr.ordinal=O,gr.preparse=ti,gr.postformat=ti,gr.relativeTime=L,gr.pastFuture=R,gr.set=C,gr.months=ut,gr.monthsShort=ct,gr.monthsParse=ht,gr.monthsRegex=vt,gr.monthsShortRegex=gt,gr.week=St,gr.firstDayOfYear=Mt,gr.firstDayOfWeek=Ct,gr.weekdays=Lt,gr.weekdaysMin=At,gr.weekdaysShort=Rt,gr.weekdaysParse=Nt,gr.weekdaysRegex=jt,gr.weekdaysShortRegex=Bt,gr.weekdaysMinRegex=Wt,gr.isPM=Jt,gr.meridiem=Zt,te("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=D("moment.lang is deprecated. Use moment.locale instead.",te),e.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ie);var vr=Math.abs,yr=bi("ms"),br=bi("s"),wr=bi("m"),xr=bi("h"),_r=bi("d"),Dr=bi("w"),kr=bi("M"),Sr=bi("Q"),Cr=bi("y"),Mr=_i("milliseconds"),Tr=_i("seconds"),Er=_i("minutes"),Pr=_i("hours"),Ir=_i("days"),Or=_i("months"),Lr=_i("years"),Rr=Math.round,Ar={ss:44,s:45,m:45,h:22,d:26,M:11},Hr=Math.abs,Nr=Le.prototype;return Nr.isValid=Ie,Nr.abs=ui,Nr.add=di,Nr.subtract=hi,Nr.as=vi,Nr.asMilliseconds=yr,Nr.asSeconds=br,Nr.asMinutes=wr,Nr.asHours=xr,Nr.asDays=_r,Nr.asWeeks=Dr,Nr.asMonths=kr,Nr.asQuarters=Sr,Nr.asYears=Cr,Nr.valueOf=yi,Nr._bubble=pi,Nr.clone=wi,Nr.get=xi,Nr.milliseconds=Mr,Nr.seconds=Tr,Nr.minutes=Er,Nr.hours=Pr,Nr.days=Ir,Nr.weeks=Di,Nr.months=Or,Nr.years=Lr,Nr.humanize=Ti,Nr.toISOString=Pi,Nr.toString=Pi,Nr.toJSON=Pi,Nr.locale=Dn,Nr.localeData=kn,Nr.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Pi),Nr.lang=rr,j("X",0,0,"unix"),j("x",0,0,"valueOf"),U("x",ro),U("X",lo),Z("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Z("x",function(t,e,n){n._d=new Date(w(t))}),e.version="2.24.0",function(t){Ii=t}(Ce),e.fn=mr,e.min=Te,e.max=Ee,e.now=Ko,e.utc=d,e.unix=Kn,e.months=oi,e.isDate=s,e.locale=te,e.invalid=m,e.duration=Xe,e.isMoment=y,e.weekdays=ai,e.parseZone=Qn,e.localeData=ie,e.isDuration=Re,e.monthsShort=ri,e.weekdaysMin=li,e.defineLocale=ee,e.updateLocale=ne,e.locales=oe,e.weekdaysShort=si,e.normalizeUnits=H,e.relativeTimeRounding=Ci,e.relativeTimeThreshold=Mi,e.calendarFormat=on,e.prototype=mr,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})}).call(e,n("3IRH")(t))},"PL/P":function(t,e,n){var i,o;/**
+!function(e,i){t.exports=i(n("olwm"),n("7t+N"))}("undefined"!=typeof self&&self,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=270)}({1:function(e,n){e.exports=t},2:function(t,e){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};e.__extends=function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}},270:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=n(271);i.EventSourceParser.registerClass(o.default),i.GcalEventSource=o.default},271:function(t,e,n){function i(t){var e;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(t)?t:(e=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(t))||(e=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(t))?decodeURIComponent(e[1]):void 0}function o(t,e){return t.replace(/(\?.*?)?(#|$)/,function(t,n,i){return(n?n+"&":"?")+e+i})}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),a=n(3),s=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.parse=function(t,e){var n;return"object"==typeof t?n=t:"string"==typeof t&&(n={url:t}),!!n&&s.EventSource.parse.call(this,n,e)},e.prototype.fetch=function(t,e,n){var i=this,o=this.buildUrl(),r=this.buildRequestParams(t,e,n),l=this.ajaxSettings||{},u=l.success;return r?(this.calendar.pushLoading(),s.Promise.construct(function(t,e){a.ajax(a.extend({},s.JsonFeedEventSource.AJAX_DEFAULTS,l,{url:o,data:r,success:function(n,o,l){var c,d;i.calendar.popLoading(),n.error?(i.reportError("Google Calendar API: "+n.error.message,n.error.errors),e()):n.items&&(c=i.gcalItemsToRawEventDefs(n.items,r.timeZone),d=s.applyAll(u,i,[n,o,l]),a.isArray(d)&&(c=d),t(i.parseEventDefs(c)))},error:function(t,n,o){i.reportError("Google Calendar network failure: "+n,[t,o]),i.calendar.popLoading(),e()}}))})):s.Promise.reject()},e.prototype.gcalItemsToRawEventDefs=function(t,e){var n=this;return t.map(function(t){return n.gcalItemToRawEventDef(t,e)})},e.prototype.gcalItemToRawEventDef=function(t,e){var n=t.htmlLink||null;n&&e&&(n=o(n,"ctz="+e));var i={};return"object"==typeof t.extendedProperties&&"object"==typeof t.extendedProperties.shared&&(i=t.extendedProperties.shared),{id:t.id,title:t.summary,start:t.start.dateTime||t.start.date,end:t.end.dateTime||t.end.date,url:n,location:t.location,description:t.description,extendedProperties:i}},e.prototype.buildUrl=function(){return e.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},e.prototype.buildRequestParams=function(t,e,n){var i,o=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return o?(t.hasZone()||(t=t.clone().utc().add(-1,"day")),e.hasZone()||(e=e.clone().utc().add(1,"day")),i=a.extend(this.ajaxSettings.data||{},{key:o,timeMin:t.format(),timeMax:e.format(),singleEvents:!0,maxResults:9999}),n&&"local"!==n&&(i.timeZone=n.replace(" ","_")),i):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},e.prototype.reportError=function(t,e){var n=this.calendar,i=n.opt("googleCalendarError"),o=e||[{message:t}];this.googleCalendarError&&this.googleCalendarError.apply(n,o),i&&i.apply(n,o),s.warn.apply(null,[t].concat(e||[]))},e.prototype.getPrimitive=function(){return this.googleCalendarId},e.prototype.applyManualStandardProps=function(t){var e=s.EventSource.prototype.applyManualStandardProps.apply(this,arguments),n=t.googleCalendarId;return null==n&&t.url&&(n=i(t.url)),null!=n&&(this.googleCalendarId=n,e)},e.prototype.applyMiscProps=function(t){this.ajaxSettings||(this.ajaxSettings={}),a.extend(this.ajaxSettings,t)},e.API_BASE="https://www.googleapis.com/calendar/v3/calendars",e}(s.EventSource);e.default=l,l.defineStandardProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0})},3:function(t,n){t.exports=e}})})},IArr:function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n("7t+N"),s=(n.n(a),n("ITav")),l=function(){function t(t,e){for(var n=0;n ul.menu");var n=this,i=function(){n.reloadRecentActivities()};setTimeout(i,500),document.addEventListener("kimai.timesheetStop",i),document.addEventListener("kimai.activityUpdate",i),document.addEventListener("kimai.projectUpdate",i),document.addEventListener("kimai.customerUpdate",i)}}},{key:"emptyList",value:function(){this.itemList.innerHTML=""}},{key:"setEntries",value:function(t){if(0===t.length)return void this.emptyList();var e="",n=!0,i=!1,o=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value,l=this.attributes.template.replace("%customer%",s.project.customer.name).replace("%project%",s.project.name).replace("%activity%",s.activity.name);e+=' '+l+""}}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}this.itemList.innerHTML=e}},{key:"reloadRecentActivities",value:function(){var t=this;this.getContainer().getPlugin("api").get(this.attributes.api,{},function(e){t.setEntries(e)})}}]),e}(a.a);e.a=l},ORgI:function(t,e,n){!function(t,e){e(n("PJh5"))}(0,function(t){"use strict";return t.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(t){return"午後"===t},meridiem:function(t,e,n){return t<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(t){return t.week()0)for(n=0;n0?"future":"past"];return S(n)?n(e):n.replace(/%s/i,e)}function A(t,e){var n=t.toLowerCase();ji[n]=ji[n+"s"]=ji[e]=t}function H(t){return"string"==typeof t?ji[t]||ji[t.toLowerCase()]:void 0}function N(t){var e,n,i={};for(n in t)u(t,n)&&(e=H(n))&&(i[e]=t[n]);return i}function F(t,e){Bi[t]=e}function Y(t){var e=[];for(var n in t)e.push({unit:n,priority:Bi[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function z(t,e,n){var i=""+Math.abs(t),o=e-i.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}function j(t,e,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),t&&(Ui[t]=o),e&&(Ui[e[0]]=function(){return z(o.apply(this,arguments),e[1],e[2])}),n&&(Ui[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function B(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function W(t){var e,n,i=t.match(Wi);for(e=0,n=i.length;e=0&&Vi.test(t);)t=t.replace(Vi,n),Vi.lastIndex=0,i-=1;return t}function U(t,e,n){co[t]=S(e)?e:function(t,i){return t&&n?n:e}}function q(t,e){return u(co,t)?co[t](e._strict,e._locale):new RegExp(G(t))}function G(t){return J(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,o){return e||n||i||o}))}function J(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),a(e)&&(i=function(t,n){n[e]=w(t)}),n=0;n=0?(s=new Date(t+400,e,n,i,o,r,a),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,o,r,a),s}function wt(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function xt(t,e,n){var i=7+e-n;return-(7+wt(t,0,i).getUTCDay()-e)%7+i-1}function _t(t,e,n,i,o){var r,a,s=(7+n-i)%7,l=xt(t,i,o),u=1+7*(e-1)+s+l;return u<=0?(r=t-1,a=Q(r)+u):u>Q(t)?(r=t+1,a=u-Q(t)):(r=t,a=u),{year:r,dayOfYear:a}}function Dt(t,e,n){var i,o,r=xt(t.year(),e,n),a=Math.floor((t.dayOfYear()-r-1)/7)+1;return a<1?(o=t.year()-1,i=a+kt(o,e,n)):a>kt(t.year(),e,n)?(i=a-kt(t.year(),e,n),o=t.year()+1):(o=t.year(),i=a),{week:i,year:o}}function kt(t,e,n){var i=xt(t,e,n),o=xt(t+1,e,n);return(Q(t)-i+o)/7}function St(t){return Dt(t,this._week.dow,this._week.doy).week}function Ct(){return this._week.dow}function Mt(){return this._week.doy}function Tt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Et(t){var e=Dt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Pt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function It(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ot(t,e){return t.slice(e,7).concat(t.slice(0,e))}function Lt(t,e){var i=n(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ot(i,this._week.dow):t?i[t.day()]:i}function Rt(t){return!0===t?Ot(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function At(t){return!0===t?Ot(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Ht(t,e,n){var i,o,r,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=d([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?(o=_o.call(this._weekdaysParse,a),-1!==o?o:null):"ddd"===e?(o=_o.call(this._shortWeekdaysParse,a),-1!==o?o:null):(o=_o.call(this._minWeekdaysParse,a),-1!==o?o:null):"dddd"===e?-1!==(o=_o.call(this._weekdaysParse,a))?o:-1!==(o=_o.call(this._shortWeekdaysParse,a))?o:(o=_o.call(this._minWeekdaysParse,a),-1!==o?o:null):"ddd"===e?-1!==(o=_o.call(this._shortWeekdaysParse,a))?o:-1!==(o=_o.call(this._weekdaysParse,a))?o:(o=_o.call(this._minWeekdaysParse,a),-1!==o?o:null):-1!==(o=_o.call(this._minWeekdaysParse,a))?o:-1!==(o=_o.call(this._weekdaysParse,a))?o:(o=_o.call(this._shortWeekdaysParse,a),-1!==o?o:null)}function Nt(t,e,n){var i,o,r;if(this._weekdaysParseExact)return Ht.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=d([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Ft(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Pt(t,this.localeData()),this.add(t-e,"d")):e}function Yt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function zt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=It(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function jt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Lo),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Bt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ro),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wt(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ao),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Vt(){function t(t,e){return e.length-t.length}var e,n,i,o,r,a=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),i=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(i),s.push(o),l.push(r),u.push(i),u.push(o),u.push(r);for(a.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=J(s[e]),l[e]=J(l[e]),u[e]=J(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function Ut(){return this.hours()||24}function qt(t,e){j(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Gt(t,e){return e._meridiemParse}function Jt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Zt(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Xt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,n,i,o,r=0;r0;){if(i=Qt(o.slice(0,e).join("-")))return i;if(n&&n.length>=e&&x(o,n,!0)>=e-1)break;e--}r++}return Ho}function Qt(e){var n=null;if(!zo[e]&&void 0!==t&&t&&t.exports)try{n=Ho._abbr;!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),te(n)}catch(t){}return zo[e]}function te(t,e){var n;return t&&(n=r(e)?ie(t):ee(t,e),n?Ho=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Ho._abbr}function ee(t,e){if(null!==e){var n,i=Yo;if(e.abbr=t,null!=zo[t])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=zo[t]._config;else if(null!=e.parentLocale)if(null!=zo[e.parentLocale])i=zo[e.parentLocale]._config;else{if(null==(n=Qt(e.parentLocale)))return jo[e.parentLocale]||(jo[e.parentLocale]=[]),jo[e.parentLocale].push({name:t,config:e}),null;i=n._config}return zo[t]=new T(M(i,e)),jo[t]&&jo[t].forEach(function(t){ee(t.name,t.config)}),te(t),zo[t]}return delete zo[t],null}function ne(t,e){if(null!=e){var n,i,o=Yo;i=Qt(t),null!=i&&(o=i._config),e=M(o,e),n=new T(e),n.parentLocale=zo[t],zo[t]=n,te(t)}else null!=zo[t]&&(null!=zo[t].parentLocale?zo[t]=zo[t].parentLocale:null!=zo[t]&&delete zo[t]);return zo[t]}function ie(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ho;if(!n(t)){if(e=Qt(t))return e;t=[t]}return Kt(t)}function oe(){return Hi(zo)}function re(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[po]<0||n[po]>11?po:n[mo]<1||n[mo]>lt(n[fo],n[po])?mo:n[go]<0||n[go]>24||24===n[go]&&(0!==n[vo]||0!==n[yo]||0!==n[bo])?go:n[vo]<0||n[vo]>59?vo:n[yo]<0||n[yo]>59?yo:n[bo]<0||n[bo]>999?bo:-1,f(t)._overflowDayOfYear&&(emo)&&(e=mo),f(t)._overflowWeeks&&-1===e&&(e=wo),f(t)._overflowWeekday&&-1===e&&(e=xo),f(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function se(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function le(t){var e,n,i,o,r,a=[];if(!t._d){for(i=se(t),t._w&&null==t._a[mo]&&null==t._a[po]&&ue(t),null!=t._dayOfYear&&(r=ae(t._a[fo],i[fo]),(t._dayOfYear>Q(r)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=wt(r,0,t._dayOfYear),t._a[po]=n.getUTCMonth(),t._a[mo]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=i[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[go]&&0===t._a[vo]&&0===t._a[yo]&&0===t._a[bo]&&(t._nextDay=!0,t._a[go]=0),t._d=(t._useUTC?wt:bt).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[go]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}function ue(t){var e,n,i,o,r,a,s,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)r=1,a=4,n=ae(e.GG,t._a[fo],Dt(Ce(),1,4).year),i=ae(e.W,1),((o=ae(e.E,1))<1||o>7)&&(l=!0);else{r=t._locale._week.dow,a=t._locale._week.doy;var u=Dt(Ce(),r,a);n=ae(e.gg,t._a[fo],u.year),i=ae(e.w,u.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+r,(e.e<0||e.e>6)&&(l=!0)):o=r}i<1||i>kt(n,r,a)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(s=_t(n,i,o,r,a),t._a[fo]=s.year,t._dayOfYear=s.dayOfYear)}function ce(t){var e,n,i,o,r,a,s=t._i,l=Bo.exec(s)||Wo.exec(s);if(l){for(f(t).iso=!0,e=0,n=$o.length;e0&&f(t).unusedInput.push(a),s=s.slice(s.indexOf(i)+i.length),u+=i.length),Ui[r]?(i?f(t).empty=!1:f(t).unusedTokens.push(r),K(r,i,t)):t._strict&&!i&&f(t).unusedTokens.push(r);f(t).charsLeftOver=l-u,s.length>0&&f(t).unusedInput.push(s),t._a[go]<=12&&!0===f(t).bigHour&&t._a[go]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[go]=be(t._locale,t._a[go],t._meridiem),le(t),re(t)}function be(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function we(t){var e,n,i,o,r;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qe(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=De(t),t._a){var e=t._isUTC?d(t._a):Ce(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ge(){return!!this.isValid()&&!this._isUTC}function Je(){return!!this.isValid()&&this._isUTC}function Ze(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Xe(t,e){var n,i,o,r=t,s=null;return Re(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(r={},e?r[e]=t:r.milliseconds=t):(s=er.exec(t))?(n="-"===s[1]?-1:1,r={y:0,d:w(s[mo])*n,h:w(s[go])*n,m:w(s[vo])*n,s:w(s[yo])*n,ms:w(Ae(1e3*s[bo]))*n}):(s=nr.exec(t))?(n="-"===s[1]?-1:1,r={y:Ke(s[2],n),M:Ke(s[3],n),w:Ke(s[4],n),d:Ke(s[5],n),h:Ke(s[6],n),m:Ke(s[7],n),s:Ke(s[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(o=tn(Ce(r.from),Ce(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Le(r),Re(t)&&u(t,"_locale")&&(i._locale=t._locale),i}function Ke(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Qe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function tn(t,e){var n;return t.isValid()&&e.isValid()?(e=Fe(e,t),t.isBefore(e)?n=Qe(t,e):(n=Qe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function en(t,e){return function(n,i){var o,r;return null===i||isNaN(+i)||(k(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),n="string"==typeof n?+n:n,o=Xe(n,i),nn(this,o,t),this}}function nn(t,n,i,o){var r=n._milliseconds,a=Ae(n._days),s=Ae(n._months);t.isValid()&&(o=null==o||o,s&&ft(t,it(t,"Month")+s*i),a&&ot(t,"Date",it(t,"Date")+a*i),r&&t._d.setTime(t._d.valueOf()+r*i),o&&e.updateOffset(t,a||s))}function on(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function rn(t,n){var i=t||Ce(),o=Fe(i,this).startOf("day"),r=e.calendarFormat(this,o)||"sameElse",a=n&&(S(n[r])?n[r].call(this,i):n[r]);return this.format(a||this.localeData().calendar(r,this,Ce(i)))}function an(){return new v(this)}function sn(t,e){var n=y(t)?t:Ce(t);return!(!this.isValid()||!n.isValid())&&(e=H(e)||"millisecond","millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()9999?V(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(n,"Z")):V(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function vn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+o)}function yn(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=V(this,t);return this.localeData().postformat(n)}function bn(t,e){return this.isValid()&&(y(t)&&t.isValid()||Ce(t).isValid())?Xe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function wn(t){return this.from(Ce(),t)}function xn(t,e){return this.isValid()&&(y(t)&&t.isValid()||Ce(t).isValid())?Xe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function _n(t){return this.to(Ce(),t)}function Dn(t){var e;return void 0===t?this._locale._abbr:(e=ie(t),null!=e&&(this._locale=e),this)}function kn(){return this._locale}function Sn(t,e){return(t%e+e)%e}function Cn(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-ur:new Date(t,e,n).valueOf()}function Mn(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-ur:Date.UTC(t,e,n)}function Tn(t){var n;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;var i=this._isUTC?Mn:Cn;switch(t){case"year":n=i(this.year(),0,1);break;case"quarter":n=i(this.year(),this.month()-this.month()%3,1);break;case"month":n=i(this.year(),this.month(),1);break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=i(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=Sn(n+(this._isUTC?0:this.utcOffset()*sr),lr);break;case"minute":n=this._d.valueOf(),n-=Sn(n,sr);break;case"second":n=this._d.valueOf(),n-=Sn(n,ar)}return this._d.setTime(n),e.updateOffset(this,!0),this}function En(t){var n;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;var i=this._isUTC?Mn:Cn;switch(t){case"year":n=i(this.year()+1,0,1)-1;break;case"quarter":n=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=i(this.year(),this.month()+1,1)-1;break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=lr-Sn(n+(this._isUTC?0:this.utcOffset()*sr),lr)-1;break;case"minute":n=this._d.valueOf(),n+=sr-Sn(n,sr)-1;break;case"second":n=this._d.valueOf(),n+=ar-Sn(n,ar)-1}return this._d.setTime(n),e.updateOffset(this,!0),this}function Pn(){return this._d.valueOf()-6e4*(this._offset||0)}function In(){return Math.floor(this.valueOf()/1e3)}function On(){return new Date(this.valueOf())}function Ln(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Rn(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function An(){return this.isValid()?this.toISOString():null}function Hn(){return p(this)}function Nn(){return c({},f(this))}function Fn(){return f(this).overflow}function Yn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function zn(t,e){j(0,[t,t.length],0,e)}function jn(t){return $n.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Bn(t){return $n.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Wn(){return kt(this.year(),1,4)}function Vn(){var t=this.localeData()._week;return kt(this.year(),t.dow,t.doy)}function $n(t,e,n,i,o){var r;return null==t?Dt(this,i,o).year:(r=kt(t,i,o),e>r&&(e=r),Un.call(this,t,e,n,i,o))}function Un(t,e,n,i,o){var r=_t(t,e,n,i,o),a=wt(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function qn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Gn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Jn(t,e){e[bo]=w(1e3*("0."+t))}function Zn(){return this._isUTC?"UTC":""}function Xn(){return this._isUTC?"Coordinated Universal Time":""}function Kn(t){return Ce(1e3*t)}function Qn(){return Ce.apply(null,arguments).parseZone()}function ti(t){return t}function ei(t,e,n,i){var o=ie(),r=d().set(i,e);return o[n](r,t)}function ni(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return ei(t,e,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=ei(t,i,n,"month");return o}function ii(t,e,n,i){"boolean"==typeof t?(a(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,a(e)&&(n=e,e=void 0),e=e||"");var o=ie(),r=t?o._week.dow:0;if(null!=n)return ei(e,(n+r)%7,i,"day");var s,l=[];for(s=0;s<7;s++)l[s]=ei(e,(s+r)%7,i,"day");return l}function oi(t,e){return ni(t,e,"months")}function ri(t,e){return ni(t,e,"monthsShort")}function ai(t,e,n){return ii(t,e,n,"weekdays")}function si(t,e,n){return ii(t,e,n,"weekdaysShort")}function li(t,e,n){return ii(t,e,n,"weekdaysMin")}function ui(){var t=this._data;return this._milliseconds=vr(this._milliseconds),this._days=vr(this._days),this._months=vr(this._months),t.milliseconds=vr(t.milliseconds),t.seconds=vr(t.seconds),t.minutes=vr(t.minutes),t.hours=vr(t.hours),t.months=vr(t.months),t.years=vr(t.years),this}function ci(t,e,n,i){var o=Xe(e,n);return t._milliseconds+=i*o._milliseconds,t._days+=i*o._days,t._months+=i*o._months,t._bubble()}function di(t,e){return ci(this,t,e,1)}function hi(t,e){return ci(this,t,e,-1)}function fi(t){return t<0?Math.floor(t):Math.ceil(t)}function pi(){var t,e,n,i,o,r=this._milliseconds,a=this._days,s=this._months,l=this._data;return r>=0&&a>=0&&s>=0||r<=0&&a<=0&&s<=0||(r+=864e5*fi(gi(s)+a),a=0,s=0),l.milliseconds=r%1e3,t=b(r/1e3),l.seconds=t%60,e=b(t/60),l.minutes=e%60,n=b(e/60),l.hours=n%24,a+=b(n/24),o=b(mi(a)),s+=o,a-=fi(gi(o)),i=b(s/12),s%=12,l.days=a,l.months=s,l.years=i,this}function mi(t){return 4800*t/146097}function gi(t){return 146097*t/4800}function vi(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=H(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+mi(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(gi(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function yi(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN}function bi(t){return function(){return this.as(t)}}function wi(){return Xe(this)}function xi(t){return t=H(t),this.isValid()?this[t+"s"]():NaN}function _i(t){return function(){return this.isValid()?this._data[t]:NaN}}function Di(){return b(this.days()/7)}function ki(t,e,n,i,o){return o.relativeTime(e||1,!!n,t,i)}function Si(t,e,n){var i=Xe(t).abs(),o=Rr(i.as("s")),r=Rr(i.as("m")),a=Rr(i.as("h")),s=Rr(i.as("d")),l=Rr(i.as("M")),u=Rr(i.as("y")),c=o<=Ar.ss&&["s",o]||o0,c[4]=n,ki.apply(null,c)}function Ci(t){return void 0===t?Rr:"function"==typeof t&&(Rr=t,!0)}function Mi(t,e){return void 0!==Ar[t]&&(void 0===e?Ar[t]:(Ar[t]=e,"s"===t&&(Ar.ss=e-1),!0))}function Ti(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=Si(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Ei(t){return(t>0)-(t<0)||+t}function Pi(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i=Hr(this._milliseconds)/1e3,o=Hr(this._days),r=Hr(this._months);t=b(i/60),e=b(t/60),i%=60,t%=60,n=b(r/12),r%=12;var a=n,s=r,l=o,u=e,c=t,d=i?i.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",p=Ei(this._months)!==Ei(h)?"-":"",m=Ei(this._days)!==Ei(h)?"-":"",g=Ei(this._milliseconds)!==Ei(h)?"-":"";return f+"P"+(a?p+a+"Y":"")+(s?p+s+"M":"")+(l?m+l+"D":"")+(u||c||d?"T":"")+(u?g+u+"H":"")+(c?g+c+"M":"")+(d?g+d+"S":"")}var Ii,Oi;Oi=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i68?1900:2e3)};var _o,Do=nt("FullYear",!0);_o=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:m()}),Ko=function(){return Date.now?Date.now():+new Date},Qo=["year","quarter","month","week","day","hour","minute","second","millisecond"];He("Z",":"),He("ZZ",""),U("Z",so),U("ZZ",so),Z(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ne(so,t)});var tr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var er=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,nr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Xe.fn=Le.prototype,Xe.invalid=Oe;var ir=en(1,"add"),or=en(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var rr=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)}),ar=1e3,sr=60*ar,lr=60*sr,ur=3506328*lr;j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),zn("gggg","weekYear"),zn("ggggg","weekYear"),zn("GGGG","isoWeekYear"),zn("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),U("G",ro),U("g",ro),U("GG",Ki,Gi),U("gg",Ki,Gi),U("GGGG",no,Zi),U("gggg",no,Zi),U("GGGGG",io,Xi),U("ggggg",io,Xi),X(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=w(t)}),X(["gg","GG"],function(t,n,i,o){n[o]=e.parseTwoDigitYear(t)}),j("Q",0,"Qo","quarter"),A("quarter","Q"),F("quarter",7),U("Q",qi),Z("Q",function(t,e){e[po]=3*(w(t)-1)}),j("D",["DD",2],"Do","date"),A("date","D"),F("date",9),U("D",Ki),U("DD",Ki,Gi),U("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Z(["D","DD"],mo),Z("Do",function(t,e){e[mo]=w(t.match(Ki)[0])});var cr=nt("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),F("dayOfYear",4),U("DDD",eo),U("DDDD",Ji),Z(["DDD","DDDD"],function(t,e,n){n._dayOfYear=w(t)}),j("m",["mm",2],0,"minute"),A("minute","m"),F("minute",14),U("m",Ki),U("mm",Ki,Gi),Z(["m","mm"],vo);var dr=nt("Minutes",!1);j("s",["ss",2],0,"second"),A("second","s"),F("second",15),U("s",Ki),U("ss",Ki,Gi),Z(["s","ss"],yo);var hr=nt("Seconds",!1);j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),F("millisecond",16),U("S",eo,qi),U("SS",eo,Gi),U("SSS",eo,Ji);var fr;for(fr="SSSS";fr.length<=9;fr+="S")U(fr,oo);for(fr="S";fr.length<=9;fr+="S")Z(fr,Jn);var pr=nt("Milliseconds",!1);j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var mr=v.prototype;mr.add=ir,mr.calendar=rn,mr.clone=an,mr.diff=fn,mr.endOf=En,mr.format=yn,mr.from=bn,mr.fromNow=wn,mr.to=xn,mr.toNow=_n,mr.get=rt,mr.invalidAt=Fn,mr.isAfter=sn,mr.isBefore=ln,mr.isBetween=un,mr.isSame=cn,mr.isSameOrAfter=dn,mr.isSameOrBefore=hn,mr.isValid=Hn,mr.lang=rr,mr.locale=Dn,mr.localeData=kn,mr.max=Xo,mr.min=Zo,mr.parsingFlags=Nn,mr.set=at,mr.startOf=Tn,mr.subtract=or,mr.toArray=Ln,mr.toObject=Rn,mr.toDate=On,mr.toISOString=gn,mr.inspect=vn,mr.toJSON=An,mr.toString=mn,mr.unix=In,mr.valueOf=Pn,mr.creationData=Yn,mr.year=Do,mr.isLeapYear=et,mr.weekYear=jn,mr.isoWeekYear=Bn,mr.quarter=mr.quarters=qn,mr.month=pt,mr.daysInMonth=mt,mr.week=mr.weeks=Tt,mr.isoWeek=mr.isoWeeks=Et,mr.weeksInYear=Vn,mr.isoWeeksInYear=Wn,mr.date=cr,mr.day=mr.days=Ft,mr.weekday=Yt,mr.isoWeekday=zt,mr.dayOfYear=Gn,mr.hour=mr.hours=Fo,mr.minute=mr.minutes=dr,mr.second=mr.seconds=hr,mr.millisecond=mr.milliseconds=pr,mr.utcOffset=ze,mr.utc=Be,mr.local=We,mr.parseZone=Ve,mr.hasAlignedHourOffset=$e,mr.isDST=Ue,mr.isLocal=Ge,mr.isUtcOffset=Je,mr.isUtc=Ze,mr.isUTC=Ze,mr.zoneAbbr=Zn,mr.zoneName=Xn,mr.dates=D("dates accessor is deprecated. Use date instead.",cr),mr.months=D("months accessor is deprecated. Use month instead",pt),mr.years=D("years accessor is deprecated. Use year instead",Do),mr.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",je),mr.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",qe);var gr=T.prototype;gr.calendar=E,gr.longDateFormat=P,gr.invalidDate=I,gr.ordinal=O,gr.preparse=ti,gr.postformat=ti,gr.relativeTime=L,gr.pastFuture=R,gr.set=C,gr.months=ut,gr.monthsShort=ct,gr.monthsParse=ht,gr.monthsRegex=vt,gr.monthsShortRegex=gt,gr.week=St,gr.firstDayOfYear=Mt,gr.firstDayOfWeek=Ct,gr.weekdays=Lt,gr.weekdaysMin=At,gr.weekdaysShort=Rt,gr.weekdaysParse=Nt,gr.weekdaysRegex=jt,gr.weekdaysShortRegex=Bt,gr.weekdaysMinRegex=Wt,gr.isPM=Jt,gr.meridiem=Zt,te("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=D("moment.lang is deprecated. Use moment.locale instead.",te),e.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ie);var vr=Math.abs,yr=bi("ms"),br=bi("s"),wr=bi("m"),xr=bi("h"),_r=bi("d"),Dr=bi("w"),kr=bi("M"),Sr=bi("Q"),Cr=bi("y"),Mr=_i("milliseconds"),Tr=_i("seconds"),Er=_i("minutes"),Pr=_i("hours"),Ir=_i("days"),Or=_i("months"),Lr=_i("years"),Rr=Math.round,Ar={ss:44,s:45,m:45,h:22,d:26,M:11},Hr=Math.abs,Nr=Le.prototype;return Nr.isValid=Ie,Nr.abs=ui,Nr.add=di,Nr.subtract=hi,Nr.as=vi,Nr.asMilliseconds=yr,Nr.asSeconds=br,Nr.asMinutes=wr,Nr.asHours=xr,Nr.asDays=_r,Nr.asWeeks=Dr,Nr.asMonths=kr,Nr.asQuarters=Sr,Nr.asYears=Cr,Nr.valueOf=yi,Nr._bubble=pi,Nr.clone=wi,Nr.get=xi,Nr.milliseconds=Mr,Nr.seconds=Tr,Nr.minutes=Er,Nr.hours=Pr,Nr.days=Ir,Nr.weeks=Di,Nr.months=Or,Nr.years=Lr,Nr.humanize=Ti,Nr.toISOString=Pi,Nr.toString=Pi,Nr.toJSON=Pi,Nr.locale=Dn,Nr.localeData=kn,Nr.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Pi),Nr.lang=rr,j("X",0,0,"unix"),j("x",0,0,"valueOf"),U("x",ro),U("X",lo),Z("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Z("x",function(t,e,n){n._d=new Date(w(t))}),e.version="2.24.0",function(t){Ii=t}(Ce),e.fn=mr,e.min=Te,e.max=Ee,e.now=Ko,e.utc=d,e.unix=Kn,e.months=oi,e.isDate=s,e.locale=te,e.invalid=m,e.duration=Xe,e.isMoment=y,e.weekdays=ai,e.parseZone=Qn,e.localeData=ie,e.isDuration=Re,e.monthsShort=ri,e.weekdaysMin=li,e.defineLocale=ee,e.updateLocale=ne,e.locales=oe,e.weekdaysShort=si,e.normalizeUnits=H,e.relativeTimeRounding=Ci,e.relativeTimeThreshold=Mi,e.calendarFormat=on,e.prototype=mr,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})}).call(e,n("3IRH")(t))},"PL/P":function(t,e,n){var i,o;/**
* @version: 3.0.5
* @author: Dan Grossman http://www.dangrossman.info/
* @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved.
diff --git a/public/build/manifest.json b/public/build/manifest.json
index 0cdedefd..cc673240 100644
--- a/public/build/manifest.json
+++ b/public/build/manifest.json
@@ -1,5 +1,5 @@
{
- "build/app.js": "./app.js?b2225d72491af37dec94",
+ "build/app.js": "./app.js?f256658f0e056beff1e8",
"build/app.css": "./app.css?52d21a4cca9a4768126cc7e11f6a78e9",
"build/fonts/fa-solid-900.woff2": "./fonts/fa-solid-900.woff2?e8a92a29",
"build/images/fa-solid-900.svg": "./images/fa-solid-900.svg?666a82cb",
diff --git a/src/API/TimesheetController.php b/src/API/TimesheetController.php
index 46fac58b..89e5dcb4 100644
--- a/src/API/TimesheetController.php
+++ b/src/API/TimesheetController.php
@@ -13,6 +13,7 @@ namespace App\API;
use App\Configuration\TimesheetConfiguration;
use App\Entity\Timesheet;
+use App\Entity\User;
use App\Form\TimesheetEditForm;
use App\Repository\Query\TimesheetQuery;
use App\Repository\TagRepository;
@@ -30,7 +31,9 @@ use Swagger\Annotations as SWG;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
+use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Validator\Constraints;
+use Symfony\Component\Validator\Validator\ValidatorInterface;
/**
* @RouteResource("Timesheet")
@@ -527,4 +530,86 @@ class TimesheetController extends BaseApiController
return $this->viewHandler->handle($view);
}
+
+ /**
+ * Restarts a previously stopped timesheet record for the current user
+ *
+ * @SWG\Response(
+ * response=200,
+ * description="Restarts a timesheet record for the same customer, project, activity combination. The current user will be the owner of the new record. Kimai tries to stop running records, which is expected to fail depending on the configured rules. Data will be copied from the original record if requested.",
+ * @SWG\Schema(ref="#/definitions/TimesheetEntity")
+ * )
+ * @SWG\Parameter(
+ * name="id",
+ * in="path",
+ * type="integer",
+ * description="Timesheet record ID to restart",
+ * required=true,
+ * )
+ *
+ * @Rest\RequestParam(name="copy", requirements="all|tags|description", strict=true, nullable=true, description="Whether description and tags are copied to the new entry. Allowed values: all, tags, description (default: nothing is copied)")
+ *
+ * @Security("is_granted('start_own_timesheet') or is_granted('start_other_timesheet')")
+ *
+ * @param int $id
+ * @return Response
+ * @throws \App\Repository\RepositoryException
+ * @throws \Doctrine\ORM\ORMException
+ * @throws \Doctrine\ORM\OptimisticLockException
+ */
+ public function restartAction($id, ParamFetcherInterface $paramFetcher, ValidatorInterface $validator)
+ {
+ /** @var Timesheet $timesheet */
+ $timesheet = $this->repository->find($id);
+ /** @var User $user */
+ $user = $this->getUser();
+
+ if (null === $timesheet) {
+ throw new NotFoundException();
+ }
+
+ if (!$this->isGranted('start', $timesheet)) {
+ throw new AccessDeniedHttpException('You are not allowed to re-start this timesheet');
+ }
+
+ $entry = new Timesheet();
+ $entry
+ ->setBegin($this->dateTime->createDateTime())
+ ->setUser($user)
+ ->setActivity($timesheet->getActivity())
+ ->setProject($timesheet->getProject())
+ ;
+
+ if (null !== ($copy = $paramFetcher->get('copy'))) {
+ if (in_array($copy, ['description', 'all'])) {
+ $entry->setDescription($timesheet->getDescription());
+ }
+
+ if (in_array($copy, ['tags', 'all'])) {
+ foreach ($timesheet->getTags() as $tag) {
+ $entry->addTag($tag);
+ }
+ }
+ }
+
+ $errors = $validator->validate($entry);
+
+ if (count($errors) > 0) {
+ throw new BadRequestHttpException($errors[0]->getPropertyPath() . ' = ' . $errors[0]->getMessage());
+ }
+
+ $this->repository->stopActiveEntries(
+ $user,
+ $this->configuration->getActiveEntriesHardLimit()
+ );
+
+ $entityManager = $this->getDoctrine()->getManager();
+ $entityManager->persist($entry);
+ $entityManager->flush();
+
+ $view = new View($entry, 200);
+ $view->getContext()->setGroups(['Default', 'Entity', 'Timesheet']);
+
+ return $this->viewHandler->handle($view);
+ }
}
diff --git a/src/Controller/TimesheetController.php b/src/Controller/TimesheetController.php
index 2292bc2a..dedfb6b3 100644
--- a/src/Controller/TimesheetController.php
+++ b/src/Controller/TimesheetController.php
@@ -21,7 +21,6 @@ use Pagerfanta\Pagerfanta;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
-use Symfony\Component\Validator\Validator\ValidatorInterface;
/**
* Controller used to manage timesheets.
@@ -126,6 +125,8 @@ class TimesheetController extends AbstractController
}
/**
+ * Used for the initial page rendering.
+ *
* @return \Symfony\Component\HttpFoundation\Response
*/
public function activeEntriesAction()
@@ -142,44 +143,6 @@ class TimesheetController extends AbstractController
);
}
- /**
- * @Route(path="/start/{id}", name="timesheet_start", requirements={"id" = "\d+"}, methods={"GET", "POST"})
- * @Security("is_granted('start', timesheet)")
- *
- * @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
- */
- public function startAction(ValidatorInterface $validator, Timesheet $timesheet)
- {
- $user = $this->getUser();
-
- try {
- $entry = new Timesheet();
- $entry
- ->setBegin($this->dateTime->createDateTime())
- ->setUser($user)
- ->setActivity($timesheet->getActivity())
- ->setProject($timesheet->getProject());
-
- $errors = $validator->validate($entry);
-
- if (count($errors) > 0) {
- $this->flashError('timesheet.start.error', ['%reason%' => $errors[0]->getPropertyPath() . ' = ' . $errors[0]->getMessage()]);
- } else {
- $this->stopActiveEntries($user);
-
- $entityManager = $this->getDoctrine()->getManager();
- $entityManager->persist($entry);
- $entityManager->flush();
-
- $this->flashSuccess('timesheet.start.success');
- }
- } catch (\Exception $ex) {
- $this->flashError('timesheet.start.error', ['%reason%' => $ex->getMessage()]);
- }
-
- return $this->redirectToRoute('timesheet');
- }
-
/**
* @Route(path="/{id}/edit", name="timesheet_edit", methods={"GET", "POST"})
* @Security("is_granted('edit', entry)")
diff --git a/src/Controller/TimesheetControllerTrait.php b/src/Controller/TimesheetControllerTrait.php
index 466dea48..8c7d1275 100644
--- a/src/Controller/TimesheetControllerTrait.php
+++ b/src/Controller/TimesheetControllerTrait.php
@@ -45,14 +45,6 @@ trait TimesheetControllerTrait
$this->configuration = $configuration;
}
- /**
- * @return int
- */
- protected function getHardLimit()
- {
- return $this->configuration->getActiveEntriesHardLimit();
- }
-
/**
* @return int
*/
@@ -163,14 +155,17 @@ trait TimesheetControllerTrait
try {
if (null === $entry->getEnd()) {
- $this->stopActiveEntries($entry->getUser());
+ $this->getRepository()->stopActiveEntries(
+ $entry->getUser(),
+ $this->configuration->getActiveEntriesHardLimit()
+ );
}
$entityManager->persist($entry);
$entityManager->flush();
$this->flashSuccess('action.update.success');
} catch (\Exception $ex) {
- $this->flashError('timesheet.start.error', ['%reason%' => $ex->getMessage()]);
+ $this->flashError('action.update.error', ['%reason%' => $ex->getMessage()]);
}
return $this->redirectToRoute($redirectRoute);
@@ -182,17 +177,6 @@ trait TimesheetControllerTrait
]);
}
- /**
- * @param User $user
- * @throws \App\Repository\RepositoryException
- * @throws \Doctrine\ORM\ORMException
- * @throws \Doctrine\ORM\OptimisticLockException
- */
- protected function stopActiveEntries(User $user)
- {
- $this->getRepository()->stopActiveEntries($user, $this->getHardLimit());
- }
-
/**
* @param Timesheet $entry
* @param string $redirectRoute
diff --git a/src/Form/TimesheetEditForm.php b/src/Form/TimesheetEditForm.php
index eeb56ec6..daf9fa89 100644
--- a/src/Form/TimesheetEditForm.php
+++ b/src/Form/TimesheetEditForm.php
@@ -257,8 +257,8 @@ class TimesheetEditForm extends AbstractType
->add('tags', TagsInputType::class, [
// documentation is for NelmioApiDocBundle
'documentation' => [
- 'type' => 'text',
- 'description' => 'Tags for timesheet entry',
+ 'type' => 'string',
+ 'description' => 'Comma separated list of tags for this timesheet record',
],
'required' => false,
]);
diff --git a/templates/base.html.twig b/templates/base.html.twig
index c4e0beae..dfa6227a 100644
--- a/templates/base.html.twig
+++ b/templates/base.html.twig
@@ -193,6 +193,9 @@
'lastYear': '{{ 'daterangepicker.lastYear'|trans({}, 'daterangepicker') }}',
'thisYear': '{{ 'daterangepicker.thisYear'|trans({}, 'daterangepicker') }}',
'customRange': '{{ 'daterangepicker.customRange'|trans({}, 'daterangepicker') }}',
+ 'timesheet.start.success': '{{ 'timesheet.start.success'|trans({}, 'flashmessages') }}',
+ 'timesheet.start.error': '{{ 'timesheet.start.error'|trans({}, 'flashmessages') }}',
+ 'timesheet.start.exceeded_limit': '{{ 'timesheet.start.exceeded_limit'|trans({}, 'flashmessages') }}',
'timesheet.stop.success': '{{ 'timesheet.stop.success'|trans({}, 'flashmessages') }}',
'timesheet.stop.error': '{{ 'timesheet.stop.error'|trans({}, 'flashmessages') }}',
'action.update.success': '{{ 'action.update.success'|trans({}, 'flashmessages') }}',
diff --git a/templates/macros/actions.html.twig b/templates/macros/actions.html.twig
index fa1941e7..2ccee75d 100644
--- a/templates/macros/actions.html.twig
+++ b/templates/macros/actions.html.twig
@@ -219,7 +219,7 @@
{% endif %}
{% if timesheet.end and is_granted('start', timesheet) %}
- {% set actions = actions|merge({'repeat': path('timesheet_start', {'id' : timesheet.id})}) %}
+ {% set actions = actions|merge({'repeat': {'url': path('restart_timesheet', {'id' : timesheet.id}), 'class': 'api-link', 'attr': {'data-payload': '{"copy": "all"}', 'data-event': 'kimai.timesheetStart kimai.timesheetUpdate', 'data-method': 'PATCH', 'data-msg-error': 'timesheet.start.error', 'data-msg-success': 'timesheet.start.success'}}}) %}
{% endif %}
{% if is_granted('edit', timesheet) %}
@@ -274,7 +274,7 @@
{% endif %}
{% if timesheet.end and is_granted('start', timesheet) %}
- {% set actions = actions|merge({'repeat': path('timesheet_start', {'id' : timesheet.id})}) %}
+ {% set actions = actions|merge({'repeat': {'url': path('restart_timesheet', {'id' : timesheet.id}), 'class': 'api-link', 'attr': {'data-payload': '{"copy": "all"}', 'data-event': 'kimai.timesheetStart kimai.timesheetUpdate', 'data-method': 'PATCH', 'data-msg-error': 'timesheet.start.error', 'data-msg-success': 'timesheet.start.success'}}}) %}
{% endif %}
{% if is_granted('edit', timesheet) %}
diff --git a/templates/macros/widgets.html.twig b/templates/macros/widgets.html.twig
index dd3a0eba..a1efe8d7 100644
--- a/templates/macros/widgets.html.twig
+++ b/templates/macros/widgets.html.twig
@@ -253,8 +253,8 @@
target="{{ target }}"
{%- endif -%}
{%- if attr is not empty -%}
- {%- for name, value in attr -%}
- {{ name }}="{{ value }}"
+ {%- for name, value in attr %}
+ {{- ' ' ~ name }}={% if '"' in value %}'{{ value|raw }}'{% else %}"{{ value|raw }}"{% endif %}
{%- endfor -%}
{%- endif -%}
>{% if title is not null %}{{ title }}{% else %}{{ macro.icon(icon) }}{% endif %}
diff --git a/templates/navbar/recent-activities.html.twig b/templates/navbar/recent-activities.html.twig
index d1caaafc..a706536e 100644
--- a/templates/navbar/recent-activities.html.twig
+++ b/templates/navbar/recent-activities.html.twig
@@ -5,7 +5,7 @@