text: /** 
   * Kendo UI v2016.1.412 (http://www.telerik.com/kendo-ui)                                                                                                                                               
   * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
   *                                                                                                                                                                                                      
   * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
   * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
   * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
  
  */
  !function(e,define){define("kendo.scheduler.recurrence.min",["kendo.dropdownlist.min","kendo.datepicker.min","kendo.numerictextbox.min"],e)}(function(){return function(e,t){function n(e,t){var n;return 0!==e&&t>e?n=t-e:(n=e%t,n&&(n=t-n)),n}function a(e){var t=e.getMonth(),n=k(e)?te[t]:ne[t];return n+e.getDate()}function i(e,n){var a,i;return e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),J(e,0),a=e.getFullYear(),n!==t?(G(e,n,-1),e.setDate(e.getDate()+4)):e.setDate(e.getDate()+(4-(e.getDay()||7))),J(e,0),i=Math.floor((e.getTime()-new Date(a,0,1,-6))/864e5),1+Math.floor(i/7)}function s(e,t){var n=$(e).getDay(),a=7-(n+7-(t||7))||7;return 0>a&&(a+=7),Math.ceil((e.getDate()-a)/7)+1}function r(e,t){return e+(t>e?7:0)}function l(e,t,n){var a,i,l,o,u,d=t.offset;return d?(a=new Date(e.getFullYear(),e.getMonth()+1,0),i=s(a,n),l=r(t.day,n),o=l<r(new Date(e.getFullYear(),e.getMonth(),1).getDay(),n),u=l>r(a.getDay(),n),0>d?d=i+(d+1-(u?1:0)):o&&(d+=1),i-=u?1:0,(o?1:0)>d||d>i?null:d):s(e,n)}function o(e,t){return s(new Date(e.getFullYear(),e.getMonth()+1,0),t)}function u(e,t,n){return s(e,n)===l(e,t,n)}function d(e,t,n){for(var a,i,o,u,d=r(t.getDay(),n),c=e.length,f=[],y=0;c>y;y++)if(i=e[y],u=s(t,n),a=l(t,i,n),null!==a)if(a>u)f.push(i);else if(u===a)if(o=r(i.day,n),o>d)f.push(i);else if(d===o)return null;return f}function c(e,t,n){for(var a,i=0,s=e.length,r=[];s>i;i++){if(a=e[i],n&&(a=n(a)),t===a)return null;a>t&&r.push(a)}return r}function f(e,t){for(var n,a=0,i=e.length;i>a;a++){if(n=parseInt(e[a],10),isNaN(n)||t.start>n||n>t.end||0===n&&0>t.start)return null;e[a]=n}return e.sort(m)}function y(e){for(var n,a,i,s=0,r=e.length;r>s;s++){if(n=e[s],a=n.length,i=n.substring(a-2).toUpperCase(),i=se[i],i===t)return null;e[s]={offset:parseInt(n.substring(0,a-2),10)||0,day:i}}return e}function v(e){for(var t,n,a=0,i=e.length,s=[];i>a;a++)t=e[a],"string"==typeof t?n=t:(n=""+ie[t.day],t.offset&&(n=t.offset+n)),s.push(n);return""+s}function h(e){var t=e.getMonth();return 1===t?1===new Date(e.getFullYear(),1,29).getMonth()?29:28:ae[t]}function k(e){return e=e.getFullYear(),e%4===0&&e%100!==0||e%400===0}function m(e,t){return e-t}function g(e,t){var n,a,i=0,s=[];if(e)for(e=e.split(";"),n=e.length;n>i;i++)a=x(e[i],t),a&&s.push(a);return s}function p(t,n,a){for(var i=e.isArray(t)?t:g(t,a),s=n.getTime()-n.getMilliseconds(),r=0,l=i.length;l>r;r++)if(i[r].getTime()===s)return!0;return!1}function _(e,t){var n,a,i=0,s=[].concat(e);for(n=s.length;n>i;i++)a=s[i],a=P.timezone.convert(a,t||a.getTimezoneOffset(),"Etc/UTC"),s[i]=P.toString(a,ue);return s.join(";")+";"}function D(e,t){var n=new Date(e);switch(t.freq){case"yearly":n.setFullYear(n.getFullYear(),0,1);break;case"monthly":n.setFullYear(n.getFullYear(),n.getMonth(),1);break;case"weekly":G(n,t.weekStart,-1)}return t.hours&&n.setHours(0),t.minutes&&n.setMinutes(0),t.seconds&&n.setSeconds(0),n}function w(e,t){var n=new Date(e);switch(t.freq){case"yearly":n.setFullYear(n.getFullYear(),11,31);break;case"monthly":n.setFullYear(n.getFullYear(),n.getMonth()+1,0);break;case"weekly":G(n,t.weekStart,-1),n.setDate(n.getDate()+6)}return t.hours&&n.setHours(23),t.minutes&&n.setMinutes(59),t.seconds&&n.setSeconds(59),n}function b(e,t,n){var a,i,s,r,l=e.length,o=[];for(s=0,r=n.length;r>s;s++)a=n[s],0>a?a=l+a:a-=1,i=e[a],i&&i.start>=t&&o.push(i);return o}function M(e,t,n){var a,i,s=[];for(i=0;e.length>i;i++)a=e[i],p(t,a.start,n)||s.push(a);return s}function T(e,n,a,i){var s,r,l,o,u,d,c,f,y,v,h,k,m,T,x,H,E,S,O,F,q,R,B,N=Y(e.recurrenceRule,i),C=[];if(!N)return[e];for(F=N.positions,q=F?0:1,v=N.start,h=N.end,(v||h)&&(e=e.clone({start:v?new Date(v.value[0]):t,end:h?new Date(h.value[0]):t})),E=e.start,H=E.getTime(),x=ee(E),T=g(e.recurrenceException,i),!T[0]&&N.exdates&&(T=N.exdates.value,e.set("recurrenceException",_(T,i))),f=n=new Date(n),a=new Date(a),m=N.freq,O=me[m],S=N.count,N.until&&a>N.until&&(a=new Date(N.until)),k="yearly"===m||"monthly"===m||"weekly"===m,H>n||S||N.interval>1||k?n=new Date(H):(o=n.getHours(),u=n.getMinutes(),d=n.getSeconds(),N.hours||(o=E.getHours()),N.minutes||(u=E.getMinutes()),N.seconds||(d=E.getSeconds()),n.setHours(o,u,d,E.getMilliseconds())),N._startPeriod=new Date(n),F&&(n=D(n,N),a=w(a,N),B=ee(a)-ee(n),0>B&&(o=n.getHours(),a.setHours(o,n.getMinutes(),n.getSeconds(),n.getMilliseconds()),Q.adjustDST(a,o)),N._startPeriod=new Date(n),N._endPeriod=w(n,N)),c=e.duration(),N._startTime=s=Q.toInvariantTime(n),O.setup&&O.setup(N,E,n),O.limit(n,a,N);a>=n;)if(l=new Date(n),X(l,c),y=n>=f||l>f,(y&&!p(T,n,i)||F)&&(s=Q.toUtcTime(Q.getDate(n))+ee(N._startTime),r=s+c,H!==n.getTime()||x!==ee(N._startTime)?C.push(e.toOccurrence({start:new Date(n),end:l,_startTime:s,_endTime:r})):(e._startTime=s,e._endTime=r,C.push(e))),F){if(O.next(n,N),O.limit(n,a,N),n>N._endPeriod&&(R=b(C.slice(q),E,F),R=M(R,T,i),C=C.slice(0,q).concat(R),N._endPeriod=w(n,N),q=C.length),S&&S===q)break}else{if(S&&S===q)break;q+=1,O.next(n,N),O.limit(n,a,N)}return C}function x(e,t){return e=P.parseDate(e,re),e&&t&&(e=I.convert(e,e.getTimezoneOffset(),t)),e}function H(e,n){var a,i,s,r,l,o,u,d,c=e.split(";");for(u=0,d=c.length;d>u;u++)if(a=c[u].split(":"),i=a[0],s=a[1],-1!==i.indexOf("TZID")&&(r=i.substring(i.indexOf("TZID")).split("=")[1]),s)for(s=s.split(","),l=0,o=s.length;o>l;l++)s[l]=x(s[l],r||n);return s?{value:s,tzid:r}:t}function Y(n,a){var i,s,r,l,o,u,d,c,v,h={},k=0,m=!1,g=function(e,t){var n=e.day,a=t.day;return c>n&&(n+=7),c>a&&(a+=7),n-a};if(!n)return null;for(u=n.split("\n"),u[1]||-1===n.indexOf("DTSTART")&&-1===n.indexOf("DTEND")&&-1===n.indexOf("EXDATE")||(u=n.split(" ")),k=0,r=u.length;r>k;k++)o=e.trim(u[k]),-1!==o.indexOf("DTSTART")?h.start=H(o,a):-1!==o.indexOf("DTEND")?h.end=H(o,a):-1!==o.indexOf("EXDATE")?h.exdates=H(o,a):-1!==o.indexOf("RRULE")?l=o.substring(6):e.trim(o)&&(l=o);for(l=l.split(";"),k=0,r=l.length;r>k;k++)switch(d=l[k],i=d.split("="),s=e.trim(i[1]).split(","),e.trim(i[0]).toUpperCase()){case"FREQ":h.freq=s[0].toLowerCase();break;case"UNTIL":h.until=x(s[0],a);break;case"COUNT":h.count=parseInt(s[0],10);break;case"INTERVAL":h.interval=parseInt(s[0],10);break;case"BYSECOND":h.seconds=f(s,{start:0,end:60}),m=!0;break;case"BYMINUTE":h.minutes=f(s,{start:0,end:59}),m=!0;break;case"BYHOUR":h.hours=f(s,{start:0,end:23}),m=!0;break;case"BYMONTHDAY":h.monthDays=f(s,{start:-31,end:31}),m=!0;break;case"BYYEARDAY":h.yearDays=f(s,{start:-366,end:366}),m=!0;break;case"BYMONTH":h.months=f(s,{start:1,end:12}),m=!0;break;case"BYDAY":h.weekDays=v=y(s),m=!0;break;case"BYWEEKNO":h.weeks=f(s,{start:-53,end:53}),m=!0;break;case"BYSETPOS":h.positions=f(s,{start:-366,end:366});break;case"WKST":h.weekStart=c=se[s[0]]}return h.freq===t||h.count!==t&&h.until?null:(h.interval||(h.interval=1),c===t&&(h.weekStart=c=P.culture().calendar.firstDay),v&&(h.weekDays=v.sort(g)),h.positions&&!m&&(h.positions=null),h._hasRuleValue=m,h)}function E(e,t){for(var n,a=e.value,i=e.tzid||"",s=a.length,r=0;s>r;r++)n=a[r],n=I.convert(n,i||t||n.getTimezoneOffset(),"Etc/UTC"),a[r]=P.toString(n,"yyyyMMddTHHmmssZ");return i&&(i=";TZID="+i),i+":"+a.join(",")+" "}function S(e,n){var a=e.weekStart,i="FREQ="+e.freq.toUpperCase(),s=e.exdates||"",r=e.start||"",l=e.end||"",o=e.until;return e.interval>1&&(i+=";INTERVAL="+e.interval),e.count&&(i+=";COUNT="+e.count),o&&(o=I.convert(o,n||o.getTimezoneOffset(),"Etc/UTC"),i+=";UNTIL="+P.toString(o,"yyyyMMddTHHmmssZ")),e.months&&(i+=";BYMONTH="+e.months),e.weeks&&(i+=";BYWEEKNO="+e.weeks),e.yearDays&&(i+=";BYYEARDAY="+e.yearDays),e.monthDays&&(i+=";BYMONTHDAY="+e.monthDays),e.weekDays&&(i+=";BYDAY="+v(e.weekDays)),e.hours&&(i+=";BYHOUR="+e.hours),e.minutes&&(i+=";BYMINUTE="+e.minutes),e.seconds&&(i+=";BYSECOND="+e.seconds),e.positions&&(i+=";BYSETPOS="+e.positions),a!==t&&(i+=";WKST="+ie[a]),r&&(r="DTSTART"+E(r,n)),l&&(l="DTEND"+E(l,n)),s&&(s="EXDATE"+E(s,n)),(r||l||s)&&(i=r+l+s+"RRULE:"+i),i}var O,F,q,R,B,N,C,W,z,U,V,A,P=window.kendo,I=P.timezone,L=P.Class,Z=P.ui,j=Z.Widget,K=Z.DropDownList,Q=P.date,X=Q.setTime,G=Q.setDayOfWeek,J=Q.adjustDST,$=Q.firstDayOfMonth,ee=Q.getMilliseconds,te=[0,31,60,91,121,152,182,213,244,274,305,335,366],ne=[0,31,59,90,120,151,181,212,243,273,304,334,365],ae=[31,28,30,31,30,31,30,31,30,31,30,31],ie={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},se={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},re=["yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-ddTHH","yyyy-MM-dd","yyyyMMddTHHmmssfffzzz","yyyyMMddTHHmmsszzz","yyyyMMddTHHmmss","yyyyMMddTHHmm","yyyyMMddTHH","yyyyMMdd"],le=["months","weeks","yearDays","monthDays","weekDays","hours","minutes","seconds"],oe=le.length,ue="yyyyMMddTHHmmssZ",de={months:function(e,t,n){var a=n.months,i=c(a,e.getMonth()+1),s=!1;return null!==i&&(i.length?e.setMonth(i[0]-1,1):e.setFullYear(e.getFullYear()+1,a[0]-1,1),s=!0),s},monthDays:function(e,t,n){for(var a,i,s,r=!1,l=e.getHours(),o=function(e){return 0>e&&(e=a+e),e};t>=e;){if(i=e.getMonth(),a=h(e),s=c(n.monthDays,e.getDate(),o),null===s)return r;if(r=!0,s.length){if(e.setMonth(i,s.sort(m)[0]),J(e,l),i===e.getMonth())break}else e.setMonth(i+1,1)}return r},yearDays:function(e,t,n){for(var i,s,r=!1,l=e.getHours(),o=function(e){return 0>e&&(e=i+e),e};t>e;){if(i=k(e)?366:365,s=c(n.yearDays,a(e),o),null===s)return r;if(r=!0,i=e.getFullYear(),s.length){e.setFullYear(i,0,s.sort(m)[0]),J(e,l);break}e.setFullYear(i+1,0,1)}return r},weeks:function(e,t,n){for(var a,s,r,l=n.weekStart,o=!1,u=e.getHours(),d=function(e){return 0>e&&(e=53+e),e};t>e;){if(s=c(n.weeks,i(e,l),d),null===s)return o;if(o=!0,a=e.getFullYear(),s.length){r=7*s.sort(m)[0]-1,e.setFullYear(a,0,r),G(e,l,-1),J(e,u);break}e.setFullYear(a+1,0,1)}return o},weekDays:function(e,t,n){var a,i,r=n.weekDays,l=n.weekStart,c=d(r,e,l),f=e.getHours();if(null===c)return!1;if(a=c[0],a||(a=r[0],G(e,l)),i=a.day,a.offset)for(;t>=e&&!u(e,a,l);)s(e,l)===o(e,l)?(e.setMonth(e.getMonth()+1,1),J(e,f)):(e.setDate(e.getDate()+7),J(e,f),G(e,l,-1));return e.getDay()!==i&&G(e,i),!0},hours:function(e,t,n){var a=n.hours,i=n._startTime,s=i.getHours(),r=c(a,s),l=!1;return null!==r&&(l=!0,e.setHours(s),J(e,s),r.length?(r=r[0],e.setHours(r)):(r=e.getHours(),e.setDate(e.getDate()+1),J(e,r),r=a[0],e.setHours(r),J(e,r)),n.minutes&&e.setMinutes(0),i.setHours(r,e.getMinutes())),l},minutes:function(e,t,n){var a=n.minutes,i=e.getMinutes(),s=c(a,i),r=n._startTime.getHours(),l=!1;return null!==s&&(l=!0,s.length?s=s[0]:(r+=1,s=a[0]),n.seconds&&e.setSeconds(0),e.setHours(r,s),r%=24,J(e,r),n._startTime.setHours(r,s,e.getSeconds())),l},seconds:function(e,t,n){var a=n.seconds,i=n._startTime.getHours(),s=c(a,e.getSeconds()),r=e.getMinutes(),l=!1;return null!==s&&(l=!0,s.length?e.setSeconds(s[0]):(r+=1,e.setMinutes(r,a[0]),r>59&&(r%=60,i=(i+1)%24)),n._startTime.setHours(i,r,e.getSeconds())),l}},ce=L.extend({next:function(e,t){var n,a,i=t._startTime,s=i.getDate();if(t.seconds)a=e.getSeconds()+1,e.setSeconds(a),i.setSeconds(a),i.setDate(s);else{if(!t.minutes)return!1;n=e.getMinutes()+1,e.setMinutes(n),i.setMinutes(n),i.setDate(s)}return!0},normalize:function(e){var t=e.rule;4===e.idx&&t.hours&&(t._startTime.setHours(0),this._hour(e.date,t))},limit:function(e,n,a){for(var i,s,r,l,o,u=a.interval;n>=e;){for(r=s=t,o=e.getDate(),l=0;oe>l;l++){if(i=le[l],a[i]){if(r=de[i](e,n,a),s!==t&&r)break;s=r}r&&this.normalize({date:e,rule:a,day:o,idx:l})}if((1===u||!this.interval(a,e))&&l===oe)break}},interval:function(e,t){var a,s,r=new Date(e._startPeriod),l=new Date(t),o=t.getHours(),u=e.weekStart,d=e.interval,c=e.freq,f=!1,y=0,v=0,h=1;return"hourly"===c?(a=l.getTimezoneOffset()-r.getTimezoneOffset(),s=e._startTime.getHours(),l=l.getTime(),o!==s&&(l+=(s-o)*Q.MS_PER_HOUR),l-=r,a&&(l-=a*Q.MS_PER_MINUTE),a=Math.floor(l/Q.MS_PER_HOUR),y=n(a,d),0!==y&&(this._hour(t,e,y),f=!0)):"daily"===c?(Q.setTime(l,-r,!0),a=Math.ceil(l/Q.MS_PER_DAY),y=n(a,d),0!==y&&(this._date(t,e,y),f=!0)):"weekly"===c?(a=52*(t.getFullYear()-r.getFullYear()),y=i(t,u)-i(r,u)+a,y=n(y,d),0!==y&&(Q.setDayOfWeek(t,e.weekStart,-1),t.setDate(t.getDate()+7*y),J(t,o),f=!0)):"monthly"===c?(a=t.getFullYear()-r.getFullYear(),a=t.getMonth()-r.getMonth()+12*a,y=n(a,d),0!==y&&(h=e._hasRuleValue?1:t.getDate(),t.setFullYear(t.getFullYear(),t.getMonth()+y,h),J(t,o),f=!0)):"yearly"===c&&(a=t.getFullYear()-r.getFullYear(),y=n(a,d),e.months||(v=t.getMonth()),e.yearDays||e.monthDays||e.weekDays||(h=t.getDate()),0!==y&&(t.setFullYear(t.getFullYear()+y,v,h),J(t,o),f=!0)),f},_hour:function(e,t,n){var a=t._startTime,i=a.getHours();n&&(i+=n),e.setHours(i),i%=24,a.setHours(i),J(e,i)},_date:function(e,t,n){var a=e.getHours();e.setDate(e.getDate()+n),J(e,a)||this._hour(e,t)}}),fe=ce.extend({next:function(e,t){ce.fn.next(e,t)||this._hour(e,t,1)},normalize:function(e){var t=e.rule;4===e.idx&&(t._startTime.setHours(0),this._hour(e.date,t))}}),ye=ce.extend({next:function(e,t){ce.fn.next(e,t)||this[t.hours?"_hour":"_date"](e,t,1)}}),ve=ye.extend({setup:function(e,t){e.weekDays||(e.weekDays=[{day:t.getDay(),offset:0}])}}),he=ce.extend({next:function(e,t){var n,a;if(!ce.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else{for(n=e.getDate(),a=e.getHours(),e.setMonth(e.getMonth()+1),J(e,a);e.getDate()!==n;)e.setDate(n),J(e,a);this._hour(e,t)}},normalize:function(e){var t=e.rule,n=e.date,a=n.getHours();0!==e.idx||t.monthDays||t.weekDays?ce.fn.normalize(e):(n.setDate(e.day),J(n,a))},setup:function(e,t,n){e.monthDays||e.weekDays||n.setDate(t.getDate())}}),ke=he.extend({next:function(e,t){var n,a=e.getHours();if(!ce.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else if(t.months){for(n=e.getDate(),e.setMonth(e.getMonth()+1),J(e,a);e.getDate()!==n;)e.setDate(n),J(e,a);this._hour(e,t)}else e.setFullYear(e.getFullYear()+1),J(e,a),this._hour(e,t)},setup:function(){}}),me={hourly:new fe,daily:new ye,weekly:new ve,monthly:new he,yearly:new ke},ge="click";P.recurrence={rule:{parse:Y,serialize:S},expand:T,dayInYear:a,weekInYear:i,weekInMonth:s,numberOfWeeks:o,isException:p,toExceptionString:_},O=function(e){for(var t=P.culture().calendar.days.namesShort,n=t.length,a="",i=0,s=[];n>i;i++)s.push(i);for(t=t.slice(e).concat(t.slice(0,e)),s=s.slice(e).concat(s.slice(0,e)),i=0;n>i;i++)a+='<label class="k-check"><input class="k-recur-weekday-checkbox" type="checkbox" value="'+s[i]+'" /> '+t[i]+"</label>";return a},F=P.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-month-radio" type="radio" name="month" value="monthday" />#:messages.day#</label><input class="k-recur-monthday" /></li><li><input class="k-recur-month-radio" type="radio" name="month" value="weekday" /><input class="k-recur-weekday-offset" /><input class="k-recur-weekday" /></li></ul></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><input class="k-recur-year-radio" type="radio" name="year" value="monthday" /><input class="k-recur-month" /><input class="k-recur-monthday" /></li><li><input class="k-recur-year-radio" type="radio" name="year" value="weekday" /><input class="k-recur-weekday-offset" /><input class="k-recur-weekday" />#:messages.of#<input class="k-recur-month" /></li></ul></div># } ## if (frequency !== "never") { #<div class="k-edit-label"><label>#:end.label#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-end-never" type="radio" name="end" value="never" />#:end.never#</label></li><li><label><input class="k-recur-end-count" type="radio" name="end" value="count" />#:end.after#</label><input class="k-recur-count" />#:end.occurrence#</li><li><label><input class="k-recur-end-until" type="radio" name="end" value="until" />#:end.on#</label><input class="k-recur-until" /></li></ul></div># } #'),q=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],R=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],B=[{day:0,offset:0},{day:6,offset:0}],N=j.extend({init:function(e,t){var n,a=this,i=t&&t.frequencies;j.fn.init.call(a,e,t),a.wrapper=a.element,t=a.options,t.start=n=t.start||Q.today(),i&&(t.frequencies=i),"string"==typeof n&&(t.start=P.parseDate(n,"yyyyMMddTHHmmss")),null===t.firstWeekDay&&(t.firstWeekDay=P.culture().calendar.firstDay),a._namespace="."+t.name},options:{value:"",start:"",timezone:"",spinners:!0,firstWeekDay:null,frequencies:["never","daily","weekly","monthly","yearly"],mobile:!1,messages:{frequencies:{never:"Never",hourly:"Hourly",daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},hourly:{repeatEvery:"Repeat every: ",interval:" hour(s)"},daily:{repeatEvery:"Repeat every: ",interval:" day(s)"},weekly:{interval:" week(s)",repeatEvery:"Repeat every: ",repeatOn:"Repeat on: "},monthly:{repeatEvery:"Repeat every: ",repeatOn:"Repeat on: ",interval:" month(s)",day:"Day "},yearly:{repeatEvery:"Repeat every: ",repeatOn:"Repeat on: ",interval:" year(s)",of:" of "},end:{label:"End:",mobileLabel:"Ends",never:"Never",after:"After ",occurrence:" occurrence(s)",on:"On "},offsetPositions:{first:"first",second:"second",third:"third",fourth:"fourth",last:"last"},weekdays:{day:"day",weekday:"weekday",weekend:"weekend day"}}},events:["change"],_initInterval:function(){var e=this,t=e._value;e._container.find(".k-recur-interval").kendoNumericTextBox({spinners:e.options.spinners,value:t.interval||1,decimals:0,format:"#",min:1,change:function(){t.interval=this.value(),e._trigger()}})},_weekDayRule:function(e){var t=this,n=(t._weekDay.element||t._weekDay).val(),a=+(t._weekDayOffset.element||t._weekDayOffset).val(),i=null,s=null;e||("day"===n?(i=q,s=a):"weekday"===n?(i=R,s=a):"weekend"===n?(i=B,s=a):i=[{offset:a,day:+n}]),t._value.weekDays=i,t._value.positions=s},_weekDayView:function(){var e,t,n,a,i=this,s=i._value.weekDays,r=i._value.positions,l=i._weekDayOffset;s&&(n=s.length,r&&(7===n?(t="day",e=r):5===n?(t="weekday",e=r):2===n&&(t="weekend",e=r)),t||(s=s[0],t=s.day,e=s.offset||""),a=l.value?"value":"val",l[a](e),i._weekDay[a](t))},_initWeekDay:function(){var t,n=this,a=n.options.messages.weekdays,i=n.options.messages.offsetPositions,s=n._container.find(".k-recur-weekday"),r=function(){n._weekDayRule(),n._trigger()};s[0]&&(n._weekDayOffset=new K(n._container.find(".k-recur-weekday-offset"),{change:r,dataTextField:"text",dataValueField:"value",dataSource:[{text:i.first,value:"1"},{text:i.second,value:"2"},{text:i.third,value:"3"},{text:i.fourth,value:"4"},{text:i.last,value:"-1"}]}),t=[{text:a.day,value:"day"},{text:a.weekday,value:"weekday"},{text:a.weekend,value:"weekend"}],n._weekDay=new K(s,{value:n.options.start.getDay(),change:r,dataTextField:"text",dataValueField:"value",dataSource:t.concat(e.map(P.culture().calendar.days.names,function(e,t){return{text:e,value:t}}))}),n._weekDayView())},_initWeekDays:function(){var t,n,a,i,s,r=this,l=r._value,o=r._container.find(".k-recur-weekday-checkbox");if(o[0]&&(o.on(ge+r._namespace,function(){l.weekDays=e.map(o.filter(":checked"),function(e){return{day:+e.value,offset:0}}),r.options.mobile||r._trigger()}),l.weekDays))for(a=0,i=o.length,s=l.weekDays.length;i>a;a++)for(n=o[a],t=0;s>t;t++)n.value==l.weekDays[t].day&&(n.checked=!0)},_initMonthDay:function(){var e=this,t=e._value,n=e._container.find(".k-recur-monthday");n[0]&&(e._monthDay=new P.ui.NumericTextBox(n,{spinners:e.options.spinners,min:1,max:31,decimals:0,format:"#",value:t.monthDays?t.monthDays[0]:e.options.start.getDate(),change:function(){var n=this.value();t.monthDays=n?[n]:n,e._trigger()}}))},_initCount:function(){var e=this,t=e._container.find(".k-recur-count"),n=e._value;e._count=t.kendoNumericTextBox({spinners:e.options.spinners,value:n.count||1,decimals:0,format:"#",min:1,change:function(){n.count=this.value(),e._trigger()}}).data("kendoNumericTextBox")},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),n=e.options.start,a=e._value,i=a.until;e._until=t.kendoDatePicker({min:i&&n>i?i:n,value:i||new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59),change:function(){var t=this.value();a.until=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59),e._trigger()}}).data("kendoDatePicker")},_trigger:function(){this.options.mobile||this.trigger("change")}}),C=N.extend({init:function(e,t){var n=this;N.fn.init.call(n,e,t),n._initFrequency(),n._initContainer(),n.value(n.options.value)},options:{name:"RecurrenceEditor"},events:["change"],destroy:function(){var e=this;e._frequency.destroy(),e._container.find("input[type=radio],input[type=checkbox]").off(ge+e._namespace),P.destroy(e._container),N.fn.destroy.call(e)},value:function(e){var n,a=this,i=a.options.timezone;return e===t?a._value.freq?S(a._value,i):"":(a._value=Y(e,i)||{},n=a._value.freq,n?a._frequency.value(n):a._frequency.select(0),a._initView(a._frequency.value()),t)},_initContainer:function(){var t=this.element,n=e('<div class="k-recur-view" />'),a=t.parent(".k-edit-field");a[0]?n.insertAfter(a):t.append(n),this._container=n},_initFrequency:function(){var t,n=this,a=n.options,i=a.frequencies,s=a.messages.frequencies,r=e("<input />");i=e.map(i,function(e){return{text:s[e],value:e}}),t=i[0],t&&"never"===t.value&&(t.value=""),n.element.append(r),n._frequency=new K(r,{dataTextField:"text",dataValueField:"value",dataSource:i,change:function(){n._value={},n._initView(n._frequency.value()),n.trigger("change")}})},_initView:function(e){var n=this,a=n._value,i=n.options,s={frequency:e||"never",weekDayCheckBoxes:O,firstWeekDay:i.firstWeekDay,messages:i.messages[e],end:i.messages.end};return P.destroy(n._container),n._container.html(F(s)),e?(a.freq=e,"weekly"!==e||a.weekDays||(a.weekDays=[{day:i.start.getDay(),offset:0}]),n._initInterval(),n._initWeekDays(),n._initMonthDay(),n._initWeekDay(),n._initMonth(),n._initCount(),n._initUntil(),n._period(),n._end(),t):(n._value={},t)},_initMonth:function(){var t,n=this,a=n._value,i=a.months||[n.options.start.getMonth()+1],s=n._container.find(".k-recur-month");s[0]&&(t={change:function(){a.months=[+this.value()],n.trigger("change")},dataTextField:"text",dataValueField:"value",dataSource:e.map(P.culture().calendar.months.names,function(e,t){return{text:e,value:t+1}})},n._month1=new K(s[0],t),n._month2=new K(s[1],t),i&&(i=i[0],n._month1.value(i),n._month2.value(i)))},_end:function(){var e,t=this,n=t._value,a=t._container,i=t._namespace,s=function(e){t._toggleEnd(e.currentTarget.value),t.trigger("change")};t._buttonNever=a.find(".k-recur-end-never").on(ge+i,s),t._buttonCount=a.find(".k-recur-end-count").on(ge+i,s),t._buttonUntil=a.find(".k-recur-end-until").on(ge+i,s),n.count?e="count":n.until&&(e="until"),t._toggleEnd(e)},_period:function(){var e=this,t=e._value,n="monthly"===t.freq,a=n?e._toggleMonthDay:e._toggleYear,i=".k-recur-"+(n?"month":"year")+"-radio",s=e._container.find(i);(n||"yearly"===t.freq)&&(s.on(ge+e._namespace,function(t){a.call(e,t.currentTarget.value),e.trigger("change")}),e._buttonMonthDay=s.eq(0),e._buttonWeekDay=s.eq(1),a.call(e,t.weekDays?"weekday":"monthday"))},_toggleEnd:function(e){var t,n,a,i,s=this;"count"===e?(s._buttonCount.prop("checked",!0),a=!0,i=!1,t=s._count.value(),n=null):"until"===e?(s._buttonUntil.prop("checked",!0),a=!1,i=!0,t=null,n=s._until.value()):(s._buttonNever.prop("checked",!0),a=i=!1,t=n=null),s._count.enable(a),s._until.enable(i),s._value.count=t,s._value.until=n},_toggleMonthDay:function(e){var t,n=this,a=!1,i=!0,s=!1;"monthday"===e?(n._buttonMonthDay.prop("checked",!0),t=[n._monthDay.value()],a=!0,i=!1,s=!0):(n._buttonWeekDay.prop("checked",!0),t=null),n._weekDay.enable(i),n._weekDayOffset.enable(i),n._monthDay.enable(a),n._value.monthDays=t,n._weekDayRule(s)},_toggleYear:function(e){var t,n=this,a=!1,i=!0;"monthday"===e?(a=!0,i=!1,t=n._month1.value()):t=n._month2.value(),n._month1.enable(a),n._month2.enable(i),n._value.months=[t],n._toggleMonthDay(e)}}),Z.plugin(C),W=P.template('<div class="k-edit-label"><label>#:headerTitle#</label></div><div class="k-edit-field k-recur-pattern k-scheduler-toolbar"></div><div class="k-recur-view"></div>'),z=P.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" pattern="\\\\d*"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday"></select></div></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday"></select></div></div><div class="k-edit-label"><label>#:messages.month#</label></div><div class="k-edit-field"><select class="k-recur-month"></select></div># } #'),U=P.template('# if (endPattern === "count") { #<div class="k-edit-label"><label>#:messages.after#</label></div><div class="k-edit-field"><input class="k-recur-count" pattern="\\\\d*" /></div># } else if (endPattern === "until") { #<div class="k-edit-label"><label>#:messages.on#</label></div><div class="k-edit-field"><input type="date" class="k-recur-until" /></div># } #'),V=P.template('<ul class="k-reset k-header k-scheduler-navigation">#for (var i = 0, length = dataSource.length; i < length; i++) {#<li class="k-state-default #= value === dataSource[i].value ? "k-state-selected" : "" #"><a role="button" href="\\#" class="k-link" data-#=ns#value="#=dataSource[i].value#">#:dataSource[i].text#</a></li>#}#</ul>'),A=N.extend({init:function(e,t){var n=this;N.fn.init.call(n,e,t),t=n.options,n._optionTemplate=P.template('<option value="#:value#">#:text#</option>'),n.value(t.value),n._pane=t.pane,n._initRepeatButton(),n._initRepeatEnd(),n._defaultValue=n._value},options:{name:"MobileRecurrenceEditor",animations:{left:"slide",right:"slide:right"},mobile:!0,messages:{cancel:"Cancel",update:"Save",endTitle:"Repeat ends",repeatTitle:"Repeat pattern",headerTitle:"Repeat event",end:{patterns:{never:"Never",after:"After...",on:"On..."},never:"Never",after:"End repeat after",on:"End repeat on"},daily:{interval:""},hourly:{interval:""},weekly:{interval:""},monthly:{interval:"",repeatBy:"Repeat by: ",dayOfMonth:"Day of the month",dayOfWeek:"Day of the week",repeatEvery:"Repeat every",every:"Every",day:"Day "},yearly:{interval:"",repeatBy:"Repeat by: ",dayOfMonth:"Day of the month",dayOfWeek:"Day of the week",repeatEvery:"Repeat every: ",every:"Every",month:"Month",day:"Day"}}},events:["change"],value:function(e){var n=this,a=n.options.timezone;return e===t?n._value.freq?S(n._value,a):"":(n._value=Y(e,a)||{},t)},destroy:function(){this._destroyView(),P.destroy(this._endFields),this._repeatButton.off(ge+this._namespace),N.fn.destroy.call(this)},_initRepeatButton:function(){var t=this,n=t.options.messages.frequencies[this._value.freq||"never"];t._repeatButton=e('<a href="#" class="k-button k-scheduler-recur">'+n+"</a>").on(ge+t._namespace,function(e){e.preventDefault(),t._createView("repeat"),t._pane.navigate("recurrence",t.options.animations.left)}),t.element.append(t._repeatButton)},_initRepeatEnd:function(){var t=this,n=e('<div class="k-edit-label"><label>'+t.options.messages.end.mobileLabel+"</label></div>").insertAfter(t.element.parent(".k-edit-field")),a=e('<div class="k-edit-field"><a href="#" class="k-button k-scheduler-recur-end"></a></div>').on(ge+t._namespace,function(e){e.preventDefault(),t._value.freq&&(t._createView("end"),t._pane.navigate("recurrence",t.options.animations.left))}).insertAfter(n);t._endFields=n.add(a).toggleClass("k-state-disabled",!t._value.freq),t._endButton=a.find(".k-scheduler-recur-end").text(t._endText())},_endText:function(){var e=this._value,t=this.options.messages.end,n=t.never;return e.count?n=P.format("{0} {1}",t.after,e.count):e.until&&(n=P.format("{0} {1:d}",t.on,e.until)),n},_initFrequency:function(){var t=this,n=t.options.messages.frequencies,a=V({dataSource:e.map(this.options.frequencies,function(e){return{text:n[e],value:"never"!==e?e:""}}),value:t._value.freq||"",ns:P.ns});t._view.element.find(".k-recur-pattern").append(a).on(ge+t._namespace,".k-scheduler-navigation li",function(n){var a=e(this);n.preventDefault(),a.addClass("k-state-selected").siblings().removeClass("k-state-selected"),t._value={freq:a.children("a").attr(P.attr("value"))},t._initRepeatView()})},_initEndNavigation:function(){var t,n=this,a=n.options.messages.end.patterns,i=n._value,s="";i.count?s="count":i.until&&(s="until"),t=V({dataSource:[{text:a.never,value:""},{text:a.after,value:"count"},{text:a.on,value:"until"}],value:s,ns:P.ns}),n._view.element.find(".k-recur-pattern").append(t).on(ge+n._namespace,".k-scheduler-navigation li",function(t){var a=e(this),s=null,r=null;t.preventDefault(),a.addClass("k-state-selected").siblings().removeClass("k-state-selected"),n._initEndView(a.children("a").attr(P.attr("value"))),n._count?(s=n._count.value(),r=null):n._until&&(s=null,r=n._until.val?P.parseDate(n._until.val(),"yyyy-MM-dd"):n._until.value()),i.count=s,i.until=r})},_createView:function(t){var n=this,a=n.options,i=a.messages,s=i["repeat"===t?"repeatTitle":"endTitle"],r='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="recurrence"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+i.cancel+"</a>"+i.headerTitle+'<a href="#" class="k-button k-scheduler-update">'+i.update+"</a></div>",l=n._pane.view().id;n._view=n._pane.append(r+W({headerTitle:s})),n._view.element.on(ge+n._namespace,"a.k-scheduler-cancel, a.k-scheduler-update",function(t){t.preventDefault(),t.stopPropagation(),e(this).hasClass("k-scheduler-update")?(n.trigger("change"),n._defaultValue=e.extend({},n._value)):n._value=n._defaultValue;var a=n._value.freq;n._endButton.text(n._endText()),n._endFields.toggleClass("k-state-disabled",!a),n._repeatButton.text(i.frequencies[a||"never"]),n._pane.one("viewShow",function(){n._destroyView()}),n._pane.navigate(l,n.options.animations.right)}),n._container=n._view.element.find(".k-recur-view"),"repeat"===t?(n._initFrequency(),n._initRepeatView()):(n._initEndNavigation(),n._initEndView())},_destroyView:function(){this._view&&(this._view.destroy(),this._view.element.remove()),this._view=null},_initRepeatView:function(){
  var e=this,n=e._value.freq||"never",a={frequency:n,weekDayCheckBoxes:O,firstWeekDay:e.options.firstWeekDay,messages:e.options.messages[n]},i=z(a),s=e._container,r=e._value;return P.destroy(s),s.html(i),i?("weekly"!==n||r.weekDays||(r.weekDays=[{day:e.options.start.getDay(),offset:0}]),e._initInterval(),e._initMonthDay(),e._initWeekDays(),e._initWeekDay(),e._initMonth(),e._period(),t):(e._value={},t)},_initEndView:function(e){var n,a=this,i=a._value;e===t&&(i.count?e="count":i.until&&(e="until")),n={endPattern:e,messages:a.options.messages.end},P.destroy(a._container),a._container.html(U(n)),a._initCount(),a._initUntil()},_initWeekDay:function(){var t,n=this,a=n.options.messages.weekdays,i=n.options.messages.offsetPositions,s=n._container.find(".k-recur-weekday"),r=function(){n._weekDayRule(),n.trigger("change")};s[0]&&(n._weekDayOffset=n._container.find(".k-recur-weekday-offset").html(n._options([{text:i.first,value:"1"},{text:i.second,value:"2"},{text:i.third,value:"3"},{text:i.fourth,value:"4"},{text:i.last,value:"-1"}])).change(r),t=[{text:a.day,value:"day"},{text:a.weekday,value:"weekday"},{text:a.weekend,value:"weekend"}],t=t.concat(e.map(P.culture().calendar.days.names,function(e,t){return{text:e,value:t}})),n._weekDay=s.html(n._options(t)).change(r).val(n.options.start.getDay()),n._weekDayView())},_initMonth:function(){var t,n=this,a=n._value,i=n.options.start,s=a.months||[i.getMonth()+1],r=n._container.find(".k-recur-month"),l=P.culture().calendar.months.names;r[0]&&(t=e.map(l,function(e,t){return{text:e,value:t+1}}),r.html(n._options(t)).change(function(){a.months=[+this.value]}),n._monthSelect=r,s&&r.val(s[0]))},_period:function(){var t,n,a,i=this,s=i._value,r=i._container,l=i.options.messages[s.freq],o=r.find(".k-repeat-rule"),u=r.find(".k-weekday-view"),d=r.find(".k-monthday-view");o[0]&&(t=s.weekDays?"weekday":"monthday",n=V({value:t,dataSource:[{text:l.dayOfMonth,value:"monthday"},{text:l.dayOfWeek,value:"weekday"}],ns:P.ns}),a=function(e){var t=i._weekDay.val(),n=i._weekDayOffset.val(),a=i._monthDay.value(),r=i._monthSelect?i._monthSelect.val():null;"monthday"===e?(s.weekDays=null,s.monthDays=a?[a]:a,s.months=r?[+r]:r,u.hide(),d.show()):(s.monthDays=null,s.months=r?[+r]:r,s.weekDays=[{offset:+n,day:+t}],u.show(),d.hide())},o.append(n).on(ge+i._namespace,".k-scheduler-navigation li",function(t){var n,i=e(this).addClass("k-state-selected");t.preventDefault(),i.siblings().removeClass("k-state-selected"),n=i.children("a").attr(P.attr("value")),a(n)}),a(t))},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),n=e.options.start,a=e._value,i=a.until,s=i&&n>i?i:n;e._until=P.support.input.date?t.attr("min",P.toString(s,"yyyy-MM-dd")).val(P.toString(i||n,"yyyy-MM-dd")).on("change",function(){a.until=P.parseDate(this.value,"yyyy-MM-dd")}):t.kendoDatePicker({min:s,value:i||n,change:function(){a.until=this.value()}}).data("kendoDatePicker")},_options:function(e,t){var n=0,a="",i=e.length,s=this._optionTemplate;for(t&&(a+=s({value:"",text:t}));i>n;n++)a+=s(e[n]);return a}}),Z.plugin(A)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
  //# sourceMappingURL=kendo.scheduler.recurrence.min.js.map
  